@aircall/ds 0.21.0 → 0.24.0

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.js CHANGED
@@ -22,11 +22,11 @@ import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
22
22
  import { Combobox as Combobox$1 } from "@base-ui/react";
23
23
  import { Command as Command$1 } from "cmdk";
24
24
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
25
+ import { useControllableState } from "@aircall/hooks";
25
26
  import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
26
27
  import { useVirtualizer } from "@tanstack/react-virtual";
27
28
  import { checkboxesFeature, hotkeysCoreFeature, selectionFeature, syncDataLoaderFeature } from "@headless-tree/core";
28
29
  import { useTree } from "@headless-tree/react";
29
- import { useControllableState } from "@aircall/hooks";
30
30
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
31
31
  import { Radio } from "@base-ui/react/radio";
32
32
  import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
@@ -223,6 +223,7 @@ const de = {
223
223
  "pagination.nextPage": "Zur nächsten Seite",
224
224
  "dataTable.selectAllRows": "Alle Zeilen auswählen",
225
225
  "dataTable.selectRow": "Zeile auswählen",
226
+ "dataCombobox.noResults": "Keine Ergebnisse",
226
227
  "tree.collapse": "Minimieren",
227
228
  "tree.expand": "Erweitern",
228
229
  "multiselect.remove": "Entfernen",
@@ -251,6 +252,7 @@ const en = {
251
252
  "pagination.nextPage": "Go to next page",
252
253
  "dataTable.selectAllRows": "Select all rows",
253
254
  "dataTable.selectRow": "Select row",
255
+ "dataCombobox.noResults": "No results found",
254
256
  "tree.collapse": "Collapse",
255
257
  "tree.expand": "Expand",
256
258
  "multiselect.remove": "Remove",
@@ -279,6 +281,7 @@ const es = {
279
281
  "pagination.nextPage": "Ir a la página siguiente",
280
282
  "dataTable.selectAllRows": "Seleccionar todas las filas",
281
283
  "dataTable.selectRow": "Seleccionar fila",
284
+ "dataCombobox.noResults": "Sin resultados",
282
285
  "tree.collapse": "Minimizar",
283
286
  "tree.expand": "Ampliar",
284
287
  "multiselect.remove": "Eliminar",
@@ -307,6 +310,7 @@ const fr = {
307
310
  "pagination.nextPage": "Aller à la page suivante",
308
311
  "dataTable.selectAllRows": "Sélectionner toutes les lignes",
309
312
  "dataTable.selectRow": "Sélectionner la ligne",
313
+ "dataCombobox.noResults": "Aucun résultat",
310
314
  "tree.collapse": "Réduire",
311
315
  "tree.expand": "Développer",
312
316
  "multiselect.remove": "Supprimer",
@@ -335,6 +339,7 @@ const it = {
335
339
  "pagination.previousPage": "Vai alla pagina precedente",
336
340
  "dataTable.selectAllRows": "Seleziona tutte le righe",
337
341
  "dataTable.selectRow": "Seleziona riga",
342
+ "dataCombobox.noResults": "Nessun risultato",
338
343
  "tree.collapse": "Ridurre",
339
344
  "tree.expand": "Espandi",
340
345
  "multiselect.remove": "Rimuovi",
@@ -2652,7 +2657,7 @@ CollapsibleContent.displayName = "CollapsibleContent";
2652
2657
 
2653
2658
  //#endregion
2654
2659
  //#region src/components/input.tsx
2655
- const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-background px-3 py-2 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-ring hover:aria-invalid:border-destructive disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40", { variants: { block: { true: "w-full" } } });
2660
+ const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-background px-3 py-2 text-sm 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:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40", { variants: { block: { true: "w-full" } } });
2656
2661
  const Input = React.forwardRef((componentProps, forwardRef) => {
2657
2662
  const { className, type, block, ...props } = componentProps;
2658
2663
  return /* @__PURE__ */ jsx("input", {
@@ -2689,7 +2694,7 @@ Textarea.displayName = "Textarea";
2689
2694
  * affix-driven input padding adjustments. Exported so `NumericInput` renders an
2690
2695
  * identical container without nesting inside `InputGroup`.
2691
2696
  */
2692
- const inputGroupShellClassName = cn("group/input-group bg-background border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "not-has-[input:disabled]:not-has-[textarea:disabled]:not-has-[[data-slot][aria-invalid=true]]:hover:border-ring", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40");
2697
+ const inputGroupShellClassName = cn("group/input-group bg-background border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40");
2693
2698
  const InputGroup = React.forwardRef((componentProps, forwardRef) => {
2694
2699
  const { className, ...props } = componentProps;
2695
2700
  return /* @__PURE__ */ jsx("div", {
@@ -2853,7 +2858,7 @@ const ComboboxList = React.forwardRef((componentProps, forwardRef) => {
2853
2858
  return /* @__PURE__ */ jsx(Combobox$1.List, {
2854
2859
  ref: forwardRef,
2855
2860
  "data-slot": "combobox-list",
2856
- className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 outline-hidden data-empty:p-0", className),
2861
+ className: cn("scroll-fade scrollbar-none max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 outline-hidden data-empty:p-0", className),
2857
2862
  ...props
2858
2863
  });
2859
2864
  });
@@ -3200,6 +3205,207 @@ const Skeleton = React.forwardRef((componentProps, forwardRef) => {
3200
3205
  });
3201
3206
  Skeleton.displayName = "Skeleton";
3202
3207
 
3208
+ //#endregion
3209
+ //#region src/lib/use-fetch-more-sentinel.ts
3210
+ /**
3211
+ * Returns a callback ref for a scroll sentinel element placed at the bottom of a
3212
+ * scrollable list. When the sentinel scrolls into view (within `rootMargin`),
3213
+ * `onFetchMore` fires once. The observer is (re)attached whenever the sentinel
3214
+ * node mounts — so it works even if the sentinel only appears after the first
3215
+ * page loads — and re-arms whenever `resetKey` changes (a page arrived, or the
3216
+ * list reset), so pagination keeps going while the sentinel stays in view and
3217
+ * pauses once it scrolls away. It fires at most once per intersection, so a
3218
+ * sentinel that stays in view can't trigger duplicate loads or a tight retry
3219
+ * loop when a fetch fails and the data is unchanged.
3220
+ *
3221
+ * `getRoot` resolves the scroll container the sentinel is measured against, given
3222
+ * the sentinel node — return the scrolling ancestor (a table container, a
3223
+ * combobox list, …) so `rootMargin` gives prefetch headroom inside a clipped
3224
+ * scroll area, or `null` to measure against the viewport.
3225
+ *
3226
+ * @example
3227
+ * ```tsx
3228
+ * const sentinelRef = useFetchMoreSentinel<HTMLDivElement>(
3229
+ * onFetchMore,
3230
+ * node => node.closest<HTMLElement>('[data-slot="combobox-list"]'),
3231
+ * items.length
3232
+ * );
3233
+ * // …later, at the bottom of the list:
3234
+ * <div aria-hidden ref={sentinelRef} />
3235
+ * ```
3236
+ */
3237
+ function useFetchMoreSentinel(onFetchMore, getRoot, resetKey) {
3238
+ const onFetchMoreRef = React.useRef(onFetchMore);
3239
+ onFetchMoreRef.current = onFetchMore;
3240
+ const getRootRef = React.useRef(getRoot);
3241
+ getRootRef.current = getRoot;
3242
+ const observerRef = React.useRef(null);
3243
+ const nodeRef = React.useRef(null);
3244
+ const armedRef = React.useRef(true);
3245
+ const observe = React.useCallback(() => {
3246
+ observerRef.current?.disconnect();
3247
+ observerRef.current = null;
3248
+ const node = nodeRef.current;
3249
+ if (!node) return;
3250
+ const root = getRootRef.current(node);
3251
+ const observer = new IntersectionObserver((entries) => {
3252
+ if (entries[entries.length - 1]?.isIntersecting) {
3253
+ if (armedRef.current) {
3254
+ armedRef.current = false;
3255
+ onFetchMoreRef.current?.();
3256
+ }
3257
+ } else armedRef.current = true;
3258
+ }, {
3259
+ root,
3260
+ rootMargin: "200px"
3261
+ });
3262
+ observer.observe(node);
3263
+ observerRef.current = observer;
3264
+ }, []);
3265
+ React.useEffect(() => {
3266
+ armedRef.current = true;
3267
+ observe();
3268
+ }, [resetKey, observe]);
3269
+ return React.useCallback((node) => {
3270
+ nodeRef.current = node;
3271
+ observe();
3272
+ }, [observe]);
3273
+ }
3274
+
3275
+ //#endregion
3276
+ //#region src/components/data-combobox.tsx
3277
+ const DEFAULT_SKELETON_COUNT$1 = 5;
3278
+ const EMPTY_KEYS$1 = /* @__PURE__ */ new Set();
3279
+ function DataCombobox(componentProps) {
3280
+ const { items, getItemValue, getItemLabel, renderItem, selectionMode = "single", selectedKeys, defaultSelectedKeys, onSelectionChange, selectedItems, disabledKeys, loadingState = "idle", skeletonCount = DEFAULT_SKELETON_COUNT$1, onSearch, onFetchMore, hasMore = false, emptyState, trigger, placeholder, disabled = false, className, "aria-label": ariaLabel } = componentProps;
3281
+ const t = useDsTranslation("ds");
3282
+ const multiple = selectionMode === "multiple";
3283
+ const disabledKeySet = disabledKeys ?? EMPTY_KEYS$1;
3284
+ const itemCacheRef = React.useRef(/* @__PURE__ */ new Map());
3285
+ if (selectedItems) for (const item of selectedItems) itemCacheRef.current.set(getItemValue(item), item);
3286
+ for (const item of items) itemCacheRef.current.set(getItemValue(item), item);
3287
+ const itemCache = itemCacheRef.current;
3288
+ const [selectionSet, setSelectionSet] = useControllableState({
3289
+ prop: selectedKeys,
3290
+ defaultProp: defaultSelectedKeys,
3291
+ onChange: onSelectionChange
3292
+ });
3293
+ const keys = selectionSet ?? EMPTY_KEYS$1;
3294
+ const selectedObjects = [];
3295
+ for (const key of keys) {
3296
+ const item = itemCache.get(key);
3297
+ if (item) selectedObjects.push(item);
3298
+ }
3299
+ const commit = React.useCallback((objs) => setSelectionSet(new Set(objs.map(getItemValue))), [setSelectionSet, getItemValue]);
3300
+ const handleInputValueChange = onSearch ? (value, details) => {
3301
+ if (details.reason === "input-change") onSearch(value);
3302
+ } : void 0;
3303
+ const isInitialLoading = loadingState === "loading";
3304
+ const isFiltering = loadingState === "filtering";
3305
+ const isLoadingMore = loadingState === "loadingMore";
3306
+ const sentinelRef = useFetchMoreSentinel(onFetchMore, (node) => node.closest("[data-slot=\"combobox-list\"]"), items.length);
3307
+ const renderRow = (item, index) => {
3308
+ const key = getItemValue(item);
3309
+ const attachSentinel = !!onFetchMore && hasMore && index === items.length - 1;
3310
+ return /* @__PURE__ */ jsx(ComboboxItem, {
3311
+ value: item,
3312
+ disabled: disabledKeySet.has(key),
3313
+ ref: attachSentinel ? sentinelRef : void 0,
3314
+ children: renderItem ? renderItem(item) : getItemLabel(item)
3315
+ }, key);
3316
+ };
3317
+ const popupBody = /* @__PURE__ */ jsxs("div", {
3318
+ className: "relative",
3319
+ children: [isInitialLoading ? /* @__PURE__ */ jsx("div", {
3320
+ className: "p-1",
3321
+ children: /* @__PURE__ */ jsx(ComboboxSkeleton, { count: skeletonCount })
3322
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3323
+ /* @__PURE__ */ jsx(ComboboxList, {
3324
+ "aria-label": ariaLabel,
3325
+ children: renderRow
3326
+ }),
3327
+ /* @__PURE__ */ jsx(ComboboxEmpty, { children: emptyState ?? t("dataCombobox.noResults") }),
3328
+ isLoadingMore ? /* @__PURE__ */ jsx(SpinnerRow, {}) : null
3329
+ ] }), isFiltering ? /* @__PURE__ */ jsx("div", {
3330
+ "data-slot": "combobox-loading-overlay",
3331
+ className: "bg-popover/60 absolute inset-0 z-10 flex items-center justify-center",
3332
+ children: /* @__PURE__ */ jsx(Spinner, {})
3333
+ }) : null]
3334
+ });
3335
+ const chipsAnchor = useComboboxAnchor();
3336
+ const overlayLayout = trigger ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Combobox$1.Trigger, { render: trigger }), /* @__PURE__ */ jsxs(ComboboxContent, {
3337
+ className: "min-w-[200px]",
3338
+ children: [/* @__PURE__ */ jsx(ComboboxInput, {
3339
+ showTrigger: false,
3340
+ placeholder,
3341
+ className: "h-8 [&_input]:h-8 [&_input]:py-1"
3342
+ }), popupBody]
3343
+ })] }) : null;
3344
+ if (multiple) return /* @__PURE__ */ jsx(Combobox, {
3345
+ multiple: true,
3346
+ autoHighlight: true,
3347
+ items,
3348
+ disabled,
3349
+ filter: null,
3350
+ value: selectedObjects,
3351
+ onValueChange: commit,
3352
+ itemToStringValue: getItemValue,
3353
+ itemToStringLabel: getItemLabel,
3354
+ isItemEqualToValue: (a, b) => getItemValue(a) === getItemValue(b),
3355
+ onInputValueChange: handleInputValueChange,
3356
+ children: trigger ? overlayLayout : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComboboxChips, {
3357
+ ref: chipsAnchor,
3358
+ className,
3359
+ children: /* @__PURE__ */ jsx(ComboboxValue, { children: (values) => /* @__PURE__ */ jsxs(Fragment, { children: [values.map((item) => /* @__PURE__ */ jsx(ComboboxChip, { children: getItemLabel(item) }, getItemValue(item))), /* @__PURE__ */ jsx(ComboboxChipsInput, { placeholder: keys.size === 0 ? placeholder : "" })] }) })
3360
+ }), /* @__PURE__ */ jsx(ComboboxContent, {
3361
+ anchor: chipsAnchor,
3362
+ className: "min-w-[200px]",
3363
+ children: popupBody
3364
+ })] })
3365
+ }, selectionMode);
3366
+ return /* @__PURE__ */ jsx(Combobox, {
3367
+ autoHighlight: true,
3368
+ items,
3369
+ disabled,
3370
+ filter: null,
3371
+ value: selectedObjects[0] ?? null,
3372
+ onValueChange: (next) => commit(next == null ? [] : [next]),
3373
+ itemToStringValue: getItemValue,
3374
+ itemToStringLabel: getItemLabel,
3375
+ isItemEqualToValue: (a, b) => getItemValue(a) === getItemValue(b),
3376
+ onInputValueChange: handleInputValueChange,
3377
+ children: trigger ? overlayLayout : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComboboxInput, {
3378
+ className,
3379
+ placeholder,
3380
+ disabled,
3381
+ showClear: true
3382
+ }), /* @__PURE__ */ jsx(ComboboxContent, {
3383
+ className: "min-w-[200px]",
3384
+ children: popupBody
3385
+ })] })
3386
+ }, selectionMode);
3387
+ }
3388
+ /**
3389
+ * A centered spinner row for the filtering and load-more states. Not
3390
+ * `aria-hidden` — the `Spinner`'s `role="status"` announces loading to screen
3391
+ * readers (that's the point of a loading indicator).
3392
+ */
3393
+ function SpinnerRow() {
3394
+ return /* @__PURE__ */ jsx("div", {
3395
+ className: "flex justify-center py-2 text-muted-foreground",
3396
+ children: /* @__PURE__ */ jsx(Spinner, {})
3397
+ });
3398
+ }
3399
+ /** Skeleton rows shown while the initial page loads. */
3400
+ function ComboboxSkeleton({ count }) {
3401
+ return /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx("div", {
3402
+ "aria-hidden": true,
3403
+ "data-test": "loading-item",
3404
+ className: "flex items-center gap-2 rounded-md p-2",
3405
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" })
3406
+ }, `skeleton-${i}`)) });
3407
+ }
3408
+
3203
3409
  //#endregion
3204
3410
  //#region src/components/table.tsx
3205
3411
  const Table = React.forwardRef((componentProps, forwardRef) => {
@@ -3283,14 +3489,36 @@ TableCell.displayName = "TableCell";
3283
3489
  //#region src/components/data-table.tsx
3284
3490
  const SELECT_COLUMN_ID = "__select";
3285
3491
  const DEFAULT_SKELETON_COUNT = 5;
3492
+ const EMPTY_KEYS = /* @__PURE__ */ new Set();
3286
3493
  function DataTable(componentProps) {
3287
- const { columns, data, getRowId, loadingState = "idle", skeletonCount = DEFAULT_SKELETON_COUNT, emptyState, sorting, onSortingChange, enableRowSelection, rowSelection, onRowSelectionChange, actionBar, onFetchMore, hasMore = false, enableColumnResizing = false, fillHeight = false, onRowClick, className } = componentProps;
3494
+ const { columns, data, getRowId, loadingState = "idle", skeletonCount = DEFAULT_SKELETON_COUNT, emptyState, sorting, onSortingChange, selectionMode = "none", selectedKeys, defaultSelectedKeys, onSelectionChange, disabledKeys, disabledBehavior = "all", actionBar, onFetchMore, hasMore = false, enableColumnResizing = false, fillHeight = false, fixedLayout = false, onRowClick, className } = componentProps;
3288
3495
  const sortingEnabled = !!onSortingChange;
3289
- const selectionEnabled = !!enableRowSelection;
3496
+ const selectionEnabled = selectionMode !== "none";
3497
+ const multiSelect = selectionMode === "multiple";
3498
+ const disabledKeySet = disabledKeys ?? EMPTY_KEYS;
3290
3499
  const finalColumns = React.useMemo(() => {
3291
3500
  if (!selectionEnabled) return columns;
3292
- return [makeSelectColumn(), ...columns];
3293
- }, [columns, selectionEnabled]);
3501
+ return [makeSelectColumn(multiSelect), ...columns];
3502
+ }, [
3503
+ columns,
3504
+ selectionEnabled,
3505
+ multiSelect
3506
+ ]);
3507
+ const [selectionSet, setSelectionSet] = useControllableState({
3508
+ prop: selectedKeys,
3509
+ defaultProp: defaultSelectedKeys,
3510
+ onChange: onSelectionChange
3511
+ });
3512
+ const selection = selectionSet ?? EMPTY_KEYS;
3513
+ const rowSelection = React.useMemo(() => {
3514
+ const record = {};
3515
+ for (const key of selection) record[key] = true;
3516
+ return record;
3517
+ }, [selection]);
3518
+ const handleRowSelectionChange = React.useCallback((updater) => {
3519
+ const next = typeof updater === "function" ? updater(rowSelection) : updater;
3520
+ setSelectionSet(new Set(Object.keys(next).filter((key) => next[key])));
3521
+ }, [rowSelection, setSelectionSet]);
3294
3522
  const table = useReactTable({
3295
3523
  data,
3296
3524
  columns: finalColumns,
@@ -3298,14 +3526,15 @@ function DataTable(componentProps) {
3298
3526
  getRowId,
3299
3527
  enableSorting: sortingEnabled,
3300
3528
  manualSorting: sortingEnabled,
3301
- enableRowSelection,
3529
+ enableRowSelection: selectionEnabled ? (row) => !disabledKeySet.has(row.id) : false,
3530
+ enableMultiRowSelection: multiSelect,
3302
3531
  enableColumnResizing,
3303
3532
  columnResizeMode: "onChange",
3304
3533
  onSortingChange,
3305
- onRowSelectionChange,
3534
+ onRowSelectionChange: handleRowSelectionChange,
3306
3535
  state: {
3307
3536
  ...sorting !== void 0 && { sorting },
3308
- ...rowSelection !== void 0 && { rowSelection }
3537
+ rowSelection
3309
3538
  }
3310
3539
  });
3311
3540
  const rows = table.getRowModel().rows;
@@ -3318,13 +3547,15 @@ function DataTable(componentProps) {
3318
3547
  const showEmptyState = !isInitialLoading && rows.length === 0 && !!emptyState;
3319
3548
  const anySelected = hasSelection;
3320
3549
  const rowClickable = selectionEnabled || !!onRowClick;
3550
+ const isRowInert = (row) => disabledBehavior === "all" && disabledKeySet.has(row.id);
3321
3551
  const handleRowActivate = (row) => {
3552
+ if (isRowInert(row)) return;
3322
3553
  if (selectionEnabled && (anySelected || !onRowClick)) {
3323
3554
  if (row.getCanSelect()) row.toggleSelected();
3324
3555
  } else if (onRowClick) onRowClick(row.original);
3325
3556
  };
3326
3557
  const virtualizeRows = (componentProps.virtualizeRows ?? false) && fillHeight;
3327
- const pinWidths = enableColumnResizing || virtualizeRows;
3558
+ const pinWidths = enableColumnResizing || virtualizeRows || fixedLayout;
3328
3559
  const colWidth = (size) => pinWidths ? { width: size } : void 0;
3329
3560
  const containerRef = React.useRef(null);
3330
3561
  const rowVirtualizer = useVirtualizer({
@@ -3339,14 +3570,14 @@ function DataTable(componentProps) {
3339
3570
  const paddingBottom = virtualItems && virtualItems.length > 0 ? rowVirtualizer.getTotalSize() - virtualItems[virtualItems.length - 1].end : 0;
3340
3571
  const showActionBar = !!actionBar && hasSelection;
3341
3572
  const reservedBottom = showActionBar ? ActionBarHeight + 16 : void 0;
3342
- const sentinelRef = useFetchMoreSentinel(onFetchMore, fillHeight, data.length);
3573
+ const sentinelRef = useFetchMoreSentinel(onFetchMore, (node) => fillHeight ? node.closest("[data-slot=\"table-container\"]") : null, data.length);
3343
3574
  return /* @__PURE__ */ jsxs("div", {
3344
3575
  className: cn("relative w-full", fillHeight && "flex min-h-0 flex-1 flex-col", className),
3345
3576
  "aria-busy": isInitialLoading || isRefreshing || void 0,
3346
3577
  children: [
3347
3578
  /* @__PURE__ */ jsxs(Table, {
3348
3579
  containerRef,
3349
- className: cn((enableColumnResizing || virtualizeRows) && "table-fixed", fillHeight && "[&_[data-slot=table-head]]:sticky [&_[data-slot=table-head]]:top-0 [&_[data-slot=table-head]]:z-10 [&_[data-slot=table-head]]:bg-background", fillHeight && showEmptyState && "h-full"),
3580
+ className: cn(pinWidths && "table-fixed", fillHeight && "[&_[data-slot=table-head]]:sticky [&_[data-slot=table-head]]:top-0 [&_[data-slot=table-head]]:z-10 [&_[data-slot=table-head]]:bg-background", fillHeight && showEmptyState && "h-full"),
3350
3581
  containerClassName: fillHeight ? "min-h-0 flex-1 overflow-y-auto" : void 0,
3351
3582
  containerStyle: reservedBottom ? {
3352
3583
  paddingBottom: reservedBottom,
@@ -3376,12 +3607,15 @@ function DataTable(componentProps) {
3376
3607
  }),
3377
3608
  virtualItems.map((vi) => {
3378
3609
  const row = rows[vi.index];
3610
+ const inert = isRowInert(row);
3611
+ const clickable = rowClickable && !inert;
3379
3612
  return /* @__PURE__ */ jsx(TableRow, {
3380
3613
  ref: (node) => rowVirtualizer.measureElement(node),
3381
3614
  "data-index": vi.index,
3382
3615
  "data-state": row.getIsSelected() ? "selected" : void 0,
3383
- onClick: rowClickable ? () => handleRowActivate(row) : void 0,
3384
- className: rowClickable ? "cursor-pointer" : void 0,
3616
+ "aria-disabled": inert || void 0,
3617
+ onClick: clickable ? () => handleRowActivate(row) : void 0,
3618
+ className: cn(clickable && "cursor-pointer", inert && "opacity-50"),
3385
3619
  children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, {
3386
3620
  style: colWidth(cell.column.getSize()),
3387
3621
  children: flexRender(cell.column.columnDef.cell, cell.getContext())
@@ -3395,15 +3629,20 @@ function DataTable(componentProps) {
3395
3629
  style: { height: paddingBottom }
3396
3630
  })
3397
3631
  })
3398
- ] }) : rows.map((row) => /* @__PURE__ */ jsx(TableRow, {
3399
- "data-state": row.getIsSelected() ? "selected" : void 0,
3400
- onClick: rowClickable ? () => handleRowActivate(row) : void 0,
3401
- className: rowClickable ? "cursor-pointer" : void 0,
3402
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, {
3403
- style: colWidth(cell.column.getSize()),
3404
- children: flexRender(cell.column.columnDef.cell, cell.getContext())
3405
- }, cell.id))
3406
- }, row.id)),
3632
+ ] }) : rows.map((row) => {
3633
+ const inert = isRowInert(row);
3634
+ const clickable = rowClickable && !inert;
3635
+ return /* @__PURE__ */ jsx(TableRow, {
3636
+ "data-state": row.getIsSelected() ? "selected" : void 0,
3637
+ "aria-disabled": inert || void 0,
3638
+ onClick: clickable ? () => handleRowActivate(row) : void 0,
3639
+ className: cn(clickable && "cursor-pointer", inert && "opacity-50"),
3640
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, {
3641
+ style: colWidth(cell.column.getSize()),
3642
+ children: flexRender(cell.column.columnDef.cell, cell.getContext())
3643
+ }, cell.id))
3644
+ }, row.id);
3645
+ }),
3407
3646
  isLoadingMore ? /* @__PURE__ */ jsx(TableRow, {
3408
3647
  className: "hover:bg-transparent",
3409
3648
  children: /* @__PURE__ */ jsx(TableCell, {
@@ -3477,21 +3716,21 @@ function SelectAllHeader({ table }) {
3477
3716
  }
3478
3717
  function SelectRowCell({ row }) {
3479
3718
  const t = useDsTranslation("ds");
3719
+ if (!row.getCanSelect()) return null;
3480
3720
  return /* @__PURE__ */ jsx("span", {
3481
3721
  className: "contents",
3482
3722
  onClick: (e) => e.stopPropagation(),
3483
3723
  children: /* @__PURE__ */ jsx(Checkbox, {
3484
3724
  checked: row.getIsSelected(),
3485
- disabled: !row.getCanSelect(),
3486
3725
  onCheckedChange: (value) => row.toggleSelected(value === true),
3487
3726
  "aria-label": t("dataTable.selectRow")
3488
3727
  })
3489
3728
  });
3490
3729
  }
3491
- function makeSelectColumn() {
3730
+ function makeSelectColumn(multiSelect) {
3492
3731
  return {
3493
3732
  id: SELECT_COLUMN_ID,
3494
- header: ({ table }) => /* @__PURE__ */ jsx(SelectAllHeader, { table }),
3733
+ header: multiSelect ? ({ table }) => /* @__PURE__ */ jsx(SelectAllHeader, { table }) : () => null,
3495
3734
  cell: ({ row }) => /* @__PURE__ */ jsx(SelectRowCell, { row }),
3496
3735
  enableSorting: false,
3497
3736
  enableHiding: false,
@@ -3529,48 +3768,6 @@ function SkeletonRows({ columns, count }) {
3529
3768
  children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full max-w-full" })
3530
3769
  }, col.id ?? `col-${ci}`)) }, `skeleton-${i}`)) });
3531
3770
  }
3532
- /**
3533
- * Returns a callback ref for the scroll sentinel. The observer is (re)attached
3534
- * whenever the sentinel node mounts — so it works even if the sentinel only
3535
- * appears after the first page loads (the sentinel's presence is the gate). It
3536
- * fires `onFetchMore` once per mount and disconnects immediately, so a single
3537
- * page never triggers duplicate fetches; the sentinel remounts for the next page.
3538
- */
3539
- function useFetchMoreSentinel(onFetchMore, fillHeight, resetKey) {
3540
- const onFetchMoreRef = React.useRef(onFetchMore);
3541
- onFetchMoreRef.current = onFetchMore;
3542
- const observerRef = React.useRef(null);
3543
- const nodeRef = React.useRef(null);
3544
- const armedRef = React.useRef(true);
3545
- const observe = React.useCallback(() => {
3546
- observerRef.current?.disconnect();
3547
- observerRef.current = null;
3548
- const node = nodeRef.current;
3549
- if (!node) return;
3550
- const root = fillHeight ? node.closest("[data-slot=\"table-container\"]") : null;
3551
- const observer = new IntersectionObserver((entries) => {
3552
- if (entries[entries.length - 1]?.isIntersecting) {
3553
- if (armedRef.current) {
3554
- armedRef.current = false;
3555
- onFetchMoreRef.current?.();
3556
- }
3557
- } else armedRef.current = true;
3558
- }, {
3559
- root,
3560
- rootMargin: "200px"
3561
- });
3562
- observer.observe(node);
3563
- observerRef.current = observer;
3564
- }, [fillHeight]);
3565
- React.useEffect(() => {
3566
- armedRef.current = true;
3567
- observe();
3568
- }, [resetKey, observe]);
3569
- return React.useCallback((node) => {
3570
- nodeRef.current = node;
3571
- observe();
3572
- }, [observe]);
3573
- }
3574
3771
 
3575
3772
  //#endregion
3576
3773
  //#region src/components/tree.tsx
@@ -4638,7 +4835,7 @@ const DropzoneContent = React.forwardRef((componentProps, forwardRef) => {
4638
4835
  "data-slot": "dropzone-content",
4639
4836
  "data-disabled": disabled || void 0,
4640
4837
  "data-error": error || void 0,
4641
- className: cn("flex min-w-0 flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-input bg-background p-6 text-center text-balance transition-colors", "outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "data-error:border-destructive", "data-disabled:cursor-not-allowed data-disabled:opacity-60 data-disabled:bg-muted", !disabled && "cursor-pointer hover:bg-muted/40", className),
4838
+ className: cn("flex min-w-0 flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-input p-6 text-center text-balance transition-colors", "outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "data-error:border-destructive", "data-disabled:cursor-not-allowed data-disabled:opacity-60 data-disabled:bg-muted", !disabled && "cursor-pointer hover:bg-muted/40", className),
4642
4839
  onClick: (event) => {
4643
4840
  if (!disabled) open();
4644
4841
  onClick?.(event);
@@ -4941,7 +5138,7 @@ const FieldLegend = React.forwardRef((componentProps, forwardRef) => {
4941
5138
  ref: forwardRef,
4942
5139
  "data-slot": "field-legend",
4943
5140
  "data-variant": variant,
4944
- className: cn("mb-1.5 font-medium leading-normal data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
5141
+ className: cn("mb-1.5 font-bold leading-normal data-[variant=label]:text-sm data-[variant=legend]:text-xl", className),
4945
5142
  ...props
4946
5143
  });
4947
5144
  });
@@ -6462,7 +6659,7 @@ const SidebarContent = React.forwardRef((componentProps, forwardRef) => {
6462
6659
  ref: forwardRef,
6463
6660
  "data-slot": "sidebar-content",
6464
6661
  "data-sidebar": "content",
6465
- className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
6662
+ className: cn("scrollbar-none flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
6466
6663
  ...props
6467
6664
  });
6468
6665
  });
@@ -7135,4 +7332,4 @@ function useAudioGauge(options = {}) {
7135
7332
  }
7136
7333
 
7137
7334
  //#endregion
7138
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
7335
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
package/dist/theme.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root,:host{--color-charcoal-50:#f6fafc;--color-charcoal-300:#b0c4d1;--color-charcoal-700:#3a5362;--color-charcoal-900:#132c3b;--color-neutral-50:#f8f9fc;--color-neutral-100:#f0f2f6;--color-neutral-200:#e4e6ea;--color-neutral-400:#a4a6aa;--color-neutral-500:#7e8084;--color-neutral-600:#64666a;--color-neutral-700:#4b4d51;--color-neutral-800:#36383c;--color-neutral-900:#24262a;--color-neutral-950:#0b0d11;--color-red-50:#fff7f5;--color-red-400:#ff7256;--color-red-600:#db391a;--color-red-950:#420b00;--color-yellow-50:#fffcf3;--color-yellow-400:#f3ad26;--color-yellow-500:#d68100;--color-yellow-700:#8f5600;--color-yellow-950:#2f1c00;--color-green-50:#f4fffb;--color-green-400:#37cd8e;--color-green-500:#13a96a;--color-green-600:#00884f;--color-green-700:#006a3d;--color-green-950:#002817;--color-blue-50:#f5faff;--color-blue-400:#70b1ff;--color-blue-500:#388ef6;--color-blue-600:#1e74dc;--color-blue-700:#055bc3;--color-blue-950:#001f45;--color-purple-600:#6551d6;--color-purple-700:#4c38bd;--color-pink-500:#eb5e7c;--color-pink-600:#cf4260;--font-sans:"Fellix",sans-serif}.ds-emoji-picker .EmojiPickerReact,.ds-emoji-picker .EmojiPickerReact.epr-dark-theme{--epr-emoji-size:24px;--epr-category-navigation-button-size:24px;--epr-header-padding:calc(var(--spacing)*2)calc(var(--spacing)*2);--epr-category-label-height:calc(var(--spacing)*8);--epr-bg-color:var(--popover);--epr-category-label-bg-color:var(--popover);--epr-picker-border-color:var(--border);--epr-search-input-bg-color:var(--muted);--epr-search-input-bg-color-active:var(--muted);--epr-search-border-color:var(--ring);--epr-category-icon-active-color:var(--primary);font-family:var(--font-sans)}.ds-emoji-picker .EmojiPickerReact *{font-family:inherit}.ds-emoji-picker .EmojiPickerReact .epr-emoji-category>.epr-emoji-category-label{font-weight:400}.ds-emoji-picker .EmojiPickerReact .epr-category-nav>button.epr-cat-btn:focus:before{content:none}@keyframes caret-blink{0%,70%,to{opacity:1}20%,50%{opacity:0}}@keyframes badge-glow{0%,to{filter:drop-shadow(0 0 2px var(--badge-glow))}50%{filter:drop-shadow(0 0 5px var(--badge-glow))}}@layer theme{:root,:host{--background:#fff;--foreground:var(--color-neutral-950);--card:#fff;--card-foreground:var(--color-neutral-950);--popover:#fff;--popover-foreground:var(--color-neutral-950);--primary:var(--color-green-600);--primary-foreground:#fff;--secondary:var(--color-charcoal-700);--secondary-foreground:var(--color-charcoal-50);--info:var(--color-blue-500);--info-foreground:var(--color-blue-700);--info-background:var(--color-blue-50);--success:var(--color-green-500);--success-foreground:var(--color-green-700);--success-background:var(--color-green-50);--warning:var(--color-yellow-500);--warning-foreground:var(--color-yellow-700);--warning-background:var(--color-yellow-50);--muted:var(--color-neutral-100);--muted-foreground:var(--color-neutral-600);--accent:var(--color-neutral-100);--accent-foreground:var(--color-neutral-900);--destructive:var(--color-red-600);--destructive-foreground:var(--color-red-50);--destructive-background:var(--color-red-50);--border:var(--color-neutral-200);--input:var(--color-neutral-200);--ring:var(--color-neutral-400);--chart-1:var(--color-green-600);--chart-2:var(--color-blue-600);--chart-3:var(--color-purple-700);--chart-4:var(--color-yellow-400);--chart-5:var(--color-pink-500);--radius:.625rem;--sidebar:#fff;--sidebar-foreground:var(--color-neutral-800);--sidebar-primary:var(--color-green-600);--sidebar-primary-foreground:#fff;--sidebar-accent:var(--color-neutral-100);--sidebar-accent-foreground:var(--color-neutral-900);--sidebar-border:var(--color-neutral-200);--sidebar-ring:var(--color-neutral-400);--badge-film-10:#ffffff1a;--badge-film-40:#fff6;--badge-film-60:#fff9;--badge-film-80:#fffc}[data-theme=dark],[data-theme=dark] *{--background:var(--color-neutral-950);--foreground:var(--color-neutral-50);--card:var(--color-neutral-900);--card-foreground:var(--color-neutral-50);--popover:var(--color-neutral-800);--popover-foreground:var(--color-neutral-50);--primary:var(--color-green-500);--primary-foreground:var(--color-neutral-950);--secondary:var(--color-charcoal-300);--secondary-foreground:var(--color-charcoal-900);--info:var(--color-blue-500);--info-foreground:var(--color-blue-400);--info-background:var(--color-blue-950);--success:var(--color-green-500);--success-foreground:var(--color-green-400);--success-background:var(--color-green-950);--warning:var(--color-yellow-500);--warning-foreground:var(--color-yellow-400);--warning-background:var(--color-yellow-950);--muted:var(--color-neutral-800);--muted-foreground:var(--color-neutral-400);--accent:var(--color-neutral-700);--accent-foreground:var(--color-neutral-50);--destructive:var(--color-red-400);--destructive-foreground:var(--color-red-50);--destructive-background:var(--color-red-950);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:var(--color-neutral-500);--chart-1:var(--color-green-500);--chart-2:var(--color-blue-500);--chart-3:var(--color-purple-600);--chart-4:var(--color-yellow-500);--chart-5:var(--color-pink-600);--sidebar:var(--color-neutral-900);--sidebar-foreground:var(--color-neutral-50);--sidebar-primary:var(--color-green-500);--sidebar-primary-foreground:#fff;--sidebar-accent:var(--color-neutral-800);--sidebar-accent-foreground:var(--color-neutral-50);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:var(--color-neutral-600);--badge-film-10:#0a0a0a1a;--badge-film-40:#0a0a0a66;--badge-film-60:#0a0a0a99;--badge-film-80:#0a0a0acc}}@property --scroll-fade-s{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-e{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-mask{syntax:"*";inherits:false}@property --shimmer-angle{syntax:"<angle>";inherits:true;initial-value:20deg}@property --shimmer-image{syntax:"*";inherits:false}@property --shimmer-text-fill{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){.shimmer{-webkit-text-fill-color:currentColor;background-image:none;animation:none}}
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--shimmer-image:initial;--shimmer-text-fill:initial;--scroll-fade-t:0px;--scroll-fade-b:0px;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root,:host{--color-charcoal-50:#f6fafc;--color-charcoal-300:#b0c4d1;--color-charcoal-700:#3a5362;--color-charcoal-900:#132c3b;--color-neutral-50:#f8f9fc;--color-neutral-100:#f0f2f6;--color-neutral-200:#e4e6ea;--color-neutral-400:#a4a6aa;--color-neutral-500:#7e8084;--color-neutral-600:#64666a;--color-neutral-700:#4b4d51;--color-neutral-800:#36383c;--color-neutral-900:#24262a;--color-neutral-950:#0b0d11;--color-red-50:#fff7f5;--color-red-400:#ff7256;--color-red-600:#db391a;--color-red-950:#420b00;--color-yellow-50:#fffcf3;--color-yellow-400:#f3ad26;--color-yellow-500:#d68100;--color-yellow-700:#8f5600;--color-yellow-950:#2f1c00;--color-green-50:#f4fffb;--color-green-400:#37cd8e;--color-green-500:#13a96a;--color-green-600:#00884f;--color-green-700:#006a3d;--color-green-950:#002817;--color-blue-50:#f5faff;--color-blue-400:#70b1ff;--color-blue-500:#388ef6;--color-blue-600:#1e74dc;--color-blue-700:#055bc3;--color-blue-950:#001f45;--color-purple-600:#6551d6;--color-purple-700:#4c38bd;--color-pink-500:#eb5e7c;--color-pink-600:#cf4260;--font-sans:"Fellix",sans-serif}.ds-emoji-picker .EmojiPickerReact,.ds-emoji-picker .EmojiPickerReact.epr-dark-theme{--epr-emoji-size:24px;--epr-category-navigation-button-size:24px;--epr-header-padding:calc(var(--spacing)*2)calc(var(--spacing)*2);--epr-category-label-height:calc(var(--spacing)*8);--epr-bg-color:var(--popover);--epr-category-label-bg-color:var(--popover);--epr-picker-border-color:var(--border);--epr-search-input-bg-color:var(--muted);--epr-search-input-bg-color-active:var(--muted);--epr-search-border-color:var(--ring);--epr-category-icon-active-color:var(--primary);font-family:var(--font-sans)}.ds-emoji-picker .EmojiPickerReact *{font-family:inherit}.ds-emoji-picker .EmojiPickerReact .epr-emoji-category>.epr-emoji-category-label{font-weight:400}.ds-emoji-picker .EmojiPickerReact .epr-category-nav>button.epr-cat-btn:focus:before{content:none}@keyframes caret-blink{0%,70%,to{opacity:1}20%,50%{opacity:0}}@keyframes badge-glow{0%,to{filter:drop-shadow(0 0 2px var(--badge-glow))}50%{filter:drop-shadow(0 0 5px var(--badge-glow))}}@layer theme{:root,:host{--background:#fff;--foreground:var(--color-neutral-950);--card:#fff;--card-foreground:var(--color-neutral-950);--popover:#fff;--popover-foreground:var(--color-neutral-950);--primary:var(--color-green-600);--primary-foreground:#fff;--secondary:var(--color-charcoal-700);--secondary-foreground:var(--color-charcoal-50);--info:var(--color-blue-500);--info-foreground:var(--color-blue-700);--info-background:var(--color-blue-50);--success:var(--color-green-500);--success-foreground:var(--color-green-700);--success-background:var(--color-green-50);--warning:var(--color-yellow-500);--warning-foreground:var(--color-yellow-700);--warning-background:var(--color-yellow-50);--muted:var(--color-neutral-100);--muted-foreground:var(--color-neutral-600);--accent:var(--color-neutral-100);--accent-foreground:var(--color-neutral-900);--destructive:var(--color-red-600);--destructive-foreground:var(--color-red-50);--destructive-background:var(--color-red-50);--border:var(--color-neutral-200);--input:var(--color-neutral-200);--ring:var(--color-neutral-400);--chart-1:var(--color-green-600);--chart-2:var(--color-blue-600);--chart-3:var(--color-purple-700);--chart-4:var(--color-yellow-400);--chart-5:var(--color-pink-500);--radius:.625rem;--sidebar:#fff;--sidebar-foreground:var(--color-neutral-800);--sidebar-primary:var(--color-green-600);--sidebar-primary-foreground:#fff;--sidebar-accent:var(--color-neutral-100);--sidebar-accent-foreground:var(--color-neutral-900);--sidebar-border:var(--color-neutral-200);--sidebar-ring:var(--color-neutral-400);--badge-film-10:#ffffff1a;--badge-film-40:#fff6;--badge-film-60:#fff9;--badge-film-80:#fffc}[data-theme=dark],[data-theme=dark] *{--background:var(--color-neutral-950);--foreground:var(--color-neutral-50);--card:var(--color-neutral-900);--card-foreground:var(--color-neutral-50);--popover:var(--color-neutral-800);--popover-foreground:var(--color-neutral-50);--primary:var(--color-green-500);--primary-foreground:var(--color-neutral-950);--secondary:var(--color-charcoal-300);--secondary-foreground:var(--color-charcoal-900);--info:var(--color-blue-500);--info-foreground:var(--color-blue-400);--info-background:var(--color-blue-950);--success:var(--color-green-500);--success-foreground:var(--color-green-400);--success-background:var(--color-green-950);--warning:var(--color-yellow-500);--warning-foreground:var(--color-yellow-400);--warning-background:var(--color-yellow-950);--muted:var(--color-neutral-800);--muted-foreground:var(--color-neutral-400);--accent:var(--color-neutral-700);--accent-foreground:var(--color-neutral-50);--destructive:var(--color-red-400);--destructive-foreground:var(--color-red-50);--destructive-background:var(--color-red-950);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:var(--color-neutral-500);--chart-1:var(--color-green-500);--chart-2:var(--color-blue-500);--chart-3:var(--color-purple-600);--chart-4:var(--color-yellow-500);--chart-5:var(--color-pink-600);--sidebar:var(--color-neutral-900);--sidebar-foreground:var(--color-neutral-50);--sidebar-primary:var(--color-green-500);--sidebar-primary-foreground:#fff;--sidebar-accent:var(--color-neutral-800);--sidebar-accent-foreground:var(--color-neutral-50);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:var(--color-neutral-600);--badge-film-10:#0a0a0a1a;--badge-film-40:#0a0a0a66;--badge-film-60:#0a0a0a99;--badge-film-80:#0a0a0acc}}@property --shimmer-angle{syntax:"<angle>";inherits:true;initial-value:20deg}@property --shimmer-image{syntax:"*";inherits:false}@property --shimmer-text-fill{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){.shimmer{-webkit-text-fill-color:currentColor;background-image:none;animation:none}}@property --scroll-fade-t{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-b{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-s{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-e{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-mask{syntax:"*";inherits:false}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aircall/ds",
3
- "version": "0.21.0",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "sideEffects": [