@olundot/ui 0.20.0-next.8 → 0.20.0-next.9
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/CHANGELOG.md +46 -0
- package/dist/index.d.ts +29 -15
- package/dist/index.js +658 -463
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -456,9 +456,30 @@ var CopyButton = React2.forwardRef(
|
|
|
456
456
|
CopyButton.displayName = "CopyButton";
|
|
457
457
|
|
|
458
458
|
// src/components/ui/input.tsx
|
|
459
|
-
import * as
|
|
459
|
+
import * as React4 from "react";
|
|
460
460
|
import { cva as cva2 } from "class-variance-authority";
|
|
461
461
|
import { AlertCircle, CheckCircle2 } from "lucide-react";
|
|
462
|
+
|
|
463
|
+
// src/components/ui/form-field-context.ts
|
|
464
|
+
import * as React3 from "react";
|
|
465
|
+
var FormFieldControlContext = React3.createContext(null);
|
|
466
|
+
function useFormFieldControl() {
|
|
467
|
+
return React3.useContext(FormFieldControlContext);
|
|
468
|
+
}
|
|
469
|
+
function joinIds(...lists) {
|
|
470
|
+
const ids = /* @__PURE__ */ new Set();
|
|
471
|
+
for (const list of lists) {
|
|
472
|
+
for (const id of list?.split(/\s+/) ?? []) {
|
|
473
|
+
if (id) ids.add(id);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return ids.size > 0 ? [...ids].join(" ") : void 0;
|
|
477
|
+
}
|
|
478
|
+
function FormFieldBoundary({ children }) {
|
|
479
|
+
return React3.createElement(FormFieldControlContext.Provider, { value: null }, children);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// src/components/ui/input.tsx
|
|
462
483
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
463
484
|
var inputVariants = cva2(
|
|
464
485
|
[
|
|
@@ -525,7 +546,7 @@ function mapInputSizeLegacy(inputSize) {
|
|
|
525
546
|
return "lg";
|
|
526
547
|
}
|
|
527
548
|
}
|
|
528
|
-
var Input =
|
|
549
|
+
var Input = React4.forwardRef(
|
|
529
550
|
({
|
|
530
551
|
className,
|
|
531
552
|
type,
|
|
@@ -548,21 +569,29 @@ var Input = React3.forwardRef(
|
|
|
548
569
|
}, ref) => {
|
|
549
570
|
const resolvedSize = size ?? mapInputSizeLegacy(inputSize) ?? "md";
|
|
550
571
|
const resolvedFullWidth = fullWidth ?? true;
|
|
551
|
-
const
|
|
552
|
-
const
|
|
572
|
+
const field = useFormFieldControl();
|
|
573
|
+
const generatedId = React4.useId();
|
|
574
|
+
const inputId = field ? generatedId : id ?? generatedId;
|
|
575
|
+
const controlId = id ?? field?.controlId;
|
|
553
576
|
const resolvedState = invalid || state === "error" ? "error" : state;
|
|
554
577
|
const showDescription = resolvedState === "default" && Boolean(description);
|
|
555
578
|
const showMessage = Boolean(message) && !showDescription;
|
|
556
579
|
const messageId = showMessage ? `${inputId}-message` : void 0;
|
|
557
580
|
const descriptionId = showDescription ? `${inputId}-description` : void 0;
|
|
558
|
-
const describedBy =
|
|
581
|
+
const describedBy = joinIds(
|
|
582
|
+
ariaDescribedBy,
|
|
583
|
+
descriptionId,
|
|
584
|
+
messageId,
|
|
585
|
+
field?.describedBy
|
|
586
|
+
);
|
|
559
587
|
const resolvedInvalid = resolvedState === "error" ? true : ariaInvalid ?? void 0;
|
|
588
|
+
const elementId = controlId ?? (label || message || description ? inputId : void 0);
|
|
560
589
|
const control = /* @__PURE__ */ jsx3(
|
|
561
590
|
"input",
|
|
562
591
|
{
|
|
563
592
|
type,
|
|
564
593
|
ref,
|
|
565
|
-
id:
|
|
594
|
+
id: elementId,
|
|
566
595
|
required,
|
|
567
596
|
disabled,
|
|
568
597
|
readOnly,
|
|
@@ -589,7 +618,7 @@ var Input = React3.forwardRef(
|
|
|
589
618
|
{
|
|
590
619
|
"data-slot": "input-label",
|
|
591
620
|
"data-required": required ? "true" : void 0,
|
|
592
|
-
htmlFor:
|
|
621
|
+
htmlFor: elementId,
|
|
593
622
|
className: "pl-1 pb-1 text-sm font-medium leading-snug text-text-secondary",
|
|
594
623
|
children: [
|
|
595
624
|
label,
|
|
@@ -645,7 +674,7 @@ var Input = React3.forwardRef(
|
|
|
645
674
|
Input.displayName = "Input";
|
|
646
675
|
|
|
647
676
|
// src/components/ui/file-upload-zone.tsx
|
|
648
|
-
import * as
|
|
677
|
+
import * as React5 from "react";
|
|
649
678
|
import { UploadCloud } from "lucide-react";
|
|
650
679
|
import { cva as cva3 } from "class-variance-authority";
|
|
651
680
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -782,7 +811,7 @@ function createFileListFromFiles(files) {
|
|
|
782
811
|
files.forEach((file) => transfer.items.add(file));
|
|
783
812
|
return transfer.files;
|
|
784
813
|
}
|
|
785
|
-
var FileUploadZone =
|
|
814
|
+
var FileUploadZone = React5.forwardRef(
|
|
786
815
|
({
|
|
787
816
|
accept = ".csv,text/csv",
|
|
788
817
|
className,
|
|
@@ -802,13 +831,13 @@ var FileUploadZone = React4.forwardRef(
|
|
|
802
831
|
surface = "surface",
|
|
803
832
|
...props
|
|
804
833
|
}, ref) => {
|
|
805
|
-
const generatedId =
|
|
834
|
+
const generatedId = React5.useId();
|
|
806
835
|
const inputId = id ?? generatedId;
|
|
807
|
-
const inputRef =
|
|
808
|
-
const [isDragging, setIsDragging] =
|
|
809
|
-
const [selectedFiles, setSelectedFiles] =
|
|
836
|
+
const inputRef = React5.useRef(null);
|
|
837
|
+
const [isDragging, setIsDragging] = React5.useState(false);
|
|
838
|
+
const [selectedFiles, setSelectedFiles] = React5.useState("");
|
|
810
839
|
const hasFile = selectedFiles.length > 0;
|
|
811
|
-
const pushFiles =
|
|
840
|
+
const pushFiles = React5.useCallback(
|
|
812
841
|
(incomingFiles) => {
|
|
813
842
|
if (!incomingFiles || incomingFiles.length === 0) {
|
|
814
843
|
setSelectedFiles("");
|
|
@@ -968,7 +997,7 @@ var FileUploadZone = React4.forwardRef(
|
|
|
968
997
|
FileUploadZone.displayName = "FileUploadZone";
|
|
969
998
|
|
|
970
999
|
// src/components/ui/alert.tsx
|
|
971
|
-
import * as
|
|
1000
|
+
import * as React6 from "react";
|
|
972
1001
|
import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from "lucide-react";
|
|
973
1002
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
974
1003
|
var SEM_FG = {
|
|
@@ -991,7 +1020,7 @@ var MARKER_ICON = {
|
|
|
991
1020
|
};
|
|
992
1021
|
var TITLE_LINE_HEIGHT = 21;
|
|
993
1022
|
var defaultEmphasis = (v) => v === "error" ? "strong" : "subtle";
|
|
994
|
-
var Alert =
|
|
1023
|
+
var Alert = React6.forwardRef(
|
|
995
1024
|
({ variant = "info", emphasis, marker = "icon", title, children, onDismiss, style, ...rest }, ref) => {
|
|
996
1025
|
const weight = emphasis ?? defaultEmphasis(variant);
|
|
997
1026
|
const strong = weight === "strong";
|
|
@@ -1084,8 +1113,8 @@ function DismissButton({
|
|
|
1084
1113
|
strong,
|
|
1085
1114
|
fg
|
|
1086
1115
|
}) {
|
|
1087
|
-
const [hover, setHover] =
|
|
1088
|
-
const [focus, setFocus] =
|
|
1116
|
+
const [hover, setHover] = React6.useState(false);
|
|
1117
|
+
const [focus, setFocus] = React6.useState(false);
|
|
1089
1118
|
return /* @__PURE__ */ jsx5(
|
|
1090
1119
|
"button",
|
|
1091
1120
|
{
|
|
@@ -1117,22 +1146,19 @@ function DismissButton({
|
|
|
1117
1146
|
}
|
|
1118
1147
|
);
|
|
1119
1148
|
}
|
|
1120
|
-
var
|
|
1149
|
+
var INLINE_LINE_HEIGHT = 1.4;
|
|
1150
|
+
var INLINE_ICON_SIZE = 12;
|
|
1151
|
+
var InlineAlert = React6.forwardRef(
|
|
1121
1152
|
({
|
|
1122
1153
|
variant = "info",
|
|
1123
|
-
|
|
1124
|
-
surface = "filled",
|
|
1154
|
+
marker = "icon",
|
|
1125
1155
|
children,
|
|
1126
1156
|
style,
|
|
1127
1157
|
"aria-live": ariaLive,
|
|
1128
1158
|
...rest
|
|
1129
1159
|
}, ref) => {
|
|
1130
|
-
const strong = emphasis === "strong";
|
|
1131
1160
|
const fg = SEM_FG[variant];
|
|
1132
|
-
const
|
|
1133
|
-
const bg = strong ? SEM_BG[variant] : filled ? "var(--bg-surface)" : "transparent";
|
|
1134
|
-
const border = strong ? "color-mix(in srgb, " + fg + " 26%, transparent)" : filled ? "var(--border-subtle)" : "transparent";
|
|
1135
|
-
const textColor = strong ? fg : filled ? "var(--text-primary)" : "var(--text-secondary)";
|
|
1161
|
+
const MarkerIcon = MARKER_ICON[variant];
|
|
1136
1162
|
return /* @__PURE__ */ jsxs5(
|
|
1137
1163
|
"div",
|
|
1138
1164
|
{
|
|
@@ -1141,23 +1167,21 @@ var InlineAlert = React5.forwardRef(
|
|
|
1141
1167
|
"aria-live": ariaLive ?? (variant === "error" ? "assertive" : "polite"),
|
|
1142
1168
|
"data-slot": "inline-alert",
|
|
1143
1169
|
"data-variant": variant,
|
|
1144
|
-
"data-
|
|
1145
|
-
"data-surface": surface,
|
|
1170
|
+
"data-marker": marker,
|
|
1146
1171
|
style: {
|
|
1147
1172
|
display: "inline-flex",
|
|
1148
1173
|
width: "fit-content",
|
|
1149
1174
|
maxWidth: "100%",
|
|
1150
|
-
alignItems: "
|
|
1151
|
-
gap:
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
padding: strong || filled ? "6px 10px" : "2px 0",
|
|
1175
|
+
alignItems: "flex-start",
|
|
1176
|
+
gap: "var(--space-2)",
|
|
1177
|
+
background: "transparent",
|
|
1178
|
+
border: "1px solid transparent",
|
|
1179
|
+
padding: "2px 0",
|
|
1156
1180
|
fontFamily: "var(--font-sans)",
|
|
1157
1181
|
fontSize: 12,
|
|
1158
1182
|
fontWeight: 500,
|
|
1159
|
-
lineHeight:
|
|
1160
|
-
color:
|
|
1183
|
+
lineHeight: INLINE_LINE_HEIGHT,
|
|
1184
|
+
color: "var(--text-secondary)",
|
|
1161
1185
|
...style
|
|
1162
1186
|
},
|
|
1163
1187
|
...rest,
|
|
@@ -1166,7 +1190,21 @@ var InlineAlert = React5.forwardRef(
|
|
|
1166
1190
|
"span",
|
|
1167
1191
|
{
|
|
1168
1192
|
"aria-hidden": "true",
|
|
1169
|
-
|
|
1193
|
+
"data-slot": "inline-alert-marker",
|
|
1194
|
+
style: {
|
|
1195
|
+
display: "inline-flex",
|
|
1196
|
+
height: INLINE_LINE_HEIGHT + "em",
|
|
1197
|
+
flexShrink: 0,
|
|
1198
|
+
alignItems: "center",
|
|
1199
|
+
color: fg
|
|
1200
|
+
},
|
|
1201
|
+
children: marker === "dot" ? /* @__PURE__ */ jsx5(
|
|
1202
|
+
"span",
|
|
1203
|
+
{
|
|
1204
|
+
"data-slot": "inline-alert-dot",
|
|
1205
|
+
style: { width: 6, height: 6, borderRadius: 9999, background: "currentColor" }
|
|
1206
|
+
}
|
|
1207
|
+
) : /* @__PURE__ */ jsx5(MarkerIcon, { "data-slot": "inline-alert-icon", size: INLINE_ICON_SIZE, strokeWidth: 2.25 })
|
|
1170
1208
|
}
|
|
1171
1209
|
),
|
|
1172
1210
|
/* @__PURE__ */ jsx5("span", { style: { minWidth: 0 }, children })
|
|
@@ -1178,7 +1216,7 @@ var InlineAlert = React5.forwardRef(
|
|
|
1178
1216
|
InlineAlert.displayName = "InlineAlert";
|
|
1179
1217
|
|
|
1180
1218
|
// src/components/ui/textarea.tsx
|
|
1181
|
-
import * as
|
|
1219
|
+
import * as React7 from "react";
|
|
1182
1220
|
import { cva as cva4 } from "class-variance-authority";
|
|
1183
1221
|
import { AlertCircle as AlertCircle2, CheckCircle2 as CheckCircle22 } from "lucide-react";
|
|
1184
1222
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
@@ -1247,7 +1285,7 @@ function mapTextareaSizeLegacy(textareaSize) {
|
|
|
1247
1285
|
function getTextLength(value) {
|
|
1248
1286
|
return typeof value === "string" ? value.length : void 0;
|
|
1249
1287
|
}
|
|
1250
|
-
var Textarea =
|
|
1288
|
+
var Textarea = React7.forwardRef(
|
|
1251
1289
|
({
|
|
1252
1290
|
className,
|
|
1253
1291
|
size,
|
|
@@ -1274,8 +1312,10 @@ var Textarea = React6.forwardRef(
|
|
|
1274
1312
|
}, ref) => {
|
|
1275
1313
|
const resolvedSize = size ?? mapTextareaSizeLegacy(textareaSize) ?? "md";
|
|
1276
1314
|
const resolvedFullWidth = fullWidth ?? true;
|
|
1277
|
-
const
|
|
1278
|
-
const
|
|
1315
|
+
const field = useFormFieldControl();
|
|
1316
|
+
const generatedId = React7.useId();
|
|
1317
|
+
const textareaId = field ? generatedId : id ?? generatedId;
|
|
1318
|
+
const controlId = id ?? field?.controlId;
|
|
1279
1319
|
const hasCounter = maxLength != null;
|
|
1280
1320
|
const resolvedState = invalid || state === "error" ? "error" : state;
|
|
1281
1321
|
const showDescription = resolvedState === "default" && Boolean(description);
|
|
@@ -1283,9 +1323,16 @@ var Textarea = React6.forwardRef(
|
|
|
1283
1323
|
const messageId = showMessage ? `${textareaId}-message` : void 0;
|
|
1284
1324
|
const descriptionId = showDescription ? `${textareaId}-description` : void 0;
|
|
1285
1325
|
const counterId = hasCounter ? `${textareaId}-counter` : void 0;
|
|
1286
|
-
const describedBy =
|
|
1326
|
+
const describedBy = joinIds(
|
|
1327
|
+
ariaDescribedBy,
|
|
1328
|
+
descriptionId,
|
|
1329
|
+
messageId,
|
|
1330
|
+
counterId,
|
|
1331
|
+
field?.describedBy
|
|
1332
|
+
);
|
|
1333
|
+
const elementId = controlId ?? (label || message || description || hasCounter ? textareaId : void 0);
|
|
1287
1334
|
const resolvedInvalid = resolvedState === "error" ? true : ariaInvalid ?? void 0;
|
|
1288
|
-
const [uncontrolledLength, setUncontrolledLength] =
|
|
1335
|
+
const [uncontrolledLength, setUncontrolledLength] = React7.useState(
|
|
1289
1336
|
() => getTextLength(defaultValue) ?? 0
|
|
1290
1337
|
);
|
|
1291
1338
|
const resolvedLength = valueLength ?? getTextLength(value) ?? uncontrolledLength;
|
|
@@ -1299,7 +1346,7 @@ var Textarea = React6.forwardRef(
|
|
|
1299
1346
|
"textarea",
|
|
1300
1347
|
{
|
|
1301
1348
|
ref,
|
|
1302
|
-
id:
|
|
1349
|
+
id: elementId,
|
|
1303
1350
|
required,
|
|
1304
1351
|
disabled,
|
|
1305
1352
|
readOnly,
|
|
@@ -1330,7 +1377,7 @@ var Textarea = React6.forwardRef(
|
|
|
1330
1377
|
{
|
|
1331
1378
|
"data-slot": "textarea-label",
|
|
1332
1379
|
"data-required": required ? "true" : void 0,
|
|
1333
|
-
htmlFor:
|
|
1380
|
+
htmlFor: elementId,
|
|
1334
1381
|
className: "pl-1 pb-1 text-sm font-medium leading-snug text-text-secondary",
|
|
1335
1382
|
children: [
|
|
1336
1383
|
label,
|
|
@@ -1405,7 +1452,7 @@ var Textarea = React6.forwardRef(
|
|
|
1405
1452
|
Textarea.displayName = "Textarea";
|
|
1406
1453
|
|
|
1407
1454
|
// src/components/ui/select.tsx
|
|
1408
|
-
import * as
|
|
1455
|
+
import * as React8 from "react";
|
|
1409
1456
|
import { cva as cva5 } from "class-variance-authority";
|
|
1410
1457
|
import {
|
|
1411
1458
|
AlertCircle as AlertCircle3,
|
|
@@ -1514,7 +1561,7 @@ function SelectItem({
|
|
|
1514
1561
|
);
|
|
1515
1562
|
}
|
|
1516
1563
|
SelectItem.displayName = "SelectItem";
|
|
1517
|
-
var Select =
|
|
1564
|
+
var Select = React8.forwardRef(
|
|
1518
1565
|
({
|
|
1519
1566
|
className,
|
|
1520
1567
|
selectVariant,
|
|
@@ -1547,38 +1594,44 @@ var Select = React7.forwardRef(
|
|
|
1547
1594
|
const resolvedSize = size ?? mapSelectSizeLegacy(selectSize) ?? "md";
|
|
1548
1595
|
const resolvedFullWidth = fullWidth ?? (selectVariant === "inline" ? false : true);
|
|
1549
1596
|
const resolvedAppearance = appearance ?? (selectVariant === "inline" ? "inline" : "field");
|
|
1550
|
-
const
|
|
1551
|
-
const
|
|
1597
|
+
const field = useFormFieldControl();
|
|
1598
|
+
const generatedId = React8.useId();
|
|
1599
|
+
const selectId = field ? generatedId : id ?? generatedId;
|
|
1552
1600
|
const inlineLabel = labelPlacement === "inline" && Boolean(label);
|
|
1553
1601
|
const inlineLabelId = inlineLabel ? `${selectId}-label` : void 0;
|
|
1554
1602
|
const inlineValueId = inlineLabel ? `${selectId}-value` : void 0;
|
|
1555
|
-
const triggerId = label || message || description ? selectId :
|
|
1603
|
+
const triggerId = id ?? field?.controlId ?? (label || message || description ? selectId : void 0);
|
|
1556
1604
|
const resolvedState = invalid || state === "error" ? "error" : state;
|
|
1557
1605
|
const showDescription = resolvedState === "default" && Boolean(description);
|
|
1558
1606
|
const showMessage = Boolean(message) && !showDescription;
|
|
1559
1607
|
const messageId = showMessage ? `${selectId}-message` : void 0;
|
|
1560
1608
|
const descriptionId = showDescription ? `${selectId}-description` : void 0;
|
|
1561
1609
|
const resolvedInvalid = resolvedState === "error" ? true : ariaInvalid ?? void 0;
|
|
1562
|
-
const describedBy =
|
|
1610
|
+
const describedBy = joinIds(
|
|
1611
|
+
ariaDescribedBy,
|
|
1612
|
+
descriptionId,
|
|
1613
|
+
messageId,
|
|
1614
|
+
field?.describedBy
|
|
1615
|
+
);
|
|
1563
1616
|
const isControlled = value !== void 0;
|
|
1564
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
1617
|
+
const [uncontrolledValue, setUncontrolledValue] = React8.useState(
|
|
1565
1618
|
defaultValue ?? ""
|
|
1566
1619
|
);
|
|
1567
1620
|
const selectedValue = isControlled ? value : uncontrolledValue;
|
|
1568
1621
|
const selectedOption = options.find((option) => option.value === selectedValue);
|
|
1569
1622
|
const hasSelection = selectedValue != null && selectedValue !== "";
|
|
1570
|
-
const [portalMounted, setPortalMounted] =
|
|
1571
|
-
|
|
1623
|
+
const [portalMounted, setPortalMounted] = React8.useState(false);
|
|
1624
|
+
React8.useEffect(() => {
|
|
1572
1625
|
setPortalMounted(true);
|
|
1573
1626
|
}, []);
|
|
1574
|
-
const effectiveOptions =
|
|
1627
|
+
const effectiveOptions = React8.useMemo(() => {
|
|
1575
1628
|
if (!clearable) return options;
|
|
1576
1629
|
return [
|
|
1577
1630
|
{ value: SELECT_CLEAR_SENTINEL, label: clearLabel ?? placeholder },
|
|
1578
1631
|
...options
|
|
1579
1632
|
];
|
|
1580
1633
|
}, [clearable, clearLabel, placeholder, options]);
|
|
1581
|
-
const handleValueChange =
|
|
1634
|
+
const handleValueChange = React8.useCallback(
|
|
1582
1635
|
(nextValue) => {
|
|
1583
1636
|
const resolved = nextValue === SELECT_CLEAR_SENTINEL ? "" : nextValue;
|
|
1584
1637
|
if (!isControlled) {
|
|
@@ -1693,7 +1746,7 @@ var Select = React7.forwardRef(
|
|
|
1693
1746
|
]
|
|
1694
1747
|
}
|
|
1695
1748
|
),
|
|
1696
|
-
portalMounted ? /* @__PURE__ */ jsx7(SelectPrimitive.Portal, { children: content }) : content
|
|
1749
|
+
/* @__PURE__ */ jsx7(FormFieldBoundary, { children: portalMounted ? /* @__PURE__ */ jsx7(SelectPrimitive.Portal, { children: content }) : content })
|
|
1697
1750
|
]
|
|
1698
1751
|
}
|
|
1699
1752
|
);
|
|
@@ -1713,7 +1766,7 @@ var Select = React7.forwardRef(
|
|
|
1713
1766
|
{
|
|
1714
1767
|
"data-slot": "select-label",
|
|
1715
1768
|
"data-required": required ? "true" : void 0,
|
|
1716
|
-
htmlFor:
|
|
1769
|
+
htmlFor: triggerId,
|
|
1717
1770
|
className: "pl-1 pb-1 text-sm font-medium leading-snug text-text-secondary",
|
|
1718
1771
|
children: [
|
|
1719
1772
|
label,
|
|
@@ -1769,6 +1822,7 @@ var Select = React7.forwardRef(
|
|
|
1769
1822
|
Select.displayName = "Select";
|
|
1770
1823
|
|
|
1771
1824
|
// src/components/ui/form-field.tsx
|
|
1825
|
+
import * as React9 from "react";
|
|
1772
1826
|
import { cva as cva6 } from "class-variance-authority";
|
|
1773
1827
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1774
1828
|
var formFieldVariants = cva6("w-full", {
|
|
@@ -1787,6 +1841,10 @@ var formFieldRequiredClassName = "ml-[2px] font-bold text-[var(--semantic-error,
|
|
|
1787
1841
|
var formFieldDescriptionClassName = "text-[12px] leading-snug text-text-tertiary";
|
|
1788
1842
|
var formFieldErrorClassName = "text-[12px] leading-snug text-[var(--semantic-error,var(--error))]";
|
|
1789
1843
|
var formFieldControlStackClassName = "flex min-w-0 flex-col gap-[var(--space-1)]";
|
|
1844
|
+
var nativeLabelableTags = /* @__PURE__ */ new Set(["input", "select", "textarea", "button"]);
|
|
1845
|
+
function isNativeLabelable(node) {
|
|
1846
|
+
return React9.isValidElement(node) && typeof node.type === "string" && nativeLabelableTags.has(node.type);
|
|
1847
|
+
}
|
|
1790
1848
|
function FormField({
|
|
1791
1849
|
label,
|
|
1792
1850
|
required,
|
|
@@ -1799,27 +1857,50 @@ function FormField({
|
|
|
1799
1857
|
...props
|
|
1800
1858
|
}) {
|
|
1801
1859
|
const isFunctionChildren = typeof children === "function";
|
|
1802
|
-
const
|
|
1803
|
-
const
|
|
1804
|
-
const
|
|
1860
|
+
const autoId = React9.useId();
|
|
1861
|
+
const controlId = id ?? autoId;
|
|
1862
|
+
const labelId = `${autoId}-label`;
|
|
1863
|
+
const descriptionId = description && !error ? `${controlId}-description` : void 0;
|
|
1864
|
+
const errorId = error ? `${controlId}-error` : void 0;
|
|
1865
|
+
const describedBy = !isFunctionChildren ? joinIds(descriptionId, errorId) : void 0;
|
|
1805
1866
|
const invalid = Boolean(error);
|
|
1806
1867
|
const controlDescription = !error ? description : void 0;
|
|
1807
1868
|
const controlMessage = error;
|
|
1808
1869
|
const controlState = error ? "error" : "default";
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1870
|
+
const nativeControl = !isFunctionChildren && isNativeLabelable(children) ? children : null;
|
|
1871
|
+
const labelTarget = nativeControl?.props.id ?? controlId;
|
|
1872
|
+
let resolvedChildren;
|
|
1873
|
+
if (isFunctionChildren) {
|
|
1874
|
+
resolvedChildren = children({
|
|
1875
|
+
controlProps: {
|
|
1876
|
+
id: controlId,
|
|
1877
|
+
"aria-describedby": describedBy,
|
|
1878
|
+
"aria-invalid": invalid ? true : void 0,
|
|
1879
|
+
required: required || void 0,
|
|
1880
|
+
description: controlDescription,
|
|
1881
|
+
message: controlMessage,
|
|
1882
|
+
state: controlState
|
|
1883
|
+
},
|
|
1884
|
+
descriptionId,
|
|
1885
|
+
errorId,
|
|
1886
|
+
invalid
|
|
1887
|
+
});
|
|
1888
|
+
} else if (nativeControl) {
|
|
1889
|
+
const nativeDescribedBy = joinIds(
|
|
1890
|
+
nativeControl.props["aria-describedby"],
|
|
1891
|
+
describedBy
|
|
1892
|
+
);
|
|
1893
|
+
resolvedChildren = React9.cloneElement(nativeControl, {
|
|
1894
|
+
id: labelTarget,
|
|
1895
|
+
...nativeDescribedBy ? { "aria-describedby": nativeDescribedBy } : null
|
|
1896
|
+
});
|
|
1897
|
+
} else {
|
|
1898
|
+
resolvedChildren = children;
|
|
1899
|
+
}
|
|
1900
|
+
const controlContext = React9.useMemo(
|
|
1901
|
+
() => isFunctionChildren ? null : { controlId, labelId, describedBy },
|
|
1902
|
+
[isFunctionChildren, controlId, labelId, describedBy]
|
|
1903
|
+
);
|
|
1823
1904
|
const labelClassName = cn(
|
|
1824
1905
|
formFieldLabelClassName,
|
|
1825
1906
|
layout === "horizontal" && "sm:justify-self-end sm:text-right sm:pt-[var(--space-4)]"
|
|
@@ -1833,11 +1914,12 @@ function FormField({
|
|
|
1833
1914
|
className: cn(formFieldVariants({ layout }), className),
|
|
1834
1915
|
...props,
|
|
1835
1916
|
children: [
|
|
1836
|
-
|
|
1917
|
+
/* @__PURE__ */ jsxs8(
|
|
1837
1918
|
"label",
|
|
1838
1919
|
{
|
|
1920
|
+
id: labelId,
|
|
1839
1921
|
"data-slot": "form-field-label",
|
|
1840
|
-
htmlFor:
|
|
1922
|
+
htmlFor: labelTarget,
|
|
1841
1923
|
className: labelClassName,
|
|
1842
1924
|
children: [
|
|
1843
1925
|
/* @__PURE__ */ jsx8("span", { children: label }),
|
|
@@ -1851,17 +1933,7 @@ function FormField({
|
|
|
1851
1933
|
) : null
|
|
1852
1934
|
]
|
|
1853
1935
|
}
|
|
1854
|
-
)
|
|
1855
|
-
label,
|
|
1856
|
-
required ? /* @__PURE__ */ jsx8(
|
|
1857
|
-
"span",
|
|
1858
|
-
{
|
|
1859
|
-
"aria-hidden": "true",
|
|
1860
|
-
className: formFieldRequiredClassName,
|
|
1861
|
-
children: "*"
|
|
1862
|
-
}
|
|
1863
|
-
) : null
|
|
1864
|
-
] }),
|
|
1936
|
+
),
|
|
1865
1937
|
/* @__PURE__ */ jsxs8(
|
|
1866
1938
|
"div",
|
|
1867
1939
|
{
|
|
@@ -1871,7 +1943,7 @@ function FormField({
|
|
|
1871
1943
|
layout === "horizontal" && "sm:col-start-2"
|
|
1872
1944
|
),
|
|
1873
1945
|
children: [
|
|
1874
|
-
resolvedChildren,
|
|
1946
|
+
/* @__PURE__ */ jsx8(FormFieldControlContext.Provider, { value: controlContext, children: resolvedChildren }),
|
|
1875
1947
|
!isFunctionChildren && !error && description ? /* @__PURE__ */ jsx8(
|
|
1876
1948
|
"p",
|
|
1877
1949
|
{
|
|
@@ -1900,10 +1972,10 @@ function FormField({
|
|
|
1900
1972
|
}
|
|
1901
1973
|
|
|
1902
1974
|
// src/components/ui/label.tsx
|
|
1903
|
-
import * as
|
|
1975
|
+
import * as React10 from "react";
|
|
1904
1976
|
import { Label as LabelPrimitive } from "radix-ui";
|
|
1905
1977
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1906
|
-
var Label =
|
|
1978
|
+
var Label = React10.forwardRef(({ htmlFor, required, children, className, ...props }, ref) => /* @__PURE__ */ jsxs9(
|
|
1907
1979
|
LabelPrimitive.Root,
|
|
1908
1980
|
{
|
|
1909
1981
|
ref,
|
|
@@ -1931,7 +2003,7 @@ var Label = React8.forwardRef(({ htmlFor, required, children, className, ...prop
|
|
|
1931
2003
|
Label.displayName = "Label";
|
|
1932
2004
|
|
|
1933
2005
|
// src/components/ui/switch.tsx
|
|
1934
|
-
import * as
|
|
2006
|
+
import * as React11 from "react";
|
|
1935
2007
|
import { cva as cva7 } from "class-variance-authority";
|
|
1936
2008
|
import { Loader2 as Loader22 } from "lucide-react";
|
|
1937
2009
|
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
@@ -1952,7 +2024,7 @@ var switchFieldVariants = cva7("", {
|
|
|
1952
2024
|
fullWidth: false
|
|
1953
2025
|
}
|
|
1954
2026
|
});
|
|
1955
|
-
var Switch =
|
|
2027
|
+
var Switch = React11.forwardRef(
|
|
1956
2028
|
({
|
|
1957
2029
|
className,
|
|
1958
2030
|
label,
|
|
@@ -1963,12 +2035,15 @@ var Switch = React9.forwardRef(
|
|
|
1963
2035
|
fullWidth = false,
|
|
1964
2036
|
disabled,
|
|
1965
2037
|
id,
|
|
2038
|
+
"aria-describedby": ariaDescribedBy,
|
|
1966
2039
|
...props
|
|
1967
2040
|
}, ref) => {
|
|
1968
|
-
const
|
|
1969
|
-
const
|
|
1970
|
-
const
|
|
1971
|
-
const
|
|
2041
|
+
const field = useFormFieldControl();
|
|
2042
|
+
const generatedId = React11.useId();
|
|
2043
|
+
const switchId = id ?? field?.controlId ?? generatedId;
|
|
2044
|
+
const slotId = field ? generatedId : id ?? generatedId;
|
|
2045
|
+
const labelId = `${slotId}-label`;
|
|
2046
|
+
const descriptionId = description ? `${slotId}-description` : void 0;
|
|
1972
2047
|
const isDisabled = disabled || loading;
|
|
1973
2048
|
const isStart = labelPlacement === "start";
|
|
1974
2049
|
const track = /* @__PURE__ */ jsxs10(
|
|
@@ -1980,7 +2055,7 @@ var Switch = React9.forwardRef(
|
|
|
1980
2055
|
disabled: isDisabled,
|
|
1981
2056
|
"aria-required": required || void 0,
|
|
1982
2057
|
"aria-busy": loading || void 0,
|
|
1983
|
-
"aria-describedby": descriptionId,
|
|
2058
|
+
"aria-describedby": joinIds(ariaDescribedBy, descriptionId, field?.describedBy),
|
|
1984
2059
|
className: cn(
|
|
1985
2060
|
"group relative inline-flex h-[24px] w-[44px] cursor-pointer items-center rounded-full transition-colors",
|
|
1986
2061
|
"bg-[var(--border)] data-[state=checked]:bg-[var(--primary)]",
|
|
@@ -2077,13 +2152,13 @@ var Switch = React9.forwardRef(
|
|
|
2077
2152
|
Switch.displayName = "Switch";
|
|
2078
2153
|
|
|
2079
2154
|
// src/components/ui/permission-guard.tsx
|
|
2080
|
-
import * as
|
|
2155
|
+
import * as React13 from "react";
|
|
2081
2156
|
|
|
2082
2157
|
// src/components/ui/tooltip.tsx
|
|
2083
|
-
import * as
|
|
2158
|
+
import * as React12 from "react";
|
|
2084
2159
|
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
2085
2160
|
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2086
|
-
var TooltipTouchContext =
|
|
2161
|
+
var TooltipTouchContext = React12.createContext(null);
|
|
2087
2162
|
function TooltipProvider({
|
|
2088
2163
|
delayDuration = 0,
|
|
2089
2164
|
...props
|
|
@@ -2105,17 +2180,17 @@ function Tooltip({
|
|
|
2105
2180
|
children,
|
|
2106
2181
|
...props
|
|
2107
2182
|
}) {
|
|
2108
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
2183
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React12.useState(defaultOpen ?? false);
|
|
2109
2184
|
const isControlled = controlledOpen !== void 0;
|
|
2110
2185
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
2111
|
-
const handleOpenChange =
|
|
2186
|
+
const handleOpenChange = React12.useCallback(
|
|
2112
2187
|
(value) => {
|
|
2113
2188
|
if (!isControlled) setUncontrolledOpen(value);
|
|
2114
2189
|
userOnOpenChange?.(value);
|
|
2115
2190
|
},
|
|
2116
2191
|
[isControlled, userOnOpenChange]
|
|
2117
2192
|
);
|
|
2118
|
-
const ctx =
|
|
2193
|
+
const ctx = React12.useMemo(
|
|
2119
2194
|
() => ({
|
|
2120
2195
|
enableTouch: enableTouch && !isControlled,
|
|
2121
2196
|
toggle: () => handleOpenChange(!open)
|
|
@@ -2137,7 +2212,7 @@ function TooltipTrigger({
|
|
|
2137
2212
|
onClick: userOnClick,
|
|
2138
2213
|
...props
|
|
2139
2214
|
}) {
|
|
2140
|
-
const ctx =
|
|
2215
|
+
const ctx = React12.useContext(TooltipTouchContext);
|
|
2141
2216
|
return /* @__PURE__ */ jsx11(
|
|
2142
2217
|
TooltipPrimitive.Trigger,
|
|
2143
2218
|
{
|
|
@@ -2156,7 +2231,7 @@ function TooltipContent({
|
|
|
2156
2231
|
children,
|
|
2157
2232
|
...props
|
|
2158
2233
|
}) {
|
|
2159
|
-
return /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs11(
|
|
2234
|
+
return /* @__PURE__ */ jsx11(FormFieldBoundary, { children: /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs11(
|
|
2160
2235
|
TooltipPrimitive.Content,
|
|
2161
2236
|
{
|
|
2162
2237
|
"data-slot": "tooltip-content",
|
|
@@ -2171,13 +2246,13 @@ function TooltipContent({
|
|
|
2171
2246
|
/* @__PURE__ */ jsx11(TooltipPrimitive.Arrow, { className: "z-[var(--z-tooltip)] size-[10px] translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
|
|
2172
2247
|
]
|
|
2173
2248
|
}
|
|
2174
|
-
) });
|
|
2249
|
+
) }) });
|
|
2175
2250
|
}
|
|
2176
2251
|
|
|
2177
2252
|
// src/components/ui/permission-guard.tsx
|
|
2178
2253
|
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2179
2254
|
var defaultDisabledReason = "\uAD8C\uD55C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4";
|
|
2180
|
-
var PermissionContext =
|
|
2255
|
+
var PermissionContext = React13.createContext(
|
|
2181
2256
|
void 0
|
|
2182
2257
|
);
|
|
2183
2258
|
function PermissionProvider({
|
|
@@ -2188,7 +2263,7 @@ function PermissionProvider({
|
|
|
2188
2263
|
return /* @__PURE__ */ jsx12(PermissionContext.Provider, { value: value ?? permissions, children });
|
|
2189
2264
|
}
|
|
2190
2265
|
function usePermission(permission, scope) {
|
|
2191
|
-
const state =
|
|
2266
|
+
const state = React13.useContext(PermissionContext);
|
|
2192
2267
|
return evaluatePermission(permission, state, scope);
|
|
2193
2268
|
}
|
|
2194
2269
|
function evaluatePermission(permission, state, scope) {
|
|
@@ -2219,7 +2294,7 @@ function PermissionGuard({
|
|
|
2219
2294
|
permissions,
|
|
2220
2295
|
disabledReason = defaultDisabledReason
|
|
2221
2296
|
}) {
|
|
2222
|
-
const state =
|
|
2297
|
+
const state = React13.useContext(PermissionContext);
|
|
2223
2298
|
const allowed = evaluatePermission(permission, permissions ?? state, scope);
|
|
2224
2299
|
if (allowed) {
|
|
2225
2300
|
return /* @__PURE__ */ jsx12(Fragment3, { children });
|
|
@@ -2253,10 +2328,10 @@ function hasAnyMatch(candidates, values) {
|
|
|
2253
2328
|
return candidates.some((candidate) => valueSet.has(candidate));
|
|
2254
2329
|
}
|
|
2255
2330
|
function renderDisabledFallback(children, disabledReason) {
|
|
2256
|
-
if (!
|
|
2331
|
+
if (!React13.isValidElement(children) || children.type === React13.Fragment) {
|
|
2257
2332
|
return null;
|
|
2258
2333
|
}
|
|
2259
|
-
const clonedChild =
|
|
2334
|
+
const clonedChild = React13.cloneElement(
|
|
2260
2335
|
children,
|
|
2261
2336
|
{
|
|
2262
2337
|
disabled: true,
|
|
@@ -2282,7 +2357,7 @@ function isPermissionState(value) {
|
|
|
2282
2357
|
}
|
|
2283
2358
|
|
|
2284
2359
|
// src/components/ui/card.tsx
|
|
2285
|
-
import * as
|
|
2360
|
+
import * as React14 from "react";
|
|
2286
2361
|
import { cva as cva8 } from "class-variance-authority";
|
|
2287
2362
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2288
2363
|
var cardBaseVariants = cva8(
|
|
@@ -2333,7 +2408,7 @@ function cardVariants({ variant, surface, interactive, className } = {}) {
|
|
|
2333
2408
|
className
|
|
2334
2409
|
);
|
|
2335
2410
|
}
|
|
2336
|
-
var Card =
|
|
2411
|
+
var Card = React14.forwardRef(
|
|
2337
2412
|
({ className, variant, surface, interactive, selected, disabled, "aria-disabled": ariaDisabled, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2338
2413
|
"div",
|
|
2339
2414
|
{
|
|
@@ -2354,7 +2429,7 @@ var Card = React12.forwardRef(
|
|
|
2354
2429
|
)
|
|
2355
2430
|
);
|
|
2356
2431
|
Card.displayName = "Card";
|
|
2357
|
-
var CardHeader =
|
|
2432
|
+
var CardHeader = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2358
2433
|
"div",
|
|
2359
2434
|
{
|
|
2360
2435
|
ref,
|
|
@@ -2364,7 +2439,7 @@ var CardHeader = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2364
2439
|
}
|
|
2365
2440
|
));
|
|
2366
2441
|
CardHeader.displayName = "CardHeader";
|
|
2367
|
-
var CardTitle =
|
|
2442
|
+
var CardTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2368
2443
|
"h3",
|
|
2369
2444
|
{
|
|
2370
2445
|
ref,
|
|
@@ -2377,7 +2452,7 @@ var CardTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2377
2452
|
}
|
|
2378
2453
|
));
|
|
2379
2454
|
CardTitle.displayName = "CardTitle";
|
|
2380
|
-
var CardDescription =
|
|
2455
|
+
var CardDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2381
2456
|
"p",
|
|
2382
2457
|
{
|
|
2383
2458
|
ref,
|
|
@@ -2390,7 +2465,7 @@ var CardDescription = React12.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2390
2465
|
}
|
|
2391
2466
|
));
|
|
2392
2467
|
CardDescription.displayName = "CardDescription";
|
|
2393
|
-
var CardContent =
|
|
2468
|
+
var CardContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2394
2469
|
"div",
|
|
2395
2470
|
{
|
|
2396
2471
|
ref,
|
|
@@ -2400,7 +2475,7 @@ var CardContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2400
2475
|
}
|
|
2401
2476
|
));
|
|
2402
2477
|
CardContent.displayName = "CardContent";
|
|
2403
|
-
var CardProse =
|
|
2478
|
+
var CardProse = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2404
2479
|
"div",
|
|
2405
2480
|
{
|
|
2406
2481
|
ref,
|
|
@@ -2419,7 +2494,7 @@ var CardProse = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2419
2494
|
}
|
|
2420
2495
|
));
|
|
2421
2496
|
CardProse.displayName = "CardProse";
|
|
2422
|
-
var CardFooter =
|
|
2497
|
+
var CardFooter = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
2423
2498
|
"div",
|
|
2424
2499
|
{
|
|
2425
2500
|
ref,
|
|
@@ -2431,9 +2506,9 @@ var CardFooter = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2431
2506
|
CardFooter.displayName = "CardFooter";
|
|
2432
2507
|
|
|
2433
2508
|
// src/components/ui/page-header.tsx
|
|
2434
|
-
import * as
|
|
2509
|
+
import * as React15 from "react";
|
|
2435
2510
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2436
|
-
var PageHeader =
|
|
2511
|
+
var PageHeader = React15.forwardRef(
|
|
2437
2512
|
({
|
|
2438
2513
|
className,
|
|
2439
2514
|
breadcrumb,
|
|
@@ -2518,7 +2593,7 @@ var PageHeader = React13.forwardRef(
|
|
|
2518
2593
|
PageHeader.displayName = "PageHeader";
|
|
2519
2594
|
|
|
2520
2595
|
// src/components/ui/breadcrumb.tsx
|
|
2521
|
-
import * as
|
|
2596
|
+
import * as React16 from "react";
|
|
2522
2597
|
import { ChevronRight } from "lucide-react";
|
|
2523
2598
|
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2524
2599
|
function getDisplayItems(items, maxItems) {
|
|
@@ -2543,7 +2618,7 @@ var Separator = () => /* @__PURE__ */ jsx15("li", { "aria-hidden": "true", "data
|
|
|
2543
2618
|
className: "text-[var(--text-disabled)]"
|
|
2544
2619
|
}
|
|
2545
2620
|
) });
|
|
2546
|
-
var Breadcrumb =
|
|
2621
|
+
var Breadcrumb = React16.forwardRef(
|
|
2547
2622
|
({
|
|
2548
2623
|
className,
|
|
2549
2624
|
items,
|
|
@@ -2568,7 +2643,7 @@ var Breadcrumb = React14.forwardRef(
|
|
|
2568
2643
|
children: displayItems.map((item, index) => {
|
|
2569
2644
|
const isLast = index === displayItems.length - 1;
|
|
2570
2645
|
if (item === "ellipsis") {
|
|
2571
|
-
return /* @__PURE__ */ jsxs14(
|
|
2646
|
+
return /* @__PURE__ */ jsxs14(React16.Fragment, { children: [
|
|
2572
2647
|
/* @__PURE__ */ jsx15(
|
|
2573
2648
|
"li",
|
|
2574
2649
|
{
|
|
@@ -2581,7 +2656,7 @@ var Breadcrumb = React14.forwardRef(
|
|
|
2581
2656
|
/* @__PURE__ */ jsx15(Separator, {})
|
|
2582
2657
|
] }, "ellipsis");
|
|
2583
2658
|
}
|
|
2584
|
-
return /* @__PURE__ */ jsxs14(
|
|
2659
|
+
return /* @__PURE__ */ jsxs14(React16.Fragment, { children: [
|
|
2585
2660
|
/* @__PURE__ */ jsx15("li", { "data-slot": "breadcrumb-item", className: "flex min-w-0 items-center", children: isLast ? /* @__PURE__ */ jsx15(
|
|
2586
2661
|
"span",
|
|
2587
2662
|
{
|
|
@@ -2627,9 +2702,9 @@ var Breadcrumb = React14.forwardRef(
|
|
|
2627
2702
|
Breadcrumb.displayName = "Breadcrumb";
|
|
2628
2703
|
|
|
2629
2704
|
// src/components/ui/data-layout.tsx
|
|
2630
|
-
import * as
|
|
2705
|
+
import * as React17 from "react";
|
|
2631
2706
|
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2632
|
-
var DataLayout =
|
|
2707
|
+
var DataLayout = React17.forwardRef(
|
|
2633
2708
|
({ className, header, toolbar, children, footer, bulkBar, ...props }, ref) => {
|
|
2634
2709
|
return /* @__PURE__ */ jsxs15(
|
|
2635
2710
|
"div",
|
|
@@ -2672,7 +2747,7 @@ var DataLayout = React15.forwardRef(
|
|
|
2672
2747
|
DataLayout.displayName = "DataLayout";
|
|
2673
2748
|
|
|
2674
2749
|
// src/components/ui/wizard-layout.tsx
|
|
2675
|
-
import * as
|
|
2750
|
+
import * as React18 from "react";
|
|
2676
2751
|
import { Check as Check2 } from "lucide-react";
|
|
2677
2752
|
import { Fragment as Fragment6, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2678
2753
|
var circleBaseClassName = [
|
|
@@ -2739,7 +2814,7 @@ function getConnectorClassName(isActivePath) {
|
|
|
2739
2814
|
isActivePath ? "bg-[var(--primary)]" : "bg-[var(--border-subtle)]"
|
|
2740
2815
|
);
|
|
2741
2816
|
}
|
|
2742
|
-
var WizardLayout =
|
|
2817
|
+
var WizardLayout = React18.forwardRef(
|
|
2743
2818
|
({
|
|
2744
2819
|
className,
|
|
2745
2820
|
header,
|
|
@@ -2752,8 +2827,8 @@ var WizardLayout = React16.forwardRef(
|
|
|
2752
2827
|
allowStepNavigation = true,
|
|
2753
2828
|
...props
|
|
2754
2829
|
}, ref) => {
|
|
2755
|
-
const stepViewportRef =
|
|
2756
|
-
const stepItemRefs =
|
|
2830
|
+
const stepViewportRef = React18.useRef(null);
|
|
2831
|
+
const stepItemRefs = React18.useRef([]);
|
|
2757
2832
|
const resolvedSteps = steps.map((step, index) => ({
|
|
2758
2833
|
...step,
|
|
2759
2834
|
resolvedState: getStepState(step, index, activeStep)
|
|
@@ -2763,7 +2838,7 @@ var WizardLayout = React16.forwardRef(
|
|
|
2763
2838
|
const currentStep = resolvedSteps[currentStepIndex];
|
|
2764
2839
|
const progressStepNumber = stepCount > 0 ? currentStepIndex + 1 : 0;
|
|
2765
2840
|
const progressValue = stepCount > 0 ? progressStepNumber / stepCount * 100 : 0;
|
|
2766
|
-
|
|
2841
|
+
React18.useLayoutEffect(() => {
|
|
2767
2842
|
const viewportNode = stepViewportRef.current;
|
|
2768
2843
|
const activeNode = stepItemRefs.current[currentStepIndex];
|
|
2769
2844
|
if (!viewportNode || !activeNode) {
|
|
@@ -2917,7 +2992,7 @@ var WizardLayout = React16.forwardRef(
|
|
|
2917
2992
|
const isClickable = allowStepNavigation && step.resolvedState === "complete" && typeof onStepChange === "function";
|
|
2918
2993
|
const isCurrent = step.resolvedState === "current";
|
|
2919
2994
|
const connectorIsActive = index < activeStep;
|
|
2920
|
-
return /* @__PURE__ */ jsxs16(
|
|
2995
|
+
return /* @__PURE__ */ jsxs16(React18.Fragment, { children: [
|
|
2921
2996
|
/* @__PURE__ */ jsx17(
|
|
2922
2997
|
"li",
|
|
2923
2998
|
{
|
|
@@ -3027,10 +3102,10 @@ var WizardLayout = React16.forwardRef(
|
|
|
3027
3102
|
WizardLayout.displayName = "WizardLayout";
|
|
3028
3103
|
|
|
3029
3104
|
// src/components/ui/detail-layout.tsx
|
|
3030
|
-
import * as
|
|
3105
|
+
import * as React20 from "react";
|
|
3031
3106
|
|
|
3032
3107
|
// src/components/ui/tabs.tsx
|
|
3033
|
-
import * as
|
|
3108
|
+
import * as React19 from "react";
|
|
3034
3109
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3035
3110
|
import { cva as cva9 } from "class-variance-authority";
|
|
3036
3111
|
import { Lock } from "lucide-react";
|
|
@@ -3179,9 +3254,9 @@ var tabsBadgeVariants = cva9(
|
|
|
3179
3254
|
].join(" ")
|
|
3180
3255
|
);
|
|
3181
3256
|
function useTabsIndicator(enabled, activeKey, tabsKey, listRef, indicatorRef) {
|
|
3182
|
-
const placedRef =
|
|
3183
|
-
const previousKeyRef =
|
|
3184
|
-
const place =
|
|
3257
|
+
const placedRef = React19.useRef(null);
|
|
3258
|
+
const previousKeyRef = React19.useRef(null);
|
|
3259
|
+
const place = React19.useCallback(
|
|
3185
3260
|
(animate) => {
|
|
3186
3261
|
const list = listRef.current;
|
|
3187
3262
|
const indicator = indicatorRef.current;
|
|
@@ -3206,7 +3281,7 @@ function useTabsIndicator(enabled, activeKey, tabsKey, listRef, indicatorRef) {
|
|
|
3206
3281
|
},
|
|
3207
3282
|
[listRef, indicatorRef]
|
|
3208
3283
|
);
|
|
3209
|
-
|
|
3284
|
+
React19.useLayoutEffect(() => {
|
|
3210
3285
|
if (!enabled) {
|
|
3211
3286
|
placedRef.current = null;
|
|
3212
3287
|
previousKeyRef.current = null;
|
|
@@ -3216,7 +3291,7 @@ function useTabsIndicator(enabled, activeKey, tabsKey, listRef, indicatorRef) {
|
|
|
3216
3291
|
previousKeyRef.current = activeKey;
|
|
3217
3292
|
place(previousKey !== null && previousKey !== activeKey);
|
|
3218
3293
|
}, [enabled, activeKey, tabsKey, place]);
|
|
3219
|
-
|
|
3294
|
+
React19.useEffect(() => {
|
|
3220
3295
|
const list = listRef.current;
|
|
3221
3296
|
if (!enabled || !list) return;
|
|
3222
3297
|
let cancelled = false;
|
|
@@ -3251,7 +3326,7 @@ function getTabId(baseId, key) {
|
|
|
3251
3326
|
function getPanelId(baseId, key) {
|
|
3252
3327
|
return baseId ? `${baseId}-panel-${key}` : `panel-${key}`;
|
|
3253
3328
|
}
|
|
3254
|
-
var Tabs =
|
|
3329
|
+
var Tabs = React19.forwardRef(
|
|
3255
3330
|
({
|
|
3256
3331
|
className,
|
|
3257
3332
|
listClassName,
|
|
@@ -3265,8 +3340,8 @@ var Tabs = React17.forwardRef(
|
|
|
3265
3340
|
variant = "line",
|
|
3266
3341
|
...props
|
|
3267
3342
|
}, ref) => {
|
|
3268
|
-
const listRef =
|
|
3269
|
-
const indicatorRef =
|
|
3343
|
+
const listRef = React19.useRef(null);
|
|
3344
|
+
const indicatorRef = React19.useRef(null);
|
|
3270
3345
|
const isLine = variant === "line";
|
|
3271
3346
|
const tabsKey = tabs.map((tab) => tab.key).join("\0");
|
|
3272
3347
|
useTabsIndicator(isLine, activeKey, tabsKey, listRef, indicatorRef);
|
|
@@ -3340,7 +3415,7 @@ var Tabs = React17.forwardRef(
|
|
|
3340
3415
|
}
|
|
3341
3416
|
);
|
|
3342
3417
|
Tabs.displayName = "Tabs";
|
|
3343
|
-
var TabsContent =
|
|
3418
|
+
var TabsContent = React19.forwardRef(({ className, tabKey, baseId, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
3344
3419
|
TabsPrimitive.Content,
|
|
3345
3420
|
{
|
|
3346
3421
|
ref,
|
|
@@ -3398,19 +3473,19 @@ function DetailLayoutBody({
|
|
|
3398
3473
|
);
|
|
3399
3474
|
}
|
|
3400
3475
|
function isTabsContentChild(child) {
|
|
3401
|
-
return
|
|
3476
|
+
return React20.isValidElement(child) && child.type === TabsContent;
|
|
3402
3477
|
}
|
|
3403
3478
|
function containsTabsContent(children) {
|
|
3404
|
-
return
|
|
3479
|
+
return React20.Children.toArray(children).some((child) => {
|
|
3405
3480
|
if (isTabsContentChild(child)) return true;
|
|
3406
|
-
return
|
|
3481
|
+
return React20.isValidElement(child) && containsTabsContent(child.props.children);
|
|
3407
3482
|
});
|
|
3408
3483
|
}
|
|
3409
3484
|
function appendFooterToActiveTabsContent(children, activeTab, footer) {
|
|
3410
|
-
return
|
|
3485
|
+
return React20.Children.map(children, (child) => {
|
|
3411
3486
|
if (isTabsContentChild(child)) {
|
|
3412
3487
|
if (child.props.tabKey !== activeTab || !footer) return child;
|
|
3413
|
-
return
|
|
3488
|
+
return React20.cloneElement(
|
|
3414
3489
|
child,
|
|
3415
3490
|
void 0,
|
|
3416
3491
|
/* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
@@ -3419,8 +3494,8 @@ function appendFooterToActiveTabsContent(children, activeTab, footer) {
|
|
|
3419
3494
|
] })
|
|
3420
3495
|
);
|
|
3421
3496
|
}
|
|
3422
|
-
if (
|
|
3423
|
-
return
|
|
3497
|
+
if (React20.isValidElement(child)) {
|
|
3498
|
+
return React20.cloneElement(
|
|
3424
3499
|
child,
|
|
3425
3500
|
void 0,
|
|
3426
3501
|
appendFooterToActiveTabsContent(child.props.children, activeTab, footer)
|
|
@@ -3429,7 +3504,7 @@ function appendFooterToActiveTabsContent(children, activeTab, footer) {
|
|
|
3429
3504
|
return child;
|
|
3430
3505
|
});
|
|
3431
3506
|
}
|
|
3432
|
-
var DetailLayout =
|
|
3507
|
+
var DetailLayout = React20.forwardRef(
|
|
3433
3508
|
({
|
|
3434
3509
|
className,
|
|
3435
3510
|
header,
|
|
@@ -3515,7 +3590,7 @@ var DetailLayout = React18.forwardRef(
|
|
|
3515
3590
|
DetailLayout.displayName = "DetailLayout";
|
|
3516
3591
|
|
|
3517
3592
|
// src/components/ui/form-layout.tsx
|
|
3518
|
-
import * as
|
|
3593
|
+
import * as React21 from "react";
|
|
3519
3594
|
import { ChevronDown as ChevronDown3 } from "lucide-react";
|
|
3520
3595
|
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3521
3596
|
function FormLayoutSectionBlock({
|
|
@@ -3528,7 +3603,7 @@ function FormLayoutSectionBlock({
|
|
|
3528
3603
|
const isEditorSection = section.id === editorSectionId;
|
|
3529
3604
|
const resolvedColumns = isEditorSection ? 1 : section.columns ?? 1;
|
|
3530
3605
|
const isCollapsible = Boolean(section.collapsible);
|
|
3531
|
-
const [isOpen, setIsOpen] =
|
|
3606
|
+
const [isOpen, setIsOpen] = React21.useState(section.defaultOpen ?? true);
|
|
3532
3607
|
const contentId = `${section.id}-content`;
|
|
3533
3608
|
const titleId = `${section.id}-title`;
|
|
3534
3609
|
const sectionHeader = /* @__PURE__ */ jsxs19("div", { className: "flex min-w-0 flex-col gap-[var(--space-2)] sm:flex-row sm:items-start sm:justify-between", children: [
|
|
@@ -3615,7 +3690,7 @@ function FormLayoutSectionBlock({
|
|
|
3615
3690
|
}
|
|
3616
3691
|
);
|
|
3617
3692
|
}
|
|
3618
|
-
var FormLayout =
|
|
3693
|
+
var FormLayout = React21.forwardRef(
|
|
3619
3694
|
({
|
|
3620
3695
|
className,
|
|
3621
3696
|
header,
|
|
@@ -3674,11 +3749,11 @@ var FormLayout = React19.forwardRef(
|
|
|
3674
3749
|
FormLayout.displayName = "FormLayout";
|
|
3675
3750
|
|
|
3676
3751
|
// src/components/ui/dialog.tsx
|
|
3677
|
-
import * as
|
|
3752
|
+
import * as React28 from "react";
|
|
3678
3753
|
import { Dialog as DialogPrimitive3 } from "radix-ui";
|
|
3679
3754
|
|
|
3680
3755
|
// src/lib/use-overlay-action.ts
|
|
3681
|
-
import * as
|
|
3756
|
+
import * as React22 from "react";
|
|
3682
3757
|
function useOverlayAction({
|
|
3683
3758
|
action,
|
|
3684
3759
|
onOpenChange,
|
|
@@ -3686,10 +3761,10 @@ function useOverlayAction({
|
|
|
3686
3761
|
disabled = false,
|
|
3687
3762
|
onError
|
|
3688
3763
|
}) {
|
|
3689
|
-
const [pending, setPending] =
|
|
3690
|
-
const busyRef =
|
|
3764
|
+
const [pending, setPending] = React22.useState(false);
|
|
3765
|
+
const busyRef = React22.useRef(false);
|
|
3691
3766
|
const isBusy = loading || pending;
|
|
3692
|
-
const guardOpenChange =
|
|
3767
|
+
const guardOpenChange = React22.useCallback(
|
|
3693
3768
|
(nextOpen) => {
|
|
3694
3769
|
if (!nextOpen && isBusy) {
|
|
3695
3770
|
return;
|
|
@@ -3698,7 +3773,7 @@ function useOverlayAction({
|
|
|
3698
3773
|
},
|
|
3699
3774
|
[isBusy, onOpenChange]
|
|
3700
3775
|
);
|
|
3701
|
-
const run =
|
|
3776
|
+
const run = React22.useCallback(async () => {
|
|
3702
3777
|
if (busyRef.current || loading || disabled) {
|
|
3703
3778
|
return;
|
|
3704
3779
|
}
|
|
@@ -3719,11 +3794,11 @@ function useOverlayAction({
|
|
|
3719
3794
|
}
|
|
3720
3795
|
|
|
3721
3796
|
// src/lib/use-return-focus.ts
|
|
3722
|
-
import * as
|
|
3797
|
+
import * as React23 from "react";
|
|
3723
3798
|
var closingOverlay = '[role="dialog"][data-state="closed"], [role="alertdialog"][data-state="closed"]';
|
|
3724
3799
|
function useReturnFocus() {
|
|
3725
|
-
const returnTo =
|
|
3726
|
-
const onOpenAutoFocus =
|
|
3800
|
+
const returnTo = React23.useRef(null);
|
|
3801
|
+
const onOpenAutoFocus = React23.useCallback((event) => {
|
|
3727
3802
|
const active = document.activeElement;
|
|
3728
3803
|
const content = event?.target instanceof HTMLElement ? event.target : null;
|
|
3729
3804
|
const hasTrigger = !!content?.id && Array.from(document.querySelectorAll("[aria-controls]")).some(
|
|
@@ -3731,7 +3806,7 @@ function useReturnFocus() {
|
|
|
3731
3806
|
);
|
|
3732
3807
|
returnTo.current = !hasTrigger && active instanceof HTMLElement && active !== document.body ? active : null;
|
|
3733
3808
|
}, []);
|
|
3734
|
-
const onCloseAutoFocus =
|
|
3809
|
+
const onCloseAutoFocus = React23.useCallback((event) => {
|
|
3735
3810
|
const target = returnTo.current;
|
|
3736
3811
|
returnTo.current = null;
|
|
3737
3812
|
if (!target?.isConnected) return;
|
|
@@ -3746,11 +3821,11 @@ function useReturnFocus() {
|
|
|
3746
3821
|
}
|
|
3747
3822
|
|
|
3748
3823
|
// src/components/ui/overlay-anatomy.tsx
|
|
3749
|
-
import * as
|
|
3824
|
+
import * as React26 from "react";
|
|
3750
3825
|
import { AlertDialog as AlertDialogPrimitive, Dialog as DialogPrimitive2 } from "radix-ui";
|
|
3751
3826
|
|
|
3752
3827
|
// src/components/ui/overlay-bottom-sheet.tsx
|
|
3753
|
-
import * as
|
|
3828
|
+
import * as React24 from "react";
|
|
3754
3829
|
|
|
3755
3830
|
// src/components/ui/overlay-policy.ts
|
|
3756
3831
|
var OVERLAY_DESKTOP_QUERY = "(min-width: 1024px)";
|
|
@@ -3824,11 +3899,11 @@ function clearOffset(surface) {
|
|
|
3824
3899
|
surface?.style.removeProperty("transform");
|
|
3825
3900
|
}
|
|
3826
3901
|
function useSwipeDismiss({ enabled, onDismiss, surfaceRef, always = false }) {
|
|
3827
|
-
const [dragging, setDragging] =
|
|
3828
|
-
const drag =
|
|
3829
|
-
const dismiss =
|
|
3902
|
+
const [dragging, setDragging] = React24.useState(false);
|
|
3903
|
+
const drag = React24.useRef(null);
|
|
3904
|
+
const dismiss = React24.useRef(onDismiss);
|
|
3830
3905
|
dismiss.current = onDismiss;
|
|
3831
|
-
const handleProps =
|
|
3906
|
+
const handleProps = React24.useMemo(() => {
|
|
3832
3907
|
if (!enabled) return {};
|
|
3833
3908
|
const end = (event, release) => {
|
|
3834
3909
|
const current = drag.current;
|
|
@@ -3931,7 +4006,7 @@ import { X as X2 } from "lucide-react";
|
|
|
3931
4006
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
3932
4007
|
|
|
3933
4008
|
// src/components/ui/icon-button.tsx
|
|
3934
|
-
import * as
|
|
4009
|
+
import * as React25 from "react";
|
|
3935
4010
|
import { cva as cva10 } from "class-variance-authority";
|
|
3936
4011
|
import { ChevronDown as ChevronDown4, Loader2 as Loader23 } from "lucide-react";
|
|
3937
4012
|
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
@@ -4011,7 +4086,7 @@ var iconButtonBadgeVariants = cva10(
|
|
|
4011
4086
|
}
|
|
4012
4087
|
}
|
|
4013
4088
|
);
|
|
4014
|
-
var IconButton =
|
|
4089
|
+
var IconButton = React25.forwardRef(
|
|
4015
4090
|
({
|
|
4016
4091
|
className,
|
|
4017
4092
|
appearance,
|
|
@@ -4221,7 +4296,7 @@ var scrimMotionOf = {
|
|
|
4221
4296
|
sheet: scrimMotion.responsive,
|
|
4222
4297
|
menu: scrimMotion.sheet
|
|
4223
4298
|
};
|
|
4224
|
-
var OverlayScrimLayer =
|
|
4299
|
+
var OverlayScrimLayer = React26.forwardRef(
|
|
4225
4300
|
({ scrim, kind, still, className, ...props }, ref) => {
|
|
4226
4301
|
const Overlay = kind === "alert" ? AlertDialogPrimitive.Overlay : DialogPrimitive2.Overlay;
|
|
4227
4302
|
return /* @__PURE__ */ jsx24(
|
|
@@ -4405,7 +4480,7 @@ var bottomSheet = {
|
|
|
4405
4480
|
};
|
|
4406
4481
|
|
|
4407
4482
|
// src/components/ui/sheet.tsx
|
|
4408
|
-
import * as
|
|
4483
|
+
import * as React27 from "react";
|
|
4409
4484
|
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
4410
4485
|
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4411
4486
|
var defaultSheetMotionConfig = {
|
|
@@ -4475,10 +4550,10 @@ function StructuredSheet({
|
|
|
4475
4550
|
}) {
|
|
4476
4551
|
const policy = OVERLAY_POLICY.sheet;
|
|
4477
4552
|
const motionConfig = resolveSheetMotionConfig(motion);
|
|
4478
|
-
const surfaceRef =
|
|
4553
|
+
const surfaceRef = React27.useRef(null);
|
|
4479
4554
|
const swipe = useSwipeDismiss({ enabled: policy.swipe, onDismiss: () => onOpenChange(false), surfaceRef });
|
|
4480
4555
|
const returnFocus = useReturnFocus();
|
|
4481
|
-
return /* @__PURE__ */ jsx25(SheetPrimitive.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs22(SheetPrimitive.Portal, { children: [
|
|
4556
|
+
return /* @__PURE__ */ jsx25(SheetPrimitive.Root, { open, onOpenChange, children: /* @__PURE__ */ jsx25(FormFieldBoundary, { children: /* @__PURE__ */ jsxs22(SheetPrimitive.Portal, { children: [
|
|
4482
4557
|
/* @__PURE__ */ jsx25(OverlayScrimLayer, { kind: "sheet", scrim, still: motionConfig === false }),
|
|
4483
4558
|
/* @__PURE__ */ jsxs22(
|
|
4484
4559
|
SheetPrimitive.Content,
|
|
@@ -4519,7 +4594,7 @@ function StructuredSheet({
|
|
|
4519
4594
|
]
|
|
4520
4595
|
}
|
|
4521
4596
|
)
|
|
4522
|
-
] }) });
|
|
4597
|
+
] }) }) });
|
|
4523
4598
|
}
|
|
4524
4599
|
function SheetTrigger({
|
|
4525
4600
|
...props
|
|
@@ -4534,7 +4609,7 @@ function SheetClose({
|
|
|
4534
4609
|
function SheetPortal({
|
|
4535
4610
|
...props
|
|
4536
4611
|
}) {
|
|
4537
|
-
return /* @__PURE__ */ jsx25(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
4612
|
+
return /* @__PURE__ */ jsx25(FormFieldBoundary, { children: /* @__PURE__ */ jsx25(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props }) });
|
|
4538
4613
|
}
|
|
4539
4614
|
function SheetOverlay({
|
|
4540
4615
|
className,
|
|
@@ -4708,7 +4783,7 @@ import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-r
|
|
|
4708
4783
|
function dialogMobileSheetStyle(style) {
|
|
4709
4784
|
return getDefaultSheetMotionStyle(style);
|
|
4710
4785
|
}
|
|
4711
|
-
var DialogModalContext =
|
|
4786
|
+
var DialogModalContext = React28.createContext(true);
|
|
4712
4787
|
function Dialog(props) {
|
|
4713
4788
|
if (props.title !== void 0) return /* @__PURE__ */ jsx26(StructuredDialog, { ...props });
|
|
4714
4789
|
return /* @__PURE__ */ jsx26(DialogRoot, { ...props });
|
|
@@ -4740,7 +4815,7 @@ function StructuredDialog({
|
|
|
4740
4815
|
onError
|
|
4741
4816
|
});
|
|
4742
4817
|
const returnFocus = useReturnFocus();
|
|
4743
|
-
const surfaceRef =
|
|
4818
|
+
const surfaceRef = React28.useRef(null);
|
|
4744
4819
|
const swipe = useSwipeDismiss({ enabled: policy.swipe, onDismiss: () => guardOpenChange(false), surfaceRef });
|
|
4745
4820
|
const body = /* @__PURE__ */ jsx26(OverlayBody, { kind: "dialog", className, children });
|
|
4746
4821
|
const footerRow = formMode ? /* @__PURE__ */ jsxs23(OverlayFooter, { kind: "dialog", children: [
|
|
@@ -4758,7 +4833,7 @@ function StructuredDialog({
|
|
|
4758
4833
|
),
|
|
4759
4834
|
/* @__PURE__ */ jsx26(Button, { type: "submit", appearance: "filled", tone: "primary", size: "lg", className: footerButtonHitAreaClassName, loading: isBusy, children: submitLabel })
|
|
4760
4835
|
] }) : footer != null ? /* @__PURE__ */ jsx26(OverlayFooter, { kind: "dialog", children: footer }) : null;
|
|
4761
|
-
return /* @__PURE__ */ jsx26(DialogPrimitive3.Root, { open, onOpenChange: guardOpenChange, children: /* @__PURE__ */ jsxs23(DialogPrimitive3.Portal, { children: [
|
|
4836
|
+
return /* @__PURE__ */ jsx26(DialogPrimitive3.Root, { open, onOpenChange: guardOpenChange, children: /* @__PURE__ */ jsx26(FormFieldBoundary, { children: /* @__PURE__ */ jsxs23(DialogPrimitive3.Portal, { children: [
|
|
4762
4837
|
/* @__PURE__ */ jsx26(OverlayScrimLayer, { kind: "dialog", scrim }),
|
|
4763
4838
|
/* @__PURE__ */ jsxs23(
|
|
4764
4839
|
DialogPrimitive3.Content,
|
|
@@ -4805,15 +4880,17 @@ function StructuredDialog({
|
|
|
4805
4880
|
]
|
|
4806
4881
|
}
|
|
4807
4882
|
)
|
|
4808
|
-
] }) });
|
|
4883
|
+
] }) }) });
|
|
4809
4884
|
}
|
|
4810
4885
|
function DialogRoot({ modal = true, ...props }) {
|
|
4811
4886
|
return /* @__PURE__ */ jsx26(DialogModalContext.Provider, { value: modal, children: /* @__PURE__ */ jsx26(DialogPrimitive3.Root, { modal, ...props }) });
|
|
4812
4887
|
}
|
|
4813
4888
|
var DialogTrigger = DialogPrimitive3.Trigger;
|
|
4814
|
-
|
|
4889
|
+
function DialogPortal(props) {
|
|
4890
|
+
return /* @__PURE__ */ jsx26(FormFieldBoundary, { children: /* @__PURE__ */ jsx26(DialogPrimitive3.Portal, { ...props }) });
|
|
4891
|
+
}
|
|
4815
4892
|
var DialogClose = DialogPrimitive3.Close;
|
|
4816
|
-
var DialogOverlay =
|
|
4893
|
+
var DialogOverlay = React28.forwardRef(({ className, ...props }, ref) => (
|
|
4817
4894
|
// Position and scrim color come from the shared scrim (overlay-anatomy).
|
|
4818
4895
|
/* @__PURE__ */ jsx26(
|
|
4819
4896
|
OverlayScrimLayer,
|
|
@@ -4830,7 +4907,7 @@ var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => (
|
|
|
4830
4907
|
)
|
|
4831
4908
|
));
|
|
4832
4909
|
DialogOverlay.displayName = DialogPrimitive3.Overlay.displayName;
|
|
4833
|
-
var DialogContent =
|
|
4910
|
+
var DialogContent = React28.forwardRef(
|
|
4834
4911
|
({
|
|
4835
4912
|
className,
|
|
4836
4913
|
children,
|
|
@@ -4841,7 +4918,7 @@ var DialogContent = React26.forwardRef(
|
|
|
4841
4918
|
onCloseAutoFocus,
|
|
4842
4919
|
...props
|
|
4843
4920
|
}, ref) => {
|
|
4844
|
-
const modal =
|
|
4921
|
+
const modal = React28.useContext(DialogModalContext);
|
|
4845
4922
|
const returnFocus = useReturnFocus();
|
|
4846
4923
|
const handleOpenAutoFocus = (event) => {
|
|
4847
4924
|
if (modal) returnFocus.onOpenAutoFocus(event);
|
|
@@ -4926,7 +5003,7 @@ var DialogFooter = ({
|
|
|
4926
5003
|
}
|
|
4927
5004
|
);
|
|
4928
5005
|
DialogFooter.displayName = "DialogFooter";
|
|
4929
|
-
var DialogTitle =
|
|
5006
|
+
var DialogTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
4930
5007
|
DialogPrimitive3.Title,
|
|
4931
5008
|
{
|
|
4932
5009
|
ref,
|
|
@@ -4938,7 +5015,7 @@ var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4938
5015
|
}
|
|
4939
5016
|
));
|
|
4940
5017
|
DialogTitle.displayName = DialogPrimitive3.Title.displayName;
|
|
4941
|
-
var DialogDescription =
|
|
5018
|
+
var DialogDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
4942
5019
|
DialogPrimitive3.Description,
|
|
4943
5020
|
{
|
|
4944
5021
|
ref,
|
|
@@ -4947,7 +5024,7 @@ var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /*
|
|
|
4947
5024
|
}
|
|
4948
5025
|
));
|
|
4949
5026
|
DialogDescription.displayName = DialogPrimitive3.Description.displayName;
|
|
4950
|
-
var DialogEyebrow =
|
|
5027
|
+
var DialogEyebrow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
4951
5028
|
"p",
|
|
4952
5029
|
{
|
|
4953
5030
|
ref,
|
|
@@ -4959,7 +5036,8 @@ var DialogEyebrow = React26.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
4959
5036
|
}
|
|
4960
5037
|
));
|
|
4961
5038
|
DialogEyebrow.displayName = "DialogEyebrow";
|
|
4962
|
-
var DialogRawContent = DialogPrimitive3.Content;
|
|
5039
|
+
var DialogRawContent = React28.forwardRef((props, ref) => /* @__PURE__ */ jsx26(FormFieldBoundary, { children: /* @__PURE__ */ jsx26(DialogPrimitive3.Content, { ref, ...props }) }));
|
|
5040
|
+
DialogRawContent.displayName = DialogPrimitive3.Content.displayName;
|
|
4963
5041
|
|
|
4964
5042
|
// src/components/ui/form-modal.tsx
|
|
4965
5043
|
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
@@ -5023,7 +5101,7 @@ function AlertDialogFrame({
|
|
|
5023
5101
|
control.focus();
|
|
5024
5102
|
}
|
|
5025
5103
|
};
|
|
5026
|
-
return /* @__PURE__ */ jsx28(AlertDialogPrimitive2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs25(AlertDialogPrimitive2.Portal, { children: [
|
|
5104
|
+
return /* @__PURE__ */ jsx28(AlertDialogPrimitive2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsx28(FormFieldBoundary, { children: /* @__PURE__ */ jsxs25(AlertDialogPrimitive2.Portal, { children: [
|
|
5027
5105
|
/* @__PURE__ */ jsx28(OverlayScrimLayer, { kind: "alert", scrim }),
|
|
5028
5106
|
/* @__PURE__ */ jsxs25(
|
|
5029
5107
|
AlertDialogPrimitive2.Content,
|
|
@@ -5038,7 +5116,7 @@ function AlertDialogFrame({
|
|
|
5038
5116
|
]
|
|
5039
5117
|
}
|
|
5040
5118
|
)
|
|
5041
|
-
] }) });
|
|
5119
|
+
] }) }) });
|
|
5042
5120
|
}
|
|
5043
5121
|
function AlertDialog({
|
|
5044
5122
|
open,
|
|
@@ -5133,15 +5211,15 @@ function InfoModal({
|
|
|
5133
5211
|
}
|
|
5134
5212
|
|
|
5135
5213
|
// src/components/ui/filter-toolbar.tsx
|
|
5136
|
-
import * as
|
|
5214
|
+
import * as React31 from "react";
|
|
5137
5215
|
import { SlidersHorizontal } from "lucide-react";
|
|
5138
5216
|
|
|
5139
5217
|
// src/components/ui/chip.tsx
|
|
5140
|
-
import * as
|
|
5218
|
+
import * as React29 from "react";
|
|
5141
5219
|
import { cva as cva11 } from "class-variance-authority";
|
|
5142
5220
|
import { X as X3 } from "lucide-react";
|
|
5143
5221
|
import { Slot as Slot2 } from "radix-ui";
|
|
5144
|
-
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5222
|
+
import { Fragment as Fragment11, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5145
5223
|
var chipVariants = cva11(
|
|
5146
5224
|
[
|
|
5147
5225
|
"inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap",
|
|
@@ -5158,7 +5236,7 @@ var chipVariants = cva11(
|
|
|
5158
5236
|
filter: "cursor-pointer",
|
|
5159
5237
|
choice: "cursor-pointer",
|
|
5160
5238
|
removable: "cursor-pointer",
|
|
5161
|
-
// status-filter — 정적 표시 chip (display only, 클릭 affordance 없음).
|
|
5239
|
+
// status-filter — 정적 표시 chip (display only, 클릭 affordance 없음). onClick·pressed 없으면 span.
|
|
5162
5240
|
/** @deprecated A read-only label is a Badge: neutral·muted → `neutral`, accent → `brand`, success → `success`, warning → `warning`, danger → `error`. */
|
|
5163
5241
|
"status-filter": "cursor-default"
|
|
5164
5242
|
},
|
|
@@ -5235,19 +5313,42 @@ var chipCountVariants = cva11(
|
|
|
5235
5313
|
}
|
|
5236
5314
|
}
|
|
5237
5315
|
);
|
|
5238
|
-
|
|
5316
|
+
function ChipCount({
|
|
5317
|
+
count,
|
|
5318
|
+
tone,
|
|
5319
|
+
size
|
|
5320
|
+
}) {
|
|
5321
|
+
return /* @__PURE__ */ jsxs26(Fragment11, { children: [
|
|
5322
|
+
/* @__PURE__ */ jsx30(
|
|
5323
|
+
"span",
|
|
5324
|
+
{
|
|
5325
|
+
"aria-hidden": "true",
|
|
5326
|
+
"data-slot": "chip-count",
|
|
5327
|
+
"data-count-tone": tone,
|
|
5328
|
+
className: chipCountVariants({ tone, size }),
|
|
5329
|
+
children: count
|
|
5330
|
+
}
|
|
5331
|
+
),
|
|
5332
|
+
/* @__PURE__ */ jsxs26("span", { className: "sr-only", children: [
|
|
5333
|
+
" ",
|
|
5334
|
+
count
|
|
5335
|
+
] })
|
|
5336
|
+
] });
|
|
5337
|
+
}
|
|
5338
|
+
var Chip = React29.forwardRef(
|
|
5239
5339
|
({
|
|
5240
5340
|
className,
|
|
5241
5341
|
variant = "filter",
|
|
5242
5342
|
tone = "neutral",
|
|
5243
5343
|
size = "md",
|
|
5244
|
-
pressed
|
|
5344
|
+
pressed: pressedProp,
|
|
5245
5345
|
count,
|
|
5246
|
-
removeLabel = "
|
|
5346
|
+
removeLabel = "\uC81C\uAC70",
|
|
5247
5347
|
asChild = false,
|
|
5248
5348
|
children,
|
|
5249
5349
|
...props
|
|
5250
5350
|
}, ref) => {
|
|
5351
|
+
const pressed = pressedProp ?? false;
|
|
5251
5352
|
const removable = variant === "removable";
|
|
5252
5353
|
if (removable) {
|
|
5253
5354
|
const {
|
|
@@ -5270,16 +5371,7 @@ var Chip = React27.forwardRef(
|
|
|
5270
5371
|
...spanProps,
|
|
5271
5372
|
children: [
|
|
5272
5373
|
/* @__PURE__ */ jsx30("span", { children }),
|
|
5273
|
-
count !== void 0 ? /* @__PURE__ */ jsx30(
|
|
5274
|
-
"span",
|
|
5275
|
-
{
|
|
5276
|
-
"aria-hidden": "true",
|
|
5277
|
-
"data-slot": "chip-count",
|
|
5278
|
-
"data-count-tone": tone,
|
|
5279
|
-
className: chipCountVariants({ tone, size }),
|
|
5280
|
-
children: count
|
|
5281
|
-
}
|
|
5282
|
-
) : null,
|
|
5374
|
+
count !== void 0 ? /* @__PURE__ */ jsx30(ChipCount, { count, tone, size }) : null,
|
|
5283
5375
|
/* @__PURE__ */ jsx30(
|
|
5284
5376
|
"button",
|
|
5285
5377
|
{
|
|
@@ -5297,6 +5389,32 @@ var Chip = React27.forwardRef(
|
|
|
5297
5389
|
}
|
|
5298
5390
|
);
|
|
5299
5391
|
}
|
|
5392
|
+
if (variant === "status-filter" && !asChild && props.onClick === void 0 && pressedProp === void 0) {
|
|
5393
|
+
const {
|
|
5394
|
+
disabled: _disabled,
|
|
5395
|
+
type: _type,
|
|
5396
|
+
autoFocus: _af,
|
|
5397
|
+
form: _form,
|
|
5398
|
+
name: _name,
|
|
5399
|
+
value: _value,
|
|
5400
|
+
...spanProps
|
|
5401
|
+
} = props;
|
|
5402
|
+
return /* @__PURE__ */ jsxs26(
|
|
5403
|
+
"span",
|
|
5404
|
+
{
|
|
5405
|
+
ref,
|
|
5406
|
+
"data-slot": "chip",
|
|
5407
|
+
"data-variant": variant,
|
|
5408
|
+
"data-tone": tone,
|
|
5409
|
+
className: cn(chipVariants({ variant, tone, size, pressed, className })),
|
|
5410
|
+
...spanProps,
|
|
5411
|
+
children: [
|
|
5412
|
+
children,
|
|
5413
|
+
count !== void 0 ? /* @__PURE__ */ jsx30(ChipCount, { count, tone, size }) : null
|
|
5414
|
+
]
|
|
5415
|
+
}
|
|
5416
|
+
);
|
|
5417
|
+
}
|
|
5300
5418
|
const Comp = asChild ? Slot2.Root : "button";
|
|
5301
5419
|
return /* @__PURE__ */ jsxs26(
|
|
5302
5420
|
Comp,
|
|
@@ -5313,16 +5431,7 @@ var Chip = React27.forwardRef(
|
|
|
5313
5431
|
...props,
|
|
5314
5432
|
children: [
|
|
5315
5433
|
children,
|
|
5316
|
-
count !== void 0 ? /* @__PURE__ */ jsx30(
|
|
5317
|
-
"span",
|
|
5318
|
-
{
|
|
5319
|
-
"aria-hidden": "true",
|
|
5320
|
-
"data-slot": "chip-count",
|
|
5321
|
-
"data-count-tone": tone,
|
|
5322
|
-
className: chipCountVariants({ tone, size }),
|
|
5323
|
-
children: count
|
|
5324
|
-
}
|
|
5325
|
-
) : null
|
|
5434
|
+
count !== void 0 ? /* @__PURE__ */ jsx30(ChipCount, { count, tone, size }) : null
|
|
5326
5435
|
]
|
|
5327
5436
|
}
|
|
5328
5437
|
);
|
|
@@ -5331,7 +5440,7 @@ var Chip = React27.forwardRef(
|
|
|
5331
5440
|
Chip.displayName = "Chip";
|
|
5332
5441
|
|
|
5333
5442
|
// src/components/ui/popover.tsx
|
|
5334
|
-
import * as
|
|
5443
|
+
import * as React30 from "react";
|
|
5335
5444
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
5336
5445
|
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5337
5446
|
function Popover({ modal = false, ...props }) {
|
|
@@ -5341,7 +5450,7 @@ var popoverArrowClassName = "fill-[var(--bg-surface)] stroke-[var(--border)] [&>
|
|
|
5341
5450
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
5342
5451
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
5343
5452
|
var PopoverClose = PopoverPrimitive.Close;
|
|
5344
|
-
var PopoverContent =
|
|
5453
|
+
var PopoverContent = React30.forwardRef(({ className, align = "center", sideOffset = 8, collisionPadding = 8, showArrow = false, children, ...props }, ref) => /* @__PURE__ */ jsx31(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs27(
|
|
5345
5454
|
PopoverPrimitive.Content,
|
|
5346
5455
|
{
|
|
5347
5456
|
ref,
|
|
@@ -5364,7 +5473,7 @@ var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffs
|
|
|
5364
5473
|
),
|
|
5365
5474
|
...props,
|
|
5366
5475
|
children: [
|
|
5367
|
-
children,
|
|
5476
|
+
/* @__PURE__ */ jsx31(FormFieldBoundary, { children }),
|
|
5368
5477
|
showArrow ? /* @__PURE__ */ jsx31(
|
|
5369
5478
|
PopoverPrimitive.Arrow,
|
|
5370
5479
|
{
|
|
@@ -5378,7 +5487,7 @@ var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffs
|
|
|
5378
5487
|
}
|
|
5379
5488
|
) }));
|
|
5380
5489
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
5381
|
-
var PopoverArrow =
|
|
5490
|
+
var PopoverArrow = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
5382
5491
|
PopoverPrimitive.Arrow,
|
|
5383
5492
|
{
|
|
5384
5493
|
ref,
|
|
@@ -5392,7 +5501,7 @@ var PopoverArrow = React28.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
5392
5501
|
PopoverArrow.displayName = PopoverPrimitive.Arrow.displayName;
|
|
5393
5502
|
|
|
5394
5503
|
// src/components/ui/filter-toolbar.tsx
|
|
5395
|
-
import { Fragment as
|
|
5504
|
+
import { Fragment as Fragment12, jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5396
5505
|
var collapsibleClassNames = {
|
|
5397
5506
|
sm: {
|
|
5398
5507
|
inline: "hidden @[640px]:flex",
|
|
@@ -5411,7 +5520,7 @@ var collapsibleClassNames = {
|
|
|
5411
5520
|
trigger: "hidden"
|
|
5412
5521
|
}
|
|
5413
5522
|
};
|
|
5414
|
-
var FilterToolbar =
|
|
5523
|
+
var FilterToolbar = React31.forwardRef(
|
|
5415
5524
|
({
|
|
5416
5525
|
className,
|
|
5417
5526
|
search,
|
|
@@ -5426,15 +5535,15 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5426
5535
|
actions,
|
|
5427
5536
|
...props
|
|
5428
5537
|
}, ref) => {
|
|
5429
|
-
const [rootElement, setRootElement] =
|
|
5538
|
+
const [rootElement, setRootElement] = React31.useState(
|
|
5430
5539
|
null
|
|
5431
5540
|
);
|
|
5432
|
-
const [containerWidth, setContainerWidth] =
|
|
5541
|
+
const [containerWidth, setContainerWidth] = React31.useState(
|
|
5433
5542
|
null
|
|
5434
5543
|
);
|
|
5435
|
-
const [overlayOpen, setOverlayOpen] =
|
|
5436
|
-
const triggerRef =
|
|
5437
|
-
const setRootRefs =
|
|
5544
|
+
const [overlayOpen, setOverlayOpen] = React31.useState(false);
|
|
5545
|
+
const triggerRef = React31.useRef(null);
|
|
5546
|
+
const setRootRefs = React31.useCallback(
|
|
5438
5547
|
(element) => {
|
|
5439
5548
|
setRootElement(element);
|
|
5440
5549
|
if (typeof ref === "function") ref(element);
|
|
@@ -5442,7 +5551,7 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5442
5551
|
},
|
|
5443
5552
|
[ref]
|
|
5444
5553
|
);
|
|
5445
|
-
|
|
5554
|
+
React31.useEffect(() => {
|
|
5446
5555
|
if (!rootElement) return;
|
|
5447
5556
|
const updateWidth = () => {
|
|
5448
5557
|
setContainerWidth(rootElement.getBoundingClientRect().width);
|
|
@@ -5453,12 +5562,14 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5453
5562
|
observer.observe(rootElement);
|
|
5454
5563
|
return () => observer.disconnect();
|
|
5455
5564
|
}, [rootElement]);
|
|
5456
|
-
const handleOverlayOpenChange =
|
|
5565
|
+
const handleOverlayOpenChange = React31.useCallback((open) => {
|
|
5457
5566
|
setOverlayOpen(open);
|
|
5458
5567
|
if (!open) queueMicrotask(() => triggerRef.current?.focus());
|
|
5459
5568
|
}, []);
|
|
5460
|
-
const hasMeta = Boolean(resultSummary || clearAction || actions);
|
|
5461
5569
|
const hasControls = Boolean(search || filters || collapsible);
|
|
5570
|
+
const hasMeta = Boolean(
|
|
5571
|
+
resultSummary || clearAction || actions && !hasControls
|
|
5572
|
+
);
|
|
5462
5573
|
const hasAppliedFilters = activeFilterCount > 0;
|
|
5463
5574
|
const usesSheet = containerWidth !== null && containerWidth < 640;
|
|
5464
5575
|
const collapseClasses = collapsibleClassNames[collapseBelow];
|
|
@@ -5521,6 +5632,7 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5521
5632
|
"div",
|
|
5522
5633
|
{
|
|
5523
5634
|
ref: setRootRefs,
|
|
5635
|
+
role: "group",
|
|
5524
5636
|
"data-slot": "filter-toolbar",
|
|
5525
5637
|
className: cn(
|
|
5526
5638
|
"@container flex w-full flex-col gap-[var(--space-2)] text-foreground",
|
|
@@ -5538,7 +5650,7 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5538
5650
|
"div",
|
|
5539
5651
|
{
|
|
5540
5652
|
"data-slot": "filter-toolbar-search",
|
|
5541
|
-
className: "order-1 min-w-
|
|
5653
|
+
className: "order-1 min-w-[min(160px,100%)] max-w-full flex-[1_1_0%] @[640px]:min-w-0 @[640px]:flex-[1_1_280px]",
|
|
5542
5654
|
children: search
|
|
5543
5655
|
}
|
|
5544
5656
|
) : null,
|
|
@@ -5579,6 +5691,14 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5579
5691
|
),
|
|
5580
5692
|
children: collapsible
|
|
5581
5693
|
}
|
|
5694
|
+
) : null,
|
|
5695
|
+
actions ? /* @__PURE__ */ jsx32(
|
|
5696
|
+
"div",
|
|
5697
|
+
{
|
|
5698
|
+
"data-slot": "filter-toolbar-actions",
|
|
5699
|
+
className: "order-6 ml-auto flex shrink-0 flex-wrap items-center gap-[var(--space-2)]",
|
|
5700
|
+
children: actions
|
|
5701
|
+
}
|
|
5582
5702
|
) : null
|
|
5583
5703
|
]
|
|
5584
5704
|
}
|
|
@@ -5604,7 +5724,7 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5604
5724
|
activeFilterCount,
|
|
5605
5725
|
"\uAC1C \uC801\uC6A9"
|
|
5606
5726
|
] }),
|
|
5607
|
-
onClearFilters ? /* @__PURE__ */ jsxs28(
|
|
5727
|
+
onClearFilters ? /* @__PURE__ */ jsxs28(Fragment12, { children: [
|
|
5608
5728
|
/* @__PURE__ */ jsx32("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
5609
5729
|
/* @__PURE__ */ jsx32(
|
|
5610
5730
|
"button",
|
|
@@ -5634,7 +5754,7 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5634
5754
|
}
|
|
5635
5755
|
) : null,
|
|
5636
5756
|
clearAction ? /* @__PURE__ */ jsx32("div", { "data-slot": "filter-toolbar-clear", className: "shrink-0", children: clearAction }) : null,
|
|
5637
|
-
actions ? /* @__PURE__ */ jsx32(
|
|
5757
|
+
actions && !hasControls ? /* @__PURE__ */ jsx32(
|
|
5638
5758
|
"div",
|
|
5639
5759
|
{
|
|
5640
5760
|
"data-slot": "filter-toolbar-actions",
|
|
@@ -5653,12 +5773,12 @@ var FilterToolbar = React29.forwardRef(
|
|
|
5653
5773
|
FilterToolbar.displayName = "FilterToolbar";
|
|
5654
5774
|
|
|
5655
5775
|
// src/components/ui/data-table.tsx
|
|
5656
|
-
import * as
|
|
5776
|
+
import * as React35 from "react";
|
|
5657
5777
|
import { ChevronDown as ChevronDown5, ChevronRight as ChevronRight3, ChevronUp as ChevronUp2, ChevronsUpDown, EllipsisVertical } from "lucide-react";
|
|
5658
5778
|
import { cva as cva13 } from "class-variance-authority";
|
|
5659
5779
|
|
|
5660
5780
|
// src/components/ui/action-menu.tsx
|
|
5661
|
-
import * as
|
|
5781
|
+
import * as React32 from "react";
|
|
5662
5782
|
import { Dialog as DialogPrimitive4, Slot as Slot3 } from "radix-ui";
|
|
5663
5783
|
|
|
5664
5784
|
// src/components/ui/dropdown-menu.tsx
|
|
@@ -5673,7 +5793,7 @@ function DropdownMenu({
|
|
|
5673
5793
|
function DropdownMenuPortal({
|
|
5674
5794
|
...props
|
|
5675
5795
|
}) {
|
|
5676
|
-
return /* @__PURE__ */ jsx33(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
5796
|
+
return /* @__PURE__ */ jsx33(FormFieldBoundary, { children: /* @__PURE__ */ jsx33(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }) });
|
|
5677
5797
|
}
|
|
5678
5798
|
function DropdownMenuTrigger({
|
|
5679
5799
|
...props
|
|
@@ -5691,7 +5811,7 @@ function DropdownMenuContent({
|
|
|
5691
5811
|
sideOffset = 4,
|
|
5692
5812
|
...props
|
|
5693
5813
|
}) {
|
|
5694
|
-
return /* @__PURE__ */ jsx33(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx33(
|
|
5814
|
+
return /* @__PURE__ */ jsx33(FormFieldBoundary, { children: /* @__PURE__ */ jsx33(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx33(
|
|
5695
5815
|
DropdownMenuPrimitive.Content,
|
|
5696
5816
|
{
|
|
5697
5817
|
"data-slot": "dropdown-menu-content",
|
|
@@ -5709,7 +5829,7 @@ function DropdownMenuContent({
|
|
|
5709
5829
|
),
|
|
5710
5830
|
...props
|
|
5711
5831
|
}
|
|
5712
|
-
) });
|
|
5832
|
+
) }) });
|
|
5713
5833
|
}
|
|
5714
5834
|
function DropdownMenuGroup({
|
|
5715
5835
|
...props
|
|
@@ -5892,7 +6012,7 @@ function DropdownMenuSubContent({
|
|
|
5892
6012
|
className,
|
|
5893
6013
|
...props
|
|
5894
6014
|
}) {
|
|
5895
|
-
return /* @__PURE__ */ jsx33(
|
|
6015
|
+
return /* @__PURE__ */ jsx33(FormFieldBoundary, { children: /* @__PURE__ */ jsx33(
|
|
5896
6016
|
DropdownMenuPrimitive.SubContent,
|
|
5897
6017
|
{
|
|
5898
6018
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -5908,11 +6028,11 @@ function DropdownMenuSubContent({
|
|
|
5908
6028
|
),
|
|
5909
6029
|
...props
|
|
5910
6030
|
}
|
|
5911
|
-
);
|
|
6031
|
+
) });
|
|
5912
6032
|
}
|
|
5913
6033
|
|
|
5914
6034
|
// src/components/ui/action-menu.tsx
|
|
5915
|
-
import { Fragment as
|
|
6035
|
+
import { Fragment as Fragment14, jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5916
6036
|
var sheetRowClassName = cn(
|
|
5917
6037
|
"group flex min-h-12 w-full cursor-pointer items-center gap-[var(--space-3)] px-[var(--space-4)] py-[var(--space-2)] text-left",
|
|
5918
6038
|
"border-t border-[var(--border-subtle)] text-[13px] font-medium leading-normal text-text-primary",
|
|
@@ -5934,9 +6054,9 @@ function ActionMenuSheet({
|
|
|
5934
6054
|
onOpenAutoFocus,
|
|
5935
6055
|
onCloseAutoFocus
|
|
5936
6056
|
}) {
|
|
5937
|
-
const pendingRef =
|
|
5938
|
-
const surfaceRef =
|
|
5939
|
-
const labelId =
|
|
6057
|
+
const pendingRef = React32.useRef(null);
|
|
6058
|
+
const surfaceRef = React32.useRef(null);
|
|
6059
|
+
const labelId = React32.useId();
|
|
5940
6060
|
const handleOpenChange = (nextOpen) => {
|
|
5941
6061
|
pendingRef.current = null;
|
|
5942
6062
|
onOpenChange(nextOpen);
|
|
@@ -5964,7 +6084,7 @@ function ActionMenuSheet({
|
|
|
5964
6084
|
pendingRef.current = null;
|
|
5965
6085
|
item?.onSelect();
|
|
5966
6086
|
};
|
|
5967
|
-
return /* @__PURE__ */ jsx34(DialogPrimitive4.Root, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs30(DialogPrimitive4.Portal, { children: [
|
|
6087
|
+
return /* @__PURE__ */ jsx34(DialogPrimitive4.Root, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx34(FormFieldBoundary, { children: /* @__PURE__ */ jsxs30(DialogPrimitive4.Portal, { children: [
|
|
5968
6088
|
/* @__PURE__ */ jsx34(OverlayScrimLayer, { kind: "menu" }),
|
|
5969
6089
|
/* @__PURE__ */ jsxs30(
|
|
5970
6090
|
DialogPrimitive4.Content,
|
|
@@ -5987,7 +6107,7 @@ function ActionMenuSheet({
|
|
|
5987
6107
|
dragHandleProps: swipe.handleProps
|
|
5988
6108
|
}
|
|
5989
6109
|
),
|
|
5990
|
-
/* @__PURE__ */ jsx34(OverlayBody, { kind: "menu", children: groups.map((group, index) => /* @__PURE__ */ jsxs30(
|
|
6110
|
+
/* @__PURE__ */ jsx34(OverlayBody, { kind: "menu", children: groups.map((group, index) => /* @__PURE__ */ jsxs30(React32.Fragment, { children: [
|
|
5991
6111
|
index > 0 ? /* @__PURE__ */ jsx34("div", { role: "separator", className: sheetGroupSeparatorClassName }) : null,
|
|
5992
6112
|
/* @__PURE__ */ jsxs30("div", { role: "group", "aria-labelledby": group.label ? `${labelId}-${index}` : void 0, children: [
|
|
5993
6113
|
group.label ? /* @__PURE__ */ jsx34("div", { id: `${labelId}-${index}`, className: sheetGroupLabelClassName, children: group.label }) : null,
|
|
@@ -6018,11 +6138,11 @@ function ActionMenuSheet({
|
|
|
6018
6138
|
]
|
|
6019
6139
|
}
|
|
6020
6140
|
)
|
|
6021
|
-
] }) });
|
|
6141
|
+
] }) }) });
|
|
6022
6142
|
}
|
|
6023
6143
|
var readPresentation = () => window.matchMedia?.(OVERLAY_DESKTOP_QUERY).matches ?? true ? "dropdown" : "sheet";
|
|
6024
6144
|
var subscribeNothing = () => () => void 0;
|
|
6025
|
-
var useHydrated = () =>
|
|
6145
|
+
var useHydrated = () => React32.useSyncExternalStore(
|
|
6026
6146
|
subscribeNothing,
|
|
6027
6147
|
() => true,
|
|
6028
6148
|
() => false
|
|
@@ -6037,10 +6157,10 @@ function ActionMenu({
|
|
|
6037
6157
|
items,
|
|
6038
6158
|
groups
|
|
6039
6159
|
}) {
|
|
6040
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
6160
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React32.useState(false);
|
|
6041
6161
|
const hydrated = useHydrated();
|
|
6042
6162
|
const open = (openProp ?? uncontrolledOpen) && hydrated;
|
|
6043
|
-
const [shown, setShown] =
|
|
6163
|
+
const [shown, setShown] = React32.useState({
|
|
6044
6164
|
open: false,
|
|
6045
6165
|
presentation: "dropdown"
|
|
6046
6166
|
});
|
|
@@ -6049,8 +6169,8 @@ function ActionMenu({
|
|
|
6049
6169
|
if (open) presentation = readPresentation();
|
|
6050
6170
|
setShown({ open, presentation });
|
|
6051
6171
|
}
|
|
6052
|
-
const triggerRef =
|
|
6053
|
-
const pendingRef =
|
|
6172
|
+
const triggerRef = React32.useRef(null);
|
|
6173
|
+
const pendingRef = React32.useRef(null);
|
|
6054
6174
|
const setOpen = (nextOpen) => {
|
|
6055
6175
|
if (nextOpen) pendingRef.current = null;
|
|
6056
6176
|
if (openProp === void 0) setUncontrolledOpen(nextOpen);
|
|
@@ -6070,10 +6190,10 @@ function ActionMenu({
|
|
|
6070
6190
|
triggerRef.current?.focus();
|
|
6071
6191
|
};
|
|
6072
6192
|
const triggerLabel = trigger.props["aria-label"];
|
|
6073
|
-
return /* @__PURE__ */ jsxs30(
|
|
6193
|
+
return /* @__PURE__ */ jsxs30(Fragment14, { children: [
|
|
6074
6194
|
/* @__PURE__ */ jsxs30(DropdownMenu, { open: open && presentation === "dropdown", onOpenChange: setOpen, children: [
|
|
6075
6195
|
/* @__PURE__ */ jsx34(DropdownMenuTrigger, { asChild: true, "aria-expanded": open, children: /* @__PURE__ */ jsx34(Slot3.Root, { ref: triggerRef, children: trigger }) }),
|
|
6076
|
-
/* @__PURE__ */ jsx34(DropdownMenuContent, { align: "end", onCloseAutoFocus: handleDropdownCloseAutoFocus, children: menuGroups.map((group, index) => /* @__PURE__ */ jsxs30(
|
|
6196
|
+
/* @__PURE__ */ jsx34(DropdownMenuContent, { align: "end", onCloseAutoFocus: handleDropdownCloseAutoFocus, children: menuGroups.map((group, index) => /* @__PURE__ */ jsxs30(React32.Fragment, { children: [
|
|
6077
6197
|
index > 0 ? /* @__PURE__ */ jsx34(DropdownMenuSeparator, {}) : null,
|
|
6078
6198
|
/* @__PURE__ */ jsxs30(DropdownMenuGroup, { children: [
|
|
6079
6199
|
group.label ? /* @__PURE__ */ jsx34(DropdownMenuLabel, { children: group.label }) : null,
|
|
@@ -6114,7 +6234,7 @@ function ActionMenu({
|
|
|
6114
6234
|
}
|
|
6115
6235
|
|
|
6116
6236
|
// src/components/ui/checkbox.tsx
|
|
6117
|
-
import * as
|
|
6237
|
+
import * as React33 from "react";
|
|
6118
6238
|
import { cva as cva12 } from "class-variance-authority";
|
|
6119
6239
|
import { Check as Check3, Minus } from "lucide-react";
|
|
6120
6240
|
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
@@ -6221,11 +6341,11 @@ var checkboxGroupBoxVariants = cva12(
|
|
|
6221
6341
|
}
|
|
6222
6342
|
}
|
|
6223
6343
|
);
|
|
6224
|
-
var CheckboxGroupContext =
|
|
6344
|
+
var CheckboxGroupContext = React33.createContext(null);
|
|
6225
6345
|
function getLabel(children, label) {
|
|
6226
6346
|
return children ?? label;
|
|
6227
6347
|
}
|
|
6228
|
-
var Checkbox =
|
|
6348
|
+
var Checkbox = React33.forwardRef(
|
|
6229
6349
|
({
|
|
6230
6350
|
className,
|
|
6231
6351
|
size = "md",
|
|
@@ -6241,21 +6361,29 @@ var Checkbox = React31.forwardRef(
|
|
|
6241
6361
|
checked,
|
|
6242
6362
|
disabled,
|
|
6243
6363
|
onCheckedChange,
|
|
6364
|
+
"aria-describedby": ariaDescribedBy,
|
|
6244
6365
|
...props
|
|
6245
6366
|
}, ref) => {
|
|
6246
|
-
const group =
|
|
6247
|
-
const
|
|
6248
|
-
const
|
|
6367
|
+
const group = React33.useContext(CheckboxGroupContext);
|
|
6368
|
+
const field = useFormFieldControl();
|
|
6369
|
+
const generatedId = React33.useId();
|
|
6249
6370
|
const labelContent = getLabel(children, label);
|
|
6250
6371
|
const isGrouped = Boolean(group && value != null);
|
|
6251
6372
|
const valueString = value == null ? void 0 : String(value);
|
|
6252
6373
|
const resolvedChecked = isGrouped && valueString ? group?.selectedValues.has(valueString) : checked;
|
|
6253
6374
|
const resolvedDisabled = disabled || group?.disabled;
|
|
6254
6375
|
const resolvedName = name ?? group?.name;
|
|
6376
|
+
const fieldControl = isGrouped ? null : field;
|
|
6377
|
+
const checkboxId = fieldControl ? generatedId : id ?? generatedId;
|
|
6255
6378
|
const labelId = `${checkboxId}-label`;
|
|
6256
6379
|
const descriptionId = description && !error ? `${checkboxId}-description` : void 0;
|
|
6257
6380
|
const errorId = error ? `${checkboxId}-error` : void 0;
|
|
6258
|
-
const
|
|
6381
|
+
const elementId = id ?? fieldControl?.controlId ?? generatedId;
|
|
6382
|
+
const describedBy = joinIds(
|
|
6383
|
+
ariaDescribedBy,
|
|
6384
|
+
errorId ?? descriptionId,
|
|
6385
|
+
fieldControl?.describedBy
|
|
6386
|
+
);
|
|
6259
6387
|
const handleCheckedChange = (nextChecked) => {
|
|
6260
6388
|
onCheckedChange?.(nextChecked);
|
|
6261
6389
|
if (isGrouped && valueString) {
|
|
@@ -6269,7 +6397,7 @@ var Checkbox = React31.forwardRef(
|
|
|
6269
6397
|
CheckboxPrimitive.Root,
|
|
6270
6398
|
{
|
|
6271
6399
|
ref,
|
|
6272
|
-
id:
|
|
6400
|
+
id: elementId,
|
|
6273
6401
|
"data-slot": "checkbox",
|
|
6274
6402
|
"aria-labelledby": labelId,
|
|
6275
6403
|
"aria-describedby": describedBy,
|
|
@@ -6281,6 +6409,8 @@ var Checkbox = React31.forwardRef(
|
|
|
6281
6409
|
disabled: resolvedDisabled,
|
|
6282
6410
|
className: cn(
|
|
6283
6411
|
checkboxGroupItemVariants({ appearance, density }),
|
|
6412
|
+
// plain rows sit side by side only at content width; w-full would wrap each one.
|
|
6413
|
+
appearance === "plain" && group?.orientation === "horizontal" && "w-auto",
|
|
6284
6414
|
className
|
|
6285
6415
|
),
|
|
6286
6416
|
onCheckedChange: handleCheckedChange,
|
|
@@ -6366,7 +6496,7 @@ var Checkbox = React31.forwardRef(
|
|
|
6366
6496
|
CheckboxPrimitive.Root,
|
|
6367
6497
|
{
|
|
6368
6498
|
ref,
|
|
6369
|
-
id:
|
|
6499
|
+
id: elementId,
|
|
6370
6500
|
"data-slot": "checkbox",
|
|
6371
6501
|
"aria-describedby": describedBy,
|
|
6372
6502
|
"aria-required": required || void 0,
|
|
@@ -6400,7 +6530,7 @@ var Checkbox = React31.forwardRef(
|
|
|
6400
6530
|
"label",
|
|
6401
6531
|
{
|
|
6402
6532
|
id: labelId,
|
|
6403
|
-
htmlFor:
|
|
6533
|
+
htmlFor: elementId,
|
|
6404
6534
|
"data-slot": "checkbox-label",
|
|
6405
6535
|
className: labelClassName,
|
|
6406
6536
|
children: [
|
|
@@ -6478,11 +6608,11 @@ function ContextMenu({
|
|
|
6478
6608
|
}
|
|
6479
6609
|
|
|
6480
6610
|
// src/components/ui/list-card.tsx
|
|
6481
|
-
import * as
|
|
6611
|
+
import * as React34 from "react";
|
|
6482
6612
|
import { ChevronRight as ChevronRight2, MoreVertical } from "lucide-react";
|
|
6483
|
-
import { Fragment as
|
|
6613
|
+
import { Fragment as Fragment15, jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6484
6614
|
function lineTokens(value) {
|
|
6485
|
-
return
|
|
6615
|
+
return React34.Children.toArray(value).filter((token) => token !== "");
|
|
6486
6616
|
}
|
|
6487
6617
|
function MetaLine({
|
|
6488
6618
|
tokens,
|
|
@@ -6564,10 +6694,10 @@ function ListCard({
|
|
|
6564
6694
|
"data-slot": `${slot}-title`,
|
|
6565
6695
|
className: titleClassName,
|
|
6566
6696
|
title: typeof title === "string" || typeof title === "number" ? String(title) : void 0,
|
|
6567
|
-
children: overlay && href != null ?
|
|
6697
|
+
children: overlay && href != null ? React34.createElement(linkComponent ?? "a", { ...linkProps, href, className: overlayClassName }, title) : title
|
|
6568
6698
|
}
|
|
6569
6699
|
);
|
|
6570
|
-
const content = /* @__PURE__ */ jsxs33(
|
|
6700
|
+
const content = /* @__PURE__ */ jsxs33(Fragment15, { children: [
|
|
6571
6701
|
leading != null ? /* @__PURE__ */ jsx37("span", { className: "flex min-h-[18px] items-center", children: leading }) : null,
|
|
6572
6702
|
/* @__PURE__ */ jsxs33("span", { className: "min-w-0", children: [
|
|
6573
6703
|
overlay && href == null ? (
|
|
@@ -6632,7 +6762,7 @@ function ListCard({
|
|
|
6632
6762
|
}
|
|
6633
6763
|
|
|
6634
6764
|
// src/components/ui/data-table.tsx
|
|
6635
|
-
import { Fragment as
|
|
6765
|
+
import { Fragment as Fragment17, jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6636
6766
|
var dataTableVariants = cva13(
|
|
6637
6767
|
[
|
|
6638
6768
|
"relative overflow-hidden rounded-[var(--radius-md)] border border-[var(--border-subtle)]",
|
|
@@ -6760,15 +6890,15 @@ function RowContextMenu({
|
|
|
6760
6890
|
groups,
|
|
6761
6891
|
onClose
|
|
6762
6892
|
}) {
|
|
6763
|
-
const [open, setOpen] =
|
|
6764
|
-
const pendingRef =
|
|
6765
|
-
const outsideRef =
|
|
6766
|
-
const shownGroups =
|
|
6893
|
+
const [open, setOpen] = React35.useState(false);
|
|
6894
|
+
const pendingRef = React35.useRef(null);
|
|
6895
|
+
const outsideRef = React35.useRef(false);
|
|
6896
|
+
const shownGroups = React35.useRef([]);
|
|
6767
6897
|
if (groups) shownGroups.current = groups;
|
|
6768
6898
|
const gone = openKey !== null && groups === null;
|
|
6769
|
-
const contentRef =
|
|
6770
|
-
const focusInsideRef =
|
|
6771
|
-
|
|
6899
|
+
const contentRef = React35.useRef(null);
|
|
6900
|
+
const focusInsideRef = React35.useRef(false);
|
|
6901
|
+
React35.useEffect(() => {
|
|
6772
6902
|
pendingRef.current = null;
|
|
6773
6903
|
outsideRef.current = false;
|
|
6774
6904
|
focusInsideRef.current = false;
|
|
@@ -6782,7 +6912,7 @@ function RowContextMenu({
|
|
|
6782
6912
|
const next = content.querySelector('[role="menuitem"]:not([data-disabled])') ?? content;
|
|
6783
6913
|
next.focus();
|
|
6784
6914
|
});
|
|
6785
|
-
|
|
6915
|
+
React35.useEffect(() => {
|
|
6786
6916
|
if (gone) setOpen(false);
|
|
6787
6917
|
}, [gone]);
|
|
6788
6918
|
return /* @__PURE__ */ jsx38(
|
|
@@ -6812,7 +6942,7 @@ function RowContextMenu({
|
|
|
6812
6942
|
onClose(item, outsideRef.current);
|
|
6813
6943
|
}
|
|
6814
6944
|
},
|
|
6815
|
-
children: shownGroups.current.map((group, index) => /* @__PURE__ */ jsxs34(
|
|
6945
|
+
children: shownGroups.current.map((group, index) => /* @__PURE__ */ jsxs34(React35.Fragment, { children: [
|
|
6816
6946
|
index > 0 ? /* @__PURE__ */ jsx38(DropdownMenuSeparator, {}) : null,
|
|
6817
6947
|
/* @__PURE__ */ jsxs34(DropdownMenuGroup, { children: [
|
|
6818
6948
|
group.label ? /* @__PURE__ */ jsx38(DropdownMenuLabel, { children: group.label }) : null,
|
|
@@ -6847,12 +6977,18 @@ function getRenderedCell(row, column) {
|
|
|
6847
6977
|
if (value === null || value === void 0) {
|
|
6848
6978
|
return null;
|
|
6849
6979
|
}
|
|
6850
|
-
if (
|
|
6980
|
+
if (React35.isValidElement(value)) {
|
|
6851
6981
|
return value;
|
|
6852
6982
|
}
|
|
6853
6983
|
return String(value);
|
|
6854
6984
|
}
|
|
6855
|
-
function getNextSort(current, key) {
|
|
6985
|
+
function getNextSort(current, key, defaultSort) {
|
|
6986
|
+
if (defaultSort?.key === key) {
|
|
6987
|
+
if (current?.key === key && current.dir === defaultSort.dir) {
|
|
6988
|
+
return defaultSort.dir === "asc" ? "desc" : "asc";
|
|
6989
|
+
}
|
|
6990
|
+
return defaultSort.dir;
|
|
6991
|
+
}
|
|
6856
6992
|
if (current?.key !== key) {
|
|
6857
6993
|
return "asc";
|
|
6858
6994
|
}
|
|
@@ -6894,6 +7030,7 @@ function SortIcon({ sort, columnKey }) {
|
|
|
6894
7030
|
function MobileSortMenu({
|
|
6895
7031
|
columns,
|
|
6896
7032
|
sortBy,
|
|
7033
|
+
defaultSort,
|
|
6897
7034
|
onSortChange
|
|
6898
7035
|
}) {
|
|
6899
7036
|
const active = sortBy ? columns.find((column) => column.key === sortBy.key) : void 0;
|
|
@@ -6907,7 +7044,7 @@ function MobileSortMenu({
|
|
|
6907
7044
|
size: "sm",
|
|
6908
7045
|
className: "ml-auto min-w-0",
|
|
6909
7046
|
children: [
|
|
6910
|
-
active && sortBy ? /* @__PURE__ */ jsxs34(
|
|
7047
|
+
active && sortBy ? /* @__PURE__ */ jsxs34(Fragment17, { children: [
|
|
6911
7048
|
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "\uC815\uB82C " }),
|
|
6912
7049
|
/* @__PURE__ */ jsx38("span", { className: "truncate", children: active.header }),
|
|
6913
7050
|
/* @__PURE__ */ jsxs34("span", { className: "sr-only", children: [
|
|
@@ -6923,7 +7060,7 @@ function MobileSortMenu({
|
|
|
6923
7060
|
DropdownMenuRadioItem,
|
|
6924
7061
|
{
|
|
6925
7062
|
value: column.key,
|
|
6926
|
-
onSelect: () => onSortChange?.(column.key, getNextSort(sortBy, column.key)),
|
|
7063
|
+
onSelect: () => onSortChange?.(column.key, getNextSort(sortBy, column.key, defaultSort)),
|
|
6927
7064
|
children: [
|
|
6928
7065
|
/* @__PURE__ */ jsx38("span", { className: "truncate", children: column.header }),
|
|
6929
7066
|
column.key === active?.key ? /* @__PURE__ */ jsx38("span", { className: "ml-auto pl-[var(--space-4)]", children: /* @__PURE__ */ jsx38(SortIcon, { sort: sortBy, columnKey: column.key }) }) : null
|
|
@@ -6936,6 +7073,7 @@ function MobileSortMenu({
|
|
|
6936
7073
|
function MobileToolbar({
|
|
6937
7074
|
columns,
|
|
6938
7075
|
sortBy,
|
|
7076
|
+
defaultSort,
|
|
6939
7077
|
onSortChange,
|
|
6940
7078
|
selectable,
|
|
6941
7079
|
selectAllChecked,
|
|
@@ -6953,7 +7091,15 @@ function MobileToolbar({
|
|
|
6953
7091
|
className: "flex min-w-0 items-center gap-[var(--space-2)] px-[var(--space-4)] py-[var(--space-2)]",
|
|
6954
7092
|
children: [
|
|
6955
7093
|
selectable ? /* @__PURE__ */ jsx38(SelectAllCheckbox, { checked: selectAllChecked, disabled: selectAllDisabled, onToggleAll }) : null,
|
|
6956
|
-
sortableColumns.length > 0 ? /* @__PURE__ */ jsx38(
|
|
7094
|
+
sortableColumns.length > 0 ? /* @__PURE__ */ jsx38(
|
|
7095
|
+
MobileSortMenu,
|
|
7096
|
+
{
|
|
7097
|
+
columns: sortableColumns,
|
|
7098
|
+
sortBy,
|
|
7099
|
+
defaultSort,
|
|
7100
|
+
onSortChange
|
|
7101
|
+
}
|
|
7102
|
+
) : null
|
|
6957
7103
|
]
|
|
6958
7104
|
}
|
|
6959
7105
|
);
|
|
@@ -7060,7 +7206,7 @@ var expandedPanelClass = cn(
|
|
|
7060
7206
|
);
|
|
7061
7207
|
var expandChevronClass = "motion-safe:transition-transform motion-safe:duration-[var(--dur-base)] motion-safe:ease-[var(--ease-standard)]";
|
|
7062
7208
|
function useOpenedOnce(expanded) {
|
|
7063
|
-
const [opened, setOpened] =
|
|
7209
|
+
const [opened, setOpened] = React35.useState(expanded);
|
|
7064
7210
|
if (expanded && !opened) {
|
|
7065
7211
|
setOpened(true);
|
|
7066
7212
|
}
|
|
@@ -7171,7 +7317,7 @@ function DataTableRowView({
|
|
|
7171
7317
|
if (!expand) {
|
|
7172
7318
|
return dataRow;
|
|
7173
7319
|
}
|
|
7174
|
-
return /* @__PURE__ */ jsxs34(
|
|
7320
|
+
return /* @__PURE__ */ jsxs34(Fragment17, { children: [
|
|
7175
7321
|
dataRow,
|
|
7176
7322
|
/* @__PURE__ */ jsx38(
|
|
7177
7323
|
"div",
|
|
@@ -7317,9 +7463,9 @@ function DataTableMobileCardView({
|
|
|
7317
7463
|
}
|
|
7318
7464
|
);
|
|
7319
7465
|
}
|
|
7320
|
-
var MemoDataTableRow =
|
|
7321
|
-
var MemoDataTableMobileCard =
|
|
7322
|
-
var useIsomorphicLayoutEffect = typeof window === "undefined" ?
|
|
7466
|
+
var MemoDataTableRow = React35.memo(DataTableRowView);
|
|
7467
|
+
var MemoDataTableMobileCard = React35.memo(DataTableMobileCardView);
|
|
7468
|
+
var useIsomorphicLayoutEffect = typeof window === "undefined" ? React35.useEffect : React35.useLayoutEffect;
|
|
7323
7469
|
var VIRTUAL_DEFAULT_OVERSCAN = 8;
|
|
7324
7470
|
var VIRTUAL_INITIAL_ROWS = 24;
|
|
7325
7471
|
var VIRTUAL_FALLBACK_SIZE = { desktop: 48, mobile: 120 };
|
|
@@ -7399,7 +7545,7 @@ function useVirtualWindow({
|
|
|
7399
7545
|
mobileListRef
|
|
7400
7546
|
}) {
|
|
7401
7547
|
const count = rowIds.length;
|
|
7402
|
-
const [win, setWin] =
|
|
7548
|
+
const [win, setWin] = React35.useState({
|
|
7403
7549
|
layout: null,
|
|
7404
7550
|
start: 0,
|
|
7405
7551
|
end: VIRTUAL_INITIAL_ROWS,
|
|
@@ -7407,12 +7553,12 @@ function useVirtualWindow({
|
|
|
7407
7553
|
padTop: 0,
|
|
7408
7554
|
padBottom: 0
|
|
7409
7555
|
});
|
|
7410
|
-
const desktopSize =
|
|
7411
|
-
const cardHeights =
|
|
7556
|
+
const desktopSize = React35.useRef(0);
|
|
7557
|
+
const cardHeights = React35.useRef(null);
|
|
7412
7558
|
cardHeights.current ??= new CardHeights();
|
|
7413
|
-
const update =
|
|
7414
|
-
const reported =
|
|
7415
|
-
const latest =
|
|
7559
|
+
const update = React35.useRef(() => void 0);
|
|
7560
|
+
const reported = React35.useRef("");
|
|
7561
|
+
const latest = React35.useRef({
|
|
7416
7562
|
count,
|
|
7417
7563
|
layout: "desktop",
|
|
7418
7564
|
extent: uniformExtent(VIRTUAL_FALLBACK_SIZE.desktop)
|
|
@@ -7475,7 +7621,7 @@ function useVirtualWindow({
|
|
|
7475
7621
|
useIsomorphicLayoutEffect(() => {
|
|
7476
7622
|
update.current();
|
|
7477
7623
|
});
|
|
7478
|
-
|
|
7624
|
+
React35.useEffect(() => {
|
|
7479
7625
|
if (!enabled) {
|
|
7480
7626
|
return;
|
|
7481
7627
|
}
|
|
@@ -7497,7 +7643,7 @@ function useVirtualWindow({
|
|
|
7497
7643
|
window.cancelAnimationFrame(frame);
|
|
7498
7644
|
};
|
|
7499
7645
|
}, [enabled]);
|
|
7500
|
-
const scrollToIndex =
|
|
7646
|
+
const scrollToIndex = React35.useCallback(
|
|
7501
7647
|
(index) => {
|
|
7502
7648
|
const { count: rowCount, layout, extent } = latest.current;
|
|
7503
7649
|
const list = (layout === "desktop" ? desktopListRef : mobileListRef).current;
|
|
@@ -7530,7 +7676,7 @@ function useVisibleLayout({
|
|
|
7530
7676
|
desktopRef,
|
|
7531
7677
|
mobileRef
|
|
7532
7678
|
}) {
|
|
7533
|
-
const [layout, setLayout] =
|
|
7679
|
+
const [layout, setLayout] = React35.useState(null);
|
|
7534
7680
|
useIsomorphicLayoutEffect(() => {
|
|
7535
7681
|
if (!enabled) {
|
|
7536
7682
|
return;
|
|
@@ -7567,9 +7713,9 @@ function useLayoutFocusHandoff({
|
|
|
7567
7713
|
layout,
|
|
7568
7714
|
containers
|
|
7569
7715
|
}) {
|
|
7570
|
-
const lastFocus =
|
|
7571
|
-
const previousLayout =
|
|
7572
|
-
|
|
7716
|
+
const lastFocus = React35.useRef(null);
|
|
7717
|
+
const previousLayout = React35.useRef(layout);
|
|
7718
|
+
React35.useEffect(() => {
|
|
7573
7719
|
const root = rootRef.current;
|
|
7574
7720
|
if (!root) {
|
|
7575
7721
|
return;
|
|
@@ -7646,7 +7792,8 @@ function DataTableInner({
|
|
|
7646
7792
|
announceSelection = true,
|
|
7647
7793
|
activeRowId,
|
|
7648
7794
|
onRowContextMenu,
|
|
7649
|
-
sortBy,
|
|
7795
|
+
sortBy: sortByProp,
|
|
7796
|
+
defaultSort,
|
|
7650
7797
|
onSortChange,
|
|
7651
7798
|
loading = false,
|
|
7652
7799
|
emptyState,
|
|
@@ -7665,18 +7812,19 @@ function DataTableInner({
|
|
|
7665
7812
|
"aria-label": ariaLabel = "\uB370\uC774\uD130 \uD14C\uC774\uBE14",
|
|
7666
7813
|
...props
|
|
7667
7814
|
}, ref) {
|
|
7815
|
+
const sortBy = sortByProp ?? defaultSort;
|
|
7668
7816
|
const virtualOptions = virtual ? virtual === true ? {} : virtual : null;
|
|
7669
7817
|
const isVirtual = virtualOptions !== null;
|
|
7670
7818
|
if (isVirtual && columns.some((column) => column.wrap)) {
|
|
7671
7819
|
warnWrapVirtualOnce();
|
|
7672
7820
|
}
|
|
7673
|
-
const rootRef =
|
|
7674
|
-
const desktopRef =
|
|
7675
|
-
const headerRef =
|
|
7676
|
-
const desktopListRef =
|
|
7677
|
-
const mobileRef =
|
|
7678
|
-
const mobileListRef =
|
|
7679
|
-
const setRootRef =
|
|
7821
|
+
const rootRef = React35.useRef(null);
|
|
7822
|
+
const desktopRef = React35.useRef(null);
|
|
7823
|
+
const headerRef = React35.useRef(null);
|
|
7824
|
+
const desktopListRef = React35.useRef(null);
|
|
7825
|
+
const mobileRef = React35.useRef(null);
|
|
7826
|
+
const mobileListRef = React35.useRef(null);
|
|
7827
|
+
const setRootRef = React35.useCallback(
|
|
7680
7828
|
(node) => {
|
|
7681
7829
|
rootRef.current = node;
|
|
7682
7830
|
if (typeof ref === "function") ref(node);
|
|
@@ -7695,7 +7843,7 @@ function DataTableInner({
|
|
|
7695
7843
|
desktopListRef,
|
|
7696
7844
|
mobileListRef
|
|
7697
7845
|
});
|
|
7698
|
-
|
|
7846
|
+
React35.useImperativeHandle(virtualOptions?.handleRef, () => ({ scrollToIndex }), [scrollToIndex]);
|
|
7699
7847
|
const visibleLayout = useVisibleLayout({ enabled: !isVirtual, desktopRef, mobileRef });
|
|
7700
7848
|
const activeLayout = isVirtual ? virtualWindow.layout : visibleLayout;
|
|
7701
7849
|
useLayoutFocusHandoff({
|
|
@@ -7719,8 +7867,8 @@ function DataTableInner({
|
|
|
7719
7867
|
const expandable = renderExpanded != null;
|
|
7720
7868
|
const hasRowActions = rowActions != null;
|
|
7721
7869
|
const gridTemplateColumns = getGridTemplate(columns, selectable, expandable, hasRowActions);
|
|
7722
|
-
const panelIdBase =
|
|
7723
|
-
const [ownExpandedIds, setOwnExpandedIds] =
|
|
7870
|
+
const panelIdBase = React35.useId();
|
|
7871
|
+
const [ownExpandedIds, setOwnExpandedIds] = React35.useState(() => /* @__PURE__ */ new Set());
|
|
7724
7872
|
const resolvedExpandedIds = expandedIds ?? ownExpandedIds;
|
|
7725
7873
|
const toggleExpanded = (id) => {
|
|
7726
7874
|
const nextIds = new Set(resolvedExpandedIds);
|
|
@@ -7766,8 +7914,8 @@ function DataTableInner({
|
|
|
7766
7914
|
window.location.assign(href);
|
|
7767
7915
|
}
|
|
7768
7916
|
};
|
|
7769
|
-
const [contextMenu, setContextMenu] =
|
|
7770
|
-
const contextMenuKey =
|
|
7917
|
+
const [contextMenu, setContextMenu] = React35.useState(null);
|
|
7918
|
+
const contextMenuKey = React35.useRef(0);
|
|
7771
7919
|
const contextRow = contextMenu ? data.find((item) => getRowId(item, keyField) === contextMenu.rowId) : void 0;
|
|
7772
7920
|
const contextActions = contextRow && rowActions ? rowActions(contextRow) : [];
|
|
7773
7921
|
const contextGroups = countActions(contextActions) > 0 ? toActionGroups(contextActions) : null;
|
|
@@ -7801,23 +7949,23 @@ function DataTableInner({
|
|
|
7801
7949
|
item?.onSelect();
|
|
7802
7950
|
};
|
|
7803
7951
|
const handleRowContextMenu = rowActions ? openRowContextMenu : onRowContextMenu;
|
|
7804
|
-
const latestHandlers =
|
|
7952
|
+
const latestHandlers = React35.useRef({ toggleRow, activateRow, onRowContextMenu, handleRowContextMenu });
|
|
7805
7953
|
useIsomorphicLayoutEffect(() => {
|
|
7806
7954
|
latestHandlers.current = { toggleRow, activateRow, onRowContextMenu, handleRowContextMenu };
|
|
7807
7955
|
});
|
|
7808
|
-
const stableToggleRow =
|
|
7956
|
+
const stableToggleRow = React35.useCallback(
|
|
7809
7957
|
(id, checked) => latestHandlers.current.toggleRow(id, checked),
|
|
7810
7958
|
[]
|
|
7811
7959
|
);
|
|
7812
|
-
const stableActivateRow =
|
|
7960
|
+
const stableActivateRow = React35.useCallback(
|
|
7813
7961
|
(row, href, event) => latestHandlers.current.activateRow(row, href, event),
|
|
7814
7962
|
[]
|
|
7815
7963
|
);
|
|
7816
|
-
const stableRowContextMenu =
|
|
7964
|
+
const stableRowContextMenu = React35.useCallback(
|
|
7817
7965
|
(rowId, event) => latestHandlers.current.onRowContextMenu?.(rowId, event),
|
|
7818
7966
|
[]
|
|
7819
7967
|
);
|
|
7820
|
-
const stableHandleRowContextMenu =
|
|
7968
|
+
const stableHandleRowContextMenu = React35.useCallback(
|
|
7821
7969
|
(rowId, event) => latestHandlers.current.handleRowContextMenu?.(rowId, event),
|
|
7822
7970
|
[]
|
|
7823
7971
|
);
|
|
@@ -7937,7 +8085,7 @@ function DataTableInner({
|
|
|
7937
8085
|
selectable ? /* @__PURE__ */ jsx38("div", { role: "columnheader", className: "px-[var(--space-4)]", children: /* @__PURE__ */ jsx38(SelectAllCheckbox, { checked: selectAllChecked, disabled: selectAllDisabled, onToggleAll: toggleAllRows }) }) : null,
|
|
7938
8086
|
columns.map((column) => {
|
|
7939
8087
|
const align = column.align ?? "left";
|
|
7940
|
-
const nextSort = getNextSort(sortBy, column.key);
|
|
8088
|
+
const nextSort = getNextSort(sortBy, column.key, defaultSort);
|
|
7941
8089
|
const ariaSort = sortBy?.key === column.key ? sortBy.dir === "asc" ? "ascending" : "descending" : void 0;
|
|
7942
8090
|
return /* @__PURE__ */ jsx38(
|
|
7943
8091
|
"div",
|
|
@@ -8015,6 +8163,7 @@ function DataTableInner({
|
|
|
8015
8163
|
{
|
|
8016
8164
|
columns,
|
|
8017
8165
|
sortBy,
|
|
8166
|
+
defaultSort,
|
|
8018
8167
|
onSortChange,
|
|
8019
8168
|
selectable,
|
|
8020
8169
|
selectAllChecked,
|
|
@@ -8062,11 +8211,11 @@ function DataTableInner({
|
|
|
8062
8211
|
}
|
|
8063
8212
|
);
|
|
8064
8213
|
}
|
|
8065
|
-
var DataTable =
|
|
8214
|
+
var DataTable = React35.forwardRef(DataTableInner);
|
|
8066
8215
|
DataTable.displayName = "DataTable";
|
|
8067
8216
|
|
|
8068
8217
|
// src/components/ui/bulk-action-bar.tsx
|
|
8069
|
-
import * as
|
|
8218
|
+
import * as React36 from "react";
|
|
8070
8219
|
import { X as X4 } from "lucide-react";
|
|
8071
8220
|
import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
8072
8221
|
function ActionButton({ action }) {
|
|
@@ -8207,10 +8356,18 @@ var idleLineStyle = {
|
|
|
8207
8356
|
fontVariantNumeric: "tabular-nums",
|
|
8208
8357
|
color: "var(--text-secondary)"
|
|
8209
8358
|
};
|
|
8210
|
-
var
|
|
8359
|
+
var warnedInline = false;
|
|
8360
|
+
function warnInlineOnce() {
|
|
8361
|
+
if (warnedInline || typeof process === "undefined" || process.env.NODE_ENV === "production") {
|
|
8362
|
+
return;
|
|
8363
|
+
}
|
|
8364
|
+
warnedInline = true;
|
|
8365
|
+
console.warn('BulkActionBar: placement="inline" is deprecated and removed in the next minor. Use "floating".');
|
|
8366
|
+
}
|
|
8367
|
+
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React36.useEffect : React36.useLayoutEffect;
|
|
8211
8368
|
function useCompactSummary(slot, enabled) {
|
|
8212
|
-
const [fullWidth, setFullWidth] =
|
|
8213
|
-
const measure =
|
|
8369
|
+
const [fullWidth, setFullWidth] = React36.useState(null);
|
|
8370
|
+
const measure = React36.useCallback(() => {
|
|
8214
8371
|
if (!slot) return;
|
|
8215
8372
|
setFullWidth((prev) => {
|
|
8216
8373
|
if (prev === null) return slot.scrollWidth > slot.clientWidth ? slot.scrollWidth : null;
|
|
@@ -8220,7 +8377,7 @@ function useCompactSummary(slot, enabled) {
|
|
|
8220
8377
|
useIsomorphicLayoutEffect2(() => {
|
|
8221
8378
|
if (enabled) measure();
|
|
8222
8379
|
});
|
|
8223
|
-
|
|
8380
|
+
React36.useEffect(() => {
|
|
8224
8381
|
if (!enabled || !slot || typeof ResizeObserver === "undefined") return;
|
|
8225
8382
|
const observer = new ResizeObserver(measure);
|
|
8226
8383
|
observer.observe(slot);
|
|
@@ -8244,6 +8401,7 @@ function BulkActionBar({
|
|
|
8244
8401
|
...props
|
|
8245
8402
|
}) {
|
|
8246
8403
|
const inline = placement === "inline";
|
|
8404
|
+
if (inline) warnInlineOnce();
|
|
8247
8405
|
const trailingSlot = trailing !== void 0 && trailing !== null ? /* @__PURE__ */ jsx39(
|
|
8248
8406
|
"div",
|
|
8249
8407
|
{
|
|
@@ -8257,7 +8415,7 @@ function BulkActionBar({
|
|
|
8257
8415
|
children: trailing
|
|
8258
8416
|
}
|
|
8259
8417
|
) : null;
|
|
8260
|
-
const [summaryElement, setSummaryElement] =
|
|
8418
|
+
const [summaryElement, setSummaryElement] = React36.useState(null);
|
|
8261
8419
|
const compact = useCompactSummary(
|
|
8262
8420
|
summaryElement,
|
|
8263
8421
|
inline && compactSummary !== void 0 && compactSummary !== null
|
|
@@ -8717,7 +8875,7 @@ function ActionSheet({
|
|
|
8717
8875
|
}
|
|
8718
8876
|
|
|
8719
8877
|
// src/components/ui/badge.tsx
|
|
8720
|
-
import * as
|
|
8878
|
+
import * as React37 from "react";
|
|
8721
8879
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
8722
8880
|
var TONE = {
|
|
8723
8881
|
neutral: "bg-[var(--fill-on-bg,var(--semantic-neutral-bg))] text-[var(--semantic-neutral-fg)]",
|
|
@@ -8727,7 +8885,7 @@ var TONE = {
|
|
|
8727
8885
|
error: "bg-[var(--semantic-error-bg)] text-[var(--semantic-error-fg)]",
|
|
8728
8886
|
brand: "bg-[var(--accent-bg-strong)] text-[var(--accent)]"
|
|
8729
8887
|
};
|
|
8730
|
-
var Badge =
|
|
8888
|
+
var Badge = React37.forwardRef(
|
|
8731
8889
|
({ tone = "neutral", className, children, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
8732
8890
|
"span",
|
|
8733
8891
|
{
|
|
@@ -8748,7 +8906,7 @@ var Badge = React35.forwardRef(
|
|
|
8748
8906
|
Badge.displayName = "Badge";
|
|
8749
8907
|
|
|
8750
8908
|
// src/components/ui/two-tier-badge.tsx
|
|
8751
|
-
import * as
|
|
8909
|
+
import * as React38 from "react";
|
|
8752
8910
|
import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8753
8911
|
var FG = {
|
|
8754
8912
|
neutral: "var(--text-secondary)",
|
|
@@ -8771,7 +8929,7 @@ var SEGMENT = {
|
|
|
8771
8929
|
md: "gap-[7px] py-[var(--space-1)] px-[var(--space-3)] text-[14px]"
|
|
8772
8930
|
};
|
|
8773
8931
|
var DOT = { xs: 5, sm: 6, md: 7 };
|
|
8774
|
-
var TwoTierBadge =
|
|
8932
|
+
var TwoTierBadge = React38.forwardRef(
|
|
8775
8933
|
({ primary, secondary, tone = "neutral", emphasis = "subtle", size = "sm", showDot = false, className, style, ...props }, ref) => {
|
|
8776
8934
|
const strong = emphasis === "strong";
|
|
8777
8935
|
const fg = FG[tone];
|
|
@@ -8841,7 +8999,7 @@ var TwoTierBadge = React36.forwardRef(
|
|
|
8841
8999
|
TwoTierBadge.displayName = "TwoTierBadge";
|
|
8842
9000
|
|
|
8843
9001
|
// src/components/ui/status-badge.tsx
|
|
8844
|
-
import * as
|
|
9002
|
+
import * as React39 from "react";
|
|
8845
9003
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
8846
9004
|
var ROLE = {
|
|
8847
9005
|
error: "error",
|
|
@@ -8852,13 +9010,13 @@ var ROLE = {
|
|
|
8852
9010
|
success: "success",
|
|
8853
9011
|
archived: "neutral"
|
|
8854
9012
|
};
|
|
8855
|
-
var StatusBadge =
|
|
9013
|
+
var StatusBadge = React39.forwardRef(
|
|
8856
9014
|
({ status = "active", emphasis: _emphasis, size: _size, showDot: _showDot, pulse: _pulse, ...props }, ref) => /* @__PURE__ */ jsx47(Badge, { ref, tone: ROLE[status], ...props })
|
|
8857
9015
|
);
|
|
8858
9016
|
StatusBadge.displayName = "StatusBadge";
|
|
8859
9017
|
|
|
8860
9018
|
// src/components/ui/status-dot.tsx
|
|
8861
|
-
import * as
|
|
9019
|
+
import * as React40 from "react";
|
|
8862
9020
|
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8863
9021
|
var DOT2 = {
|
|
8864
9022
|
neutral: "bg-[var(--semantic-neutral-fg)]",
|
|
@@ -8867,7 +9025,7 @@ var DOT2 = {
|
|
|
8867
9025
|
warning: "bg-[var(--semantic-warning-fg)]",
|
|
8868
9026
|
error: "bg-[var(--semantic-error-fg)]"
|
|
8869
9027
|
};
|
|
8870
|
-
var StatusDot =
|
|
9028
|
+
var StatusDot = React40.forwardRef(
|
|
8871
9029
|
({ tone, label, pulse = false, className, ...props }, ref) => /* @__PURE__ */ jsxs38(
|
|
8872
9030
|
"span",
|
|
8873
9031
|
{
|
|
@@ -8901,9 +9059,9 @@ var StatusDot = React38.forwardRef(
|
|
|
8901
9059
|
StatusDot.displayName = "StatusDot";
|
|
8902
9060
|
|
|
8903
9061
|
// src/components/ui/notification-badge.tsx
|
|
8904
|
-
import * as
|
|
9062
|
+
import * as React41 from "react";
|
|
8905
9063
|
import { cva as cva14 } from "class-variance-authority";
|
|
8906
|
-
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
9064
|
+
import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8907
9065
|
var notificationBadgeVariants = cva14(
|
|
8908
9066
|
[
|
|
8909
9067
|
"inline-flex shrink-0 items-center justify-center rounded-[var(--radius-full)]",
|
|
@@ -8934,7 +9092,7 @@ function formatNotificationCount(count, max) {
|
|
|
8934
9092
|
}
|
|
8935
9093
|
return String(count);
|
|
8936
9094
|
}
|
|
8937
|
-
var NotificationBadge =
|
|
9095
|
+
var NotificationBadge = React41.forwardRef(
|
|
8938
9096
|
({
|
|
8939
9097
|
className,
|
|
8940
9098
|
count,
|
|
@@ -8949,17 +9107,19 @@ var NotificationBadge = React39.forwardRef(
|
|
|
8949
9107
|
}
|
|
8950
9108
|
const normalizedMax = Math.max(1, Math.floor(max));
|
|
8951
9109
|
const label = ariaLabel ?? (count > normalizedMax ? `\uC77D\uC9C0 \uC54A\uC740 \uC54C\uB9BC ${normalizedMax}\uAC1C \uC774\uC0C1` : `\uC77D\uC9C0 \uC54A\uC740 \uC54C\uB9BC ${count}\uAC1C`);
|
|
8952
|
-
return /* @__PURE__ */
|
|
9110
|
+
return /* @__PURE__ */ jsxs39(
|
|
8953
9111
|
"span",
|
|
8954
9112
|
{
|
|
8955
9113
|
ref,
|
|
8956
9114
|
"data-slot": "notification-badge",
|
|
8957
9115
|
"data-size": size,
|
|
8958
9116
|
"data-placement": placement,
|
|
8959
|
-
"aria-label": label,
|
|
8960
9117
|
className: cn(notificationBadgeVariants({ size, placement, className })),
|
|
8961
9118
|
...props,
|
|
8962
|
-
children:
|
|
9119
|
+
children: [
|
|
9120
|
+
/* @__PURE__ */ jsx49("span", { "aria-hidden": "true", children: formatNotificationCount(count, normalizedMax) }),
|
|
9121
|
+
/* @__PURE__ */ jsx49("span", { className: "sr-only", children: label })
|
|
9122
|
+
]
|
|
8963
9123
|
}
|
|
8964
9124
|
);
|
|
8965
9125
|
}
|
|
@@ -8967,9 +9127,9 @@ var NotificationBadge = React39.forwardRef(
|
|
|
8967
9127
|
NotificationBadge.displayName = "NotificationBadge";
|
|
8968
9128
|
|
|
8969
9129
|
// src/components/ui/empty-state.tsx
|
|
8970
|
-
import * as
|
|
9130
|
+
import * as React42 from "react";
|
|
8971
9131
|
import { cva as cva15 } from "class-variance-authority";
|
|
8972
|
-
import { jsx as jsx50, jsxs as
|
|
9132
|
+
import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8973
9133
|
var emptyStateBaseVariants = cva15(
|
|
8974
9134
|
[
|
|
8975
9135
|
"flex flex-col items-center justify-center text-center",
|
|
@@ -8995,7 +9155,7 @@ var emptyStateBaseVariants = cva15(
|
|
|
8995
9155
|
}
|
|
8996
9156
|
);
|
|
8997
9157
|
var PAGE_FILL_QUERY = "(min-width: 768px)";
|
|
8998
|
-
var useIsomorphicLayoutEffect3 = typeof window === "undefined" ?
|
|
9158
|
+
var useIsomorphicLayoutEffect3 = typeof window === "undefined" ? React42.useEffect : React42.useLayoutEffect;
|
|
8999
9159
|
function findScrollParent(node) {
|
|
9000
9160
|
for (let el = node.parentElement; el && el !== document.body && el !== document.documentElement; el = el.parentElement) {
|
|
9001
9161
|
const { overflowY } = getComputedStyle(el);
|
|
@@ -9107,7 +9267,7 @@ var iconSize2 = {
|
|
|
9107
9267
|
md: 20,
|
|
9108
9268
|
lg: 24
|
|
9109
9269
|
};
|
|
9110
|
-
var EmptyState =
|
|
9270
|
+
var EmptyState = React42.forwardRef(
|
|
9111
9271
|
({
|
|
9112
9272
|
className,
|
|
9113
9273
|
size = "md",
|
|
@@ -9123,9 +9283,9 @@ var EmptyState = React40.forwardRef(
|
|
|
9123
9283
|
...props
|
|
9124
9284
|
}, ref) => {
|
|
9125
9285
|
const resolvedSize = size ?? "md";
|
|
9126
|
-
const pageRef =
|
|
9286
|
+
const pageRef = React42.useRef(null);
|
|
9127
9287
|
usePageFill(pageRef, layout === "page");
|
|
9128
|
-
const box = /* @__PURE__ */
|
|
9288
|
+
const box = /* @__PURE__ */ jsxs40(
|
|
9129
9289
|
"div",
|
|
9130
9290
|
{
|
|
9131
9291
|
ref,
|
|
@@ -9143,7 +9303,7 @@ var EmptyState = React40.forwardRef(
|
|
|
9143
9303
|
children: /* @__PURE__ */ jsx50(Icon, { size: iconSize2[resolvedSize], strokeWidth: 1.75 })
|
|
9144
9304
|
}
|
|
9145
9305
|
) : null,
|
|
9146
|
-
/* @__PURE__ */
|
|
9306
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex max-w-[420px] flex-col items-center gap-[var(--space-2)]", children: [
|
|
9147
9307
|
/* @__PURE__ */ jsx50(
|
|
9148
9308
|
"h2",
|
|
9149
9309
|
{
|
|
@@ -9189,10 +9349,10 @@ var EmptyState = React40.forwardRef(
|
|
|
9189
9349
|
EmptyState.displayName = "EmptyState";
|
|
9190
9350
|
|
|
9191
9351
|
// src/components/ui/error-state.tsx
|
|
9192
|
-
import * as
|
|
9352
|
+
import * as React43 from "react";
|
|
9193
9353
|
import { AlertTriangle } from "lucide-react";
|
|
9194
9354
|
import { cva as cva16 } from "class-variance-authority";
|
|
9195
|
-
import { jsx as jsx51, jsxs as
|
|
9355
|
+
import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9196
9356
|
var errorStateVariants = cva16(
|
|
9197
9357
|
[
|
|
9198
9358
|
"flex flex-col items-center justify-center text-center",
|
|
@@ -9214,7 +9374,7 @@ var errorStateVariants = cva16(
|
|
|
9214
9374
|
}
|
|
9215
9375
|
}
|
|
9216
9376
|
);
|
|
9217
|
-
var ErrorState =
|
|
9377
|
+
var ErrorState = React43.forwardRef(
|
|
9218
9378
|
({
|
|
9219
9379
|
className,
|
|
9220
9380
|
size = "md",
|
|
@@ -9225,7 +9385,7 @@ var ErrorState = React41.forwardRef(
|
|
|
9225
9385
|
onRetry,
|
|
9226
9386
|
retryLabel = "\uB2E4\uC2DC \uC2DC\uB3C4",
|
|
9227
9387
|
...props
|
|
9228
|
-
}, ref) => /* @__PURE__ */
|
|
9388
|
+
}, ref) => /* @__PURE__ */ jsxs41(
|
|
9229
9389
|
"div",
|
|
9230
9390
|
{
|
|
9231
9391
|
ref,
|
|
@@ -9243,7 +9403,7 @@ var ErrorState = React41.forwardRef(
|
|
|
9243
9403
|
children: /* @__PURE__ */ jsx51(AlertTriangle, { size: 24, strokeWidth: 1.75 })
|
|
9244
9404
|
}
|
|
9245
9405
|
),
|
|
9246
|
-
/* @__PURE__ */
|
|
9406
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex max-w-[420px] flex-col items-center gap-[var(--space-2)]", children: [
|
|
9247
9407
|
/* @__PURE__ */ jsx51(
|
|
9248
9408
|
"h2",
|
|
9249
9409
|
{
|
|
@@ -9277,7 +9437,7 @@ var ErrorState = React41.forwardRef(
|
|
|
9277
9437
|
ErrorState.displayName = "ErrorState";
|
|
9278
9438
|
|
|
9279
9439
|
// src/components/ui/skeleton.tsx
|
|
9280
|
-
import * as
|
|
9440
|
+
import * as React44 from "react";
|
|
9281
9441
|
import { cva as cva17 } from "class-variance-authority";
|
|
9282
9442
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
9283
9443
|
var skeletonVariants = cva17(
|
|
@@ -9323,7 +9483,7 @@ var spinnerVariants = cva17(
|
|
|
9323
9483
|
}
|
|
9324
9484
|
}
|
|
9325
9485
|
);
|
|
9326
|
-
var Skeleton =
|
|
9486
|
+
var Skeleton = React44.forwardRef(
|
|
9327
9487
|
({ className, shape, style, ...props }, ref) => /* @__PURE__ */ jsx52(
|
|
9328
9488
|
"div",
|
|
9329
9489
|
{
|
|
@@ -9337,7 +9497,7 @@ var Skeleton = React42.forwardRef(
|
|
|
9337
9497
|
);
|
|
9338
9498
|
Skeleton.displayName = "Skeleton";
|
|
9339
9499
|
var defaultTextWidths = ["92%", "84%", "68%", "76%"];
|
|
9340
|
-
var SkeletonText =
|
|
9500
|
+
var SkeletonText = React44.forwardRef(
|
|
9341
9501
|
({ className, lines = 3, widths = defaultTextWidths, ...props }, ref) => /* @__PURE__ */ jsx52(
|
|
9342
9502
|
"div",
|
|
9343
9503
|
{
|
|
@@ -9357,7 +9517,7 @@ var SkeletonText = React42.forwardRef(
|
|
|
9357
9517
|
)
|
|
9358
9518
|
);
|
|
9359
9519
|
SkeletonText.displayName = "SkeletonText";
|
|
9360
|
-
var SkeletonRow =
|
|
9520
|
+
var SkeletonRow = React44.forwardRef(
|
|
9361
9521
|
({
|
|
9362
9522
|
className,
|
|
9363
9523
|
columns,
|
|
@@ -9414,7 +9574,7 @@ var SkeletonRow = React42.forwardRef(
|
|
|
9414
9574
|
}
|
|
9415
9575
|
);
|
|
9416
9576
|
SkeletonRow.displayName = "SkeletonRow";
|
|
9417
|
-
var Spinner =
|
|
9577
|
+
var Spinner = React44.forwardRef(
|
|
9418
9578
|
({ className, size, label = "\uB85C\uB529 \uC911", ...props }, ref) => /* @__PURE__ */ jsx52(
|
|
9419
9579
|
"span",
|
|
9420
9580
|
{
|
|
@@ -9430,12 +9590,12 @@ var Spinner = React42.forwardRef(
|
|
|
9430
9590
|
Spinner.displayName = "Spinner";
|
|
9431
9591
|
|
|
9432
9592
|
// src/components/ui/pagination.tsx
|
|
9433
|
-
import * as
|
|
9593
|
+
import * as React45 from "react";
|
|
9434
9594
|
import { ChevronsLeft, ChevronLeft, ChevronRight as ChevronRight4, ChevronsRight } from "lucide-react";
|
|
9435
9595
|
import { cva as cva18 } from "class-variance-authority";
|
|
9436
9596
|
|
|
9437
9597
|
// src/components/ui/page-size-select.tsx
|
|
9438
|
-
import { jsx as jsx53, jsxs as
|
|
9598
|
+
import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9439
9599
|
var DEFAULT_OPTIONS = [10, 20, 50, 100];
|
|
9440
9600
|
function PageSizeSelect({
|
|
9441
9601
|
value,
|
|
@@ -9454,7 +9614,7 @@ function PageSizeSelect({
|
|
|
9454
9614
|
label: `${opt}${unit}`
|
|
9455
9615
|
}));
|
|
9456
9616
|
const selectSize = size === "compact" ? "sm" : "md";
|
|
9457
|
-
return /* @__PURE__ */
|
|
9617
|
+
return /* @__PURE__ */ jsxs42(
|
|
9458
9618
|
"div",
|
|
9459
9619
|
{
|
|
9460
9620
|
"data-slot": "page-size-select",
|
|
@@ -9486,7 +9646,7 @@ function PageSizeSelect({
|
|
|
9486
9646
|
}
|
|
9487
9647
|
|
|
9488
9648
|
// src/components/ui/pagination.tsx
|
|
9489
|
-
import { jsx as jsx54, jsxs as
|
|
9649
|
+
import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9490
9650
|
var paginationVariants = cva18(
|
|
9491
9651
|
[
|
|
9492
9652
|
"flex w-full flex-col gap-[var(--space-3)]",
|
|
@@ -9571,7 +9731,7 @@ function NavigationButton({
|
|
|
9571
9731
|
}
|
|
9572
9732
|
);
|
|
9573
9733
|
}
|
|
9574
|
-
var Pagination =
|
|
9734
|
+
var Pagination = React45.forwardRef(
|
|
9575
9735
|
({
|
|
9576
9736
|
className,
|
|
9577
9737
|
size = "standard",
|
|
@@ -9596,7 +9756,7 @@ var Pagination = React43.forwardRef(
|
|
|
9596
9756
|
const items = getPaginationItems(currentPage, pageCount);
|
|
9597
9757
|
const isFirstPage = currentPage === 1;
|
|
9598
9758
|
const isLastPage = currentPage === pageCount;
|
|
9599
|
-
return /* @__PURE__ */
|
|
9759
|
+
return /* @__PURE__ */ jsxs43(
|
|
9600
9760
|
"nav",
|
|
9601
9761
|
{
|
|
9602
9762
|
ref,
|
|
@@ -9606,7 +9766,7 @@ var Pagination = React43.forwardRef(
|
|
|
9606
9766
|
className: cn(paginationVariants({ size: resolvedSize, className })),
|
|
9607
9767
|
...props,
|
|
9608
9768
|
children: [
|
|
9609
|
-
/* @__PURE__ */
|
|
9769
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex flex-wrap items-center gap-[var(--space-3)]", children: [
|
|
9610
9770
|
/* @__PURE__ */ jsx54("span", { "data-slot": "pagination-total", className: "font-medium text-text-secondary", children: totalLabel(total) }),
|
|
9611
9771
|
showPageSize ? /* @__PURE__ */ jsx54("div", { "data-slot": "pagination-size", children: /* @__PURE__ */ jsx54(
|
|
9612
9772
|
PageSizeSelect,
|
|
@@ -9620,7 +9780,7 @@ var Pagination = React43.forwardRef(
|
|
|
9620
9780
|
}
|
|
9621
9781
|
) }) : null
|
|
9622
9782
|
] }),
|
|
9623
|
-
/* @__PURE__ */
|
|
9783
|
+
/* @__PURE__ */ jsxs43(
|
|
9624
9784
|
"div",
|
|
9625
9785
|
{
|
|
9626
9786
|
"data-slot": "pagination-list",
|
|
@@ -9709,7 +9869,7 @@ Pagination.displayName = "Pagination";
|
|
|
9709
9869
|
|
|
9710
9870
|
// src/components/ui/table-pagination.tsx
|
|
9711
9871
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight5 } from "lucide-react";
|
|
9712
|
-
import { jsx as jsx55, jsxs as
|
|
9872
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9713
9873
|
var TABLE_PAGE_SIZE_OPTIONS = [20, 50, 100];
|
|
9714
9874
|
function shouldHideTablePagination({
|
|
9715
9875
|
rangeEnd,
|
|
@@ -9739,7 +9899,7 @@ function TablePagination({
|
|
|
9739
9899
|
"aria-label": ariaLabel = "\uD398\uC774\uC9C0\uB124\uC774\uC158"
|
|
9740
9900
|
}) {
|
|
9741
9901
|
if (shouldHideTablePagination({ rangeEnd, total, hasPrev, hasNext, pageSizeOptions })) return null;
|
|
9742
|
-
return /* @__PURE__ */
|
|
9902
|
+
return /* @__PURE__ */ jsxs44(
|
|
9743
9903
|
"nav",
|
|
9744
9904
|
{
|
|
9745
9905
|
"data-slot": "table-pagination",
|
|
@@ -9756,16 +9916,16 @@ function TablePagination({
|
|
|
9756
9916
|
className: "shrink-0 max-lg:[&>span:first-child]:hidden"
|
|
9757
9917
|
}
|
|
9758
9918
|
),
|
|
9759
|
-
/* @__PURE__ */
|
|
9760
|
-
/* @__PURE__ */
|
|
9761
|
-
/* @__PURE__ */
|
|
9919
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 items-center gap-[var(--space-2)]", children: [
|
|
9920
|
+
/* @__PURE__ */ jsxs44("span", { "data-slot": "table-pagination-range", className: "whitespace-nowrap tabular-nums", children: [
|
|
9921
|
+
/* @__PURE__ */ jsxs44("span", { className: "font-medium text-text-primary", children: [
|
|
9762
9922
|
formatCount(rangeStart),
|
|
9763
9923
|
"\u2013",
|
|
9764
9924
|
formatCount(rangeEnd)
|
|
9765
9925
|
] }),
|
|
9766
9926
|
total !== void 0 ? /* @__PURE__ */ jsx55("span", { "data-slot": "table-pagination-total", className: "text-text-tertiary @max-[400px]:hidden", children: ` / \uCD1D ${formatCount(total)}${unit}` }) : null
|
|
9767
9927
|
] }),
|
|
9768
|
-
/* @__PURE__ */
|
|
9928
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex shrink-0 items-center gap-[var(--space-1)]", children: [
|
|
9769
9929
|
/* @__PURE__ */ jsx55(
|
|
9770
9930
|
IconButton,
|
|
9771
9931
|
{
|
|
@@ -9797,7 +9957,7 @@ function TablePagination({
|
|
|
9797
9957
|
|
|
9798
9958
|
// src/components/ui/mode-toggle.tsx
|
|
9799
9959
|
import { cva as cva19 } from "class-variance-authority";
|
|
9800
|
-
import { jsx as jsx56, jsxs as
|
|
9960
|
+
import { jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9801
9961
|
var modeToggleVariants = cva19(
|
|
9802
9962
|
[
|
|
9803
9963
|
"inline-flex items-center rounded-[var(--radius-md)] border border-[var(--border-subtle)]",
|
|
@@ -9826,19 +9986,24 @@ function ModeToggle({
|
|
|
9826
9986
|
options,
|
|
9827
9987
|
value,
|
|
9828
9988
|
onChange,
|
|
9989
|
+
"aria-labelledby": ariaLabelledBy,
|
|
9990
|
+
"aria-describedby": ariaDescribedBy,
|
|
9829
9991
|
...props
|
|
9830
9992
|
}) {
|
|
9993
|
+
const field = useFormFieldControl();
|
|
9831
9994
|
return /* @__PURE__ */ jsx56(
|
|
9832
9995
|
"div",
|
|
9833
9996
|
{
|
|
9834
9997
|
role: "group",
|
|
9998
|
+
"aria-labelledby": ariaLabelledBy ?? (props["aria-label"] ? void 0 : field?.labelId),
|
|
9999
|
+
"aria-describedby": joinIds(ariaDescribedBy, field?.describedBy),
|
|
9835
10000
|
"data-slot": "mode-toggle",
|
|
9836
10001
|
className: cn(modeToggleVariants(), className),
|
|
9837
10002
|
...props,
|
|
9838
|
-
children: options.map((option) => {
|
|
10003
|
+
children: /* @__PURE__ */ jsx56(FormFieldBoundary, { children: options.map((option) => {
|
|
9839
10004
|
const Icon = option.icon;
|
|
9840
10005
|
const isActive = option.value === value;
|
|
9841
|
-
return /* @__PURE__ */
|
|
10006
|
+
return /* @__PURE__ */ jsxs45(
|
|
9842
10007
|
"button",
|
|
9843
10008
|
{
|
|
9844
10009
|
type: "button",
|
|
@@ -9860,15 +10025,15 @@ function ModeToggle({
|
|
|
9860
10025
|
},
|
|
9861
10026
|
option.value
|
|
9862
10027
|
);
|
|
9863
|
-
})
|
|
10028
|
+
}) })
|
|
9864
10029
|
}
|
|
9865
10030
|
);
|
|
9866
10031
|
}
|
|
9867
10032
|
|
|
9868
10033
|
// src/components/ui/action-footer.tsx
|
|
9869
|
-
import * as
|
|
10034
|
+
import * as React46 from "react";
|
|
9870
10035
|
import { cva as cva20 } from "class-variance-authority";
|
|
9871
|
-
import { jsx as jsx57, jsxs as
|
|
10036
|
+
import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9872
10037
|
var actionFooterVariants = cva20(
|
|
9873
10038
|
[
|
|
9874
10039
|
// Below sm: two fixed rows — destructive actions (start) and status (end) on top, the main
|
|
@@ -9967,7 +10132,7 @@ function renderAction(action, className) {
|
|
|
9967
10132
|
}
|
|
9968
10133
|
return /* @__PURE__ */ jsx57(Button, { ...common, ...style, size: "lg", loading: action.loading, children: action.label }, key);
|
|
9969
10134
|
}
|
|
9970
|
-
var ActionFooter =
|
|
10135
|
+
var ActionFooter = React46.forwardRef(
|
|
9971
10136
|
({
|
|
9972
10137
|
className,
|
|
9973
10138
|
status,
|
|
@@ -9980,7 +10145,7 @@ var ActionFooter = React44.forwardRef(
|
|
|
9980
10145
|
const visibleActions = actions.filter((action) => canRenderAction(action, permissions));
|
|
9981
10146
|
const destructiveActions = visibleActions.filter(isDestructive);
|
|
9982
10147
|
const mainActions = sortMainActions(visibleActions.filter((action) => !isDestructive(action)));
|
|
9983
|
-
return /* @__PURE__ */
|
|
10148
|
+
return /* @__PURE__ */ jsxs46(
|
|
9984
10149
|
"div",
|
|
9985
10150
|
{
|
|
9986
10151
|
ref,
|
|
@@ -9997,7 +10162,7 @@ var ActionFooter = React44.forwardRef(
|
|
|
9997
10162
|
children: destructiveActions.map((action) => renderAction(action))
|
|
9998
10163
|
}
|
|
9999
10164
|
) : null,
|
|
10000
|
-
status ? /* @__PURE__ */
|
|
10165
|
+
status ? /* @__PURE__ */ jsxs46(
|
|
10001
10166
|
"div",
|
|
10002
10167
|
{
|
|
10003
10168
|
"data-slot": "action-footer-status",
|
|
@@ -10037,9 +10202,9 @@ var ActionFooter = React44.forwardRef(
|
|
|
10037
10202
|
ActionFooter.displayName = "ActionFooter";
|
|
10038
10203
|
|
|
10039
10204
|
// src/components/ui/toast.tsx
|
|
10040
|
-
import * as
|
|
10205
|
+
import * as React47 from "react";
|
|
10041
10206
|
import { cva as cva21 } from "class-variance-authority";
|
|
10042
|
-
import { jsx as jsx58, jsxs as
|
|
10207
|
+
import { jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
10043
10208
|
var DOT3 = {
|
|
10044
10209
|
default: "var(--neutral)",
|
|
10045
10210
|
success: "var(--success)",
|
|
@@ -10157,7 +10322,7 @@ var toast = {
|
|
|
10157
10322
|
}
|
|
10158
10323
|
};
|
|
10159
10324
|
var Toast = toast;
|
|
10160
|
-
var ToastRoot =
|
|
10325
|
+
var ToastRoot = React47.forwardRef(
|
|
10161
10326
|
({
|
|
10162
10327
|
className,
|
|
10163
10328
|
id,
|
|
@@ -10174,10 +10339,10 @@ var ToastRoot = React45.forwardRef(
|
|
|
10174
10339
|
...props
|
|
10175
10340
|
}, ref) => {
|
|
10176
10341
|
const durationMs = getToastDuration({ message, variant, duration });
|
|
10177
|
-
const onCloseRef =
|
|
10342
|
+
const onCloseRef = React47.useRef(onClose);
|
|
10178
10343
|
onCloseRef.current = onClose;
|
|
10179
|
-
const timerRef =
|
|
10180
|
-
|
|
10344
|
+
const timerRef = React47.useRef(null);
|
|
10345
|
+
React47.useEffect(() => {
|
|
10181
10346
|
if (!onCloseRef.current) return void 0;
|
|
10182
10347
|
const timer = createToastTimer(durationMs, () => onCloseRef.current?.());
|
|
10183
10348
|
timerRef.current = timer;
|
|
@@ -10186,7 +10351,7 @@ var ToastRoot = React45.forwardRef(
|
|
|
10186
10351
|
timerRef.current = null;
|
|
10187
10352
|
};
|
|
10188
10353
|
}, [durationMs]);
|
|
10189
|
-
return /* @__PURE__ */
|
|
10354
|
+
return /* @__PURE__ */ jsxs47(
|
|
10190
10355
|
"div",
|
|
10191
10356
|
{
|
|
10192
10357
|
ref,
|
|
@@ -10223,7 +10388,7 @@ var ToastRoot = React45.forwardRef(
|
|
|
10223
10388
|
style: { background: DOT3[variant] ?? DOT3.default }
|
|
10224
10389
|
}
|
|
10225
10390
|
),
|
|
10226
|
-
/* @__PURE__ */
|
|
10391
|
+
/* @__PURE__ */ jsxs47("div", { "data-slot": "toast-body", className: "min-w-0 flex-1", children: [
|
|
10227
10392
|
/* @__PURE__ */ jsx58(
|
|
10228
10393
|
"div",
|
|
10229
10394
|
{
|
|
@@ -10241,7 +10406,7 @@ var ToastRoot = React45.forwardRef(
|
|
|
10241
10406
|
}
|
|
10242
10407
|
) : null
|
|
10243
10408
|
] }),
|
|
10244
|
-
/* @__PURE__ */
|
|
10409
|
+
/* @__PURE__ */ jsxs47("div", { "data-slot": "toast-actions", className: "flex shrink-0 items-center gap-[2px]", children: [
|
|
10245
10410
|
action ? /* @__PURE__ */ jsx58(
|
|
10246
10411
|
Button,
|
|
10247
10412
|
{
|
|
@@ -10275,7 +10440,7 @@ var ToastRoot = React45.forwardRef(
|
|
|
10275
10440
|
}
|
|
10276
10441
|
);
|
|
10277
10442
|
ToastRoot.displayName = "ToastRoot";
|
|
10278
|
-
var ToastViewport =
|
|
10443
|
+
var ToastViewport = React47.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx58(
|
|
10279
10444
|
"ol",
|
|
10280
10445
|
{
|
|
10281
10446
|
ref,
|
|
@@ -10286,24 +10451,24 @@ var ToastViewport = React45.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
10286
10451
|
));
|
|
10287
10452
|
ToastViewport.displayName = "ToastViewport";
|
|
10288
10453
|
function ToastProvider({ children, maxToasts = 3, className, ...props }) {
|
|
10289
|
-
const [items, setItems] =
|
|
10290
|
-
|
|
10454
|
+
const [items, setItems] = React47.useState([]);
|
|
10455
|
+
React47.useEffect(
|
|
10291
10456
|
() => toast.subscribe((nextItems) => {
|
|
10292
10457
|
setItems(limitToasts(nextItems, maxToasts));
|
|
10293
10458
|
}),
|
|
10294
10459
|
[maxToasts]
|
|
10295
10460
|
);
|
|
10296
|
-
return /* @__PURE__ */
|
|
10461
|
+
return /* @__PURE__ */ jsxs47("div", { "data-slot": "toast-provider", className, ...props, children: [
|
|
10297
10462
|
children,
|
|
10298
10463
|
/* @__PURE__ */ jsx58(ToastViewport, { children: items.map((item) => /* @__PURE__ */ jsx58("li", { children: /* @__PURE__ */ jsx58(ToastRoot, { ...item, onClose: () => toast.dismiss(item.id) }) }, item.id)) })
|
|
10299
10464
|
] });
|
|
10300
10465
|
}
|
|
10301
10466
|
|
|
10302
10467
|
// src/components/ui/otp-field.tsx
|
|
10303
|
-
import * as
|
|
10468
|
+
import * as React48 from "react";
|
|
10304
10469
|
import { cva as cva22 } from "class-variance-authority";
|
|
10305
10470
|
import { AlertCircle as AlertCircle4 } from "lucide-react";
|
|
10306
|
-
import { Fragment as
|
|
10471
|
+
import { Fragment as Fragment18, jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
10307
10472
|
var otpFieldVariants = cva22("flex w-full min-w-0 flex-col gap-[var(--space-3)]", {
|
|
10308
10473
|
variants: {
|
|
10309
10474
|
size: {
|
|
@@ -10430,7 +10595,7 @@ function fillDigitsFromIndex(slots, index, inserted, length) {
|
|
|
10430
10595
|
focusIndex: Math.min(cursor, length - 1)
|
|
10431
10596
|
};
|
|
10432
10597
|
}
|
|
10433
|
-
var OTPField =
|
|
10598
|
+
var OTPField = React48.forwardRef(
|
|
10434
10599
|
({
|
|
10435
10600
|
className,
|
|
10436
10601
|
defaultValue,
|
|
@@ -10450,26 +10615,34 @@ var OTPField = React46.forwardRef(
|
|
|
10450
10615
|
surface = "surface",
|
|
10451
10616
|
value,
|
|
10452
10617
|
required,
|
|
10618
|
+
"aria-describedby": ariaDescribedBy,
|
|
10453
10619
|
...props
|
|
10454
10620
|
}, ref) => {
|
|
10455
|
-
const
|
|
10621
|
+
const formField = useFormFieldControl();
|
|
10622
|
+
const generatedId = React48.useId();
|
|
10456
10623
|
const fieldId = id ?? generatedId;
|
|
10457
|
-
const
|
|
10458
|
-
const
|
|
10459
|
-
const
|
|
10624
|
+
const slotId = formField ? generatedId : fieldId;
|
|
10625
|
+
const labelId = `${slotId}-label`;
|
|
10626
|
+
const helperId = helperText ? `${slotId}-helper` : void 0;
|
|
10627
|
+
const errorId = errorText ? `${slotId}-error` : void 0;
|
|
10460
10628
|
const resolvedState = invalid || errorText ? "error" : "default";
|
|
10461
10629
|
const isControlled = value !== void 0;
|
|
10462
|
-
const [uncontrolledSlots, setUncontrolledSlots] =
|
|
10630
|
+
const [uncontrolledSlots, setUncontrolledSlots] = React48.useState(
|
|
10463
10631
|
() => toDigitsArray(onlyDigits(defaultValue, length), length)
|
|
10464
10632
|
);
|
|
10465
|
-
const resolvedSlots =
|
|
10633
|
+
const resolvedSlots = React48.useMemo(
|
|
10466
10634
|
() => isControlled ? toDigitsArray(onlyDigits(value, length), length) : uncontrolledSlots,
|
|
10467
10635
|
[isControlled, length, uncontrolledSlots, value]
|
|
10468
10636
|
);
|
|
10469
10637
|
const resolvedValue = joinDigits(resolvedSlots).slice(0, length);
|
|
10470
|
-
const cellsRef =
|
|
10471
|
-
const groupDescribedBy =
|
|
10472
|
-
|
|
10638
|
+
const cellsRef = React48.useRef([]);
|
|
10639
|
+
const groupDescribedBy = joinIds(
|
|
10640
|
+
ariaDescribedBy,
|
|
10641
|
+
helperId,
|
|
10642
|
+
errorId,
|
|
10643
|
+
formField?.describedBy
|
|
10644
|
+
);
|
|
10645
|
+
const setResolvedValue = React48.useCallback(
|
|
10473
10646
|
(nextSlots, focusIndex) => {
|
|
10474
10647
|
const normalizedSlots = nextSlots.slice(0, length);
|
|
10475
10648
|
const normalizedValue = joinDigits(normalizedSlots).slice(0, length);
|
|
@@ -10488,7 +10661,7 @@ var OTPField = React46.forwardRef(
|
|
|
10488
10661
|
},
|
|
10489
10662
|
[disabled, isControlled, length, onComplete, onValueChange]
|
|
10490
10663
|
);
|
|
10491
|
-
return /* @__PURE__ */
|
|
10664
|
+
return /* @__PURE__ */ jsxs48(
|
|
10492
10665
|
"fieldset",
|
|
10493
10666
|
{
|
|
10494
10667
|
ref,
|
|
@@ -10501,7 +10674,7 @@ var OTPField = React46.forwardRef(
|
|
|
10501
10674
|
className: cn(otpFieldVariants({ size, className })),
|
|
10502
10675
|
...props,
|
|
10503
10676
|
children: [
|
|
10504
|
-
/* @__PURE__ */
|
|
10677
|
+
/* @__PURE__ */ jsxs48(
|
|
10505
10678
|
"legend",
|
|
10506
10679
|
{
|
|
10507
10680
|
id: labelId,
|
|
@@ -10625,7 +10798,7 @@ var OTPField = React46.forwardRef(
|
|
|
10625
10798
|
"data-slot": "otp-field-message",
|
|
10626
10799
|
"data-kind": errorText ? "error" : "helper",
|
|
10627
10800
|
className: otpFieldMessageVariants({ state: resolvedState }),
|
|
10628
|
-
children: errorText ? /* @__PURE__ */
|
|
10801
|
+
children: errorText ? /* @__PURE__ */ jsxs48(Fragment18, { children: [
|
|
10629
10802
|
/* @__PURE__ */ jsx59(
|
|
10630
10803
|
AlertCircle4,
|
|
10631
10804
|
{
|
|
@@ -10659,10 +10832,10 @@ var OTPField = React46.forwardRef(
|
|
|
10659
10832
|
OTPField.displayName = "OTPField";
|
|
10660
10833
|
|
|
10661
10834
|
// src/components/ui/search-field.tsx
|
|
10662
|
-
import * as
|
|
10835
|
+
import * as React49 from "react";
|
|
10663
10836
|
import { Search, X as X5 } from "lucide-react";
|
|
10664
10837
|
import { cva as cva23 } from "class-variance-authority";
|
|
10665
|
-
import { jsx as jsx60, jsxs as
|
|
10838
|
+
import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10666
10839
|
var searchFieldVariants = cva23("relative flex w-full items-center", {
|
|
10667
10840
|
variants: {
|
|
10668
10841
|
size: {
|
|
@@ -10727,7 +10900,7 @@ var iconSize3 = {
|
|
|
10727
10900
|
function hasVisibleValue(value) {
|
|
10728
10901
|
return typeof value === "string" ? value.length > 0 : value !== void 0;
|
|
10729
10902
|
}
|
|
10730
|
-
var SearchField =
|
|
10903
|
+
var SearchField = React49.forwardRef(
|
|
10731
10904
|
({
|
|
10732
10905
|
className,
|
|
10733
10906
|
inputMode = "search",
|
|
@@ -10740,15 +10913,18 @@ var SearchField = React47.forwardRef(
|
|
|
10740
10913
|
value,
|
|
10741
10914
|
defaultValue,
|
|
10742
10915
|
disabled,
|
|
10916
|
+
id,
|
|
10917
|
+
"aria-describedby": ariaDescribedBy,
|
|
10743
10918
|
...props
|
|
10744
10919
|
}, ref) => {
|
|
10920
|
+
const field = useFormFieldControl();
|
|
10745
10921
|
const resolvedSize = size ?? "md";
|
|
10746
|
-
const inputRef =
|
|
10747
|
-
const [hasText, setHasText] =
|
|
10922
|
+
const inputRef = React49.useRef(null);
|
|
10923
|
+
const [hasText, setHasText] = React49.useState(
|
|
10748
10924
|
() => hasVisibleValue(value ?? defaultValue)
|
|
10749
10925
|
);
|
|
10750
|
-
|
|
10751
|
-
|
|
10926
|
+
React49.useImperativeHandle(ref, () => inputRef.current);
|
|
10927
|
+
React49.useEffect(() => {
|
|
10752
10928
|
if (value !== void 0) {
|
|
10753
10929
|
setHasText(hasVisibleValue(value));
|
|
10754
10930
|
}
|
|
@@ -10761,7 +10937,7 @@ var SearchField = React47.forwardRef(
|
|
|
10761
10937
|
}
|
|
10762
10938
|
onClear?.();
|
|
10763
10939
|
};
|
|
10764
|
-
return /* @__PURE__ */
|
|
10940
|
+
return /* @__PURE__ */ jsxs49(
|
|
10765
10941
|
"div",
|
|
10766
10942
|
{
|
|
10767
10943
|
"data-slot": "search-field",
|
|
@@ -10783,6 +10959,8 @@ var SearchField = React47.forwardRef(
|
|
|
10783
10959
|
{
|
|
10784
10960
|
ref: inputRef,
|
|
10785
10961
|
type: "search",
|
|
10962
|
+
id: id ?? field?.controlId,
|
|
10963
|
+
"aria-describedby": joinIds(ariaDescribedBy, field?.describedBy),
|
|
10786
10964
|
inputMode,
|
|
10787
10965
|
value,
|
|
10788
10966
|
defaultValue,
|
|
@@ -10818,7 +10996,7 @@ var SearchField = React47.forwardRef(
|
|
|
10818
10996
|
SearchField.displayName = "SearchField";
|
|
10819
10997
|
|
|
10820
10998
|
// src/components/ui/checkbox-group.tsx
|
|
10821
|
-
import * as
|
|
10999
|
+
import * as React50 from "react";
|
|
10822
11000
|
import { cva as cva24 } from "class-variance-authority";
|
|
10823
11001
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
10824
11002
|
var checkboxGroupVariants = cva24("gap-[var(--space-2)]", {
|
|
@@ -10846,7 +11024,7 @@ var checkboxGroupVariants = cva24("gap-[var(--space-2)]", {
|
|
|
10846
11024
|
function toSelectionSet(value) {
|
|
10847
11025
|
return new Set(value ?? []);
|
|
10848
11026
|
}
|
|
10849
|
-
var CheckboxGroup =
|
|
11027
|
+
var CheckboxGroup = React50.forwardRef(
|
|
10850
11028
|
({
|
|
10851
11029
|
className,
|
|
10852
11030
|
children,
|
|
@@ -10859,17 +11037,20 @@ var CheckboxGroup = React48.forwardRef(
|
|
|
10859
11037
|
columns = "one",
|
|
10860
11038
|
density = "comfortable",
|
|
10861
11039
|
disabled,
|
|
11040
|
+
"aria-labelledby": ariaLabelledBy,
|
|
11041
|
+
"aria-describedby": ariaDescribedBy,
|
|
10862
11042
|
...props
|
|
10863
11043
|
}, ref) => {
|
|
11044
|
+
const field = useFormFieldControl();
|
|
10864
11045
|
const isControlled = value != null;
|
|
10865
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
11046
|
+
const [uncontrolledValue, setUncontrolledValue] = React50.useState(
|
|
10866
11047
|
() => toSelectionSet(defaultValue)
|
|
10867
11048
|
);
|
|
10868
|
-
const selectedValues =
|
|
11049
|
+
const selectedValues = React50.useMemo(
|
|
10869
11050
|
() => isControlled ? toSelectionSet(value) : uncontrolledValue,
|
|
10870
11051
|
[isControlled, uncontrolledValue, value]
|
|
10871
11052
|
);
|
|
10872
|
-
const toggleValue =
|
|
11053
|
+
const toggleValue = React50.useCallback(
|
|
10873
11054
|
(itemValue, checked) => {
|
|
10874
11055
|
const nextValues = new Set(selectedValues);
|
|
10875
11056
|
if (checked) {
|
|
@@ -10885,16 +11066,17 @@ var CheckboxGroup = React48.forwardRef(
|
|
|
10885
11066
|
},
|
|
10886
11067
|
[isControlled, onValueChange, selectedValues]
|
|
10887
11068
|
);
|
|
10888
|
-
const contextValue =
|
|
11069
|
+
const contextValue = React50.useMemo(
|
|
10889
11070
|
() => ({
|
|
10890
11071
|
appearance,
|
|
10891
11072
|
density,
|
|
11073
|
+
orientation,
|
|
10892
11074
|
disabled,
|
|
10893
11075
|
name,
|
|
10894
11076
|
selectedValues,
|
|
10895
11077
|
toggleValue
|
|
10896
11078
|
}),
|
|
10897
|
-
[appearance, density, disabled, name, selectedValues, toggleValue]
|
|
11079
|
+
[appearance, density, orientation, disabled, name, selectedValues, toggleValue]
|
|
10898
11080
|
);
|
|
10899
11081
|
return /* @__PURE__ */ jsx61(CheckboxGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx61(
|
|
10900
11082
|
"div",
|
|
@@ -10903,6 +11085,8 @@ var CheckboxGroup = React48.forwardRef(
|
|
|
10903
11085
|
"data-slot": "checkbox-group",
|
|
10904
11086
|
"data-appearance": appearance,
|
|
10905
11087
|
role: "group",
|
|
11088
|
+
"aria-labelledby": ariaLabelledBy ?? (props["aria-label"] ? void 0 : field?.labelId),
|
|
11089
|
+
"aria-describedby": joinIds(ariaDescribedBy, field?.describedBy),
|
|
10906
11090
|
className: cn(
|
|
10907
11091
|
checkboxGroupVariants({
|
|
10908
11092
|
appearance,
|
|
@@ -10912,7 +11096,7 @@ var CheckboxGroup = React48.forwardRef(
|
|
|
10912
11096
|
className
|
|
10913
11097
|
),
|
|
10914
11098
|
...props,
|
|
10915
|
-
children
|
|
11099
|
+
children: /* @__PURE__ */ jsx61(FormFieldControlContext.Provider, { value: null, children })
|
|
10916
11100
|
}
|
|
10917
11101
|
) });
|
|
10918
11102
|
}
|
|
@@ -10920,11 +11104,11 @@ var CheckboxGroup = React48.forwardRef(
|
|
|
10920
11104
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
10921
11105
|
|
|
10922
11106
|
// src/components/ui/radio-group.tsx
|
|
10923
|
-
import * as
|
|
11107
|
+
import * as React51 from "react";
|
|
10924
11108
|
import { cva as cva25 } from "class-variance-authority";
|
|
10925
11109
|
import { Circle } from "lucide-react";
|
|
10926
11110
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
10927
|
-
import { jsx as jsx62, jsxs as
|
|
11111
|
+
import { jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10928
11112
|
var radioGroupVariants = cva25("gap-[var(--space-2)]", {
|
|
10929
11113
|
variants: {
|
|
10930
11114
|
appearance: {
|
|
@@ -11013,11 +11197,12 @@ var radioControlVariants = cva25(
|
|
|
11013
11197
|
}
|
|
11014
11198
|
}
|
|
11015
11199
|
);
|
|
11016
|
-
var RadioGroupContext =
|
|
11200
|
+
var RadioGroupContext = React51.createContext({
|
|
11017
11201
|
appearance: "plain",
|
|
11018
|
-
density: "comfortable"
|
|
11202
|
+
density: "comfortable",
|
|
11203
|
+
orientation: "vertical"
|
|
11019
11204
|
});
|
|
11020
|
-
var RadioGroup =
|
|
11205
|
+
var RadioGroup = React51.forwardRef(
|
|
11021
11206
|
({
|
|
11022
11207
|
className,
|
|
11023
11208
|
children,
|
|
@@ -11026,11 +11211,14 @@ var RadioGroup = React49.forwardRef(
|
|
|
11026
11211
|
columns = "one",
|
|
11027
11212
|
density = "comfortable",
|
|
11028
11213
|
required,
|
|
11214
|
+
"aria-labelledby": ariaLabelledBy,
|
|
11215
|
+
"aria-describedby": ariaDescribedBy,
|
|
11029
11216
|
...props
|
|
11030
11217
|
}, ref) => {
|
|
11031
|
-
const
|
|
11032
|
-
|
|
11033
|
-
|
|
11218
|
+
const field = useFormFieldControl();
|
|
11219
|
+
const contextValue = React51.useMemo(
|
|
11220
|
+
() => ({ appearance, density, orientation }),
|
|
11221
|
+
[appearance, density, orientation]
|
|
11034
11222
|
);
|
|
11035
11223
|
return /* @__PURE__ */ jsx62(RadioGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx62(
|
|
11036
11224
|
RadioGroupPrimitive.Root,
|
|
@@ -11039,6 +11227,8 @@ var RadioGroup = React49.forwardRef(
|
|
|
11039
11227
|
"data-slot": "radio-group",
|
|
11040
11228
|
"data-appearance": appearance,
|
|
11041
11229
|
"aria-required": required || void 0,
|
|
11230
|
+
"aria-labelledby": ariaLabelledBy ?? (props["aria-label"] ? void 0 : field?.labelId),
|
|
11231
|
+
"aria-describedby": joinIds(ariaDescribedBy, field?.describedBy),
|
|
11042
11232
|
orientation,
|
|
11043
11233
|
className: cn(
|
|
11044
11234
|
radioGroupVariants({
|
|
@@ -11049,19 +11239,19 @@ var RadioGroup = React49.forwardRef(
|
|
|
11049
11239
|
className
|
|
11050
11240
|
),
|
|
11051
11241
|
...props,
|
|
11052
|
-
children
|
|
11242
|
+
children: /* @__PURE__ */ jsx62(FormFieldControlContext.Provider, { value: null, children })
|
|
11053
11243
|
}
|
|
11054
11244
|
) });
|
|
11055
11245
|
}
|
|
11056
11246
|
);
|
|
11057
11247
|
RadioGroup.displayName = "RadioGroup";
|
|
11058
|
-
var Radio =
|
|
11059
|
-
const { appearance, density } =
|
|
11060
|
-
const generatedId =
|
|
11248
|
+
var Radio = React51.forwardRef(({ className, children, description, id, ...props }, ref) => {
|
|
11249
|
+
const { appearance, density, orientation } = React51.useContext(RadioGroupContext);
|
|
11250
|
+
const generatedId = React51.useId();
|
|
11061
11251
|
const radioId = id ?? generatedId;
|
|
11062
11252
|
const labelId = `${radioId}-label`;
|
|
11063
11253
|
const descriptionId = description ? `${radioId}-description` : void 0;
|
|
11064
|
-
return /* @__PURE__ */
|
|
11254
|
+
return /* @__PURE__ */ jsxs50(
|
|
11065
11255
|
RadioGroupPrimitive.Item,
|
|
11066
11256
|
{
|
|
11067
11257
|
ref,
|
|
@@ -11069,7 +11259,12 @@ var Radio = React49.forwardRef(({ className, children, description, id, ...props
|
|
|
11069
11259
|
"data-slot": "radio",
|
|
11070
11260
|
"aria-labelledby": labelId,
|
|
11071
11261
|
"aria-describedby": descriptionId,
|
|
11072
|
-
className: cn(
|
|
11262
|
+
className: cn(
|
|
11263
|
+
radioVariants({ appearance, density }),
|
|
11264
|
+
// plain rows sit side by side only at content width; w-full would wrap each one.
|
|
11265
|
+
appearance === "plain" && orientation === "horizontal" && "w-auto",
|
|
11266
|
+
className
|
|
11267
|
+
),
|
|
11073
11268
|
...props,
|
|
11074
11269
|
children: [
|
|
11075
11270
|
/* @__PURE__ */ jsx62(
|
|
@@ -11088,7 +11283,7 @@ var Radio = React49.forwardRef(({ className, children, description, id, ...props
|
|
|
11088
11283
|
)
|
|
11089
11284
|
}
|
|
11090
11285
|
),
|
|
11091
|
-
/* @__PURE__ */
|
|
11286
|
+
/* @__PURE__ */ jsxs50("span", { className: "flex min-w-0 flex-col gap-[var(--space-1)]", children: [
|
|
11092
11287
|
/* @__PURE__ */ jsx62(
|
|
11093
11288
|
"span",
|
|
11094
11289
|
{
|
|
@@ -11119,13 +11314,13 @@ Radio.displayName = "Radio";
|
|
|
11119
11314
|
|
|
11120
11315
|
// src/components/ui/scroll-area.tsx
|
|
11121
11316
|
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
11122
|
-
import { jsx as jsx63, jsxs as
|
|
11317
|
+
import { jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
11123
11318
|
function ScrollArea({
|
|
11124
11319
|
className,
|
|
11125
11320
|
children,
|
|
11126
11321
|
...props
|
|
11127
11322
|
}) {
|
|
11128
|
-
return /* @__PURE__ */
|
|
11323
|
+
return /* @__PURE__ */ jsxs51(
|
|
11129
11324
|
ScrollAreaPrimitive.Root,
|
|
11130
11325
|
{
|
|
11131
11326
|
"data-slot": "scroll-area",
|
|
@@ -11225,10 +11420,10 @@ function Progress({
|
|
|
11225
11420
|
}
|
|
11226
11421
|
|
|
11227
11422
|
// src/components/ui/tree-view.tsx
|
|
11228
|
-
import * as
|
|
11423
|
+
import * as React52 from "react";
|
|
11229
11424
|
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
11230
11425
|
import { cva as cva26 } from "class-variance-authority";
|
|
11231
|
-
import { jsx as jsx65, jsxs as
|
|
11426
|
+
import { jsx as jsx65, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
11232
11427
|
var treeViewVariants = cva26(
|
|
11233
11428
|
"m-0 list-none p-[var(--space-1)] text-body-sm text-foreground"
|
|
11234
11429
|
);
|
|
@@ -11331,27 +11526,27 @@ function TreeView({
|
|
|
11331
11526
|
...rest
|
|
11332
11527
|
}) {
|
|
11333
11528
|
const isExpandedControlled = expandedIds !== void 0;
|
|
11334
|
-
const [internalExpanded, setInternalExpanded] =
|
|
11529
|
+
const [internalExpanded, setInternalExpanded] = React52.useState(
|
|
11335
11530
|
() => defaultExpandedIds ?? []
|
|
11336
11531
|
);
|
|
11337
11532
|
const expandedList = isExpandedControlled ? expandedIds : internalExpanded;
|
|
11338
|
-
const expandedSet =
|
|
11339
|
-
const items =
|
|
11533
|
+
const expandedSet = React52.useMemo(() => new Set(expandedList), [expandedList]);
|
|
11534
|
+
const items = React52.useMemo(
|
|
11340
11535
|
() => flattenVisibleNodes(nodes, getChildren, expandedSet),
|
|
11341
11536
|
[nodes, getChildren, expandedSet]
|
|
11342
11537
|
);
|
|
11343
|
-
const [focusedId, setFocusedId] =
|
|
11538
|
+
const [focusedId, setFocusedId] = React52.useState(null);
|
|
11344
11539
|
const visibleIds = items.map((item) => item.id);
|
|
11345
11540
|
const activeId = focusedId && visibleIds.includes(focusedId) ? focusedId : selectedId && visibleIds.includes(selectedId) ? selectedId : visibleIds[0] ?? null;
|
|
11346
|
-
const itemRefs =
|
|
11347
|
-
const commitExpanded =
|
|
11541
|
+
const itemRefs = React52.useRef(/* @__PURE__ */ new Map());
|
|
11542
|
+
const commitExpanded = React52.useCallback(
|
|
11348
11543
|
(next) => {
|
|
11349
11544
|
if (!isExpandedControlled) setInternalExpanded(next);
|
|
11350
11545
|
onExpandedChange?.(next);
|
|
11351
11546
|
},
|
|
11352
11547
|
[isExpandedControlled, onExpandedChange]
|
|
11353
11548
|
);
|
|
11354
|
-
const setExpanded =
|
|
11549
|
+
const setExpanded = React52.useCallback(
|
|
11355
11550
|
(id, expand) => {
|
|
11356
11551
|
const has = expandedSet.has(id);
|
|
11357
11552
|
if (expand && !has) {
|
|
@@ -11362,7 +11557,7 @@ function TreeView({
|
|
|
11362
11557
|
},
|
|
11363
11558
|
[commitExpanded, expandedList, expandedSet]
|
|
11364
11559
|
);
|
|
11365
|
-
const focusItem =
|
|
11560
|
+
const focusItem = React52.useCallback((id) => {
|
|
11366
11561
|
setFocusedId(id);
|
|
11367
11562
|
itemRefs.current.get(id)?.focus();
|
|
11368
11563
|
}, []);
|
|
@@ -11398,7 +11593,7 @@ function TreeView({
|
|
|
11398
11593
|
const selected = node.id === selectedId;
|
|
11399
11594
|
const isActive = node.id === activeId;
|
|
11400
11595
|
const itemState = { expanded, selected, depth, hasChildren };
|
|
11401
|
-
return /* @__PURE__ */
|
|
11596
|
+
return /* @__PURE__ */ jsxs52(
|
|
11402
11597
|
"li",
|
|
11403
11598
|
{
|
|
11404
11599
|
ref: (element) => {
|
|
@@ -11423,7 +11618,7 @@ function TreeView({
|
|
|
11423
11618
|
onSelect?.(node.id, node);
|
|
11424
11619
|
},
|
|
11425
11620
|
children: [
|
|
11426
|
-
/* @__PURE__ */
|
|
11621
|
+
/* @__PURE__ */ jsxs52(
|
|
11427
11622
|
"span",
|
|
11428
11623
|
{
|
|
11429
11624
|
"data-slot": "treeitem-row",
|
|
@@ -11491,7 +11686,7 @@ function TreeView({
|
|
|
11491
11686
|
|
|
11492
11687
|
// src/components/branding/olun-logo.tsx
|
|
11493
11688
|
import { OLUN_MASTER, OLUN_SYMBOL, OLUN_WORDMARK } from "@olundot/tokens/brand";
|
|
11494
|
-
import { Fragment as
|
|
11689
|
+
import { Fragment as Fragment19, jsx as jsx66, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
11495
11690
|
var ACCENT_FILL = "var(--accent-pop)";
|
|
11496
11691
|
var INK = { color: "var(--text-primary)" };
|
|
11497
11692
|
var INK_TIGHT = { ...INK, display: "block", overflow: "visible" };
|
|
@@ -11501,7 +11696,7 @@ function symbolGeometry(size) {
|
|
|
11501
11696
|
function SymbolCircles({ size }) {
|
|
11502
11697
|
const { ring } = OLUN_SYMBOL;
|
|
11503
11698
|
const g = symbolGeometry(size);
|
|
11504
|
-
return /* @__PURE__ */
|
|
11699
|
+
return /* @__PURE__ */ jsxs53(Fragment19, { children: [
|
|
11505
11700
|
/* @__PURE__ */ jsx66(
|
|
11506
11701
|
"circle",
|
|
11507
11702
|
{
|
|
@@ -11542,7 +11737,7 @@ function OlunLogo({
|
|
|
11542
11737
|
if (!showSymbol) {
|
|
11543
11738
|
const { full } = OLUN_WORDMARK;
|
|
11544
11739
|
const height2 = fontSize * full.height / OLUN_WORDMARK.unitsPerEm;
|
|
11545
|
-
return /* @__PURE__ */
|
|
11740
|
+
return /* @__PURE__ */ jsxs53(
|
|
11546
11741
|
"svg",
|
|
11547
11742
|
{
|
|
11548
11743
|
width: height2 * full.width / full.height,
|
|
@@ -11572,7 +11767,7 @@ function OlunLogo({
|
|
|
11572
11767
|
}
|
|
11573
11768
|
const layout = symbolSize > OLUN_SYMBOL.smallMax ? OLUN_MASTER.large : OLUN_MASTER.small;
|
|
11574
11769
|
const height = symbolSize * layout.height / (OLUN_SYMBOL.box * layout.symbol.scale);
|
|
11575
|
-
return /* @__PURE__ */
|
|
11770
|
+
return /* @__PURE__ */ jsxs53(
|
|
11576
11771
|
"svg",
|
|
11577
11772
|
{
|
|
11578
11773
|
width: height * layout.width / layout.height,
|