@yamada-ui/carousel 2.0.7-next-20241005220055 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/carousel-control.js +2 -2
- package/dist/carousel-control.js.map +1 -1
- package/dist/carousel-control.mjs +2 -2
- package/dist/carousel-indicators.js +5 -5
- package/dist/carousel-indicators.js.map +1 -1
- package/dist/carousel-indicators.mjs +2 -2
- package/dist/carousel-slide.js +6 -7
- package/dist/carousel-slide.js.map +1 -1
- package/dist/carousel-slide.mjs +2 -2
- package/dist/carousel.d.mts +47 -47
- package/dist/carousel.d.ts +47 -47
- package/dist/carousel.js +71 -70
- package/dist/carousel.js.map +1 -1
- package/dist/carousel.mjs +5 -5
- package/dist/{chunk-OQNU22B2.mjs → chunk-CXXL47SC.mjs} +8 -9
- package/dist/chunk-CXXL47SC.mjs.map +1 -0
- package/dist/{chunk-T3LMURPY.mjs → chunk-PEXGWNKB.mjs} +4 -4
- package/dist/chunk-PEXGWNKB.mjs.map +1 -0
- package/dist/{chunk-LRO4RIBJ.mjs → chunk-SYCPZC2C.mjs} +41 -31
- package/dist/chunk-SYCPZC2C.mjs.map +1 -0
- package/dist/{chunk-W6XPFRNI.mjs → chunk-UTOIPGGP.mjs} +7 -7
- package/dist/chunk-UTOIPGGP.mjs.map +1 -0
- package/dist/{chunk-LV5JHVV6.mjs → chunk-WSTWB7CV.mjs} +29 -37
- package/dist/chunk-WSTWB7CV.mjs.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +71 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/use-carousel.d.mts +71 -99
- package/dist/use-carousel.d.ts +71 -99
- package/dist/use-carousel.js +39 -29
- package/dist/use-carousel.js.map +1 -1
- package/dist/use-carousel.mjs +1 -1
- package/package.json +7 -8
- package/dist/chunk-LRO4RIBJ.mjs.map +0 -1
- package/dist/chunk-LV5JHVV6.mjs.map +0 -1
- package/dist/chunk-OQNU22B2.mjs.map +0 -1
- package/dist/chunk-T3LMURPY.mjs.map +0 -1
- package/dist/chunk-W6XPFRNI.mjs.map +0 -1
package/dist/use-carousel.d.ts
CHANGED
@@ -13,46 +13,30 @@ type SlidesHandlerOptionType = EmblaOptionsType["watchSlides"];
|
|
13
13
|
type CarouselControl = EmblaCarouselType;
|
14
14
|
interface CarouselContext {
|
15
15
|
carousel: CarouselControl | undefined;
|
16
|
+
includeGapInSize: boolean;
|
16
17
|
indexes: number[];
|
18
|
+
orientation: "horizontal" | "vertical";
|
17
19
|
selectedIndex: number;
|
18
|
-
orientation: "vertical" | "horizontal";
|
19
|
-
includeGapInSize: boolean;
|
20
20
|
slidesToScroll: number;
|
21
|
-
slideSize: string | number;
|
22
|
-
gap: CSSUIProps["gap"];
|
23
21
|
styles: {
|
24
|
-
[key: string]: CSSUIObject;
|
22
|
+
[key: string]: CSSUIObject | undefined;
|
25
23
|
};
|
26
24
|
}
|
27
25
|
declare const CarouselProvider: react.Provider<CarouselContext>;
|
28
26
|
declare const useCarouselContext: () => CarouselContext;
|
29
|
-
interface UseCarouselProps extends Omit<HTMLUIProps, "
|
30
|
-
/**
|
31
|
-
* The index of the carousel slide.
|
32
|
-
*/
|
33
|
-
index?: number;
|
34
|
-
/**
|
35
|
-
* The initial index of the carousel slide.
|
36
|
-
*
|
37
|
-
* @default 0
|
38
|
-
*/
|
39
|
-
defaultIndex?: number;
|
40
|
-
/**
|
41
|
-
* The callback invoked when carousel slide selected.
|
42
|
-
*/
|
43
|
-
onChange?: (index: number) => void;
|
44
|
-
/**
|
45
|
-
* The orientation of the carousel.
|
46
|
-
*
|
47
|
-
* @default 'horizontal'
|
48
|
-
*/
|
49
|
-
orientation?: "vertical" | "horizontal";
|
27
|
+
interface UseCarouselProps extends Omit<HTMLUIProps, "draggable" | "gap" | "onChange"> {
|
50
28
|
/**
|
51
29
|
* The alignment of the carousel.
|
52
30
|
*
|
53
31
|
* @default 'center'
|
54
32
|
*/
|
55
33
|
align?: AlignmentOptionType;
|
34
|
+
/**
|
35
|
+
* If `true`, the carousel will be autoplay.
|
36
|
+
*
|
37
|
+
* @default false
|
38
|
+
*/
|
39
|
+
autoplay?: boolean;
|
56
40
|
/**
|
57
41
|
* Clear leading and trailing empty space that causes excessive scrolling.
|
58
42
|
* Use trimSnaps to only use snap points that trigger scrolling or keepSnaps to keep them.
|
@@ -61,11 +45,21 @@ interface UseCarouselProps extends Omit<HTMLUIProps, "onChange" | "draggable" |
|
|
61
45
|
*/
|
62
46
|
containScroll?: ScrollContainOptionType;
|
63
47
|
/**
|
64
|
-
*
|
48
|
+
* Ref of the resizable item callback.
|
49
|
+
*/
|
50
|
+
controlRef?: RefObject<CarouselControl | undefined>;
|
51
|
+
/**
|
52
|
+
* The initial index of the carousel slide.
|
65
53
|
*
|
66
|
-
* @default
|
54
|
+
* @default 0
|
67
55
|
*/
|
68
|
-
|
56
|
+
defaultIndex?: number;
|
57
|
+
/**
|
58
|
+
* The number for the autoplay interval of the carousel.
|
59
|
+
*
|
60
|
+
* @default 4000
|
61
|
+
*/
|
62
|
+
delay?: number;
|
69
63
|
/**
|
70
64
|
* If `true`, momentum scrolling will be enabled.
|
71
65
|
*
|
@@ -78,6 +72,30 @@ interface UseCarouselProps extends Omit<HTMLUIProps, "onChange" | "draggable" |
|
|
78
72
|
* @default true
|
79
73
|
*/
|
80
74
|
draggable?: boolean;
|
75
|
+
/**
|
76
|
+
* Set scroll duration when triggered by any of the API methods.
|
77
|
+
* Higher numbers enables slower scrolling.
|
78
|
+
* Drag interactions are not affected because duration is then determined by the drag force.
|
79
|
+
*
|
80
|
+
* @default 25
|
81
|
+
*/
|
82
|
+
duration?: number;
|
83
|
+
/**
|
84
|
+
* The CSS `gap` property.
|
85
|
+
*
|
86
|
+
* @default '4'
|
87
|
+
*/
|
88
|
+
gap?: CSSUIProps["gap"];
|
89
|
+
/**
|
90
|
+
* If `true`, gap will be treated as part of the carousel slide size.
|
91
|
+
*
|
92
|
+
* @default true
|
93
|
+
*/
|
94
|
+
includeGapInSize?: boolean;
|
95
|
+
/**
|
96
|
+
* The index of the carousel slide.
|
97
|
+
*/
|
98
|
+
index?: number;
|
81
99
|
/**
|
82
100
|
* Choose a fraction representing the percentage portion of a slide that needs to be visible in order to be considered in view.
|
83
101
|
*
|
@@ -91,6 +109,12 @@ interface UseCarouselProps extends Omit<HTMLUIProps, "onChange" | "draggable" |
|
|
91
109
|
* @default true
|
92
110
|
*/
|
93
111
|
loop?: boolean;
|
112
|
+
/**
|
113
|
+
* The orientation of the carousel.
|
114
|
+
*
|
115
|
+
* @default 'horizontal'
|
116
|
+
*/
|
117
|
+
orientation?: "horizontal" | "vertical";
|
94
118
|
/**
|
95
119
|
* If `true`, allow the carousel to skip scroll snaps if it's dragged vigorously.
|
96
120
|
* Note that this option will be ignored if the dragFree option is set to true.
|
@@ -99,53 +123,23 @@ interface UseCarouselProps extends Omit<HTMLUIProps, "onChange" | "draggable" |
|
|
99
123
|
*/
|
100
124
|
skipSnaps?: boolean;
|
101
125
|
/**
|
102
|
-
*
|
103
|
-
* Higher numbers enables slower scrolling.
|
104
|
-
* Drag interactions are not affected because duration is then determined by the drag force.
|
105
|
-
*
|
106
|
-
* @default 25
|
107
|
-
*/
|
108
|
-
duration?: number;
|
109
|
-
/**
|
110
|
-
* The number for the autoplay interval of the carousel.
|
126
|
+
* The carousel slide width.
|
111
127
|
*
|
112
|
-
* @default
|
128
|
+
* @default '100%'
|
113
129
|
*/
|
114
|
-
|
130
|
+
slideSize?: CSSUIProps["width"];
|
115
131
|
/**
|
116
|
-
*
|
132
|
+
* The number of slides that should be scrolled with next or previous buttons.
|
117
133
|
*
|
118
|
-
* @default
|
134
|
+
* @default 1
|
119
135
|
*/
|
120
|
-
|
136
|
+
slidesToScroll?: number;
|
121
137
|
/**
|
122
138
|
* If `true`, autoplay will pause when the mouse entries over.
|
123
139
|
*
|
124
140
|
* @default true
|
125
141
|
*/
|
126
142
|
stopMouseEnterAutoplay?: boolean;
|
127
|
-
/**
|
128
|
-
* If `true`, gap will be treated as part of the carousel slide size.
|
129
|
-
*
|
130
|
-
* @default true
|
131
|
-
*/
|
132
|
-
includeGapInSize?: boolean;
|
133
|
-
/**
|
134
|
-
* The CSS `gap` property.
|
135
|
-
*
|
136
|
-
* @default '4'
|
137
|
-
*/
|
138
|
-
gap?: CSSUIProps["gap"];
|
139
|
-
/**
|
140
|
-
* The carousel slide width.
|
141
|
-
*
|
142
|
-
* @default '100%'
|
143
|
-
*/
|
144
|
-
slideSize?: string | number;
|
145
|
-
/**
|
146
|
-
* A callback that return the current scroll amount when the carousel is scrolled.
|
147
|
-
*/
|
148
|
-
onScrollProgress?: (progress: number) => void;
|
149
143
|
/**
|
150
144
|
* Enables for scrolling the carousel with mouse and touch interactions.
|
151
145
|
* Set this to `false` to disable drag events or pass a custom callback to add your own drag logic.
|
@@ -168,44 +162,22 @@ interface UseCarouselProps extends Omit<HTMLUIProps, "onChange" | "draggable" |
|
|
168
162
|
*/
|
169
163
|
watchSlides?: SlidesHandlerOptionType;
|
170
164
|
/**
|
171
|
-
*
|
165
|
+
* The callback invoked when carousel slide selected.
|
172
166
|
*/
|
173
|
-
|
167
|
+
onChange?: (index: number) => void;
|
168
|
+
/**
|
169
|
+
* A callback that return the current scroll amount when the carousel is scrolled.
|
170
|
+
*/
|
171
|
+
onScrollProgress?: (progress: number) => void;
|
174
172
|
}
|
175
|
-
declare const useCarousel: ({
|
173
|
+
declare const useCarousel: ({ align, autoplay, children, containScroll, controlRef, defaultIndex, delay, dragFree, draggable, duration, includeGapInSize, index, inViewThreshold, loop, orientation, skipSnaps, slideSize, slidesToScroll, stopMouseEnterAutoplay, watchDrag, watchResize, watchSlides, onChange, onScrollProgress, ...rest }: UseCarouselProps) => {
|
176
174
|
carousel: EmblaCarouselType | undefined;
|
177
175
|
children: react.ReactNode;
|
176
|
+
includeGapInSize: boolean;
|
178
177
|
indexes: number[];
|
178
|
+
orientation: "horizontal" | "vertical";
|
179
179
|
selectedIndex: number;
|
180
|
-
orientation: "vertical" | "horizontal";
|
181
|
-
slideSize: string | number;
|
182
|
-
gap: string | number | (string & {}) | {
|
183
|
-
[x: string & {}]: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
184
|
-
base?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
185
|
-
sm?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
186
|
-
md?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
187
|
-
lg?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
188
|
-
xl?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
189
|
-
"2xl"?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl", number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl"] | undefined;
|
190
|
-
} | [number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | {
|
191
|
-
[x: string & {}]: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
192
|
-
base?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
193
|
-
sm?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
194
|
-
md?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
195
|
-
lg?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
196
|
-
xl?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
197
|
-
"2xl"?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
198
|
-
}, number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | {
|
199
|
-
[x: string & {}]: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
200
|
-
base?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
201
|
-
sm?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
202
|
-
md?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
203
|
-
lg?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
204
|
-
xl?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
205
|
-
"2xl"?: number | "px" | (string & {}) | "inherit" | "sm" | "md" | "lg" | "xl" | "2xl" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "1" | "normal" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "68" | "72" | "76" | "80" | "84" | "88" | "92" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "xs" | "3xl" | "4xl" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-13" | "-14" | "-15" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-68" | "-72" | "-76" | "-80" | "-84" | "-88" | "-92" | "-96" | "-px" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5" | "-6.5" | "-7.5" | "-xs" | "-sm" | "-md" | "-normal" | "-lg" | "-xl" | "-2xl" | "-3xl" | "-4xl" | undefined;
|
206
|
-
}];
|
207
180
|
slidesToScroll: number;
|
208
|
-
includeGapInSize: boolean;
|
209
181
|
getContainerProps: PropGetter<"div", undefined>;
|
210
182
|
getSlidesProps: PropGetter<"div", undefined>;
|
211
183
|
};
|
@@ -218,7 +190,7 @@ declare const useCarouselSlide: ({ index }: UseCarouselSlideProps) => {
|
|
218
190
|
};
|
219
191
|
type UseCarouselSlideReturn = ReturnType<typeof useCarouselSlide>;
|
220
192
|
interface UseCarouselControlProps extends IconButtonProps {
|
221
|
-
operation: "
|
193
|
+
operation: "next" | "prev";
|
222
194
|
}
|
223
195
|
declare const useCarouselControl: ({ operation, ...rest }: UseCarouselControlProps) => {
|
224
196
|
getControlProps: PropGetter<"button", undefined>;
|
@@ -226,9 +198,9 @@ declare const useCarouselControl: ({ operation, ...rest }: UseCarouselControlPro
|
|
226
198
|
type UseCarouselControlReturn = ReturnType<typeof useCarouselControl>;
|
227
199
|
declare const useCarouselIndicators: () => {
|
228
200
|
indexes: number[];
|
229
|
-
getIndicatorProps: RequiredPropGetter<
|
201
|
+
getIndicatorProps: RequiredPropGetter<{
|
230
202
|
index: number;
|
231
|
-
}
|
203
|
+
} & HTMLProps<"button">, HTMLProps<"button">>;
|
232
204
|
};
|
233
205
|
type UseCarouselIndicatorsReturn = ReturnType<typeof useCarouselIndicators>;
|
234
206
|
|
package/dist/use-carousel.js
CHANGED
@@ -49,51 +49,54 @@ var [CarouselProvider, useCarouselContext] = (0, import_utils.createContext)({
|
|
49
49
|
errorMessage: `useCarouselContext returned is 'undefined'. Seems you forgot to wrap the components in "<Carousel />"`
|
50
50
|
});
|
51
51
|
var useCarousel = ({
|
52
|
-
index,
|
53
|
-
defaultIndex = 0,
|
54
|
-
onChange,
|
55
52
|
align = "center",
|
56
|
-
orientation = "horizontal",
|
57
53
|
autoplay = false,
|
58
|
-
|
59
|
-
|
60
|
-
|
54
|
+
children,
|
55
|
+
containScroll = false,
|
56
|
+
controlRef,
|
57
|
+
defaultIndex = 0,
|
61
58
|
delay = 4e3,
|
62
|
-
slidesToScroll = 1,
|
63
|
-
draggable = true,
|
64
59
|
dragFree = false,
|
60
|
+
draggable = true,
|
61
|
+
duration = 25,
|
62
|
+
includeGapInSize = true,
|
63
|
+
index,
|
65
64
|
inViewThreshold = 0,
|
65
|
+
loop = true,
|
66
|
+
orientation = "horizontal",
|
66
67
|
skipSnaps = false,
|
67
|
-
containScroll = false,
|
68
68
|
slideSize = "100%",
|
69
|
-
|
70
|
-
|
69
|
+
slidesToScroll = 1,
|
70
|
+
stopMouseEnterAutoplay = true,
|
71
71
|
watchDrag = draggable,
|
72
72
|
watchResize = true,
|
73
73
|
watchSlides = true,
|
74
|
-
|
75
|
-
|
74
|
+
onChange,
|
75
|
+
onScrollProgress,
|
76
76
|
...rest
|
77
77
|
}) => {
|
78
|
-
const [
|
78
|
+
const [
|
79
|
+
{ gap = "fallback(4, 1rem)", ...containerProps },
|
80
|
+
{ vars, ...slidesProps }
|
81
|
+
] = (0, import_utils.splitObject)(rest, import_core.layoutStyleProperties);
|
79
82
|
const [selectedIndex, setSelectedIndex] = (0, import_use_controllable_state.useControllableState)({
|
80
|
-
value: index,
|
81
83
|
defaultValue: defaultIndex,
|
84
|
+
value: index,
|
82
85
|
onChange
|
83
86
|
});
|
84
87
|
const isVertical = orientation === "vertical";
|
85
88
|
const [carouselRef, carousel] = (0, import_embla_carousel_react.default)(
|
86
89
|
{
|
87
|
-
axis: isVertical ? "y" : "x",
|
88
|
-
startIndex: defaultIndex,
|
89
|
-
loop,
|
90
90
|
align,
|
91
|
-
|
92
|
-
|
91
|
+
axis: isVertical ? "y" : "x",
|
92
|
+
containScroll,
|
93
93
|
dragFree,
|
94
|
+
duration,
|
94
95
|
inViewThreshold,
|
96
|
+
loop,
|
95
97
|
skipSnaps,
|
96
|
-
|
98
|
+
slidesToScroll,
|
99
|
+
startIndex: defaultIndex,
|
97
100
|
watchDrag,
|
98
101
|
watchResize,
|
99
102
|
watchSlides
|
@@ -178,11 +181,20 @@ var useCarousel = ({
|
|
178
181
|
};
|
179
182
|
}
|
180
183
|
}, [carousel, onScroll]);
|
184
|
+
(0, import_utils.useUpdateEffect)(() => {
|
185
|
+
if (!carousel) return;
|
186
|
+
if (index === void 0) return;
|
187
|
+
carousel.scrollTo(index);
|
188
|
+
}, [index]);
|
181
189
|
const getContainerProps = (0, import_react.useCallback)(
|
182
190
|
(props = {}, ref = null) => ({
|
183
191
|
...containerProps,
|
184
192
|
...props,
|
185
193
|
ref,
|
194
|
+
vars: (0, import_core.mergeVars)(vars, [
|
195
|
+
{ name: "gap", token: "spaces", value: gap },
|
196
|
+
{ name: "slideSize", token: "sizes", value: slideSize }
|
197
|
+
]),
|
186
198
|
onMouseEnter: (0, import_utils.handlerAll)(props.onMouseEnter, () => {
|
187
199
|
setIsMouseEnter(true);
|
188
200
|
}),
|
@@ -190,7 +202,7 @@ var useCarousel = ({
|
|
190
202
|
setIsMouseEnter(false);
|
191
203
|
})
|
192
204
|
}),
|
193
|
-
[containerProps]
|
205
|
+
[containerProps, gap, slideSize, vars]
|
194
206
|
);
|
195
207
|
const getSlidesProps = (0, import_react.useCallback)(
|
196
208
|
(props = {}) => ({
|
@@ -203,20 +215,18 @@ var useCarousel = ({
|
|
203
215
|
return {
|
204
216
|
carousel,
|
205
217
|
children,
|
218
|
+
includeGapInSize,
|
206
219
|
indexes,
|
207
|
-
selectedIndex,
|
208
220
|
orientation,
|
209
|
-
|
210
|
-
gap,
|
221
|
+
selectedIndex,
|
211
222
|
slidesToScroll,
|
212
|
-
includeGapInSize,
|
213
223
|
getContainerProps,
|
214
224
|
getSlidesProps
|
215
225
|
};
|
216
226
|
};
|
217
227
|
var useCarouselSlide = ({ index }) => {
|
218
228
|
const { selectedIndex, slidesToScroll } = useCarouselContext();
|
219
|
-
index = Math.floor((index != null ? index : 0) /
|
229
|
+
index = Math.floor((index != null ? index : 0) / slidesToScroll);
|
220
230
|
const isSelected = index === selectedIndex;
|
221
231
|
const getSlideProps = (0, import_react.useCallback)(
|
222
232
|
(props = {}) => ({
|
@@ -256,7 +266,7 @@ var useCarouselControl = ({
|
|
256
266
|
return { getControlProps };
|
257
267
|
};
|
258
268
|
var useCarouselIndicators = () => {
|
259
|
-
const {
|
269
|
+
const { carousel, indexes, selectedIndex } = useCarouselContext();
|
260
270
|
const onClick = (0, import_react.useCallback)(
|
261
271
|
(ev, index) => {
|
262
272
|
if (!carousel) return;
|