@bolerish/ui 0.17.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-dialog.js +46 -9
- package/dist/alert-dialog.js.map +3 -3
- package/dist/attachment.js +13 -5
- package/dist/attachment.js.map +2 -2
- package/dist/button-group.js +13 -5
- package/dist/button-group.js.map +2 -2
- package/dist/button.js +13 -5
- package/dist/button.js.map +2 -2
- package/dist/calendar.js +3 -3
- package/dist/calendar.js.map +1 -1
- package/dist/card.js +13 -5
- package/dist/card.js.map +2 -2
- package/dist/carousel.d.ts +3 -1
- package/dist/carousel.js +298 -197
- package/dist/carousel.js.map +2 -2
- package/dist/combobox.js +14 -6
- package/dist/combobox.js.map +2 -2
- package/dist/date-picker.js +60 -35
- package/dist/date-picker.js.map +2 -2
- package/dist/dialog.js +46 -9
- package/dist/dialog.js.map +3 -3
- package/dist/drawer.js +68 -45
- package/dist/drawer.js.map +3 -3
- package/dist/dropdown-menu.js +14 -6
- package/dist/dropdown-menu.js.map +2 -2
- package/dist/global.css +204 -12
- package/dist/hover-card.d.ts +1 -1
- package/dist/hover-card.js +39 -25
- package/dist/hover-card.js.map +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +2 -2
- package/dist/input-group.js +13 -5
- package/dist/input-group.js.map +2 -2
- package/dist/input-otp.js +19 -9
- package/dist/input-otp.js.map +2 -2
- package/dist/input.js +13 -5
- package/dist/input.js.map +2 -2
- package/dist/item.js +13 -5
- package/dist/item.js.map +2 -2
- package/dist/liquid.js +13 -5
- package/dist/liquid.js.map +2 -2
- package/dist/menubar.js +14 -6
- package/dist/menubar.js.map +2 -2
- package/dist/native-select.js +13 -5
- package/dist/native-select.js.map +2 -2
- package/dist/navigation-menu.js +13 -5
- package/dist/navigation-menu.js.map +2 -2
- package/dist/popover.js +14 -6
- package/dist/popover.js.map +2 -2
- package/dist/select.js +14 -6
- package/dist/select.js.map +2 -2
- package/dist/snackbar.d.ts +49 -0
- package/dist/snackbar.js +262 -0
- package/dist/snackbar.js.map +7 -0
- package/dist/status-pill.d.ts +10 -0
- package/dist/status-pill.js +12 -0
- package/dist/status-pill.js.map +7 -0
- package/dist/styles/modal-overlay.d.ts +13 -0
- package/dist/styles/surface.d.ts +41 -7
- package/dist/stylex.css +164 -8
- package/dist/tabs.js +9 -1
- package/dist/tabs.js.map +2 -2
- package/dist/textarea.js +13 -5
- package/dist/textarea.js.map +2 -2
- package/dist/toast.js +13 -5
- package/dist/toast.js.map +2 -2
- package/dist/toggle-group.js +13 -5
- package/dist/toggle-group.js.map +2 -2
- package/dist/toggle.js +16 -12
- package/dist/toggle.js.map +2 -2
- package/dist/tooltip.d.ts +3 -3
- package/dist/tooltip.js +84 -31
- package/dist/tooltip.js.map +2 -2
- package/package.json +5 -3
package/dist/carousel.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/carousel.tsx
|
|
4
4
|
import { c as _c } from "react/compiler-runtime";
|
|
5
|
-
import { CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react";
|
|
5
|
+
import { CaretLeftIcon, CaretRightIcon, CaretUpIcon, CaretDownIcon } from "@phosphor-icons/react";
|
|
6
6
|
import * as stylex from "@stylexjs/stylex";
|
|
7
7
|
import useEmblaCarousel from "embla-carousel-react";
|
|
8
8
|
import { createContext, useLayoutEffect, useRef, useContext, useEffect, useState } from "react";
|
|
@@ -59,10 +59,54 @@ var styles = {
|
|
|
59
59
|
},
|
|
60
60
|
control: {
|
|
61
61
|
kVAEAm: "x10l6tqk",
|
|
62
|
-
k87sOh: "x11u2n0f",
|
|
63
62
|
kzqmXN: "xcasm8m",
|
|
64
63
|
$$css: true
|
|
65
64
|
},
|
|
65
|
+
horizontalControl: {
|
|
66
|
+
k87sOh: "x11u2n0f",
|
|
67
|
+
$$css: true
|
|
68
|
+
},
|
|
69
|
+
verticalControl: {
|
|
70
|
+
kbCHJM: "x58m2l6",
|
|
71
|
+
$$css: true
|
|
72
|
+
},
|
|
73
|
+
verticalViewport: {
|
|
74
|
+
kZKoxP: "x5yr21d",
|
|
75
|
+
$$css: true
|
|
76
|
+
},
|
|
77
|
+
verticalContent: {
|
|
78
|
+
kXwgrk: "xdt5ytf",
|
|
79
|
+
kZKoxP: "x5yr21d",
|
|
80
|
+
$$css: true
|
|
81
|
+
},
|
|
82
|
+
verticalItem: {
|
|
83
|
+
kAzted: "x2lwn1j",
|
|
84
|
+
$$css: true
|
|
85
|
+
},
|
|
86
|
+
previousVertical: {
|
|
87
|
+
k87sOh: "x69d0ru",
|
|
88
|
+
$$css: true
|
|
89
|
+
},
|
|
90
|
+
nextVertical: {
|
|
91
|
+
krVfgx: "x9ho75q",
|
|
92
|
+
$$css: true
|
|
93
|
+
},
|
|
94
|
+
previousInside: {
|
|
95
|
+
kLqNvP: "x1q4cqur",
|
|
96
|
+
$$css: true
|
|
97
|
+
},
|
|
98
|
+
nextInside: {
|
|
99
|
+
kt4wiu: "xlkvpgv",
|
|
100
|
+
$$css: true
|
|
101
|
+
},
|
|
102
|
+
previousVerticalInside: {
|
|
103
|
+
k87sOh: "xouukco",
|
|
104
|
+
$$css: true
|
|
105
|
+
},
|
|
106
|
+
nextVerticalInside: {
|
|
107
|
+
krVfgx: "xq3cjf8",
|
|
108
|
+
$$css: true
|
|
109
|
+
},
|
|
66
110
|
previous: {
|
|
67
111
|
kLqNvP: "xcqru8p",
|
|
68
112
|
$$css: true
|
|
@@ -81,16 +125,18 @@ function useCarousel() {
|
|
|
81
125
|
return context;
|
|
82
126
|
}
|
|
83
127
|
function Carousel(t0) {
|
|
84
|
-
const $ = _c(
|
|
128
|
+
const $ = _c(54);
|
|
85
129
|
let children;
|
|
86
130
|
let className;
|
|
87
131
|
let onSelect;
|
|
88
132
|
let options;
|
|
133
|
+
let orientation;
|
|
89
134
|
let plugins;
|
|
90
135
|
let props2;
|
|
91
136
|
let setApi;
|
|
92
137
|
let slideRatio;
|
|
93
138
|
let style;
|
|
139
|
+
let t1;
|
|
94
140
|
let xstyle;
|
|
95
141
|
if ($[0] !== t0) {
|
|
96
142
|
({
|
|
@@ -98,6 +144,8 @@ function Carousel(t0) {
|
|
|
98
144
|
style,
|
|
99
145
|
children,
|
|
100
146
|
onSelect,
|
|
147
|
+
orientation,
|
|
148
|
+
controlsPlacement: t1,
|
|
101
149
|
options,
|
|
102
150
|
plugins,
|
|
103
151
|
setApi,
|
|
@@ -110,87 +158,106 @@ function Carousel(t0) {
|
|
|
110
158
|
$[2] = className;
|
|
111
159
|
$[3] = onSelect;
|
|
112
160
|
$[4] = options;
|
|
113
|
-
$[5] =
|
|
114
|
-
$[6] =
|
|
115
|
-
$[7] =
|
|
116
|
-
$[8] =
|
|
117
|
-
$[9] =
|
|
118
|
-
$[10] =
|
|
161
|
+
$[5] = orientation;
|
|
162
|
+
$[6] = plugins;
|
|
163
|
+
$[7] = props2;
|
|
164
|
+
$[8] = setApi;
|
|
165
|
+
$[9] = slideRatio;
|
|
166
|
+
$[10] = style;
|
|
167
|
+
$[11] = t1;
|
|
168
|
+
$[12] = xstyle;
|
|
119
169
|
} else {
|
|
120
170
|
children = $[1];
|
|
121
171
|
className = $[2];
|
|
122
172
|
onSelect = $[3];
|
|
123
173
|
options = $[4];
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
174
|
+
orientation = $[5];
|
|
175
|
+
plugins = $[6];
|
|
176
|
+
props2 = $[7];
|
|
177
|
+
setApi = $[8];
|
|
178
|
+
slideRatio = $[9];
|
|
179
|
+
style = $[10];
|
|
180
|
+
t1 = $[11];
|
|
181
|
+
xstyle = $[12];
|
|
182
|
+
}
|
|
183
|
+
const controlsPlacement = t1 === void 0 ? "outside" : t1;
|
|
184
|
+
const axis = orientation ? orientation === "vertical" ? "y" : "x" : options?.axis ?? "x";
|
|
185
|
+
const vertical = axis === "y";
|
|
131
186
|
let slideShare;
|
|
132
187
|
if (slideRatio !== void 0) {
|
|
133
188
|
if (slideRatio.length !== 2 || slideRatio.some(_temp) || !Number.isFinite(slideRatio[0] + slideRatio[1])) {
|
|
134
189
|
throw new Error("Carousel slideRatio requires two finite positive numbers.");
|
|
135
190
|
}
|
|
136
|
-
if (
|
|
191
|
+
if (vertical) {
|
|
137
192
|
throw new Error("Carousel slideRatio currently supports horizontal carousels.");
|
|
138
193
|
}
|
|
139
194
|
slideShare = slideRatio[0] / (slideRatio[0] + slideRatio[1]);
|
|
140
195
|
}
|
|
141
|
-
let
|
|
142
|
-
if ($[
|
|
143
|
-
|
|
144
|
-
align: "start"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
$[
|
|
148
|
-
$[12] = slideRatio;
|
|
149
|
-
$[13] = t1;
|
|
196
|
+
let t2;
|
|
197
|
+
if ($[13] !== slideRatio) {
|
|
198
|
+
t2 = slideRatio ? {
|
|
199
|
+
align: "start"
|
|
200
|
+
} : {};
|
|
201
|
+
$[13] = slideRatio;
|
|
202
|
+
$[14] = t2;
|
|
150
203
|
} else {
|
|
151
|
-
|
|
204
|
+
t2 = $[14];
|
|
152
205
|
}
|
|
153
|
-
const [viewportRef, api] = useEmblaCarousel(t1, plugins);
|
|
154
|
-
const [canScrollPrevious, setCanScrollPrevious] = useState(false);
|
|
155
|
-
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
156
|
-
const onSelectRef = useRef(onSelect);
|
|
157
|
-
let t2;
|
|
158
206
|
let t3;
|
|
159
|
-
if ($[
|
|
160
|
-
|
|
161
|
-
|
|
207
|
+
if ($[15] !== axis || $[16] !== options || $[17] !== t2) {
|
|
208
|
+
t3 = {
|
|
209
|
+
...t2,
|
|
210
|
+
...options,
|
|
211
|
+
axis
|
|
162
212
|
};
|
|
163
|
-
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
213
|
+
$[15] = axis;
|
|
214
|
+
$[16] = options;
|
|
215
|
+
$[17] = t2;
|
|
216
|
+
$[18] = t3;
|
|
167
217
|
} else {
|
|
168
|
-
|
|
169
|
-
t3 = $[16];
|
|
218
|
+
t3 = $[18];
|
|
170
219
|
}
|
|
171
|
-
|
|
220
|
+
const [viewportRef, api] = useEmblaCarousel(t3, plugins);
|
|
221
|
+
const [canScrollPrevious, setCanScrollPrevious] = useState(false);
|
|
222
|
+
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
223
|
+
const onSelectRef = useRef(onSelect);
|
|
172
224
|
let t4;
|
|
173
225
|
let t5;
|
|
174
|
-
if ($[
|
|
226
|
+
if ($[19] !== onSelect) {
|
|
175
227
|
t4 = () => {
|
|
176
|
-
|
|
177
|
-
setApi?.(api);
|
|
178
|
-
}
|
|
228
|
+
onSelectRef.current = onSelect;
|
|
179
229
|
};
|
|
180
|
-
t5 = [
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[20] = t5;
|
|
230
|
+
t5 = [onSelect];
|
|
231
|
+
$[19] = onSelect;
|
|
232
|
+
$[20] = t4;
|
|
233
|
+
$[21] = t5;
|
|
185
234
|
} else {
|
|
186
|
-
t4 = $[
|
|
187
|
-
t5 = $[
|
|
235
|
+
t4 = $[20];
|
|
236
|
+
t5 = $[21];
|
|
188
237
|
}
|
|
189
|
-
|
|
238
|
+
useLayoutEffect(t4, t5);
|
|
190
239
|
let t6;
|
|
191
240
|
let t7;
|
|
192
|
-
if ($[
|
|
241
|
+
if ($[22] !== api || $[23] !== setApi) {
|
|
193
242
|
t6 = () => {
|
|
243
|
+
if (api) {
|
|
244
|
+
setApi?.(api);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
t7 = [api, setApi];
|
|
248
|
+
$[22] = api;
|
|
249
|
+
$[23] = setApi;
|
|
250
|
+
$[24] = t6;
|
|
251
|
+
$[25] = t7;
|
|
252
|
+
} else {
|
|
253
|
+
t6 = $[24];
|
|
254
|
+
t7 = $[25];
|
|
255
|
+
}
|
|
256
|
+
useEffect(t6, t7);
|
|
257
|
+
let t8;
|
|
258
|
+
let t9;
|
|
259
|
+
if ($[26] !== api) {
|
|
260
|
+
t8 = () => {
|
|
194
261
|
if (!api) {
|
|
195
262
|
return;
|
|
196
263
|
}
|
|
@@ -206,40 +273,42 @@ function Carousel(t0) {
|
|
|
206
273
|
api.off("reInit", handleSelection).off("select", handleSelection);
|
|
207
274
|
};
|
|
208
275
|
};
|
|
209
|
-
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
276
|
+
t9 = [api];
|
|
277
|
+
$[26] = api;
|
|
278
|
+
$[27] = t8;
|
|
279
|
+
$[28] = t9;
|
|
213
280
|
} else {
|
|
214
|
-
|
|
215
|
-
|
|
281
|
+
t8 = $[27];
|
|
282
|
+
t9 = $[28];
|
|
216
283
|
}
|
|
217
|
-
useEffect(
|
|
218
|
-
let
|
|
219
|
-
if ($[
|
|
220
|
-
|
|
284
|
+
useEffect(t8, t9);
|
|
285
|
+
let t10;
|
|
286
|
+
if ($[29] !== api) {
|
|
287
|
+
t10 = function scrollPrevious2() {
|
|
221
288
|
api?.scrollPrev();
|
|
222
289
|
};
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
290
|
+
$[29] = api;
|
|
291
|
+
$[30] = t10;
|
|
225
292
|
} else {
|
|
226
|
-
|
|
293
|
+
t10 = $[30];
|
|
227
294
|
}
|
|
228
|
-
const scrollPrevious =
|
|
229
|
-
let
|
|
230
|
-
if ($[
|
|
231
|
-
|
|
295
|
+
const scrollPrevious = t10;
|
|
296
|
+
let t11;
|
|
297
|
+
if ($[31] !== api) {
|
|
298
|
+
t11 = function scrollNext2() {
|
|
232
299
|
api?.scrollNext();
|
|
233
300
|
};
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
301
|
+
$[31] = api;
|
|
302
|
+
$[32] = t11;
|
|
236
303
|
} else {
|
|
237
|
-
|
|
304
|
+
t11 = $[32];
|
|
238
305
|
}
|
|
239
|
-
const scrollNext =
|
|
240
|
-
let
|
|
241
|
-
if ($[
|
|
242
|
-
|
|
306
|
+
const scrollNext = t11;
|
|
307
|
+
let t12;
|
|
308
|
+
if ($[33] !== canScrollNext || $[34] !== canScrollPrevious || $[35] !== controlsPlacement || $[36] !== scrollNext || $[37] !== scrollPrevious || $[38] !== slideShare || $[39] !== vertical || $[40] !== viewportRef) {
|
|
309
|
+
t12 = {
|
|
310
|
+
vertical,
|
|
311
|
+
controlsPlacement,
|
|
243
312
|
slideShare,
|
|
244
313
|
canScrollNext,
|
|
245
314
|
canScrollPrevious,
|
|
@@ -247,53 +316,55 @@ function Carousel(t0) {
|
|
|
247
316
|
scrollPrevious,
|
|
248
317
|
viewportRef
|
|
249
318
|
};
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
319
|
+
$[33] = canScrollNext;
|
|
320
|
+
$[34] = canScrollPrevious;
|
|
321
|
+
$[35] = controlsPlacement;
|
|
322
|
+
$[36] = scrollNext;
|
|
323
|
+
$[37] = scrollPrevious;
|
|
324
|
+
$[38] = slideShare;
|
|
325
|
+
$[39] = vertical;
|
|
326
|
+
$[40] = viewportRef;
|
|
327
|
+
$[41] = t12;
|
|
257
328
|
} else {
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
let t11;
|
|
261
|
-
if ($[35] !== className || $[36] !== slideShare || $[37] !== style || $[38] !== xstyle) {
|
|
262
|
-
t11 = mergeStyles(stylex.props(styles.root, slideShare !== void 0 && styles.ratioRoot, xstyle), className, style);
|
|
263
|
-
$[35] = className;
|
|
264
|
-
$[36] = slideShare;
|
|
265
|
-
$[37] = style;
|
|
266
|
-
$[38] = xstyle;
|
|
267
|
-
$[39] = t11;
|
|
268
|
-
} else {
|
|
269
|
-
t11 = $[39];
|
|
270
|
-
}
|
|
271
|
-
let t12;
|
|
272
|
-
if ($[40] !== children || $[41] !== props2 || $[42] !== t11) {
|
|
273
|
-
t12 = /* @__PURE__ */ jsx("section", { "aria-roledescription": "carousel", ...props2, ...t11, children });
|
|
274
|
-
$[40] = children;
|
|
275
|
-
$[41] = props2;
|
|
276
|
-
$[42] = t11;
|
|
277
|
-
$[43] = t12;
|
|
278
|
-
} else {
|
|
279
|
-
t12 = $[43];
|
|
329
|
+
t12 = $[41];
|
|
280
330
|
}
|
|
281
331
|
let t13;
|
|
282
|
-
if ($[44] !==
|
|
283
|
-
t13 =
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
332
|
+
if ($[42] !== className || $[43] !== slideShare || $[44] !== style || $[45] !== xstyle) {
|
|
333
|
+
t13 = mergeStyles(stylex.props(styles.root, slideShare !== void 0 && styles.ratioRoot, xstyle), className, style);
|
|
334
|
+
$[42] = className;
|
|
335
|
+
$[43] = slideShare;
|
|
336
|
+
$[44] = style;
|
|
337
|
+
$[45] = xstyle;
|
|
286
338
|
$[46] = t13;
|
|
287
339
|
} else {
|
|
288
340
|
t13 = $[46];
|
|
289
341
|
}
|
|
290
|
-
|
|
342
|
+
let t14;
|
|
343
|
+
if ($[47] !== children || $[48] !== props2 || $[49] !== t13) {
|
|
344
|
+
t14 = /* @__PURE__ */ jsx("section", { "aria-roledescription": "carousel", ...props2, ...t13, children });
|
|
345
|
+
$[47] = children;
|
|
346
|
+
$[48] = props2;
|
|
347
|
+
$[49] = t13;
|
|
348
|
+
$[50] = t14;
|
|
349
|
+
} else {
|
|
350
|
+
t14 = $[50];
|
|
351
|
+
}
|
|
352
|
+
let t15;
|
|
353
|
+
if ($[51] !== t12 || $[52] !== t14) {
|
|
354
|
+
t15 = /* @__PURE__ */ jsx(CarouselContext.Provider, { value: t12, children: t14 });
|
|
355
|
+
$[51] = t12;
|
|
356
|
+
$[52] = t14;
|
|
357
|
+
$[53] = t15;
|
|
358
|
+
} else {
|
|
359
|
+
t15 = $[53];
|
|
360
|
+
}
|
|
361
|
+
return t15;
|
|
291
362
|
}
|
|
292
363
|
function _temp(value) {
|
|
293
364
|
return !Number.isFinite(value) || value <= 0;
|
|
294
365
|
}
|
|
295
366
|
function CarouselViewport(t0) {
|
|
296
|
-
const $ = _c(
|
|
367
|
+
const $ = _c(14);
|
|
297
368
|
let className;
|
|
298
369
|
let props2;
|
|
299
370
|
let style;
|
|
@@ -317,32 +388,34 @@ function CarouselViewport(t0) {
|
|
|
317
388
|
xstyle = $[4];
|
|
318
389
|
}
|
|
319
390
|
const {
|
|
320
|
-
viewportRef
|
|
391
|
+
viewportRef,
|
|
392
|
+
vertical
|
|
321
393
|
} = useCarousel();
|
|
322
394
|
let t1;
|
|
323
|
-
if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {
|
|
324
|
-
t1 = mergeStyles(stylex.props(styles.viewport, xstyle), className, style);
|
|
395
|
+
if ($[5] !== className || $[6] !== style || $[7] !== vertical || $[8] !== xstyle) {
|
|
396
|
+
t1 = mergeStyles(stylex.props(styles.viewport, vertical && styles.verticalViewport, xstyle), className, style);
|
|
325
397
|
$[5] = className;
|
|
326
398
|
$[6] = style;
|
|
327
|
-
$[7] =
|
|
328
|
-
$[8] =
|
|
399
|
+
$[7] = vertical;
|
|
400
|
+
$[8] = xstyle;
|
|
401
|
+
$[9] = t1;
|
|
329
402
|
} else {
|
|
330
|
-
t1 = $[
|
|
403
|
+
t1 = $[9];
|
|
331
404
|
}
|
|
332
405
|
let t2;
|
|
333
|
-
if ($[
|
|
406
|
+
if ($[10] !== props2 || $[11] !== t1 || $[12] !== viewportRef) {
|
|
334
407
|
t2 = /* @__PURE__ */ jsx("div", { ref: viewportRef, ...props2, ...t1 });
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
408
|
+
$[10] = props2;
|
|
409
|
+
$[11] = t1;
|
|
410
|
+
$[12] = viewportRef;
|
|
411
|
+
$[13] = t2;
|
|
339
412
|
} else {
|
|
340
|
-
t2 = $[
|
|
413
|
+
t2 = $[13];
|
|
341
414
|
}
|
|
342
415
|
return t2;
|
|
343
416
|
}
|
|
344
417
|
function CarouselContent(t0) {
|
|
345
|
-
const $ = _c(
|
|
418
|
+
const $ = _c(13);
|
|
346
419
|
let className;
|
|
347
420
|
let props2;
|
|
348
421
|
let style;
|
|
@@ -365,29 +438,33 @@ function CarouselContent(t0) {
|
|
|
365
438
|
style = $[3];
|
|
366
439
|
xstyle = $[4];
|
|
367
440
|
}
|
|
441
|
+
const {
|
|
442
|
+
vertical
|
|
443
|
+
} = useCarousel();
|
|
368
444
|
let t1;
|
|
369
|
-
if ($[5] !== className || $[6] !== style || $[7] !== xstyle) {
|
|
370
|
-
t1 = mergeStyles(stylex.props(styles.content, xstyle), className, style);
|
|
445
|
+
if ($[5] !== className || $[6] !== style || $[7] !== vertical || $[8] !== xstyle) {
|
|
446
|
+
t1 = mergeStyles(stylex.props(styles.content, vertical && styles.verticalContent, xstyle), className, style);
|
|
371
447
|
$[5] = className;
|
|
372
448
|
$[6] = style;
|
|
373
|
-
$[7] =
|
|
374
|
-
$[8] =
|
|
449
|
+
$[7] = vertical;
|
|
450
|
+
$[8] = xstyle;
|
|
451
|
+
$[9] = t1;
|
|
375
452
|
} else {
|
|
376
|
-
t1 = $[
|
|
453
|
+
t1 = $[9];
|
|
377
454
|
}
|
|
378
455
|
let t2;
|
|
379
|
-
if ($[
|
|
456
|
+
if ($[10] !== props2 || $[11] !== t1) {
|
|
380
457
|
t2 = /* @__PURE__ */ jsx("div", { ...props2, ...t1 });
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
458
|
+
$[10] = props2;
|
|
459
|
+
$[11] = t1;
|
|
460
|
+
$[12] = t2;
|
|
384
461
|
} else {
|
|
385
|
-
t2 = $[
|
|
462
|
+
t2 = $[12];
|
|
386
463
|
}
|
|
387
464
|
return t2;
|
|
388
465
|
}
|
|
389
466
|
function CarouselItem(t0) {
|
|
390
|
-
const $ = _c(
|
|
467
|
+
const $ = _c(14);
|
|
391
468
|
let className;
|
|
392
469
|
let props2;
|
|
393
470
|
let style;
|
|
@@ -411,32 +488,34 @@ function CarouselItem(t0) {
|
|
|
411
488
|
xstyle = $[4];
|
|
412
489
|
}
|
|
413
490
|
const {
|
|
414
|
-
slideShare
|
|
491
|
+
slideShare,
|
|
492
|
+
vertical
|
|
415
493
|
} = useCarousel();
|
|
416
494
|
let t1;
|
|
417
|
-
if ($[5] !== className || $[6] !== slideShare || $[7] !== style || $[8] !== xstyle) {
|
|
418
|
-
t1 = mergeStyles(stylex.props(styles.item, slideShare !== void 0 && styles.ratioItem(slideShare), xstyle), className, style);
|
|
495
|
+
if ($[5] !== className || $[6] !== slideShare || $[7] !== style || $[8] !== vertical || $[9] !== xstyle) {
|
|
496
|
+
t1 = mergeStyles(stylex.props(styles.item, vertical && styles.verticalItem, slideShare !== void 0 && styles.ratioItem(slideShare), xstyle), className, style);
|
|
419
497
|
$[5] = className;
|
|
420
498
|
$[6] = slideShare;
|
|
421
499
|
$[7] = style;
|
|
422
|
-
$[8] =
|
|
423
|
-
$[9] =
|
|
500
|
+
$[8] = vertical;
|
|
501
|
+
$[9] = xstyle;
|
|
502
|
+
$[10] = t1;
|
|
424
503
|
} else {
|
|
425
|
-
t1 = $[
|
|
504
|
+
t1 = $[10];
|
|
426
505
|
}
|
|
427
506
|
let t2;
|
|
428
|
-
if ($[
|
|
507
|
+
if ($[11] !== props2 || $[12] !== t1) {
|
|
429
508
|
t2 = /* @__PURE__ */ jsx("div", { ...props2, ...t1 });
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
509
|
+
$[11] = props2;
|
|
510
|
+
$[12] = t1;
|
|
511
|
+
$[13] = t2;
|
|
433
512
|
} else {
|
|
434
|
-
t2 = $[
|
|
513
|
+
t2 = $[13];
|
|
435
514
|
}
|
|
436
515
|
return t2;
|
|
437
516
|
}
|
|
438
517
|
function CarouselPrevious(t0) {
|
|
439
|
-
const $ = _c(
|
|
518
|
+
const $ = _c(21);
|
|
440
519
|
let disabled;
|
|
441
520
|
let props2;
|
|
442
521
|
let style;
|
|
@@ -461,8 +540,11 @@ function CarouselPrevious(t0) {
|
|
|
461
540
|
}
|
|
462
541
|
const {
|
|
463
542
|
canScrollPrevious,
|
|
464
|
-
scrollPrevious
|
|
543
|
+
scrollPrevious,
|
|
544
|
+
vertical,
|
|
545
|
+
controlsPlacement
|
|
465
546
|
} = useCarousel();
|
|
547
|
+
const Icon = vertical ? CaretUpIcon : CaretLeftIcon;
|
|
466
548
|
const t1 = disabled ?? !canScrollPrevious;
|
|
467
549
|
let t2;
|
|
468
550
|
if ($[5] !== style) {
|
|
@@ -476,37 +558,45 @@ function CarouselPrevious(t0) {
|
|
|
476
558
|
} else {
|
|
477
559
|
t2 = $[6];
|
|
478
560
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
561
|
+
const t3 = vertical ? styles.verticalControl : styles.horizontalControl;
|
|
562
|
+
const t4 = vertical ? styles.previousVertical : styles.previous;
|
|
563
|
+
const t5 = controlsPlacement === "inside" && (vertical ? styles.previousVerticalInside : styles.previousInside);
|
|
564
|
+
let t6;
|
|
565
|
+
if ($[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== xstyle) {
|
|
566
|
+
t6 = [styles.control, t3, t4, t5, xstyle];
|
|
567
|
+
$[7] = t3;
|
|
568
|
+
$[8] = t4;
|
|
569
|
+
$[9] = t5;
|
|
570
|
+
$[10] = xstyle;
|
|
571
|
+
$[11] = t6;
|
|
484
572
|
} else {
|
|
485
|
-
|
|
573
|
+
t6 = $[11];
|
|
486
574
|
}
|
|
487
|
-
let
|
|
488
|
-
if ($[
|
|
489
|
-
|
|
490
|
-
$[
|
|
575
|
+
let t7;
|
|
576
|
+
if ($[12] !== Icon) {
|
|
577
|
+
t7 = /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" });
|
|
578
|
+
$[12] = Icon;
|
|
579
|
+
$[13] = t7;
|
|
491
580
|
} else {
|
|
492
|
-
|
|
581
|
+
t7 = $[13];
|
|
493
582
|
}
|
|
494
|
-
let
|
|
495
|
-
if ($[
|
|
496
|
-
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
583
|
+
let t8;
|
|
584
|
+
if ($[14] !== props2 || $[15] !== scrollPrevious || $[16] !== t1 || $[17] !== t2 || $[18] !== t6 || $[19] !== t7) {
|
|
585
|
+
t8 = /* @__PURE__ */ jsx(Button, { "aria-label": "Previous slide", disabled: t1, onClick: scrollPrevious, size: "icon", shape: "circle", style: t2, variant: "secondary", xstyle: t6, ...props2, children: t7 });
|
|
586
|
+
$[14] = props2;
|
|
587
|
+
$[15] = scrollPrevious;
|
|
588
|
+
$[16] = t1;
|
|
589
|
+
$[17] = t2;
|
|
590
|
+
$[18] = t6;
|
|
591
|
+
$[19] = t7;
|
|
592
|
+
$[20] = t8;
|
|
503
593
|
} else {
|
|
504
|
-
|
|
594
|
+
t8 = $[20];
|
|
505
595
|
}
|
|
506
|
-
return
|
|
596
|
+
return t8;
|
|
507
597
|
}
|
|
508
598
|
function CarouselNext(t0) {
|
|
509
|
-
const $ = _c(
|
|
599
|
+
const $ = _c(21);
|
|
510
600
|
let disabled;
|
|
511
601
|
let props2;
|
|
512
602
|
let style;
|
|
@@ -531,8 +621,11 @@ function CarouselNext(t0) {
|
|
|
531
621
|
}
|
|
532
622
|
const {
|
|
533
623
|
canScrollNext,
|
|
534
|
-
scrollNext
|
|
624
|
+
scrollNext,
|
|
625
|
+
vertical,
|
|
626
|
+
controlsPlacement
|
|
535
627
|
} = useCarousel();
|
|
628
|
+
const Icon = vertical ? CaretDownIcon : CaretRightIcon;
|
|
536
629
|
const t1 = disabled ?? !canScrollNext;
|
|
537
630
|
let t2;
|
|
538
631
|
if ($[5] !== style) {
|
|
@@ -546,34 +639,42 @@ function CarouselNext(t0) {
|
|
|
546
639
|
} else {
|
|
547
640
|
t2 = $[6];
|
|
548
641
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
642
|
+
const t3 = vertical ? styles.verticalControl : styles.horizontalControl;
|
|
643
|
+
const t4 = vertical ? styles.nextVertical : styles.next;
|
|
644
|
+
const t5 = controlsPlacement === "inside" && (vertical ? styles.nextVerticalInside : styles.nextInside);
|
|
645
|
+
let t6;
|
|
646
|
+
if ($[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== xstyle) {
|
|
647
|
+
t6 = [styles.control, t3, t4, t5, xstyle];
|
|
648
|
+
$[7] = t3;
|
|
649
|
+
$[8] = t4;
|
|
650
|
+
$[9] = t5;
|
|
651
|
+
$[10] = xstyle;
|
|
652
|
+
$[11] = t6;
|
|
554
653
|
} else {
|
|
555
|
-
|
|
654
|
+
t6 = $[11];
|
|
556
655
|
}
|
|
557
|
-
let
|
|
558
|
-
if ($[
|
|
559
|
-
|
|
560
|
-
$[
|
|
656
|
+
let t7;
|
|
657
|
+
if ($[12] !== Icon) {
|
|
658
|
+
t7 = /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" });
|
|
659
|
+
$[12] = Icon;
|
|
660
|
+
$[13] = t7;
|
|
561
661
|
} else {
|
|
562
|
-
|
|
662
|
+
t7 = $[13];
|
|
563
663
|
}
|
|
564
|
-
let
|
|
565
|
-
if ($[
|
|
566
|
-
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
664
|
+
let t8;
|
|
665
|
+
if ($[14] !== props2 || $[15] !== scrollNext || $[16] !== t1 || $[17] !== t2 || $[18] !== t6 || $[19] !== t7) {
|
|
666
|
+
t8 = /* @__PURE__ */ jsx(Button, { "aria-label": "Next slide", disabled: t1, onClick: scrollNext, size: "icon", shape: "circle", style: t2, variant: "secondary", xstyle: t6, ...props2, children: t7 });
|
|
667
|
+
$[14] = props2;
|
|
668
|
+
$[15] = scrollNext;
|
|
669
|
+
$[16] = t1;
|
|
670
|
+
$[17] = t2;
|
|
671
|
+
$[18] = t6;
|
|
672
|
+
$[19] = t7;
|
|
673
|
+
$[20] = t8;
|
|
573
674
|
} else {
|
|
574
|
-
|
|
675
|
+
t8 = $[20];
|
|
575
676
|
}
|
|
576
|
-
return
|
|
677
|
+
return t8;
|
|
577
678
|
}
|
|
578
679
|
export {
|
|
579
680
|
Carousel,
|