@yuhuanowo/yunui 0.2.17 → 0.2.18
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/README.md +3 -1
- package/README.zh-CN.md +5 -1
- package/README.zh-TW.md +5 -1
- package/dist/ai.d.ts +99 -3
- package/dist/ai.js +212 -104
- package/dist/ai.js.map +1 -1
- package/dist/chat.d.ts +10 -3
- package/dist/chat.js +12 -7
- package/dist/chat.js.map +1 -1
- package/dist/{chunk-HH3JBHRP.js → chunk-AFVENY4D.js} +286 -31
- package/dist/chunk-AFVENY4D.js.map +1 -0
- package/dist/{chunk-F2HG4TOQ.js → chunk-GAXVET76.js} +13 -19
- package/dist/chunk-GAXVET76.js.map +1 -0
- package/dist/{chunk-DDUP7GAX.js → chunk-LEBQPP4B.js} +69 -3
- package/dist/chunk-LEBQPP4B.js.map +1 -0
- package/dist/chunk-ST6TSBVQ.js +208 -0
- package/dist/chunk-ST6TSBVQ.js.map +1 -0
- package/dist/chunk-V7VJKZ5Q.js +254 -0
- package/dist/chunk-V7VJKZ5Q.js.map +1 -0
- package/dist/{chunk-BCOKFWXC.js → chunk-YKWRCA2S.js} +80 -156
- package/dist/chunk-YKWRCA2S.js.map +1 -0
- package/dist/content.d.ts +10 -2
- package/dist/content.js +50 -40
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +266 -16
- package/dist/index.js +4 -4
- package/dist/patterns.d.ts +471 -22
- package/dist/patterns.js +783 -131
- package/dist/patterns.js.map +1 -1
- package/icons/providers/gmi.svg +5 -0
- package/package.json +3 -4
- package/styles/content.css +3 -1
- package/styles/yunui.css +197 -84
- package/dist/chunk-BCOKFWXC.js.map +0 -1
- package/dist/chunk-DDUP7GAX.js.map +0 -1
- package/dist/chunk-F2HG4TOQ.js.map +0 -1
- package/dist/chunk-HH3JBHRP.js.map +0 -1
- package/dist/chunk-N4QO7RN5.js +0 -98
- package/dist/chunk-N4QO7RN5.js.map +0 -1
- package/dist/chunk-QEIBYOG2.js +0 -188
- package/dist/chunk-QEIBYOG2.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn, useAnchoredPosition } from './chunk-
|
|
2
|
+
import { cn, useScrollableTabStop, useFocusTrap, useEscapeKey, useBodyScrollLock, useModalBehavior, useAnchoredPosition, useDismissOnOutside } from './chunk-V7VJKZ5Q.js';
|
|
3
3
|
import { useYunUI } from './chunk-3RT24MSH.js';
|
|
4
4
|
import * as React7 from 'react';
|
|
5
|
-
import { forwardRef, useRef,
|
|
5
|
+
import { forwardRef, useRef, useState, useEffect, useCallback, useId } from 'react';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { Minus, Check, ChevronDown, ChevronUp, ChevronsUpDown, ChevronLeft, ChevronRight, Loader2, AlertCircle, EyeOff, Eye, Plus, Search, X, CheckCircle2, CheckCircle, Info, RefreshCw, Trash2, AlertTriangle } from 'lucide-react';
|
|
8
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -18,108 +18,6 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
18
18
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
19
19
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
20
20
|
|
|
21
|
-
function useEscapeKey(onEscape, enabled = true) {
|
|
22
|
-
const onEscapeRef = useRef(onEscape);
|
|
23
|
-
onEscapeRef.current = onEscape;
|
|
24
|
-
const enabledRef = useRef(enabled);
|
|
25
|
-
enabledRef.current = enabled;
|
|
26
|
-
const handleKeyDown = useCallback(
|
|
27
|
-
(event) => {
|
|
28
|
-
if (!enabledRef.current) return;
|
|
29
|
-
if (event.key === "Escape") {
|
|
30
|
-
event.preventDefault();
|
|
31
|
-
event.stopPropagation();
|
|
32
|
-
onEscapeRef.current();
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
[]
|
|
36
|
-
// No dependencies - uses refs
|
|
37
|
-
);
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
document.addEventListener("keydown", handleKeyDown, true);
|
|
40
|
-
return () => {
|
|
41
|
-
document.removeEventListener("keydown", handleKeyDown, true);
|
|
42
|
-
};
|
|
43
|
-
}, [handleKeyDown]);
|
|
44
|
-
}
|
|
45
|
-
var scrollLockCount = 0;
|
|
46
|
-
var originalOverflow = "";
|
|
47
|
-
function useBodyScrollLock(locked = true) {
|
|
48
|
-
const hasLockedRef = useRef(false);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (!locked) {
|
|
51
|
-
if (hasLockedRef.current) {
|
|
52
|
-
scrollLockCount--;
|
|
53
|
-
hasLockedRef.current = false;
|
|
54
|
-
if (scrollLockCount === 0) {
|
|
55
|
-
document.body.style.overflow = originalOverflow;
|
|
56
|
-
originalOverflow = "";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (!hasLockedRef.current) {
|
|
62
|
-
if (scrollLockCount === 0) {
|
|
63
|
-
originalOverflow = document.body.style.overflow;
|
|
64
|
-
}
|
|
65
|
-
scrollLockCount++;
|
|
66
|
-
document.body.style.overflow = "hidden";
|
|
67
|
-
hasLockedRef.current = true;
|
|
68
|
-
}
|
|
69
|
-
return () => {
|
|
70
|
-
if (hasLockedRef.current) {
|
|
71
|
-
scrollLockCount--;
|
|
72
|
-
hasLockedRef.current = false;
|
|
73
|
-
if (scrollLockCount === 0) {
|
|
74
|
-
document.body.style.overflow = originalOverflow;
|
|
75
|
-
originalOverflow = "";
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}, [locked]);
|
|
80
|
-
}
|
|
81
|
-
function useModalBehavior(isOpen, onClose) {
|
|
82
|
-
useEscapeKey(onClose, isOpen);
|
|
83
|
-
useBodyScrollLock(isOpen);
|
|
84
|
-
}
|
|
85
|
-
var FOCUSABLE_SELECTOR = 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
86
|
-
function useFocusTrap(containerRef, enabled = true) {
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
if (!enabled) return;
|
|
89
|
-
const container = containerRef.current;
|
|
90
|
-
if (!container) return;
|
|
91
|
-
const previouslyFocused = document.activeElement;
|
|
92
|
-
const getFocusable = () => Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
93
|
-
const initial = getFocusable();
|
|
94
|
-
(initial[0] ?? container).focus?.();
|
|
95
|
-
const onKeyDown = (event) => {
|
|
96
|
-
if (event.key !== "Tab") return;
|
|
97
|
-
const items = getFocusable();
|
|
98
|
-
if (items.length === 0) {
|
|
99
|
-
event.preventDefault();
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const first = items[0];
|
|
103
|
-
const last = items[items.length - 1];
|
|
104
|
-
const active = document.activeElement;
|
|
105
|
-
if (event.shiftKey) {
|
|
106
|
-
if (active === first || !container.contains(active)) {
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
last.focus();
|
|
109
|
-
}
|
|
110
|
-
} else if (active === last || !container.contains(active)) {
|
|
111
|
-
event.preventDefault();
|
|
112
|
-
first.focus();
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
container.addEventListener("keydown", onKeyDown);
|
|
116
|
-
return () => {
|
|
117
|
-
container.removeEventListener("keydown", onKeyDown);
|
|
118
|
-
previouslyFocused?.focus?.();
|
|
119
|
-
};
|
|
120
|
-
}, [enabled, containerRef]);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
21
|
// src/primitives/modal/constants.ts
|
|
124
22
|
var Z_INDEX = {
|
|
125
23
|
MODAL: 50,
|
|
@@ -281,7 +179,7 @@ function ConfirmModal({
|
|
|
281
179
|
{
|
|
282
180
|
ref: dialogRef,
|
|
283
181
|
className: cn(
|
|
284
|
-
"card relative w-full max-w-sm shadow-
|
|
182
|
+
"card relative w-full max-w-sm shadow-lg shadow-black/5 transition-all",
|
|
285
183
|
isClosing ? "scale-95 opacity-0" : "scale-100 opacity-100",
|
|
286
184
|
className
|
|
287
185
|
),
|
|
@@ -378,7 +276,7 @@ function RegenerateConfirmModal({
|
|
|
378
276
|
}
|
|
379
277
|
);
|
|
380
278
|
}
|
|
381
|
-
function Sheet({ open, onClose, children, title, mobileOnly = false }) {
|
|
279
|
+
function Sheet({ open, onClose, children, title, closeLabel, mobileOnly = false }) {
|
|
382
280
|
const [mounted, setMounted] = useState(false);
|
|
383
281
|
const panelRef = useRef(null);
|
|
384
282
|
const titleId = useId();
|
|
@@ -427,7 +325,7 @@ function Sheet({ open, onClose, children, title, mobileOnly = false }) {
|
|
|
427
325
|
{
|
|
428
326
|
onClick: onClose,
|
|
429
327
|
className: "-mr-1.5 p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors ml-auto",
|
|
430
|
-
"aria-label": "Close",
|
|
328
|
+
"aria-label": closeLabel ?? "Close",
|
|
431
329
|
children: /* @__PURE__ */ jsx(X, { size: 18 })
|
|
432
330
|
}
|
|
433
331
|
)
|
|
@@ -442,11 +340,12 @@ function Sheet({ open, onClose, children, title, mobileOnly = false }) {
|
|
|
442
340
|
);
|
|
443
341
|
}
|
|
444
342
|
var Checkbox = forwardRef(
|
|
445
|
-
({ checked = false, onCheckedChange, disabled = false, className = "", id }, ref) => {
|
|
343
|
+
({ checked = false, onCheckedChange, disabled = false, className = "", id, ...props }, ref) => {
|
|
446
344
|
const filled = checked === true || checked === "indeterminate";
|
|
447
345
|
return /* @__PURE__ */ jsx(
|
|
448
346
|
"button",
|
|
449
347
|
{
|
|
348
|
+
...props,
|
|
450
349
|
ref,
|
|
451
350
|
type: "button",
|
|
452
351
|
role: "checkbox",
|
|
@@ -473,6 +372,7 @@ function Combobox({
|
|
|
473
372
|
value,
|
|
474
373
|
onChange,
|
|
475
374
|
placeholder,
|
|
375
|
+
labels,
|
|
476
376
|
className = "",
|
|
477
377
|
disabled = false,
|
|
478
378
|
clearable = true,
|
|
@@ -499,16 +399,15 @@ function Combobox({
|
|
|
499
399
|
useEffect(() => {
|
|
500
400
|
setInputValue(selectedDisplayValue);
|
|
501
401
|
}, [selectedDisplayValue]);
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}, [selectedDisplayValue]);
|
|
402
|
+
useDismissOnOutside(
|
|
403
|
+
isOpen,
|
|
404
|
+
() => {
|
|
405
|
+
setIsOpen(false);
|
|
406
|
+
setInputValue(selectedDisplayValue);
|
|
407
|
+
},
|
|
408
|
+
containerRef,
|
|
409
|
+
{ escape: false }
|
|
410
|
+
);
|
|
512
411
|
useEffect(() => {
|
|
513
412
|
setHighlighted(-1);
|
|
514
413
|
}, [inputValue, isOpen]);
|
|
@@ -610,7 +509,8 @@ function Combobox({
|
|
|
610
509
|
rounded-xl border border-(--border-default) bg-(--bg-elevated)
|
|
611
510
|
hover:border-(--border-strong) hover:bg-(--bg-hover)
|
|
612
511
|
focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary
|
|
613
|
-
truncate transition-all duration-200
|
|
512
|
+
truncate transition-all duration-200
|
|
513
|
+
text-base md:text-sm
|
|
614
514
|
${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
615
515
|
${selectedIconPath ? "pl-10 pr-20" : "px-3 pr-20"}
|
|
616
516
|
`
|
|
@@ -621,7 +521,7 @@ function Combobox({
|
|
|
621
521
|
{
|
|
622
522
|
type: "button",
|
|
623
523
|
onClick: clearValue,
|
|
624
|
-
"aria-label": "Clear",
|
|
524
|
+
"aria-label": labels?.clear ?? "Clear",
|
|
625
525
|
className: "absolute right-8 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-1 outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
626
526
|
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
627
527
|
}
|
|
@@ -636,7 +536,7 @@ function Combobox({
|
|
|
636
536
|
setIsOpen(!isOpen);
|
|
637
537
|
},
|
|
638
538
|
disabled,
|
|
639
|
-
"aria-label": "Toggle options",
|
|
539
|
+
"aria-label": labels?.toggle ?? "Toggle options",
|
|
640
540
|
className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-1 disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
641
541
|
children: /* @__PURE__ */ jsx(ChevronDown, { size: 14, className: isOpen ? "rotate-180 transition-transform" : "" })
|
|
642
542
|
}
|
|
@@ -962,18 +862,32 @@ var Stack = React7.forwardRef(
|
|
|
962
862
|
({ gap = 4, ...props }, ref) => /* @__PURE__ */ jsx(Flex, { ref, direction: "col", gap, ...props })
|
|
963
863
|
);
|
|
964
864
|
Stack.displayName = "Stack";
|
|
965
|
-
var Table = React7.forwardRef(({ className, containerClassName, responsive, ...props }, ref) =>
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
865
|
+
var Table = React7.forwardRef(({ className, containerClassName, responsive, scrollLabel, ...props }, ref) => {
|
|
866
|
+
const scrollRef = React7.useRef(null);
|
|
867
|
+
const tabIndex = useScrollableTabStop(scrollRef);
|
|
868
|
+
return /* @__PURE__ */ jsx(
|
|
869
|
+
"div",
|
|
870
|
+
{
|
|
871
|
+
ref: scrollRef,
|
|
872
|
+
tabIndex,
|
|
873
|
+
role: tabIndex === 0 && scrollLabel ? "region" : void 0,
|
|
874
|
+
"aria-label": tabIndex === 0 ? scrollLabel : void 0,
|
|
875
|
+
className: cn("relative w-full overflow-x-auto outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-lg", containerClassName),
|
|
876
|
+
children: /* @__PURE__ */ jsx(
|
|
877
|
+
"table",
|
|
878
|
+
{
|
|
879
|
+
ref,
|
|
880
|
+
className: cn(
|
|
881
|
+
"w-full caption-bottom border-collapse text-sm",
|
|
882
|
+
responsive && "yunui-table-responsive",
|
|
883
|
+
className
|
|
884
|
+
),
|
|
885
|
+
...props
|
|
886
|
+
}
|
|
887
|
+
)
|
|
888
|
+
}
|
|
889
|
+
);
|
|
890
|
+
});
|
|
977
891
|
Table.displayName = "Table";
|
|
978
892
|
var TableHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
979
893
|
"thead",
|
|
@@ -1197,9 +1111,10 @@ var Pagination = React7.forwardRef(
|
|
|
1197
1111
|
totalPages,
|
|
1198
1112
|
onPageChange,
|
|
1199
1113
|
siblingCount = 1,
|
|
1200
|
-
previousLabel = "Go to previous page",
|
|
1201
|
-
nextLabel = "Go to next page",
|
|
1202
1114
|
ariaLabel = "Pagination",
|
|
1115
|
+
labels,
|
|
1116
|
+
previousLabel,
|
|
1117
|
+
nextLabel,
|
|
1203
1118
|
className,
|
|
1204
1119
|
...props
|
|
1205
1120
|
}, ref) => {
|
|
@@ -1219,7 +1134,7 @@ var Pagination = React7.forwardRef(
|
|
|
1219
1134
|
"button",
|
|
1220
1135
|
{
|
|
1221
1136
|
type: "button",
|
|
1222
|
-
"aria-label": previousLabel,
|
|
1137
|
+
"aria-label": labels?.previous ?? previousLabel ?? "Go to previous page",
|
|
1223
1138
|
disabled: isFirst,
|
|
1224
1139
|
onClick: () => !isFirst && onPageChange(page - 1),
|
|
1225
1140
|
className: navButton,
|
|
@@ -1239,7 +1154,7 @@ var Pagination = React7.forwardRef(
|
|
|
1239
1154
|
"button",
|
|
1240
1155
|
{
|
|
1241
1156
|
type: "button",
|
|
1242
|
-
"aria-label": `Go to page ${token}`,
|
|
1157
|
+
"aria-label": labels?.page ? labels.page(token) : `Go to page ${token}`,
|
|
1243
1158
|
"aria-current": token === page ? "page" : void 0,
|
|
1244
1159
|
onClick: () => onPageChange(token),
|
|
1245
1160
|
className: cn(
|
|
@@ -1255,7 +1170,7 @@ var Pagination = React7.forwardRef(
|
|
|
1255
1170
|
"button",
|
|
1256
1171
|
{
|
|
1257
1172
|
type: "button",
|
|
1258
|
-
"aria-label": nextLabel,
|
|
1173
|
+
"aria-label": labels?.next ?? nextLabel ?? "Go to next page",
|
|
1259
1174
|
disabled: isLast,
|
|
1260
1175
|
onClick: () => !isLast && onPageChange(page + 1),
|
|
1261
1176
|
className: navButton,
|
|
@@ -1328,7 +1243,7 @@ var Input = React7.forwardRef(
|
|
|
1328
1243
|
"aria-invalid": error ? true : void 0,
|
|
1329
1244
|
"aria-describedby": describedByIds,
|
|
1330
1245
|
className: cn(
|
|
1331
|
-
"w-full h-10 px-4 bg-background border border-border rounded-xl text-sm outline-none transition-colors",
|
|
1246
|
+
"w-full h-10 px-4 bg-background border border-border rounded-xl text-base md:text-sm outline-none transition-colors",
|
|
1332
1247
|
"placeholder:text-muted-foreground",
|
|
1333
1248
|
"focus:border-ring focus:ring-2 focus:ring-ring/20",
|
|
1334
1249
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -1363,7 +1278,7 @@ var Textarea = React7.forwardRef(
|
|
|
1363
1278
|
"aria-invalid": error ? true : void 0,
|
|
1364
1279
|
"aria-describedby": describedByIds,
|
|
1365
1280
|
className: cn(
|
|
1366
|
-
"w-full px-4 py-3 bg-background border border-border rounded-xl text-sm outline-none transition-colors resize-none",
|
|
1281
|
+
"w-full px-4 py-3 bg-background border border-border rounded-xl text-base md:text-sm outline-none transition-colors resize-none",
|
|
1367
1282
|
"placeholder:text-muted-foreground",
|
|
1368
1283
|
"focus:border-ring focus:ring-2 focus:ring-ring/20",
|
|
1369
1284
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -1486,7 +1401,7 @@ var NumberInput = React7.forwardRef(
|
|
|
1486
1401
|
disabled,
|
|
1487
1402
|
"aria-invalid": error ? true : void 0,
|
|
1488
1403
|
"aria-describedby": describedByIds,
|
|
1489
|
-
className: "yunui-number w-full min-w-0 bg-transparent px-1 text-center text-sm outline-none",
|
|
1404
|
+
className: "yunui-number w-full min-w-0 bg-transparent px-1 text-center text-base md:text-sm outline-none",
|
|
1490
1405
|
...props
|
|
1491
1406
|
}
|
|
1492
1407
|
),
|
|
@@ -1563,7 +1478,7 @@ var SearchInput = React7.forwardRef(
|
|
|
1563
1478
|
onChange: (e) => onChange?.(e.target.value),
|
|
1564
1479
|
disabled,
|
|
1565
1480
|
className: cn(
|
|
1566
|
-
"w-full bg-background border border-border text-sm outline-none transition-colors",
|
|
1481
|
+
"w-full bg-background border border-border text-base md:text-sm outline-none transition-colors",
|
|
1567
1482
|
"placeholder:text-muted-foreground",
|
|
1568
1483
|
"focus:border-ring focus:ring-2 focus:ring-ring/20",
|
|
1569
1484
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -1601,7 +1516,11 @@ var Card = React7.forwardRef(
|
|
|
1601
1516
|
// Renders the canonical `.card` class so <Card> matches the
|
|
1602
1517
|
// ~226 raw `className="card"` usages across the app (single look).
|
|
1603
1518
|
"card",
|
|
1604
|
-
|
|
1519
|
+
// `card-interactive` is the house hover (1px lift + one step
|
|
1520
|
+
// up the shadow ramp). It used to invent its own recipe here
|
|
1521
|
+
// — `hover:border-ring hover:shadow-lg` — which contradicted
|
|
1522
|
+
// the `.card:hover` every raw `className="card"` gets.
|
|
1523
|
+
hover && "card-interactive",
|
|
1605
1524
|
className
|
|
1606
1525
|
),
|
|
1607
1526
|
...props
|
|
@@ -1731,7 +1650,9 @@ function StatusIndicator({
|
|
|
1731
1650
|
}) {
|
|
1732
1651
|
const color = {
|
|
1733
1652
|
online: "bg-(--success)",
|
|
1734
|
-
|
|
1653
|
+
// Token, not `zinc-400`: every other state in this map is token-driven,
|
|
1654
|
+
// and a raw palette value would not follow a theme.
|
|
1655
|
+
offline: "bg-muted-foreground/60",
|
|
1735
1656
|
busy: "bg-(--error)",
|
|
1736
1657
|
away: "bg-(--warning)",
|
|
1737
1658
|
neutral: "bg-muted-foreground"
|
|
@@ -1839,7 +1760,7 @@ var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1839
1760
|
}
|
|
1840
1761
|
));
|
|
1841
1762
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1842
|
-
var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1763
|
+
var DialogContent = React7.forwardRef(({ className, children, closeLabel, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1843
1764
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1844
1765
|
/* @__PURE__ */ jsxs(
|
|
1845
1766
|
DialogPrimitive.Content,
|
|
@@ -1860,7 +1781,7 @@ var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) =
|
|
|
1860
1781
|
...props,
|
|
1861
1782
|
children: [
|
|
1862
1783
|
children,
|
|
1863
|
-
/* @__PURE__ */ jsx(DialogPrimitive.Close, { "aria-label": "Close", className: "absolute right-4 top-4 rounded-lg p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
|
|
1784
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Close, { "aria-label": closeLabel ?? "Close", className: "absolute right-4 top-4 rounded-lg p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
|
|
1864
1785
|
]
|
|
1865
1786
|
}
|
|
1866
1787
|
)
|
|
@@ -1992,7 +1913,7 @@ var SelectScrollDownButton = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
1992
1913
|
}
|
|
1993
1914
|
));
|
|
1994
1915
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1995
|
-
var Slider = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1916
|
+
var Slider = React7.forwardRef(({ className, label, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1996
1917
|
SliderPrimitive.Root,
|
|
1997
1918
|
{
|
|
1998
1919
|
ref,
|
|
@@ -2003,6 +1924,7 @@ var Slider = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2003
1924
|
/* @__PURE__ */ jsx(
|
|
2004
1925
|
SliderPrimitive.Thumb,
|
|
2005
1926
|
{
|
|
1927
|
+
"aria-label": label,
|
|
2006
1928
|
className: "block h-5 w-5 rounded-full border-2 border-foreground bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 yunui-accent-border"
|
|
2007
1929
|
}
|
|
2008
1930
|
)
|
|
@@ -2010,10 +1932,11 @@ var Slider = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2010
1932
|
}
|
|
2011
1933
|
));
|
|
2012
1934
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
2013
|
-
var Progress = React7.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1935
|
+
var Progress = React7.forwardRef(({ className, value, label, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2014
1936
|
ProgressPrimitive.Root,
|
|
2015
1937
|
{
|
|
2016
1938
|
ref,
|
|
1939
|
+
"aria-label": label,
|
|
2017
1940
|
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className),
|
|
2018
1941
|
...props,
|
|
2019
1942
|
children: /* @__PURE__ */ jsx(
|
|
@@ -2172,7 +2095,7 @@ function PageLoader({ title, subtitle, className, ...props }) {
|
|
|
2172
2095
|
/* @__PURE__ */ jsx(Spinner, { size: "lg" }),
|
|
2173
2096
|
(title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
2174
2097
|
title && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium", children: title }),
|
|
2175
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground
|
|
2098
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: subtitle })
|
|
2176
2099
|
] })
|
|
2177
2100
|
] })
|
|
2178
2101
|
}
|
|
@@ -2226,12 +2149,13 @@ var IconButton = React7.forwardRef(
|
|
|
2226
2149
|
}
|
|
2227
2150
|
);
|
|
2228
2151
|
IconButton.displayName = "IconButton";
|
|
2229
|
-
function Label3({ className, ...props }) {
|
|
2152
|
+
function Label3({ className, size = "xs", ...props }) {
|
|
2230
2153
|
return /* @__PURE__ */ jsx(
|
|
2231
2154
|
"label",
|
|
2232
2155
|
{
|
|
2233
2156
|
className: cn(
|
|
2234
|
-
"
|
|
2157
|
+
"font-medium text-muted-foreground uppercase tracking-wider block mb-2",
|
|
2158
|
+
size === "xs" ? "text-[11px]" : "text-xs",
|
|
2235
2159
|
className
|
|
2236
2160
|
),
|
|
2237
2161
|
...props
|
|
@@ -2440,7 +2364,7 @@ function Modal({
|
|
|
2440
2364
|
}, []);
|
|
2441
2365
|
useEscapeKey(handleClose, isOpen);
|
|
2442
2366
|
useBodyScrollLock(isOpen);
|
|
2443
|
-
useFocusTrap(modalRef, isOpen);
|
|
2367
|
+
useFocusTrap(modalRef, isOpen && mounted);
|
|
2444
2368
|
useEffect(() => {
|
|
2445
2369
|
if (isOpen && internalIsClosing) {
|
|
2446
2370
|
setInternalIsClosing(false);
|
|
@@ -2487,7 +2411,7 @@ function Modal({
|
|
|
2487
2411
|
ref: modalRef,
|
|
2488
2412
|
className: cn(
|
|
2489
2413
|
// Glassy surface (not the solid .card) to match Sheet/Dialog/navbar.
|
|
2490
|
-
"relative w-full rounded-2xl border border-border bg-
|
|
2414
|
+
"relative w-full rounded-2xl border border-border bg-popover/85 backdrop-blur-2xl shadow-lg shadow-black/5 flex flex-col transition-all",
|
|
2491
2415
|
sizeClass,
|
|
2492
2416
|
isClosing ? "scale-95 opacity-0" : "scale-100 opacity-100",
|
|
2493
2417
|
className
|
|
@@ -2527,6 +2451,6 @@ function Modal({
|
|
|
2527
2451
|
return createPortal(modalContent, document.body);
|
|
2528
2452
|
}
|
|
2529
2453
|
|
|
2530
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Column, Combobox, ConfirmModal, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, Grid, IconButton, InlineCode, InlineStatus, Input, Kbd, Label3 as Label, Modal, MotionDiv, MotionSpan, NumberInput, PageLoader, Pagination, PasswordInput, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, Skeleton, Slider, Spinner, Stack, StatusIndicator, Steps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, fadeIn, staggerContainer, staggerItem
|
|
2531
|
-
//# sourceMappingURL=chunk-
|
|
2532
|
-
//# sourceMappingURL=chunk-
|
|
2454
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Column, Combobox, ConfirmModal, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, Grid, IconButton, InlineCode, InlineStatus, Input, Kbd, Label3 as Label, Modal, MotionDiv, MotionSpan, NumberInput, PageLoader, Pagination, PasswordInput, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, Skeleton, Slider, Spinner, Stack, StatusIndicator, Steps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, fadeIn, staggerContainer, staggerItem };
|
|
2455
|
+
//# sourceMappingURL=chunk-YKWRCA2S.js.map
|
|
2456
|
+
//# sourceMappingURL=chunk-YKWRCA2S.js.map
|