@t3q-ui/design-system 1.62.0 → 1.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +21 -0
- package/dist/chunk-DWF6AFPQ.js +409 -0
- package/dist/chunk-DWF6AFPQ.js.map +1 -0
- package/dist/{chunk-B7EVWGOO.cjs → chunk-ESAMXUUJ.cjs} +2264 -1129
- package/dist/chunk-ESAMXUUJ.cjs.map +1 -0
- package/dist/{chunk-RWXQIS6W.js → chunk-GZZXYYDY.js} +2182 -1049
- package/dist/chunk-GZZXYYDY.js.map +1 -0
- package/dist/chunk-OQOBPYZT.cjs +443 -0
- package/dist/chunk-OQOBPYZT.cjs.map +1 -0
- package/dist/{index-49sVdPlX.d.cts → index-DoIChamr.d.cts} +177 -1
- package/dist/{index-49sVdPlX.d.ts → index-DoIChamr.d.ts} +177 -1
- package/dist/index.cjs +1146 -1799
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +12 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +54 -7
- package/dist/index.d.ts +54 -7
- package/dist/index.js +584 -1264
- package/dist/index.js.map +1 -1
- package/dist/markdown/index.cjs +441 -0
- package/dist/markdown/index.cjs.map +1 -0
- package/dist/markdown/index.d.cts +24 -0
- package/dist/markdown/index.d.ts +24 -0
- package/dist/markdown/index.js +434 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/patterns/index.cjs +586 -69
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +119 -2
- package/dist/patterns/index.d.ts +119 -2
- package/dist/patterns/index.js +520 -5
- package/dist/patterns/index.js.map +1 -1
- package/dist/styles.css +23 -0
- package/mcp/manifests/components.json +2620 -68
- package/package.json +20 -3
- package/skills/tds/SKILL.md +7 -3
- package/skills/tds/examples/chat-page.tsx +313 -0
- package/skills/tds/reference/components.md +239 -12
- package/skills/tds/rules.md +3 -2
- package/dist/chunk-B7EVWGOO.cjs.map +0 -1
- package/dist/chunk-RWXQIS6W.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { AG_GRID_LOCALE_KR, AgGridContext, AgGridTable, Alert, AlertActions, AlertDescription, AlertTitle, BADGE_OUTLINE_ACCENT, BALANCED_FILL_MIN_WIDTH, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardThumbnail, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyBoxIllustration, Form, FormControl, FormDescription, FormField, FormFooter, FormHeader, FormItem, FormLabel, FormMessage, FormSection, FormSectionLevelContext, FormValidMessage, HeaderCheckboxRenderer,
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { useRestoreFocusToOpener, Stack, sanitizeUserText, Button, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Checkbox, useFloatingLabel, FloatingLabelOutline, CancelIcon, CLEAR_REVEAL_CLASS, CLEAR_HOST_CLASS, Spinner, useFormControlContext, Tag, Separator, LucideIcon, TextField, Dialog, DialogContent, DialogTitle, Badge } from './chunk-GZZXYYDY.js';
|
|
2
|
+
export { AG_GRID_LOCALE_KR, AgGridContext, AgGridTable, Alert, AlertActions, AlertDescription, AlertTitle, BADGE_OUTLINE_ACCENT, BALANCED_FILL_MIN_WIDTH, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardThumbnail, CardTitle, ChatComposer, ChatHistory, ChatMessage, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyBoxIllustration, Form, FormControl, FormDescription, FormField, FormFooter, FormHeader, FormItem, FormLabel, FormMessage, FormSection, FormSectionLevelContext, FormValidMessage, HeaderCheckboxRenderer, LucideIcon, NUMBER_COLUMN_WIDTH, PageHeader, PageHeaderProvider, Pagination, PaginationContent, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationWrapper, Panel, RowCheckboxRenderer, SORT_ICON_OFFSET_CLASS, Separator, Skeleton, Spinner, Stack, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TextField, Textarea, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TwoLineCellRenderer, badgeVariants, buttonVariants, estimateHeaderTextWidth, fitColumnsToContent, getPaginationRange, getSortedColumnState, groupChatHistoryByDate, growColumnIds, sanitizeUserText, tagVariants, useFloatingLabel, useFormControlContext, useFormField, usePageHeader, withBalancedFill, withExplicitSortIcons, withFlexFill, withHeaderMinWidth, withNumberColumnWidth, withSortIconOffset, withTypeClasses, withWidthFloor } from './chunk-GZZXYYDY.js';
|
|
3
|
+
import { cn, Table, TableHeader, TableRow, TableHead, TableBody, IconButton, TableCell } from './chunk-DWF6AFPQ.js';
|
|
4
|
+
export { IconButton, NUMBER_COLUMN_CLASS, SortIcon, Table, TableBody, TableCell, TableHead, TableHeader, TablePagination, TableRow, alignFromClassName, cn } from './chunk-DWF6AFPQ.js';
|
|
5
|
+
import * as React15 from 'react';
|
|
6
|
+
import React15__default, { forwardRef, useMemo, useState, useEffect, useCallback, useRef } from 'react';
|
|
5
7
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
6
8
|
import { Search, Info, Calendar as Calendar$1, PanelLeft, ChevronDown, Minus, Plus, Check, X, Clock, CircleX, TriangleAlert, CircleCheck, GripVertical, Trash2, ListFilter, ChevronLeft, CheckIcon, ChevronsUpDown, RefreshCw, ChevronsLeft, ChevronRight, ChevronsRight } from 'lucide-react';
|
|
7
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
10
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
9
11
|
import { cva } from 'class-variance-authority';
|
|
10
|
-
import { Slot
|
|
12
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
11
13
|
import { DayPicker, useNavigation } from 'react-day-picker';
|
|
12
14
|
import { format, isSameDay, differenceInCalendarDays, subDays, addDays, formatDistanceToNow, isValid, subYears, addYears, add } from 'date-fns';
|
|
13
15
|
import { ko } from 'date-fns/locale';
|
|
@@ -24,10 +26,9 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
|
24
26
|
import { createPortal } from 'react-dom';
|
|
25
27
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
26
28
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
27
|
-
import TextareaAutosize from 'react-textarea-autosize';
|
|
28
29
|
import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
|
|
29
30
|
|
|
30
|
-
var AccordionStickyContext =
|
|
31
|
+
var AccordionStickyContext = React15.createContext(false);
|
|
31
32
|
function Accordion({ sticky = false, className, ...props }) {
|
|
32
33
|
return /* @__PURE__ */ jsx(AccordionStickyContext.Provider, { value: sticky, children: /* @__PURE__ */ jsx(
|
|
33
34
|
AccordionPrimitive.Root,
|
|
@@ -49,7 +50,7 @@ function AccordionTrigger({
|
|
|
49
50
|
children,
|
|
50
51
|
...props
|
|
51
52
|
}) {
|
|
52
|
-
const sticky =
|
|
53
|
+
const sticky = React15.useContext(AccordionStickyContext);
|
|
53
54
|
return /* @__PURE__ */ jsx(
|
|
54
55
|
AccordionPrimitive.Header,
|
|
55
56
|
{
|
|
@@ -114,7 +115,7 @@ function AccordionContent({
|
|
|
114
115
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
115
116
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
116
117
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
117
|
-
var AlertDialogOverlay =
|
|
118
|
+
var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
118
119
|
AlertDialogPrimitive.Overlay,
|
|
119
120
|
{
|
|
120
121
|
...props,
|
|
@@ -141,10 +142,10 @@ var alertDialogContentVariants = cva(null, {
|
|
|
141
142
|
width: "small"
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
|
-
var AlertDialogContext =
|
|
145
|
+
var AlertDialogContext = React15.createContext({
|
|
145
146
|
variant: "info"
|
|
146
147
|
});
|
|
147
|
-
var AlertDialogContent =
|
|
148
|
+
var AlertDialogContent = React15.forwardRef(({ className, width, variant, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {
|
|
148
149
|
const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus });
|
|
149
150
|
return /* @__PURE__ */ jsx(AlertDialogContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
150
151
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
@@ -189,8 +190,8 @@ var variantToIcon = {
|
|
|
189
190
|
warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "text-critical30" }),
|
|
190
191
|
danger: /* @__PURE__ */ jsx(CircleX, { className: "text-danger30" })
|
|
191
192
|
};
|
|
192
|
-
var AlertDialogTitle =
|
|
193
|
-
const { variant } =
|
|
193
|
+
var AlertDialogTitle = React15.forwardRef(({ children, ...props }, ref) => {
|
|
194
|
+
const { variant } = React15.useContext(AlertDialogContext);
|
|
194
195
|
return /* @__PURE__ */ jsxs(Stack, { spacing: 8, children: [
|
|
195
196
|
variantToIcon[variant || "info"],
|
|
196
197
|
/* @__PURE__ */ jsx(
|
|
@@ -205,7 +206,7 @@ var AlertDialogTitle = React17.forwardRef(({ children, ...props }, ref) => {
|
|
|
205
206
|
] });
|
|
206
207
|
});
|
|
207
208
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
208
|
-
var AlertDialogDescription =
|
|
209
|
+
var AlertDialogDescription = React15.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
209
210
|
AlertDialogPrimitive.Description,
|
|
210
211
|
{
|
|
211
212
|
...props,
|
|
@@ -215,8 +216,8 @@ var AlertDialogDescription = React17.forwardRef(({ children, ...props }, ref) =>
|
|
|
215
216
|
}
|
|
216
217
|
));
|
|
217
218
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
218
|
-
var AlertDialogAction =
|
|
219
|
-
const { variant: dialogVariant } =
|
|
219
|
+
var AlertDialogAction = React15.forwardRef(({ variant, loading, children, ...props }, ref) => {
|
|
220
|
+
const { variant: dialogVariant } = React15.useContext(AlertDialogContext);
|
|
220
221
|
const buttonVariant = {
|
|
221
222
|
success: "primaryBold",
|
|
222
223
|
info: "primaryBold",
|
|
@@ -226,32 +227,32 @@ var AlertDialogAction = React17.forwardRef(({ variant, loading, children, ...pro
|
|
|
226
227
|
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx(Button, { variant: variant || buttonVariant[dialogVariant || "info"], loading, children }) });
|
|
227
228
|
});
|
|
228
229
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
229
|
-
var AlertDialogCancel =
|
|
230
|
+
var AlertDialogCancel = React15.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", children }) }));
|
|
230
231
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
231
|
-
var BreadcrumbSeparatorContext =
|
|
232
|
-
var Breadcrumb =
|
|
232
|
+
var BreadcrumbSeparatorContext = React15.createContext(void 0);
|
|
233
|
+
var Breadcrumb = React15.forwardRef(
|
|
233
234
|
({ className, separator, ...props }, ref) => /* @__PURE__ */ jsx(BreadcrumbSeparatorContext.Provider, { value: separator, children: /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", className: cn("w-fit", className), ...props }) })
|
|
234
235
|
);
|
|
235
236
|
Breadcrumb.displayName = "Breadcrumb";
|
|
236
|
-
var BreadcrumbList =
|
|
237
|
+
var BreadcrumbList = React15.forwardRef(
|
|
237
238
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("ol", { ref, className: cn("flex items-center gap-[4px]", className), ...props })
|
|
238
239
|
);
|
|
239
240
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
240
|
-
var BreadcrumbItem =
|
|
241
|
+
var BreadcrumbItem = React15.forwardRef(
|
|
241
242
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("flex items-center gap-[4px]", className), ...props })
|
|
242
243
|
);
|
|
243
244
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
244
245
|
var ICON_SLOT_CLASS = "inline-flex shrink-0 items-center justify-center size-[16px]";
|
|
245
246
|
function extractTruncateText(children) {
|
|
246
247
|
if (typeof children === "string") return children;
|
|
247
|
-
if (
|
|
248
|
+
if (React15.isValidElement(children)) {
|
|
248
249
|
const inner = children.props?.children;
|
|
249
250
|
if (typeof inner === "string") return inner;
|
|
250
251
|
}
|
|
251
252
|
return "";
|
|
252
253
|
}
|
|
253
254
|
function wrapAsChildWithIcons(children, leftIcon, rightIcon) {
|
|
254
|
-
if (!
|
|
255
|
+
if (!React15.isValidElement(children)) {
|
|
255
256
|
if (process.env.NODE_ENV !== "production") {
|
|
256
257
|
console.warn(
|
|
257
258
|
"[Breadcrumb] asChild \uC640 \uD568\uAED8 leftIcon/rightIcon \uC744 \uC4F0\uB824\uBA74 \uC790\uC2DD\uC774 \uB2E8\uC77C React element \uC5EC\uC57C \uD569\uB2C8\uB2E4."
|
|
@@ -260,7 +261,7 @@ function wrapAsChildWithIcons(children, leftIcon, rightIcon) {
|
|
|
260
261
|
return children;
|
|
261
262
|
}
|
|
262
263
|
const element = children;
|
|
263
|
-
return
|
|
264
|
+
return React15.cloneElement(element, {
|
|
264
265
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
265
266
|
leftIcon ? /* @__PURE__ */ jsx("span", { className: ICON_SLOT_CLASS, children: leftIcon }) : null,
|
|
266
267
|
element.props.children,
|
|
@@ -268,7 +269,7 @@ function wrapAsChildWithIcons(children, leftIcon, rightIcon) {
|
|
|
268
269
|
] })
|
|
269
270
|
});
|
|
270
271
|
}
|
|
271
|
-
var BreadcrumbLink =
|
|
272
|
+
var BreadcrumbLink = React15.forwardRef(
|
|
272
273
|
({
|
|
273
274
|
className,
|
|
274
275
|
asChild = false,
|
|
@@ -287,7 +288,7 @@ var BreadcrumbLink = React17.forwardRef(
|
|
|
287
288
|
/* @__PURE__ */ jsx("span", { className: "whitespace-pre", children: truncatedText }),
|
|
288
289
|
/* @__PURE__ */ jsx("span", { children: "..." })
|
|
289
290
|
] });
|
|
290
|
-
const truncatedAsChildElement = isTruncated &&
|
|
291
|
+
const truncatedAsChildElement = isTruncated && React15.isValidElement(children) ? React15.cloneElement(
|
|
291
292
|
children,
|
|
292
293
|
void 0,
|
|
293
294
|
truncatedBody
|
|
@@ -335,7 +336,7 @@ var BreadcrumbLink = React17.forwardRef(
|
|
|
335
336
|
}
|
|
336
337
|
);
|
|
337
338
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
338
|
-
var BreadcrumbPage =
|
|
339
|
+
var BreadcrumbPage = React15.forwardRef(
|
|
339
340
|
({ className, truncate = false, maxLength = 20, leftIcon, rightIcon, children, ...props }, ref) => {
|
|
340
341
|
const textContent = extractTruncateText(children);
|
|
341
342
|
const isTruncated = truncate && textContent.length > maxLength;
|
|
@@ -373,9 +374,9 @@ var BreadcrumbPage = React17.forwardRef(
|
|
|
373
374
|
}
|
|
374
375
|
);
|
|
375
376
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
376
|
-
var BreadcrumbSeparator =
|
|
377
|
+
var BreadcrumbSeparator = React15.forwardRef(
|
|
377
378
|
({ className, children, ...props }, ref) => {
|
|
378
|
-
const separator =
|
|
379
|
+
const separator = React15.useContext(BreadcrumbSeparatorContext);
|
|
379
380
|
return /* @__PURE__ */ jsx(
|
|
380
381
|
"li",
|
|
381
382
|
{
|
|
@@ -393,10 +394,10 @@ var BreadcrumbSeparator = React17.forwardRef(
|
|
|
393
394
|
}
|
|
394
395
|
);
|
|
395
396
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
396
|
-
var CalendarViewContext =
|
|
397
|
+
var CalendarViewContext = React15.createContext({ setView: () => {
|
|
397
398
|
}, numberOfMonths: 1, baseDisplayMonth: /* @__PURE__ */ new Date() });
|
|
398
399
|
function CalendarCaption({ displayMonth }) {
|
|
399
|
-
const { setView, numberOfMonths, baseDisplayMonth } =
|
|
400
|
+
const { setView, numberOfMonths, baseDisplayMonth } = React15.useContext(CalendarViewContext);
|
|
400
401
|
const { goToMonth, previousMonth, nextMonth } = useNavigation();
|
|
401
402
|
const caption = format(displayMonth, "yyyy\uB144 M\uC6D4", { locale: ko });
|
|
402
403
|
const isMultiMonth = numberOfMonths > 1;
|
|
@@ -466,8 +467,8 @@ function MonthsView({
|
|
|
466
467
|
onYearChange,
|
|
467
468
|
onViewChange
|
|
468
469
|
}) {
|
|
469
|
-
const months =
|
|
470
|
-
const rows =
|
|
470
|
+
const months = React15.useMemo(() => Array.from({ length: 12 }, (_, i) => i), []);
|
|
471
|
+
const rows = React15.useMemo(
|
|
471
472
|
() => [months.slice(0, 3), months.slice(3, 6), months.slice(6, 9), months.slice(9, 12)],
|
|
472
473
|
[months]
|
|
473
474
|
);
|
|
@@ -543,11 +544,11 @@ function MonthsView({
|
|
|
543
544
|
}
|
|
544
545
|
function YearsView({ displayYear, onSelectYear, onRangeChange }) {
|
|
545
546
|
const startYear = Math.floor(displayYear / 12) * 12;
|
|
546
|
-
const years =
|
|
547
|
+
const years = React15.useMemo(
|
|
547
548
|
() => Array.from({ length: 12 }, (_, i) => startYear + i),
|
|
548
549
|
[startYear]
|
|
549
550
|
);
|
|
550
|
-
const rows =
|
|
551
|
+
const rows = React15.useMemo(
|
|
551
552
|
() => [years.slice(0, 3), years.slice(3, 6), years.slice(6, 9), years.slice(9, 12)],
|
|
552
553
|
[years]
|
|
553
554
|
);
|
|
@@ -619,15 +620,15 @@ function Calendar({
|
|
|
619
620
|
...dayPickerProps
|
|
620
621
|
}) {
|
|
621
622
|
const numberOfMonths = dayPickerProps.numberOfMonths ?? 1;
|
|
622
|
-
const [view, setView] =
|
|
623
|
-
const [displayMonth, setDisplayMonth] =
|
|
623
|
+
const [view, setView] = React15.useState("days");
|
|
624
|
+
const [displayMonth, setDisplayMonth] = React15.useState(
|
|
624
625
|
dayPickerProps.defaultMonth ?? /* @__PURE__ */ new Date()
|
|
625
626
|
);
|
|
626
627
|
const externalMonth = dayPickerProps.month;
|
|
627
|
-
|
|
628
|
+
React15.useEffect(() => {
|
|
628
629
|
if (externalMonth) setDisplayMonth(externalMonth);
|
|
629
630
|
}, [externalMonth]);
|
|
630
|
-
const handleMonthChange =
|
|
631
|
+
const handleMonthChange = React15.useCallback(
|
|
631
632
|
(month) => {
|
|
632
633
|
setDisplayMonth(month);
|
|
633
634
|
dayPickerProps.onMonthChange?.(month);
|
|
@@ -636,26 +637,26 @@ function Calendar({
|
|
|
636
637
|
[dayPickerProps.onMonthChange]
|
|
637
638
|
);
|
|
638
639
|
const viewLabel = view === "days" ? format(displayMonth, "yyyy\uB144 M\uC6D4", { locale: ko }) : view === "months" ? `${displayMonth.getFullYear()}\uB144 \uC6D4 \uC120\uD0DD` : "\uB144\uB3C4 \uC120\uD0DD";
|
|
639
|
-
const effectiveSetView =
|
|
640
|
+
const effectiveSetView = React15.useMemo(
|
|
640
641
|
() => disableViewSwitching ? () => {
|
|
641
642
|
} : setView,
|
|
642
643
|
[disableViewSwitching]
|
|
643
644
|
);
|
|
644
|
-
const handleMonthSelect =
|
|
645
|
+
const handleMonthSelect = React15.useCallback((month) => {
|
|
645
646
|
setDisplayMonth((prev) => new Date(prev.getFullYear(), month, 1));
|
|
646
647
|
setView("days");
|
|
647
648
|
}, []);
|
|
648
|
-
const handleYearSelect =
|
|
649
|
+
const handleYearSelect = React15.useCallback((year) => {
|
|
649
650
|
setDisplayMonth((prev) => new Date(year, prev.getMonth(), 1));
|
|
650
651
|
setView("months");
|
|
651
652
|
}, []);
|
|
652
|
-
const handleMonthsYearChange =
|
|
653
|
+
const handleMonthsYearChange = React15.useCallback((year) => {
|
|
653
654
|
setDisplayMonth((prev) => new Date(year, prev.getMonth(), 1));
|
|
654
655
|
}, []);
|
|
655
|
-
const handleYearsRangeChange =
|
|
656
|
+
const handleYearsRangeChange = React15.useCallback((startYear) => {
|
|
656
657
|
setDisplayMonth((prev) => new Date(startYear, prev.getMonth(), 1));
|
|
657
658
|
}, []);
|
|
658
|
-
const handleDayClick =
|
|
659
|
+
const handleDayClick = React15.useCallback(
|
|
659
660
|
(date, modifiers, e) => {
|
|
660
661
|
if (modifiers.outside) {
|
|
661
662
|
const newMonth = new Date(date.getFullYear(), date.getMonth(), 1);
|
|
@@ -670,7 +671,7 @@ function Calendar({
|
|
|
670
671
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
671
672
|
[handleMonthChange, dayPickerProps.onDayClick]
|
|
672
673
|
);
|
|
673
|
-
const contextValue =
|
|
674
|
+
const contextValue = React15.useMemo(
|
|
674
675
|
() => ({ setView: effectiveSetView, numberOfMonths, baseDisplayMonth: displayMonth }),
|
|
675
676
|
[effectiveSetView, numberOfMonths, displayMonth]
|
|
676
677
|
);
|
|
@@ -749,7 +750,7 @@ function Calendar({
|
|
|
749
750
|
}
|
|
750
751
|
);
|
|
751
752
|
}
|
|
752
|
-
var CheckboxSectionGroupContext =
|
|
753
|
+
var CheckboxSectionGroupContext = React15.createContext(
|
|
753
754
|
null
|
|
754
755
|
);
|
|
755
756
|
function CheckboxSectionGroup({
|
|
@@ -761,7 +762,7 @@ function CheckboxSectionGroup({
|
|
|
761
762
|
children,
|
|
762
763
|
...props
|
|
763
764
|
}) {
|
|
764
|
-
const count =
|
|
765
|
+
const count = React15.Children.count(children);
|
|
765
766
|
const stacked = orientation === "horizontal" && count >= 5;
|
|
766
767
|
const effectiveOrientation = stacked ? "vertical" : orientation;
|
|
767
768
|
const layoutClass = effectiveOrientation === "vertical" ? "flex flex-col" : count === 4 ? "grid w-full grid-cols-2" : count === 3 ? "grid w-full grid-cols-3" : count === 2 ? "grid w-full grid-cols-2" : "flex w-full";
|
|
@@ -819,7 +820,7 @@ function CheckboxSection({
|
|
|
819
820
|
onClick,
|
|
820
821
|
...props
|
|
821
822
|
}) {
|
|
822
|
-
const group =
|
|
823
|
+
const group = React15.useContext(CheckboxSectionGroupContext);
|
|
823
824
|
const checked = group?.value.includes(value) ?? false;
|
|
824
825
|
const disabled = disabledProp || Boolean(group?.disabled);
|
|
825
826
|
const stacked = Boolean(group?.stacked);
|
|
@@ -942,9 +943,9 @@ function normalizeFilterValue(column, value) {
|
|
|
942
943
|
const numericValue = Number(value);
|
|
943
944
|
return Number.isFinite(numericValue) ? numericValue : value;
|
|
944
945
|
}
|
|
945
|
-
var ColumnFilterContext =
|
|
946
|
+
var ColumnFilterContext = React15.createContext(null);
|
|
946
947
|
function useColumnFilter() {
|
|
947
|
-
const context =
|
|
948
|
+
const context = React15.useContext(ColumnFilterContext);
|
|
948
949
|
if (!context) {
|
|
949
950
|
throw new Error("useColumnFilter must be used within a ColumnFilterProvider");
|
|
950
951
|
}
|
|
@@ -965,24 +966,24 @@ function ColumnFilter({
|
|
|
965
966
|
operatorsByColumn,
|
|
966
967
|
children
|
|
967
968
|
}) {
|
|
968
|
-
const [internalFilters, setInternalFilters] =
|
|
969
|
+
const [internalFilters, setInternalFilters] = React15.useState([]);
|
|
969
970
|
const filters = value ?? internalFilters;
|
|
970
|
-
const [searchQuery, setSearchQueryState] =
|
|
971
|
-
const [editingFilter, setEditingFilter] =
|
|
972
|
-
const [editingFilterId, setEditingFilterId] =
|
|
973
|
-
const [activePopover, setActivePopover] =
|
|
974
|
-
const [popoverTrigger, setPopoverTrigger] =
|
|
975
|
-
const [popoverPosition, setPopoverPosition] =
|
|
976
|
-
const reactId =
|
|
977
|
-
const idPrefix =
|
|
978
|
-
const [columnSuggestionIndex, setColumnSuggestionIndex] =
|
|
979
|
-
const [autocompleteFocusMode, setAutocompleteFocusMode] =
|
|
980
|
-
const [valueSuggestions, setValueSuggestions] =
|
|
981
|
-
const [valueSuggestionsLoading, setValueSuggestionsLoading] =
|
|
982
|
-
const [valueSuggestionIndex, setValueSuggestionIndex] =
|
|
983
|
-
const requestIdRef =
|
|
984
|
-
const fetchSuggestionsRef =
|
|
985
|
-
|
|
971
|
+
const [searchQuery, setSearchQueryState] = React15.useState("");
|
|
972
|
+
const [editingFilter, setEditingFilter] = React15.useState(null);
|
|
973
|
+
const [editingFilterId, setEditingFilterId] = React15.useState(null);
|
|
974
|
+
const [activePopover, setActivePopover] = React15.useState(null);
|
|
975
|
+
const [popoverTrigger, setPopoverTrigger] = React15.useState(null);
|
|
976
|
+
const [popoverPosition, setPopoverPosition] = React15.useState(null);
|
|
977
|
+
const reactId = React15.useId();
|
|
978
|
+
const idPrefix = React15.useMemo(() => `column-filter-${reactId.replace(/:/g, "")}`, [reactId]);
|
|
979
|
+
const [columnSuggestionIndex, setColumnSuggestionIndex] = React15.useState(-1);
|
|
980
|
+
const [autocompleteFocusMode, setAutocompleteFocusMode] = React15.useState("input");
|
|
981
|
+
const [valueSuggestions, setValueSuggestions] = React15.useState([]);
|
|
982
|
+
const [valueSuggestionsLoading, setValueSuggestionsLoading] = React15.useState(false);
|
|
983
|
+
const [valueSuggestionIndex, setValueSuggestionIndex] = React15.useState(-1);
|
|
984
|
+
const requestIdRef = React15.useRef(0);
|
|
985
|
+
const fetchSuggestionsRef = React15.useRef(null);
|
|
986
|
+
React15.useEffect(() => {
|
|
986
987
|
fetchSuggestionsRef.current = debounce(async (columnKey, query) => {
|
|
987
988
|
if (!getValueSuggestions) return;
|
|
988
989
|
const id = ++requestIdRef.current;
|
|
@@ -1003,7 +1004,7 @@ function ColumnFilter({
|
|
|
1003
1004
|
fetchSuggestionsRef.current?.cancel();
|
|
1004
1005
|
};
|
|
1005
1006
|
}, [getValueSuggestions]);
|
|
1006
|
-
|
|
1007
|
+
React15.useEffect(() => {
|
|
1007
1008
|
if (!editingFilter?.column || !editingFilter?.operator) {
|
|
1008
1009
|
setValueSuggestions([]);
|
|
1009
1010
|
setValueSuggestionsLoading(false);
|
|
@@ -1045,7 +1046,7 @@ function ColumnFilter({
|
|
|
1045
1046
|
columns,
|
|
1046
1047
|
getValueSuggestions
|
|
1047
1048
|
]);
|
|
1048
|
-
const addFilter =
|
|
1049
|
+
const addFilter = React15.useCallback(
|
|
1049
1050
|
(filter) => {
|
|
1050
1051
|
const newFilter = {
|
|
1051
1052
|
...filter,
|
|
@@ -1059,7 +1060,7 @@ function ColumnFilter({
|
|
|
1059
1060
|
},
|
|
1060
1061
|
[filters, value, onChange]
|
|
1061
1062
|
);
|
|
1062
|
-
const removeFilter =
|
|
1063
|
+
const removeFilter = React15.useCallback(
|
|
1063
1064
|
(id) => {
|
|
1064
1065
|
const newFilters = filters.filter((f) => f.id !== id);
|
|
1065
1066
|
if (value === void 0) {
|
|
@@ -1069,7 +1070,7 @@ function ColumnFilter({
|
|
|
1069
1070
|
},
|
|
1070
1071
|
[filters, value, onChange]
|
|
1071
1072
|
);
|
|
1072
|
-
const updateFilter =
|
|
1073
|
+
const updateFilter = React15.useCallback(
|
|
1073
1074
|
(id, updates) => {
|
|
1074
1075
|
const newFilters = filters.map((f) => f.id === id ? { ...f, ...updates } : f);
|
|
1075
1076
|
if (value === void 0) {
|
|
@@ -1079,14 +1080,14 @@ function ColumnFilter({
|
|
|
1079
1080
|
},
|
|
1080
1081
|
[filters, value, onChange]
|
|
1081
1082
|
);
|
|
1082
|
-
const setSearchQuery =
|
|
1083
|
+
const setSearchQuery = React15.useCallback(
|
|
1083
1084
|
(query) => {
|
|
1084
1085
|
setSearchQueryState(query);
|
|
1085
1086
|
onSearch?.(query);
|
|
1086
1087
|
},
|
|
1087
1088
|
[onSearch]
|
|
1088
1089
|
);
|
|
1089
|
-
const getConfiguredOperators =
|
|
1090
|
+
const getConfiguredOperators = React15.useCallback(
|
|
1090
1091
|
(column) => {
|
|
1091
1092
|
const columnOperators = operatorsByColumn?.[column.key];
|
|
1092
1093
|
if (columnOperators?.length) return columnOperators;
|
|
@@ -1096,7 +1097,7 @@ function ColumnFilter({
|
|
|
1096
1097
|
},
|
|
1097
1098
|
[operatorsByColumn, operatorsByType]
|
|
1098
1099
|
);
|
|
1099
|
-
const openPopover =
|
|
1100
|
+
const openPopover = React15.useCallback(
|
|
1100
1101
|
(type, position, trigger = null) => {
|
|
1101
1102
|
setPopoverTrigger(type ? trigger : null);
|
|
1102
1103
|
setAutocompleteFocusMode("input");
|
|
@@ -1107,12 +1108,12 @@ function ColumnFilter({
|
|
|
1107
1108
|
},
|
|
1108
1109
|
[]
|
|
1109
1110
|
);
|
|
1110
|
-
const closePopover =
|
|
1111
|
+
const closePopover = React15.useCallback(() => {
|
|
1111
1112
|
setActivePopover(null);
|
|
1112
1113
|
setPopoverTrigger(null);
|
|
1113
1114
|
setAutocompleteFocusMode("input");
|
|
1114
1115
|
}, []);
|
|
1115
|
-
const selectColumn =
|
|
1116
|
+
const selectColumn = React15.useCallback(
|
|
1116
1117
|
(columnKey) => {
|
|
1117
1118
|
const column = columns.find((c) => c.key === columnKey);
|
|
1118
1119
|
if (column) {
|
|
@@ -1131,7 +1132,7 @@ function ColumnFilter({
|
|
|
1131
1132
|
},
|
|
1132
1133
|
[columns, getConfiguredOperators, closePopover]
|
|
1133
1134
|
);
|
|
1134
|
-
const selectOperator =
|
|
1135
|
+
const selectOperator = React15.useCallback(
|
|
1135
1136
|
(operator) => {
|
|
1136
1137
|
setEditingFilter(
|
|
1137
1138
|
(prev) => prev ? {
|
|
@@ -1143,7 +1144,7 @@ function ColumnFilter({
|
|
|
1143
1144
|
},
|
|
1144
1145
|
[closePopover]
|
|
1145
1146
|
);
|
|
1146
|
-
const setEditingValue =
|
|
1147
|
+
const setEditingValue = React15.useCallback((newValue) => {
|
|
1147
1148
|
setEditingFilter(
|
|
1148
1149
|
(prev) => prev ? {
|
|
1149
1150
|
...prev,
|
|
@@ -1151,7 +1152,7 @@ function ColumnFilter({
|
|
|
1151
1152
|
} : null
|
|
1152
1153
|
);
|
|
1153
1154
|
}, []);
|
|
1154
|
-
const editExistingFilter =
|
|
1155
|
+
const editExistingFilter = React15.useCallback(
|
|
1155
1156
|
(id) => {
|
|
1156
1157
|
const filter = filters.find((f) => f.id === id);
|
|
1157
1158
|
if (!filter) return;
|
|
@@ -1165,7 +1166,7 @@ function ColumnFilter({
|
|
|
1165
1166
|
},
|
|
1166
1167
|
[filters, closePopover]
|
|
1167
1168
|
);
|
|
1168
|
-
const doCommitFilter =
|
|
1169
|
+
const doCommitFilter = React15.useCallback(
|
|
1169
1170
|
(overrideValue) => {
|
|
1170
1171
|
const valueToCommit = (overrideValue ?? editingFilter?.value)?.trim();
|
|
1171
1172
|
if (!editingFilter?.column || !editingFilter?.operator || !valueToCommit) return;
|
|
@@ -1194,8 +1195,8 @@ function ColumnFilter({
|
|
|
1194
1195
|
},
|
|
1195
1196
|
[editingFilter, editingFilterId, columns, addFilter, updateFilter, closePopover]
|
|
1196
1197
|
);
|
|
1197
|
-
const commitFilter =
|
|
1198
|
-
const selectValueSuggestion =
|
|
1198
|
+
const commitFilter = React15.useCallback(() => doCommitFilter(), [doCommitFilter]);
|
|
1199
|
+
const selectValueSuggestion = React15.useCallback(
|
|
1199
1200
|
(selectedValue) => {
|
|
1200
1201
|
doCommitFilter(selectedValue);
|
|
1201
1202
|
setValueSuggestions([]);
|
|
@@ -1205,7 +1206,7 @@ function ColumnFilter({
|
|
|
1205
1206
|
},
|
|
1206
1207
|
[doCommitFilter, closePopover]
|
|
1207
1208
|
);
|
|
1208
|
-
const cancelEditing =
|
|
1209
|
+
const cancelEditing = React15.useCallback(() => {
|
|
1209
1210
|
setEditingFilter(null);
|
|
1210
1211
|
setEditingFilterId(null);
|
|
1211
1212
|
closePopover();
|
|
@@ -1214,7 +1215,7 @@ function ColumnFilter({
|
|
|
1214
1215
|
setValueSuggestionIndex(-1);
|
|
1215
1216
|
fetchSuggestionsRef.current?.cancel();
|
|
1216
1217
|
}, [closePopover]);
|
|
1217
|
-
const resetFilters =
|
|
1218
|
+
const resetFilters = React15.useCallback(() => {
|
|
1218
1219
|
if (value === void 0) {
|
|
1219
1220
|
setInternalFilters([]);
|
|
1220
1221
|
}
|
|
@@ -1223,18 +1224,18 @@ function ColumnFilter({
|
|
|
1223
1224
|
onSearch?.("");
|
|
1224
1225
|
cancelEditing();
|
|
1225
1226
|
}, [value, onChange, onSearch, cancelEditing]);
|
|
1226
|
-
|
|
1227
|
+
React15.useEffect(() => {
|
|
1227
1228
|
if (editingFilterId && !filters.some((f) => f.id === editingFilterId)) {
|
|
1228
1229
|
cancelEditing();
|
|
1229
1230
|
}
|
|
1230
1231
|
}, [filters, editingFilterId, cancelEditing]);
|
|
1231
|
-
const getColumnByKey =
|
|
1232
|
+
const getColumnByKey = React15.useCallback(
|
|
1232
1233
|
(key) => {
|
|
1233
1234
|
return columns.find((c) => c.key === key);
|
|
1234
1235
|
},
|
|
1235
1236
|
[columns]
|
|
1236
1237
|
);
|
|
1237
|
-
const getOperatorsForColumn =
|
|
1238
|
+
const getOperatorsForColumn = React15.useCallback(
|
|
1238
1239
|
(columnKey) => {
|
|
1239
1240
|
const column = columns.find((c) => c.key === columnKey);
|
|
1240
1241
|
if (!column) return [];
|
|
@@ -1242,7 +1243,7 @@ function ColumnFilter({
|
|
|
1242
1243
|
},
|
|
1243
1244
|
[columns, getConfiguredOperators]
|
|
1244
1245
|
);
|
|
1245
|
-
const searchSuggestions =
|
|
1246
|
+
const searchSuggestions = React15.useMemo(() => {
|
|
1246
1247
|
if (!searchQuery.trim()) return [];
|
|
1247
1248
|
const query = searchQuery.trim().toLowerCase();
|
|
1248
1249
|
const startsWith = columns.filter((c) => c.label.toLowerCase().startsWith(query)).sort((a, b) => a.label.localeCompare(b.label, "ko"));
|
|
@@ -1251,16 +1252,16 @@ function ColumnFilter({
|
|
|
1251
1252
|
).sort((a, b) => a.label.localeCompare(b.label, "ko"));
|
|
1252
1253
|
return [...startsWith, ...includes];
|
|
1253
1254
|
}, [columns, searchQuery]);
|
|
1254
|
-
const [searchSuggestionIndex, setSearchSuggestionIndex] =
|
|
1255
|
+
const [searchSuggestionIndex, setSearchSuggestionIndex] = React15.useState(-1);
|
|
1255
1256
|
const hasSearchHandler = Boolean(onSearch);
|
|
1256
|
-
|
|
1257
|
+
React15.useEffect(() => {
|
|
1257
1258
|
setSearchSuggestionIndex(hasSearchHandler || searchSuggestions.length === 0 ? -1 : 0);
|
|
1258
1259
|
}, [searchQuery, hasSearchHandler, searchSuggestions.length]);
|
|
1259
|
-
|
|
1260
|
+
React15.useEffect(() => {
|
|
1260
1261
|
setColumnSuggestionIndex(-1);
|
|
1261
1262
|
setAutocompleteFocusMode("input");
|
|
1262
1263
|
}, [searchQuery, editingFilter?.column]);
|
|
1263
|
-
const selectSearchSuggestion =
|
|
1264
|
+
const selectSearchSuggestion = React15.useCallback(
|
|
1264
1265
|
(columnKey) => {
|
|
1265
1266
|
selectColumn(columnKey);
|
|
1266
1267
|
setSearchQueryState("");
|
|
@@ -1335,45 +1336,6 @@ function ColumnFilter({
|
|
|
1335
1336
|
) });
|
|
1336
1337
|
}
|
|
1337
1338
|
ColumnFilter.displayName = "ColumnFilter";
|
|
1338
|
-
var X_MASK = `url("data:image/svg+xml,${encodeURIComponent(
|
|
1339
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>'
|
|
1340
|
-
)}")`;
|
|
1341
|
-
var CancelIcon = React17.forwardRef(
|
|
1342
|
-
({ size = 20, className, iconClassName, ...props }, ref) => {
|
|
1343
|
-
let innerSize = Math.round(size * 0.75);
|
|
1344
|
-
if (size % 2 !== innerSize % 2) innerSize -= 1;
|
|
1345
|
-
return /* @__PURE__ */ jsx(
|
|
1346
|
-
"span",
|
|
1347
|
-
{
|
|
1348
|
-
ref,
|
|
1349
|
-
"aria-hidden": "true",
|
|
1350
|
-
className: cn(
|
|
1351
|
-
"inline-flex items-center justify-center align-middle rounded-full bg-current",
|
|
1352
|
-
className
|
|
1353
|
-
),
|
|
1354
|
-
style: { width: size, height: size },
|
|
1355
|
-
...props,
|
|
1356
|
-
children: /* @__PURE__ */ jsx(
|
|
1357
|
-
"span",
|
|
1358
|
-
{
|
|
1359
|
-
className: cn("block bg-current text-sys-background", iconClassName),
|
|
1360
|
-
style: {
|
|
1361
|
-
width: innerSize,
|
|
1362
|
-
height: innerSize,
|
|
1363
|
-
maskImage: X_MASK,
|
|
1364
|
-
WebkitMaskImage: X_MASK,
|
|
1365
|
-
maskSize: "contain",
|
|
1366
|
-
WebkitMaskSize: "contain"
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
)
|
|
1370
|
-
}
|
|
1371
|
-
);
|
|
1372
|
-
}
|
|
1373
|
-
);
|
|
1374
|
-
CancelIcon.displayName = "CancelIcon";
|
|
1375
|
-
var CLEAR_HOST_CLASS = "group/clear-host";
|
|
1376
|
-
var CLEAR_REVEAL_CLASS = "opacity-0 group-hover/clear-host:opacity-100 group-focus-within/clear-host:opacity-100 [@media(hover:none)]:opacity-100";
|
|
1377
1339
|
|
|
1378
1340
|
// src/utils/message.ts
|
|
1379
1341
|
var message = {
|
|
@@ -1383,7 +1345,7 @@ var message = {
|
|
|
1383
1345
|
}
|
|
1384
1346
|
};
|
|
1385
1347
|
var message_default = message;
|
|
1386
|
-
var Command =
|
|
1348
|
+
var Command = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1387
1349
|
Command$1,
|
|
1388
1350
|
{
|
|
1389
1351
|
ref,
|
|
@@ -1405,7 +1367,7 @@ var CommandDialog = ({ children, title = "\uBA85\uB839 \uAC80\uC0C9", ...props }
|
|
|
1405
1367
|
/* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-[8px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-sys-text-subtle [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-[8px] [&_[cmdk-input-wrapper]_svg]:h-[20px] [&_[cmdk-input-wrapper]_svg]:w-[20px] [&_[cmdk-input]]:h-[48px] [&_[cmdk-item]]:px-[8px] [&_[cmdk-item]]:py-[12px] [&_[cmdk-item]_svg]:h-[20px] [&_[cmdk-item]_svg]:w-[20px]", children })
|
|
1406
1368
|
] }) });
|
|
1407
1369
|
};
|
|
1408
|
-
var CommandInput =
|
|
1370
|
+
var CommandInput = React15.forwardRef(
|
|
1409
1371
|
({ className, wrapperClassName, iconClassName, placeholder, "aria-label": ariaLabel, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1410
1372
|
"div",
|
|
1411
1373
|
{
|
|
@@ -1439,7 +1401,7 @@ var CommandInput = React17.forwardRef(
|
|
|
1439
1401
|
)
|
|
1440
1402
|
);
|
|
1441
1403
|
CommandInput.displayName = Command$1.Input.displayName;
|
|
1442
|
-
var CommandList =
|
|
1404
|
+
var CommandList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1443
1405
|
Command$1.List,
|
|
1444
1406
|
{
|
|
1445
1407
|
ref,
|
|
@@ -1448,7 +1410,7 @@ var CommandList = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1448
1410
|
}
|
|
1449
1411
|
));
|
|
1450
1412
|
CommandList.displayName = Command$1.List.displayName;
|
|
1451
|
-
var CommandEmpty =
|
|
1413
|
+
var CommandEmpty = React15.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
1452
1414
|
Command$1.Empty,
|
|
1453
1415
|
{
|
|
1454
1416
|
ref,
|
|
@@ -1461,7 +1423,7 @@ var CommandEmpty = React17.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
1461
1423
|
}
|
|
1462
1424
|
));
|
|
1463
1425
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
1464
|
-
var CommandGroup =
|
|
1426
|
+
var CommandGroup = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1465
1427
|
Command$1.Group,
|
|
1466
1428
|
{
|
|
1467
1429
|
ref,
|
|
@@ -1473,7 +1435,7 @@ var CommandGroup = React17.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1473
1435
|
}
|
|
1474
1436
|
));
|
|
1475
1437
|
CommandGroup.displayName = Command$1.Group.displayName;
|
|
1476
|
-
var CommandSeparator =
|
|
1438
|
+
var CommandSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1477
1439
|
Command$1.Separator,
|
|
1478
1440
|
{
|
|
1479
1441
|
ref,
|
|
@@ -1483,7 +1445,7 @@ var CommandSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1483
1445
|
}
|
|
1484
1446
|
));
|
|
1485
1447
|
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
1486
|
-
var CommandItem =
|
|
1448
|
+
var CommandItem = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1487
1449
|
Command$1.Item,
|
|
1488
1450
|
{
|
|
1489
1451
|
ref,
|
|
@@ -1590,9 +1552,9 @@ function getTableFilterTextSlotClassName({
|
|
|
1590
1552
|
className
|
|
1591
1553
|
);
|
|
1592
1554
|
}
|
|
1593
|
-
var TableFilterTriggerButton =
|
|
1555
|
+
var TableFilterTriggerButton = React15.forwardRef(
|
|
1594
1556
|
({ isSelected = false, isPlaceholder = false, rightIcon, className, children, ...props }, ref) => {
|
|
1595
|
-
const textId =
|
|
1557
|
+
const textId = React15.useId();
|
|
1596
1558
|
return /* @__PURE__ */ jsxs(
|
|
1597
1559
|
Button,
|
|
1598
1560
|
{
|
|
@@ -1614,7 +1576,7 @@ var TableFilterTriggerButton = React17.forwardRef(
|
|
|
1614
1576
|
}
|
|
1615
1577
|
);
|
|
1616
1578
|
TableFilterTriggerButton.displayName = "TableFilterTriggerButton";
|
|
1617
|
-
var TableFilterSearchInput =
|
|
1579
|
+
var TableFilterSearchInput = React15.forwardRef(({ className, wrapperClassName, iconClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1618
1580
|
CommandInput,
|
|
1619
1581
|
{
|
|
1620
1582
|
ref,
|
|
@@ -1625,7 +1587,7 @@ var TableFilterSearchInput = React17.forwardRef(({ className, wrapperClassName,
|
|
|
1625
1587
|
}
|
|
1626
1588
|
));
|
|
1627
1589
|
TableFilterSearchInput.displayName = "TableFilterSearchInput";
|
|
1628
|
-
var TableFilterCommandItem =
|
|
1590
|
+
var TableFilterCommandItem = React15.forwardRef(({ kind = "default", isSelected = false, className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1629
1591
|
CommandItem,
|
|
1630
1592
|
{
|
|
1631
1593
|
ref,
|
|
@@ -1635,7 +1597,7 @@ var TableFilterCommandItem = React17.forwardRef(({ kind = "default", isSelected
|
|
|
1635
1597
|
}
|
|
1636
1598
|
));
|
|
1637
1599
|
TableFilterCommandItem.displayName = "TableFilterCommandItem";
|
|
1638
|
-
var TableFilterCheckboxCommandItem =
|
|
1600
|
+
var TableFilterCheckboxCommandItem = React15.forwardRef(({ checked, children, className, contentClassName, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1639
1601
|
TableFilterCommandItem,
|
|
1640
1602
|
{
|
|
1641
1603
|
ref,
|
|
@@ -1719,10 +1681,10 @@ function ColumnSelectPopover() {
|
|
|
1719
1681
|
autocompleteFocusMode,
|
|
1720
1682
|
setAutocompleteFocusMode
|
|
1721
1683
|
} = useColumnFilter();
|
|
1722
|
-
const popoverRef =
|
|
1723
|
-
const columnItemRefs =
|
|
1724
|
-
const [hoveredColumn, setHoveredColumn] =
|
|
1725
|
-
const [focusedColumnIndex, setFocusedColumnIndex] =
|
|
1684
|
+
const popoverRef = React15.useRef(null);
|
|
1685
|
+
const columnItemRefs = React15.useRef([]);
|
|
1686
|
+
const [hoveredColumn, setHoveredColumn] = React15.useState(null);
|
|
1687
|
+
const [focusedColumnIndex, setFocusedColumnIndex] = React15.useState(0);
|
|
1726
1688
|
const hoveredColumnDef = hoveredColumn ? columns.find((c) => c.key === hoveredColumn) : null;
|
|
1727
1689
|
const hasAnyDescription = columns.some((c) => c.description);
|
|
1728
1690
|
const isInputDriven = popoverTrigger === "input";
|
|
@@ -1731,18 +1693,18 @@ function ColumnSelectPopover() {
|
|
|
1731
1693
|
editingFilter?.column ? columns.findIndex((column) => column.key === editingFilter.column) : 0
|
|
1732
1694
|
);
|
|
1733
1695
|
const activeColumnIndex = isInputDriven ? columnSuggestionIndex >= 0 ? columnSuggestionIndex : 0 : focusedColumnIndex;
|
|
1734
|
-
const focusInput =
|
|
1696
|
+
const focusInput = React15.useCallback(() => {
|
|
1735
1697
|
requestAnimationFrame(() => {
|
|
1736
1698
|
document.getElementById(ids.inputId)?.focus();
|
|
1737
1699
|
});
|
|
1738
1700
|
}, [ids.inputId]);
|
|
1739
|
-
const focusNextAfterColumn =
|
|
1701
|
+
const focusNextAfterColumn = React15.useCallback(() => {
|
|
1740
1702
|
requestAnimationFrame(() => {
|
|
1741
1703
|
const nextElement = document.querySelector("[data-column-filter-value-input]") ?? document.querySelector("[data-operator-button]") ?? document.getElementById(ids.inputId);
|
|
1742
1704
|
nextElement?.focus();
|
|
1743
1705
|
});
|
|
1744
1706
|
}, [ids.inputId]);
|
|
1745
|
-
const focusColumnItem =
|
|
1707
|
+
const focusColumnItem = React15.useCallback(
|
|
1746
1708
|
(index) => {
|
|
1747
1709
|
if (columns.length === 0) return;
|
|
1748
1710
|
const nextIndex = (index % columns.length + columns.length) % columns.length;
|
|
@@ -1758,11 +1720,11 @@ function ColumnSelectPopover() {
|
|
|
1758
1720
|
},
|
|
1759
1721
|
[columns, isInputDriven, setAutocompleteFocusMode, setColumnSuggestionIndex]
|
|
1760
1722
|
);
|
|
1761
|
-
const returnFocusToInput =
|
|
1723
|
+
const returnFocusToInput = React15.useCallback(() => {
|
|
1762
1724
|
setAutocompleteFocusMode("input");
|
|
1763
1725
|
focusInput();
|
|
1764
1726
|
}, [focusInput, setAutocompleteFocusMode]);
|
|
1765
|
-
|
|
1727
|
+
React15.useEffect(() => {
|
|
1766
1728
|
if (activePopover !== "column" || columns.length === 0) return;
|
|
1767
1729
|
if (isInputDriven) {
|
|
1768
1730
|
const nextIndex = columnSuggestionIndex >= 0 ? columnSuggestionIndex : 0;
|
|
@@ -1783,13 +1745,13 @@ function ColumnSelectPopover() {
|
|
|
1783
1745
|
columnSuggestionIndex,
|
|
1784
1746
|
setColumnSuggestionIndex
|
|
1785
1747
|
]);
|
|
1786
|
-
|
|
1748
|
+
React15.useEffect(() => {
|
|
1787
1749
|
if (activePopover !== "column") return;
|
|
1788
1750
|
requestAnimationFrame(() => {
|
|
1789
1751
|
popoverRef.current?.querySelector('[aria-selected="true"]')?.scrollIntoView({ block: "nearest" });
|
|
1790
1752
|
});
|
|
1791
1753
|
}, [activePopover]);
|
|
1792
|
-
|
|
1754
|
+
React15.useEffect(() => {
|
|
1793
1755
|
if (activePopover !== "column") return;
|
|
1794
1756
|
const handleClickOutside = (e) => {
|
|
1795
1757
|
const target = e.target;
|
|
@@ -1953,26 +1915,26 @@ function OperatorSelectPopover() {
|
|
|
1953
1915
|
popoverPosition,
|
|
1954
1916
|
ids
|
|
1955
1917
|
} = useColumnFilter();
|
|
1956
|
-
const popoverRef =
|
|
1957
|
-
const operatorItemRefs =
|
|
1958
|
-
const [focusedOperatorIndex, setFocusedOperatorIndex] =
|
|
1918
|
+
const popoverRef = React15.useRef(null);
|
|
1919
|
+
const operatorItemRefs = React15.useRef([]);
|
|
1920
|
+
const [focusedOperatorIndex, setFocusedOperatorIndex] = React15.useState(0);
|
|
1959
1921
|
const operators = editingFilter?.column ? getOperatorsForColumn(editingFilter.column) : [];
|
|
1960
1922
|
const selectedOperatorIndex = Math.max(
|
|
1961
1923
|
0,
|
|
1962
1924
|
editingFilter?.operator ? operators.indexOf(editingFilter.operator) : 0
|
|
1963
1925
|
);
|
|
1964
|
-
const focusOperatorButton =
|
|
1926
|
+
const focusOperatorButton = React15.useCallback(() => {
|
|
1965
1927
|
requestAnimationFrame(() => {
|
|
1966
1928
|
document.querySelector("[data-operator-button]")?.focus();
|
|
1967
1929
|
});
|
|
1968
1930
|
}, []);
|
|
1969
|
-
const focusNextAfterOperator =
|
|
1931
|
+
const focusNextAfterOperator = React15.useCallback(() => {
|
|
1970
1932
|
requestAnimationFrame(() => {
|
|
1971
1933
|
const nextElement = document.querySelector("[data-column-filter-value-input]") ?? document.querySelector("[data-editing-cancel-button]") ?? document.querySelector("[data-column-filter-reset-button]");
|
|
1972
1934
|
nextElement?.focus();
|
|
1973
1935
|
});
|
|
1974
1936
|
}, []);
|
|
1975
|
-
const focusOperatorItem =
|
|
1937
|
+
const focusOperatorItem = React15.useCallback(
|
|
1976
1938
|
(index) => {
|
|
1977
1939
|
if (operators.length === 0) return;
|
|
1978
1940
|
const nextIndex = (index + operators.length) % operators.length;
|
|
@@ -1983,14 +1945,14 @@ function OperatorSelectPopover() {
|
|
|
1983
1945
|
},
|
|
1984
1946
|
[operators.length]
|
|
1985
1947
|
);
|
|
1986
|
-
|
|
1948
|
+
React15.useEffect(() => {
|
|
1987
1949
|
if (activePopover !== "operator" || operators.length === 0) return;
|
|
1988
1950
|
setFocusedOperatorIndex(selectedOperatorIndex);
|
|
1989
1951
|
requestAnimationFrame(() => {
|
|
1990
1952
|
operatorItemRefs.current[selectedOperatorIndex]?.focus();
|
|
1991
1953
|
});
|
|
1992
1954
|
}, [activePopover, operators.length, selectedOperatorIndex]);
|
|
1993
|
-
|
|
1955
|
+
React15.useEffect(() => {
|
|
1994
1956
|
if (activePopover !== "operator") return;
|
|
1995
1957
|
const handleClickOutside = (e) => {
|
|
1996
1958
|
if (popoverRef.current && !popoverRef.current.contains(e.target)) {
|
|
@@ -2112,14 +2074,14 @@ function SearchSuggestionPopover() {
|
|
|
2112
2074
|
autocompleteFocusMode,
|
|
2113
2075
|
setAutocompleteFocusMode
|
|
2114
2076
|
} = useColumnFilter();
|
|
2115
|
-
const popoverRef =
|
|
2116
|
-
const suggestionItemRefs =
|
|
2117
|
-
const focusInput =
|
|
2077
|
+
const popoverRef = React15.useRef(null);
|
|
2078
|
+
const suggestionItemRefs = React15.useRef([]);
|
|
2079
|
+
const focusInput = React15.useCallback(() => {
|
|
2118
2080
|
requestAnimationFrame(() => {
|
|
2119
2081
|
document.getElementById(ids.inputId)?.focus();
|
|
2120
2082
|
});
|
|
2121
2083
|
}, [ids.inputId]);
|
|
2122
|
-
const focusSearchItem =
|
|
2084
|
+
const focusSearchItem = React15.useCallback(
|
|
2123
2085
|
(index) => {
|
|
2124
2086
|
if (searchSuggestions.length === 0) return;
|
|
2125
2087
|
const nextIndex = (index % searchSuggestions.length + searchSuggestions.length) % searchSuggestions.length;
|
|
@@ -2131,11 +2093,11 @@ function SearchSuggestionPopover() {
|
|
|
2131
2093
|
},
|
|
2132
2094
|
[searchSuggestions.length, setAutocompleteFocusMode, setSearchSuggestionIndex]
|
|
2133
2095
|
);
|
|
2134
|
-
const returnFocusToInput =
|
|
2096
|
+
const returnFocusToInput = React15.useCallback(() => {
|
|
2135
2097
|
setAutocompleteFocusMode("input");
|
|
2136
2098
|
focusInput();
|
|
2137
2099
|
}, [focusInput, setAutocompleteFocusMode]);
|
|
2138
|
-
|
|
2100
|
+
React15.useEffect(() => {
|
|
2139
2101
|
if (activePopover !== "search") return;
|
|
2140
2102
|
const handleClickOutside = (e) => {
|
|
2141
2103
|
const target = e.target;
|
|
@@ -2257,14 +2219,14 @@ function ValueSuggestionPopover() {
|
|
|
2257
2219
|
autocompleteFocusMode,
|
|
2258
2220
|
setAutocompleteFocusMode
|
|
2259
2221
|
} = useColumnFilter();
|
|
2260
|
-
const popoverRef =
|
|
2261
|
-
const suggestionItemRefs =
|
|
2262
|
-
const focusInput =
|
|
2222
|
+
const popoverRef = React15.useRef(null);
|
|
2223
|
+
const suggestionItemRefs = React15.useRef([]);
|
|
2224
|
+
const focusInput = React15.useCallback(() => {
|
|
2263
2225
|
requestAnimationFrame(() => {
|
|
2264
2226
|
document.getElementById(ids.inputId)?.focus();
|
|
2265
2227
|
});
|
|
2266
2228
|
}, [ids.inputId]);
|
|
2267
|
-
const focusValueItem =
|
|
2229
|
+
const focusValueItem = React15.useCallback(
|
|
2268
2230
|
(index) => {
|
|
2269
2231
|
if (valueSuggestions.length === 0) return;
|
|
2270
2232
|
const nextIndex = (index % valueSuggestions.length + valueSuggestions.length) % valueSuggestions.length;
|
|
@@ -2276,11 +2238,11 @@ function ValueSuggestionPopover() {
|
|
|
2276
2238
|
},
|
|
2277
2239
|
[setAutocompleteFocusMode, setValueSuggestionIndex, valueSuggestions.length]
|
|
2278
2240
|
);
|
|
2279
|
-
const returnFocusToInput =
|
|
2241
|
+
const returnFocusToInput = React15.useCallback(() => {
|
|
2280
2242
|
setAutocompleteFocusMode("input");
|
|
2281
2243
|
focusInput();
|
|
2282
2244
|
}, [focusInput, setAutocompleteFocusMode]);
|
|
2283
|
-
|
|
2245
|
+
React15.useEffect(() => {
|
|
2284
2246
|
if (activePopover !== "value") return;
|
|
2285
2247
|
const handleClickOutside = (e) => {
|
|
2286
2248
|
const target = e.target;
|
|
@@ -2431,7 +2393,7 @@ function ColumnFilterTag({
|
|
|
2431
2393
|
const filterValue = String(filter.value);
|
|
2432
2394
|
const tooltipLabel = `${columnLabel} ${operatorLabel} ${filterValue}`;
|
|
2433
2395
|
const textColorClass = isInvalid ? "text-danger50" : "text-primary50";
|
|
2434
|
-
const handleRemove =
|
|
2396
|
+
const handleRemove = React15.useCallback(
|
|
2435
2397
|
(e) => {
|
|
2436
2398
|
e.stopPropagation();
|
|
2437
2399
|
removeFilter(filter.id);
|
|
@@ -2439,7 +2401,7 @@ function ColumnFilterTag({
|
|
|
2439
2401
|
},
|
|
2440
2402
|
[filter.id, removeFilter, onRemoved]
|
|
2441
2403
|
);
|
|
2442
|
-
const handleEdit =
|
|
2404
|
+
const handleEdit = React15.useCallback(
|
|
2443
2405
|
(e) => {
|
|
2444
2406
|
e.stopPropagation();
|
|
2445
2407
|
editExistingFilter(filter.id);
|
|
@@ -2759,11 +2721,11 @@ function ColumnFilterInput({
|
|
|
2759
2721
|
setSearchSuggestionIndex,
|
|
2760
2722
|
selectSearchSuggestion
|
|
2761
2723
|
} = useColumnFilter();
|
|
2762
|
-
const inputRef =
|
|
2763
|
-
const containerRef =
|
|
2764
|
-
const measureRef =
|
|
2765
|
-
const [inputWidth, setInputWidth] =
|
|
2766
|
-
const openPopoverFromElement =
|
|
2724
|
+
const inputRef = React15.useRef(null);
|
|
2725
|
+
const containerRef = React15.useRef(null);
|
|
2726
|
+
const measureRef = React15.useRef(null);
|
|
2727
|
+
const [inputWidth, setInputWidth] = React15.useState(4);
|
|
2728
|
+
const openPopoverFromElement = React15.useCallback(
|
|
2767
2729
|
(type, element, trigger = "input") => {
|
|
2768
2730
|
const rect = element?.getBoundingClientRect();
|
|
2769
2731
|
if (!rect) return;
|
|
@@ -2771,12 +2733,12 @@ function ColumnFilterInput({
|
|
|
2771
2733
|
},
|
|
2772
2734
|
[openPopover]
|
|
2773
2735
|
);
|
|
2774
|
-
const focusOptionById =
|
|
2736
|
+
const focusOptionById = React15.useCallback((id) => {
|
|
2775
2737
|
requestAnimationFrame(() => {
|
|
2776
2738
|
document.getElementById(id)?.focus();
|
|
2777
2739
|
});
|
|
2778
2740
|
}, []);
|
|
2779
|
-
const focusColumnSuggestion =
|
|
2741
|
+
const focusColumnSuggestion = React15.useCallback(
|
|
2780
2742
|
(index) => {
|
|
2781
2743
|
if (columns.length === 0) return;
|
|
2782
2744
|
const nextIndex = (index % columns.length + columns.length) % columns.length;
|
|
@@ -2786,7 +2748,7 @@ function ColumnFilterInput({
|
|
|
2786
2748
|
},
|
|
2787
2749
|
[columns.length, focusOptionById, ids, setAutocompleteFocusMode, setColumnSuggestionIndex]
|
|
2788
2750
|
);
|
|
2789
|
-
const focusSearchSuggestion =
|
|
2751
|
+
const focusSearchSuggestion = React15.useCallback(
|
|
2790
2752
|
(index) => {
|
|
2791
2753
|
if (searchSuggestions.length === 0) return;
|
|
2792
2754
|
const nextIndex = (index % searchSuggestions.length + searchSuggestions.length) % searchSuggestions.length;
|
|
@@ -2802,7 +2764,7 @@ function ColumnFilterInput({
|
|
|
2802
2764
|
setSearchSuggestionIndex
|
|
2803
2765
|
]
|
|
2804
2766
|
);
|
|
2805
|
-
const focusValueSuggestion =
|
|
2767
|
+
const focusValueSuggestion = React15.useCallback(
|
|
2806
2768
|
(index) => {
|
|
2807
2769
|
if (valueSuggestions.length === 0) return;
|
|
2808
2770
|
const nextIndex = (index % valueSuggestions.length + valueSuggestions.length) % valueSuggestions.length;
|
|
@@ -2818,8 +2780,8 @@ function ColumnFilterInput({
|
|
|
2818
2780
|
valueSuggestions.length
|
|
2819
2781
|
]
|
|
2820
2782
|
);
|
|
2821
|
-
const wasEditingRef =
|
|
2822
|
-
|
|
2783
|
+
const wasEditingRef = React15.useRef(false);
|
|
2784
|
+
React15.useEffect(() => {
|
|
2823
2785
|
const editing = Boolean(editingFilter || editingFilterId);
|
|
2824
2786
|
const shouldRestore = wasEditingRef.current && !editing;
|
|
2825
2787
|
wasEditingRef.current = editing;
|
|
@@ -2829,7 +2791,7 @@ function ColumnFilterInput({
|
|
|
2829
2791
|
}, 0);
|
|
2830
2792
|
return () => clearTimeout(timerId);
|
|
2831
2793
|
}, [editingFilter, editingFilterId]);
|
|
2832
|
-
|
|
2794
|
+
React15.useEffect(() => {
|
|
2833
2795
|
if (editingFilter?.operator) {
|
|
2834
2796
|
inputRef.current?.focus();
|
|
2835
2797
|
inputRef.current?.select();
|
|
@@ -2850,7 +2812,7 @@ function ColumnFilterInput({
|
|
|
2850
2812
|
getColumnByKey,
|
|
2851
2813
|
openPopoverFromElement
|
|
2852
2814
|
]);
|
|
2853
|
-
|
|
2815
|
+
React15.useEffect(() => {
|
|
2854
2816
|
if (measureRef.current) {
|
|
2855
2817
|
const width = measureRef.current.offsetWidth;
|
|
2856
2818
|
setInputWidth(Math.max(4, width));
|
|
@@ -2859,7 +2821,7 @@ function ColumnFilterInput({
|
|
|
2859
2821
|
const editingColumnLabel = editingFilter?.column ? getColumnByKey(editingFilter.column)?.label || editingFilter.column : null;
|
|
2860
2822
|
const editingOperatorLabel = editingFilter?.operator ? OPERATOR_LABELS[editingFilter.operator] : "?";
|
|
2861
2823
|
const inputValue = editingFilter ? editingFilter.value || "" : searchQuery;
|
|
2862
|
-
const handleInputChange =
|
|
2824
|
+
const handleInputChange = React15.useCallback(
|
|
2863
2825
|
(e) => {
|
|
2864
2826
|
const value = e.target.value;
|
|
2865
2827
|
setAutocompleteFocusMode("input");
|
|
@@ -2884,7 +2846,7 @@ function ColumnFilterInput({
|
|
|
2884
2846
|
closePopover
|
|
2885
2847
|
]
|
|
2886
2848
|
);
|
|
2887
|
-
const handleKeyDown =
|
|
2849
|
+
const handleKeyDown = React15.useCallback(
|
|
2888
2850
|
(e) => {
|
|
2889
2851
|
if (e.key === "Tab") {
|
|
2890
2852
|
if (activePopover) closePopover();
|
|
@@ -3061,13 +3023,13 @@ function ColumnFilterInput({
|
|
|
3061
3023
|
searchQuery
|
|
3062
3024
|
]
|
|
3063
3025
|
);
|
|
3064
|
-
const handleEditingCancel =
|
|
3026
|
+
const handleEditingCancel = React15.useCallback(() => {
|
|
3065
3027
|
if (editingFilterId) {
|
|
3066
3028
|
removeFilter(editingFilterId);
|
|
3067
3029
|
}
|
|
3068
3030
|
cancelEditing();
|
|
3069
3031
|
}, [editingFilterId, removeFilter, cancelEditing]);
|
|
3070
|
-
const openContextualPopover =
|
|
3032
|
+
const openContextualPopover = React15.useCallback(() => {
|
|
3071
3033
|
if (searchQuery.trim() && searchSuggestions.length > 0) {
|
|
3072
3034
|
openPopoverFromElement("search", inputRef.current, "input");
|
|
3073
3035
|
} else {
|
|
@@ -3081,7 +3043,7 @@ function ColumnFilterInput({
|
|
|
3081
3043
|
columnSuggestionIndex,
|
|
3082
3044
|
setColumnSuggestionIndex
|
|
3083
3045
|
]);
|
|
3084
|
-
const reopenColumnPopover =
|
|
3046
|
+
const reopenColumnPopover = React15.useCallback(() => {
|
|
3085
3047
|
requestAnimationFrame(() => {
|
|
3086
3048
|
if (!inputRef.current) return;
|
|
3087
3049
|
inputRef.current.focus();
|
|
@@ -3089,24 +3051,24 @@ function ColumnFilterInput({
|
|
|
3089
3051
|
setColumnSuggestionIndex(columnSuggestionIndex >= 0 ? columnSuggestionIndex : 0);
|
|
3090
3052
|
});
|
|
3091
3053
|
}, [openPopoverFromElement, columnSuggestionIndex, setColumnSuggestionIndex]);
|
|
3092
|
-
const reopenContextualPopover =
|
|
3054
|
+
const reopenContextualPopover = React15.useCallback(() => {
|
|
3093
3055
|
requestAnimationFrame(() => {
|
|
3094
3056
|
if (!inputRef.current) return;
|
|
3095
3057
|
inputRef.current.focus();
|
|
3096
3058
|
openContextualPopover();
|
|
3097
3059
|
});
|
|
3098
3060
|
}, [openContextualPopover]);
|
|
3099
|
-
const handleSearchInputClick =
|
|
3061
|
+
const handleSearchInputClick = React15.useCallback(() => {
|
|
3100
3062
|
if (editingFilter) return;
|
|
3101
3063
|
if (activePopover && !(activePopover === "search" && searchSuggestions.length === 0)) return;
|
|
3102
3064
|
openContextualPopover();
|
|
3103
3065
|
}, [editingFilter, activePopover, searchSuggestions.length, openContextualPopover]);
|
|
3104
|
-
const handleContainerMouseDown =
|
|
3066
|
+
const handleContainerMouseDown = React15.useCallback((e) => {
|
|
3105
3067
|
if (isInteractiveTarget(e)) return;
|
|
3106
3068
|
e.preventDefault();
|
|
3107
3069
|
inputRef.current?.focus();
|
|
3108
3070
|
}, []);
|
|
3109
|
-
const handleContainerClick =
|
|
3071
|
+
const handleContainerClick = React15.useCallback(
|
|
3110
3072
|
(e) => {
|
|
3111
3073
|
if (isInteractiveTarget(e)) return;
|
|
3112
3074
|
if (editingFilter) return;
|
|
@@ -3114,7 +3076,7 @@ function ColumnFilterInput({
|
|
|
3114
3076
|
},
|
|
3115
3077
|
[editingFilter, handleSearchInputClick]
|
|
3116
3078
|
);
|
|
3117
|
-
const handleColumnButtonClick =
|
|
3079
|
+
const handleColumnButtonClick = React15.useCallback(
|
|
3118
3080
|
(e) => {
|
|
3119
3081
|
e.stopPropagation();
|
|
3120
3082
|
if (activePopover === "column") {
|
|
@@ -3125,7 +3087,7 @@ function ColumnFilterInput({
|
|
|
3125
3087
|
},
|
|
3126
3088
|
[activePopover, openPopoverFromElement, closePopover]
|
|
3127
3089
|
);
|
|
3128
|
-
const handleColumnButtonKeyDown =
|
|
3090
|
+
const handleColumnButtonKeyDown = React15.useCallback(
|
|
3129
3091
|
(e) => {
|
|
3130
3092
|
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
3131
3093
|
e.preventDefault();
|
|
@@ -3134,7 +3096,7 @@ function ColumnFilterInput({
|
|
|
3134
3096
|
},
|
|
3135
3097
|
[openPopoverFromElement]
|
|
3136
3098
|
);
|
|
3137
|
-
const handleOperatorButtonClick =
|
|
3099
|
+
const handleOperatorButtonClick = React15.useCallback(
|
|
3138
3100
|
(e) => {
|
|
3139
3101
|
e.stopPropagation();
|
|
3140
3102
|
if (activePopover === "operator") {
|
|
@@ -3145,7 +3107,7 @@ function ColumnFilterInput({
|
|
|
3145
3107
|
},
|
|
3146
3108
|
[activePopover, openPopoverFromElement, closePopover]
|
|
3147
3109
|
);
|
|
3148
|
-
const handleOperatorButtonKeyDown =
|
|
3110
|
+
const handleOperatorButtonKeyDown = React15.useCallback(
|
|
3149
3111
|
(e) => {
|
|
3150
3112
|
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
3151
3113
|
e.preventDefault();
|
|
@@ -3154,7 +3116,7 @@ function ColumnFilterInput({
|
|
|
3154
3116
|
},
|
|
3155
3117
|
[openPopoverFromElement]
|
|
3156
3118
|
);
|
|
3157
|
-
const handleReset =
|
|
3119
|
+
const handleReset = React15.useCallback(
|
|
3158
3120
|
(e) => {
|
|
3159
3121
|
e.stopPropagation();
|
|
3160
3122
|
resetFilters();
|
|
@@ -3164,7 +3126,7 @@ function ColumnFilterInput({
|
|
|
3164
3126
|
);
|
|
3165
3127
|
const hasContent = filters.length > 0 || searchQuery.length > 0 || Boolean(editingFilter);
|
|
3166
3128
|
const hasFilterTokens = filters.length > 0 || Boolean(editingFilter);
|
|
3167
|
-
const getFilterInvalidState =
|
|
3129
|
+
const getFilterInvalidState = React15.useCallback(
|
|
3168
3130
|
(filter) => isInvalidFilterValue(filter.column ? getColumnByKey(filter.column) : void 0, filter.value),
|
|
3169
3131
|
[getColumnByKey]
|
|
3170
3132
|
);
|
|
@@ -3310,7 +3272,7 @@ function ColumnFilterInput({
|
|
|
3310
3272
|
) });
|
|
3311
3273
|
}
|
|
3312
3274
|
ColumnFilterInput.displayName = "ColumnFilterInput";
|
|
3313
|
-
var PopoverContent =
|
|
3275
|
+
var PopoverContent = React15.forwardRef(({ align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3314
3276
|
PopoverPrimitive.Content,
|
|
3315
3277
|
{
|
|
3316
3278
|
ref,
|
|
@@ -3438,176 +3400,6 @@ function ColumnVisibilityFilter({
|
|
|
3438
3400
|
)
|
|
3439
3401
|
] });
|
|
3440
3402
|
}
|
|
3441
|
-
function FloatingLabelOutline({
|
|
3442
|
-
mode,
|
|
3443
|
-
label,
|
|
3444
|
-
required,
|
|
3445
|
-
isFloating,
|
|
3446
|
-
isMounted,
|
|
3447
|
-
labelColorClass,
|
|
3448
|
-
borderColorClass,
|
|
3449
|
-
isThickBorder,
|
|
3450
|
-
labelId
|
|
3451
|
-
}) {
|
|
3452
|
-
const transitionClass = cn(
|
|
3453
|
-
isMounted && "transition-[top,translate,scale,color] duration-150 ease-[cubic-bezier(0.4,0,0.2,1)]",
|
|
3454
|
-
"motion-reduce:transition-none"
|
|
3455
|
-
);
|
|
3456
|
-
if (mode === "standard") {
|
|
3457
|
-
return /* @__PURE__ */ jsxs(
|
|
3458
|
-
"div",
|
|
3459
|
-
{
|
|
3460
|
-
className: "pointer-events-none absolute inset-0 flex rounded-small",
|
|
3461
|
-
"data-slot": "notched-outline",
|
|
3462
|
-
children: [
|
|
3463
|
-
/* @__PURE__ */ jsx(
|
|
3464
|
-
"span",
|
|
3465
|
-
{
|
|
3466
|
-
className: cn(
|
|
3467
|
-
"h-full w-[8px] rounded-l-small",
|
|
3468
|
-
borderColorClass,
|
|
3469
|
-
isThickBorder ? "border-t-[2px] border-b-[2px] border-l-[2px] border-r-0" : "border-t border-b border-l border-r-0"
|
|
3470
|
-
)
|
|
3471
|
-
}
|
|
3472
|
-
),
|
|
3473
|
-
/* @__PURE__ */ jsxs(
|
|
3474
|
-
"span",
|
|
3475
|
-
{
|
|
3476
|
-
className: cn(
|
|
3477
|
-
"h-full relative",
|
|
3478
|
-
borderColorClass,
|
|
3479
|
-
isThickBorder ? "border-t-[2px] border-b-[2px] border-l-0 border-r-0" : "border-t border-b border-l-0 border-r-0",
|
|
3480
|
-
isFloating && "!border-t-transparent",
|
|
3481
|
-
isMounted && "transition-[border-top-color] duration-150 ease-[cubic-bezier(0.4,0,0.2,1)]",
|
|
3482
|
-
"motion-reduce:transition-none"
|
|
3483
|
-
),
|
|
3484
|
-
children: [
|
|
3485
|
-
/* @__PURE__ */ jsxs(
|
|
3486
|
-
"span",
|
|
3487
|
-
{
|
|
3488
|
-
className: "invisible text-small-medium px-[2px] leading-none whitespace-nowrap",
|
|
3489
|
-
"aria-hidden": "true",
|
|
3490
|
-
children: [
|
|
3491
|
-
label,
|
|
3492
|
-
required && "*"
|
|
3493
|
-
]
|
|
3494
|
-
}
|
|
3495
|
-
),
|
|
3496
|
-
/* @__PURE__ */ jsxs(
|
|
3497
|
-
"span",
|
|
3498
|
-
{
|
|
3499
|
-
id: labelId,
|
|
3500
|
-
"data-slot": "floating-label",
|
|
3501
|
-
"data-floating": isFloating,
|
|
3502
|
-
className: cn(
|
|
3503
|
-
"absolute left-0 px-[2px] whitespace-nowrap origin-left",
|
|
3504
|
-
"text-small-medium leading-none -translate-y-1/2",
|
|
3505
|
-
isFloating ? cn("scale-100 -top-[2px]", isThickBorder && "-mt-[1px]") : "top-[min(50%,18px)] scale-[1.167]",
|
|
3506
|
-
labelColorClass,
|
|
3507
|
-
transitionClass
|
|
3508
|
-
),
|
|
3509
|
-
children: [
|
|
3510
|
-
label,
|
|
3511
|
-
required && /* @__PURE__ */ jsx("span", { className: "text-danger30 ml-[1px]", "aria-hidden": "true", children: "*" })
|
|
3512
|
-
]
|
|
3513
|
-
}
|
|
3514
|
-
)
|
|
3515
|
-
]
|
|
3516
|
-
}
|
|
3517
|
-
),
|
|
3518
|
-
/* @__PURE__ */ jsx(
|
|
3519
|
-
"span",
|
|
3520
|
-
{
|
|
3521
|
-
className: cn(
|
|
3522
|
-
"h-full flex-1 rounded-r-small",
|
|
3523
|
-
borderColorClass,
|
|
3524
|
-
isThickBorder ? "border-t-[2px] border-b-[2px] border-r-[2px] border-l-0" : "border-t border-b border-r border-l-0"
|
|
3525
|
-
)
|
|
3526
|
-
}
|
|
3527
|
-
)
|
|
3528
|
-
]
|
|
3529
|
-
}
|
|
3530
|
-
);
|
|
3531
|
-
}
|
|
3532
|
-
return /* @__PURE__ */ jsxs(
|
|
3533
|
-
"span",
|
|
3534
|
-
{
|
|
3535
|
-
id: labelId,
|
|
3536
|
-
"data-slot": "floating-label",
|
|
3537
|
-
"data-floating": isFloating,
|
|
3538
|
-
className: cn(
|
|
3539
|
-
"absolute left-[8px] pointer-events-none origin-left z-10",
|
|
3540
|
-
"text-small-medium leading-none whitespace-nowrap -translate-y-1/2",
|
|
3541
|
-
isFloating ? "-top-[2px] scale-100" : "top-[min(50%,18px)] scale-[1.167]",
|
|
3542
|
-
labelColorClass,
|
|
3543
|
-
transitionClass
|
|
3544
|
-
),
|
|
3545
|
-
children: [
|
|
3546
|
-
label,
|
|
3547
|
-
required && /* @__PURE__ */ jsx("span", { className: "text-danger30 ml-[1px]", "aria-hidden": "true", children: "*" })
|
|
3548
|
-
]
|
|
3549
|
-
}
|
|
3550
|
-
);
|
|
3551
|
-
}
|
|
3552
|
-
function getLabelColorClass(options) {
|
|
3553
|
-
const { isDisabled, isInvalid, isOpen, isFocused, hasValue } = options;
|
|
3554
|
-
if (isDisabled) return "text-sys-text-disabled";
|
|
3555
|
-
if (isInvalid) {
|
|
3556
|
-
if (hasValue || isOpen || isFocused) return "text-danger30";
|
|
3557
|
-
return "text-sys-text-placeholder";
|
|
3558
|
-
}
|
|
3559
|
-
if (isOpen || isFocused) return "text-sys-focus-ring-bold";
|
|
3560
|
-
if (hasValue) return "text-sys-text-subtler";
|
|
3561
|
-
return "text-sys-text-placeholder";
|
|
3562
|
-
}
|
|
3563
|
-
function getBorderColorClass(options) {
|
|
3564
|
-
const { isDisabled, isInvalid, isOpen, isFocused } = options;
|
|
3565
|
-
if (isDisabled) return "border-sys-divider-main";
|
|
3566
|
-
if (isInvalid) return "border-danger30";
|
|
3567
|
-
if (isOpen || isFocused) return "border-sys-focus-ring-bold";
|
|
3568
|
-
return "border-sys-divider-main";
|
|
3569
|
-
}
|
|
3570
|
-
function useFloatingLabel(options) {
|
|
3571
|
-
const {
|
|
3572
|
-
label,
|
|
3573
|
-
hasValue,
|
|
3574
|
-
isOpen = false,
|
|
3575
|
-
isFocused = false,
|
|
3576
|
-
isInvalid = false,
|
|
3577
|
-
isDisabled = false
|
|
3578
|
-
} = options;
|
|
3579
|
-
const hasLabel = !!label;
|
|
3580
|
-
const isFloating = hasValue || isOpen || isFocused;
|
|
3581
|
-
const [isMounted, setIsMounted] = React17.useState(false);
|
|
3582
|
-
React17.useEffect(() => {
|
|
3583
|
-
const id = requestAnimationFrame(() => setIsMounted(true));
|
|
3584
|
-
return () => cancelAnimationFrame(id);
|
|
3585
|
-
}, []);
|
|
3586
|
-
const labelId = React17.useId();
|
|
3587
|
-
const labelColorClass = getLabelColorClass({
|
|
3588
|
-
isDisabled,
|
|
3589
|
-
isInvalid,
|
|
3590
|
-
isOpen,
|
|
3591
|
-
isFocused,
|
|
3592
|
-
hasValue
|
|
3593
|
-
});
|
|
3594
|
-
const borderColorClass = getBorderColorClass({
|
|
3595
|
-
isDisabled,
|
|
3596
|
-
isInvalid,
|
|
3597
|
-
isOpen,
|
|
3598
|
-
isFocused
|
|
3599
|
-
});
|
|
3600
|
-
const isThickBorder = !!isInvalid || isOpen || isFocused;
|
|
3601
|
-
return {
|
|
3602
|
-
hasLabel,
|
|
3603
|
-
isFloating,
|
|
3604
|
-
isMounted,
|
|
3605
|
-
labelColorClass,
|
|
3606
|
-
borderColorClass,
|
|
3607
|
-
isThickBorder,
|
|
3608
|
-
labelId
|
|
3609
|
-
};
|
|
3610
|
-
}
|
|
3611
3403
|
|
|
3612
3404
|
// src/utils/word.ts
|
|
3613
3405
|
var word = {
|
|
@@ -4354,7 +4146,7 @@ var datePickerTriggerVariants = cva(
|
|
|
4354
4146
|
}
|
|
4355
4147
|
}
|
|
4356
4148
|
);
|
|
4357
|
-
var DatePickerTrigger =
|
|
4149
|
+
var DatePickerTrigger = React15.forwardRef(
|
|
4358
4150
|
({
|
|
4359
4151
|
open,
|
|
4360
4152
|
hasValue,
|
|
@@ -4370,7 +4162,7 @@ var DatePickerTrigger = React17.forwardRef(
|
|
|
4370
4162
|
onBlur: onBlurProp,
|
|
4371
4163
|
className
|
|
4372
4164
|
}, ref) => {
|
|
4373
|
-
const [isFocused, setIsFocused] =
|
|
4165
|
+
const [isFocused, setIsFocused] = React15.useState(false);
|
|
4374
4166
|
const {
|
|
4375
4167
|
hasLabel,
|
|
4376
4168
|
isFloating,
|
|
@@ -4385,24 +4177,26 @@ var DatePickerTrigger = React17.forwardRef(
|
|
|
4385
4177
|
isOpen: open,
|
|
4386
4178
|
isFocused,
|
|
4387
4179
|
isInvalid: !!isInvalid,
|
|
4388
|
-
isDisabled: !!disabled
|
|
4180
|
+
isDisabled: !!disabled,
|
|
4181
|
+
appearance
|
|
4182
|
+
});
|
|
4389
4183
|
const showNotchedOutline = hasLabel && appearance !== "none";
|
|
4390
4184
|
const showNoneLabel = hasLabel && appearance === "none";
|
|
4391
|
-
const handleFocus =
|
|
4185
|
+
const handleFocus = React15.useCallback(
|
|
4392
4186
|
(e) => {
|
|
4393
4187
|
setIsFocused(true);
|
|
4394
4188
|
onFocusProp?.(e);
|
|
4395
4189
|
},
|
|
4396
4190
|
[onFocusProp]
|
|
4397
4191
|
);
|
|
4398
|
-
const handleBlur =
|
|
4192
|
+
const handleBlur = React15.useCallback(
|
|
4399
4193
|
(e) => {
|
|
4400
4194
|
setIsFocused(false);
|
|
4401
4195
|
onBlurProp?.(e);
|
|
4402
4196
|
},
|
|
4403
4197
|
[onBlurProp]
|
|
4404
4198
|
);
|
|
4405
|
-
const handleClearClick =
|
|
4199
|
+
const handleClearClick = React15.useCallback(
|
|
4406
4200
|
(e) => {
|
|
4407
4201
|
e.stopPropagation();
|
|
4408
4202
|
e.preventDefault();
|
|
@@ -4410,7 +4204,7 @@ var DatePickerTrigger = React17.forwardRef(
|
|
|
4410
4204
|
},
|
|
4411
4205
|
[onClear]
|
|
4412
4206
|
);
|
|
4413
|
-
const triggerRef =
|
|
4207
|
+
const triggerRef = React15.useRef(null);
|
|
4414
4208
|
const setRefs = (node) => {
|
|
4415
4209
|
triggerRef.current = node;
|
|
4416
4210
|
if (typeof ref === "function") ref(node);
|
|
@@ -4508,8 +4302,8 @@ function DatePicker({
|
|
|
4508
4302
|
appearance = "standard",
|
|
4509
4303
|
required
|
|
4510
4304
|
}) {
|
|
4511
|
-
const [open, setOpen] =
|
|
4512
|
-
const handleClear =
|
|
4305
|
+
const [open, setOpen] = React15.useState(false);
|
|
4306
|
+
const handleClear = React15.useCallback(() => {
|
|
4513
4307
|
setDate?.(void 0, /* @__PURE__ */ new Date(), {}, {});
|
|
4514
4308
|
}, [setDate]);
|
|
4515
4309
|
const displayText = date ? format(date, "yyyy-MM-dd") : "";
|
|
@@ -4582,8 +4376,8 @@ function DatePickerRange({
|
|
|
4582
4376
|
required,
|
|
4583
4377
|
calendarProps
|
|
4584
4378
|
}) {
|
|
4585
|
-
const [open, setOpen] =
|
|
4586
|
-
const handleClear =
|
|
4379
|
+
const [open, setOpen] = React15.useState(false);
|
|
4380
|
+
const handleClear = React15.useCallback(() => {
|
|
4587
4381
|
setDate?.({ from: void 0, to: void 0 }, /* @__PURE__ */ new Date(), {}, {});
|
|
4588
4382
|
}, [setDate]);
|
|
4589
4383
|
const hasValue = !!date.from;
|
|
@@ -4631,232 +4425,6 @@ function DatePickerRange({
|
|
|
4631
4425
|
] }) })
|
|
4632
4426
|
] });
|
|
4633
4427
|
}
|
|
4634
|
-
var textFieldContainerVariants = cva(
|
|
4635
|
-
[
|
|
4636
|
-
"flex w-full items-center gap-[2px] bg-transparent",
|
|
4637
|
-
"rounded-small min-h-[36px] text-base-medium text-sys-text-main",
|
|
4638
|
-
"transition-colors"
|
|
4639
|
-
].join(" "),
|
|
4640
|
-
{
|
|
4641
|
-
variants: {
|
|
4642
|
-
appearance: {
|
|
4643
|
-
standard: [
|
|
4644
|
-
"bg-sys-background border border-sys-divider-main py-[3px] px-[5px]",
|
|
4645
|
-
"hover:bg-secondary-o10"
|
|
4646
|
-
].join(" "),
|
|
4647
|
-
none: "bg-transparent border-none py-[4px] px-[6px]"
|
|
4648
|
-
},
|
|
4649
|
-
isInvalid: {
|
|
4650
|
-
true: "",
|
|
4651
|
-
false: ""
|
|
4652
|
-
}
|
|
4653
|
-
},
|
|
4654
|
-
compoundVariants: [
|
|
4655
|
-
{
|
|
4656
|
-
appearance: "standard",
|
|
4657
|
-
isInvalid: true,
|
|
4658
|
-
class: "border-[2px] border-danger30 py-[2px] px-[4px]"
|
|
4659
|
-
}
|
|
4660
|
-
],
|
|
4661
|
-
defaultVariants: {
|
|
4662
|
-
appearance: "standard",
|
|
4663
|
-
isInvalid: false
|
|
4664
|
-
}
|
|
4665
|
-
}
|
|
4666
|
-
);
|
|
4667
|
-
var TextField = React17.forwardRef(
|
|
4668
|
-
({
|
|
4669
|
-
appearance = "standard",
|
|
4670
|
-
label,
|
|
4671
|
-
required: requiredProp,
|
|
4672
|
-
hasClearButton,
|
|
4673
|
-
elemBeforeInput,
|
|
4674
|
-
elemAfterInput,
|
|
4675
|
-
isInvalid: isInvalidProp,
|
|
4676
|
-
containerClassName,
|
|
4677
|
-
className,
|
|
4678
|
-
disabled,
|
|
4679
|
-
readOnly,
|
|
4680
|
-
value: valueProp,
|
|
4681
|
-
defaultValue,
|
|
4682
|
-
onChange: onChangeProp,
|
|
4683
|
-
onFocus: onFocusProp,
|
|
4684
|
-
onBlur: onBlurProp,
|
|
4685
|
-
...inputProps
|
|
4686
|
-
}, forwardedRef) => {
|
|
4687
|
-
const formControl = useFormControlContext();
|
|
4688
|
-
const isInvalid = isInvalidProp ?? formControl?.isInvalid ?? false;
|
|
4689
|
-
const inputRef = React17.useRef(null);
|
|
4690
|
-
const [isFocused, setIsFocused] = React17.useState(false);
|
|
4691
|
-
const isControlled = valueProp !== void 0;
|
|
4692
|
-
const [internalValue, setInternalValue] = React17.useState(
|
|
4693
|
-
defaultValue !== void 0 ? String(defaultValue) : ""
|
|
4694
|
-
);
|
|
4695
|
-
const hasValue = isControlled ? String(valueProp) !== "" : internalValue !== "";
|
|
4696
|
-
const composedRef = React17.useCallback(
|
|
4697
|
-
(node) => {
|
|
4698
|
-
inputRef.current = node;
|
|
4699
|
-
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
4700
|
-
else if (forwardedRef)
|
|
4701
|
-
forwardedRef.current = node;
|
|
4702
|
-
},
|
|
4703
|
-
[forwardedRef]
|
|
4704
|
-
);
|
|
4705
|
-
const {
|
|
4706
|
-
hasLabel,
|
|
4707
|
-
isFloating,
|
|
4708
|
-
isMounted,
|
|
4709
|
-
labelColorClass,
|
|
4710
|
-
borderColorClass,
|
|
4711
|
-
isThickBorder,
|
|
4712
|
-
labelId
|
|
4713
|
-
} = useFloatingLabel({
|
|
4714
|
-
label,
|
|
4715
|
-
hasValue,
|
|
4716
|
-
isFocused,
|
|
4717
|
-
isInvalid: !!isInvalid,
|
|
4718
|
-
isDisabled: !!disabled});
|
|
4719
|
-
const showNotchedOutline = hasLabel && appearance !== "none";
|
|
4720
|
-
const showNoneLabel = hasLabel && appearance === "none";
|
|
4721
|
-
const handleChange = React17.useCallback(
|
|
4722
|
-
(e) => {
|
|
4723
|
-
if (!isControlled) setInternalValue(e.target.value);
|
|
4724
|
-
onChangeProp?.(e);
|
|
4725
|
-
},
|
|
4726
|
-
[isControlled, onChangeProp]
|
|
4727
|
-
);
|
|
4728
|
-
const handleFocus = React17.useCallback(
|
|
4729
|
-
(e) => {
|
|
4730
|
-
setIsFocused(true);
|
|
4731
|
-
onFocusProp?.(e);
|
|
4732
|
-
},
|
|
4733
|
-
[onFocusProp]
|
|
4734
|
-
);
|
|
4735
|
-
const handleBlur = React17.useCallback(
|
|
4736
|
-
(e) => {
|
|
4737
|
-
setIsFocused(false);
|
|
4738
|
-
onBlurProp?.(e);
|
|
4739
|
-
},
|
|
4740
|
-
[onBlurProp]
|
|
4741
|
-
);
|
|
4742
|
-
const handleClear = React17.useCallback(() => {
|
|
4743
|
-
const input = inputRef.current;
|
|
4744
|
-
if (!input) return;
|
|
4745
|
-
if (!isControlled) setInternalValue("");
|
|
4746
|
-
const nativeSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
4747
|
-
if (nativeSetter) {
|
|
4748
|
-
nativeSetter.call(input, "");
|
|
4749
|
-
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
4750
|
-
}
|
|
4751
|
-
input.focus();
|
|
4752
|
-
}, [isControlled]);
|
|
4753
|
-
return /* @__PURE__ */ jsxs(
|
|
4754
|
-
"div",
|
|
4755
|
-
{
|
|
4756
|
-
"data-slot": "text-field",
|
|
4757
|
-
"aria-disabled": disabled || void 0,
|
|
4758
|
-
className: cn(
|
|
4759
|
-
textFieldContainerVariants({ appearance, isInvalid }),
|
|
4760
|
-
CLEAR_HOST_CLASS,
|
|
4761
|
-
// Focus styling (state-managed, standard appearance without notched outline only)
|
|
4762
|
-
isFocused && !isInvalid && appearance === "standard" && !showNotchedOutline && "border-[2px] border-sys-focus-ring-bold py-[2px] px-[4px]",
|
|
4763
|
-
// Floating label positioning
|
|
4764
|
-
(showNotchedOutline || showNoneLabel) && "relative",
|
|
4765
|
-
// Notched outline draws border — remove container's own border
|
|
4766
|
-
showNotchedOutline && "!border-0 !py-[4px] !px-[6px]",
|
|
4767
|
-
// Disabled / cursor
|
|
4768
|
-
disabled ? "cursor-not-allowed opacity-50" : "cursor-text",
|
|
4769
|
-
// disabled 시 hover 배경 무력화 (div container라 :disabled 불가 → JS 조건부; none은 원래 hover bg 없음)
|
|
4770
|
-
disabled && appearance !== "none" && "hover:bg-sys-background",
|
|
4771
|
-
containerClassName,
|
|
4772
|
-
// 외부 className 은 root container 에 적용 — FormControl 의 maxWidth 가
|
|
4773
|
-
// 자식 className 에 inject 되는데, wrapper div 의 폭 제어가 의도이므로
|
|
4774
|
-
// inner input 이 아닌 여기에 머지한다.
|
|
4775
|
-
className
|
|
4776
|
-
),
|
|
4777
|
-
children: [
|
|
4778
|
-
(showNotchedOutline || showNoneLabel) && /* @__PURE__ */ jsx(
|
|
4779
|
-
FloatingLabelOutline,
|
|
4780
|
-
{
|
|
4781
|
-
mode: showNotchedOutline ? "standard" : "none",
|
|
4782
|
-
label,
|
|
4783
|
-
required: requiredProp,
|
|
4784
|
-
isFloating,
|
|
4785
|
-
isMounted,
|
|
4786
|
-
labelColorClass,
|
|
4787
|
-
borderColorClass,
|
|
4788
|
-
isThickBorder,
|
|
4789
|
-
labelId
|
|
4790
|
-
}
|
|
4791
|
-
),
|
|
4792
|
-
elemBeforeInput && /* @__PURE__ */ jsx(
|
|
4793
|
-
"span",
|
|
4794
|
-
{
|
|
4795
|
-
className: cn(
|
|
4796
|
-
// 아이콘은 24×24, 글자("개"·"코어")는 줄바꿈 없이 폭이 늘어난다 — 고정 size-[24px] 는 두 글자가 두 줄로 깨졌다 (2026-10-12)
|
|
4797
|
-
"shrink-0 flex items-center justify-center h-[24px] min-w-[24px] whitespace-nowrap",
|
|
4798
|
-
typeof elemBeforeInput === "string" && "px-[2px] text-sys-text-subtle",
|
|
4799
|
-
hasLabel && !isFloating && "invisible"
|
|
4800
|
-
),
|
|
4801
|
-
children: elemBeforeInput
|
|
4802
|
-
}
|
|
4803
|
-
),
|
|
4804
|
-
/* @__PURE__ */ jsx(
|
|
4805
|
-
"input",
|
|
4806
|
-
{
|
|
4807
|
-
ref: composedRef,
|
|
4808
|
-
disabled,
|
|
4809
|
-
readOnly,
|
|
4810
|
-
value: isControlled ? valueProp : void 0,
|
|
4811
|
-
defaultValue: !isControlled ? defaultValue : void 0,
|
|
4812
|
-
onChange: handleChange,
|
|
4813
|
-
onFocus: handleFocus,
|
|
4814
|
-
onBlur: handleBlur,
|
|
4815
|
-
"aria-labelledby": hasLabel ? labelId : void 0,
|
|
4816
|
-
"aria-required": hasLabel && requiredProp ? true : void 0,
|
|
4817
|
-
className: cn(
|
|
4818
|
-
"flex-1 min-w-0 bg-transparent border-none outline-none",
|
|
4819
|
-
"text-base-medium text-sys-text-main",
|
|
4820
|
-
"placeholder:text-sys-text-placeholder",
|
|
4821
|
-
"disabled:cursor-not-allowed",
|
|
4822
|
-
"px-[4px] py-[2px]",
|
|
4823
|
-
// When label is down (acting as placeholder), hide input's placeholder
|
|
4824
|
-
hasLabel && !hasValue && !isFocused && "placeholder:text-transparent"
|
|
4825
|
-
),
|
|
4826
|
-
...inputProps
|
|
4827
|
-
}
|
|
4828
|
-
),
|
|
4829
|
-
hasClearButton && /* @__PURE__ */ jsx(
|
|
4830
|
-
"button",
|
|
4831
|
-
{
|
|
4832
|
-
type: "button",
|
|
4833
|
-
onClick: handleClear,
|
|
4834
|
-
className: cn(
|
|
4835
|
-
"shrink-0 flex items-center justify-center p-[2px] rounded-small hover:bg-secondary-o10 text-sys-text-subtler",
|
|
4836
|
-
CLEAR_REVEAL_CLASS,
|
|
4837
|
-
(!hasValue || disabled || readOnly) && "invisible"
|
|
4838
|
-
),
|
|
4839
|
-
"aria-label": "\uC785\uB825 \uC9C0\uC6B0\uAE30",
|
|
4840
|
-
tabIndex: -1,
|
|
4841
|
-
children: /* @__PURE__ */ jsx(CancelIcon, { size: 20 })
|
|
4842
|
-
}
|
|
4843
|
-
),
|
|
4844
|
-
elemAfterInput && /* @__PURE__ */ jsx(
|
|
4845
|
-
"span",
|
|
4846
|
-
{
|
|
4847
|
-
className: cn(
|
|
4848
|
-
"shrink-0 flex items-center justify-center h-[24px] min-w-[24px] whitespace-nowrap",
|
|
4849
|
-
typeof elemAfterInput === "string" && "px-[2px] text-sys-text-subtle"
|
|
4850
|
-
),
|
|
4851
|
-
children: elemAfterInput
|
|
4852
|
-
}
|
|
4853
|
-
)
|
|
4854
|
-
]
|
|
4855
|
-
}
|
|
4856
|
-
);
|
|
4857
|
-
}
|
|
4858
|
-
);
|
|
4859
|
-
TextField.displayName = "TextField";
|
|
4860
4428
|
|
|
4861
4429
|
// src/components/iconSelect/icons.json
|
|
4862
4430
|
var icons_default = {
|
|
@@ -5991,6 +5559,18 @@ var PARAMETER_TABLE_COL_WIDTHS = {
|
|
|
5991
5559
|
normal: { handle: 48, delete: 48 },
|
|
5992
5560
|
compact: { handle: 32, delete: 32 }
|
|
5993
5561
|
};
|
|
5562
|
+
function CellHint({
|
|
5563
|
+
hint,
|
|
5564
|
+
active,
|
|
5565
|
+
children
|
|
5566
|
+
}) {
|
|
5567
|
+
const [hovered, setHovered] = React15.useState(false);
|
|
5568
|
+
if (!hint) return children;
|
|
5569
|
+
return /* @__PURE__ */ jsxs(Tooltip, { open: active || hovered, onOpenChange: setHovered, delayDuration: 300, children: [
|
|
5570
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children }),
|
|
5571
|
+
/* @__PURE__ */ jsx(TooltipContent, { className: "t3q-pt-hint", style: { pointerEvents: "none" }, children: hint })
|
|
5572
|
+
] });
|
|
5573
|
+
}
|
|
5994
5574
|
function ParameterTableRow({
|
|
5995
5575
|
row,
|
|
5996
5576
|
rowIdx,
|
|
@@ -5999,6 +5579,11 @@ function ParameterTableRow({
|
|
|
5999
5579
|
withHandle,
|
|
6000
5580
|
disabled,
|
|
6001
5581
|
isPlaceholder,
|
|
5582
|
+
isDeleteDisabled,
|
|
5583
|
+
isReadonlyCell,
|
|
5584
|
+
extraColumns,
|
|
5585
|
+
cellHint,
|
|
5586
|
+
activeCell,
|
|
6002
5587
|
selectionRect,
|
|
6003
5588
|
editingCell,
|
|
6004
5589
|
cellErrors,
|
|
@@ -6060,11 +5645,13 @@ function ParameterTableRow({
|
|
|
6060
5645
|
const isEditing = editingCell != null && editingCell.rowIdx === rowIdx && editingCell.colIdx === colIdx;
|
|
6061
5646
|
const cellValue = row.values[col.id] ?? "";
|
|
6062
5647
|
const hasError = !isPlaceholder && Boolean(cellErrors?.[row.id]?.[col.id]);
|
|
5648
|
+
const isReadonly = isReadonlyCell(coord);
|
|
6063
5649
|
return /* @__PURE__ */ jsx(
|
|
6064
5650
|
TableCell,
|
|
6065
5651
|
{
|
|
6066
5652
|
className: cn(
|
|
6067
5653
|
"t3q-pt-cell px-0 py-0 cursor-cell select-none",
|
|
5654
|
+
isReadonly && "t3q-pt-cell--readonly",
|
|
6068
5655
|
hasError && "t3q-pt-cell--error",
|
|
6069
5656
|
isSelected && "t3q-pt-cell--selected",
|
|
6070
5657
|
isEditing && "t3q-pt-cell--editing"
|
|
@@ -6075,6 +5662,7 @@ function ParameterTableRow({
|
|
|
6075
5662
|
"data-selected": isSelected || void 0,
|
|
6076
5663
|
"data-editing": isEditing || void 0,
|
|
6077
5664
|
"data-error": hasError || void 0,
|
|
5665
|
+
"data-readonly": isReadonly || void 0,
|
|
6078
5666
|
onMouseDown: (e) => {
|
|
6079
5667
|
if (isEditing) return;
|
|
6080
5668
|
onCellMouseDown(coord, e);
|
|
@@ -6091,33 +5679,53 @@ function ParameterTableRow({
|
|
|
6091
5679
|
onCellDoubleClick(coord);
|
|
6092
5680
|
},
|
|
6093
5681
|
children: /* @__PURE__ */ jsx(
|
|
6094
|
-
|
|
5682
|
+
CellHint,
|
|
6095
5683
|
{
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
5684
|
+
hint: cellHint?.(row, rowIdx, col, colIdx),
|
|
5685
|
+
active: activeCell?.rowIdx === rowIdx && activeCell?.colIdx === colIdx,
|
|
5686
|
+
children: /* @__PURE__ */ jsx(
|
|
5687
|
+
"div",
|
|
5688
|
+
{
|
|
5689
|
+
className: cn(
|
|
5690
|
+
"t3q-pt-cell-display px-[12px] py-[6px] text-base-medium text-sys-text-main truncate whitespace-pre",
|
|
5691
|
+
isEditing && "t3q-pt-cell-display--editing"
|
|
5692
|
+
),
|
|
5693
|
+
"aria-label": col.header,
|
|
5694
|
+
children: cellValue ? sanitizeUserText(cellValue) : /* @__PURE__ */ jsx("span", { className: "text-sys-text-placeholder", children: isPlaceholder ? col.placeholder ?? col.header : " " })
|
|
5695
|
+
}
|
|
5696
|
+
)
|
|
6102
5697
|
}
|
|
6103
5698
|
)
|
|
6104
5699
|
},
|
|
6105
5700
|
col.id
|
|
6106
5701
|
);
|
|
6107
5702
|
}),
|
|
5703
|
+
extraColumns?.map((col) => (
|
|
5704
|
+
// 표시 전용 칸 — 칸 좌표(data-row-idx·data-col-idx)와 선택·편집 핸들러가 없다.
|
|
5705
|
+
/* @__PURE__ */ jsx(
|
|
5706
|
+
TableCell,
|
|
5707
|
+
{
|
|
5708
|
+
className: "t3q-pt-cell py-0",
|
|
5709
|
+
style: col.width ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0,
|
|
5710
|
+
"data-extra-col": col.id,
|
|
5711
|
+
children: isPlaceholder ? null : col.render(row, rowIdx)
|
|
5712
|
+
},
|
|
5713
|
+
col.id
|
|
5714
|
+
)
|
|
5715
|
+
)),
|
|
6108
5716
|
/* @__PURE__ */ jsx(TableCell, { align: "center", className: "p-0", style: { width: `${colWidths.delete}px` }, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx(
|
|
6109
5717
|
IconButton,
|
|
6110
5718
|
{
|
|
6111
5719
|
type: "button",
|
|
6112
5720
|
variant: "secondaryLink",
|
|
6113
5721
|
spacing: iconBtnSpacing,
|
|
6114
|
-
disabled:
|
|
5722
|
+
disabled: isDeleteDisabled,
|
|
6115
5723
|
onClick: onDelete,
|
|
6116
5724
|
"aria-label": "\uD589 \uC0AD\uC81C",
|
|
6117
|
-
tabIndex:
|
|
5725
|
+
tabIndex: isDeleteDisabled ? -1 : 0,
|
|
6118
5726
|
className: cn(
|
|
6119
5727
|
"invisible group-hover:visible group-focus-within:visible",
|
|
6120
|
-
|
|
5728
|
+
isDeleteDisabled && "group-hover:invisible group-focus-within:invisible"
|
|
6121
5729
|
),
|
|
6122
5730
|
children: /* @__PURE__ */ jsx(Trash2, { size: spacing === "compact" ? 14 : 16 })
|
|
6123
5731
|
}
|
|
@@ -6161,7 +5769,7 @@ function isPrintableKey(event) {
|
|
|
6161
5769
|
const code = event.key.charCodeAt(0);
|
|
6162
5770
|
return code >= 32 && code <= 126;
|
|
6163
5771
|
}
|
|
6164
|
-
var ParameterTable =
|
|
5772
|
+
var ParameterTable = React15.forwardRef(
|
|
6165
5773
|
({
|
|
6166
5774
|
value,
|
|
6167
5775
|
defaultValue,
|
|
@@ -6172,12 +5780,18 @@ var ParameterTable = React17.forwardRef(
|
|
|
6172
5780
|
caption,
|
|
6173
5781
|
disabled = false,
|
|
6174
5782
|
className,
|
|
5783
|
+
canDeleteRow,
|
|
5784
|
+
canEditCell,
|
|
5785
|
+
onActiveCellChange,
|
|
5786
|
+
withAddRow = true,
|
|
5787
|
+
extraColumns,
|
|
5788
|
+
cellHint,
|
|
6175
5789
|
cellErrors
|
|
6176
5790
|
}, ref) => {
|
|
6177
5791
|
const isControlled = value !== void 0;
|
|
6178
|
-
const rootRef =
|
|
6179
|
-
const floatingInputRef =
|
|
6180
|
-
const setRootRef =
|
|
5792
|
+
const rootRef = React15.useRef(null);
|
|
5793
|
+
const floatingInputRef = React15.useRef(null);
|
|
5794
|
+
const setRootRef = React15.useCallback(
|
|
6181
5795
|
(node) => {
|
|
6182
5796
|
rootRef.current = node;
|
|
6183
5797
|
if (typeof ref === "function") ref(node);
|
|
@@ -6185,32 +5799,88 @@ var ParameterTable = React17.forwardRef(
|
|
|
6185
5799
|
},
|
|
6186
5800
|
[ref]
|
|
6187
5801
|
);
|
|
6188
|
-
const focusFloating =
|
|
5802
|
+
const focusFloating = React15.useCallback(() => {
|
|
6189
5803
|
floatingInputRef.current?.focus({ preventScroll: true });
|
|
6190
5804
|
}, []);
|
|
6191
|
-
const [placeholderId, setPlaceholderId] =
|
|
6192
|
-
const [internalRows, setInternalRows] =
|
|
5805
|
+
const [placeholderId, setPlaceholderId] = React15.useState(newRowId);
|
|
5806
|
+
const [internalRows, setInternalRows] = React15.useState(
|
|
6193
5807
|
() => normalizeTrailing(defaultValue ?? [], columns, placeholderId)
|
|
6194
5808
|
);
|
|
6195
|
-
const rows =
|
|
5809
|
+
const rows = React15.useMemo(
|
|
6196
5810
|
() => normalizeTrailing(isControlled ? value : internalRows, columns, placeholderId),
|
|
6197
5811
|
[isControlled, value, internalRows, columns, placeholderId]
|
|
6198
5812
|
);
|
|
6199
5813
|
const placeholderRow = rows[rows.length - 1];
|
|
6200
|
-
const realRows =
|
|
6201
|
-
const realRowIds =
|
|
6202
|
-
const
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
const
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
const
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
5814
|
+
const realRows = React15.useMemo(() => rows.slice(0, -1), [rows]);
|
|
5815
|
+
const realRowIds = React15.useMemo(() => realRows.map((r) => r.id), [realRows]);
|
|
5816
|
+
const isCellReadonly = React15.useCallback(
|
|
5817
|
+
(row, rowIdx, column, colIdx) => canEditCell?.(row, rowIdx, column, colIdx) === false,
|
|
5818
|
+
[canEditCell]
|
|
5819
|
+
);
|
|
5820
|
+
const canEditCellAt = React15.useCallback(
|
|
5821
|
+
(row, rowIdx, column, colIdx) => !disabled && !isCellReadonly(row, rowIdx, column, colIdx) && !(!withAddRow && rowIdx === rows.length - 1),
|
|
5822
|
+
[disabled, isCellReadonly, rows.length, withAddRow]
|
|
5823
|
+
);
|
|
5824
|
+
const isCellEditable = React15.useCallback(
|
|
5825
|
+
(coord) => {
|
|
5826
|
+
const row = rows[coord.rowIdx];
|
|
5827
|
+
const column = columns[coord.colIdx];
|
|
5828
|
+
if (!row || !column) return false;
|
|
5829
|
+
return canEditCellAt(row, coord.rowIdx, column, coord.colIdx);
|
|
5830
|
+
},
|
|
5831
|
+
[canEditCellAt, columns, rows]
|
|
5832
|
+
);
|
|
5833
|
+
const isReadonlyCell = React15.useCallback(
|
|
5834
|
+
(coord) => {
|
|
5835
|
+
const row = rows[coord.rowIdx];
|
|
5836
|
+
const column = columns[coord.colIdx];
|
|
5837
|
+
if (!row || !column) return false;
|
|
5838
|
+
return isCellReadonly(row, coord.rowIdx, column, coord.colIdx);
|
|
5839
|
+
},
|
|
5840
|
+
[columns, isCellReadonly, rows]
|
|
5841
|
+
);
|
|
5842
|
+
const isRowDeletable = React15.useCallback(
|
|
5843
|
+
(row, rowIdx) => {
|
|
5844
|
+
if (disabled || rowIdx === rows.length - 1) return false;
|
|
5845
|
+
return canDeleteRow?.(row, rowIdx) ?? true;
|
|
5846
|
+
},
|
|
5847
|
+
[canDeleteRow, disabled, rows.length]
|
|
5848
|
+
);
|
|
5849
|
+
const [rowHistory, setRowHistory] = React15.useState([]);
|
|
5850
|
+
const [redoStack, setRedoStack] = React15.useState([]);
|
|
5851
|
+
const [selection, setSelection] = React15.useState(null);
|
|
5852
|
+
const [editing, setEditing] = React15.useState(null);
|
|
5853
|
+
const [inputValue, setInputValue] = React15.useState("");
|
|
5854
|
+
const [floatingRect, setFloatingRect] = React15.useState(null);
|
|
5855
|
+
const [keyboardMode, setKeyboardMode] = React15.useState(false);
|
|
5856
|
+
const composingRef = React15.useRef(false);
|
|
5857
|
+
const draggingRef = React15.useRef(false);
|
|
5858
|
+
const pendingCursorRef = React15.useRef(null);
|
|
5859
|
+
const reclickRef = React15.useRef(null);
|
|
5860
|
+
const reclickEnteredRef = React15.useRef(false);
|
|
5861
|
+
const lastActiveKeyRef = React15.useRef(null);
|
|
5862
|
+
React15.useEffect(() => {
|
|
5863
|
+
let cell = null;
|
|
5864
|
+
if (selection) {
|
|
5865
|
+
const { rowIdx, colIdx } = selection.focus;
|
|
5866
|
+
const row = rows[rowIdx];
|
|
5867
|
+
const column = columns[colIdx];
|
|
5868
|
+
if (row && column) {
|
|
5869
|
+
cell = {
|
|
5870
|
+
rowId: row.id,
|
|
5871
|
+
rowIdx,
|
|
5872
|
+
columnId: column.id,
|
|
5873
|
+
colIdx,
|
|
5874
|
+
isPlaceholder: rowIdx === rows.length - 1
|
|
5875
|
+
};
|
|
5876
|
+
}
|
|
5877
|
+
}
|
|
5878
|
+
const key = cell ? `${cell.rowId}:${cell.colIdx}:${cell.isPlaceholder}` : null;
|
|
5879
|
+
if (key === lastActiveKeyRef.current) return;
|
|
5880
|
+
lastActiveKeyRef.current = key;
|
|
5881
|
+
onActiveCellChange?.(cell);
|
|
5882
|
+
}, [columns, onActiveCellChange, rows, selection]);
|
|
5883
|
+
React15.useEffect(() => {
|
|
6214
5884
|
if (disabled) return;
|
|
6215
5885
|
const onUp = () => {
|
|
6216
5886
|
draggingRef.current = false;
|
|
@@ -6218,7 +5888,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6218
5888
|
window.addEventListener("mouseup", onUp);
|
|
6219
5889
|
return () => window.removeEventListener("mouseup", onUp);
|
|
6220
5890
|
}, [disabled]);
|
|
6221
|
-
|
|
5891
|
+
React15.useLayoutEffect(() => {
|
|
6222
5892
|
if (!selection) {
|
|
6223
5893
|
setFloatingRect(null);
|
|
6224
5894
|
return;
|
|
@@ -6242,7 +5912,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6242
5912
|
height: cr.height
|
|
6243
5913
|
});
|
|
6244
5914
|
}, [selection, rows, editing]);
|
|
6245
|
-
|
|
5915
|
+
React15.useLayoutEffect(() => {
|
|
6246
5916
|
if (editing == null) return;
|
|
6247
5917
|
const cursor = pendingCursorRef.current;
|
|
6248
5918
|
if (cursor == null) return;
|
|
@@ -6257,12 +5927,12 @@ var ParameterTable = React17.forwardRef(
|
|
|
6257
5927
|
}
|
|
6258
5928
|
pendingCursorRef.current = null;
|
|
6259
5929
|
}, [editing, inputValue]);
|
|
6260
|
-
const pushRowHistory =
|
|
5930
|
+
const pushRowHistory = React15.useCallback(() => {
|
|
6261
5931
|
const snapshot = cloneRows(realRows);
|
|
6262
5932
|
setRowHistory((prev) => [...prev.slice(-99), snapshot]);
|
|
6263
5933
|
setRedoStack([]);
|
|
6264
5934
|
}, [realRows]);
|
|
6265
|
-
const emit =
|
|
5935
|
+
const emit = React15.useCallback(
|
|
6266
5936
|
(next) => {
|
|
6267
5937
|
const filled = next.some((r) => r.id === placeholderId && !isRowEmpty(r, columns));
|
|
6268
5938
|
const pid = filled ? newRowId() : placeholderId;
|
|
@@ -6273,13 +5943,13 @@ var ParameterTable = React17.forwardRef(
|
|
|
6273
5943
|
},
|
|
6274
5944
|
[isControlled, onChange, placeholderId, columns]
|
|
6275
5945
|
);
|
|
6276
|
-
const emitRealRows =
|
|
5946
|
+
const emitRealRows = React15.useCallback(
|
|
6277
5947
|
(nextRealRows) => {
|
|
6278
5948
|
emit([...nextRealRows, placeholderRow]);
|
|
6279
5949
|
},
|
|
6280
5950
|
[emit, placeholderRow]
|
|
6281
5951
|
);
|
|
6282
|
-
const undoLastRowOperation =
|
|
5952
|
+
const undoLastRowOperation = React15.useCallback(() => {
|
|
6283
5953
|
const last = rowHistory[rowHistory.length - 1];
|
|
6284
5954
|
if (!last) return;
|
|
6285
5955
|
const restoredRows = cloneRows(last);
|
|
@@ -6291,7 +5961,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6291
5961
|
setEditing(null);
|
|
6292
5962
|
setInputValue("");
|
|
6293
5963
|
}, [emitRealRows, realRows, rowHistory]);
|
|
6294
|
-
const redoLastRowOperation =
|
|
5964
|
+
const redoLastRowOperation = React15.useCallback(() => {
|
|
6295
5965
|
const last = redoStack[redoStack.length - 1];
|
|
6296
5966
|
if (!last) return;
|
|
6297
5967
|
const restoredRows = cloneRows(last);
|
|
@@ -6306,9 +5976,10 @@ var ParameterTable = React17.forwardRef(
|
|
|
6306
5976
|
setEditing(null);
|
|
6307
5977
|
setInputValue("");
|
|
6308
5978
|
}, [emitRealRows, realRows, redoStack]);
|
|
6309
|
-
const handleDelete =
|
|
5979
|
+
const handleDelete = React15.useCallback(
|
|
6310
5980
|
(rowId) => {
|
|
6311
|
-
|
|
5981
|
+
const row = realRows.find((r) => r.id === rowId);
|
|
5982
|
+
if (!row || !isRowDeletable(row, rows.indexOf(row))) return;
|
|
6312
5983
|
pushRowHistory();
|
|
6313
5984
|
const next = rows.filter((r) => r.id !== rowId);
|
|
6314
5985
|
emit(next);
|
|
@@ -6316,18 +5987,18 @@ var ParameterTable = React17.forwardRef(
|
|
|
6316
5987
|
setEditing(null);
|
|
6317
5988
|
setInputValue("");
|
|
6318
5989
|
},
|
|
6319
|
-
[emit, pushRowHistory, realRows, rows]
|
|
5990
|
+
[emit, isRowDeletable, pushRowHistory, realRows, rows]
|
|
6320
5991
|
);
|
|
6321
|
-
const totalRows = rows.length;
|
|
6322
5992
|
const totalCols = columns.length;
|
|
6323
|
-
const
|
|
5993
|
+
const maxRowIdx = withAddRow ? rows.length - 1 : Math.max(0, realRows.length - 1);
|
|
5994
|
+
const clampCoord = React15.useCallback(
|
|
6324
5995
|
(c) => ({
|
|
6325
|
-
rowIdx: Math.max(0, Math.min(
|
|
5996
|
+
rowIdx: Math.max(0, Math.min(maxRowIdx, c.rowIdx)),
|
|
6326
5997
|
colIdx: Math.max(0, Math.min(totalCols - 1, c.colIdx))
|
|
6327
5998
|
}),
|
|
6328
|
-
[
|
|
5999
|
+
[maxRowIdx, totalCols]
|
|
6329
6000
|
);
|
|
6330
|
-
const setCellValue =
|
|
6001
|
+
const setCellValue = React15.useCallback(
|
|
6331
6002
|
(rowIdx, colId, val) => {
|
|
6332
6003
|
const target = rows[rowIdx];
|
|
6333
6004
|
if (!target) return;
|
|
@@ -6338,25 +6009,34 @@ var ParameterTable = React17.forwardRef(
|
|
|
6338
6009
|
},
|
|
6339
6010
|
[emit, rows]
|
|
6340
6011
|
);
|
|
6341
|
-
const clearRange =
|
|
6012
|
+
const clearRange = React15.useCallback(
|
|
6342
6013
|
(range) => {
|
|
6343
6014
|
const rect = normalizeRange(range);
|
|
6344
|
-
|
|
6015
|
+
let blocked = false;
|
|
6016
|
+
let cleared = false;
|
|
6345
6017
|
const next = rows.map((row, rIdx) => {
|
|
6346
6018
|
if (rIdx < rect.top || rIdx > rect.bottom) return row;
|
|
6347
6019
|
if (rIdx === rows.length - 1) return row;
|
|
6348
6020
|
const nextValues = { ...row.values };
|
|
6349
6021
|
for (let c = rect.left; c <= rect.right; c++) {
|
|
6350
6022
|
const col = columns[c];
|
|
6351
|
-
if (col)
|
|
6023
|
+
if (!col) continue;
|
|
6024
|
+
if (!canEditCellAt(row, rIdx, col, c)) {
|
|
6025
|
+
blocked = true;
|
|
6026
|
+
continue;
|
|
6027
|
+
}
|
|
6028
|
+
nextValues[col.id] = "";
|
|
6029
|
+
cleared = true;
|
|
6352
6030
|
}
|
|
6353
6031
|
return { ...row, values: nextValues };
|
|
6354
6032
|
});
|
|
6033
|
+
if (blocked && !cleared) return;
|
|
6034
|
+
pushRowHistory();
|
|
6355
6035
|
emit(next);
|
|
6356
6036
|
},
|
|
6357
|
-
[columns, emit, pushRowHistory, rows]
|
|
6037
|
+
[canEditCellAt, columns, emit, pushRowHistory, rows]
|
|
6358
6038
|
);
|
|
6359
|
-
const getRangeCells =
|
|
6039
|
+
const getRangeCells = React15.useCallback(
|
|
6360
6040
|
(range) => {
|
|
6361
6041
|
const rect = normalizeRange(range);
|
|
6362
6042
|
const colIds = [];
|
|
@@ -6377,7 +6057,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6377
6057
|
},
|
|
6378
6058
|
[columns, rows]
|
|
6379
6059
|
);
|
|
6380
|
-
const enterEdit =
|
|
6060
|
+
const enterEdit = React15.useCallback(
|
|
6381
6061
|
(coord, initial, cursor) => {
|
|
6382
6062
|
setInputValue(initial);
|
|
6383
6063
|
setEditing(coord);
|
|
@@ -6386,12 +6066,18 @@ var ParameterTable = React17.forwardRef(
|
|
|
6386
6066
|
},
|
|
6387
6067
|
[]
|
|
6388
6068
|
);
|
|
6389
|
-
const commitEdit =
|
|
6069
|
+
const commitEdit = React15.useCallback(
|
|
6390
6070
|
(coord, val, moveNext = "none") => {
|
|
6391
6071
|
const col = columns[coord.colIdx];
|
|
6392
6072
|
if (!col) return;
|
|
6393
6073
|
const sanitizedVal = typeof val === "string" ? sanitizeUserText(val) : val;
|
|
6394
6074
|
const prevVal = rows[coord.rowIdx]?.values?.[col.id] ?? "";
|
|
6075
|
+
if (!isCellEditable(coord)) {
|
|
6076
|
+
setEditing(null);
|
|
6077
|
+
setInputValue("");
|
|
6078
|
+
setSelection({ anchor: coord, focus: coord });
|
|
6079
|
+
return;
|
|
6080
|
+
}
|
|
6395
6081
|
if (prevVal !== sanitizedVal) {
|
|
6396
6082
|
pushRowHistory();
|
|
6397
6083
|
setCellValue(coord.rowIdx, col.id, sanitizedVal);
|
|
@@ -6410,15 +6096,16 @@ var ParameterTable = React17.forwardRef(
|
|
|
6410
6096
|
}
|
|
6411
6097
|
setSelection({ anchor: nextCoord, focus: nextCoord });
|
|
6412
6098
|
},
|
|
6413
|
-
[clampCoord, columns, pushRowHistory, rows, setCellValue]
|
|
6099
|
+
[clampCoord, columns, isCellEditable, pushRowHistory, rows, setCellValue]
|
|
6414
6100
|
);
|
|
6415
|
-
const cancelEdit =
|
|
6101
|
+
const cancelEdit = React15.useCallback(() => {
|
|
6416
6102
|
setEditing(null);
|
|
6417
6103
|
setInputValue("");
|
|
6418
6104
|
}, []);
|
|
6419
|
-
const handleCellMouseDown =
|
|
6105
|
+
const handleCellMouseDown = React15.useCallback(
|
|
6420
6106
|
(coord, event) => {
|
|
6421
6107
|
if (disabled) return;
|
|
6108
|
+
setKeyboardMode(false);
|
|
6422
6109
|
if (editing) {
|
|
6423
6110
|
const col = columns[editing.colIdx];
|
|
6424
6111
|
if (col) {
|
|
@@ -6451,7 +6138,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6451
6138
|
setCellValue
|
|
6452
6139
|
]
|
|
6453
6140
|
);
|
|
6454
|
-
const handleCellMouseEnter =
|
|
6141
|
+
const handleCellMouseEnter = React15.useCallback(
|
|
6455
6142
|
(coord) => {
|
|
6456
6143
|
if (disabled) return;
|
|
6457
6144
|
if (!draggingRef.current) return;
|
|
@@ -6461,42 +6148,44 @@ var ParameterTable = React17.forwardRef(
|
|
|
6461
6148
|
},
|
|
6462
6149
|
[disabled, editing]
|
|
6463
6150
|
);
|
|
6464
|
-
const handleCellDoubleClick =
|
|
6151
|
+
const handleCellDoubleClick = React15.useCallback(
|
|
6465
6152
|
(coord) => {
|
|
6466
6153
|
if (disabled) return;
|
|
6467
6154
|
const col = columns[coord.colIdx];
|
|
6468
6155
|
const row = rows[coord.rowIdx];
|
|
6469
6156
|
if (!col || !row) return;
|
|
6157
|
+
if (!isCellEditable(coord)) return;
|
|
6470
6158
|
enterEdit(coord, row.values[col.id] ?? "", "end");
|
|
6471
6159
|
focusFloating();
|
|
6472
6160
|
},
|
|
6473
|
-
[columns, disabled, enterEdit, focusFloating, rows]
|
|
6161
|
+
[columns, disabled, enterEdit, focusFloating, isCellEditable, rows]
|
|
6474
6162
|
);
|
|
6475
|
-
const handleCellClick =
|
|
6163
|
+
const handleCellClick = React15.useCallback(
|
|
6476
6164
|
(coord, event) => {
|
|
6477
6165
|
const pending = reclickRef.current;
|
|
6478
6166
|
reclickRef.current = null;
|
|
6479
6167
|
if (event.detail > 1) return;
|
|
6480
6168
|
if (!pending || !coordEquals(pending, coord)) return;
|
|
6169
|
+
if (!isCellEditable(coord)) return;
|
|
6481
6170
|
reclickEnteredRef.current = true;
|
|
6482
6171
|
handleCellDoubleClick(coord);
|
|
6483
6172
|
},
|
|
6484
|
-
[handleCellDoubleClick]
|
|
6173
|
+
[handleCellDoubleClick, isCellEditable]
|
|
6485
6174
|
);
|
|
6486
|
-
const copySelection =
|
|
6175
|
+
const copySelection = React15.useCallback(async () => {
|
|
6487
6176
|
if (!selection) return false;
|
|
6488
6177
|
const { cells, colIds } = getRangeCells(selection);
|
|
6489
6178
|
const tsv = serializeCellsToTsv(cells);
|
|
6490
6179
|
const json = serializeCellsToJson(cells, colIds);
|
|
6491
6180
|
return writeCellsToClipboard(tsv, json);
|
|
6492
6181
|
}, [getRangeCells, selection]);
|
|
6493
|
-
const cutSelection =
|
|
6182
|
+
const cutSelection = React15.useCallback(async () => {
|
|
6494
6183
|
if (!selection) return;
|
|
6495
6184
|
const didWrite = await copySelection();
|
|
6496
6185
|
if (!didWrite) return;
|
|
6497
6186
|
clearRange(selection);
|
|
6498
6187
|
}, [clearRange, copySelection, selection]);
|
|
6499
|
-
const pasteAtSelection =
|
|
6188
|
+
const pasteAtSelection = React15.useCallback(async () => {
|
|
6500
6189
|
if (disabled || !selection) return;
|
|
6501
6190
|
const result = await readCellsFromClipboard();
|
|
6502
6191
|
if (!result) return;
|
|
@@ -6508,7 +6197,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6508
6197
|
pushRowHistory();
|
|
6509
6198
|
const requiredRowCount = startRow + cells.length;
|
|
6510
6199
|
const nextRealRows = [...realRows];
|
|
6511
|
-
while (nextRealRows.length < requiredRowCount) {
|
|
6200
|
+
while (withAddRow && nextRealRows.length < requiredRowCount) {
|
|
6512
6201
|
nextRealRows.push({ id: newRowId(), values: {} });
|
|
6513
6202
|
}
|
|
6514
6203
|
for (let r = 0; r < cells.length; r++) {
|
|
@@ -6521,6 +6210,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6521
6210
|
const targetColIdx = startCol + c;
|
|
6522
6211
|
const targetCol = columns[targetColIdx];
|
|
6523
6212
|
if (!targetCol) continue;
|
|
6213
|
+
if (!canEditCellAt(targetRow, targetRowIdx, targetCol, targetColIdx)) continue;
|
|
6524
6214
|
nextValues[targetCol.id] = srcRow[c] ?? "";
|
|
6525
6215
|
}
|
|
6526
6216
|
nextRealRows[targetRowIdx] = { ...targetRow, values: nextValues };
|
|
@@ -6536,24 +6226,34 @@ var ParameterTable = React17.forwardRef(
|
|
|
6536
6226
|
setSelection(newRange);
|
|
6537
6227
|
setEditing(null);
|
|
6538
6228
|
setInputValue("");
|
|
6539
|
-
}, [
|
|
6540
|
-
|
|
6229
|
+
}, [
|
|
6230
|
+
canEditCellAt,
|
|
6231
|
+
clampCoord,
|
|
6232
|
+
columns,
|
|
6233
|
+
disabled,
|
|
6234
|
+
emitRealRows,
|
|
6235
|
+
pushRowHistory,
|
|
6236
|
+
realRows,
|
|
6237
|
+
selection,
|
|
6238
|
+
withAddRow
|
|
6239
|
+
]);
|
|
6240
|
+
const handleCompositionStart = React15.useCallback(() => {
|
|
6541
6241
|
composingRef.current = true;
|
|
6542
|
-
if (!editing && selection && !disabled) {
|
|
6242
|
+
if (!editing && selection && !disabled && isCellEditable(selection.focus)) {
|
|
6543
6243
|
setEditing(selection.focus);
|
|
6544
6244
|
setInputValue("");
|
|
6545
6245
|
}
|
|
6546
|
-
}, [disabled, editing, selection]);
|
|
6547
|
-
const handleCompositionEnd =
|
|
6246
|
+
}, [disabled, editing, isCellEditable, selection]);
|
|
6247
|
+
const handleCompositionEnd = React15.useCallback(() => {
|
|
6548
6248
|
composingRef.current = false;
|
|
6549
6249
|
}, []);
|
|
6550
|
-
const editingRef =
|
|
6551
|
-
const inputValueRef =
|
|
6552
|
-
|
|
6250
|
+
const editingRef = React15.useRef(editing);
|
|
6251
|
+
const inputValueRef = React15.useRef(inputValue);
|
|
6252
|
+
React15.useEffect(() => {
|
|
6553
6253
|
editingRef.current = editing;
|
|
6554
6254
|
inputValueRef.current = inputValue;
|
|
6555
6255
|
}, [editing, inputValue]);
|
|
6556
|
-
|
|
6256
|
+
React15.useEffect(() => {
|
|
6557
6257
|
if (disabled) return;
|
|
6558
6258
|
const handler = (event) => {
|
|
6559
6259
|
const root = rootRef.current;
|
|
@@ -6580,9 +6280,10 @@ var ParameterTable = React17.forwardRef(
|
|
|
6580
6280
|
document.addEventListener("pointerdown", handler, true);
|
|
6581
6281
|
return () => document.removeEventListener("pointerdown", handler, true);
|
|
6582
6282
|
}, [columns, disabled, pushRowHistory, rows, setCellValue]);
|
|
6583
|
-
const handleKeyDown =
|
|
6283
|
+
const handleKeyDown = React15.useCallback(
|
|
6584
6284
|
(event) => {
|
|
6585
6285
|
if (disabled) return;
|
|
6286
|
+
if (!event.ctrlKey && !event.metaKey && !event.altKey) setKeyboardMode(true);
|
|
6586
6287
|
if (event.nativeEvent.isComposing || composingRef.current) return;
|
|
6587
6288
|
const isMod = event.metaKey || event.ctrlKey;
|
|
6588
6289
|
const key = event.key;
|
|
@@ -6673,6 +6374,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6673
6374
|
}
|
|
6674
6375
|
if (key === "F2" || key === "Enter" && !event.shiftKey && !isMod && !event.altKey) {
|
|
6675
6376
|
event.preventDefault();
|
|
6377
|
+
if (!isCellEditable(focus)) return;
|
|
6676
6378
|
const col = columns[focus.colIdx];
|
|
6677
6379
|
const row = rows[focus.rowIdx];
|
|
6678
6380
|
if (!col || !row) return;
|
|
@@ -6739,7 +6441,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6739
6441
|
let nextRow = focus.rowIdx;
|
|
6740
6442
|
if (nextCol >= totalCols) {
|
|
6741
6443
|
nextCol = 0;
|
|
6742
|
-
nextRow = Math.min(
|
|
6444
|
+
nextRow = Math.min(maxRowIdx, nextRow + 1);
|
|
6743
6445
|
} else if (nextCol < 0) {
|
|
6744
6446
|
nextCol = totalCols - 1;
|
|
6745
6447
|
nextRow = Math.max(0, nextRow - 1);
|
|
@@ -6750,6 +6452,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6750
6452
|
}
|
|
6751
6453
|
if (isPrintableKey(event)) {
|
|
6752
6454
|
event.preventDefault();
|
|
6455
|
+
if (!isCellEditable(focus)) return;
|
|
6753
6456
|
enterEdit(focus, key, "end");
|
|
6754
6457
|
return;
|
|
6755
6458
|
}
|
|
@@ -6766,13 +6469,14 @@ var ParameterTable = React17.forwardRef(
|
|
|
6766
6469
|
editing,
|
|
6767
6470
|
enterEdit,
|
|
6768
6471
|
inputValue,
|
|
6472
|
+
isCellEditable,
|
|
6473
|
+
maxRowIdx,
|
|
6769
6474
|
pasteAtSelection,
|
|
6770
6475
|
realRows,
|
|
6771
6476
|
redoLastRowOperation,
|
|
6772
6477
|
rows,
|
|
6773
6478
|
selection,
|
|
6774
6479
|
totalCols,
|
|
6775
|
-
totalRows,
|
|
6776
6480
|
undoLastRowOperation
|
|
6777
6481
|
]
|
|
6778
6482
|
);
|
|
@@ -6780,7 +6484,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6780
6484
|
useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),
|
|
6781
6485
|
useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })
|
|
6782
6486
|
);
|
|
6783
|
-
const handleDragEnd =
|
|
6487
|
+
const handleDragEnd = React15.useCallback(
|
|
6784
6488
|
(event) => {
|
|
6785
6489
|
const { active, over } = event;
|
|
6786
6490
|
if (!over || active.id === over.id) return;
|
|
@@ -6810,6 +6514,15 @@ var ParameterTable = React17.forwardRef(
|
|
|
6810
6514
|
width: "1px",
|
|
6811
6515
|
height: "1px"
|
|
6812
6516
|
};
|
|
6517
|
+
const hintId = React15.useId();
|
|
6518
|
+
const focusCoord = selection?.focus ?? null;
|
|
6519
|
+
const focusRow = focusCoord ? rows[focusCoord.rowIdx] : void 0;
|
|
6520
|
+
const focusCol = focusCoord ? columns[focusCoord.colIdx] : void 0;
|
|
6521
|
+
const activeHint = focusCoord && focusRow && focusCol ? cellHint?.(focusRow, focusCoord.rowIdx, focusCol, focusCoord.colIdx) : void 0;
|
|
6522
|
+
const activeReadonly = focusCoord ? isReadonlyCell(focusCoord) : false;
|
|
6523
|
+
const activeInvalid = Boolean(
|
|
6524
|
+
focusCoord && focusRow && focusCol && focusCoord.rowIdx !== rows.length - 1 && cellErrors?.[focusRow.id]?.[focusCol.id]
|
|
6525
|
+
);
|
|
6813
6526
|
return /* @__PURE__ */ jsxs(
|
|
6814
6527
|
"div",
|
|
6815
6528
|
{
|
|
@@ -6825,7 +6538,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6825
6538
|
children: [
|
|
6826
6539
|
caption && /* @__PURE__ */ jsx("div", { className: "mb-[8px] text-base-medium text-sys-text-main", children: caption }),
|
|
6827
6540
|
/* @__PURE__ */ jsxs(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: [
|
|
6828
|
-
/* @__PURE__ */ jsxs(Table, { className: "table-fixed !border-separate !border-spacing-0", children: [
|
|
6541
|
+
/* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Table, { className: "table-fixed !border-separate !border-spacing-0", children: [
|
|
6829
6542
|
/* @__PURE__ */ jsx(TableHeader, { spacing, children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
6830
6543
|
withHandle && /* @__PURE__ */ jsx(TableHead, { align: "center", style: { width: `${colWidths.handle}px` }, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "\uC21C\uC11C \uBCC0\uACBD" }) }),
|
|
6831
6544
|
columns.map((col) => /* @__PURE__ */ jsxs(
|
|
@@ -6840,9 +6553,18 @@ var ParameterTable = React17.forwardRef(
|
|
|
6840
6553
|
},
|
|
6841
6554
|
col.id
|
|
6842
6555
|
)),
|
|
6556
|
+
extraColumns?.map((col) => /* @__PURE__ */ jsx(
|
|
6557
|
+
TableHead,
|
|
6558
|
+
{
|
|
6559
|
+
align: "left",
|
|
6560
|
+
style: col.width ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0,
|
|
6561
|
+
children: col.header
|
|
6562
|
+
},
|
|
6563
|
+
col.id
|
|
6564
|
+
)),
|
|
6843
6565
|
/* @__PURE__ */ jsx(TableHead, { align: "center", style: { width: `${colWidths.delete}px` }, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "\uC0AD\uC81C" }) })
|
|
6844
6566
|
] }) }),
|
|
6845
|
-
/* @__PURE__ */ jsx(TableBody, { spacing, children: /* @__PURE__ */ jsx(SortableContext, { items: realRowIds, strategy: verticalListSortingStrategy, children: rows.map((row, rowIdx) => {
|
|
6567
|
+
/* @__PURE__ */ jsx(TableBody, { spacing, children: /* @__PURE__ */ jsx(SortableContext, { items: realRowIds, strategy: verticalListSortingStrategy, children: (disabled || !withAddRow ? realRows : rows).map((row, rowIdx) => {
|
|
6846
6568
|
const isPlaceholder = rowIdx === rows.length - 1;
|
|
6847
6569
|
return /* @__PURE__ */ jsx(
|
|
6848
6570
|
ParameterTableRow,
|
|
@@ -6854,6 +6576,11 @@ var ParameterTable = React17.forwardRef(
|
|
|
6854
6576
|
withHandle,
|
|
6855
6577
|
disabled,
|
|
6856
6578
|
isPlaceholder,
|
|
6579
|
+
isDeleteDisabled: !isRowDeletable(row, rowIdx),
|
|
6580
|
+
isReadonlyCell,
|
|
6581
|
+
extraColumns,
|
|
6582
|
+
cellHint,
|
|
6583
|
+
activeCell: keyboardMode ? focusCoord : null,
|
|
6857
6584
|
selectionRect,
|
|
6858
6585
|
editingCell: editing,
|
|
6859
6586
|
cellErrors,
|
|
@@ -6866,7 +6593,7 @@ var ParameterTable = React17.forwardRef(
|
|
|
6866
6593
|
row.id
|
|
6867
6594
|
);
|
|
6868
6595
|
}) }) })
|
|
6869
|
-
] }),
|
|
6596
|
+
] }) }),
|
|
6870
6597
|
/* @__PURE__ */ jsx(
|
|
6871
6598
|
"input",
|
|
6872
6599
|
{
|
|
@@ -6887,12 +6614,16 @@ var ParameterTable = React17.forwardRef(
|
|
|
6887
6614
|
onCompositionStart: handleCompositionStart,
|
|
6888
6615
|
onCompositionEnd: handleCompositionEnd,
|
|
6889
6616
|
"aria-label": editing && columns[editing.colIdx] ? columns[editing.colIdx].header : "Parameter table cell editor",
|
|
6617
|
+
"aria-invalid": activeInvalid || void 0,
|
|
6618
|
+
"aria-readonly": activeReadonly || void 0,
|
|
6619
|
+
"aria-describedby": activeHint ? hintId : void 0,
|
|
6890
6620
|
tabIndex: disabled ? -1 : 0,
|
|
6891
6621
|
disabled,
|
|
6892
6622
|
autoComplete: "off",
|
|
6893
6623
|
spellCheck: false
|
|
6894
6624
|
}
|
|
6895
|
-
)
|
|
6625
|
+
),
|
|
6626
|
+
activeHint && /* @__PURE__ */ jsx("span", { id: hintId, className: "sr-only", children: activeHint })
|
|
6896
6627
|
] })
|
|
6897
6628
|
]
|
|
6898
6629
|
}
|
|
@@ -6906,7 +6637,7 @@ var indicatorVariants = {
|
|
|
6906
6637
|
warning: "bg-warning30",
|
|
6907
6638
|
danger: "bg-danger30"
|
|
6908
6639
|
};
|
|
6909
|
-
var Progress =
|
|
6640
|
+
var Progress = React15.forwardRef(
|
|
6910
6641
|
({ value, variant = "primary", className, ...props }, ref) => {
|
|
6911
6642
|
const ariaLabel = props["aria-label"] ?? (props["aria-labelledby"] ? void 0 : value == null ? "\uC9C4\uD589 \uC911" : `${Math.round(value)}%`);
|
|
6912
6643
|
const percentage = useMemo(() => {
|
|
@@ -7011,7 +6742,7 @@ function RadioGroupItem({
|
|
|
7011
6742
|
}
|
|
7012
6743
|
);
|
|
7013
6744
|
}
|
|
7014
|
-
var RadioSectionGroupContext =
|
|
6745
|
+
var RadioSectionGroupContext = React15.createContext(null);
|
|
7015
6746
|
function RadioSectionGroup({
|
|
7016
6747
|
className,
|
|
7017
6748
|
value,
|
|
@@ -7019,7 +6750,7 @@ function RadioSectionGroup({
|
|
|
7019
6750
|
children,
|
|
7020
6751
|
...props
|
|
7021
6752
|
}) {
|
|
7022
|
-
const count =
|
|
6753
|
+
const count = React15.Children.count(children);
|
|
7023
6754
|
const stacked = orientation === "horizontal" && count >= 5;
|
|
7024
6755
|
const effectiveOrientation = stacked ? "vertical" : orientation;
|
|
7025
6756
|
const layoutClass = effectiveOrientation === "vertical" ? "flex flex-col" : count === 4 ? "grid w-full grid-cols-2" : count === 3 ? "grid w-full grid-cols-3" : count === 2 ? "grid w-full grid-cols-2" : "flex w-full";
|
|
@@ -7047,7 +6778,7 @@ function RadioSection({
|
|
|
7047
6778
|
onKeyDown,
|
|
7048
6779
|
...props
|
|
7049
6780
|
}) {
|
|
7050
|
-
const group =
|
|
6781
|
+
const group = React15.useContext(RadioSectionGroupContext);
|
|
7051
6782
|
const inGroup = group !== null;
|
|
7052
6783
|
const isSelected = inGroup ? group.value === value : selected;
|
|
7053
6784
|
const stacked = inGroup && group.stacked;
|
|
@@ -7151,9 +6882,9 @@ function RadioSection({
|
|
|
7151
6882
|
}
|
|
7152
6883
|
);
|
|
7153
6884
|
}
|
|
7154
|
-
var MultiSelectContext =
|
|
6885
|
+
var MultiSelectContext = React15.createContext(null);
|
|
7155
6886
|
function useMultiSelectContext() {
|
|
7156
|
-
const context =
|
|
6887
|
+
const context = React15.useContext(MultiSelectContext);
|
|
7157
6888
|
if (!context) {
|
|
7158
6889
|
throw new Error("MultiSelect compound components must be used within <MultiSelect>");
|
|
7159
6890
|
}
|
|
@@ -7171,24 +6902,24 @@ function MultiSelect2({
|
|
|
7171
6902
|
className,
|
|
7172
6903
|
children
|
|
7173
6904
|
}) {
|
|
7174
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
7175
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
7176
|
-
const [searchTerm, setSearchTerm] =
|
|
7177
|
-
|
|
6905
|
+
const [uncontrolledValue, setUncontrolledValue] = React15.useState(defaultValue ?? []);
|
|
6906
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React15.useState(defaultOpen);
|
|
6907
|
+
const [searchTerm, setSearchTerm] = React15.useState("");
|
|
6908
|
+
React15.useEffect(() => {
|
|
7178
6909
|
onSearchChange?.(searchTerm);
|
|
7179
6910
|
}, [searchTerm, onSearchChange]);
|
|
7180
6911
|
const isControlledValue = controlledValue !== void 0;
|
|
7181
6912
|
const isControlledOpen = controlledOpen !== void 0;
|
|
7182
6913
|
const values = isControlledValue ? controlledValue : uncontrolledValue;
|
|
7183
6914
|
const open = isControlledOpen ? controlledOpen : uncontrolledOpen;
|
|
7184
|
-
const [labelMap] =
|
|
7185
|
-
const registerLabel =
|
|
6915
|
+
const [labelMap] = React15.useState(() => /* @__PURE__ */ new Map());
|
|
6916
|
+
const registerLabel = React15.useCallback(
|
|
7186
6917
|
(itemValue, label) => {
|
|
7187
6918
|
labelMap.set(itemValue, label);
|
|
7188
6919
|
},
|
|
7189
6920
|
[labelMap]
|
|
7190
6921
|
);
|
|
7191
|
-
const handleToggleValue =
|
|
6922
|
+
const handleToggleValue = React15.useCallback(
|
|
7192
6923
|
(toggleValue) => {
|
|
7193
6924
|
const newValues = values.includes(toggleValue) ? values.filter((v) => v !== toggleValue) : [...values, toggleValue];
|
|
7194
6925
|
if (!isControlledValue) {
|
|
@@ -7199,7 +6930,7 @@ function MultiSelect2({
|
|
|
7199
6930
|
},
|
|
7200
6931
|
[values, isControlledValue, onValueChange]
|
|
7201
6932
|
);
|
|
7202
|
-
const handleRemoveValue =
|
|
6933
|
+
const handleRemoveValue = React15.useCallback(
|
|
7203
6934
|
(removeValue) => {
|
|
7204
6935
|
const newValues = values.filter((v) => v !== removeValue);
|
|
7205
6936
|
if (!isControlledValue) {
|
|
@@ -7209,13 +6940,13 @@ function MultiSelect2({
|
|
|
7209
6940
|
},
|
|
7210
6941
|
[values, isControlledValue, onValueChange]
|
|
7211
6942
|
);
|
|
7212
|
-
const handleClearAll =
|
|
6943
|
+
const handleClearAll = React15.useCallback(() => {
|
|
7213
6944
|
if (!isControlledValue) {
|
|
7214
6945
|
setUncontrolledValue([]);
|
|
7215
6946
|
}
|
|
7216
6947
|
onValueChange?.([]);
|
|
7217
6948
|
}, [isControlledValue, onValueChange]);
|
|
7218
|
-
const handleOpenChange =
|
|
6949
|
+
const handleOpenChange = React15.useCallback(
|
|
7219
6950
|
(newOpen) => {
|
|
7220
6951
|
if (!isControlledOpen) {
|
|
7221
6952
|
setUncontrolledOpen(newOpen);
|
|
@@ -7227,7 +6958,7 @@ function MultiSelect2({
|
|
|
7227
6958
|
},
|
|
7228
6959
|
[isControlledOpen, onOpenChange]
|
|
7229
6960
|
);
|
|
7230
|
-
const contextValue =
|
|
6961
|
+
const contextValue = React15.useMemo(
|
|
7231
6962
|
() => ({
|
|
7232
6963
|
open,
|
|
7233
6964
|
setOpen: handleOpenChange,
|
|
@@ -7256,22 +6987,22 @@ function MultiSelect2({
|
|
|
7256
6987
|
);
|
|
7257
6988
|
return /* @__PURE__ */ jsx(MultiSelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange, modal: true, children: /* @__PURE__ */ jsx("div", { "data-slot": "multi-select", className: cn("relative", className), children }) }) });
|
|
7258
6989
|
}
|
|
7259
|
-
var LabelPassContext =
|
|
7260
|
-
var useLabelPass = () =>
|
|
6990
|
+
var LabelPassContext = React15.createContext(false);
|
|
6991
|
+
var useLabelPass = () => React15.useContext(LabelPassContext);
|
|
7261
6992
|
function LabelPass({ children }) {
|
|
7262
|
-
const [mounted, setMounted] =
|
|
7263
|
-
|
|
6993
|
+
const [mounted, setMounted] = React15.useState(false);
|
|
6994
|
+
React15.useEffect(() => setMounted(true), []);
|
|
7264
6995
|
if (!mounted) return null;
|
|
7265
6996
|
return createPortal(
|
|
7266
6997
|
/* @__PURE__ */ jsx("div", { hidden: true, "data-slot": "select-label-pass", children: /* @__PURE__ */ jsx(LabelPassContext.Provider, { value: true, children }) }),
|
|
7267
6998
|
document.body
|
|
7268
6999
|
);
|
|
7269
7000
|
}
|
|
7270
|
-
var MultiSelectContent =
|
|
7001
|
+
var MultiSelectContent = React15.forwardRef(
|
|
7271
7002
|
({ className, children, align = "start", sideOffset = 4, ...props }, ref) => {
|
|
7272
7003
|
const { open, searchTerm, setSearchTerm } = useMultiSelectContext();
|
|
7273
|
-
const listRef =
|
|
7274
|
-
|
|
7004
|
+
const listRef = React15.useRef(null);
|
|
7005
|
+
React15.useEffect(() => {
|
|
7275
7006
|
if (open) {
|
|
7276
7007
|
requestAnimationFrame(() => {
|
|
7277
7008
|
const checkedItem = listRef.current?.querySelector("[data-state=checked]");
|
|
@@ -7326,8 +7057,8 @@ var MultiSelectContent = React17.forwardRef(
|
|
|
7326
7057
|
(() => {
|
|
7327
7058
|
const inputChildren = [];
|
|
7328
7059
|
const restChildren = [];
|
|
7329
|
-
|
|
7330
|
-
if (
|
|
7060
|
+
React15.Children.forEach(children, (child) => {
|
|
7061
|
+
if (React15.isValidElement(child) && child.type?.displayName === "MultiSelectInput") {
|
|
7331
7062
|
inputChildren.push(child);
|
|
7332
7063
|
} else {
|
|
7333
7064
|
restChildren.push(child);
|
|
@@ -7356,7 +7087,7 @@ var MultiSelectContent = React17.forwardRef(
|
|
|
7356
7087
|
}
|
|
7357
7088
|
);
|
|
7358
7089
|
MultiSelectContent.displayName = "MultiSelectContent";
|
|
7359
|
-
var MultiSelectEmpty =
|
|
7090
|
+
var MultiSelectEmpty = React15.forwardRef(
|
|
7360
7091
|
({ className, children, ...props }, ref) => {
|
|
7361
7092
|
const labelPass = useLabelPass();
|
|
7362
7093
|
if (labelPass) return null;
|
|
@@ -7376,7 +7107,7 @@ var MultiSelectEmpty = React17.forwardRef(
|
|
|
7376
7107
|
}
|
|
7377
7108
|
);
|
|
7378
7109
|
MultiSelectEmpty.displayName = "MultiSelectEmpty";
|
|
7379
|
-
var MultiSelectGroup =
|
|
7110
|
+
var MultiSelectGroup = React15.forwardRef(
|
|
7380
7111
|
({ className, children, ...props }, ref) => {
|
|
7381
7112
|
const labelPass = useLabelPass();
|
|
7382
7113
|
if (labelPass) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
@@ -7396,7 +7127,7 @@ var MultiSelectGroup = React17.forwardRef(
|
|
|
7396
7127
|
}
|
|
7397
7128
|
);
|
|
7398
7129
|
MultiSelectGroup.displayName = "MultiSelectGroup";
|
|
7399
|
-
var MultiSelectInput =
|
|
7130
|
+
var MultiSelectInput = React15.forwardRef(
|
|
7400
7131
|
({ className, onChange, ...props }, ref) => {
|
|
7401
7132
|
const { searchTerm, setSearchTerm } = useMultiSelectContext();
|
|
7402
7133
|
const handleChange = (e) => {
|
|
@@ -7467,7 +7198,7 @@ function SelectItemContent({
|
|
|
7467
7198
|
}
|
|
7468
7199
|
);
|
|
7469
7200
|
}
|
|
7470
|
-
var MultiSelectItem =
|
|
7201
|
+
var MultiSelectItem = React15.forwardRef(
|
|
7471
7202
|
({
|
|
7472
7203
|
className,
|
|
7473
7204
|
children,
|
|
@@ -7485,7 +7216,7 @@ var MultiSelectItem = React17.forwardRef(
|
|
|
7485
7216
|
const labelPass = useLabelPass();
|
|
7486
7217
|
const isSelected = values.includes(value);
|
|
7487
7218
|
const resolvedTextValue = textValue ?? (typeof children === "string" ? children : value);
|
|
7488
|
-
|
|
7219
|
+
React15.useEffect(() => {
|
|
7489
7220
|
registerLabel(value, resolvedTextValue);
|
|
7490
7221
|
}, [value, resolvedTextValue, registerLabel]);
|
|
7491
7222
|
if (labelPass) return null;
|
|
@@ -7567,7 +7298,7 @@ var MultiSelectItem = React17.forwardRef(
|
|
|
7567
7298
|
}
|
|
7568
7299
|
);
|
|
7569
7300
|
MultiSelectItem.displayName = "MultiSelectItem";
|
|
7570
|
-
var MultiSelectLoading =
|
|
7301
|
+
var MultiSelectLoading = React15.forwardRef(
|
|
7571
7302
|
({ className, children, ...props }, ref) => {
|
|
7572
7303
|
const labelPass = useLabelPass();
|
|
7573
7304
|
if (labelPass) return null;
|
|
@@ -7592,7 +7323,7 @@ var MultiSelectLoading = React17.forwardRef(
|
|
|
7592
7323
|
}
|
|
7593
7324
|
);
|
|
7594
7325
|
MultiSelectLoading.displayName = "MultiSelectLoading";
|
|
7595
|
-
var MultiSelectSeparator =
|
|
7326
|
+
var MultiSelectSeparator = React15.forwardRef(
|
|
7596
7327
|
({ className, ...props }, ref) => {
|
|
7597
7328
|
const labelPass = useLabelPass();
|
|
7598
7329
|
if (labelPass) return null;
|
|
@@ -7608,9 +7339,9 @@ var MultiSelectSeparator = React17.forwardRef(
|
|
|
7608
7339
|
}
|
|
7609
7340
|
);
|
|
7610
7341
|
MultiSelectSeparator.displayName = "MultiSelectSeparator";
|
|
7611
|
-
var SelectContext =
|
|
7342
|
+
var SelectContext = React15.createContext(null);
|
|
7612
7343
|
function useSelectContext() {
|
|
7613
|
-
const context =
|
|
7344
|
+
const context = React15.useContext(SelectContext);
|
|
7614
7345
|
if (!context) {
|
|
7615
7346
|
throw new Error("Select compound components must be used within <Select>");
|
|
7616
7347
|
}
|
|
@@ -7651,7 +7382,7 @@ var selectTriggerVariants = cva(
|
|
|
7651
7382
|
}
|
|
7652
7383
|
}
|
|
7653
7384
|
);
|
|
7654
|
-
var SelectTrigger =
|
|
7385
|
+
var SelectTrigger = React15.forwardRef(
|
|
7655
7386
|
({
|
|
7656
7387
|
className,
|
|
7657
7388
|
children,
|
|
@@ -7666,9 +7397,9 @@ var SelectTrigger = React17.forwardRef(
|
|
|
7666
7397
|
const formControl = useFormControlContext();
|
|
7667
7398
|
const isInvalid = isInvalidProp ?? formControl?.isInvalid ?? false;
|
|
7668
7399
|
const { open, disabled, value } = useSelectContext();
|
|
7669
|
-
const listboxId =
|
|
7670
|
-
const contentId =
|
|
7671
|
-
const [isFocused, setIsFocused] =
|
|
7400
|
+
const listboxId = React15.useId();
|
|
7401
|
+
const contentId = React15.useId();
|
|
7402
|
+
const [isFocused, setIsFocused] = React15.useState(false);
|
|
7672
7403
|
const {
|
|
7673
7404
|
hasLabel,
|
|
7674
7405
|
isFloating,
|
|
@@ -7683,17 +7414,19 @@ var SelectTrigger = React17.forwardRef(
|
|
|
7683
7414
|
isOpen: open,
|
|
7684
7415
|
isFocused,
|
|
7685
7416
|
isInvalid: !!isInvalid,
|
|
7686
|
-
isDisabled: disabled || !!props.disabled
|
|
7417
|
+
isDisabled: disabled || !!props.disabled,
|
|
7418
|
+
appearance: appearance ?? "standard"
|
|
7419
|
+
});
|
|
7687
7420
|
const showNotchedOutline = hasLabel && appearance !== "none";
|
|
7688
7421
|
const showNoneLabel = hasLabel && appearance === "none";
|
|
7689
|
-
const handleFocus =
|
|
7422
|
+
const handleFocus = React15.useCallback(
|
|
7690
7423
|
(e) => {
|
|
7691
7424
|
setIsFocused(true);
|
|
7692
7425
|
onFocusProp?.(e);
|
|
7693
7426
|
},
|
|
7694
7427
|
[onFocusProp]
|
|
7695
7428
|
);
|
|
7696
|
-
const handleBlur =
|
|
7429
|
+
const handleBlur = React15.useCallback(
|
|
7697
7430
|
(e) => {
|
|
7698
7431
|
setIsFocused(false);
|
|
7699
7432
|
onBlurProp?.(e);
|
|
@@ -7769,232 +7502,7 @@ var SelectTrigger = React17.forwardRef(
|
|
|
7769
7502
|
}
|
|
7770
7503
|
);
|
|
7771
7504
|
SelectTrigger.displayName = "SelectTrigger";
|
|
7772
|
-
var
|
|
7773
|
-
// whitespace-nowrap: 좁은 칸에서 태그 글자가 줄바꿈되지 않게 (2026-10-19 15차 D1, Badge 와 같은 규칙)
|
|
7774
|
-
"inline-flex items-center whitespace-nowrap py-[4px] text-small-bold gap-[4px] w-fit transition-colors",
|
|
7775
|
-
{
|
|
7776
|
-
variants: {
|
|
7777
|
-
variant: {
|
|
7778
|
-
primary: "bg-primary10 text-primary50",
|
|
7779
|
-
primaryBold: "bg-primary30 text-secondary10",
|
|
7780
|
-
secondary: "bg-secondary-o20 text-sys-text-main",
|
|
7781
|
-
secondaryBold: "bg-secondary60 text-secondary10",
|
|
7782
|
-
danger: "bg-danger10 text-danger50",
|
|
7783
|
-
dangerBold: "bg-danger30 text-secondary10",
|
|
7784
|
-
warning: "bg-warning10 text-warning50",
|
|
7785
|
-
warningBold: "bg-warning30 text-grayscale80",
|
|
7786
|
-
success: "bg-success10 text-success50",
|
|
7787
|
-
successBold: "bg-success30 text-secondary10",
|
|
7788
|
-
info: "bg-info10 text-info50",
|
|
7789
|
-
infoBold: "bg-info30 text-grayscale80",
|
|
7790
|
-
etc: "bg-etc10 text-etc50",
|
|
7791
|
-
etcBold: "bg-etc30 text-secondary10"
|
|
7792
|
-
},
|
|
7793
|
-
shape: {
|
|
7794
|
-
normal: "rounded-xsmall",
|
|
7795
|
-
rounded: "rounded-full"
|
|
7796
|
-
}
|
|
7797
|
-
},
|
|
7798
|
-
defaultVariants: {
|
|
7799
|
-
variant: "primary",
|
|
7800
|
-
shape: "normal"
|
|
7801
|
-
}
|
|
7802
|
-
}
|
|
7803
|
-
);
|
|
7804
|
-
var cancelIconXColor = {
|
|
7805
|
-
primary: "text-primary10",
|
|
7806
|
-
primaryBold: "text-primary30",
|
|
7807
|
-
secondary: "text-secondary-o20",
|
|
7808
|
-
secondaryBold: "text-secondary60",
|
|
7809
|
-
danger: "text-danger10",
|
|
7810
|
-
dangerBold: "text-danger30",
|
|
7811
|
-
warning: "text-warning10",
|
|
7812
|
-
warningBold: "text-warning30",
|
|
7813
|
-
success: "text-success10",
|
|
7814
|
-
successBold: "text-success30",
|
|
7815
|
-
info: "text-info10",
|
|
7816
|
-
infoBold: "text-info30",
|
|
7817
|
-
etc: "text-etc10",
|
|
7818
|
-
etcBold: "text-etc30"
|
|
7819
|
-
};
|
|
7820
|
-
var tagTextColor = {
|
|
7821
|
-
primary: "text-primary50",
|
|
7822
|
-
primaryBold: "text-secondary10",
|
|
7823
|
-
secondary: "text-sys-text-main",
|
|
7824
|
-
secondaryBold: "text-secondary10",
|
|
7825
|
-
danger: "text-danger50",
|
|
7826
|
-
dangerBold: "text-secondary10",
|
|
7827
|
-
warning: "text-warning50",
|
|
7828
|
-
warningBold: "text-grayscale80",
|
|
7829
|
-
success: "text-success50",
|
|
7830
|
-
successBold: "text-secondary10",
|
|
7831
|
-
info: "text-info50",
|
|
7832
|
-
infoBold: "text-grayscale80",
|
|
7833
|
-
etc: "text-etc50",
|
|
7834
|
-
etcBold: "text-secondary10"
|
|
7835
|
-
};
|
|
7836
|
-
var linkHoverBg = {
|
|
7837
|
-
primary: "hover:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
|
|
7838
|
-
primaryBold: "hover:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
|
|
7839
|
-
secondary: "hover:bg-secondary-o30",
|
|
7840
|
-
secondaryBold: "hover:bg-[image:linear-gradient(var(--color-secondary-o30),var(--color-secondary-o30))]",
|
|
7841
|
-
danger: "hover:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
|
|
7842
|
-
dangerBold: "hover:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
|
|
7843
|
-
warning: "hover:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
|
|
7844
|
-
warningBold: "hover:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
|
|
7845
|
-
success: "hover:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
|
|
7846
|
-
successBold: "hover:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
|
|
7847
|
-
info: "hover:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
|
|
7848
|
-
infoBold: "hover:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
|
|
7849
|
-
etc: "hover:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]",
|
|
7850
|
-
etcBold: "hover:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]"
|
|
7851
|
-
};
|
|
7852
|
-
var linkPressBg = {
|
|
7853
|
-
primary: "active:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
|
|
7854
|
-
primaryBold: "active:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
|
|
7855
|
-
secondary: "active:bg-secondary-o50",
|
|
7856
|
-
secondaryBold: "active:bg-[image:linear-gradient(var(--color-secondary-o50),var(--color-secondary-o50))]",
|
|
7857
|
-
danger: "active:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
|
|
7858
|
-
dangerBold: "active:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
|
|
7859
|
-
warning: "active:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
|
|
7860
|
-
warningBold: "active:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
|
|
7861
|
-
success: "active:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
|
|
7862
|
-
successBold: "active:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
|
|
7863
|
-
info: "active:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
|
|
7864
|
-
infoBold: "active:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
|
|
7865
|
-
etc: "active:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]",
|
|
7866
|
-
etcBold: "active:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]"
|
|
7867
|
-
};
|
|
7868
|
-
var linkHoverXColor = {
|
|
7869
|
-
primary: "group-hover/tag:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
|
|
7870
|
-
primaryBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
|
|
7871
|
-
secondary: "group-hover/tag:text-secondary-o30",
|
|
7872
|
-
secondaryBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-secondary-o30),var(--color-secondary-o30))]",
|
|
7873
|
-
danger: "group-hover/tag:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
|
|
7874
|
-
dangerBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
|
|
7875
|
-
warning: "group-hover/tag:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
|
|
7876
|
-
warningBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
|
|
7877
|
-
success: "group-hover/tag:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
|
|
7878
|
-
successBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
|
|
7879
|
-
info: "group-hover/tag:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
|
|
7880
|
-
infoBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
|
|
7881
|
-
etc: "group-hover/tag:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]",
|
|
7882
|
-
etcBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]"
|
|
7883
|
-
};
|
|
7884
|
-
var linkPressXColor = {
|
|
7885
|
-
primary: "group-active/tag:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
|
|
7886
|
-
primaryBold: "group-active/tag:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
|
|
7887
|
-
secondary: "group-active/tag:text-secondary-o50",
|
|
7888
|
-
secondaryBold: "group-active/tag:bg-[image:linear-gradient(var(--color-secondary-o50),var(--color-secondary-o50))]",
|
|
7889
|
-
danger: "group-active/tag:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
|
|
7890
|
-
dangerBold: "group-active/tag:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
|
|
7891
|
-
warning: "group-active/tag:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
|
|
7892
|
-
warningBold: "group-active/tag:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
|
|
7893
|
-
success: "group-active/tag:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
|
|
7894
|
-
successBold: "group-active/tag:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
|
|
7895
|
-
info: "group-active/tag:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
|
|
7896
|
-
infoBold: "group-active/tag:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
|
|
7897
|
-
etc: "group-active/tag:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]",
|
|
7898
|
-
etcBold: "group-active/tag:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]"
|
|
7899
|
-
};
|
|
7900
|
-
function Tag({
|
|
7901
|
-
className,
|
|
7902
|
-
variant,
|
|
7903
|
-
shape,
|
|
7904
|
-
asChild = false,
|
|
7905
|
-
elemBefore,
|
|
7906
|
-
onRemove,
|
|
7907
|
-
children,
|
|
7908
|
-
...props
|
|
7909
|
-
}) {
|
|
7910
|
-
const Comp = asChild ? Slot : "div";
|
|
7911
|
-
const v = variant ?? "primary";
|
|
7912
|
-
const removeOutside = asChild && !!onRemove;
|
|
7913
|
-
const removeButton = onRemove && /* @__PURE__ */ jsx(
|
|
7914
|
-
"button",
|
|
7915
|
-
{
|
|
7916
|
-
type: "button",
|
|
7917
|
-
onClick: (e) => {
|
|
7918
|
-
e.preventDefault();
|
|
7919
|
-
e.stopPropagation();
|
|
7920
|
-
onRemove();
|
|
7921
|
-
},
|
|
7922
|
-
onKeyDown: (e) => {
|
|
7923
|
-
if (e.key === "Backspace" || e.key === "Delete") {
|
|
7924
|
-
e.preventDefault();
|
|
7925
|
-
onRemove();
|
|
7926
|
-
}
|
|
7927
|
-
},
|
|
7928
|
-
className: "absolute right-[4px] top-1/2 -translate-y-1/2 inline-flex items-center justify-center size-[16px] rounded-full focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main focus-visible:outline-offset-[-1px] group/remove",
|
|
7929
|
-
"aria-label": "\uC0AD\uC81C",
|
|
7930
|
-
children: /* @__PURE__ */ jsx(
|
|
7931
|
-
CancelIcon,
|
|
7932
|
-
{
|
|
7933
|
-
size: 14,
|
|
7934
|
-
iconClassName: cn(
|
|
7935
|
-
cancelIconXColor[v],
|
|
7936
|
-
asChild && [linkHoverXColor[v], linkPressXColor[v]],
|
|
7937
|
-
"group-hover/remove:bg-sys-background hover:group-hover/remove:bg-[image:linear-gradient(var(--color-danger-o10),var(--color-danger-o10))]",
|
|
7938
|
-
"group-active/remove:bg-sys-background active:group-active/remove:bg-[image:linear-gradient(var(--color-danger-o20),var(--color-danger-o20))]"
|
|
7939
|
-
)
|
|
7940
|
-
}
|
|
7941
|
-
)
|
|
7942
|
-
}
|
|
7943
|
-
);
|
|
7944
|
-
const tag = /* @__PURE__ */ jsxs(
|
|
7945
|
-
Comp,
|
|
7946
|
-
{
|
|
7947
|
-
className: cn(
|
|
7948
|
-
tagVariants({ variant, shape }),
|
|
7949
|
-
elemBefore ? "pl-[6px]" : "pl-[8px]",
|
|
7950
|
-
onRemove ? "pr-[24px]" : "pr-[8px]",
|
|
7951
|
-
onRemove && !removeOutside && "relative",
|
|
7952
|
-
asChild && [
|
|
7953
|
-
!removeOutside && "group/tag",
|
|
7954
|
-
"cursor-pointer hover:underline active:underline",
|
|
7955
|
-
"focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main focus-visible:outline-offset-[1px] focus-visible:underline",
|
|
7956
|
-
linkHoverBg[v],
|
|
7957
|
-
linkPressBg[v]
|
|
7958
|
-
],
|
|
7959
|
-
onRemove && "transition-colors",
|
|
7960
|
-
onRemove && !removeOutside && [
|
|
7961
|
-
"has-[button:hover]:bg-sys-background has-[button:hover]:bg-[image:linear-gradient(var(--color-danger-o10),var(--color-danger-o10))] has-[button:hover]:text-danger40",
|
|
7962
|
-
"active:has-[button:active]:bg-sys-background active:has-[button:active]:bg-[image:linear-gradient(var(--color-danger-o20),var(--color-danger-o20))] active:has-[button:active]:text-danger40"
|
|
7963
|
-
],
|
|
7964
|
-
removeOutside && [
|
|
7965
|
-
"group-has-[button:hover]/tag:bg-sys-background group-has-[button:hover]/tag:bg-[image:linear-gradient(var(--color-danger-o10),var(--color-danger-o10))] group-has-[button:hover]/tag:text-danger40",
|
|
7966
|
-
"group-has-[button:active]/tag:bg-sys-background group-has-[button:active]/tag:bg-[image:linear-gradient(var(--color-danger-o20),var(--color-danger-o20))] group-has-[button:active]/tag:text-danger40"
|
|
7967
|
-
],
|
|
7968
|
-
className
|
|
7969
|
-
),
|
|
7970
|
-
...props,
|
|
7971
|
-
children: [
|
|
7972
|
-
elemBefore && /* @__PURE__ */ jsx("span", { className: "shrink-0 inline-flex items-center size-[16px]", children: elemBefore }),
|
|
7973
|
-
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
7974
|
-
!removeOutside && removeButton
|
|
7975
|
-
]
|
|
7976
|
-
}
|
|
7977
|
-
);
|
|
7978
|
-
if (removeOutside) {
|
|
7979
|
-
return /* @__PURE__ */ jsxs(
|
|
7980
|
-
"span",
|
|
7981
|
-
{
|
|
7982
|
-
className: cn(
|
|
7983
|
-
"group/tag relative inline-flex w-fit",
|
|
7984
|
-
// 삭제 버튼(currentColor)이 태그 글자색을, 삭제 hover·press 시 danger 색을 따르게 한다
|
|
7985
|
-
tagTextColor[v],
|
|
7986
|
-
"has-[button:hover]:text-danger40 has-[button:active]:text-danger40"
|
|
7987
|
-
),
|
|
7988
|
-
children: [
|
|
7989
|
-
tag,
|
|
7990
|
-
removeButton
|
|
7991
|
-
]
|
|
7992
|
-
}
|
|
7993
|
-
);
|
|
7994
|
-
}
|
|
7995
|
-
return tag;
|
|
7996
|
-
}
|
|
7997
|
-
var MultiSelectTrigger = React17.forwardRef(
|
|
7505
|
+
var MultiSelectTrigger = React15.forwardRef(
|
|
7998
7506
|
({
|
|
7999
7507
|
className,
|
|
8000
7508
|
appearance,
|
|
@@ -8019,10 +7527,10 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8019
7527
|
searchTerm,
|
|
8020
7528
|
setSearchTerm
|
|
8021
7529
|
} = useMultiSelectContext();
|
|
8022
|
-
const inputRef =
|
|
8023
|
-
const chevronOpenRef =
|
|
8024
|
-
const listboxId =
|
|
8025
|
-
const [isFocused, setIsFocused] =
|
|
7530
|
+
const inputRef = React15.useRef(null);
|
|
7531
|
+
const chevronOpenRef = React15.useRef(false);
|
|
7532
|
+
const listboxId = React15.useId();
|
|
7533
|
+
const [isFocused, setIsFocused] = React15.useState(false);
|
|
8026
7534
|
const hasValue = values.length > 0;
|
|
8027
7535
|
const {
|
|
8028
7536
|
hasLabel,
|
|
@@ -8038,10 +7546,12 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8038
7546
|
isOpen: open,
|
|
8039
7547
|
isFocused,
|
|
8040
7548
|
isInvalid: !!isInvalid,
|
|
8041
|
-
isDisabled: !!disabled
|
|
7549
|
+
isDisabled: !!disabled,
|
|
7550
|
+
appearance: appearance ?? "standard"
|
|
7551
|
+
});
|
|
8042
7552
|
const showNotchedOutline = hasLabel && appearance !== "none";
|
|
8043
7553
|
const showNoneLabel = hasLabel && appearance === "none";
|
|
8044
|
-
const handleContainerClick =
|
|
7554
|
+
const handleContainerClick = React15.useCallback(
|
|
8045
7555
|
(e) => {
|
|
8046
7556
|
if (disabled) return;
|
|
8047
7557
|
if (e.target.closest("button")) return;
|
|
@@ -8050,7 +7560,7 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8050
7560
|
},
|
|
8051
7561
|
[disabled, open, setOpen]
|
|
8052
7562
|
);
|
|
8053
|
-
const handleKeyDown =
|
|
7563
|
+
const handleKeyDown = React15.useCallback(
|
|
8054
7564
|
(e) => {
|
|
8055
7565
|
if (e.key === "Backspace" && searchTerm === "" && values.length > 0) {
|
|
8056
7566
|
onRemoveValue(values[values.length - 1]);
|
|
@@ -8067,7 +7577,7 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8067
7577
|
},
|
|
8068
7578
|
[searchTerm, values, onRemoveValue, open, setOpen]
|
|
8069
7579
|
);
|
|
8070
|
-
const handleContainerKeyDown =
|
|
7580
|
+
const handleContainerKeyDown = React15.useCallback(
|
|
8071
7581
|
(e) => {
|
|
8072
7582
|
if (e.target instanceof HTMLInputElement) return;
|
|
8073
7583
|
if (disabled) return;
|
|
@@ -8083,14 +7593,14 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8083
7593
|
},
|
|
8084
7594
|
[disabled, open, setOpen]
|
|
8085
7595
|
);
|
|
8086
|
-
const handleInputChange =
|
|
7596
|
+
const handleInputChange = React15.useCallback(
|
|
8087
7597
|
(e) => {
|
|
8088
7598
|
setSearchTerm(e.target.value);
|
|
8089
7599
|
if (!open) setOpen(true);
|
|
8090
7600
|
},
|
|
8091
7601
|
[setSearchTerm, open, setOpen]
|
|
8092
7602
|
);
|
|
8093
|
-
const handleFocus =
|
|
7603
|
+
const handleFocus = React15.useCallback(
|
|
8094
7604
|
(e) => {
|
|
8095
7605
|
if (disabled) {
|
|
8096
7606
|
e.currentTarget.blur();
|
|
@@ -8100,12 +7610,12 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8100
7610
|
},
|
|
8101
7611
|
[disabled]
|
|
8102
7612
|
);
|
|
8103
|
-
const handleBlur =
|
|
7613
|
+
const handleBlur = React15.useCallback((e) => {
|
|
8104
7614
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
8105
7615
|
setIsFocused(false);
|
|
8106
7616
|
}
|
|
8107
7617
|
}, []);
|
|
8108
|
-
const handleClearAll =
|
|
7618
|
+
const handleClearAll = React15.useCallback(
|
|
8109
7619
|
(e) => {
|
|
8110
7620
|
e.stopPropagation();
|
|
8111
7621
|
onClearAll();
|
|
@@ -8114,7 +7624,7 @@ var MultiSelectTrigger = React17.forwardRef(
|
|
|
8114
7624
|
},
|
|
8115
7625
|
[onClearAll, setSearchTerm]
|
|
8116
7626
|
);
|
|
8117
|
-
const handleRemoveTag =
|
|
7627
|
+
const handleRemoveTag = React15.useCallback(
|
|
8118
7628
|
(value) => {
|
|
8119
7629
|
onRemoveValue(value);
|
|
8120
7630
|
inputRef.current?.focus();
|
|
@@ -8275,14 +7785,14 @@ function Select({
|
|
|
8275
7785
|
className,
|
|
8276
7786
|
children
|
|
8277
7787
|
}) {
|
|
8278
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
8279
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
7788
|
+
const [uncontrolledValue, setUncontrolledValue] = React15.useState(defaultValue);
|
|
7789
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React15.useState(defaultOpen);
|
|
8280
7790
|
const isControlledValue = controlledValue !== void 0;
|
|
8281
7791
|
const isControlledOpen = controlledOpen !== void 0;
|
|
8282
7792
|
const value = isControlledValue ? controlledValue : uncontrolledValue;
|
|
8283
7793
|
const open = isControlledOpen ? controlledOpen : uncontrolledOpen;
|
|
8284
|
-
const [labelMap, setLabelMap] =
|
|
8285
|
-
const registerLabel =
|
|
7794
|
+
const [labelMap, setLabelMap] = React15.useState(() => /* @__PURE__ */ new Map());
|
|
7795
|
+
const registerLabel = React15.useCallback((itemValue, label) => {
|
|
8286
7796
|
setLabelMap((prev) => {
|
|
8287
7797
|
if (prev.get(itemValue) === label) return prev;
|
|
8288
7798
|
const next = new Map(prev);
|
|
@@ -8290,7 +7800,7 @@ function Select({
|
|
|
8290
7800
|
return next;
|
|
8291
7801
|
});
|
|
8292
7802
|
}, []);
|
|
8293
|
-
const handleValueChange =
|
|
7803
|
+
const handleValueChange = React15.useCallback(
|
|
8294
7804
|
(newValue) => {
|
|
8295
7805
|
if (!isControlledValue) {
|
|
8296
7806
|
setUncontrolledValue(newValue);
|
|
@@ -8299,7 +7809,7 @@ function Select({
|
|
|
8299
7809
|
},
|
|
8300
7810
|
[isControlledValue, onValueChange]
|
|
8301
7811
|
);
|
|
8302
|
-
const handleOpenChange =
|
|
7812
|
+
const handleOpenChange = React15.useCallback(
|
|
8303
7813
|
(newOpen) => {
|
|
8304
7814
|
if (!isControlledOpen) {
|
|
8305
7815
|
setUncontrolledOpen(newOpen);
|
|
@@ -8308,7 +7818,7 @@ function Select({
|
|
|
8308
7818
|
},
|
|
8309
7819
|
[isControlledOpen, onOpenChange]
|
|
8310
7820
|
);
|
|
8311
|
-
const contextValue =
|
|
7821
|
+
const contextValue = React15.useMemo(
|
|
8312
7822
|
() => ({
|
|
8313
7823
|
open,
|
|
8314
7824
|
setOpen: handleOpenChange,
|
|
@@ -8322,19 +7832,19 @@ function Select({
|
|
|
8322
7832
|
);
|
|
8323
7833
|
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange, modal: true, children: /* @__PURE__ */ jsx("div", { "data-slot": "select", className: cn("relative", className), children }) }) });
|
|
8324
7834
|
}
|
|
8325
|
-
var SelectContent =
|
|
7835
|
+
var SelectContent = React15.forwardRef(
|
|
8326
7836
|
({ className, children, align = "start", sideOffset = 4, ...props }, ref) => {
|
|
8327
7837
|
const { open } = useSelectContext();
|
|
8328
|
-
const [search, setSearch] =
|
|
8329
|
-
const listRef =
|
|
8330
|
-
const prevOpen =
|
|
8331
|
-
|
|
7838
|
+
const [search, setSearch] = React15.useState("");
|
|
7839
|
+
const listRef = React15.useRef(null);
|
|
7840
|
+
const prevOpen = React15.useRef(open);
|
|
7841
|
+
React15.useEffect(() => {
|
|
8332
7842
|
if (prevOpen.current && !open) {
|
|
8333
7843
|
setSearch("");
|
|
8334
7844
|
}
|
|
8335
7845
|
prevOpen.current = open;
|
|
8336
7846
|
}, [open]);
|
|
8337
|
-
|
|
7847
|
+
React15.useEffect(() => {
|
|
8338
7848
|
if (open) {
|
|
8339
7849
|
requestAnimationFrame(() => {
|
|
8340
7850
|
const checkedItem = listRef.current?.querySelector("[data-state=checked]");
|
|
@@ -8376,8 +7886,8 @@ var SelectContent = React17.forwardRef(
|
|
|
8376
7886
|
children: /* @__PURE__ */ jsx(SelectSearchContext.Provider, { value: { search, setSearch }, children: (() => {
|
|
8377
7887
|
const inputChildren = [];
|
|
8378
7888
|
const restChildren = [];
|
|
8379
|
-
|
|
8380
|
-
if (
|
|
7889
|
+
React15.Children.forEach(children, (child) => {
|
|
7890
|
+
if (React15.isValidElement(child) && child.type?.displayName === "SelectInput") {
|
|
8381
7891
|
inputChildren.push(child);
|
|
8382
7892
|
} else {
|
|
8383
7893
|
restChildren.push(child);
|
|
@@ -8403,15 +7913,15 @@ var SelectContent = React17.forwardRef(
|
|
|
8403
7913
|
}
|
|
8404
7914
|
);
|
|
8405
7915
|
SelectContent.displayName = "SelectContent";
|
|
8406
|
-
var SelectSearchContext =
|
|
7916
|
+
var SelectSearchContext = React15.createContext({
|
|
8407
7917
|
search: "",
|
|
8408
7918
|
setSearch: () => {
|
|
8409
7919
|
}
|
|
8410
7920
|
});
|
|
8411
7921
|
function useSelectSearch() {
|
|
8412
|
-
return
|
|
7922
|
+
return React15.useContext(SelectSearchContext);
|
|
8413
7923
|
}
|
|
8414
|
-
var SelectEmpty =
|
|
7924
|
+
var SelectEmpty = React15.forwardRef(
|
|
8415
7925
|
({ className, children, ...props }, ref) => {
|
|
8416
7926
|
const labelPass = useLabelPass();
|
|
8417
7927
|
if (labelPass) return null;
|
|
@@ -8432,7 +7942,7 @@ var SelectEmpty = React17.forwardRef(
|
|
|
8432
7942
|
}
|
|
8433
7943
|
);
|
|
8434
7944
|
SelectEmpty.displayName = "SelectEmpty";
|
|
8435
|
-
var SelectGroup =
|
|
7945
|
+
var SelectGroup = React15.forwardRef(
|
|
8436
7946
|
({ className, children, ...props }, ref) => {
|
|
8437
7947
|
const labelPass = useLabelPass();
|
|
8438
7948
|
if (labelPass) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
@@ -8452,7 +7962,7 @@ var SelectGroup = React17.forwardRef(
|
|
|
8452
7962
|
}
|
|
8453
7963
|
);
|
|
8454
7964
|
SelectGroup.displayName = "SelectGroup";
|
|
8455
|
-
var SelectInput =
|
|
7965
|
+
var SelectInput = React15.forwardRef(
|
|
8456
7966
|
({ className, onChange, ...props }, ref) => {
|
|
8457
7967
|
const { search, setSearch } = useSelectSearch();
|
|
8458
7968
|
const handleChange = (value) => {
|
|
@@ -8495,7 +8005,7 @@ var SelectInput = React17.forwardRef(
|
|
|
8495
8005
|
}
|
|
8496
8006
|
);
|
|
8497
8007
|
SelectInput.displayName = "SelectInput";
|
|
8498
|
-
var SelectItem =
|
|
8008
|
+
var SelectItem = React15.forwardRef(
|
|
8499
8009
|
({
|
|
8500
8010
|
className,
|
|
8501
8011
|
children,
|
|
@@ -8513,7 +8023,7 @@ var SelectItem = React17.forwardRef(
|
|
|
8513
8023
|
const labelPass = useLabelPass();
|
|
8514
8024
|
const isSelected = selectedValue === value;
|
|
8515
8025
|
const resolvedTextValue = textValue ?? (typeof children === "string" ? children : value);
|
|
8516
|
-
|
|
8026
|
+
React15.useEffect(() => {
|
|
8517
8027
|
registerLabel(value, resolvedTextValue);
|
|
8518
8028
|
}, [value, resolvedTextValue, registerLabel]);
|
|
8519
8029
|
if (labelPass) return null;
|
|
@@ -8559,7 +8069,7 @@ var SelectItem = React17.forwardRef(
|
|
|
8559
8069
|
}
|
|
8560
8070
|
);
|
|
8561
8071
|
SelectItem.displayName = "SelectItem";
|
|
8562
|
-
var SelectLoading =
|
|
8072
|
+
var SelectLoading = React15.forwardRef(
|
|
8563
8073
|
({ className, children, ...props }, ref) => {
|
|
8564
8074
|
const labelPass = useLabelPass();
|
|
8565
8075
|
if (labelPass) return null;
|
|
@@ -8584,7 +8094,7 @@ var SelectLoading = React17.forwardRef(
|
|
|
8584
8094
|
}
|
|
8585
8095
|
);
|
|
8586
8096
|
SelectLoading.displayName = "SelectLoading";
|
|
8587
|
-
var SelectRadioGroup =
|
|
8097
|
+
var SelectRadioGroup = React15.forwardRef(
|
|
8588
8098
|
({ className, children, ...props }, ref) => {
|
|
8589
8099
|
const labelPass = useLabelPass();
|
|
8590
8100
|
if (labelPass) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
@@ -8602,7 +8112,7 @@ var SelectRadioGroup = React17.forwardRef(
|
|
|
8602
8112
|
}
|
|
8603
8113
|
);
|
|
8604
8114
|
SelectRadioGroup.displayName = "SelectRadioGroup";
|
|
8605
|
-
var SelectRadioItem =
|
|
8115
|
+
var SelectRadioItem = React15.forwardRef(
|
|
8606
8116
|
({
|
|
8607
8117
|
className,
|
|
8608
8118
|
children,
|
|
@@ -8620,7 +8130,7 @@ var SelectRadioItem = React17.forwardRef(
|
|
|
8620
8130
|
const labelPass = useLabelPass();
|
|
8621
8131
|
const isSelected = selectedValue === value;
|
|
8622
8132
|
const resolvedTextValue = textValue ?? (typeof children === "string" ? children : value);
|
|
8623
|
-
|
|
8133
|
+
React15.useEffect(() => {
|
|
8624
8134
|
registerLabel(value, resolvedTextValue);
|
|
8625
8135
|
}, [value, resolvedTextValue, registerLabel]);
|
|
8626
8136
|
if (labelPass) return null;
|
|
@@ -8686,7 +8196,7 @@ var SelectRadioItem = React17.forwardRef(
|
|
|
8686
8196
|
}
|
|
8687
8197
|
);
|
|
8688
8198
|
SelectRadioItem.displayName = "SelectRadioItem";
|
|
8689
|
-
var SelectSeparator =
|
|
8199
|
+
var SelectSeparator = React15.forwardRef(
|
|
8690
8200
|
({ className, ...props }, ref) => {
|
|
8691
8201
|
const labelPass = useLabelPass();
|
|
8692
8202
|
if (labelPass) return null;
|
|
@@ -8710,16 +8220,16 @@ function SelectValue({ placeholder }) {
|
|
|
8710
8220
|
}
|
|
8711
8221
|
return /* @__PURE__ */ jsx("span", { "data-slot": "select-value", className: "truncate whitespace-pre", children: sanitizeUserText(displayText) });
|
|
8712
8222
|
}
|
|
8713
|
-
var SidebarContext =
|
|
8223
|
+
var SidebarContext = React15.createContext(void 0);
|
|
8714
8224
|
function SidebarProvider({
|
|
8715
8225
|
children,
|
|
8716
8226
|
defaultOpen = true,
|
|
8717
8227
|
open: controlledOpen,
|
|
8718
8228
|
onOpenChange
|
|
8719
8229
|
}) {
|
|
8720
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
8230
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React15.useState(defaultOpen);
|
|
8721
8231
|
const isOpen = controlledOpen ?? uncontrolledOpen;
|
|
8722
|
-
const toggle =
|
|
8232
|
+
const toggle = React15.useCallback(() => {
|
|
8723
8233
|
const newState = !isOpen;
|
|
8724
8234
|
if (onOpenChange) {
|
|
8725
8235
|
onOpenChange(newState);
|
|
@@ -8730,13 +8240,13 @@ function SidebarProvider({
|
|
|
8730
8240
|
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { isOpen, toggle }, children });
|
|
8731
8241
|
}
|
|
8732
8242
|
function useSidebar() {
|
|
8733
|
-
const context =
|
|
8243
|
+
const context = React15.useContext(SidebarContext);
|
|
8734
8244
|
if (!context) {
|
|
8735
8245
|
throw new Error("useSidebar must be used within SidebarProvider");
|
|
8736
8246
|
}
|
|
8737
8247
|
return context;
|
|
8738
8248
|
}
|
|
8739
|
-
var Sidebar =
|
|
8249
|
+
var Sidebar = React15.forwardRef(
|
|
8740
8250
|
({ className, top = 0, openWidth = 240, closedWidth = 72, style, children, ...props }, ref) => {
|
|
8741
8251
|
const { isOpen } = useSidebar();
|
|
8742
8252
|
return /* @__PURE__ */ jsx(
|
|
@@ -8764,7 +8274,7 @@ var Sidebar = React17.forwardRef(
|
|
|
8764
8274
|
}
|
|
8765
8275
|
);
|
|
8766
8276
|
Sidebar.displayName = "Sidebar";
|
|
8767
|
-
var SidebarHeader =
|
|
8277
|
+
var SidebarHeader = React15.forwardRef(
|
|
8768
8278
|
({
|
|
8769
8279
|
className,
|
|
8770
8280
|
avatar,
|
|
@@ -8777,9 +8287,9 @@ var SidebarHeader = React17.forwardRef(
|
|
|
8777
8287
|
...props
|
|
8778
8288
|
}, ref) => {
|
|
8779
8289
|
const { isOpen, toggle } = useSidebar();
|
|
8780
|
-
const [isHovered, setIsHovered] =
|
|
8781
|
-
const [isFullyCollapsed, setIsFullyCollapsed] =
|
|
8782
|
-
|
|
8290
|
+
const [isHovered, setIsHovered] = React15.useState(false);
|
|
8291
|
+
const [isFullyCollapsed, setIsFullyCollapsed] = React15.useState(!isOpen);
|
|
8292
|
+
React15.useEffect(() => {
|
|
8783
8293
|
if (!isOpen) {
|
|
8784
8294
|
const timer = setTimeout(() => setIsFullyCollapsed(true), 200);
|
|
8785
8295
|
return () => clearTimeout(timer);
|
|
@@ -8889,7 +8399,7 @@ var SidebarHeader = React17.forwardRef(
|
|
|
8889
8399
|
}
|
|
8890
8400
|
);
|
|
8891
8401
|
SidebarHeader.displayName = "SidebarHeader";
|
|
8892
|
-
var SidebarToggle =
|
|
8402
|
+
var SidebarToggle = React15.forwardRef(
|
|
8893
8403
|
({ className, openLabel = "\uC0AC\uC774\uB4DC\uBC14 \uC5F4\uAE30", closeLabel = "\uC0AC\uC774\uB4DC\uBC14 \uC811\uAE30", ...props }, ref) => {
|
|
8894
8404
|
const { isOpen, toggle } = useSidebar();
|
|
8895
8405
|
return /* @__PURE__ */ jsx(
|
|
@@ -8922,11 +8432,11 @@ var SidebarToggle = React17.forwardRef(
|
|
|
8922
8432
|
}
|
|
8923
8433
|
);
|
|
8924
8434
|
SidebarToggle.displayName = "SidebarToggle";
|
|
8925
|
-
var SidebarContent =
|
|
8435
|
+
var SidebarContent = React15.forwardRef(
|
|
8926
8436
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn("flex-1 overflow-x-clip", className), ...props })
|
|
8927
8437
|
);
|
|
8928
8438
|
SidebarContent.displayName = "SidebarContent";
|
|
8929
|
-
var SidebarSection =
|
|
8439
|
+
var SidebarSection = React15.forwardRef(
|
|
8930
8440
|
({
|
|
8931
8441
|
className,
|
|
8932
8442
|
title,
|
|
@@ -8938,9 +8448,9 @@ var SidebarSection = React17.forwardRef(
|
|
|
8938
8448
|
...props
|
|
8939
8449
|
}, ref) => {
|
|
8940
8450
|
const { isOpen: sidebarOpen } = useSidebar();
|
|
8941
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
8451
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React15.useState(defaultOpen);
|
|
8942
8452
|
const isExpanded = controlledOpen ?? uncontrolledOpen;
|
|
8943
|
-
const toggleExpanded =
|
|
8453
|
+
const toggleExpanded = React15.useCallback(() => {
|
|
8944
8454
|
const next = !isExpanded;
|
|
8945
8455
|
if (onOpenChange) {
|
|
8946
8456
|
onOpenChange(next);
|
|
@@ -8996,7 +8506,7 @@ var SidebarSection = React17.forwardRef(
|
|
|
8996
8506
|
}
|
|
8997
8507
|
);
|
|
8998
8508
|
SidebarSection.displayName = "SidebarSection";
|
|
8999
|
-
var SidebarMenuItem =
|
|
8509
|
+
var SidebarMenuItem = React15.forwardRef(
|
|
9000
8510
|
({ className, icon, label, isActive = false, asChild = false, children, ...props }, ref) => {
|
|
9001
8511
|
const { isOpen } = useSidebar();
|
|
9002
8512
|
const buttonContent = /* @__PURE__ */ jsxs(
|
|
@@ -9045,7 +8555,7 @@ var SidebarMenuItem = React17.forwardRef(
|
|
|
9045
8555
|
}
|
|
9046
8556
|
);
|
|
9047
8557
|
const Comp = asChild ? Slot : "div";
|
|
9048
|
-
const content = /* @__PURE__ */ jsx(Comp, { className: "flex items-center w-full cursor-pointer", children: asChild ?
|
|
8558
|
+
const content = /* @__PURE__ */ jsx(Comp, { className: "flex items-center w-full cursor-pointer", children: asChild ? React15.isValidElement(children) ? React15.cloneElement(children, {
|
|
9049
8559
|
children: buttonContent
|
|
9050
8560
|
}) : children : buttonContent });
|
|
9051
8561
|
return /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props, children: !isOpen ? /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
@@ -9055,7 +8565,7 @@ var SidebarMenuItem = React17.forwardRef(
|
|
|
9055
8565
|
}
|
|
9056
8566
|
);
|
|
9057
8567
|
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
9058
|
-
var SidebarFooter =
|
|
8568
|
+
var SidebarFooter = React15.forwardRef(
|
|
9059
8569
|
({ className, ...props }, ref) => {
|
|
9060
8570
|
const { isOpen } = useSidebar();
|
|
9061
8571
|
return /* @__PURE__ */ jsx(
|
|
@@ -9105,13 +8615,13 @@ function useRangeValue({
|
|
|
9105
8615
|
step,
|
|
9106
8616
|
onValueChange
|
|
9107
8617
|
}) {
|
|
9108
|
-
const bounds =
|
|
8618
|
+
const bounds = React15.useMemo(() => ({ min, max, step }), [min, max, step]);
|
|
9109
8619
|
const isControlled = value !== void 0;
|
|
9110
|
-
const [internal, setInternal] =
|
|
8620
|
+
const [internal, setInternal] = React15.useState(
|
|
9111
8621
|
() => normalize(defaultValue ?? min, { min, max, step })
|
|
9112
8622
|
);
|
|
9113
8623
|
const current = isControlled ? normalize(value, bounds) : internal;
|
|
9114
|
-
const setValue =
|
|
8624
|
+
const setValue = React15.useCallback(
|
|
9115
8625
|
(next) => {
|
|
9116
8626
|
const normalized = normalize(next, bounds);
|
|
9117
8627
|
if (!isControlled) setInternal(normalized);
|
|
@@ -9119,8 +8629,8 @@ function useRangeValue({
|
|
|
9119
8629
|
},
|
|
9120
8630
|
[bounds, isControlled, onValueChange, current]
|
|
9121
8631
|
);
|
|
9122
|
-
const increment =
|
|
9123
|
-
const decrement =
|
|
8632
|
+
const increment = React15.useCallback(() => setValue(current + step), [setValue, current, step]);
|
|
8633
|
+
const decrement = React15.useCallback(() => setValue(current - step), [setValue, current, step]);
|
|
9124
8634
|
return {
|
|
9125
8635
|
value: current,
|
|
9126
8636
|
setValue,
|
|
@@ -9218,7 +8728,7 @@ var THUMB_CLASS = cn(
|
|
|
9218
8728
|
"focus-visible:ring-[3px] focus-visible:ring-sys-focus-ring-main",
|
|
9219
8729
|
"data-[disabled]:cursor-not-allowed data-[disabled]:bg-secondary50 data-[disabled]:pointer-events-none"
|
|
9220
8730
|
);
|
|
9221
|
-
var RangeSlider =
|
|
8731
|
+
var RangeSlider = React15.forwardRef(
|
|
9222
8732
|
({
|
|
9223
8733
|
className,
|
|
9224
8734
|
type = "discrete",
|
|
@@ -9236,14 +8746,14 @@ var RangeSlider = React17.forwardRef(
|
|
|
9236
8746
|
...props
|
|
9237
8747
|
}, ref) => {
|
|
9238
8748
|
const isControlled = value !== void 0;
|
|
9239
|
-
const [internal, setInternal] =
|
|
8749
|
+
const [internal, setInternal] = React15.useState(defaultValue ?? [min]);
|
|
9240
8750
|
const current = isControlled ? value : internal;
|
|
9241
8751
|
const thumbA11yProps = (i, n) => {
|
|
9242
8752
|
const position = n <= 1 ? "" : i === 0 ? "\uCD5C\uC19F\uAC12" : i === n - 1 ? "\uCD5C\uB313\uAC12" : `${i + 1}\uBC88\uC9F8 \uAC12`;
|
|
9243
8753
|
const label = [ariaLabel, position].filter(Boolean).join(" ") || "\uAC12";
|
|
9244
8754
|
return ariaLabelledby ? { "aria-labelledby": ariaLabelledby, "aria-label": label } : { "aria-label": label };
|
|
9245
8755
|
};
|
|
9246
|
-
const handleChange =
|
|
8756
|
+
const handleChange = React15.useCallback(
|
|
9247
8757
|
(next) => {
|
|
9248
8758
|
if (!isControlled) setInternal(next);
|
|
9249
8759
|
onValueChange?.(next);
|
|
@@ -9304,12 +8814,12 @@ function useNumberInput({
|
|
|
9304
8814
|
max,
|
|
9305
8815
|
step
|
|
9306
8816
|
}) {
|
|
9307
|
-
const [text, setText] =
|
|
9308
|
-
const [focused, setFocused] =
|
|
9309
|
-
|
|
8817
|
+
const [text, setText] = React15.useState(() => String(value));
|
|
8818
|
+
const [focused, setFocused] = React15.useState(false);
|
|
8819
|
+
React15.useEffect(() => {
|
|
9310
8820
|
if (!focused) setText(String(value));
|
|
9311
8821
|
}, [value, focused]);
|
|
9312
|
-
const commit =
|
|
8822
|
+
const commit = React15.useCallback(() => {
|
|
9313
8823
|
const trimmed = text.trim();
|
|
9314
8824
|
const parsed = Number(trimmed);
|
|
9315
8825
|
if (trimmed === "" || Number.isNaN(parsed)) {
|
|
@@ -9336,7 +8846,7 @@ var SHAPE_RADIUS = {
|
|
|
9336
8846
|
normal: "rounded-small",
|
|
9337
8847
|
angled: "rounded-none"
|
|
9338
8848
|
};
|
|
9339
|
-
var Range2 =
|
|
8849
|
+
var Range2 = React15.forwardRef(
|
|
9340
8850
|
({
|
|
9341
8851
|
min = 0,
|
|
9342
8852
|
max = 100,
|
|
@@ -9432,7 +8942,7 @@ var Range2 = React17.forwardRef(
|
|
|
9432
8942
|
}
|
|
9433
8943
|
);
|
|
9434
8944
|
Range2.displayName = "Range";
|
|
9435
|
-
var Switch =
|
|
8945
|
+
var Switch = React15.forwardRef(
|
|
9436
8946
|
({ className, size = "small", showIcon = true, ...props }, ref) => {
|
|
9437
8947
|
const sizeClasses = {
|
|
9438
8948
|
small: {
|
|
@@ -9510,7 +9020,7 @@ var Switch = React17.forwardRef(
|
|
|
9510
9020
|
}
|
|
9511
9021
|
);
|
|
9512
9022
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
9513
|
-
var SwitchSection =
|
|
9023
|
+
var SwitchSection = React15.forwardRef(
|
|
9514
9024
|
({
|
|
9515
9025
|
title,
|
|
9516
9026
|
description,
|
|
@@ -9522,7 +9032,7 @@ var SwitchSection = React17.forwardRef(
|
|
|
9522
9032
|
showIcon = false,
|
|
9523
9033
|
...props
|
|
9524
9034
|
}, ref) => {
|
|
9525
|
-
const autoId =
|
|
9035
|
+
const autoId = React15.useId();
|
|
9526
9036
|
const switchId = id ?? autoId;
|
|
9527
9037
|
return /* @__PURE__ */ jsxs(
|
|
9528
9038
|
"div",
|
|
@@ -9568,198 +9078,6 @@ var SwitchSection = React17.forwardRef(
|
|
|
9568
9078
|
}
|
|
9569
9079
|
);
|
|
9570
9080
|
SwitchSection.displayName = "SwitchSection";
|
|
9571
|
-
var textareaContainerVariants = cva(
|
|
9572
|
-
[
|
|
9573
|
-
"flex w-full items-start bg-transparent",
|
|
9574
|
-
"rounded-small min-h-[84px] text-base-medium text-sys-text-main",
|
|
9575
|
-
"transition-colors"
|
|
9576
|
-
].join(" "),
|
|
9577
|
-
{
|
|
9578
|
-
variants: {
|
|
9579
|
-
appearance: {
|
|
9580
|
-
standard: [
|
|
9581
|
-
"bg-sys-background border border-sys-divider-main py-[3px] px-[5px]",
|
|
9582
|
-
"hover:bg-secondary-o10"
|
|
9583
|
-
].join(" "),
|
|
9584
|
-
none: "bg-transparent border-none py-[4px] px-[6px]"
|
|
9585
|
-
},
|
|
9586
|
-
isInvalid: {
|
|
9587
|
-
true: "",
|
|
9588
|
-
false: ""
|
|
9589
|
-
}
|
|
9590
|
-
},
|
|
9591
|
-
compoundVariants: [
|
|
9592
|
-
{
|
|
9593
|
-
appearance: "standard",
|
|
9594
|
-
isInvalid: true,
|
|
9595
|
-
class: "border-[2px] border-danger30 py-[2px] px-[4px]"
|
|
9596
|
-
}
|
|
9597
|
-
],
|
|
9598
|
-
defaultVariants: {
|
|
9599
|
-
appearance: "standard",
|
|
9600
|
-
isInvalid: false
|
|
9601
|
-
}
|
|
9602
|
-
}
|
|
9603
|
-
);
|
|
9604
|
-
var Textarea = React17.forwardRef(
|
|
9605
|
-
({
|
|
9606
|
-
appearance = "standard",
|
|
9607
|
-
label,
|
|
9608
|
-
required: requiredProp,
|
|
9609
|
-
isInvalid: isInvalidProp,
|
|
9610
|
-
containerClassName,
|
|
9611
|
-
className,
|
|
9612
|
-
disabled,
|
|
9613
|
-
readOnly,
|
|
9614
|
-
resize = false,
|
|
9615
|
-
minRows = 3,
|
|
9616
|
-
maxRows,
|
|
9617
|
-
value: valueProp,
|
|
9618
|
-
defaultValue,
|
|
9619
|
-
onChange: onChangeProp,
|
|
9620
|
-
onFocus: onFocusProp,
|
|
9621
|
-
onBlur: onBlurProp,
|
|
9622
|
-
style,
|
|
9623
|
-
...textareaProps
|
|
9624
|
-
}, forwardedRef) => {
|
|
9625
|
-
const formControl = useFormControlContext();
|
|
9626
|
-
const isInvalid = isInvalidProp ?? formControl?.isInvalid ?? false;
|
|
9627
|
-
const textareaRef = React17.useRef(null);
|
|
9628
|
-
const [isFocused, setIsFocused] = React17.useState(false);
|
|
9629
|
-
const isControlled = valueProp !== void 0;
|
|
9630
|
-
const [internalValue, setInternalValue] = React17.useState(
|
|
9631
|
-
defaultValue !== void 0 ? String(defaultValue) : ""
|
|
9632
|
-
);
|
|
9633
|
-
const hasValue = isControlled ? String(valueProp) !== "" : internalValue !== "";
|
|
9634
|
-
const composedRef = React17.useCallback(
|
|
9635
|
-
(node) => {
|
|
9636
|
-
textareaRef.current = node;
|
|
9637
|
-
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
9638
|
-
else if (forwardedRef)
|
|
9639
|
-
forwardedRef.current = node;
|
|
9640
|
-
},
|
|
9641
|
-
[forwardedRef]
|
|
9642
|
-
);
|
|
9643
|
-
const {
|
|
9644
|
-
hasLabel,
|
|
9645
|
-
isFloating,
|
|
9646
|
-
isMounted,
|
|
9647
|
-
labelColorClass,
|
|
9648
|
-
borderColorClass,
|
|
9649
|
-
isThickBorder,
|
|
9650
|
-
labelId
|
|
9651
|
-
} = useFloatingLabel({
|
|
9652
|
-
label,
|
|
9653
|
-
hasValue,
|
|
9654
|
-
isFocused,
|
|
9655
|
-
isInvalid: !!isInvalid,
|
|
9656
|
-
isDisabled: !!disabled});
|
|
9657
|
-
const showNotchedOutline = hasLabel && appearance !== "none";
|
|
9658
|
-
const showNoneLabel = hasLabel && appearance === "none";
|
|
9659
|
-
const handleChange = React17.useCallback(
|
|
9660
|
-
(e) => {
|
|
9661
|
-
if (!isControlled) setInternalValue(e.target.value);
|
|
9662
|
-
onChangeProp?.(e);
|
|
9663
|
-
},
|
|
9664
|
-
[isControlled, onChangeProp]
|
|
9665
|
-
);
|
|
9666
|
-
const handleFocus = React17.useCallback(
|
|
9667
|
-
(e) => {
|
|
9668
|
-
setIsFocused(true);
|
|
9669
|
-
onFocusProp?.(e);
|
|
9670
|
-
},
|
|
9671
|
-
[onFocusProp]
|
|
9672
|
-
);
|
|
9673
|
-
const handleBlur = React17.useCallback(
|
|
9674
|
-
(e) => {
|
|
9675
|
-
setIsFocused(false);
|
|
9676
|
-
onBlurProp?.(e);
|
|
9677
|
-
},
|
|
9678
|
-
[onBlurProp]
|
|
9679
|
-
);
|
|
9680
|
-
return /* @__PURE__ */ jsxs(
|
|
9681
|
-
"div",
|
|
9682
|
-
{
|
|
9683
|
-
"data-slot": "textarea",
|
|
9684
|
-
"aria-disabled": disabled || void 0,
|
|
9685
|
-
className: cn(
|
|
9686
|
-
textareaContainerVariants({ appearance, isInvalid }),
|
|
9687
|
-
// Focus styling (state-managed, standard appearance without notched outline only)
|
|
9688
|
-
isFocused && !isInvalid && appearance === "standard" && !showNotchedOutline && "border-[2px] border-sys-focus-ring-bold py-[2px] px-[4px]",
|
|
9689
|
-
// Floating label positioning
|
|
9690
|
-
(showNotchedOutline || showNoneLabel) && "relative",
|
|
9691
|
-
// Notched outline draws border — remove container's own border
|
|
9692
|
-
showNotchedOutline && "!border-0 !py-[4px] !px-[6px]",
|
|
9693
|
-
// Disabled / cursor
|
|
9694
|
-
disabled ? "cursor-not-allowed opacity-50" : "cursor-text",
|
|
9695
|
-
// disabled 시 hover 배경 무력화 (div container라 :disabled 불가 → JS 조건부; none은 원래 hover bg 없음)
|
|
9696
|
-
disabled && appearance !== "none" && "hover:bg-sys-background",
|
|
9697
|
-
containerClassName,
|
|
9698
|
-
// 외부 className 은 root container 에 적용 — FormControl 의 maxWidth 가
|
|
9699
|
-
// 자식 className 에 inject 되는데, wrapper div 의 폭 제어가 의도이므로
|
|
9700
|
-
// inner textarea 가 아닌 여기에 머지한다.
|
|
9701
|
-
className
|
|
9702
|
-
),
|
|
9703
|
-
style: {
|
|
9704
|
-
resize: resize ? "vertical" : "none",
|
|
9705
|
-
overflow: resize ? "hidden" : void 0
|
|
9706
|
-
},
|
|
9707
|
-
children: [
|
|
9708
|
-
(showNotchedOutline || showNoneLabel) && /* @__PURE__ */ jsx(
|
|
9709
|
-
FloatingLabelOutline,
|
|
9710
|
-
{
|
|
9711
|
-
mode: showNotchedOutline ? "standard" : "none",
|
|
9712
|
-
label,
|
|
9713
|
-
required: requiredProp,
|
|
9714
|
-
isFloating,
|
|
9715
|
-
isMounted,
|
|
9716
|
-
labelColorClass,
|
|
9717
|
-
borderColorClass,
|
|
9718
|
-
isThickBorder,
|
|
9719
|
-
labelId
|
|
9720
|
-
}
|
|
9721
|
-
),
|
|
9722
|
-
/* @__PURE__ */ jsx(
|
|
9723
|
-
TextareaAutosize,
|
|
9724
|
-
{
|
|
9725
|
-
ref: composedRef,
|
|
9726
|
-
minRows,
|
|
9727
|
-
maxRows,
|
|
9728
|
-
disabled,
|
|
9729
|
-
readOnly,
|
|
9730
|
-
value: isControlled ? valueProp : void 0,
|
|
9731
|
-
defaultValue: !isControlled ? defaultValue : void 0,
|
|
9732
|
-
onChange: handleChange,
|
|
9733
|
-
onFocus: handleFocus,
|
|
9734
|
-
onBlur: handleBlur,
|
|
9735
|
-
"aria-labelledby": hasLabel ? labelId : void 0,
|
|
9736
|
-
"aria-required": hasLabel && requiredProp ? true : void 0,
|
|
9737
|
-
className: cn(
|
|
9738
|
-
"flex-1 min-w-0 bg-transparent border-none outline-none",
|
|
9739
|
-
"text-base-medium text-sys-text-main",
|
|
9740
|
-
"placeholder:text-sys-text-placeholder",
|
|
9741
|
-
"disabled:cursor-not-allowed",
|
|
9742
|
-
"px-[4px] py-[2px]",
|
|
9743
|
-
// maxRows 미지정(무한 auto-grow) 시 자체 스크롤바 숨김: 스크롤바가 뜨면 content 폭이 줄어
|
|
9744
|
-
// autosize 재측정과 어긋나 스크롤바가 고착되는 피드백 루프를 막는다(스크롤바 없으면 content 가
|
|
9745
|
-
// height 에 정확히 맞아 잘림 없음). maxRows 지정(바운드) 시엔 기본 overflow-y:auto 로 캡 초과분 스크롤.
|
|
9746
|
-
maxRows == null && "overflow-hidden",
|
|
9747
|
-
// When label is down (acting as placeholder), hide textarea's placeholder
|
|
9748
|
-
hasLabel && !hasValue && !isFocused && "placeholder:text-transparent"
|
|
9749
|
-
),
|
|
9750
|
-
style: {
|
|
9751
|
-
resize: "none",
|
|
9752
|
-
...style
|
|
9753
|
-
},
|
|
9754
|
-
...textareaProps
|
|
9755
|
-
}
|
|
9756
|
-
)
|
|
9757
|
-
]
|
|
9758
|
-
}
|
|
9759
|
-
);
|
|
9760
|
-
}
|
|
9761
|
-
);
|
|
9762
|
-
Textarea.displayName = "Textarea";
|
|
9763
9081
|
function parseTimeValue(value, hourType) {
|
|
9764
9082
|
if (value == null) return { hour: null, minute: null, period: null };
|
|
9765
9083
|
if (hourType === "12hrs") {
|
|
@@ -9867,7 +9185,7 @@ var timePickerTriggerVariants = cva(
|
|
|
9867
9185
|
}
|
|
9868
9186
|
}
|
|
9869
9187
|
);
|
|
9870
|
-
var TimePickerTrigger =
|
|
9188
|
+
var TimePickerTrigger = React15.forwardRef(
|
|
9871
9189
|
({
|
|
9872
9190
|
open,
|
|
9873
9191
|
hasValue,
|
|
@@ -9884,7 +9202,7 @@ var TimePickerTrigger = React17.forwardRef(
|
|
|
9884
9202
|
onBlur: onBlurProp,
|
|
9885
9203
|
className
|
|
9886
9204
|
}, ref) => {
|
|
9887
|
-
const [isFocused, setIsFocused] =
|
|
9205
|
+
const [isFocused, setIsFocused] = React15.useState(false);
|
|
9888
9206
|
const {
|
|
9889
9207
|
hasLabel,
|
|
9890
9208
|
isFloating,
|
|
@@ -9899,24 +9217,26 @@ var TimePickerTrigger = React17.forwardRef(
|
|
|
9899
9217
|
isOpen: open,
|
|
9900
9218
|
isFocused,
|
|
9901
9219
|
isInvalid: !!isInvalid,
|
|
9902
|
-
isDisabled: !!disabled
|
|
9220
|
+
isDisabled: !!disabled,
|
|
9221
|
+
appearance
|
|
9222
|
+
});
|
|
9903
9223
|
const showNotchedOutline = hasLabel && appearance !== "none";
|
|
9904
9224
|
const showNoneLabel = hasLabel && appearance === "none";
|
|
9905
|
-
const handleFocus =
|
|
9225
|
+
const handleFocus = React15.useCallback(
|
|
9906
9226
|
(e) => {
|
|
9907
9227
|
setIsFocused(true);
|
|
9908
9228
|
onFocusProp?.(e);
|
|
9909
9229
|
},
|
|
9910
9230
|
[onFocusProp]
|
|
9911
9231
|
);
|
|
9912
|
-
const handleBlur =
|
|
9232
|
+
const handleBlur = React15.useCallback(
|
|
9913
9233
|
(e) => {
|
|
9914
9234
|
setIsFocused(false);
|
|
9915
9235
|
onBlurProp?.(e);
|
|
9916
9236
|
},
|
|
9917
9237
|
[onBlurProp]
|
|
9918
9238
|
);
|
|
9919
|
-
const handleClearClick =
|
|
9239
|
+
const handleClearClick = React15.useCallback(
|
|
9920
9240
|
(e) => {
|
|
9921
9241
|
e.stopPropagation();
|
|
9922
9242
|
e.preventDefault();
|
|
@@ -9924,7 +9244,7 @@ var TimePickerTrigger = React17.forwardRef(
|
|
|
9924
9244
|
},
|
|
9925
9245
|
[onClear]
|
|
9926
9246
|
);
|
|
9927
|
-
const triggerRef =
|
|
9247
|
+
const triggerRef = React15.useRef(null);
|
|
9928
9248
|
const setRefs = (node) => {
|
|
9929
9249
|
triggerRef.current = node;
|
|
9930
9250
|
if (typeof ref === "function") ref(node);
|
|
@@ -10014,8 +9334,8 @@ function TimeColumn({
|
|
|
10014
9334
|
onSelect,
|
|
10015
9335
|
"aria-label": ariaLabel
|
|
10016
9336
|
}) {
|
|
10017
|
-
const listRef =
|
|
10018
|
-
|
|
9337
|
+
const listRef = React15.useRef(null);
|
|
9338
|
+
React15.useEffect(() => {
|
|
10019
9339
|
if (!listRef.current || !selectedValue) return;
|
|
10020
9340
|
const selectedEl = listRef.current.querySelector(`[data-value="${selectedValue}"]`);
|
|
10021
9341
|
if (selectedEl && typeof selectedEl.scrollIntoView === "function") {
|
|
@@ -10090,23 +9410,23 @@ function TimePicker(props) {
|
|
|
10090
9410
|
} = props;
|
|
10091
9411
|
const hourType = props.hourType ?? "24hrs";
|
|
10092
9412
|
const minuteStep = Math.max(1, Math.floor(minuteStepProp));
|
|
10093
|
-
const [open, setOpen] =
|
|
10094
|
-
const parsed =
|
|
9413
|
+
const [open, setOpen] = React15.useState(false);
|
|
9414
|
+
const parsed = React15.useMemo(() => parseTimeValue(value, hourType), [value, hourType]);
|
|
10095
9415
|
const isFilled = hasTimeValue(value, hourType);
|
|
10096
|
-
const displayText =
|
|
10097
|
-
const [pendingHour, setPendingHour] =
|
|
10098
|
-
const [pendingMinute, setPendingMinute] =
|
|
10099
|
-
const [pendingPeriod, setPendingPeriod] =
|
|
10100
|
-
|
|
9416
|
+
const displayText = React15.useMemo(() => formatDisplayText(value, hourType), [value, hourType]);
|
|
9417
|
+
const [pendingHour, setPendingHour] = React15.useState(null);
|
|
9418
|
+
const [pendingMinute, setPendingMinute] = React15.useState(null);
|
|
9419
|
+
const [pendingPeriod, setPendingPeriod] = React15.useState(null);
|
|
9420
|
+
React15.useEffect(() => {
|
|
10101
9421
|
if (open) {
|
|
10102
9422
|
setPendingHour(parsed.hour);
|
|
10103
9423
|
setPendingMinute(parsed.minute);
|
|
10104
9424
|
setPendingPeriod(parsed.period);
|
|
10105
9425
|
}
|
|
10106
9426
|
}, [open]);
|
|
10107
|
-
const hourOptions =
|
|
10108
|
-
const minuteOptions =
|
|
10109
|
-
const emitChange =
|
|
9427
|
+
const hourOptions = React15.useMemo(() => generateHourOptions(hourType), [hourType]);
|
|
9428
|
+
const minuteOptions = React15.useMemo(() => generateMinuteOptions(minuteStep), [minuteStep]);
|
|
9429
|
+
const emitChange = React15.useCallback(
|
|
10110
9430
|
(hour, minute, period) => {
|
|
10111
9431
|
if (!onChange) return;
|
|
10112
9432
|
if (hourType === "12hrs") {
|
|
@@ -10123,7 +9443,7 @@ function TimePicker(props) {
|
|
|
10123
9443
|
},
|
|
10124
9444
|
[onChange, hourType]
|
|
10125
9445
|
);
|
|
10126
|
-
const handleHourSelect =
|
|
9446
|
+
const handleHourSelect = React15.useCallback(
|
|
10127
9447
|
(val) => {
|
|
10128
9448
|
setPendingHour(val);
|
|
10129
9449
|
const effectivePeriod = hourType === "12hrs" ? pendingPeriod ?? "AM" : null;
|
|
@@ -10134,7 +9454,7 @@ function TimePicker(props) {
|
|
|
10134
9454
|
},
|
|
10135
9455
|
[pendingMinute, pendingPeriod, hourType, emitChange]
|
|
10136
9456
|
);
|
|
10137
|
-
const handleMinuteSelect =
|
|
9457
|
+
const handleMinuteSelect = React15.useCallback(
|
|
10138
9458
|
(val) => {
|
|
10139
9459
|
setPendingMinute(val);
|
|
10140
9460
|
const effectivePeriod = hourType === "12hrs" ? pendingPeriod ?? "AM" : null;
|
|
@@ -10145,7 +9465,7 @@ function TimePicker(props) {
|
|
|
10145
9465
|
},
|
|
10146
9466
|
[pendingHour, pendingPeriod, hourType, emitChange]
|
|
10147
9467
|
);
|
|
10148
|
-
const handlePeriodSelect =
|
|
9468
|
+
const handlePeriodSelect = React15.useCallback(
|
|
10149
9469
|
(val) => {
|
|
10150
9470
|
setPendingPeriod(val);
|
|
10151
9471
|
if (pendingHour && pendingMinute) {
|
|
@@ -10155,7 +9475,7 @@ function TimePicker(props) {
|
|
|
10155
9475
|
},
|
|
10156
9476
|
[pendingHour, pendingMinute, emitChange]
|
|
10157
9477
|
);
|
|
10158
|
-
const handleClear =
|
|
9478
|
+
const handleClear = React15.useCallback(() => {
|
|
10159
9479
|
if (hourType === "12hrs") {
|
|
10160
9480
|
onChange?.(void 0);
|
|
10161
9481
|
} else {
|
|
@@ -10222,7 +9542,7 @@ function TimePicker(props) {
|
|
|
10222
9542
|
)
|
|
10223
9543
|
] });
|
|
10224
9544
|
}
|
|
10225
|
-
var ThemeContext =
|
|
9545
|
+
var ThemeContext = React15.createContext(void 0);
|
|
10226
9546
|
function getSystemTheme() {
|
|
10227
9547
|
if (typeof window === "undefined") return "light";
|
|
10228
9548
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -10243,18 +9563,18 @@ function getStoredTheme(storageKey) {
|
|
|
10243
9563
|
return null;
|
|
10244
9564
|
}
|
|
10245
9565
|
function ThemeProvider({ children, defaultTheme = "light", storageKey }) {
|
|
10246
|
-
const [theme, setThemeState] =
|
|
9566
|
+
const [theme, setThemeState] = React15.useState(() => {
|
|
10247
9567
|
if (storageKey) {
|
|
10248
9568
|
const stored = getStoredTheme(storageKey);
|
|
10249
9569
|
if (stored) return stored;
|
|
10250
9570
|
}
|
|
10251
9571
|
return defaultTheme;
|
|
10252
9572
|
});
|
|
10253
|
-
const [resolvedTheme, setResolvedTheme] =
|
|
10254
|
-
|
|
9573
|
+
const [resolvedTheme, setResolvedTheme] = React15.useState(() => resolveTheme(theme));
|
|
9574
|
+
React15.useEffect(() => {
|
|
10255
9575
|
setResolvedTheme(resolveTheme(theme));
|
|
10256
9576
|
}, [theme]);
|
|
10257
|
-
|
|
9577
|
+
React15.useEffect(() => {
|
|
10258
9578
|
if (theme !== "system") return;
|
|
10259
9579
|
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
10260
9580
|
const handler = (e) => {
|
|
@@ -10263,7 +9583,7 @@ function ThemeProvider({ children, defaultTheme = "light", storageKey }) {
|
|
|
10263
9583
|
mediaQuery.addEventListener("change", handler);
|
|
10264
9584
|
return () => mediaQuery.removeEventListener("change", handler);
|
|
10265
9585
|
}, [theme]);
|
|
10266
|
-
|
|
9586
|
+
React15.useEffect(() => {
|
|
10267
9587
|
const root = document.documentElement;
|
|
10268
9588
|
if (resolvedTheme === "dark") {
|
|
10269
9589
|
root.setAttribute("data-theme", "dark");
|
|
@@ -10274,7 +9594,7 @@ function ThemeProvider({ children, defaultTheme = "light", storageKey }) {
|
|
|
10274
9594
|
root.removeAttribute("data-theme");
|
|
10275
9595
|
};
|
|
10276
9596
|
}, [resolvedTheme]);
|
|
10277
|
-
const setTheme =
|
|
9597
|
+
const setTheme = React15.useCallback(
|
|
10278
9598
|
(newTheme) => {
|
|
10279
9599
|
setThemeState(newTheme);
|
|
10280
9600
|
if (storageKey) {
|
|
@@ -10286,21 +9606,21 @@ function ThemeProvider({ children, defaultTheme = "light", storageKey }) {
|
|
|
10286
9606
|
},
|
|
10287
9607
|
[storageKey]
|
|
10288
9608
|
);
|
|
10289
|
-
const value =
|
|
9609
|
+
const value = React15.useMemo(
|
|
10290
9610
|
() => ({ theme, resolvedTheme, setTheme }),
|
|
10291
9611
|
[theme, resolvedTheme, setTheme]
|
|
10292
9612
|
);
|
|
10293
9613
|
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
|
|
10294
9614
|
}
|
|
10295
9615
|
function useTheme() {
|
|
10296
|
-
const context =
|
|
9616
|
+
const context = React15.useContext(ThemeContext);
|
|
10297
9617
|
if (!context) {
|
|
10298
9618
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
10299
9619
|
}
|
|
10300
9620
|
return context;
|
|
10301
9621
|
}
|
|
10302
9622
|
function useOptionalTheme() {
|
|
10303
|
-
return
|
|
9623
|
+
return React15.useContext(ThemeContext);
|
|
10304
9624
|
}
|
|
10305
9625
|
function toast({ toastOptions, variant = "info", ...toastData }) {
|
|
10306
9626
|
const options = {
|
|
@@ -10343,12 +9663,12 @@ var icons = {
|
|
|
10343
9663
|
warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "text-critical30" }),
|
|
10344
9664
|
error: /* @__PURE__ */ jsx(CircleX, { className: "text-danger30" })
|
|
10345
9665
|
};
|
|
10346
|
-
var Toaster =
|
|
9666
|
+
var Toaster = React15__default.forwardRef((props, ref) => {
|
|
10347
9667
|
const theme = useOptionalTheme()?.resolvedTheme;
|
|
10348
9668
|
return /* @__PURE__ */ jsx(Toaster$1, { ref, theme, ...props });
|
|
10349
9669
|
});
|
|
10350
9670
|
Toaster.displayName = "Toaster";
|
|
10351
9671
|
|
|
10352
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Calendar, CheckboxSection, CheckboxSectionGroup, ColumnFilter, ColumnFilterInput, ColumnFilterPopover, ColumnFilterTag, ColumnVisibilityFilter, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PARAMETER_TABLE_COLUMNS, DatePicker, DatePickerRange, DatePresets, DateRangePresets, DateRangeSelect, DateSelect, EventList, IconSelect, Label, MetaGroup, MetaItem, MetaList, MetaRow, MultiSelect2 as MultiSelect, MultiSelectContent, MultiSelectEmpty, MultiSelectGroup, MultiSelectInput, MultiSelectItem, MultiSelectLoading, MultiSelectSeparator, MultiSelectTrigger, OPERATORS_BY_TYPE, OPERATOR_LABELS, PageHeaderRefreshButton, ParameterTable, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioGroup, RadioGroupItem, RadioSection, RadioSectionGroup, Range2 as Range, RangeSlider, Select, SelectContent, SelectEmpty, SelectGroup, SelectInput, SelectItem, SelectLoading, SelectRadioGroup, SelectRadioItem, SelectSeparator, SelectTrigger, SelectValue, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenuItem, SidebarProvider, SidebarSection, SidebarToggle, SingleSelect, Switch, SwitchSection, TableFilterDateRangeSelect, TableFilterDateSelect, MultiSelect as TableFilterMultiSelect, TableFilterSingleSelect, FilterTitle2 as TableFilterTitle,
|
|
9672
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Calendar, CheckboxSection, CheckboxSectionGroup, ColumnFilter, ColumnFilterInput, ColumnFilterPopover, ColumnFilterTag, ColumnVisibilityFilter, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PARAMETER_TABLE_COLUMNS, DatePicker, DatePickerRange, DatePresets, DateRangePresets, DateRangeSelect, DateSelect, EventList, IconSelect, Label, MetaGroup, MetaItem, MetaList, MetaRow, MultiSelect2 as MultiSelect, MultiSelectContent, MultiSelectEmpty, MultiSelectGroup, MultiSelectInput, MultiSelectItem, MultiSelectLoading, MultiSelectSeparator, MultiSelectTrigger, OPERATORS_BY_TYPE, OPERATOR_LABELS, PageHeaderRefreshButton, ParameterTable, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Radio, RadioGroup, RadioGroupItem, RadioSection, RadioSectionGroup, Range2 as Range, RangeSlider, Select, SelectContent, SelectEmpty, SelectGroup, SelectInput, SelectItem, SelectLoading, SelectRadioGroup, SelectRadioItem, SelectSeparator, SelectTrigger, SelectValue, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenuItem, SidebarProvider, SidebarSection, SidebarToggle, SingleSelect, Switch, SwitchSection, TableFilterDateRangeSelect, TableFilterDateSelect, MultiSelect as TableFilterMultiSelect, TableFilterSingleSelect, FilterTitle2 as TableFilterTitle, ThemeProvider, TimePicker, Toaster, clamp, fixPrecision, getDecimals, normalize, snap, toast, useColumnFilter, useMultiSelectContext, useOptionalTheme, useRangeValue, useSelectContext, useSidebar, useTheme };
|
|
10353
9673
|
//# sourceMappingURL=index.js.map
|
|
10354
9674
|
//# sourceMappingURL=index.js.map
|