1
- import React , { Dispatch , SetStateAction , SVGProps } from " react" ;
2
- import { DeepPartial } from " ./lib/helpers/deep-partial" ;
1
+ import React , { Dispatch , SetStateAction , SVGProps } from ' react' ;
2
+ import { DeepPartial } from ' ./lib/helpers/deep-partial' ;
3
3
4
4
/* ===== Start Fluid Theme ===== */
5
5
export type CustomFluidTheme = DeepPartial < FluidTheme > ;
@@ -39,13 +39,13 @@ export interface FluidTheme {
39
39
base : string ;
40
40
shape : FluidButtonShapes ;
41
41
//@ts -ignore
42
- weight : Pick < FluidButtonWeights , TabProps [ " weight" ] > ;
42
+ weight : Pick < FluidButtonWeights , TabProps [ ' weight' ] > ;
43
43
tabWrap : {
44
44
base : string ;
45
45
//@ts -ignore
46
- active : Pick < FluidButtonWeights , TabProps [ " weight" ] > ;
46
+ active : Pick < FluidButtonWeights , TabProps [ ' weight' ] > ;
47
47
//@ts -ignore
48
- inactive : Pick < FluidButtonWeights , TabProps [ " weight" ] > ;
48
+ inactive : Pick < FluidButtonWeights , TabProps [ ' weight' ] > ;
49
49
} ;
50
50
activeButton : {
51
51
base : string ;
@@ -55,10 +55,17 @@ export interface FluidTheme {
55
55
square : string ;
56
56
} ;
57
57
//@ts -ignore
58
- weight : Pick < FluidButtonWeights , TabProps [ " weight" ] > ;
58
+ weight : Pick < FluidButtonWeights , TabProps [ ' weight' ] > ;
59
59
} ;
60
60
panel : string ;
61
61
} ;
62
+ dialog : {
63
+ base : string ;
64
+ } ;
65
+ toast : {
66
+ base : string ;
67
+ position : FluidPositions ;
68
+ } ;
62
69
}
63
70
64
71
export interface FluidBoolean {
@@ -153,18 +160,18 @@ export interface FluidColors {
153
160
purple : string ;
154
161
}
155
162
156
- export type FluidHeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" ;
163
+ export type FluidHeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' ;
157
164
158
165
export interface FluidPositions {
159
- " bottom-left" : string ;
160
- " bottom-right" : string ;
161
- " bottom-center" : string ;
162
- " top-left" : string ;
163
- " top-center" : string ;
164
- " top-right" : string ;
165
- " center-left" : string ;
166
+ ' bottom-left' : string ;
167
+ ' bottom-right' : string ;
168
+ ' bottom-center' : string ;
169
+ ' top-left' : string ;
170
+ ' top-center' : string ;
171
+ ' top-right' : string ;
172
+ ' center-left' : string ;
166
173
center : string ;
167
- " center-right" : string ;
174
+ ' center-right' : string ;
168
175
}
169
176
170
177
export interface FluidSizes {
@@ -173,20 +180,20 @@ export interface FluidSizes {
173
180
md : string ;
174
181
lg : string ;
175
182
xl : string ;
176
- " 2xl" : string ;
177
- " 3xl" : string ;
178
- " 4xl" : string ;
179
- " 5xl" : string ;
180
- " 6xl" : string ;
181
- " 7xl" : string ;
183
+ ' 2xl' : string ;
184
+ ' 3xl' : string ;
185
+ ' 4xl' : string ;
186
+ ' 5xl' : string ;
187
+ ' 6xl' : string ;
188
+ ' 7xl' : string ;
182
189
}
183
190
184
191
/* ===== End Fluid Theme ===== */
185
192
186
193
/* ===== Start Polymorphic Props ===== */
187
194
188
195
export type PolymorphicRef < C extends React . ElementType > =
189
- React . ComponentPropsWithRef < C > [ " ref" ] ;
196
+ React . ComponentPropsWithRef < C > [ ' ref' ] ;
190
197
191
198
export type AsProp < C extends React . ElementType > = {
192
199
as ?: C ;
@@ -199,11 +206,9 @@ export type AsProp<C extends React.ElementType> = {
199
206
200
207
export type PropsToOmit < C extends React . ElementType , P > = keyof ( AsProp < C > & P ) ;
201
208
202
- export type PolymorphicComponentProp <
203
- C extends React . ElementType ,
204
- Props = { }
205
- > = React . PropsWithChildren < Props & AsProp < C > > &
206
- Omit < React . ComponentPropsWithoutRef < C > , PropsToOmit < C , Props > > ;
209
+ export type PolymorphicComponentProp < C extends React . ElementType , Props = { } > =
210
+ React . PropsWithChildren < Props & AsProp < C > > &
211
+ Omit < React . ComponentPropsWithoutRef < C > , PropsToOmit < C , Props > > ;
207
212
208
213
export type PolymorphicComponentPropWithRef <
209
214
C extends React . ElementType ,
@@ -277,7 +282,7 @@ export type ButtonProps<C extends React.ElementType> =
277
282
*
278
283
* @type {'light' | 'normal' | 'bold' | 'outline' | 'clear' | 'link' }
279
284
*/
280
- weight ?: keyof FluidButtonWeights | " normal" ;
285
+ weight ?: keyof FluidButtonWeights | ' normal' ;
281
286
/**
282
287
* Adjust the padding to be the same for all edges
283
288
*
@@ -315,10 +320,10 @@ export type ButtonProps<C extends React.ElementType> =
315
320
> ;
316
321
317
322
export type ButtonLoadingOptionsAnimation =
318
- | " spin"
319
- | " pulse"
320
- | " ping"
321
- | " spin-large" ;
323
+ | ' spin'
324
+ | ' pulse'
325
+ | ' ping'
326
+ | ' spin-large' ;
322
327
323
328
export type ButtonLoadingOptions = {
324
329
animation ?: ButtonLoadingOptionsAnimation ;
@@ -339,7 +344,7 @@ export type ButtonIsLoadedOptions = {
339
344
className ?: string ;
340
345
} ;
341
346
342
- export type ButtonComponent = < C extends React . ElementType = " button" > (
347
+ export type ButtonComponent = < C extends React . ElementType = ' button' > (
343
348
props : ButtonProps < C >
344
349
) => React . ReactElement | null ;
345
350
@@ -383,13 +388,13 @@ export type ButtonInnerProp = {
383
388
* `flex` (default) or `between`
384
389
* `between` will create a gap between the icon and the label
385
390
*/
386
- iconStartPosition ?: " flex" | " between" ;
391
+ iconStartPosition ?: ' flex' | ' between' ;
387
392
/**
388
393
* iconEndPosition: Position of the iconEnd
389
394
* `flex` (default) or `between`
390
395
* `between` will create a gap between the icon and the label
391
396
*/
392
- iconEndPosition ?: " flex" | " between" ;
397
+ iconEndPosition ?: ' flex' | ' between' ;
393
398
} & SRProp ;
394
399
395
400
/* ===== End Button Props ===== */
@@ -425,12 +430,12 @@ export type MenuProps = {
425
430
* menuPositionX: Horizontal position of the menu
426
431
* @defaultValue `start`
427
432
*/
428
- menuPositionX ?: " start" | " center" | " end" ;
433
+ menuPositionX ?: ' start' | ' center' | ' end' ;
429
434
/**
430
435
* menuPositionY: Vertical position of the menu
431
436
* @defaultValue `top`
432
437
*/
433
- menuPositionY ?: " top" | " center" | " bottom" ;
438
+ menuPositionY ?: ' top' | ' center' | ' bottom' ;
434
439
[ x : string ] : any ;
435
440
/**
436
441
* Whether the menu should be rendered horizontally.
@@ -509,8 +514,8 @@ export type MenuProps = {
509
514
* }
510
515
* ```
511
516
*/
512
- menus ?: MenuItemProps < " button" > [ ] ;
513
- } & ButtonProps < " button" > &
517
+ menus ?: MenuItemProps < ' button' > [ ] ;
518
+ } & ButtonProps < ' button' > &
514
519
SRProp ;
515
520
516
521
export type MenuComponent = ( props : MenuProps ) => React . ReactElement | null ;
@@ -533,15 +538,15 @@ export type MenuComponent = (props: MenuProps) => React.ReactElement | null;
533
538
* @defaultValue `default`
534
539
*/
535
540
export type MenuRoleProp =
536
- | " separator"
537
- | " destructive"
538
- | " default"
539
- | " info"
540
- | " success"
541
- | " warning"
542
- | " primary" ;
543
-
544
- export type MenuItemProps < C extends React . ElementType = " button" > =
541
+ | ' separator'
542
+ | ' destructive'
543
+ | ' default'
544
+ | ' info'
545
+ | ' success'
546
+ | ' warning'
547
+ | ' primary' ;
548
+
549
+ export type MenuItemProps < C extends React . ElementType = ' button' > =
545
550
PolymorphicComponentPropWithRef <
546
551
C ,
547
552
{
@@ -553,7 +558,7 @@ export type MenuItemProps<C extends React.ElementType = "button"> =
553
558
> &
554
559
ButtonProps < C > ;
555
560
556
- export type MenuItemComponent = < C extends React . ElementType = " button" > (
561
+ export type MenuItemComponent = < C extends React . ElementType = ' button' > (
557
562
props : MenuItemProps < C >
558
563
) => React . ReactElement | null ;
559
564
@@ -565,7 +570,7 @@ export type DropdownProps = {
565
570
list : DropdownListProps [ ] ;
566
571
label ?: string ;
567
572
labelClassName ?: string ;
568
- description ?: FormProp [ " description" ] ;
573
+ description ?: FormProp [ ' description' ] ;
569
574
placeholder ?: string ;
570
575
disabled ?: boolean ;
571
576
className ?: string ;
@@ -736,22 +741,22 @@ export type DropdownProps = {
736
741
*/
737
742
export type DropdownListProps = Record < string , any > | string ;
738
743
739
- export type SelectProps < C extends React . ElementType = " div" > =
744
+ export type SelectProps < C extends React . ElementType = ' div' > =
740
745
PolymorphicComponentPropWithRef < C , { } & DropdownProps > ;
741
746
742
- export type SelectComponent = < C extends React . ElementType = " div" > (
747
+ export type SelectComponent = < C extends React . ElementType = ' div' > (
743
748
props : SelectProps < C >
744
749
) => React . ReactElement | null ;
745
750
746
- export type ComboBoxProps < C extends React . ElementType = " div" > =
751
+ export type ComboBoxProps < C extends React . ElementType = ' div' > =
747
752
PolymorphicComponentPropWithRef <
748
753
C ,
749
754
{
750
755
inputClassName ?: string ;
751
756
} & DropdownProps
752
757
> ;
753
758
754
- export type ComboBoxComponent = < C extends React . ElementType = " div" > (
759
+ export type ComboBoxComponent = < C extends React . ElementType = ' div' > (
755
760
props : ComboBoxProps < C >
756
761
) => React . ReactElement | null ;
757
762
@@ -781,7 +786,7 @@ export type TabItemProps = {
781
786
content : React . ReactNode ;
782
787
} ;
783
788
784
- export type TabListItemProps < C extends React . ElementType = " div" > =
789
+ export type TabListItemProps < C extends React . ElementType = ' div' > =
785
790
PolymorphicComponentPropWithRef <
786
791
C ,
787
792
{
@@ -794,12 +799,12 @@ export type TabListItemProps<C extends React.ElementType = "div"> =
794
799
* The title of the tab
795
800
* @defaultValue `undefined`
796
801
*/
797
- title ?: TabItemProps [ " title" ] ;
802
+ title ?: TabItemProps [ ' title' ] ;
798
803
shape ?: keyof FluidButtonShapes ;
799
804
size ?: keyof FluidButtonSizes ;
800
805
weight ?:
801
- | keyof Pick < FluidButtonWeights , " normal" | " clear" | " light" >
802
- | " normal" ;
806
+ | keyof Pick < FluidButtonWeights , ' normal' | ' clear' | ' light' >
807
+ | ' normal' ;
803
808
className ?: string ;
804
809
tabClassName ?: string ;
805
810
tabActiveClassName ?: string ;
@@ -810,9 +815,9 @@ export type TabListItemProps<C extends React.ElementType = "div"> =
810
815
811
816
export type TabListProps = {
812
817
tabs ?: TabItemProps [ ] ;
813
- } & Omit < TabListItemProps , " layoutId" > ;
818
+ } & Omit < TabListItemProps , ' layoutId' > ;
814
819
815
- export type TabProps < C extends React . ElementType = " div" > =
820
+ export type TabProps < C extends React . ElementType = ' div' > =
816
821
PolymorphicComponentPropWithRef <
817
822
C ,
818
823
{
@@ -824,6 +829,6 @@ export type TabProps<C extends React.ElementType = "div"> =
824
829
} & TabListProps
825
830
> ;
826
831
827
- export type TabComponent = < C extends React . ElementType = " div" > (
832
+ export type TabComponent = < C extends React . ElementType = ' div' > (
828
833
props : TabProps < C >
829
834
) => React . ReactElement | null ;
0 commit comments