@ostack.tech/ui 0.9.1 → 0.9.2

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.
Files changed (36) hide show
  1. package/dist/chunks/{en-Dem8nwZz.js → en-GEeEwItR.js} +9 -2
  2. package/dist/chunks/en-GEeEwItR.js.map +1 -0
  3. package/dist/locales/en-GB.js +1 -1
  4. package/dist/locales/en-US.js +1 -1
  5. package/dist/locales/fr-FR.js +8 -1
  6. package/dist/locales/fr-FR.js.map +1 -1
  7. package/dist/locales/pt-PT.js +8 -1
  8. package/dist/locales/pt-PT.js.map +1 -1
  9. package/dist/ostack-ui.css +36 -36
  10. package/dist/ostack-ui.css.map +1 -1
  11. package/dist/ostack-ui.js +1083 -150
  12. package/dist/ostack-ui.js.map +1 -1
  13. package/dist/types/components/Alert/Alert.d.ts +17 -0
  14. package/dist/types/components/Alert/AlertContext.d.ts +8 -0
  15. package/dist/types/components/CommandMenu/CommandMenu.d.ts +1 -1
  16. package/dist/types/components/CommandMenu/CommandMenuGroup.d.ts +1 -1
  17. package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +1 -1
  18. package/dist/types/components/CommandMenu/cmdk/command-score.d.ts +1 -0
  19. package/dist/types/components/CommandMenu/cmdk/index.d.ts +320 -0
  20. package/dist/types/components/Input/Input.d.ts +9 -0
  21. package/dist/types/components/RadioGroup/RadioGroup.d.ts +5 -0
  22. package/dist/types/components/Select/Select.d.ts +6 -2
  23. package/dist/types/components/Select/SelectContext.d.ts +3 -1
  24. package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +3 -1
  25. package/package.json +1 -2
  26. package/scss/components/CommandMenu/_CommandMenu.scss +1 -7
  27. package/scss/components/DropdownMenu/_DropdownMenu.scss +3 -3
  28. package/scss/components/MenuList/_MenuList.scss +3 -3
  29. package/scss/components/Select/_Select-variables.scss +4 -0
  30. package/scss/components/Select/_Select.scss +6 -0
  31. package/scss/components/Tag/_Tag-variables.scss +1 -1
  32. package/scss/scss/placeholders/menu/_menu-variables.scss +24 -15
  33. package/scss/scss/placeholders/menu/_menu.scss +1 -3
  34. package/scss/scss/placeholders/notification/_notification-variables.scss +2 -2
  35. package/scss/scss/placeholders/notification/_notification.scss +1 -0
  36. package/dist/chunks/en-Dem8nwZz.js.map +0 -1
package/dist/ostack-ui.js CHANGED
@@ -1,15 +1,16 @@
1
- import { forwardRef, createContext, useContext, useCallback, useRef, useEffect, useId, useMemo, useState, memo, Fragment as Fragment$1, isValidElement, cloneElement, Children, useImperativeHandle, startTransition, useLayoutEffect as useLayoutEffect$1, createElement, useDeferredValue, useSyncExternalStore } from "react";
1
+ import * as React from "react";
2
+ import { forwardRef, createContext, useContext, useCallback, useRef, useEffect, useId, useMemo, useState, memo, Fragment as Fragment$1, isValidElement, cloneElement, Children, useImperativeHandle, startTransition, useLayoutEffect as useLayoutEffect$2, useDeferredValue, useSyncExternalStore } from "react";
2
3
  import { tinykeys, parseKeybinding } from "tinykeys";
3
4
  import fromExponential from "from-exponential";
4
5
  import { isValid, isDate, addMonths, isAfter, isBefore, startOfMonth, setMonth, getYear, setYear, startOfYear, format, isSameYear, getMonth, max, min, lastDayOfMonth, parseISO, parse, isWithinInterval, isEqual } from "date-fns";
5
- import { createStore, useStore, create } from "zustand";
6
+ import { createStore, useStore as useStore$1, create } from "zustand";
6
7
  import { shallow } from "zustand/shallow";
7
8
  import { removeNumericFormat, numericFormatter, NumericFormat } from "react-number-format";
8
9
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
9
10
  import { faArrowRight, faArrowLeft, faArrowDown, faArrowUp, faClose, faTriangleExclamation, faCircleExclamation, faCircleCheck, faCircleInfo, faChevronUp, faChevronDown, faRedo, faCircleQuestion, faSortDown, faSortUp, faAsterisk, faMinus, faCheck, faFilter, faSearch, faChevronLeft, faChevronRight, faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
10
11
  import { ErrorBoundary as ErrorBoundary$1 } from "react-error-boundary";
11
12
  import { useErrorBoundary } from "react-error-boundary";
12
- import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Slot as Slot$1, Portal as Portal$1, Tooltip as Tooltip$1, Toast as Toast$1, Collapsible as Collapsible$1, Popover as Popover$1, Label as Label$1, Checkbox as Checkbox$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, Separator as Separator$1, Tabs as Tabs$1 } from "radix-ui";
13
+ import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Slot as Slot$1, Portal as Portal$1, Tooltip as Tooltip$1, Toast as Toast$1, Collapsible as Collapsible$1, Popover as Popover$1, Label as Label$1, Checkbox as Checkbox$1, DropdownMenu as DropdownMenu$1, RadioGroup as RadioGroup$1, Separator as Separator$2, Tabs as Tabs$1 } from "radix-ui";
13
14
  import { subscribeWithSelector } from "zustand/middleware";
14
15
  import { I as IS_APPLE } from "./chunks/platformUtils-C3IHCr90.js";
15
16
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -18,7 +19,6 @@ import { locale as locale2 } from "./locales/en-US.js";
18
19
  import { locale as locale3, locale as locale4 } from "./locales/fr-FR.js";
19
20
  import { locale as locale5, locale as locale6 } from "./locales/pt-PT.js";
20
21
  import { useDayPicker, DayPicker } from "react-day-picker";
21
- import { Command } from "cmdk";
22
22
  import { useShallow } from "zustand/react/shallow";
23
23
  import { useVirtualizer, observeElementRect } from "@tanstack/react-virtual";
24
24
  import { faCalendar } from "@fortawesome/free-regular-svg-icons";
@@ -41,7 +41,7 @@ function PrefixProvider({ prefix, children }) {
41
41
  return prefix === void 0 ? children : /* @__PURE__ */ jsx(PrefixContext.Provider, { value: prefix, children });
42
42
  }
43
43
  function usePrefix() {
44
- const defaultPrefix = useStore(
44
+ const defaultPrefix = useStore$1(
45
45
  defaultPrefixStore,
46
46
  ({ defaultPrefix: defaultPrefix2 }) => defaultPrefix2
47
47
  );
@@ -421,7 +421,7 @@ function useCreateDataTableContext({
421
421
  defaultLimit,
422
422
  limit,
423
423
  onLimitChange,
424
- defaultFilter,
424
+ defaultFilter: defaultFilter2,
425
425
  filter,
426
426
  onFilterChange,
427
427
  defaultSortBy,
@@ -470,7 +470,7 @@ function useCreateDataTableContext({
470
470
  () => [get().pageOffset(), get().limit, get().totalCount()],
471
471
  (pageOffset, limit2, totalCount) => totalCount == null ? void 0 : Math.min(totalCount - pageOffset, limit2)
472
472
  ),
473
- filter: filter ?? defaultFilter,
473
+ filter: filter ?? defaultFilter2,
474
474
  sortBy: initialSortBy,
475
475
  sortDirection: sortDirection ?? defaultSortDirection ?? (initialSortBy !== null && columns[initialSortBy].defaultSortDirection || "asc"),
476
476
  selectedRows: [
@@ -851,7 +851,7 @@ function useFieldContext() {
851
851
  return useContext(FieldContext);
852
852
  }
853
853
  function useFieldStore(selector) {
854
- return useStore(useFieldContext() ?? EMPTY_STORE, selector);
854
+ return useStore$1(useFieldContext() ?? EMPTY_STORE, selector);
855
855
  }
856
856
  function useFieldControlId() {
857
857
  return useFieldStore((state) => state.controlId);
@@ -1021,7 +1021,7 @@ function useTableContext() {
1021
1021
  }
1022
1022
  function useTableNumberOfColumns() {
1023
1023
  const { store } = useTableContext();
1024
- return useStore(store, (state) => state.numberOfColumns);
1024
+ return useStore$1(store, (state) => state.numberOfColumns);
1025
1025
  }
1026
1026
  const TableHeadContext = createContext(false);
1027
1027
  function useIsInTableHead() {
@@ -1801,10 +1801,12 @@ const IconButton = forwardRef(function IconButton2({
1801
1801
  ) : button;
1802
1802
  });
1803
1803
  const CloseButton = forwardRef(
1804
- function CloseIconButton({ icon, label, tooltipContent = null, className, ...otherProps }, forwardedRef) {
1804
+ function CloseIconButton({ icon, label, className, ...otherProps }, forwardedRef) {
1805
1805
  const prefix = usePrefix();
1806
1806
  const [locale7] = useLocale();
1807
- label ??= locale7.CloseButton.label;
1807
+ if (label === void 0) {
1808
+ label = locale7.CloseButton.label;
1809
+ }
1808
1810
  return /* @__PURE__ */ jsx(
1809
1811
  IconButton,
1810
1812
  {
@@ -1813,7 +1815,6 @@ const CloseButton = forwardRef(
1813
1815
  circle: true,
1814
1816
  icon: icon ?? faClose,
1815
1817
  label,
1816
- tooltipContent,
1817
1818
  ...otherProps,
1818
1819
  ref: forwardedRef
1819
1820
  }
@@ -2301,7 +2302,7 @@ function useCreateDocumentTitleStore(breadcrumbs) {
2301
2302
  return store;
2302
2303
  }
2303
2304
  function useDocumentTitleStore(selector) {
2304
- return useStore(useContext(DocumentTitleContext) ?? EMPTY_STORE, selector);
2305
+ return useStore$1(useContext(DocumentTitleContext) ?? EMPTY_STORE, selector);
2305
2306
  }
2306
2307
  function DocumentTitle({ title, children }) {
2307
2308
  const context = useContext(DocumentTitleProviderContext);
@@ -2717,11 +2718,11 @@ const CollapsibleContext = createContext(
2717
2718
  null
2718
2719
  );
2719
2720
  function useCollapsibleContext() {
2720
- const dataTableContext = useContext(CollapsibleContext);
2721
- if (!dataTableContext) {
2721
+ const collapsibleContent = useContext(CollapsibleContext);
2722
+ if (!collapsibleContent) {
2722
2723
  throw new Error("Collapsible context not in scope.");
2723
2724
  }
2724
- return dataTableContext;
2725
+ return collapsibleContent;
2725
2726
  }
2726
2727
  const Collapsible = forwardRef(function Collapsible2({
2727
2728
  defaultOpen,
@@ -2774,6 +2775,14 @@ const CollapsibleTrigger = forwardRef(function CollapsibleTrigger2({ children, .
2774
2775
  );
2775
2776
  return /* @__PURE__ */ jsx(Collapsible$1.Trigger, { ...props, asChild: true, ref: forwardedRef, children: typeof children === "function" ? children(open) : children });
2776
2777
  });
2778
+ const AlertContext = createContext(null);
2779
+ function useAlertContext() {
2780
+ const alertContext = useContext(AlertContext);
2781
+ if (!alertContext) {
2782
+ throw new Error("Alert context not in scope.");
2783
+ }
2784
+ return alertContext;
2785
+ }
2777
2786
  const SEVERITY_ICON = {
2778
2787
  neutral: null,
2779
2788
  info: faCircleInfo,
@@ -2784,6 +2793,7 @@ const SEVERITY_ICON = {
2784
2793
  const Alert = forwardRef(function Alert2({
2785
2794
  variant = "subtle",
2786
2795
  severity = "info",
2796
+ announce = "off",
2787
2797
  defaultOpen = true,
2788
2798
  open,
2789
2799
  onOpenChange,
@@ -2798,11 +2808,16 @@ const Alert = forwardRef(function Alert2({
2798
2808
  closeButtonProps,
2799
2809
  children,
2800
2810
  className,
2811
+ role,
2812
+ "aria-label": ariaLabel,
2813
+ "aria-labelledby": ariaLabelledBy,
2801
2814
  ...otherProps
2802
2815
  }, forwardedRef) {
2803
2816
  const prefix = usePrefix();
2817
+ const [titleId, setTitleId] = useState();
2804
2818
  const accent = severity === "info" ? "primary" : severity;
2805
- return /* @__PURE__ */ jsx(
2819
+ const actualRole = role ?? (announce === "assertive" ? "alert" : announce === "polite" ? "status" : void 0);
2820
+ return /* @__PURE__ */ jsx(AlertContext, { value: { setTitleId }, children: /* @__PURE__ */ jsx(
2806
2821
  Collapsible,
2807
2822
  {
2808
2823
  defaultOpen,
@@ -2827,7 +2842,9 @@ const Alert = forwardRef(function Alert2({
2827
2842
  className
2828
2843
  ),
2829
2844
  "data-accent": accent,
2830
- role: "alert",
2845
+ role: actualRole,
2846
+ "aria-label": ariaLabel,
2847
+ "aria-labelledby": ariaLabelledBy ?? (ariaLabel === void 0 && (actualRole === "alert" || actualRole === "status") ? titleId : void 0),
2831
2848
  ...otherProps,
2832
2849
  ref: forwardedRef,
2833
2850
  children: [
@@ -2844,7 +2861,10 @@ const Alert = forwardRef(function Alert2({
2844
2861
  "div",
2845
2862
  {
2846
2863
  ...contentProps,
2847
- className: cx(prefix("alert__content"), contentProps?.className),
2864
+ className: cx(
2865
+ prefix("alert__content"),
2866
+ contentProps?.className
2867
+ ),
2848
2868
  children
2849
2869
  }
2850
2870
  ),
@@ -2880,22 +2900,33 @@ const Alert = forwardRef(function Alert2({
2880
2900
  }
2881
2901
  )
2882
2902
  }
2883
- );
2903
+ ) });
2884
2904
  });
2885
2905
  const AlertTitle = forwardRef(function AlertTitle2({
2886
2906
  as = "div",
2887
2907
  asChild,
2908
+ id,
2888
2909
  className,
2889
2910
  ...otherProps
2890
2911
  }, forwardedRef) {
2891
2912
  const prefix = usePrefix();
2913
+ const generatedId = useId();
2914
+ const actualId = id ?? prefix(`alert-title-${generatedId}`);
2915
+ const { setTitleId } = useAlertContext();
2916
+ const ref = useCallback(
2917
+ (el) => {
2918
+ setTitleId(el ? actualId : void 0);
2919
+ },
2920
+ [actualId, setTitleId]
2921
+ );
2892
2922
  const As = asChild ? Slot : as;
2893
2923
  return /* @__PURE__ */ jsx(
2894
2924
  As,
2895
2925
  {
2926
+ id: actualId,
2896
2927
  className: cx(prefix("alert__title"), className),
2897
2928
  ...otherProps,
2898
- ref: forwardedRef
2929
+ ref: combineEventHandlers(ref, forwardedRef)
2899
2930
  }
2900
2931
  );
2901
2932
  });
@@ -3812,7 +3843,7 @@ const Table = forwardRef(
3812
3843
  );
3813
3844
  function ColumnWidths() {
3814
3845
  const { store } = useTableContext();
3815
- const columnWidths2 = useStore(store, (state) => state.columnWidths);
3846
+ const columnWidths2 = useStore$1(store, (state) => state.columnWidths);
3816
3847
  return columnWidths2 && /* @__PURE__ */ jsx("colgroup", { children: columnWidths2.map((width, i) => /* @__PURE__ */ jsx("col", { style: width != null ? { width } : void 0 }, i)) });
3817
3848
  }
3818
3849
  const TableBody = forwardRef(
@@ -4412,7 +4443,7 @@ const DataTable = forwardRef(
4412
4443
  defaultLimit = 10,
4413
4444
  limit,
4414
4445
  onLimitChange,
4415
- defaultFilter = "",
4446
+ defaultFilter: defaultFilter2 = "",
4416
4447
  filter,
4417
4448
  onFilterChange,
4418
4449
  defaultSortBy = null,
@@ -4463,7 +4494,7 @@ const DataTable = forwardRef(
4463
4494
  defaultLimit,
4464
4495
  limit,
4465
4496
  onLimitChange,
4466
- defaultFilter,
4497
+ defaultFilter: defaultFilter2,
4467
4498
  filter,
4468
4499
  onFilterChange,
4469
4500
  defaultSortBy,
@@ -4659,12 +4690,12 @@ function useCheckboxGroupContext() {
4659
4690
  }
4660
4691
  function useIsCheckedInGroup(checkboxValue) {
4661
4692
  const store = useCheckboxGroupContext()?.store ?? EMPTY_STORE;
4662
- const handleCheckedChange = useStore(
4693
+ const handleCheckedChange = useStore$1(
4663
4694
  store,
4664
4695
  (state) => state.actions?.handleCheckedChange
4665
4696
  );
4666
4697
  return [
4667
- useStore(store, (state) => state.value?.includes(checkboxValue)),
4698
+ useStore$1(store, (state) => state.value?.includes(checkboxValue)),
4668
4699
  useMemo(
4669
4700
  () => handleCheckedChange && ((checked) => handleCheckedChange(checkboxValue, checked)),
4670
4701
  [checkboxValue, handleCheckedChange]
@@ -4675,13 +4706,13 @@ function useIsRequiredInGroup() {
4675
4706
  const context = useCheckboxGroupContext();
4676
4707
  const store = context?.store ?? EMPTY_STORE;
4677
4708
  const required = context?.required;
4678
- return useStore(store, (state) => required && state.value.length === 0);
4709
+ return useStore$1(store, (state) => required && state.value.length === 0);
4679
4710
  }
4680
4711
  function useCheckboxGroupDescriptionIds(checkboxId) {
4681
4712
  const context = useCheckboxGroupContext();
4682
4713
  const store = context?.store ?? EMPTY_STORE;
4683
4714
  const descriptionIds = context?.descriptionIds;
4684
- const isFirstCheckbox = useStore(
4715
+ const isFirstCheckbox = useStore$1(
4685
4716
  store,
4686
4717
  (state) => state.firstCheckboxId === checkboxId
4687
4718
  );
@@ -5071,16 +5102,16 @@ const DATA_TABLE_SELECTION_COLUMN_WIDTH = 42;
5071
5102
  function useDataTableSelectionColumn() {
5072
5103
  const prefix = usePrefix();
5073
5104
  const { displayMode, rowKey, showSelectionColumn, store } = useDataTableContext();
5074
- const [selectedRows] = useStore(store, (state) => state.selectedRows);
5075
- const disabledSelections = useStore(
5105
+ const [selectedRows] = useStore$1(store, (state) => state.selectedRows);
5106
+ const disabledSelections = useStore$1(
5076
5107
  store,
5077
5108
  (state) => state.disabledSelections
5078
5109
  );
5079
- const { selectRows, unselectRows } = useStore(
5110
+ const { selectRows, unselectRows } = useStore$1(
5080
5111
  store,
5081
5112
  (state) => state.actions
5082
5113
  );
5083
- const allCheckedStatus = useStore(
5114
+ const allCheckedStatus = useStore$1(
5084
5115
  store,
5085
5116
  useShallow((state) => {
5086
5117
  if (state.loading || !showSelectionColumn) {
@@ -5174,7 +5205,7 @@ const DataTableRow = memo(
5174
5205
  const { rowKey, renderCell, generatedId, estimatedRowHeight, store } = useDataTableContext();
5175
5206
  const selectionColumn = useDataTableSelectionColumn();
5176
5207
  const dataTableSelectionColumnId = useDataTableSelectionColumnId();
5177
- const leafColumns2 = useStore(
5208
+ const leafColumns2 = useStore$1(
5178
5209
  store,
5179
5210
  useShallow(
5180
5211
  (state) => selectionColumn ? {
@@ -5183,9 +5214,9 @@ const DataTableRow = memo(
5183
5214
  } : state.leafColumns
5184
5215
  )
5185
5216
  );
5186
- const headCount = useStore(store, (state) => state.headCount);
5187
- const filter = useStore(store, (state) => state.filter);
5188
- const selected = useStore(
5217
+ const headCount = useStore$1(store, (state) => state.headCount);
5218
+ const filter = useStore$1(store, (state) => state.filter);
5219
+ const selected = useStore$1(
5189
5220
  store,
5190
5221
  (state) => row && state.selectedRows[0].has(getRowKey(row, rowKey))
5191
5222
  );
@@ -5274,8 +5305,8 @@ function DataTableEmptyOrLoadingRows({
5274
5305
  }) {
5275
5306
  const prefix = usePrefix();
5276
5307
  const { showSelectionColumn, renderRow, store, apiRef } = useDataTableContext();
5277
- const loading = useStore(store, (state) => state.loading);
5278
- const loadingCount = useStore(store, (state) => state.loadingCount);
5308
+ const loading = useStore$1(store, (state) => state.loading);
5309
+ const loadingCount = useStore$1(store, (state) => state.loadingCount);
5279
5310
  const numberOfColumns2 = (useTableNumberOfColumns() ?? 1) + (showSelectionColumn ? 1 : 0);
5280
5311
  useImperativeHandle(
5281
5312
  apiRef,
@@ -5339,11 +5370,11 @@ function PagedDataTableRows() {
5339
5370
  ),
5340
5371
  [goTo, store]
5341
5372
  );
5342
- const pageOffset = useStore(
5373
+ const pageOffset = useStore$1(
5343
5374
  store,
5344
5375
  (state) => showAllRows ? 0 : state.pageOffset()
5345
5376
  );
5346
- const rowsWindow = useStore(
5377
+ const rowsWindow = useStore$1(
5347
5378
  store,
5348
5379
  useShallow(
5349
5380
  (state) => state.rowsWindow(
@@ -5370,8 +5401,8 @@ function ScrolledDataTableRows({
5370
5401
  apiRef,
5371
5402
  store
5372
5403
  } = useDataTableContext();
5373
- const tableHeadHeight = useStore(store, (state) => state.tableHeadHeight);
5374
- const bodyCount = useStore(store, (state) => state.bodyCount());
5404
+ const tableHeadHeight = useStore$1(store, (state) => state.tableHeadHeight);
5405
+ const bodyCount = useStore$1(store, (state) => state.bodyCount());
5375
5406
  const virtualizer = useVirtualizer({
5376
5407
  count: bodyCount,
5377
5408
  getScrollElement: useCallback(() => scrollableRef.current, [scrollableRef]),
@@ -5462,7 +5493,7 @@ function ScrolledDataTableRows({
5462
5493
  const virtualItems = virtualizer.getVirtualItems();
5463
5494
  const firstVirtualItem = virtualItems[0];
5464
5495
  const lastVirtualItem = virtualItems[virtualItems.length - 1];
5465
- const rowsWindow = useStore(
5496
+ const rowsWindow = useStore$1(
5466
5497
  store,
5467
5498
  useShallow(
5468
5499
  (state) => state.rowsWindow(firstVirtualItem?.index ?? 0, virtualItems.length)
@@ -5524,7 +5555,7 @@ function ScrolledDataTableRows({
5524
5555
  }
5525
5556
  const DataTableBody = forwardRef(function DataTableBody2({ emptyMessage, emptyMessageProps, scrollableRef, ...otherProps }, forwardedRef) {
5526
5557
  const { displayMode, store } = useDataTableContext();
5527
- const isEmptyOrLoading = useStore(
5558
+ const isEmptyOrLoading = useStore$1(
5528
5559
  store,
5529
5560
  (state) => state.loading || state.totalCount() === 0
5530
5561
  );
@@ -5539,10 +5570,10 @@ const DataTableBody = forwardRef(function DataTableBody2({ emptyMessage, emptyMe
5539
5570
  !isEmptyOrLoading && (displayMode === "paged" ? /* @__PURE__ */ jsx(PagedDataTableRows, {}) : /* @__PURE__ */ jsx(ScrolledDataTableRows, { scrollableRef }))
5540
5571
  ] });
5541
5572
  });
5542
- const useLayoutEffect = typeof document !== "undefined" ? useLayoutEffect$1 : () => {
5573
+ const useLayoutEffect$1 = typeof document !== "undefined" ? useLayoutEffect$2 : () => {
5543
5574
  };
5544
5575
  function useMeasure(element, setMeasurement) {
5545
- useLayoutEffect(() => {
5576
+ useLayoutEffect$1(() => {
5546
5577
  if (!element) {
5547
5578
  setMeasurement(void 0);
5548
5579
  return;
@@ -5560,7 +5591,7 @@ function useMeasure(element, setMeasurement) {
5560
5591
  }
5561
5592
  const DataTableFoot = forwardRef(function DataTableFoot2({ showWhenEmpty, ...otherProps }, forwardedRef) {
5562
5593
  const { store } = useDataTableContext();
5563
- const shouldShow = useStore(
5594
+ const shouldShow = useStore$1(
5564
5595
  store,
5565
5596
  (state) => showWhenEmpty || !state.loading && (state.totalCount() ?? 0) > 0
5566
5597
  );
@@ -5579,7 +5610,7 @@ const DataTableHead = forwardRef(function DataTableHead2({ rowProps, ...otherPro
5579
5610
  const { generatedId, store } = useDataTableContext();
5580
5611
  const selectionColumn = useDataTableSelectionColumn();
5581
5612
  const dataTableSelectionColumnId = useDataTableSelectionColumnId();
5582
- const columns = useStore(
5613
+ const columns = useStore$1(
5583
5614
  store,
5584
5615
  useShallow(
5585
5616
  (state) => selectionColumn ? {
@@ -5588,9 +5619,9 @@ const DataTableHead = forwardRef(function DataTableHead2({ rowProps, ...otherPro
5588
5619
  } : state.columns
5589
5620
  )
5590
5621
  );
5591
- const sortBy = useStore(store, (state) => state.sortBy);
5592
- const sortDirection = useStore(store, (state) => state.sortDirection);
5593
- const { setSort } = useStore(store, (state) => state.actions);
5622
+ const sortBy = useStore$1(store, (state) => state.sortBy);
5623
+ const sortDirection = useStore$1(store, (state) => state.sortDirection);
5624
+ const { setSort } = useStore$1(store, (state) => state.actions);
5594
5625
  const [tableHeadEl, setTableHeadEl] = useState(null);
5595
5626
  useMeasure(
5596
5627
  tableHeadEl,
@@ -5678,7 +5709,7 @@ const DataTableContent = forwardRef(function DataTable2({
5678
5709
  const scrollableRef = useRef(null);
5679
5710
  const { height: scrollbarHeight } = useScrollbarSize();
5680
5711
  const rowHeight = typeof estimatedRowHeight === "number" ? estimatedRowHeight : estimatedRowHeight(0);
5681
- const maxHeight = useStore(
5712
+ const maxHeight = useStore$1(
5682
5713
  store,
5683
5714
  (state) => displayMode === "scrolled" && !state.loading && (state.totalCount() ?? 0) > state.limit ? (state.tableHeadHeight ?? rowHeight) + (state.tableFootHeight ?? 0) + rowHeight * state.limit + // TODO: Only add this if the container overflows horizontally
5684
5715
  scrollbarHeight : void 0
@@ -5755,12 +5786,12 @@ const DataTableFilter = forwardRef(function DataTableFilter2({
5755
5786
  ariaLabel ??= locale7.DataTableFilter["aria-label"];
5756
5787
  placeholder ??= locale7.DataTableFilter.placeholder;
5757
5788
  const { store } = useDataTableContext();
5758
- const filter = useStore(store, (state) => state.filter);
5789
+ const filter = useStore$1(store, (state) => state.filter);
5759
5790
  const handleFilterChange = (value) => {
5760
5791
  startTransition(() => store.getState().actions.setFilter(value));
5761
5792
  };
5762
5793
  return /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsx(
5763
- Input,
5794
+ Input$1,
5764
5795
  {
5765
5796
  placeholder,
5766
5797
  showClearButton: "auto",
@@ -5794,11 +5825,11 @@ const PagedDataTablePagination = forwardRef(function PagedDataTablePagination2({
5794
5825
  }, forwardedRef) {
5795
5826
  const prefix = usePrefix();
5796
5827
  const { store } = useDataTableContext();
5797
- const totalCount = useStore(store, (state) => state.totalCount());
5798
- const limit = useStore(store, (state) => state.limit);
5799
- const { setOffset } = useStore(store, (state) => state.actions);
5828
+ const totalCount = useStore$1(store, (state) => state.totalCount());
5829
+ const limit = useStore$1(store, (state) => state.limit);
5830
+ const { setOffset } = useStore$1(store, (state) => state.actions);
5800
5831
  const setOffsetWithTransition = (offset) => startTransition(() => setOffset(offset));
5801
- const currentPage = useStore(store, (state) => state.currentPage());
5832
+ const currentPage = useStore$1(store, (state) => state.currentPage());
5802
5833
  const numberOfPages = Math.ceil((totalCount ?? 0) / limit);
5803
5834
  const lastPage = Math.max(0, numberOfPages - 1);
5804
5835
  return /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsxs(
@@ -5872,12 +5903,12 @@ const PagedDataTablePagination = forwardRef(function PagedDataTablePagination2({
5872
5903
  const ScrolledDataTablePagination = forwardRef(function ScrolledDataTablePagination2({ rowsRange, preferRightAlignment, className, ...otherProps }, forwardedRef) {
5873
5904
  const prefix = usePrefix();
5874
5905
  const { store } = useDataTableContext();
5875
- const totalCount = useStore(store, (state) => state.totalCount());
5876
- const scrolledRangeStart = useStore(
5906
+ const totalCount = useStore$1(store, (state) => state.totalCount());
5907
+ const scrolledRangeStart = useStore$1(
5877
5908
  store,
5878
5909
  (state) => state.scrolledRangeStart
5879
5910
  );
5880
- const scrolledRangeEnd = useStore(store, (state) => state.scrolledRangeEnd);
5911
+ const scrolledRangeEnd = useStore$1(store, (state) => state.scrolledRangeEnd);
5881
5912
  return /* @__PURE__ */ jsxs(
5882
5913
  "div",
5883
5914
  {
@@ -5947,8 +5978,8 @@ const DataTableRowsPerPage = forwardRef(function DataTableRowsPerPage2({
5947
5978
  const [locale7] = useLocale();
5948
5979
  label ??= locale7.DataTableRowsPerPage.label;
5949
5980
  const { store } = useDataTableContext();
5950
- const limit = useStore(store, (state) => state.limit);
5951
- const { setLimit } = useStore(store, (state) => state.actions);
5981
+ const limit = useStore$1(store, (state) => state.limit);
5982
+ const { setLimit } = useStore$1(store, (state) => state.actions);
5952
5983
  const optionsIncludingLimit = limitOptions.includes(limit) ? [...limitOptions] : [...limitOptions, limit];
5953
5984
  optionsIncludingLimit.sort((v1, v2) => v1 - v2);
5954
5985
  const selectId = prefix(`data-table-rows-per-page-${useId()}`);
@@ -5999,7 +6030,7 @@ const DataTableSelectionTrigger = forwardRef(function DataTableSelectionTrigger2
5999
6030
  }, forwardedRef) {
6000
6031
  const prefix = usePrefix();
6001
6032
  const { store } = useDataTableContext();
6002
- const hasSelected = useStore(store, (state) => state.selectedRows.length > 0);
6033
+ const hasSelected = useStore$1(store, (state) => state.selectedRows.length > 0);
6003
6034
  const handleClick = useCallback(
6004
6035
  (event) => {
6005
6036
  onClick(Array.from(store.getState().selectedRows[0]).sort(), event);
@@ -6023,7 +6054,7 @@ const DataTableSelectionTrigger = forwardRef(function DataTableSelectionTrigger2
6023
6054
  const REQUIRED_TAGS = ["INPUT", "SELECT", "TEXTAREA"];
6024
6055
  const READ_ONLY_TAGS = ["INPUT", "TEXTAREA"];
6025
6056
  const NON_READONLY_INPUT_TYPES = ["file", "color"];
6026
- const Input = forwardRef(
6057
+ const Input$1 = forwardRef(
6027
6058
  function Input2({
6028
6059
  asChild,
6029
6060
  type,
@@ -6039,6 +6070,7 @@ const Input = forwardRef(
6039
6070
  startAdornment,
6040
6071
  endAdornment,
6041
6072
  showClearButton,
6073
+ clearDescription,
6042
6074
  clearButtonLabel,
6043
6075
  onValueChange,
6044
6076
  onBlurToOutside,
@@ -6163,6 +6195,7 @@ const Input = forwardRef(
6163
6195
  }
6164
6196
  }, [inputEl]);
6165
6197
  const hasClearButton = !disabled && !loading && !readOnly && (showClearButton === true || showClearButton === "auto" && (isControlled ? (value?.toString() ?? "")?.length > 0 : shouldShowClearButton));
6198
+ const clearDescriptionId = hasClearButton && clearDescription && prefix(`control-clear-${generatedId}`);
6166
6199
  const { cssVars, dataAttrs } = responsiveValuesToCssVarsAndDataAttrs(
6167
6200
  "control",
6168
6201
  { align }
@@ -6263,7 +6296,8 @@ const Input = forwardRef(
6263
6296
  loadingDescriptionId,
6264
6297
  errorMessageIds,
6265
6298
  ariaDescribedBy,
6266
- descriptionIds
6299
+ descriptionIds,
6300
+ clearDescriptionId
6267
6301
  ),
6268
6302
  ...otherProps,
6269
6303
  ref: combinedInputRef
@@ -6318,13 +6352,14 @@ const Input = forwardRef(
6318
6352
  )
6319
6353
  }
6320
6354
  ),
6321
- loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
6355
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription }),
6356
+ clearDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: clearDescriptionId, children: clearDescription })
6322
6357
  ] });
6323
6358
  }
6324
6359
  );
6325
6360
  const InputWithContainerRef = forwardRef(function InputWithContainerRef2({ inputRef, containerProps, ...otherProps }, forwardedRef) {
6326
6361
  return /* @__PURE__ */ jsx(
6327
- Input,
6362
+ Input$1,
6328
6363
  {
6329
6364
  containerProps: {
6330
6365
  ...containerProps,
@@ -6549,6 +6584,852 @@ const MenuListItem = forwardRef(
6549
6584
  );
6550
6585
  }
6551
6586
  );
6587
+ var SCORE_CONTINUE_MATCH = 1, SCORE_SPACE_WORD_JUMP = 0.9, SCORE_NON_SPACE_WORD_JUMP = 0.8, SCORE_CHARACTER_JUMP = 0.17, SCORE_TRANSPOSITION = 0.1, PENALTY_SKIPPED = 0.999, PENALTY_CASE_MISMATCH = 0.9999, PENALTY_NOT_COMPLETE = 0.99;
6588
+ var IS_GAP_REGEXP = /[\\\/_+.#"@\[\(\{&]/, COUNT_GAPS_REGEXP = /[\\\/_+.#"@\[\(\{&]/g, IS_SPACE_REGEXP = /[\s-]/, COUNT_SPACE_REGEXP = /[\s-]/g;
6589
+ function commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex, memoizedResults) {
6590
+ if (abbreviationIndex === abbreviation.length) {
6591
+ if (stringIndex === string.length) {
6592
+ return SCORE_CONTINUE_MATCH;
6593
+ }
6594
+ return PENALTY_NOT_COMPLETE;
6595
+ }
6596
+ var memoizeKey = `${stringIndex},${abbreviationIndex}`;
6597
+ if (memoizedResults[memoizeKey] !== void 0) {
6598
+ return memoizedResults[memoizeKey];
6599
+ }
6600
+ var abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex);
6601
+ var index = lowerString.indexOf(abbreviationChar, stringIndex);
6602
+ var highScore = 0;
6603
+ var score, transposedScore, wordBreaks, spaceBreaks;
6604
+ while (index >= 0) {
6605
+ score = commandScoreInner(
6606
+ string,
6607
+ abbreviation,
6608
+ lowerString,
6609
+ lowerAbbreviation,
6610
+ index + 1,
6611
+ abbreviationIndex + 1,
6612
+ memoizedResults
6613
+ );
6614
+ if (score > highScore) {
6615
+ if (index === stringIndex) {
6616
+ score *= SCORE_CONTINUE_MATCH;
6617
+ } else if (IS_GAP_REGEXP.test(string.charAt(index - 1))) {
6618
+ score *= SCORE_NON_SPACE_WORD_JUMP;
6619
+ wordBreaks = string.slice(stringIndex, index - 1).match(COUNT_GAPS_REGEXP);
6620
+ if (wordBreaks && stringIndex > 0) {
6621
+ score *= Math.pow(PENALTY_SKIPPED, wordBreaks.length);
6622
+ }
6623
+ } else if (IS_SPACE_REGEXP.test(string.charAt(index - 1))) {
6624
+ score *= SCORE_SPACE_WORD_JUMP;
6625
+ spaceBreaks = string.slice(stringIndex, index - 1).match(COUNT_SPACE_REGEXP);
6626
+ if (spaceBreaks && stringIndex > 0) {
6627
+ score *= Math.pow(PENALTY_SKIPPED, spaceBreaks.length);
6628
+ }
6629
+ } else {
6630
+ score *= SCORE_CHARACTER_JUMP;
6631
+ if (stringIndex > 0) {
6632
+ score *= Math.pow(PENALTY_SKIPPED, index - stringIndex);
6633
+ }
6634
+ }
6635
+ if (string.charAt(index) !== abbreviation.charAt(abbreviationIndex)) {
6636
+ score *= PENALTY_CASE_MISMATCH;
6637
+ }
6638
+ }
6639
+ if (score < SCORE_TRANSPOSITION && lowerString.charAt(index - 1) === lowerAbbreviation.charAt(abbreviationIndex + 1) || lowerAbbreviation.charAt(abbreviationIndex + 1) === lowerAbbreviation.charAt(abbreviationIndex) && // allow duplicate letters. Ref #7428
6640
+ lowerString.charAt(index - 1) !== lowerAbbreviation.charAt(abbreviationIndex)) {
6641
+ transposedScore = commandScoreInner(
6642
+ string,
6643
+ abbreviation,
6644
+ lowerString,
6645
+ lowerAbbreviation,
6646
+ index + 1,
6647
+ abbreviationIndex + 2,
6648
+ memoizedResults
6649
+ );
6650
+ if (transposedScore * SCORE_TRANSPOSITION > score) {
6651
+ score = transposedScore * SCORE_TRANSPOSITION;
6652
+ }
6653
+ }
6654
+ if (score > highScore) {
6655
+ highScore = score;
6656
+ }
6657
+ index = lowerString.indexOf(abbreviationChar, index + 1);
6658
+ }
6659
+ memoizedResults[memoizeKey] = highScore;
6660
+ return highScore;
6661
+ }
6662
+ function formatInput(string) {
6663
+ return string.toLowerCase().replace(COUNT_SPACE_REGEXP, " ");
6664
+ }
6665
+ function commandScore(string, abbreviation, aliases) {
6666
+ string = aliases && aliases.length > 0 ? `${string + " " + aliases.join(" ")}` : string;
6667
+ return commandScoreInner(
6668
+ string,
6669
+ abbreviation,
6670
+ formatInput(string),
6671
+ formatInput(abbreviation),
6672
+ 0,
6673
+ 0,
6674
+ {}
6675
+ );
6676
+ }
6677
+ const GROUP_SELECTOR = `[cmdk-group=""]`;
6678
+ const GROUP_ITEMS_SELECTOR = `[cmdk-group-items=""]`;
6679
+ const GROUP_HEADING_SELECTOR = `[cmdk-group-heading=""]`;
6680
+ const ITEM_SELECTOR = `[cmdk-item=""]`;
6681
+ const VALID_ITEM_SELECTOR = `${ITEM_SELECTOR}:not([aria-disabled="true"])`;
6682
+ const SELECT_EVENT = `cmdk-item-select`;
6683
+ const VALUE_ATTR = `data-value`;
6684
+ const defaultFilter = (value, search, keywords) => commandScore(value, search, keywords);
6685
+ const CommandContext = React.createContext(void 0);
6686
+ const useCommand = () => React.useContext(CommandContext);
6687
+ const StoreContext = React.createContext(void 0);
6688
+ const useStore = () => React.useContext(StoreContext);
6689
+ const GroupContext = React.createContext(void 0);
6690
+ const Command = React.forwardRef(
6691
+ (props, forwardedRef) => {
6692
+ const state = useLazyRef(() => ({
6693
+ /** Value of the search query. */
6694
+ search: "",
6695
+ /** Currently selected item value. */
6696
+ value: props.value ?? props.defaultValue ?? "",
6697
+ /** Currently selected item id. */
6698
+ selectedItemId: void 0,
6699
+ filtered: {
6700
+ /** The count of all visible items. */
6701
+ count: 0,
6702
+ /** Map from visible item id to its search score. */
6703
+ items: /* @__PURE__ */ new Map(),
6704
+ /** Set of groups with at least one visible item. */
6705
+ groups: /* @__PURE__ */ new Set()
6706
+ }
6707
+ }));
6708
+ const allItems = useLazyRef(() => /* @__PURE__ */ new Set());
6709
+ const allGroups = useLazyRef(() => /* @__PURE__ */ new Map());
6710
+ const ids = useLazyRef(
6711
+ () => /* @__PURE__ */ new Map()
6712
+ );
6713
+ const listeners = useLazyRef(() => /* @__PURE__ */ new Set());
6714
+ const propsRef = useAsRef(props);
6715
+ const {
6716
+ asChild,
6717
+ label,
6718
+ children,
6719
+ value,
6720
+ onValueChange,
6721
+ filter,
6722
+ shouldFilter,
6723
+ loop,
6724
+ disablePointerSelection = false,
6725
+ ...etc
6726
+ } = props;
6727
+ const listId = React.useId();
6728
+ const labelId = React.useId();
6729
+ const inputId = React.useId();
6730
+ const listInnerRef = React.useRef(null);
6731
+ const schedule = useScheduleLayoutEffect();
6732
+ useLayoutEffect(() => {
6733
+ if (value !== void 0) {
6734
+ const v = value.trim();
6735
+ state.current.value = v;
6736
+ store.emit();
6737
+ }
6738
+ }, [value]);
6739
+ useLayoutEffect(() => {
6740
+ setTimeout(() => {
6741
+ schedule(6, scrollSelectedIntoView);
6742
+ });
6743
+ }, []);
6744
+ const store = React.useMemo(() => {
6745
+ return {
6746
+ subscribe: (cb) => {
6747
+ listeners.current.add(cb);
6748
+ return () => listeners.current.delete(cb);
6749
+ },
6750
+ snapshot: () => {
6751
+ return state.current;
6752
+ },
6753
+ setState: (key, value2, opts) => {
6754
+ if (Object.is(state.current[key], value2)) return;
6755
+ state.current[key] = value2;
6756
+ if (key === "search") {
6757
+ filterItems();
6758
+ sort();
6759
+ schedule(1, selectFirstItem);
6760
+ } else if (key === "value") {
6761
+ if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
6762
+ const input = document.getElementById(inputId);
6763
+ if (input) input.focus();
6764
+ else document.getElementById(listId)?.focus();
6765
+ }
6766
+ schedule(7, () => {
6767
+ state.current.selectedItemId = opts.id;
6768
+ store.emit();
6769
+ });
6770
+ if (!opts.disableScrollIntoView) {
6771
+ schedule(5, () => scrollSelectedIntoView(opts.id));
6772
+ }
6773
+ if (propsRef.current?.value !== void 0) {
6774
+ const newValue = value2 ?? "";
6775
+ propsRef.current.onValueChange?.(newValue);
6776
+ return;
6777
+ }
6778
+ }
6779
+ store.emit();
6780
+ },
6781
+ emit: () => {
6782
+ listeners.current.forEach((l) => l());
6783
+ }
6784
+ };
6785
+ }, []);
6786
+ const context = React.useMemo(
6787
+ () => ({
6788
+ // Keep id → {value, keywords} mapping up-to-date
6789
+ value: (id, value2, keywords) => {
6790
+ if (value2 !== ids.current.get(id)?.value) {
6791
+ ids.current.set(id, { value: value2, keywords });
6792
+ state.current.filtered.items.set(id, score(value2, keywords));
6793
+ schedule(2, () => {
6794
+ sort();
6795
+ store.emit();
6796
+ });
6797
+ }
6798
+ },
6799
+ // Track item lifecycle (mount, unmount)
6800
+ item: (id, groupId) => {
6801
+ allItems.current.add(id);
6802
+ if (groupId) {
6803
+ if (!allGroups.current.has(groupId)) {
6804
+ allGroups.current.set(groupId, /* @__PURE__ */ new Set([id]));
6805
+ } else {
6806
+ allGroups.current.get(groupId).add(id);
6807
+ }
6808
+ }
6809
+ schedule(3, () => {
6810
+ filterItems();
6811
+ sort();
6812
+ if (!state.current.value) {
6813
+ selectFirstItem();
6814
+ }
6815
+ store.emit();
6816
+ });
6817
+ return () => {
6818
+ ids.current.delete(id);
6819
+ allItems.current.delete(id);
6820
+ state.current.filtered.items.delete(id);
6821
+ const selectedItem = getSelectedItem();
6822
+ schedule(4, () => {
6823
+ filterItems();
6824
+ if (selectedItem?.getAttribute("id") === id) selectFirstItem();
6825
+ store.emit();
6826
+ });
6827
+ };
6828
+ },
6829
+ // Track group lifecycle (mount, unmount)
6830
+ group: (id) => {
6831
+ if (!allGroups.current.has(id)) {
6832
+ allGroups.current.set(id, /* @__PURE__ */ new Set());
6833
+ }
6834
+ return () => {
6835
+ ids.current.delete(id);
6836
+ allGroups.current.delete(id);
6837
+ };
6838
+ },
6839
+ filter: () => {
6840
+ return propsRef.current.shouldFilter;
6841
+ },
6842
+ label: label || props["aria-label"],
6843
+ getDisablePointerSelection: () => {
6844
+ return propsRef.current.disablePointerSelection;
6845
+ },
6846
+ listId,
6847
+ inputId,
6848
+ labelId,
6849
+ listInnerRef
6850
+ }),
6851
+ []
6852
+ );
6853
+ function score(value2, keywords) {
6854
+ const filter2 = propsRef.current?.filter ?? defaultFilter;
6855
+ return value2 ? filter2(value2, state.current.search, keywords) : 0;
6856
+ }
6857
+ function sort() {
6858
+ if (!state.current.search || // Explicitly false, because true | undefined is the default
6859
+ propsRef.current.shouldFilter === false) {
6860
+ return;
6861
+ }
6862
+ const scores = state.current.filtered.items;
6863
+ const groups = [];
6864
+ state.current.filtered.groups.forEach((value2) => {
6865
+ const items = allGroups.current.get(value2);
6866
+ let max2 = 0;
6867
+ items.forEach((item) => {
6868
+ const score2 = scores.get(item);
6869
+ max2 = Math.max(score2, max2);
6870
+ });
6871
+ groups.push([value2, max2]);
6872
+ });
6873
+ const listInsertionElement = listInnerRef.current;
6874
+ getValidItems().sort((a, b) => {
6875
+ const valueA = a.getAttribute("id");
6876
+ const valueB = b.getAttribute("id");
6877
+ return (scores.get(valueB) ?? 0) - (scores.get(valueA) ?? 0);
6878
+ }).forEach((item) => {
6879
+ const group = item.closest(GROUP_ITEMS_SELECTOR);
6880
+ if (group) {
6881
+ group.appendChild(
6882
+ item.parentElement === group ? item : item.closest(`${GROUP_ITEMS_SELECTOR} > *`)
6883
+ );
6884
+ } else {
6885
+ listInsertionElement.appendChild(
6886
+ item.parentElement === listInsertionElement ? item : item.closest(`${GROUP_ITEMS_SELECTOR} > *`)
6887
+ );
6888
+ }
6889
+ });
6890
+ groups.sort((a, b) => b[1] - a[1]).forEach((group) => {
6891
+ const element = listInnerRef.current?.querySelector(
6892
+ `${GROUP_SELECTOR}[${VALUE_ATTR}="${encodeURIComponent(group[0])}"]`
6893
+ );
6894
+ element?.parentElement.appendChild(element);
6895
+ });
6896
+ }
6897
+ function selectFirstItem() {
6898
+ const item = getValidItems().find(
6899
+ (item2) => item2.getAttribute("aria-disabled") !== "true"
6900
+ );
6901
+ const value2 = item?.getAttribute(VALUE_ATTR);
6902
+ store.setState("value", value2 || void 0, {
6903
+ id: item?.getAttribute("id")
6904
+ });
6905
+ }
6906
+ function filterItems() {
6907
+ if (!state.current.search || // Explicitly false, because true | undefined is the default
6908
+ propsRef.current.shouldFilter === false) {
6909
+ state.current.filtered.count = allItems.current.size;
6910
+ return;
6911
+ }
6912
+ state.current.filtered.groups = /* @__PURE__ */ new Set();
6913
+ let itemCount = 0;
6914
+ for (const id of allItems.current) {
6915
+ const value2 = ids.current.get(id)?.value ?? "";
6916
+ const keywords = ids.current.get(id)?.keywords ?? [];
6917
+ const rank = score(value2, keywords);
6918
+ state.current.filtered.items.set(id, rank);
6919
+ if (rank > 0) itemCount++;
6920
+ }
6921
+ for (const [groupId, group] of allGroups.current) {
6922
+ for (const itemId of group) {
6923
+ if (state.current.filtered.items.get(itemId) > 0) {
6924
+ state.current.filtered.groups.add(groupId);
6925
+ break;
6926
+ }
6927
+ }
6928
+ }
6929
+ state.current.filtered.count = itemCount;
6930
+ }
6931
+ function scrollSelectedIntoView(itemId) {
6932
+ const item = itemId ? document.getElementById(itemId) : getSelectedItem();
6933
+ if (item) {
6934
+ if (item.parentElement?.firstChild === item) {
6935
+ item.closest(GROUP_SELECTOR)?.querySelector(GROUP_HEADING_SELECTOR)?.scrollIntoView({ block: "nearest" });
6936
+ }
6937
+ item.scrollIntoView({ block: "nearest" });
6938
+ }
6939
+ }
6940
+ function getSelectedItem() {
6941
+ return listInnerRef.current?.querySelector(
6942
+ `${ITEM_SELECTOR}[data-selected]`
6943
+ );
6944
+ }
6945
+ function getValidItems() {
6946
+ return Array.from(
6947
+ listInnerRef.current?.querySelectorAll(VALID_ITEM_SELECTOR) || []
6948
+ );
6949
+ }
6950
+ function updateSelectedToIndex(index) {
6951
+ const items = getValidItems();
6952
+ const item = items[index];
6953
+ if (item)
6954
+ store.setState("value", item.getAttribute(VALUE_ATTR), {
6955
+ id: item.getAttribute("id")
6956
+ });
6957
+ }
6958
+ function updateSelectedByItem(change) {
6959
+ const selected = getSelectedItem();
6960
+ const items = getValidItems();
6961
+ const index = selected ? items.findIndex((item) => item === selected) : -1;
6962
+ let newIndex = index === -1 ? change > 0 ? 0 : items.length - 1 : index + change;
6963
+ if (propsRef.current?.loop) {
6964
+ newIndex = newIndex < 0 ? items.length - 1 : newIndex >= items.length ? 0 : newIndex;
6965
+ } else {
6966
+ newIndex = Math.max(0, Math.min(newIndex, items.length - 1));
6967
+ }
6968
+ let newSelected = items[newIndex];
6969
+ if (newSelected)
6970
+ store.setState("value", newSelected.getAttribute(VALUE_ATTR), {
6971
+ id: newSelected.getAttribute("id")
6972
+ });
6973
+ }
6974
+ function updateSelectedByGroup(change) {
6975
+ const selected = getSelectedItem();
6976
+ let group = selected?.closest(GROUP_SELECTOR);
6977
+ let item;
6978
+ while (group && !item) {
6979
+ group = change > 0 ? findNextSibling(group, GROUP_SELECTOR) : findPreviousSibling(group, GROUP_SELECTOR);
6980
+ item = group?.querySelector(VALID_ITEM_SELECTOR);
6981
+ }
6982
+ if (item) {
6983
+ store.setState("value", item.getAttribute(VALUE_ATTR), {
6984
+ id: item.getAttribute("id")
6985
+ });
6986
+ } else {
6987
+ updateSelectedByItem(change);
6988
+ }
6989
+ }
6990
+ const last = () => updateSelectedToIndex(getValidItems().length - 1);
6991
+ const next = (e) => {
6992
+ e.preventDefault();
6993
+ if (e.metaKey) {
6994
+ last();
6995
+ } else if (e.altKey) {
6996
+ updateSelectedByGroup(1);
6997
+ } else {
6998
+ updateSelectedByItem(1);
6999
+ }
7000
+ };
7001
+ const prev = (e) => {
7002
+ e.preventDefault();
7003
+ if (e.metaKey) {
7004
+ updateSelectedToIndex(0);
7005
+ } else if (e.altKey) {
7006
+ updateSelectedByGroup(-1);
7007
+ } else {
7008
+ updateSelectedByItem(-1);
7009
+ }
7010
+ };
7011
+ const As = asChild ? Slot : "div";
7012
+ return /* @__PURE__ */ jsxs(
7013
+ As,
7014
+ {
7015
+ ref: forwardedRef,
7016
+ tabIndex: -1,
7017
+ ...etc,
7018
+ "cmdk-root": "",
7019
+ onKeyDown: (e) => {
7020
+ etc.onKeyDown?.(e);
7021
+ const isComposing = e.nativeEvent.isComposing || e.keyCode === 229;
7022
+ if (e.defaultPrevented || isComposing) {
7023
+ return;
7024
+ }
7025
+ switch (e.key) {
7026
+ case "ArrowDown": {
7027
+ next(e);
7028
+ break;
7029
+ }
7030
+ case "ArrowUp": {
7031
+ prev(e);
7032
+ break;
7033
+ }
7034
+ case "Home": {
7035
+ e.preventDefault();
7036
+ updateSelectedToIndex(0);
7037
+ break;
7038
+ }
7039
+ case "End": {
7040
+ e.preventDefault();
7041
+ last();
7042
+ break;
7043
+ }
7044
+ case "Enter": {
7045
+ e.preventDefault();
7046
+ const item = getSelectedItem();
7047
+ if (item) {
7048
+ const event = new Event(SELECT_EVENT);
7049
+ item.dispatchEvent(event);
7050
+ }
7051
+ }
7052
+ }
7053
+ },
7054
+ children: [
7055
+ /* @__PURE__ */ jsx(
7056
+ "label",
7057
+ {
7058
+ "cmdk-label": "",
7059
+ htmlFor: context.inputId,
7060
+ id: context.labelId,
7061
+ style: srOnlyStyles,
7062
+ children: label
7063
+ }
7064
+ ),
7065
+ SlottableWithNestedChildren(props, (child) => /* @__PURE__ */ jsx(StoreContext.Provider, { value: store, children: /* @__PURE__ */ jsx(CommandContext.Provider, { value: context, children: child }) }))
7066
+ ]
7067
+ }
7068
+ );
7069
+ }
7070
+ );
7071
+ const Item = React.forwardRef(
7072
+ (props, forwardedRef) => {
7073
+ const id = React.useId();
7074
+ const ref = React.useRef(null);
7075
+ const groupContext = React.useContext(GroupContext);
7076
+ const context = useCommand();
7077
+ const propsRef = useAsRef(props);
7078
+ const forceMount = propsRef.current?.forceMount ?? groupContext?.forceMount;
7079
+ useLayoutEffect(() => {
7080
+ if (!forceMount) {
7081
+ return context.item(id, groupContext?.id);
7082
+ }
7083
+ }, [forceMount]);
7084
+ const value = useValue(
7085
+ id,
7086
+ ref,
7087
+ [props.value, props.children, ref],
7088
+ props.keywords
7089
+ );
7090
+ const store = useStore();
7091
+ const selected = useCmdk(
7092
+ (state) => state.value && state.value === value.current
7093
+ );
7094
+ const render = useCmdk(
7095
+ (state) => forceMount ? true : context.filter() === false ? true : !state.search ? true : state.filtered.items.get(id) > 0
7096
+ );
7097
+ React.useEffect(() => {
7098
+ const element = ref.current;
7099
+ if (!element || props.disabled) return;
7100
+ element.addEventListener(SELECT_EVENT, onSelect);
7101
+ return () => element.removeEventListener(SELECT_EVENT, onSelect);
7102
+ }, [render, props.onSelect, props.disabled]);
7103
+ function onSelect() {
7104
+ select();
7105
+ propsRef.current.onSelect?.(value.current);
7106
+ }
7107
+ function select() {
7108
+ store.setState("value", value.current, {
7109
+ id,
7110
+ disableScrollIntoView: true
7111
+ });
7112
+ }
7113
+ const combinedRef = useCombinedRef(ref, forwardedRef);
7114
+ if (!render) return null;
7115
+ const {
7116
+ asChild,
7117
+ disabled,
7118
+ value: _,
7119
+ onSelect: __,
7120
+ forceMount: ___,
7121
+ keywords: ____,
7122
+ ...etc
7123
+ } = props;
7124
+ const As = asChild ? Slot : "div";
7125
+ return /* @__PURE__ */ jsx(
7126
+ As,
7127
+ {
7128
+ ref: combinedRef,
7129
+ id,
7130
+ "cmdk-item": "",
7131
+ role: "option",
7132
+ "aria-disabled": Boolean(disabled) || void 0,
7133
+ "aria-selected": Boolean(selected) || void 0,
7134
+ "data-disabled": boolDataAttr(disabled),
7135
+ "data-selected": boolDataAttr(selected),
7136
+ ...etc,
7137
+ onPointerMove: disabled || context.getDisablePointerSelection() ? void 0 : select,
7138
+ onClick: disabled ? void 0 : onSelect,
7139
+ children: props.children
7140
+ }
7141
+ );
7142
+ }
7143
+ );
7144
+ const Group = React.forwardRef(
7145
+ (props, forwardedRef) => {
7146
+ const { asChild, heading, children, forceMount, ...etc } = props;
7147
+ const id = React.useId();
7148
+ const ref = React.useRef(null);
7149
+ const headingRef = React.useRef(null);
7150
+ const headingId = React.useId();
7151
+ const context = useCommand();
7152
+ const render = useCmdk(
7153
+ (state) => forceMount ? true : context.filter() === false ? true : !state.search ? true : state.filtered.groups.has(id)
7154
+ );
7155
+ useLayoutEffect(() => {
7156
+ return context.group(id);
7157
+ }, []);
7158
+ useValue(id, ref, [props.value, props.heading, headingRef]);
7159
+ const contextValue = React.useMemo(
7160
+ () => ({ id, forceMount }),
7161
+ [forceMount]
7162
+ );
7163
+ const combinedRef = useCombinedRef(ref, forwardedRef);
7164
+ const As = asChild ? Slot : "div";
7165
+ return /* @__PURE__ */ jsxs(
7166
+ As,
7167
+ {
7168
+ ref: combinedRef,
7169
+ "cmdk-group": "",
7170
+ role: "presentation",
7171
+ hidden: render ? void 0 : true,
7172
+ ...etc,
7173
+ children: [
7174
+ heading && /* @__PURE__ */ jsx(
7175
+ "div",
7176
+ {
7177
+ ref: headingRef,
7178
+ "cmdk-group-heading": "",
7179
+ "aria-hidden": true,
7180
+ id: headingId,
7181
+ children: heading
7182
+ }
7183
+ ),
7184
+ SlottableWithNestedChildren(props, (child) => /* @__PURE__ */ jsx(
7185
+ "div",
7186
+ {
7187
+ "cmdk-group-items": "",
7188
+ role: "group",
7189
+ "aria-labelledby": heading ? headingId : void 0,
7190
+ children: /* @__PURE__ */ jsx(GroupContext.Provider, { value: contextValue, children: child })
7191
+ }
7192
+ ))
7193
+ ]
7194
+ }
7195
+ );
7196
+ }
7197
+ );
7198
+ const Separator$1 = React.forwardRef(
7199
+ (props, forwardedRef) => {
7200
+ const { asChild, alwaysRender, ...etc } = props;
7201
+ const ref = React.useRef(null);
7202
+ const render = useCmdk((state) => !state.search);
7203
+ const combinedRef = useCombinedRef(ref, forwardedRef);
7204
+ if (!alwaysRender && !render) return null;
7205
+ const As = asChild ? Slot : "div";
7206
+ return /* @__PURE__ */ jsx(As, { ref: combinedRef, "cmdk-separator": "", role: "separator", ...etc });
7207
+ }
7208
+ );
7209
+ const Input = React.forwardRef(
7210
+ (props, forwardedRef) => {
7211
+ const { asChild, onValueChange, ...etc } = props;
7212
+ const isControlled = props.value != null;
7213
+ const store = useStore();
7214
+ const search = useCmdk((state) => state.search);
7215
+ const selectedItemId = useCmdk((state) => state.selectedItemId);
7216
+ const context = useCommand();
7217
+ React.useEffect(() => {
7218
+ if (props.value != null) {
7219
+ store.setState("search", props.value);
7220
+ }
7221
+ }, [props.value]);
7222
+ const As = asChild ? Slot : "input";
7223
+ return /* @__PURE__ */ jsx(
7224
+ As,
7225
+ {
7226
+ ref: forwardedRef,
7227
+ "cmdk-input": "",
7228
+ autoComplete: "off",
7229
+ autoCorrect: "off",
7230
+ spellCheck: false,
7231
+ "aria-autocomplete": "list",
7232
+ role: "combobox",
7233
+ "aria-expanded": true,
7234
+ "aria-controls": context.listId,
7235
+ "aria-labelledby": context.labelId,
7236
+ "aria-activedescendant": selectedItemId,
7237
+ id: context.inputId,
7238
+ type: "text",
7239
+ value: isControlled ? props.value : search,
7240
+ ...etc,
7241
+ onChange: (e) => {
7242
+ if (!isControlled) {
7243
+ store.setState("search", e.target.value);
7244
+ }
7245
+ onValueChange?.(e.target.value);
7246
+ }
7247
+ }
7248
+ );
7249
+ }
7250
+ );
7251
+ const List = React.forwardRef(
7252
+ (props, forwardedRef) => {
7253
+ const { asChild, children, label = "Suggestions", ...etc } = props;
7254
+ const ref = React.useRef(null);
7255
+ const height = React.useRef(null);
7256
+ const selectedItemId = useCmdk((state) => state.selectedItemId);
7257
+ const context = useCommand();
7258
+ React.useEffect(() => {
7259
+ if (height.current && ref.current) {
7260
+ const el = height.current;
7261
+ const wrapper = ref.current;
7262
+ let animationFrame;
7263
+ const observer = new ResizeObserver(() => {
7264
+ animationFrame = requestAnimationFrame(() => {
7265
+ const height2 = el.offsetHeight;
7266
+ wrapper.style.setProperty(
7267
+ `--cmdk-list-height`,
7268
+ height2.toFixed(1) + "px"
7269
+ );
7270
+ });
7271
+ });
7272
+ observer.observe(el);
7273
+ return () => {
7274
+ cancelAnimationFrame(animationFrame);
7275
+ observer.unobserve(el);
7276
+ };
7277
+ }
7278
+ }, []);
7279
+ const combinedRef = useCombinedRef(ref, forwardedRef);
7280
+ const combinedListSizerRef = useCombinedRef(height, context.listInnerRef);
7281
+ const As = asChild ? Slot : "div";
7282
+ return /* @__PURE__ */ jsx(
7283
+ As,
7284
+ {
7285
+ ref: combinedRef,
7286
+ "cmdk-list": "",
7287
+ role: "listbox",
7288
+ tabIndex: -1,
7289
+ "aria-activedescendant": selectedItemId,
7290
+ "aria-label": label,
7291
+ id: context.listId,
7292
+ ...etc,
7293
+ children: SlottableWithNestedChildren(props, (child) => /* @__PURE__ */ jsx("div", { ref: combinedListSizerRef, "cmdk-list-sizer": "", children: child }))
7294
+ }
7295
+ );
7296
+ }
7297
+ );
7298
+ const Empty = React.forwardRef(
7299
+ (props, forwardedRef) => {
7300
+ const render = useCmdk((state) => state.filtered.count === 0);
7301
+ if (!render) return null;
7302
+ const { asChild, ...etc } = props;
7303
+ const As = asChild ? Slot : "div";
7304
+ return /* @__PURE__ */ jsx(As, { ref: forwardedRef, "cmdk-empty": "", role: "presentation", ...etc });
7305
+ }
7306
+ );
7307
+ const Loading = React.forwardRef(
7308
+ (props, forwardedRef) => {
7309
+ const { asChild, progress, children, label = "Loading...", ...etc } = props;
7310
+ const As = asChild ? Slot : "div";
7311
+ return /* @__PURE__ */ jsx(
7312
+ As,
7313
+ {
7314
+ ref: forwardedRef,
7315
+ "cmdk-loading": "",
7316
+ role: "progressbar",
7317
+ "aria-valuenow": progress,
7318
+ "aria-valuemin": 0,
7319
+ "aria-valuemax": 100,
7320
+ "aria-label": label,
7321
+ ...etc,
7322
+ children: SlottableWithNestedChildren(props, (child) => /* @__PURE__ */ jsx("div", { "aria-hidden": true, children: child }))
7323
+ }
7324
+ );
7325
+ }
7326
+ );
7327
+ const pkg = Object.assign(Command, {
7328
+ List,
7329
+ Item,
7330
+ Input,
7331
+ Group,
7332
+ Separator: Separator$1,
7333
+ Empty,
7334
+ Loading
7335
+ });
7336
+ function findNextSibling(el, selector) {
7337
+ let sibling = el.nextElementSibling;
7338
+ while (sibling) {
7339
+ if (sibling.matches(selector)) return sibling;
7340
+ sibling = sibling.nextElementSibling;
7341
+ }
7342
+ }
7343
+ function findPreviousSibling(el, selector) {
7344
+ let sibling = el.previousElementSibling;
7345
+ while (sibling) {
7346
+ if (sibling.matches(selector)) return sibling;
7347
+ sibling = sibling.previousElementSibling;
7348
+ }
7349
+ }
7350
+ function useAsRef(data) {
7351
+ const ref = React.useRef(data);
7352
+ useLayoutEffect(() => {
7353
+ ref.current = data;
7354
+ });
7355
+ return ref;
7356
+ }
7357
+ const useLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
7358
+ function useLazyRef(fn) {
7359
+ const ref = React.useRef();
7360
+ if (ref.current === void 0) {
7361
+ ref.current = fn();
7362
+ }
7363
+ return ref;
7364
+ }
7365
+ function useCmdk(selector) {
7366
+ const store = useStore();
7367
+ const cb = () => selector(store.snapshot());
7368
+ return React.useSyncExternalStore(store.subscribe, cb, cb);
7369
+ }
7370
+ function useValue(id, ref, deps, aliases = []) {
7371
+ const valueRef = React.useRef();
7372
+ const context = useCommand();
7373
+ useLayoutEffect(() => {
7374
+ const value = (() => {
7375
+ for (const part of deps) {
7376
+ if (typeof part === "string") {
7377
+ return part.trim();
7378
+ }
7379
+ if (typeof part === "object" && "current" in part) {
7380
+ if (part.current) {
7381
+ return part.current.textContent?.trim();
7382
+ }
7383
+ return valueRef.current;
7384
+ }
7385
+ }
7386
+ })();
7387
+ const keywords = aliases.map((alias) => alias.trim());
7388
+ context.value(id, value, keywords);
7389
+ ref.current?.setAttribute(VALUE_ATTR, value);
7390
+ valueRef.current = value;
7391
+ });
7392
+ return valueRef;
7393
+ }
7394
+ const useScheduleLayoutEffect = () => {
7395
+ const [s, ss] = React.useState();
7396
+ const fns = useLazyRef(() => /* @__PURE__ */ new Map());
7397
+ useLayoutEffect(() => {
7398
+ fns.current.forEach((f) => f());
7399
+ fns.current = /* @__PURE__ */ new Map();
7400
+ }, [s]);
7401
+ return (id, cb) => {
7402
+ fns.current.set(id, cb);
7403
+ ss({});
7404
+ };
7405
+ };
7406
+ function renderChildren(children) {
7407
+ const childrenType = children.type;
7408
+ if (typeof childrenType === "function") return childrenType(children.props);
7409
+ else if ("render" in childrenType) return childrenType.render(children.props);
7410
+ else return children;
7411
+ }
7412
+ function SlottableWithNestedChildren({ asChild, children }, render) {
7413
+ if (asChild && React.isValidElement(children)) {
7414
+ return React.cloneElement(
7415
+ renderChildren(children),
7416
+ { ref: children.ref },
7417
+ render(children.props.children)
7418
+ );
7419
+ }
7420
+ return render(children);
7421
+ }
7422
+ const srOnlyStyles = {
7423
+ position: "absolute",
7424
+ width: "1px",
7425
+ height: "1px",
7426
+ padding: "0",
7427
+ margin: "-1px",
7428
+ overflow: "hidden",
7429
+ clip: "rect(0, 0, 0, 0)",
7430
+ whiteSpace: "nowrap",
7431
+ borderWidth: "0"
7432
+ };
6552
7433
  const CommandMenu = forwardRef(
6553
7434
  function CommandMenu2({
6554
7435
  variant,
@@ -6602,7 +7483,7 @@ const CommandMenu = forwardRef(
6602
7483
  }
6603
7484
  );
6604
7485
  return /* @__PURE__ */ jsxs(
6605
- Command,
7486
+ pkg,
6606
7487
  {
6607
7488
  label,
6608
7489
  className: cx(prefix("command-menu"), className),
@@ -6610,13 +7491,13 @@ const CommandMenu = forwardRef(
6610
7491
  ref: forwardedRef,
6611
7492
  children: [
6612
7493
  /* @__PURE__ */ jsx(
6613
- Command.Input,
7494
+ pkg.Input,
6614
7495
  {
6615
7496
  asChild: true,
6616
7497
  value: searchValue,
6617
7498
  onValueChange: onSearchValueChange,
6618
7499
  children: /* @__PURE__ */ jsx(
6619
- Input,
7500
+ Input$1,
6620
7501
  {
6621
7502
  variant: "cell",
6622
7503
  placeholder: searchPlaceholder,
@@ -6651,9 +7532,9 @@ const CommandMenu = forwardRef(
6651
7532
  variant,
6652
7533
  iconPlacement,
6653
7534
  asChild: true,
6654
- children: /* @__PURE__ */ jsxs(Command.List, { label: listLabel, children: [
7535
+ children: /* @__PURE__ */ jsxs(pkg.List, { label: listLabel, children: [
6655
7536
  loading && /* @__PURE__ */ jsx(
6656
- Command.Loading,
7537
+ pkg.Loading,
6657
7538
  {
6658
7539
  label: loadingLabel,
6659
7540
  progress: loadingProgress,
@@ -6674,7 +7555,7 @@ const CommandMenu = forwardRef(
6674
7555
  }
6675
7556
  ),
6676
7557
  !loading && /* @__PURE__ */ jsx(
6677
- Command.Empty,
7558
+ pkg.Empty,
6678
7559
  {
6679
7560
  ...emptyMessageProps,
6680
7561
  className: cx(
@@ -6763,7 +7644,7 @@ const CommandMenuDialog = forwardRef(function CommandMenuDialog2({
6763
7644
  const CommandMenuGroup = forwardRef(function CommandMenuGroup2({ label, className, ...otherProps }, forwardedRef) {
6764
7645
  const prefix = usePrefix();
6765
7646
  return /* @__PURE__ */ jsx(
6766
- Command.Group,
7647
+ pkg.Group,
6767
7648
  {
6768
7649
  ...otherProps,
6769
7650
  heading: label,
@@ -6839,7 +7720,7 @@ const CommandMenuItem = forwardRef(function CommandMenuItem2({
6839
7720
  keybindsProps,
6840
7721
  asChild: true,
6841
7722
  children: /* @__PURE__ */ jsx(
6842
- Command.Item,
7723
+ pkg.Item,
6843
7724
  {
6844
7725
  disabled,
6845
7726
  ...otherProps,
@@ -6861,6 +7742,7 @@ function useCreateSelectContext({
6861
7742
  status,
6862
7743
  disabled,
6863
7744
  readOnly,
7745
+ valueTagCloseButtonLabel,
6864
7746
  valueTagProps
6865
7747
  }) {
6866
7748
  const store = useConstant(
@@ -6891,6 +7773,7 @@ function useCreateSelectContext({
6891
7773
  status,
6892
7774
  disabled,
6893
7775
  readOnly,
7776
+ valueTagCloseButtonLabel,
6894
7777
  valueTagProps,
6895
7778
  store
6896
7779
  }),
@@ -6902,6 +7785,7 @@ function useCreateSelectContext({
6902
7785
  status,
6903
7786
  store,
6904
7787
  value,
7788
+ valueTagCloseButtonLabel,
6905
7789
  valueTagProps
6906
7790
  ]
6907
7791
  );
@@ -6933,7 +7817,7 @@ const Option = memo(
6933
7817
  onOptionSelect,
6934
7818
  store
6935
7819
  } = useSelectContext();
6936
- const { registerOption, unregisterOption } = useStore(
7820
+ const { registerOption, unregisterOption } = useStore$1(
6937
7821
  store,
6938
7822
  (state) => state.actions
6939
7823
  );
@@ -6962,7 +7846,7 @@ const Option = memo(
6962
7846
  value: textValue,
6963
7847
  onSelect: onOptionSelect,
6964
7848
  selected,
6965
- "aria-checked": selected,
7849
+ "aria-selected": selected || void 0,
6966
7850
  disabled,
6967
7851
  color,
6968
7852
  icon: selected ? faCheck : void 0,
@@ -7042,7 +7926,8 @@ const Tag = forwardRef(function Tag2({
7042
7926
  {
7043
7927
  ...containerProps,
7044
7928
  className: cx(prefix("tag__container"), containerProps?.className),
7045
- children: /* @__PURE__ */ jsxs(
7929
+ asChild: true,
7930
+ children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(
7046
7931
  As,
7047
7932
  {
7048
7933
  className: cx(
@@ -7080,7 +7965,7 @@ const Tag = forwardRef(function Tag2({
7080
7965
  ) })
7081
7966
  ]
7082
7967
  }
7083
- )
7968
+ ) })
7084
7969
  }
7085
7970
  )
7086
7971
  }
@@ -7095,10 +7980,11 @@ function SelectMultipleValue() {
7095
7980
  status,
7096
7981
  disabled,
7097
7982
  readOnly,
7983
+ valueTagCloseButtonLabel,
7098
7984
  valueTagProps,
7099
7985
  store
7100
7986
  } = useSelectContext();
7101
- useStore(store, (state) => state.actions.getOptionState(value));
7987
+ useStore$1(store, (state) => state.actions.getOptionState(value));
7102
7988
  const handleCloseValueTag = useCallback(
7103
7989
  (tagValue, evt) => {
7104
7990
  evt.preventDefault();
@@ -7110,7 +7996,7 @@ function SelectMultipleValue() {
7110
7996
  () => Array.from(new Set(value)),
7111
7997
  [value]
7112
7998
  );
7113
- const valuesOptionStates = useStore(
7999
+ const valuesOptionStates = useStore$1(
7114
8000
  store,
7115
8001
  useShallow(
7116
8002
  (state) => valuesToRender.map((v) => state.actions.getOptionState(v))
@@ -7124,57 +8010,65 @@ function SelectMultipleValue() {
7124
8010
  [valuesOptionStates]
7125
8011
  );
7126
8012
  const valuesTags = useMemo(
7127
- () => valuesToRender.map((v, i) => {
7128
- const optionState = valuesOptionStates[i];
7129
- return optionState && /* @__PURE__ */ createElement(
7130
- Tag,
7131
- {
7132
- variant: "subtle",
7133
- ...valueTagProps,
7134
- showCloseButton: !optionState.disabled,
7135
- closeButtonProps: {
7136
- asChild: true,
7137
- children: /* @__PURE__ */ jsx("span", {}),
7138
- type: void 0,
7139
- tabIndex: -1,
7140
- role: "button",
7141
- disabled,
7142
- "data-disabled": disabled ? "" : void 0,
7143
- // Prevent element from gaining focus
7144
- onMouseDown: (evt) => evt.preventDefault(),
7145
- onClick: (evt) => handleCloseValueTag(v, evt),
7146
- ...valueTagProps?.closeButtonProps
7147
- },
7148
- key: v,
7149
- color: optionState.color ?? controlStatusToAccent(status, "primary"),
7150
- className: cx(
7151
- prefix("select__value-tag"),
7152
- valueTagProps?.className
7153
- ),
7154
- containerProps: {
7155
- className: cx(
7156
- prefix("select__value-tag-container"),
7157
- valueTagProps?.containerProps?.className
7158
- ),
7159
- ...valueTagProps?.containerProps
7160
- },
7161
- contentProps: {
8013
+ () => intersperse(
8014
+ valuesToRender.map((v, i) => {
8015
+ const optionState = valuesOptionStates[i];
8016
+ return optionState && /* @__PURE__ */ jsx(
8017
+ Tag,
8018
+ {
8019
+ variant: "subtle",
8020
+ ...valueTagProps,
8021
+ showCloseButton: !optionState.disabled,
8022
+ closeButtonProps: {
8023
+ label: null,
8024
+ tooltipContent: valueTagCloseButtonLabel,
8025
+ asChild: true,
8026
+ children: /* @__PURE__ */ jsx("span", {}),
8027
+ type: void 0,
8028
+ disabled,
8029
+ "data-disabled": boolDataAttr(disabled),
8030
+ // Prevent element from gaining focus
8031
+ onMouseDown: (evt) => evt.preventDefault(),
8032
+ onClick: (evt) => handleCloseValueTag(v, evt),
8033
+ // Override collapsible aria properties
8034
+ "aria-controls": void 0,
8035
+ "aria-expanded": void 0,
8036
+ // Override tooltip aria properties
8037
+ "aria-describedby": void 0,
8038
+ ...valueTagProps?.closeButtonProps
8039
+ },
8040
+ color: optionState.color ?? controlStatusToAccent(status, "primary"),
7162
8041
  className: cx(
7163
- prefix("select__value-tag-content"),
7164
- valueTagProps?.contentProps?.className
8042
+ prefix("select__value-tag"),
8043
+ valueTagProps?.className
7165
8044
  ),
7166
- ...valueTagProps?.contentProps
8045
+ containerProps: {
8046
+ className: cx(
8047
+ prefix("select__value-tag-container"),
8048
+ valueTagProps?.containerProps?.className
8049
+ ),
8050
+ ...valueTagProps?.containerProps
8051
+ },
8052
+ contentProps: {
8053
+ className: cx(
8054
+ prefix("select__value-tag-content"),
8055
+ valueTagProps?.contentProps?.className
8056
+ ),
8057
+ ...valueTagProps?.contentProps
8058
+ },
8059
+ children: optionState.content
7167
8060
  },
7168
- "aria-hidden": true
7169
- },
7170
- optionState.content
7171
- );
7172
- }),
8061
+ v
8062
+ );
8063
+ }),
8064
+ (i) => /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " }, `separator-${i}`)
8065
+ ),
7173
8066
  [
7174
8067
  disabled,
7175
8068
  handleCloseValueTag,
7176
8069
  prefix,
7177
8070
  status,
8071
+ valueTagCloseButtonLabel,
7178
8072
  valueTagProps,
7179
8073
  valuesOptionStates,
7180
8074
  valuesToRender
@@ -7182,15 +8076,12 @@ function SelectMultipleValue() {
7182
8076
  );
7183
8077
  return /* @__PURE__ */ jsxs(Fragment, { children: [
7184
8078
  valuesToRender.length > 0 && readOnly && valuesList,
7185
- valuesToRender.length > 0 && !readOnly && /* @__PURE__ */ jsxs(Fragment, { children: [
7186
- /* @__PURE__ */ jsx(VisuallyHidden, { children: valuesList }),
7187
- valuesTags
7188
- ] })
8079
+ valuesToRender.length > 0 && !readOnly && valuesTags
7189
8080
  ] });
7190
8081
  }
7191
8082
  function SelectSingleValue() {
7192
8083
  const { value, store } = useSelectContext();
7193
- return useStore(
8084
+ return useStore$1(
7194
8085
  store,
7195
8086
  (state) => state.actions.getOptionState(value)?.content
7196
8087
  );
@@ -7219,12 +8110,15 @@ const Select = forwardRef(function Select2({
7219
8110
  startAdornment,
7220
8111
  endAdornment,
7221
8112
  showClearButton = "auto",
8113
+ clearDescription,
8114
+ searchLabel,
7222
8115
  optionsLabel,
7223
8116
  loadingOptions,
7224
8117
  loadingOptionsLabel,
7225
8118
  loadingOptionsProgress,
7226
8119
  showSpinner = loading || loadingOptions,
7227
8120
  emptyMessage,
8121
+ valueTagCloseButtonLabel,
7228
8122
  valueTagMaxWidth,
7229
8123
  onKeyDown,
7230
8124
  onBlurToOutside,
@@ -7240,17 +8134,27 @@ const Select = forwardRef(function Select2({
7240
8134
  popoverProps,
7241
8135
  commandMenuProps,
7242
8136
  style,
8137
+ "aria-label": ariaLabel,
8138
+ "aria-labelledby": ariaLabelledBy,
7243
8139
  children,
7244
8140
  ...otherProps
7245
8141
  }, forwardedRef) {
7246
8142
  const prefix = usePrefix();
8143
+ const { cssVarStyle } = useCssVars();
7247
8144
  const [locale7] = useLocale();
8145
+ placeholder ??= locale7.Select.placeholder;
8146
+ searchLabel ??= locale7.Select.searchLabel;
7248
8147
  searchPlaceholder ??= locale7.Select.searchPlaceholder;
7249
8148
  emptyMessage ??= locale7.Select.emptyMessage;
8149
+ valueTagCloseButtonLabel ??= locale7.Select.valueTagCloseButtonLabel;
7250
8150
  optionsLabel ??= locale7.Select.optionsLabel;
7251
8151
  loadingOptionsLabel ??= locale7.Select.loadingOptionsLabel;
7252
- const { cssVarStyle } = useCssVars();
8152
+ clearDescription ??= locale7.Select.clearDescription;
7253
8153
  const labelId = useFieldLabelId();
8154
+ const dataTableColumnLabelId = useDataTableColumnLabelId();
8155
+ const generatedId = useId();
8156
+ const codeId = code ? codeProps?.id ?? prefix(`select-code-${generatedId}`) : void 0;
8157
+ const valueId = valueProps?.id ?? prefix(`select-value-${generatedId}`);
7254
8158
  const { printHidden } = usePrintClassNames();
7255
8159
  const [open, setOpen] = useControllableState(
7256
8160
  defaultOpen ?? false,
@@ -7271,6 +8175,7 @@ const Select = forwardRef(function Select2({
7271
8175
  const isEmpty = multiple ? actualValue.length === 0 : actualValue === "";
7272
8176
  const buttonRef = useRef(null);
7273
8177
  const popoverRef = useRef(null);
8178
+ const searchRef = useRef(null);
7274
8179
  const handleContainerPointerDown = useCallback(
7275
8180
  (evt) => {
7276
8181
  evt.preventDefault();
@@ -7288,6 +8193,11 @@ const Select = forwardRef(function Select2({
7288
8193
  const newValue = actualValue.includes(optionValue) ? actualValue.filter((v) => v !== optionValue) : [...actualValue, optionValue];
7289
8194
  setValue(newValue);
7290
8195
  onValueChange?.(newValue);
8196
+ if (open) {
8197
+ searchRef.current?.focus();
8198
+ } else {
8199
+ buttonRef.current?.focus();
8200
+ }
7291
8201
  } else {
7292
8202
  if (optionValue !== actualValue) {
7293
8203
  setValue(optionValue);
@@ -7303,6 +8213,7 @@ const Select = forwardRef(function Select2({
7303
8213
  multiple,
7304
8214
  onSearchValueChange,
7305
8215
  onValueChange,
8216
+ open,
7306
8217
  setOpen,
7307
8218
  setSearchValue,
7308
8219
  setValue
@@ -7347,6 +8258,7 @@ const Select = forwardRef(function Select2({
7347
8258
  status,
7348
8259
  disabled: disabled || loading,
7349
8260
  readOnly,
8261
+ valueTagCloseButtonLabel,
7350
8262
  valueTagProps
7351
8263
  });
7352
8264
  const registeringOptionsSelectContext = useMemo(
@@ -7360,6 +8272,10 @@ const Select = forwardRef(function Select2({
7360
8272
  );
7361
8273
  const combinedButtonRef = useCombinedRef(buttonRef, forwardedRef);
7362
8274
  const combinedPopoverRef = useCombinedRef(popoverRef, popoverProps?.ref);
8275
+ const combinedSearchRef = useCombinedRef(
8276
+ searchRef,
8277
+ commandMenuProps?.searchProps?.ref
8278
+ );
7363
8279
  return /* @__PURE__ */ jsxs(SelectContext.Provider, { value: selectContext, children: [
7364
8280
  /* @__PURE__ */ jsx(SelectContext.Provider, { value: registeringOptionsSelectContext, children }),
7365
8281
  /* @__PURE__ */ jsxs(
@@ -7372,8 +8288,6 @@ const Select = forwardRef(function Select2({
7372
8288
  PopoverTrigger,
7373
8289
  {
7374
8290
  className: cx(prefix("select"), className),
7375
- role: "combobox",
7376
- "aria-autocomplete": "none",
7377
8291
  "data-multiple": boolDataAttr(multiple),
7378
8292
  "data-limit-value-tags-width": boolDataAttr(valueTagMaxWidth != null),
7379
8293
  onKeyDown: combineEventHandlers(onKeyDown, handleKeyDown),
@@ -7417,9 +8331,10 @@ const Select = forwardRef(function Select2({
7417
8331
  endAdornment
7418
8332
  ] }),
7419
8333
  showClearButton: showClearButton === "auto" ? !isEmpty : showClearButton,
8334
+ clearDescription,
7420
8335
  onBlurToOutside: handleControlBlur,
7421
8336
  rootProps,
7422
- codeProps,
8337
+ codeProps: { ...codeProps, id: codeId },
7423
8338
  containerProps: {
7424
8339
  // Propagate open state to container for styling purposes
7425
8340
  ...{ "data-state": showOpen ? "open" : "closed" },
@@ -7446,6 +8361,13 @@ const Select = forwardRef(function Select2({
7446
8361
  ),
7447
8362
  ref: combinedClearButtonRef
7448
8363
  },
8364
+ ...open ? {} : { "aria-controls": void 0 },
8365
+ "aria-label": ariaLabel,
8366
+ "aria-labelledby": ariaLabelledBy ?? (ariaLabel === void 0 ? combineAriaIds(
8367
+ codeId,
8368
+ labelId ?? dataTableColumnLabelId,
8369
+ valueId
8370
+ ) : void 0),
7449
8371
  spinnerProps: {
7450
8372
  ...spinnerProps,
7451
8373
  className: cx(prefix("select__spinner"), spinnerProps?.className)
@@ -7455,8 +8377,10 @@ const Select = forwardRef(function Select2({
7455
8377
  "span",
7456
8378
  {
7457
8379
  ...valueProps,
8380
+ id: valueId,
7458
8381
  className: cx(prefix("select__value"), valueProps?.className),
7459
8382
  children: [
8383
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " }),
7460
8384
  isEmpty && placeholder,
7461
8385
  !isEmpty && !multiple && /* @__PURE__ */ jsx(SelectSingleValue, {}),
7462
8386
  !isEmpty && multiple && /* @__PURE__ */ jsx(SelectMultipleValue, {})
@@ -7489,6 +8413,7 @@ const Select = forwardRef(function Select2({
7489
8413
  ...commandMenuProps,
7490
8414
  searchPlaceholder,
7491
8415
  emptyMessage,
8416
+ label: searchLabel,
7492
8417
  listLabel: optionsLabel,
7493
8418
  loading: loadingOptions,
7494
8419
  loadingLabel: loadingOptionsLabel,
@@ -7499,7 +8424,10 @@ const Select = forwardRef(function Select2({
7499
8424
  onSearchValueChange,
7500
8425
  setSearchValue
7501
8426
  ),
7502
- searchProps: { "aria-labelledby": labelId },
8427
+ searchProps: {
8428
+ ...commandMenuProps?.searchProps,
8429
+ ref: combinedSearchRef
8430
+ },
7503
8431
  listProps: {
7504
8432
  "aria-multiselectable": multiple ? true : void 0,
7505
8433
  ...commandMenuProps?.listProps
@@ -10056,7 +10984,7 @@ const Feedback = forwardRef(
10056
10984
  const [locale7] = useLocale();
10057
10985
  visuallyHiddenPrefix ??= locale7.Feedback.visuallyHiddenPrefix;
10058
10986
  const { onAddFeedback, onRemoveFeedback } = useFeedbackPopoverContext() ?? {};
10059
- useLayoutEffect(() => {
10987
+ useLayoutEffect$1(() => {
10060
10988
  onAddFeedback?.(type);
10061
10989
  return () => onRemoveFeedback?.(type);
10062
10990
  }, [onAddFeedback, onRemoveFeedback, type]);
@@ -10674,7 +11602,7 @@ const NumericInput = forwardRef(function NumericInput2({
10674
11602
  thousandSeparator: groupDigits ? groupSeparator : "",
10675
11603
  isAllowed,
10676
11604
  allowNegative,
10677
- customInput: Input,
11605
+ customInput: Input$1,
10678
11606
  getInputRef: forwardedRef,
10679
11607
  ...otherProps
10680
11608
  }
@@ -10747,7 +11675,7 @@ const Output = forwardRef(
10747
11675
  }, forwardedRef) {
10748
11676
  const prefix = usePrefix();
10749
11677
  return /* @__PURE__ */ jsx(
10750
- Input,
11678
+ Input$1,
10751
11679
  {
10752
11680
  showSpinner,
10753
11681
  "aria-busy": pending || void 0,
@@ -10892,6 +11820,7 @@ const RadioGroup = forwardRef(function RadioGroup2({
10892
11820
  showSpinner = loading,
10893
11821
  code,
10894
11822
  showClearButton,
11823
+ clearDescription,
10895
11824
  clearButtonLabel,
10896
11825
  onBlurToOutside,
10897
11826
  codeProps,
@@ -10917,6 +11846,7 @@ const RadioGroup = forwardRef(function RadioGroup2({
10917
11846
  const [locale7] = useLocale();
10918
11847
  loadingDescription ??= locale7.Input.loadingDescription;
10919
11848
  clearButtonLabel ??= locale7.Input.clearButtonLabel;
11849
+ clearDescription ??= locale7.RadioGroup.clearDescription;
10920
11850
  const labelId = useFieldLabelId();
10921
11851
  const dataTableColumnLabelId = useDataTableColumnLabelId();
10922
11852
  const descriptionIds = useFieldDescriptionIds();
@@ -10964,6 +11894,7 @@ const RadioGroup = forwardRef(function RadioGroup2({
10964
11894
  radioGroupRef.current?.focus();
10965
11895
  }, [handleValueChange]);
10966
11896
  const hasClearButton = !disabled && !loading && !readOnly && (showClearButton === true || showClearButton === "auto" && (value?.length ?? 0) > 0);
11897
+ const clearDescriptionId = hasClearButton && clearDescription && prefix(`control-clear-${generatedId}`);
10967
11898
  const handleKeyDown = useCallback(
10968
11899
  (evt) => {
10969
11900
  if (hasClearButton && (evt.code === "Delete" || evt.code === "Backspace")) {
@@ -11001,7 +11932,8 @@ const RadioGroup = forwardRef(function RadioGroup2({
11001
11932
  loadingDescriptionId,
11002
11933
  errorMessageIds,
11003
11934
  ariaDescribedBy,
11004
- descriptionIds
11935
+ descriptionIds,
11936
+ clearDescriptionId
11005
11937
  ),
11006
11938
  onFocus: combineEventHandlers(onFocus, handleControlFocus),
11007
11939
  onBlur: combineEventHandlers(onBlur, handleControlBlur),
@@ -11089,7 +12021,8 @@ const RadioGroup = forwardRef(function RadioGroup2({
11089
12021
  ]
11090
12022
  }
11091
12023
  ),
11092
- loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription })
12024
+ loadingDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: loadingDescriptionId, children: loadingDescription }),
12025
+ clearDescriptionId && /* @__PURE__ */ jsx("span", { hidden: true, id: clearDescriptionId, children: clearDescription })
11093
12026
  ]
11094
12027
  }
11095
12028
  )
@@ -11099,7 +12032,7 @@ const RadioGroup = forwardRef(function RadioGroup2({
11099
12032
  const Separator = forwardRef(function Separator2({ className, ...otherProps }, forwardedRef) {
11100
12033
  const prefix = usePrefix();
11101
12034
  return /* @__PURE__ */ jsx(
11102
- Separator$1.Root,
12035
+ Separator$2.Root,
11103
12036
  {
11104
12037
  className: cx(prefix("separator"), className),
11105
12038
  ...otherProps,
@@ -11323,7 +12256,7 @@ function useTabsContext() {
11323
12256
  function useRegisterTabLabel(value, label) {
11324
12257
  const { showAllTabsWhilePrinting, store } = useTabsContext();
11325
12258
  const needsRegisteredTabLabels = usePrinting() && showAllTabsWhilePrinting;
11326
- const { registerTabLabel } = useStore(store, (state) => state.actions);
12259
+ const { registerTabLabel } = useStore$1(store, (state) => state.actions);
11327
12260
  useEffect(() => {
11328
12261
  if (needsRegisteredTabLabels) {
11329
12262
  return registerTabLabel(value, label);
@@ -11332,13 +12265,13 @@ function useRegisterTabLabel(value, label) {
11332
12265
  }
11333
12266
  function useTabLabel(value) {
11334
12267
  const { store } = useTabsContext();
11335
- return useStore(store, (state) => state.actions.getTabLabel(value));
12268
+ return useStore$1(store, (state) => state.actions.getTabLabel(value));
11336
12269
  }
11337
12270
  const Tab = forwardRef(function Tab2({ value, status, tabInnerProps, className, children, ...otherProps }, forwardedRef) {
11338
12271
  const prefix = usePrefix();
11339
12272
  const { variant, store } = useTabsContext();
11340
12273
  const stringValue = value.toString();
11341
- const isActive = useStore(store, (state) => state.activeTab === stringValue);
12274
+ const isActive = useStore$1(store, (state) => state.activeTab === stringValue);
11342
12275
  useRegisterTabLabel(stringValue, children);
11343
12276
  const tabRef = useRef(null);
11344
12277
  useEffect(() => {
@@ -11579,8 +12512,8 @@ function TabListScrollButton({
11579
12512
  }) {
11580
12513
  const prefix = usePrefix();
11581
12514
  const { store } = useTabsContext();
11582
- const showScrollButtons = useStore(store, (state) => state.showScrollButtons);
11583
- const shouldDisable = useStore(
12515
+ const showScrollButtons = useStore$1(store, (state) => state.showScrollButtons);
12516
+ const shouldDisable = useStore$1(
11584
12517
  store,
11585
12518
  ({ scrollPosition }) => scrollPosition && (side === "left" ? scrollPosition.left === 0 : scrollPosition.right <= 1)
11586
12519
  );
@@ -11639,7 +12572,7 @@ const TextArea = forwardRef(
11639
12572
  function TextArea2({ rows, ...props }, forwardedRef) {
11640
12573
  const isInTableCell = useIsInTableCell();
11641
12574
  rows ??= isInTableCell ? 1 : DEFAULT_ROWS;
11642
- return /* @__PURE__ */ jsx(Input, { asChild: true, ...props, children: /* @__PURE__ */ jsx("textarea", { rows, ref: forwardedRef }) });
12575
+ return /* @__PURE__ */ jsx(Input$1, { asChild: true, ...props, children: /* @__PURE__ */ jsx("textarea", { rows, ref: forwardedRef }) });
11643
12576
  }
11644
12577
  );
11645
12578
  function useMediaQuery(query, options) {
@@ -11778,7 +12711,7 @@ function createLocationStore() {
11778
12711
  function useLocation(selector) {
11779
12712
  locationStore ??= createLocationStore();
11780
12713
  useEffect(() => locationStore.getState().actions.subscribe(), []);
11781
- return useStore(
12714
+ return useStore$1(
11782
12715
  locationStore,
11783
12716
  ({ location: location2 }) => selector ? selector(location2) : location2
11784
12717
  );
@@ -11937,7 +12870,7 @@ export {
11937
12870
  HelperText,
11938
12871
  Icon,
11939
12872
  IconButton,
11940
- Input,
12873
+ Input$1 as Input,
11941
12874
  InputWithContainerRef,
11942
12875
  Keybinds,
11943
12876
  Keyboard,
@@ -12064,7 +12997,7 @@ export {
12064
12997
  useIsInTableCell,
12065
12998
  useKeyboardShortcut,
12066
12999
  useLatestValues,
12067
- useLayoutEffect,
13000
+ useLayoutEffect$1 as useLayoutEffect,
12068
13001
  useLocale,
12069
13002
  useLocation,
12070
13003
  useMeasure,