@postxl/ui-components 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +250 -126
- package/dist/index.js +164 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -91,6 +91,21 @@ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
|
91
91
|
function cn(...inputs) {
|
|
92
92
|
return twMerge(clsx(inputs));
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Generates a test ID by combining a base ID with a suffix.
|
|
96
|
+
* Returns undefined if no base ID is provided.
|
|
97
|
+
*
|
|
98
|
+
* For the root element, use `data-test-id={__e2e_test_id__}` directly.
|
|
99
|
+
* Use this function only for sub-elements that need a suffix.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* <div data-test-id={__e2e_test_id__}> // root element - use directly
|
|
103
|
+
* <input data-test-id={testId(__e2e_test_id__, 'search')}> // sub-element - returns `${baseId}-search` or undefined
|
|
104
|
+
*/
|
|
105
|
+
function testId(baseId, suffix) {
|
|
106
|
+
if (!baseId) return void 0;
|
|
107
|
+
return `${baseId}-${suffix}`;
|
|
108
|
+
}
|
|
94
109
|
|
|
95
110
|
//#endregion
|
|
96
111
|
//#region src/accordion/accordion.tsx
|
|
@@ -366,7 +381,7 @@ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
|
366
381
|
|
|
367
382
|
//#endregion
|
|
368
383
|
//#region src/calendar/calendar.tsx
|
|
369
|
-
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", showYearNavigation = false, formatters, components,...props }) {
|
|
384
|
+
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", showYearNavigation = false, formatters, components, __e2e_test_id__,...props }) {
|
|
370
385
|
const defaultClassNames = getDefaultClassNames();
|
|
371
386
|
const [rangeSelectionStep, setRangeSelectionStep] = React$43.useState("from");
|
|
372
387
|
const handleDayClick = React$43.useCallback((day, modifiers, e) => {
|
|
@@ -467,6 +482,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
467
482
|
disabled: fromMonth && currentMonth <= fromMonth,
|
|
468
483
|
className: btnClassNames,
|
|
469
484
|
onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), -12)),
|
|
485
|
+
__e2e_test_id__: testId(__e2e_test_id__, "prev-year"),
|
|
470
486
|
children: /* @__PURE__ */ jsx(DoubleArrowLeftIcon, { className: "" })
|
|
471
487
|
}), /* @__PURE__ */ jsx(Button, {
|
|
472
488
|
"aria-label": "previous month",
|
|
@@ -475,6 +491,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
475
491
|
disabled: fromMonth && currentMonth <= fromMonth,
|
|
476
492
|
className: btnClassNames,
|
|
477
493
|
onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), -1)),
|
|
494
|
+
__e2e_test_id__: testId(__e2e_test_id__, "prev-month"),
|
|
478
495
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
479
496
|
})]
|
|
480
497
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -486,6 +503,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
486
503
|
disabled: toMonth && currentMonth >= toMonth,
|
|
487
504
|
className: btnClassNames,
|
|
488
505
|
onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), 1)),
|
|
506
|
+
__e2e_test_id__: testId(__e2e_test_id__, "next-month"),
|
|
489
507
|
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
490
508
|
}), showYearNavigation && /* @__PURE__ */ jsx(Button, {
|
|
491
509
|
"aria-label": "next year",
|
|
@@ -494,6 +512,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
494
512
|
disabled: toMonth && currentMonth >= toMonth,
|
|
495
513
|
className: btnClassNames,
|
|
496
514
|
onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), 12)),
|
|
515
|
+
__e2e_test_id__: testId(__e2e_test_id__, "next-year"),
|
|
497
516
|
children: /* @__PURE__ */ jsx(DoubleArrowRightIcon, {})
|
|
498
517
|
})]
|
|
499
518
|
})]
|
|
@@ -502,6 +521,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
502
521
|
Root: ({ className: className$1, rootRef,...props$1 }) => {
|
|
503
522
|
return /* @__PURE__ */ jsx("div", {
|
|
504
523
|
"data-slot": "calendar",
|
|
524
|
+
"data-test-id": __e2e_test_id__,
|
|
505
525
|
ref: rootRef,
|
|
506
526
|
className: cn(className$1),
|
|
507
527
|
...props$1
|
|
@@ -863,6 +883,7 @@ function DialogContent({ className, children, showCloseButton = true, __e2e_test
|
|
|
863
883
|
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
864
884
|
"data-slot": "dialog-content",
|
|
865
885
|
className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
886
|
+
"data-test-id": __e2e_test_id__,
|
|
866
887
|
...props,
|
|
867
888
|
children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
868
889
|
title: "Close",
|
|
@@ -873,7 +894,7 @@ function DialogContent({ className, children, showCloseButton = true, __e2e_test
|
|
|
873
894
|
variant: "outline",
|
|
874
895
|
size: "icon",
|
|
875
896
|
className: "size-6 rounded",
|
|
876
|
-
__e2e_test_id__: __e2e_test_id__
|
|
897
|
+
__e2e_test_id__: testId(__e2e_test_id__, "close"),
|
|
877
898
|
children: /* @__PURE__ */ jsx(Cross2Icon, {})
|
|
878
899
|
}), /* @__PURE__ */ jsx("span", {
|
|
879
900
|
className: "sr-only",
|
|
@@ -1247,7 +1268,7 @@ const ContentFrame = ({ title = "", controls = [], indicators = [], children, on
|
|
|
1247
1268
|
/* @__PURE__ */ jsxs("div", {
|
|
1248
1269
|
className: "flex flex-grow gap-2 overflow-hidden",
|
|
1249
1270
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
1250
|
-
className: "text-xl overflow-hidden text-ellipsis whitespace-nowrap",
|
|
1271
|
+
className: "text-xl overflow-hidden text-ellipsis whitespace-nowrap w-full",
|
|
1251
1272
|
children: titleLink ?? title
|
|
1252
1273
|
}), indicators.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
1253
1274
|
className: "flex gap-2 whitespace-nowrap",
|
|
@@ -2546,7 +2567,8 @@ function useDebouncedCallback(callback, delay) {
|
|
|
2546
2567
|
const inputVariants = cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
2547
2568
|
variants: { variant: {
|
|
2548
2569
|
default: "min-h-9 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
2549
|
-
simple: "min-h-8"
|
|
2570
|
+
simple: "min-h-8",
|
|
2571
|
+
discreet: "py-0 min-h-7 border-transparent shadow-none hover:border-input hover:shadow-sm focus:border-input focus:shadow-sm bg-transparent hover:bg-accent/30"
|
|
2550
2572
|
} },
|
|
2551
2573
|
defaultVariants: { variant: "default" }
|
|
2552
2574
|
});
|
|
@@ -3277,7 +3299,8 @@ function GanttCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSe
|
|
|
3277
3299
|
const textareaVariants = cva("border-input placeholder:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50", {
|
|
3278
3300
|
variants: { variant: {
|
|
3279
3301
|
default: "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
3280
|
-
simple: ""
|
|
3302
|
+
simple: "",
|
|
3303
|
+
discreet: "border-transparent shadow-none hover:border-input hover:shadow-sm focus:border-input focus:shadow-sm bg-transparent hover:bg-accent/30"
|
|
3281
3304
|
} },
|
|
3282
3305
|
defaultVariants: { variant: "default" }
|
|
3283
3306
|
});
|
|
@@ -6215,6 +6238,47 @@ const InfoCard = ({ variant, title, message, showHomeButton = false, children })
|
|
|
6215
6238
|
});
|
|
6216
6239
|
};
|
|
6217
6240
|
|
|
6241
|
+
//#endregion
|
|
6242
|
+
//#region src/input/deferred-input.tsx
|
|
6243
|
+
/**
|
|
6244
|
+
* An Input that buffers changes locally and only commits to the parent
|
|
6245
|
+
* on blur or Enter key press. Useful for forms where you don't want to
|
|
6246
|
+
* trigger expensive operations (like API calls) on every keystroke.
|
|
6247
|
+
*/
|
|
6248
|
+
function DeferredInput({ value, onCommit, onValueChange, commitOnEnter = true, onBlur, onKeyDown,...props }) {
|
|
6249
|
+
const [localValue, setLocalValue] = useState(value);
|
|
6250
|
+
useEffect(() => {
|
|
6251
|
+
setLocalValue(value);
|
|
6252
|
+
}, [value]);
|
|
6253
|
+
const commitValue = useCallback(() => {
|
|
6254
|
+
if (localValue !== value) onCommit(localValue);
|
|
6255
|
+
}, [
|
|
6256
|
+
localValue,
|
|
6257
|
+
value,
|
|
6258
|
+
onCommit
|
|
6259
|
+
]);
|
|
6260
|
+
const handleChange = useCallback((e) => {
|
|
6261
|
+
const newValue = e.target.value;
|
|
6262
|
+
setLocalValue(newValue);
|
|
6263
|
+
onValueChange?.(newValue);
|
|
6264
|
+
}, [onValueChange]);
|
|
6265
|
+
const handleBlur = useCallback((e) => {
|
|
6266
|
+
commitValue();
|
|
6267
|
+
onBlur?.(e);
|
|
6268
|
+
}, [commitValue, onBlur]);
|
|
6269
|
+
const handleKeyDown = useCallback((e) => {
|
|
6270
|
+
if (commitOnEnter && e.key === "Enter") e.currentTarget.blur();
|
|
6271
|
+
onKeyDown?.(e);
|
|
6272
|
+
}, [commitOnEnter, onKeyDown]);
|
|
6273
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
6274
|
+
...props,
|
|
6275
|
+
value: localValue,
|
|
6276
|
+
onChange: handleChange,
|
|
6277
|
+
onBlur: handleBlur,
|
|
6278
|
+
onKeyDown: handleKeyDown
|
|
6279
|
+
});
|
|
6280
|
+
}
|
|
6281
|
+
|
|
6218
6282
|
//#endregion
|
|
6219
6283
|
//#region src/input/number-input.tsx
|
|
6220
6284
|
/**
|
|
@@ -6268,7 +6332,8 @@ function parseFormattedNumberHeuristic(formatted) {
|
|
|
6268
6332
|
const numberInputWrapperVariants = cva("border-input bg-background grid grid-cols-[auto_1fr_auto] items-center overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] has-[input:disabled]:pointer-events-none has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50", {
|
|
6269
6333
|
variants: { variant: {
|
|
6270
6334
|
default: "min-h-9 focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
|
|
6271
|
-
simple: "min-h-8"
|
|
6335
|
+
simple: "min-h-8",
|
|
6336
|
+
discreet: "py-0 min-h-7 border-transparent shadow-none hover:border-input hover:shadow-sm focus-within:border-input focus-within:shadow-sm bg-transparent hover:bg-accent/30"
|
|
6272
6337
|
} },
|
|
6273
6338
|
defaultVariants: { variant: "default" }
|
|
6274
6339
|
});
|
|
@@ -6361,7 +6426,7 @@ const NumberInput = React$10.forwardRef(({ className, wrapperClassName, prefix,
|
|
|
6361
6426
|
inputVariants({ variant }),
|
|
6362
6427
|
// Remove border/shadow/ring from input since wrapper handles it
|
|
6363
6428
|
// Use min-h-full to override min-h-9/min-h-8 from inputVariants - wrapper controls height - never use explicit h-* in input since it breaks the spinner buttons for some browsers
|
|
6364
|
-
"min-h-full border-0 shadow-none focus-visible:ring-0 p-0 tabular-nums",
|
|
6429
|
+
"min-h-full bg-transparent hover:bg-transparent border-0 shadow-none focus-visible:ring-0 p-0 tabular-nums",
|
|
6365
6430
|
!prefix && !suffix ? "col-span-3" : !prefix || !suffix ? "col-span-2" : "col-span-1",
|
|
6366
6431
|
"text-right",
|
|
6367
6432
|
!prefix && "pl-2",
|
|
@@ -6392,6 +6457,51 @@ const NumberInput = React$10.forwardRef(({ className, wrapperClassName, prefix,
|
|
|
6392
6457
|
});
|
|
6393
6458
|
NumberInput.displayName = "NumberInput";
|
|
6394
6459
|
|
|
6460
|
+
//#endregion
|
|
6461
|
+
//#region src/input/deferred-number-input.tsx
|
|
6462
|
+
/**
|
|
6463
|
+
* A NumberInput that buffers changes locally and only commits to the parent
|
|
6464
|
+
* on blur or Enter key press. Useful for forms where you don't want to
|
|
6465
|
+
* trigger expensive operations (like API calls) on every keystroke.
|
|
6466
|
+
*/
|
|
6467
|
+
function DeferredNumberInput({ value, onCommit, onValueChange, commitOnEnter = true, onBlur, onEnter,...props }) {
|
|
6468
|
+
const [localValue, setLocalValue] = useState(value);
|
|
6469
|
+
useEffect(() => {
|
|
6470
|
+
setLocalValue(value);
|
|
6471
|
+
}, [value]);
|
|
6472
|
+
const commitValue = useCallback(() => {
|
|
6473
|
+
if (localValue !== value) onCommit(localValue);
|
|
6474
|
+
}, [
|
|
6475
|
+
localValue,
|
|
6476
|
+
value,
|
|
6477
|
+
onCommit
|
|
6478
|
+
]);
|
|
6479
|
+
const handleChange = useCallback((newValue) => {
|
|
6480
|
+
const normalizedValue = newValue ?? null;
|
|
6481
|
+
setLocalValue(normalizedValue);
|
|
6482
|
+
onValueChange?.(normalizedValue);
|
|
6483
|
+
}, [onValueChange]);
|
|
6484
|
+
const handleBlur = useCallback((e) => {
|
|
6485
|
+
commitValue();
|
|
6486
|
+
onBlur?.(e);
|
|
6487
|
+
}, [commitValue, onBlur]);
|
|
6488
|
+
const handleEnter = useCallback(() => {
|
|
6489
|
+
if (commitOnEnter) commitValue();
|
|
6490
|
+
onEnter?.();
|
|
6491
|
+
}, [
|
|
6492
|
+
commitOnEnter,
|
|
6493
|
+
commitValue,
|
|
6494
|
+
onEnter
|
|
6495
|
+
]);
|
|
6496
|
+
return /* @__PURE__ */ jsx(NumberInput, {
|
|
6497
|
+
...props,
|
|
6498
|
+
value: localValue ?? void 0,
|
|
6499
|
+
onChange: handleChange,
|
|
6500
|
+
onBlur: handleBlur,
|
|
6501
|
+
onEnter: handleEnter
|
|
6502
|
+
});
|
|
6503
|
+
}
|
|
6504
|
+
|
|
6395
6505
|
//#endregion
|
|
6396
6506
|
//#region src/mark-value-renderer/mark-value-renderer.tsx
|
|
6397
6507
|
/**
|
|
@@ -6799,12 +6909,14 @@ const sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transiti
|
|
|
6799
6909
|
} },
|
|
6800
6910
|
defaultVariants: { side: "right" }
|
|
6801
6911
|
});
|
|
6802
|
-
const SheetContent = React$6.forwardRef(({ side = "right", className, children,...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
|
|
6912
|
+
const SheetContent = React$6.forwardRef(({ side = "right", className, children, __e2e_test_id__,...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
|
|
6803
6913
|
ref,
|
|
6804
6914
|
className: cn(sheetVariants({ side }), className),
|
|
6915
|
+
"data-test-id": __e2e_test_id__,
|
|
6805
6916
|
...props,
|
|
6806
6917
|
children: [/* @__PURE__ */ jsxs(SheetPrimitive.Close, {
|
|
6807
6918
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
|
|
6919
|
+
"data-test-id": testId(__e2e_test_id__, "close"),
|
|
6808
6920
|
children: [/* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
6809
6921
|
className: "sr-only",
|
|
6810
6922
|
children: "Close"
|
|
@@ -7238,7 +7350,7 @@ function usePersistedState(storageKey, defaultValue) {
|
|
|
7238
7350
|
}, [storageKey]);
|
|
7239
7351
|
return [state, setPersistedState];
|
|
7240
7352
|
}
|
|
7241
|
-
function Slicer({ filterValues, selectedValues, onChange, title, isLoading = false, optionsHeight = 200, className, defaultCollapsed = false, storageKey }) {
|
|
7353
|
+
function Slicer({ filterValues, selectedValues, onChange, title, isLoading = false, optionsHeight = 200, className, defaultCollapsed = false, storageKey, __e2e_test_id__ }) {
|
|
7242
7354
|
const effectiveStorageKey = storageKey === null ? void 0 : storageKey ?? `slicer-collapsed-${title}`;
|
|
7243
7355
|
const [isCollapsed, setIsCollapsed] = usePersistedState(effectiveStorageKey, defaultCollapsed);
|
|
7244
7356
|
const [searchQuery, setSearchQuery] = useState("");
|
|
@@ -7272,6 +7384,7 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
|
|
|
7272
7384
|
};
|
|
7273
7385
|
return /* @__PURE__ */ jsxs(Card, {
|
|
7274
7386
|
className: cn("flex flex-col overflow-hidden w-56 rounded shadow-sm shrink-0", className),
|
|
7387
|
+
"data-test-id": __e2e_test_id__,
|
|
7275
7388
|
children: [/* @__PURE__ */ jsxs(CardHeader, {
|
|
7276
7389
|
className: "px-2 py-0 pt-2 flex space-y-0 border-b border-border bg-muted/50 relative min-h-9",
|
|
7277
7390
|
children: [
|
|
@@ -7284,7 +7397,8 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
|
|
|
7284
7397
|
variant: "simple",
|
|
7285
7398
|
placeholder: "Search...",
|
|
7286
7399
|
value: searchQuery,
|
|
7287
|
-
onChange: (e) => setSearchQuery(e.target.value)
|
|
7400
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
7401
|
+
"data-test-id": testId(__e2e_test_id__, "search")
|
|
7288
7402
|
}),
|
|
7289
7403
|
/* @__PURE__ */ jsx(Button, {
|
|
7290
7404
|
variant: "ghost",
|
|
@@ -7295,6 +7409,7 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
|
|
|
7295
7409
|
},
|
|
7296
7410
|
title: isCollapsed ? "Expand slicer" : "Collapse slicer",
|
|
7297
7411
|
className: "size-7 absolute top-1 right-9 text-muted-foreground",
|
|
7412
|
+
"data-test-id": testId(__e2e_test_id__, "collapse"),
|
|
7298
7413
|
children: /* @__PURE__ */ jsx(ChevronUpIcon$1, { className: cn(isCollapsed && "rotate-180") })
|
|
7299
7414
|
}),
|
|
7300
7415
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -7304,6 +7419,7 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
|
|
|
7304
7419
|
onClick: handleClear,
|
|
7305
7420
|
title: "Clear filter",
|
|
7306
7421
|
className: "size-7 absolute top-1 right-1 text-muted-foreground",
|
|
7422
|
+
"data-test-id": testId(__e2e_test_id__, "clear"),
|
|
7307
7423
|
children: /* @__PURE__ */ jsx(FilterX, {})
|
|
7308
7424
|
})
|
|
7309
7425
|
]
|
|
@@ -7314,6 +7430,7 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
|
|
|
7314
7430
|
size: "xs",
|
|
7315
7431
|
className: "w-full justify-start px-2 py-1 rounded-sm text-sm font-normal",
|
|
7316
7432
|
onClick: handleSelectAll,
|
|
7433
|
+
"data-test-id": testId(__e2e_test_id__, "select-all"),
|
|
7317
7434
|
children: searchQuery.length > 0 ? /* @__PURE__ */ jsx(Checkbox, {
|
|
7318
7435
|
readOnly: true,
|
|
7319
7436
|
checked: isAnyFilteredSelected,
|
|
@@ -7486,6 +7603,42 @@ function TabsContent({ className,...props }) {
|
|
|
7486
7603
|
});
|
|
7487
7604
|
}
|
|
7488
7605
|
|
|
7606
|
+
//#endregion
|
|
7607
|
+
//#region src/textarea/deferred-textarea.tsx
|
|
7608
|
+
/**
|
|
7609
|
+
* A Textarea that buffers changes locally and only commits to the parent
|
|
7610
|
+
* on blur. Useful for forms where you don't want to trigger expensive
|
|
7611
|
+
* operations (like API calls) on every keystroke.
|
|
7612
|
+
*/
|
|
7613
|
+
function DeferredTextarea({ value, onCommit, onValueChange, onBlur,...props }) {
|
|
7614
|
+
const [localValue, setLocalValue] = useState(value);
|
|
7615
|
+
useEffect(() => {
|
|
7616
|
+
setLocalValue(value);
|
|
7617
|
+
}, [value]);
|
|
7618
|
+
const commitValue = useCallback(() => {
|
|
7619
|
+
if (localValue !== value) onCommit(localValue);
|
|
7620
|
+
}, [
|
|
7621
|
+
localValue,
|
|
7622
|
+
value,
|
|
7623
|
+
onCommit
|
|
7624
|
+
]);
|
|
7625
|
+
const handleChange = useCallback((e) => {
|
|
7626
|
+
const newValue = e.target.value;
|
|
7627
|
+
setLocalValue(newValue);
|
|
7628
|
+
onValueChange?.(newValue);
|
|
7629
|
+
}, [onValueChange]);
|
|
7630
|
+
const handleBlur = useCallback((e) => {
|
|
7631
|
+
commitValue();
|
|
7632
|
+
onBlur?.(e);
|
|
7633
|
+
}, [commitValue, onBlur]);
|
|
7634
|
+
return /* @__PURE__ */ jsx(Textarea, {
|
|
7635
|
+
...props,
|
|
7636
|
+
value: localValue,
|
|
7637
|
+
onChange: handleChange,
|
|
7638
|
+
onBlur: handleBlur
|
|
7639
|
+
});
|
|
7640
|
+
}
|
|
7641
|
+
|
|
7489
7642
|
//#endregion
|
|
7490
7643
|
//#region src/toggle/toggle.tsx
|
|
7491
7644
|
const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground cursor-pointer", {
|
|
@@ -7553,5 +7706,5 @@ const ToggleGroupItem = React$1.forwardRef(({ className, children, variant, size
|
|
|
7553
7706
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
7554
7707
|
|
|
7555
7708
|
//#endregion
|
|
7556
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DateCell, DatePickerDemo, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttTimeline, GanttTimerangePicker, HeaderComponents, HoverCard, HoverCardContent, HoverCardTrigger, InfoCard, Input, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slicer, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, getCellKey, getCommonPinningStyles, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, navigationMenuTriggerStyle, parseCellKey, sliderVariants, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useSidebar };
|
|
7709
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DateCell, DatePickerDemo, DeferredInput, DeferredNumberInput, DeferredTextarea, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttTimeline, GanttTimerangePicker, HeaderComponents, HoverCard, HoverCardContent, HoverCardTrigger, InfoCard, Input, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slicer, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, getCellKey, getCommonPinningStyles, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useSidebar };
|
|
7557
7710
|
//# sourceMappingURL=index.js.map
|