@szum-tech/design-system 3.8.0 → 3.8.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/{chunk-F3GJIJRL.cjs → chunk-3Z3GVXXN.cjs} +84 -51
- package/dist/chunk-E5TYGWGE.js +176 -0
- package/dist/{chunk-3SDAJSY6.js → chunk-SZ3LC2VO.js} +81 -48
- package/dist/chunk-XJZOANXX.cjs +183 -0
- package/dist/components/alert/index.cjs +0 -1
- package/dist/components/alert/index.js +0 -1
- package/dist/components/alert-dialog/index.cjs +0 -1
- package/dist/components/alert-dialog/index.js +0 -1
- package/dist/components/avatar/index.cjs +0 -1
- package/dist/components/avatar/index.js +0 -1
- package/dist/components/badge/index.cjs +0 -1
- package/dist/components/badge/index.js +0 -1
- package/dist/components/button/index.cjs +5 -6
- package/dist/components/button/index.js +4 -5
- package/dist/components/card/index.cjs +0 -1
- package/dist/components/card/index.js +0 -1
- package/dist/components/checkbox/index.cjs +0 -1
- package/dist/components/checkbox/index.js +0 -1
- package/dist/components/color-swatch/index.cjs +0 -1
- package/dist/components/color-swatch/index.js +0 -1
- package/dist/components/dialog/index.cjs +0 -1
- package/dist/components/dialog/index.js +0 -1
- package/dist/components/empty/index.cjs +0 -1
- package/dist/components/empty/index.js +0 -1
- package/dist/components/field/index.cjs +0 -1
- package/dist/components/field/index.js +0 -1
- package/dist/components/header/index.cjs +0 -1
- package/dist/components/header/index.js +0 -1
- package/dist/components/index.cjs +36 -37
- package/dist/components/index.d.cts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +4 -5
- package/dist/components/input/index.cjs +0 -1
- package/dist/components/input/index.js +0 -1
- package/dist/components/item/index.cjs +0 -1
- package/dist/components/item/index.js +0 -1
- package/dist/components/label/index.cjs +0 -1
- package/dist/components/label/index.js +0 -1
- package/dist/components/progress/index.cjs +0 -1
- package/dist/components/progress/index.js +0 -1
- package/dist/components/radio-group/index.cjs +0 -1
- package/dist/components/radio-group/index.js +0 -1
- package/dist/components/scroll-area/index.cjs +0 -1
- package/dist/components/scroll-area/index.js +0 -1
- package/dist/components/select/index.cjs +7 -8
- package/dist/components/select/index.d.cts +1 -2
- package/dist/components/select/index.d.ts +1 -2
- package/dist/components/select/index.js +1 -2
- package/dist/components/separator/index.cjs +0 -1
- package/dist/components/separator/index.js +0 -1
- package/dist/components/sheet/index.cjs +0 -1
- package/dist/components/sheet/index.js +0 -1
- package/dist/components/spinner/index.cjs +0 -1
- package/dist/components/spinner/index.js +0 -1
- package/dist/components/stepper/index.cjs +23 -24
- package/dist/components/stepper/index.js +4 -5
- package/dist/components/textarea/index.cjs +0 -1
- package/dist/components/textarea/index.js +0 -1
- package/dist/components/toaster/index.cjs +6 -7
- package/dist/components/toaster/index.js +4 -5
- package/dist/components/tooltip/index.cjs +0 -1
- package/dist/components/tooltip/index.js +0 -1
- package/dist/contexts/index.cjs +0 -1
- package/dist/contexts/index.js +0 -1
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/icons/index.cjs +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/utils/index.cjs +0 -1
- package/dist/utils/index.js +0 -1
- package/package.json +1 -1
- package/dist/chunk-3376ZTRC.cjs +0 -2
- package/dist/chunk-3ZRMIVJM.cjs +0 -4934
- package/dist/chunk-BYXBJQAS.js +0 -1
- package/dist/chunk-O7QFYWMK.js +0 -4907
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Spinner } from './chunk-P5IUC7HJ.js';
|
|
2
|
-
import { useComposedRefs } from './chunk-O7QFYWMK.js';
|
|
3
|
-
import { useLazyRef, useIsomorphicLayoutEffect } from './chunk-DFD2WUOU.js';
|
|
4
2
|
import { useDirection, Direction } from './chunk-H5O5L6XT.js';
|
|
3
|
+
import { useLazyRef, useIsomorphicLayoutEffect } from './chunk-DFD2WUOU.js';
|
|
5
4
|
import { cn } from './chunk-ZD2QRAOX.js';
|
|
6
|
-
import * as
|
|
5
|
+
import * as React6 from 'react';
|
|
7
6
|
import { Slot } from '@radix-ui/react-slot';
|
|
8
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
8
|
import { OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
|
|
@@ -37,9 +36,9 @@ var STEPPER_MAP_KEY_TO_FOCUS_INTENT = {
|
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
// src/components/stepper/stepper.context.tsx
|
|
40
|
-
var StepperContext =
|
|
39
|
+
var StepperContext = React6.createContext(null);
|
|
41
40
|
function useStepperContext(consumerName) {
|
|
42
|
-
const context =
|
|
41
|
+
const context = React6.useContext(StepperContext);
|
|
43
42
|
if (!context) {
|
|
44
43
|
throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ROOT_NAME}\``);
|
|
45
44
|
}
|
|
@@ -129,9 +128,9 @@ function createStepperStore(listenersRef, stateRef, onValueChange, onValueComple
|
|
|
129
128
|
};
|
|
130
129
|
return store;
|
|
131
130
|
}
|
|
132
|
-
var StepperStoreContext =
|
|
131
|
+
var StepperStoreContext = React6.createContext(null);
|
|
133
132
|
function useStepperStoreContext(consumerName) {
|
|
134
|
-
const context =
|
|
133
|
+
const context = React6.useContext(StepperStoreContext);
|
|
135
134
|
if (!context) {
|
|
136
135
|
throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ROOT_NAME}\``);
|
|
137
136
|
}
|
|
@@ -139,8 +138,8 @@ function useStepperStoreContext(consumerName) {
|
|
|
139
138
|
}
|
|
140
139
|
function useStepperStore(selector) {
|
|
141
140
|
const store = useStepperStoreContext("useStore");
|
|
142
|
-
const getSnapshot =
|
|
143
|
-
return
|
|
141
|
+
const getSnapshot = React6.useCallback(() => selector(store.getState()), [selector, store]);
|
|
142
|
+
return React6.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
|
|
144
143
|
}
|
|
145
144
|
function Stepper({
|
|
146
145
|
value,
|
|
@@ -162,14 +161,14 @@ function Stepper({
|
|
|
162
161
|
indicators = {},
|
|
163
162
|
...rootProps
|
|
164
163
|
}) {
|
|
165
|
-
const id =
|
|
164
|
+
const id = React6.useId();
|
|
166
165
|
const rootId = idProp ?? id;
|
|
167
166
|
const listenersRef = useLazyRef(() => /* @__PURE__ */ new Set());
|
|
168
167
|
const stateRef = useLazyRef(() => ({
|
|
169
168
|
steps: /* @__PURE__ */ new Map(),
|
|
170
169
|
value: value ?? defaultValue
|
|
171
170
|
}));
|
|
172
|
-
const store =
|
|
171
|
+
const store = React6.useMemo(
|
|
173
172
|
() => createStepperStore(listenersRef, stateRef, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate),
|
|
174
173
|
[listenersRef, stateRef, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate]
|
|
175
174
|
);
|
|
@@ -179,7 +178,7 @@ function Stepper({
|
|
|
179
178
|
}
|
|
180
179
|
}, [value]);
|
|
181
180
|
const dir = useDirection(dirProp);
|
|
182
|
-
const contextValue =
|
|
181
|
+
const contextValue = React6.useMemo(
|
|
183
182
|
() => ({
|
|
184
183
|
id: rootId,
|
|
185
184
|
dir,
|
|
@@ -231,14 +230,48 @@ var StepperDataState = {
|
|
|
231
230
|
ACTIVE: "active",
|
|
232
231
|
COMPLETED: "completed"
|
|
233
232
|
};
|
|
234
|
-
var StepperFocusContext =
|
|
233
|
+
var StepperFocusContext = React6.createContext(null);
|
|
235
234
|
function useStepperFocusContext(consumerName) {
|
|
236
|
-
const context =
|
|
235
|
+
const context = React6.useContext(StepperFocusContext);
|
|
237
236
|
if (!context) {
|
|
238
237
|
throw new Error(`\`${consumerName}\` must be used within \`FocusProvider\``);
|
|
239
238
|
}
|
|
240
239
|
return context;
|
|
241
240
|
}
|
|
241
|
+
function setRef(ref, value) {
|
|
242
|
+
if (typeof ref === "function") {
|
|
243
|
+
return ref(value);
|
|
244
|
+
} else if (ref !== null && ref !== void 0) {
|
|
245
|
+
ref.current = value;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function composeRefs(...refs) {
|
|
249
|
+
return (node) => {
|
|
250
|
+
let hasCleanup = false;
|
|
251
|
+
const cleanups = refs.map((ref) => {
|
|
252
|
+
const cleanup = setRef(ref, node);
|
|
253
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
254
|
+
hasCleanup = true;
|
|
255
|
+
}
|
|
256
|
+
return cleanup;
|
|
257
|
+
});
|
|
258
|
+
if (hasCleanup) {
|
|
259
|
+
return () => {
|
|
260
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
261
|
+
const cleanup = cleanups[i];
|
|
262
|
+
if (typeof cleanup == "function") {
|
|
263
|
+
cleanup();
|
|
264
|
+
} else {
|
|
265
|
+
setRef(refs[i], null);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function useComposedRefs(...refs) {
|
|
273
|
+
return React6.useCallback(composeRefs(...refs), refs);
|
|
274
|
+
}
|
|
242
275
|
|
|
243
276
|
// src/components/stepper/stepper.utils.tsx
|
|
244
277
|
function focusFirst(candidates, preventScroll = false) {
|
|
@@ -288,32 +321,32 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
|
|
|
288
321
|
const context = useStepperContext(STEPPER_NAV_NAME);
|
|
289
322
|
const orientation = context.orientation;
|
|
290
323
|
const currentValue = useStepperStore((state) => state.value);
|
|
291
|
-
const [tabStopId, setTabStopId] =
|
|
292
|
-
const [isTabbingBackOut, setIsTabbingBackOut] =
|
|
293
|
-
const [focusableItemCount, setFocusableItemCount] =
|
|
294
|
-
const isClickFocusRef =
|
|
295
|
-
const itemsRef =
|
|
296
|
-
const listRef =
|
|
324
|
+
const [tabStopId, setTabStopId] = React6.useState(null);
|
|
325
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React6.useState(false);
|
|
326
|
+
const [focusableItemCount, setFocusableItemCount] = React6.useState(0);
|
|
327
|
+
const isClickFocusRef = React6.useRef(false);
|
|
328
|
+
const itemsRef = React6.useRef(/* @__PURE__ */ new Map());
|
|
329
|
+
const listRef = React6.useRef(null);
|
|
297
330
|
const composedRef = useComposedRefs(ref, listRef);
|
|
298
|
-
const onItemFocus =
|
|
331
|
+
const onItemFocus = React6.useCallback((tabStopId2) => {
|
|
299
332
|
setTabStopId(tabStopId2);
|
|
300
333
|
}, []);
|
|
301
|
-
const onItemShiftTab =
|
|
334
|
+
const onItemShiftTab = React6.useCallback(() => {
|
|
302
335
|
setIsTabbingBackOut(true);
|
|
303
336
|
}, []);
|
|
304
|
-
const onFocusableItemAdd =
|
|
337
|
+
const onFocusableItemAdd = React6.useCallback(() => {
|
|
305
338
|
setFocusableItemCount((prevCount) => prevCount + 1);
|
|
306
339
|
}, []);
|
|
307
|
-
const onFocusableItemRemove =
|
|
340
|
+
const onFocusableItemRemove = React6.useCallback(() => {
|
|
308
341
|
setFocusableItemCount((prevCount) => prevCount - 1);
|
|
309
342
|
}, []);
|
|
310
|
-
const onItemRegister =
|
|
343
|
+
const onItemRegister = React6.useCallback((item) => {
|
|
311
344
|
itemsRef.current.set(item.id, item);
|
|
312
345
|
}, []);
|
|
313
|
-
const onItemUnregister =
|
|
346
|
+
const onItemUnregister = React6.useCallback((id) => {
|
|
314
347
|
itemsRef.current.delete(id);
|
|
315
348
|
}, []);
|
|
316
|
-
const getItems =
|
|
349
|
+
const getItems = React6.useCallback(() => {
|
|
317
350
|
return Array.from(itemsRef.current.values()).filter((item) => item.ref.current).sort((a, b) => {
|
|
318
351
|
const elementA = a.ref.current;
|
|
319
352
|
const elementB = b.ref.current;
|
|
@@ -328,7 +361,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
|
|
|
328
361
|
return 0;
|
|
329
362
|
});
|
|
330
363
|
}, []);
|
|
331
|
-
const onBlur =
|
|
364
|
+
const onBlur = React6.useCallback(
|
|
332
365
|
(event) => {
|
|
333
366
|
listProps.onBlur?.(event);
|
|
334
367
|
if (event.defaultPrevented) return;
|
|
@@ -336,7 +369,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
|
|
|
336
369
|
},
|
|
337
370
|
[listProps.onBlur]
|
|
338
371
|
);
|
|
339
|
-
const onFocus =
|
|
372
|
+
const onFocus = React6.useCallback(
|
|
340
373
|
(event) => {
|
|
341
374
|
listProps.onFocus?.(event);
|
|
342
375
|
if (event.defaultPrevented) return;
|
|
@@ -361,7 +394,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
|
|
|
361
394
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
362
395
|
[listProps.onFocus, isTabbingBackOut, currentValue, tabStopId]
|
|
363
396
|
);
|
|
364
|
-
const onMouseDown =
|
|
397
|
+
const onMouseDown = React6.useCallback(
|
|
365
398
|
(event) => {
|
|
366
399
|
listProps.onMouseDown?.(event);
|
|
367
400
|
if (event.defaultPrevented) return;
|
|
@@ -370,7 +403,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
|
|
|
370
403
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
371
404
|
[listProps.onMouseDown]
|
|
372
405
|
);
|
|
373
|
-
const focusContextValue =
|
|
406
|
+
const focusContextValue = React6.useMemo(
|
|
374
407
|
() => ({
|
|
375
408
|
tabStopId,
|
|
376
409
|
onItemFocus,
|
|
@@ -416,9 +449,9 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
|
|
|
416
449
|
}
|
|
417
450
|
) });
|
|
418
451
|
}
|
|
419
|
-
var StepperItemContext =
|
|
452
|
+
var StepperItemContext = React6.createContext(null);
|
|
420
453
|
function useStepperItemContext(consumerName) {
|
|
421
|
-
const context =
|
|
454
|
+
const context = React6.useContext(StepperItemContext);
|
|
422
455
|
if (!context) {
|
|
423
456
|
throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ITEM_NAME}\``);
|
|
424
457
|
}
|
|
@@ -449,7 +482,7 @@ function StepperItem({
|
|
|
449
482
|
const stepState = useStepperStore((state) => state.steps.get(itemValue));
|
|
450
483
|
const steps = useStepperStore((state) => state.steps);
|
|
451
484
|
const dataState = getDataState(value, itemValue, stepState, steps);
|
|
452
|
-
const itemContextValue =
|
|
485
|
+
const itemContextValue = React6.useMemo(
|
|
453
486
|
() => ({
|
|
454
487
|
value: itemValue,
|
|
455
488
|
stepState
|
|
@@ -511,11 +544,11 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
|
|
|
511
544
|
const isActive = value === itemValue;
|
|
512
545
|
const isTabStop = focusContext.tabStopId === triggerId;
|
|
513
546
|
const dataState = getDataState(value, itemValue, stepState, steps);
|
|
514
|
-
const triggerRef =
|
|
547
|
+
const triggerRef = React6.useRef(null);
|
|
515
548
|
const composedRef = useComposedRefs(ref, triggerRef);
|
|
516
|
-
const isArrowKeyPressedRef =
|
|
517
|
-
const isMouseClickRef =
|
|
518
|
-
|
|
549
|
+
const isArrowKeyPressedRef = React6.useRef(false);
|
|
550
|
+
const isMouseClickRef = React6.useRef(false);
|
|
551
|
+
React6.useEffect(() => {
|
|
519
552
|
function onKeyDown2(event) {
|
|
520
553
|
if (STEPPER_ARROW_KEYS.includes(event.key)) {
|
|
521
554
|
isArrowKeyPressedRef.current = true;
|
|
@@ -549,7 +582,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
|
|
|
549
582
|
}
|
|
550
583
|
};
|
|
551
584
|
}, [focusContext, triggerId, itemValue, isTabStop, isDisabled]);
|
|
552
|
-
const onClick =
|
|
585
|
+
const onClick = React6.useCallback(
|
|
553
586
|
async (event) => {
|
|
554
587
|
triggerProps.onClick?.(event);
|
|
555
588
|
if (event.defaultPrevented) return;
|
|
@@ -563,7 +596,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
|
|
|
563
596
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
564
597
|
[isDisabled, context.nonInteractive, store, itemValue, value, steps, triggerProps.onClick]
|
|
565
598
|
);
|
|
566
|
-
const onFocus =
|
|
599
|
+
const onFocus = React6.useCallback(
|
|
567
600
|
async (event) => {
|
|
568
601
|
triggerProps.onFocus?.(event);
|
|
569
602
|
if (event.defaultPrevented) return;
|
|
@@ -591,7 +624,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
|
|
|
591
624
|
store
|
|
592
625
|
]
|
|
593
626
|
);
|
|
594
|
-
const onKeyDown =
|
|
627
|
+
const onKeyDown = React6.useCallback(
|
|
595
628
|
async (event) => {
|
|
596
629
|
triggerProps.onKeyDown?.(event);
|
|
597
630
|
if (event.defaultPrevented) return;
|
|
@@ -660,7 +693,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
|
|
|
660
693
|
steps
|
|
661
694
|
]
|
|
662
695
|
);
|
|
663
|
-
const onMouseDown =
|
|
696
|
+
const onMouseDown = React6.useCallback(
|
|
664
697
|
(event) => {
|
|
665
698
|
triggerProps.onMouseDown?.(event);
|
|
666
699
|
if (event.defaultPrevented) {
|
|
@@ -821,7 +854,7 @@ function StepperNextTrigger({ asChild = false, onClick, disabled, ...props }) {
|
|
|
821
854
|
const stepKeys = Array.from(steps.keys());
|
|
822
855
|
const currentIndex = value ? stepKeys.indexOf(value) : -1;
|
|
823
856
|
const isDisabled = disabled || currentIndex >= stepKeys.length - 1;
|
|
824
|
-
const handleClick =
|
|
857
|
+
const handleClick = React6.useCallback(
|
|
825
858
|
async (event) => {
|
|
826
859
|
onClick?.(event);
|
|
827
860
|
if (event.defaultPrevented || isDisabled) {
|
|
@@ -854,7 +887,7 @@ function StepperPrevTrigger({ asChild = false, disabled, onClick, ...props }) {
|
|
|
854
887
|
const stepKeys = Array.from(steps.keys());
|
|
855
888
|
const currentIndex = value ? stepKeys.indexOf(value) : -1;
|
|
856
889
|
const isDisabled = disabled || currentIndex <= 0;
|
|
857
|
-
const handleClick =
|
|
890
|
+
const handleClick = React6.useCallback(
|
|
858
891
|
async (event) => {
|
|
859
892
|
onClick?.(event);
|
|
860
893
|
if (event.defaultPrevented || isDisabled) {
|
|
@@ -1001,15 +1034,15 @@ function ButtonContent({
|
|
|
1001
1034
|
const isEndLoading = loading && loadingPosition === "end";
|
|
1002
1035
|
const EndIcon = isEndLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : endIcon || null;
|
|
1003
1036
|
const isCenterLoading = loading && loadingPosition === "center";
|
|
1004
|
-
return asChild &&
|
|
1037
|
+
return asChild && React6.isValidElement(children) ? React6.cloneElement(
|
|
1005
1038
|
children,
|
|
1006
1039
|
props,
|
|
1007
|
-
/* @__PURE__ */ jsxs(
|
|
1040
|
+
/* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1008
1041
|
StartIcon,
|
|
1009
|
-
isCenterLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) :
|
|
1042
|
+
isCenterLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : React6.isValidElement(children) ? children.props?.children : null,
|
|
1010
1043
|
EndIcon
|
|
1011
1044
|
] })
|
|
1012
|
-
) : /* @__PURE__ */ jsxs(
|
|
1045
|
+
) : /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1013
1046
|
StartIcon,
|
|
1014
1047
|
isCenterLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : children,
|
|
1015
1048
|
EndIcon
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var lucideReact = require('lucide-react');
|
|
5
|
+
var radixUi = require('radix-ui');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function Select({
|
|
9
|
+
children,
|
|
10
|
+
disabled,
|
|
11
|
+
defaultOpen,
|
|
12
|
+
defaultValue,
|
|
13
|
+
value,
|
|
14
|
+
dir,
|
|
15
|
+
open,
|
|
16
|
+
form,
|
|
17
|
+
name,
|
|
18
|
+
onOpenChange,
|
|
19
|
+
onValueChange,
|
|
20
|
+
required,
|
|
21
|
+
autoComplete,
|
|
22
|
+
// value props
|
|
23
|
+
placeholder,
|
|
24
|
+
// trigger props
|
|
25
|
+
className,
|
|
26
|
+
size = "default",
|
|
27
|
+
invalid = false,
|
|
28
|
+
...triggerProps
|
|
29
|
+
}) {
|
|
30
|
+
const rootProps = {
|
|
31
|
+
children,
|
|
32
|
+
disabled,
|
|
33
|
+
defaultOpen,
|
|
34
|
+
defaultValue,
|
|
35
|
+
value,
|
|
36
|
+
dir,
|
|
37
|
+
open,
|
|
38
|
+
form,
|
|
39
|
+
name,
|
|
40
|
+
onOpenChange,
|
|
41
|
+
onValueChange,
|
|
42
|
+
required,
|
|
43
|
+
autoComplete
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Select.Root, { "data-slot": "select", ...rootProps, children: [
|
|
46
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
47
|
+
radixUi.Select.Trigger,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "select-trigger",
|
|
50
|
+
"aria-invalid": triggerProps["aria-invalid"] || invalid ? true : void 0,
|
|
51
|
+
"data-size": size,
|
|
52
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
53
|
+
"border-input dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none",
|
|
54
|
+
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
55
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
56
|
+
"aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error",
|
|
57
|
+
"data-[size=default]:h-9 data-[size=sm]:h-8",
|
|
58
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
59
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
60
|
+
"data-[placeholder]:text-muted-foreground",
|
|
61
|
+
className
|
|
62
|
+
),
|
|
63
|
+
...triggerProps,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Value, { "data-slot": "select-value", placeholder }),
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
children
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
function SelectContent({
|
|
74
|
+
className,
|
|
75
|
+
children,
|
|
76
|
+
position = "popper",
|
|
77
|
+
align = "center",
|
|
78
|
+
...props
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81
|
+
radixUi.Select.Content,
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "select-content",
|
|
84
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
85
|
+
"bg-popover text-popover-foreground border-border relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded border shadow-sm",
|
|
86
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
87
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
88
|
+
className
|
|
89
|
+
),
|
|
90
|
+
position,
|
|
91
|
+
align,
|
|
92
|
+
...props,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
96
|
+
radixUi.Select.Viewport,
|
|
97
|
+
{
|
|
98
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
99
|
+
"p-1",
|
|
100
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
101
|
+
),
|
|
102
|
+
children
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
) });
|
|
109
|
+
}
|
|
110
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
+
radixUi.Select.ScrollUpButton,
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "select-scroll-up-button",
|
|
115
|
+
className: chunkH2BWO3SI_cjs.cn("flex cursor-default items-center justify-center py-1", className),
|
|
116
|
+
...props,
|
|
117
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
function SelectScrollDownButton({
|
|
122
|
+
className,
|
|
123
|
+
...props
|
|
124
|
+
}) {
|
|
125
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
+
radixUi.Select.ScrollDownButton,
|
|
127
|
+
{
|
|
128
|
+
"data-slot": "select-scroll-down-button",
|
|
129
|
+
className: chunkH2BWO3SI_cjs.cn("flex cursor-default items-center justify-center py-1", className),
|
|
130
|
+
...props,
|
|
131
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function SelectGroup(props) {
|
|
136
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Group, { "data-slot": "select-group", ...props });
|
|
137
|
+
}
|
|
138
|
+
function SelectItem({ className, children, ...props }) {
|
|
139
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
140
|
+
radixUi.Select.Item,
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "select-item",
|
|
143
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
144
|
+
"focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
145
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
146
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
147
|
+
className
|
|
148
|
+
),
|
|
149
|
+
...props,
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
|
|
152
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { children })
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function SelectLabel({ className, ...props }) {
|
|
158
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
159
|
+
radixUi.Select.Label,
|
|
160
|
+
{
|
|
161
|
+
"data-slot": "select-label",
|
|
162
|
+
className: chunkH2BWO3SI_cjs.cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
163
|
+
...props
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function SelectSeparator({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
+
radixUi.Select.Separator,
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "select-separator",
|
|
172
|
+
className: chunkH2BWO3SI_cjs.cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
173
|
+
...props
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
exports.Select = Select;
|
|
179
|
+
exports.SelectContent = SelectContent;
|
|
180
|
+
exports.SelectGroup = SelectGroup;
|
|
181
|
+
exports.SelectItem = SelectItem;
|
|
182
|
+
exports.SelectLabel = SelectLabel;
|
|
183
|
+
exports.SelectSeparator = SelectSeparator;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '../../chunk-5MJPZUTO.js';
|
|
2
2
|
import '../../chunk-ZD2QRAOX.js';
|
|
3
|
-
import '../../chunk-BYXBJQAS.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3Z3GVXXN_cjs = require('../../chunk-3Z3GVXXN.cjs');
|
|
4
4
|
require('../../chunk-GHV2TURY.cjs');
|
|
5
5
|
require('../../chunk-3WSQRFUY.cjs');
|
|
6
6
|
require('../../chunk-NU5UQPBX.cjs');
|
|
@@ -11,27 +11,26 @@ require('../../chunk-3DUJHGXE.cjs');
|
|
|
11
11
|
require('../../chunk-TH44JYXB.cjs');
|
|
12
12
|
require('../../chunk-XENOUBSI.cjs');
|
|
13
13
|
require('../../chunk-UJX74PFK.cjs');
|
|
14
|
-
require('../../chunk-
|
|
14
|
+
require('../../chunk-XJZOANXX.cjs');
|
|
15
15
|
require('../../chunk-Z6CZAPVG.cjs');
|
|
16
16
|
require('../../chunk-2Y2ZCPNV.cjs');
|
|
17
17
|
require('../../chunk-HCHVDUI6.cjs');
|
|
18
|
-
require('../../chunk-X55H6LRX.cjs');
|
|
19
18
|
require('../../chunk-BAWVLSRF.cjs');
|
|
20
19
|
require('../../chunk-CXHDWIGF.cjs');
|
|
21
20
|
require('../../chunk-Q5ONG5HB.cjs');
|
|
22
21
|
require('../../chunk-UIOBJSKZ.cjs');
|
|
23
22
|
require('../../chunk-S3ANEJJ7.cjs');
|
|
24
|
-
require('../../chunk-
|
|
23
|
+
require('../../chunk-X55H6LRX.cjs');
|
|
25
24
|
require('../../chunk-EW6TE3N5.cjs');
|
|
25
|
+
require('../../chunk-7EYMOUWG.cjs');
|
|
26
26
|
require('../../chunk-O3DHBQA5.cjs');
|
|
27
27
|
require('../../chunk-TMXVL5CV.cjs');
|
|
28
28
|
require('../../chunk-I7AV5IQO.cjs');
|
|
29
29
|
require('../../chunk-H2BWO3SI.cjs');
|
|
30
|
-
require('../../chunk-3376ZTRC.cjs');
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
Object.defineProperty(exports, "Button", {
|
|
35
34
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunk3Z3GVXXN_cjs.Button; }
|
|
37
36
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Button } from '../../chunk-
|
|
1
|
+
export { Button } from '../../chunk-SZ3LC2VO.js';
|
|
2
2
|
import '../../chunk-DTSFPOLX.js';
|
|
3
3
|
import '../../chunk-P5IUC7HJ.js';
|
|
4
4
|
import '../../chunk-OQCNPNPS.js';
|
|
@@ -9,20 +9,19 @@ import '../../chunk-XV3AQ6NS.js';
|
|
|
9
9
|
import '../../chunk-PBEZZMAB.js';
|
|
10
10
|
import '../../chunk-4TRADSTP.js';
|
|
11
11
|
import '../../chunk-M7NIRB3U.js';
|
|
12
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-E5TYGWGE.js';
|
|
13
13
|
import '../../chunk-FKCWRNWB.js';
|
|
14
14
|
import '../../chunk-6BSR3O2J.js';
|
|
15
15
|
import '../../chunk-5F2Y65JH.js';
|
|
16
|
-
import '../../chunk-3BLXG7ET.js';
|
|
17
16
|
import '../../chunk-ACJ3ES2B.js';
|
|
18
17
|
import '../../chunk-HNRVLRMN.js';
|
|
19
18
|
import '../../chunk-SYKUS2RV.js';
|
|
20
19
|
import '../../chunk-XJIUGEPN.js';
|
|
21
20
|
import '../../chunk-I3RSTJP6.js';
|
|
22
|
-
import '../../chunk-
|
|
21
|
+
import '../../chunk-3BLXG7ET.js';
|
|
23
22
|
import '../../chunk-H5O5L6XT.js';
|
|
23
|
+
import '../../chunk-DFD2WUOU.js';
|
|
24
24
|
import '../../chunk-2Q2BIWBE.js';
|
|
25
25
|
import '../../chunk-5MJPZUTO.js';
|
|
26
26
|
import '../../chunk-NGVFYKAT.js';
|
|
27
27
|
import '../../chunk-ZD2QRAOX.js';
|
|
28
|
-
import '../../chunk-BYXBJQAS.js';
|