22
33import * as React from 'react'
44
5- export type DefaultColors = 'primary'
6- | 'secondary'
7- | 'success'
8- | 'danger'
9- | 'warning'
10- | 'info'
11- | 'light'
12- | 'dark'
13-
14- export type Sizes = "sm" | "md" | "lg"
5+ export type DefaultColors =
6+ | 'primary'
7+ | 'secondary'
8+ | 'success'
9+ | 'danger'
10+ | 'warning'
11+ | 'info'
12+ | 'light'
13+ | 'dark'
14+
15+ export type Sizes = 'sm' | 'md' | 'lg'
1516
1617interface InputType {
1718 checked ?: boolean
@@ -124,6 +125,7 @@ interface TogglerRenderProps {
124125 onToggle : ( state ?: boolean ) => void
125126 toggled : boolean
126127}
128+
127129interface TogglerProps {
128130 children : ( props : TogglerRenderProps ) => React . ReactNode
129131 defaultToggled ?: boolean
@@ -160,7 +162,7 @@ export interface BoxProps
160162type Omit < T , K > = Pick < T , Exclude < keyof T , keyof K > >
161163
162164export type OmitBoxProps < T > = Omit < T , BoxProps >
163- type OmitFontProps < T > = Omit < T , FontProps >
165+ type OmitFontProps < T > = Omit < T , FontProps >
164166
165167export const Box : React . FunctionComponent < BoxProps >
166168
@@ -198,7 +200,7 @@ export interface FormCheckProps extends BoxProps {
198200export const FormCheck : React . FunctionComponent < FormCheckProps >
199201
200202export const FormCheckLabel : React . FunctionComponent <
201- BoxProps & React . HTMLProps < HTMLLabelElement >
203+ BoxProps & React . HTMLProps < HTMLLabelElement >
202204>
203205
204206export interface FormGroupProps extends BoxProps {
@@ -235,9 +237,9 @@ export const Label: React.FunctionComponent<LabelProps>
235237
236238export interface RadioProps
237239 extends Omit < React . HTMLProps < HTMLInputElement > , BoxProps & { size : any } > ,
238- OmitFontProps < BoxProps > {
240+ OmitFontProps < BoxProps > {
239241 checked ?: boolean
240- disabled ?:boolean
242+ disabled ?: boolean
241243 size ?: Sizes
242244 value ?: string
243245}
@@ -454,10 +456,6 @@ export interface ThemeType {
454456 inputPlaceholderText : ( props : Object ) => string
455457 inputTextColor : ( props : Object ) => string
456458
457- controlFocusBorderColor : ( props : Object ) => string
458-
459- controlFocusBoxShadow : ( props : Object ) => ( color : string ) => string
460-
461459 gridColumns : 12
462460 gridGutter : 8
463461
@@ -476,15 +474,15 @@ export interface ThemeType {
476474 alertBorderLevel : - 9
477475 alertColorLevel : 6
478476
479- alertVariant : ( props : Object ) => ( baseColorTheme : Object ) => AlertColorVariant
477+ alertVariant : ( baseColorTheme : Object ) => ( props : Object ) => AlertColorVariant
480478
481479 zIndexControl : 1
482480 zIndexInnerSwitch : 10
483481 zIndexModal : 1050
484482 zIndexModalBackdrop : 1071
485483
486484 transitionEnabled : true
487- transition : ( props : Object ) => ( value : string ) => string
485+ transition : ( value : string ) => ( props : Object ) => string
488486
489487 safeTransitionProperties : [
490488 'color' ,
@@ -560,24 +558,17 @@ export interface ThemeType {
560558
561559 base : ( ) => ( ) => ( props : Object ) => string
562560
563- controlFocus : (
564- props : Object ,
565- ) => ( baseColor : string ) => ( props : Object ) => string
561+ controlFocus : ( baseColor : string ) => ( props : Object ) => string
562+ baseFocus : ( baseColor : string ) => ( props : Object ) => string
566563
567- btnVariant : (
568- props : Object ,
569- ) => ( baseColor : string ) => ( props : Object ) => string
564+ btnVariant : ( baseColor : string ) => ( props : Object ) => string
570565
571566 colorLevel : (
572- props : Object ,
573- ) => (
574567 color : ( props : Object ) => string | string ,
575568 level : ( props : Object ) => string | string ,
576- ) => string
569+ ) => ( props : Object ) => string
577570
578- colorYik : (
579- props : Object ,
580- ) => ( color : ( props : Object ) => string | string ) => string
571+ colorYik : ( color : string ) => ( props : Object ) => string
581572}
582573
583574export const theme : ThemeType
@@ -590,23 +581,11 @@ interface AlertColorVariant {
590581 }
591582}
592583
593- export const lazyTh : ( name : string ) => ( props : Object ) => string
594-
595584export const th : (
596585 name : string ,
597586 transform ?: ( res : any ) => string ,
598587) => ( props : Object ) => string
599588
600- export const mixin : (
601- name : string ,
602- ...args : Array < string >
603- ) => ( props : Object ) => string
604-
605- export const prop : (
606- name : string ,
607- themeFallback ?: string ,
608- ) => ( props : Object ) => string
609-
610589export const calc : (
611590 value : string ,
612591 fn : ( num : string | number ) => string ,
@@ -616,19 +595,6 @@ export const unit: (unit: string) => (value: number | string) => string
616595
617596export const px : ReturnType < typeof unit >
618597
619- interface styleArg {
620- prop : string
621- cssProperty : string
622- transform : Function
623- variants : Array < string >
624- }
625-
626- export function style ( arg : styleArg ) : ( props : Object ) => Object
627-
628- export const composeStyles : (
629- ...funcs : Array < ( props : Object ) => string >
630- ) => ( ( props : Object ) => Object )
631-
632598export interface ModalProps extends BoxProps {
633599 children ?: React . ReactNode
634600 onClose ?: ( ) => void
@@ -695,20 +661,7 @@ export const DEFAULT_BREAKPOINTS: {
695661 xl : 1200
696662}
697663
698- export const getBreakpoints : ( props : Object ) => Object
699-
700- export const getBreakpointsEntries : ( props : Object ) => Array < Array < string > >
701-
702- export const getNextBreakpoint : ( name : string , props : Object ) => null | string
703-
704- export const getPreviousBreakpoint : (
705- name : string ,
706- props : Object ,
707- ) => null | string
708-
709- export const getBreakpointMin : ( name : string , props : Object ) => null | number
710-
711- export const getBreakpointMax : ( name : string , props : Object ) => null | number
664+ export const breakpoints : ( props : Object ) => Object
712665
713666export const mediaMinWidth : ( value : number | string ) => string
714667
0 commit comments