@ariakit/core 0.4.17 → 0.4.19

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 (126) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/cjs/__chunks/{MJNGPYVQ.cjs → 2RUCRSRF.cjs} +16 -16
  3. package/cjs/__chunks/{6BYUUR4M.cjs → 4TRESXTO.cjs} +7 -1
  4. package/cjs/__chunks/{AOXAROPF.cjs → 75F3RDBE.cjs} +14 -14
  5. package/cjs/__chunks/{SHOLYDNP.cjs → CTEQSOKZ.cjs} +2 -2
  6. package/cjs/__chunks/{T247D7JS.cjs → CVLMIMPT.cjs} +2 -2
  7. package/cjs/__chunks/{CPH45Z4I.cjs → G2CSOTWZ.cjs} +7 -7
  8. package/cjs/__chunks/{VZPNI7C2.cjs → I4CBIWTX.cjs} +4 -4
  9. package/cjs/__chunks/{6REHCF5T.cjs → LS2SNHDM.cjs} +6 -6
  10. package/cjs/__chunks/{UROTDZFK.cjs → R37KOEUW.cjs} +10 -10
  11. package/cjs/__chunks/{NNJG45OF.cjs → UGAVMSQJ.cjs} +18 -18
  12. package/cjs/__chunks/{LT33CJGT.cjs → VC22SYOD.cjs} +24 -21
  13. package/cjs/__chunks/{WPBYRKFQ.cjs → WMTGHDLE.cjs} +15 -15
  14. package/cjs/checkbox/checkbox-store.cjs +5 -5
  15. package/cjs/checkbox/checkbox-store.d.cts +5 -5
  16. package/cjs/checkbox/checkbox-store.d.ts +5 -5
  17. package/cjs/collection/collection-store.cjs +5 -5
  18. package/cjs/collection/collection-store.d.cts +5 -5
  19. package/cjs/collection/collection-store.d.ts +5 -5
  20. package/cjs/combobox/combobox-store.cjs +40 -40
  21. package/cjs/combobox/combobox-store.d.cts +26 -26
  22. package/cjs/combobox/combobox-store.d.ts +26 -26
  23. package/cjs/composite/composite-overflow-store.cjs +6 -6
  24. package/cjs/composite/composite-store.cjs +6 -6
  25. package/cjs/composite/composite-store.d.cts +62 -54
  26. package/cjs/composite/composite-store.d.ts +62 -54
  27. package/cjs/dialog/dialog-store.cjs +5 -5
  28. package/cjs/disclosure/disclosure-store.cjs +4 -4
  29. package/cjs/disclosure/disclosure-store.d.cts +22 -22
  30. package/cjs/disclosure/disclosure-store.d.ts +22 -22
  31. package/cjs/form/form-store.cjs +41 -37
  32. package/cjs/form/form-store.d.cts +14 -14
  33. package/cjs/form/form-store.d.ts +14 -14
  34. package/cjs/hovercard/hovercard-store.cjs +7 -7
  35. package/cjs/hovercard/hovercard-store.d.cts +10 -10
  36. package/cjs/hovercard/hovercard-store.d.ts +10 -10
  37. package/cjs/menu/menu-bar-store.cjs +7 -7
  38. package/cjs/menu/menu-store.cjs +27 -27
  39. package/cjs/menu/menu-store.d.cts +10 -10
  40. package/cjs/menu/menu-store.d.ts +10 -10
  41. package/cjs/menubar/menubar-store.cjs +7 -7
  42. package/cjs/popover/popover-store.cjs +6 -6
  43. package/cjs/popover/popover-store.d.cts +17 -17
  44. package/cjs/popover/popover-store.d.ts +17 -17
  45. package/cjs/radio/radio-store.cjs +9 -9
  46. package/cjs/radio/radio-store.d.cts +1 -1
  47. package/cjs/radio/radio-store.d.ts +1 -1
  48. package/cjs/select/select-store.cjs +32 -32
  49. package/cjs/select/select-store.d.cts +17 -17
  50. package/cjs/select/select-store.d.ts +17 -17
  51. package/cjs/tab/tab-store.cjs +32 -32
  52. package/cjs/tab/tab-store.d.cts +20 -20
  53. package/cjs/tab/tab-store.d.ts +20 -20
  54. package/cjs/tag/tag-store.cjs +16 -16
  55. package/cjs/tag/tag-store.d.cts +5 -5
  56. package/cjs/tag/tag-store.d.ts +5 -5
  57. package/cjs/toolbar/toolbar-store.cjs +8 -8
  58. package/cjs/tooltip/tooltip-store.cjs +13 -13
  59. package/cjs/utils/dom.cjs +2 -2
  60. package/cjs/utils/events.cjs +6 -6
  61. package/cjs/utils/focus.cjs +25 -24
  62. package/cjs/utils/misc.cjs +4 -2
  63. package/cjs/utils/misc.d.cts +4 -0
  64. package/cjs/utils/misc.d.ts +4 -0
  65. package/cjs/utils/platform.cjs +3 -3
  66. package/cjs/utils/store.cjs +3 -3
  67. package/cjs/utils/store.d.cts +1 -1
  68. package/cjs/utils/store.d.ts +1 -1
  69. package/cjs/utils/undo.cjs +2 -2
  70. package/esm/__chunks/{KMAUV3TY.js → 7KNZCZ55.js} +1 -1
  71. package/esm/__chunks/{37JWRFYW.js → G7XPWBXK.js} +3 -3
  72. package/esm/__chunks/{O6E4ZWCP.js → GMGLSF2B.js} +1 -1
  73. package/esm/__chunks/{PSMDSJUH.js → H7R2CY4Q.js} +3 -3
  74. package/esm/__chunks/{75BJEVSH.js → IHNLLH3I.js} +2 -2
  75. package/esm/__chunks/{AMRA5WUK.js → KZX46JDB.js} +11 -8
  76. package/esm/__chunks/{BFGNM53A.js → MJ4ZJEIM.js} +5 -5
  77. package/esm/__chunks/{TIQDSBWP.js → TEVO2DMI.js} +3 -3
  78. package/esm/__chunks/{7LM4Q2XB.js → U4NM2NCP.js} +1 -1
  79. package/esm/__chunks/{73UNQSFO.js → UNDE2QJS.js} +3 -3
  80. package/esm/__chunks/{XMCVU3LR.js → UWJK2WK2.js} +6 -0
  81. package/esm/__chunks/{SXKM4CGU.js → XTZ53NXG.js} +4 -4
  82. package/esm/checkbox/checkbox-store.d.ts +5 -5
  83. package/esm/checkbox/checkbox-store.js +2 -2
  84. package/esm/collection/collection-store.d.ts +5 -5
  85. package/esm/collection/collection-store.js +4 -4
  86. package/esm/combobox/combobox-store.d.ts +26 -26
  87. package/esm/combobox/combobox-store.js +9 -9
  88. package/esm/composite/composite-overflow-store.js +5 -5
  89. package/esm/composite/composite-store.d.ts +62 -54
  90. package/esm/composite/composite-store.js +5 -5
  91. package/esm/dialog/dialog-store.js +4 -4
  92. package/esm/disclosure/disclosure-store.d.ts +22 -22
  93. package/esm/disclosure/disclosure-store.js +3 -3
  94. package/esm/form/form-store.d.ts +14 -14
  95. package/esm/form/form-store.js +19 -15
  96. package/esm/hovercard/hovercard-store.d.ts +10 -10
  97. package/esm/hovercard/hovercard-store.js +6 -6
  98. package/esm/menu/menu-bar-store.js +6 -6
  99. package/esm/menu/menu-store.d.ts +10 -10
  100. package/esm/menu/menu-store.js +9 -9
  101. package/esm/menubar/menubar-store.js +6 -6
  102. package/esm/popover/popover-store.d.ts +17 -17
  103. package/esm/popover/popover-store.js +5 -5
  104. package/esm/radio/radio-store.d.ts +1 -1
  105. package/esm/radio/radio-store.js +5 -5
  106. package/esm/select/select-store.d.ts +17 -17
  107. package/esm/select/select-store.js +8 -8
  108. package/esm/tab/tab-store.d.ts +20 -20
  109. package/esm/tab/tab-store.js +5 -5
  110. package/esm/tag/tag-store.d.ts +5 -5
  111. package/esm/tag/tag-store.js +7 -7
  112. package/esm/toolbar/toolbar-store.js +5 -5
  113. package/esm/tooltip/tooltip-store.js +7 -7
  114. package/esm/utils/dom.js +1 -1
  115. package/esm/utils/events.js +4 -4
  116. package/esm/utils/focus.js +17 -16
  117. package/esm/utils/misc.d.ts +4 -0
  118. package/esm/utils/misc.js +3 -1
  119. package/esm/utils/platform.js +2 -2
  120. package/esm/utils/store.d.ts +1 -1
  121. package/esm/utils/store.js +2 -2
  122. package/esm/utils/undo.js +1 -1
  123. package/package.json +20 -21
  124. package/tsconfig.build.json +7 -2
  125. package/tsconfig.node.json +5 -0
  126. package/tsconfig.test.json +5 -0
@@ -17,11 +17,12 @@ function getWindow(node) {
17
17
  return getDocument(node).defaultView || window;
18
18
  }
19
19
  function getActiveElement(node, activeDescendant = false) {
20
+ var _a;
20
21
  const { activeElement } = getDocument(node);
21
22
  if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
22
23
  return null;
23
24
  }
24
- if (isFrame(activeElement) && activeElement.contentDocument) {
25
+ if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
25
26
  return getActiveElement(
26
27
  activeElement.contentDocument.body,
27
28
  activeDescendant
@@ -119,7 +120,6 @@ function getPopupRole(element, fallback) {
119
120
  return fallback;
120
121
  }
121
122
  function getPopupItemRole(element, fallback) {
122
- var _a;
123
123
  const itemRoleByPopupRole = {
124
124
  menu: "menuitem",
125
125
  listbox: "option",
@@ -128,7 +128,7 @@ function getPopupItemRole(element, fallback) {
128
128
  const popupRole = getPopupRole(element);
129
129
  if (!popupRole) return fallback;
130
130
  const key = popupRole;
131
- return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback;
131
+ return itemRoleByPopupRole[key] ?? fallback;
132
132
  }
133
133
  function scrollIntoViewIfNeeded(element, arg) {
134
134
  if (isPartiallyHidden(element) && "scrollIntoView" in element) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  canUseDOM
4
- } from "./37JWRFYW.js";
4
+ } from "./G7XPWBXK.js";
5
5
 
6
6
  // src/utils/platform.ts
7
7
  function isTouchDevice() {
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "./73UNQSFO.js";
4
+ } from "./UNDE2QJS.js";
5
5
  import {
6
6
  createStore
7
- } from "./SXKM4CGU.js";
7
+ } from "./XTZ53NXG.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./XMCVU3LR.js";
10
+ } from "./UWJK2WK2.js";
11
11
 
12
12
  // src/menubar/menubar-store.ts
13
13
  function createMenubarStore(props = {}) {
@@ -7,10 +7,10 @@ import {
7
7
  subscribe,
8
8
  sync,
9
9
  throwOnConflictingProps
10
- } from "./SXKM4CGU.js";
10
+ } from "./XTZ53NXG.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./XMCVU3LR.js";
13
+ } from "./UWJK2WK2.js";
14
14
 
15
15
  // src/disclosure/disclosure-store.ts
16
16
  function createDisclosureStore(props = {}) {
@@ -2,28 +2,31 @@
2
2
  import {
3
3
  getDocument,
4
4
  sortBasedOnDOMPosition
5
- } from "./37JWRFYW.js";
5
+ } from "./G7XPWBXK.js";
6
6
  import {
7
7
  batch,
8
8
  createStore,
9
9
  init,
10
10
  setup,
11
11
  throwOnConflictingProps
12
- } from "./SXKM4CGU.js";
12
+ } from "./XTZ53NXG.js";
13
13
  import {
14
14
  chain,
15
15
  defaultValue
16
- } from "./XMCVU3LR.js";
16
+ } from "./UWJK2WK2.js";
17
17
 
18
18
  // src/collection/collection-store.ts
19
19
  function getCommonParent(items) {
20
- var _a;
20
+ var _a, _b;
21
21
  const firstItem = items.find((item) => !!item.element);
22
- const lastItem = [...items].reverse().find((item) => !!item.element);
23
- let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;
24
- while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {
22
+ const lastElement = (_a = [...items].reverse().find((item) => !!item.element)) == null ? void 0 : _a.element;
23
+ let parentElement = (_b = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _b.parentElement;
24
+ if (!lastElement) {
25
+ return getDocument(parentElement).body;
26
+ }
27
+ while (parentElement) {
25
28
  const parent = parentElement;
26
- if (lastItem && parent.contains(lastItem.element)) {
29
+ if (parent.contains(lastElement)) {
27
30
  return parentElement;
28
31
  }
29
32
  parentElement = parentElement.parentElement;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  createDialogStore
4
- } from "./KMAUV3TY.js";
4
+ } from "./7KNZCZ55.js";
5
5
  import {
6
6
  createStore,
7
7
  mergeStore,
8
8
  omit,
9
9
  throwOnConflictingProps
10
- } from "./SXKM4CGU.js";
10
+ } from "./XTZ53NXG.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./XMCVU3LR.js";
13
+ } from "./UWJK2WK2.js";
14
14
 
15
15
  // src/popover/popover-store.ts
16
16
  function createPopoverStore({
@@ -42,7 +42,7 @@ function createPopoverStore({
42
42
  anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),
43
43
  popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),
44
44
  arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),
45
- rendered: Symbol("rendered")
45
+ rendered: /* @__PURE__ */ Symbol("rendered")
46
46
  };
47
47
  const popover = createStore(initialState, dialog, store);
48
48
  return {
@@ -51,7 +51,7 @@ function createPopoverStore({
51
51
  setAnchorElement: (element) => popover.setState("anchorElement", element),
52
52
  setPopoverElement: (element) => popover.setState("popoverElement", element),
53
53
  setArrowElement: (element) => popover.setState("arrowElement", element),
54
- render: () => popover.setState("rendered", Symbol("rendered"))
54
+ render: () => popover.setState("rendered", /* @__PURE__ */ Symbol("rendered"))
55
55
  };
56
56
  }
57
57
 
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "./BFGNM53A.js";
4
+ } from "./MJ4ZJEIM.js";
5
5
  import {
6
6
  createStore
7
- } from "./SXKM4CGU.js";
7
+ } from "./XTZ53NXG.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./XMCVU3LR.js";
10
+ } from "./UWJK2WK2.js";
11
11
 
12
12
  // src/hovercard/hovercard-store.ts
13
13
  function createHovercardStore(props = {}) {
@@ -37,7 +37,7 @@ function createUndoManager({
37
37
  undoStack.shift();
38
38
  }
39
39
  const sameGroup = group === currentGroup;
40
- currentGroup = group != null ? group : null;
40
+ currentGroup = group ?? null;
41
41
  const nextIndex = sameGroup ? Math.max(0, undoStack.length - 1) : undoStack.length;
42
42
  const undoCallback = await callback();
43
43
  if (!undoCallback) return;
@@ -5,15 +5,15 @@ import {
5
5
  } from "./7PRQYBBV.js";
6
6
  import {
7
7
  createCollectionStore
8
- } from "./AMRA5WUK.js";
8
+ } from "./KZX46JDB.js";
9
9
  import {
10
10
  createStore,
11
11
  setup,
12
12
  sync
13
- } from "./SXKM4CGU.js";
13
+ } from "./XTZ53NXG.js";
14
14
  import {
15
15
  defaultValue
16
- } from "./XMCVU3LR.js";
16
+ } from "./UWJK2WK2.js";
17
17
 
18
18
  // src/composite/composite-store.ts
19
19
  var NULL_ITEM = { id: null };
@@ -117,6 +117,11 @@ function isFalsyBooleanCallback(booleanOrCallback, ...args) {
117
117
  function disabledFromProps(props) {
118
118
  return props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true";
119
119
  }
120
+ function disabledFromElement(element) {
121
+ if (element.getAttribute("aria-disabled") === "true") return true;
122
+ if ("disabled" in element && element.disabled === true) return true;
123
+ return false;
124
+ }
120
125
  function removeUndefinedValues(obj) {
121
126
  const result = {};
122
127
  for (const key in obj) {
@@ -153,6 +158,7 @@ export {
153
158
  getKeys,
154
159
  isFalsyBooleanCallback,
155
160
  disabledFromProps,
161
+ disabledFromElement,
156
162
  removeUndefinedValues,
157
163
  defaultValue
158
164
  };
@@ -8,7 +8,7 @@ import {
8
8
  noop,
9
9
  omit,
10
10
  pick
11
- } from "./XMCVU3LR.js";
11
+ } from "./UWJK2WK2.js";
12
12
 
13
13
  // src/utils/store.ts
14
14
  function getInternal(store, key) {
@@ -19,7 +19,7 @@ function getInternal(store, key) {
19
19
  function createStore(initialState, ...stores) {
20
20
  let state = initialState;
21
21
  let prevStateBatch = state;
22
- let lastUpdate = Symbol();
22
+ let lastUpdate = /* @__PURE__ */ Symbol();
23
23
  let destroy = noop;
24
24
  const instances = /* @__PURE__ */ new Set();
25
25
  const updatedKeys = /* @__PURE__ */ new Set();
@@ -34,7 +34,7 @@ function createStore(initialState, ...stores) {
34
34
  };
35
35
  const storeInit = () => {
36
36
  const initialized = instances.size;
37
- const instance = Symbol();
37
+ const instance = /* @__PURE__ */ Symbol();
38
38
  instances.add(instance);
39
39
  const maybeDestroy = () => {
40
40
  instances.delete(instance);
@@ -104,7 +104,7 @@ function createStore(initialState, ...stores) {
104
104
  }
105
105
  const prevState = state;
106
106
  state = { ...state, [key]: nextValue };
107
- const thisUpdate = Symbol();
107
+ const thisUpdate = /* @__PURE__ */ Symbol();
108
108
  lastUpdate = thisUpdate;
109
109
  updatedKeys.add(key);
110
110
  const run = (listener, prev, uKeys) => {
@@ -11,13 +11,13 @@ export interface CheckboxStoreState<T extends CheckboxStoreValue = CheckboxStore
11
11
  * The checked state of the checkbox.
12
12
  *
13
13
  * Live examples:
14
- * - [Custom Checkbox](https://ariakit.org/examples/checkbox-custom)
14
+ * - [Custom Checkbox](https://ariakit.com/examples/checkbox-custom)
15
15
  */
16
16
  value: ToPrimitive<T>;
17
17
  }
18
18
  export interface CheckboxStoreFunctions<T extends CheckboxStoreValue = CheckboxStoreValue> {
19
19
  /**
20
- * Sets the [`value`](https://ariakit.org/reference/checkbox-provider#value)
20
+ * Sets the [`value`](https://ariakit.com/reference/checkbox-provider#value)
21
21
  * state.
22
22
  * @example
23
23
  * store.setValue(true);
@@ -28,12 +28,12 @@ export interface CheckboxStoreFunctions<T extends CheckboxStoreValue = CheckboxS
28
28
  export interface CheckboxStoreOptions<T extends CheckboxStoreValue = CheckboxStoreValue> extends StoreOptions<CheckboxStoreState<T>, "value"> {
29
29
  /**
30
30
  * The default
31
- * [`value`](https://ariakit.org/reference/checkbox-provider#value) state of
31
+ * [`value`](https://ariakit.com/reference/checkbox-provider#value) state of
32
32
  * the checkbox.
33
33
  *
34
34
  * Live examples:
35
- * - [Custom Checkbox](https://ariakit.org/examples/checkbox-custom)
36
- * - [Checkbox group](https://ariakit.org/examples/checkbox-group)
35
+ * - [Custom Checkbox](https://ariakit.com/examples/checkbox-custom)
36
+ * - [Checkbox group](https://ariakit.com/examples/checkbox-group)
37
37
  * @default false
38
38
  */
39
39
  defaultValue?: CheckboxStoreState<T>["value"];
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  createStore,
4
4
  throwOnConflictingProps
5
- } from "../__chunks/SXKM4CGU.js";
5
+ } from "../__chunks/XTZ53NXG.js";
6
6
  import {
7
7
  defaultValue
8
- } from "../__chunks/XMCVU3LR.js";
8
+ } from "../__chunks/UWJK2WK2.js";
9
9
 
10
10
  // src/checkbox/checkbox-store.ts
11
11
  function createCheckboxStore(props = {}) {
@@ -18,19 +18,19 @@ export interface CollectionStoreState<T extends CollectionStoreItem = Collection
18
18
  /**
19
19
  * Lists all items along with their metadata. This state is automatically
20
20
  * updated when an item is registered or unregistered using the
21
- * [`registerItem`](https://ariakit.org/reference/use-collection-store#registeritem)
21
+ * [`registerItem`](https://ariakit.com/reference/use-collection-store#registeritem)
22
22
  * function.
23
23
  *
24
24
  * Live examples:
25
25
  * - [Command Menu with
26
- * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
26
+ * Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
27
27
  */
28
28
  items: T[];
29
29
  /**
30
30
  * Lists all items, along with their metadata, in the exact order they appear in
31
31
  * the DOM. This state is automatically updated when an item is rendered or
32
32
  * unmounted using the
33
- * [`renderItem`](https://ariakit.org/reference/use-collection-store#renderitem)
33
+ * [`renderItem`](https://ariakit.com/reference/use-collection-store#renderitem)
34
34
  * function.
35
35
  */
36
36
  renderedItems: T[];
@@ -58,7 +58,7 @@ export interface CollectionStoreFunctions<T extends CollectionStoreItem = Collec
58
58
  * Gets an item by its id.
59
59
  *
60
60
  * Live examples:
61
- * - [Animated TabPanel](https://ariakit.org/examples/tab-panel-animated)
61
+ * - [Animated TabPanel](https://ariakit.com/examples/tab-panel-animated)
62
62
  * @example
63
63
  * const item = store.item("item-1");
64
64
  */
@@ -67,7 +67,7 @@ export interface CollectionStoreFunctions<T extends CollectionStoreItem = Collec
67
67
  export interface CollectionStoreOptions<T extends CollectionStoreItem = CollectionStoreItem> extends StoreOptions<CollectionStoreState<T>, "items"> {
68
68
  /**
69
69
  * The defaut value for the
70
- * [`items`](https://ariakit.org/reference/collection-provider#items) state.
70
+ * [`items`](https://ariakit.com/reference/collection-provider#items) state.
71
71
  * @default []
72
72
  */
73
73
  defaultItems?: CollectionStoreState<T>["items"];
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "../__chunks/AMRA5WUK.js";
5
- import "../__chunks/37JWRFYW.js";
6
- import "../__chunks/SXKM4CGU.js";
7
- import "../__chunks/XMCVU3LR.js";
4
+ } from "../__chunks/KZX46JDB.js";
5
+ import "../__chunks/G7XPWBXK.js";
6
+ import "../__chunks/XTZ53NXG.js";
7
+ import "../__chunks/UWJK2WK2.js";
8
8
  export {
9
9
  createCollectionStore
10
10
  };
@@ -29,15 +29,15 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
29
29
  *
30
30
  * Live examples:
31
31
  * - [Combobox with integrated
32
- * filter](https://ariakit.org/examples/combobox-filtering-integrated)
33
- * - [Combobox with links](https://ariakit.org/examples/combobox-links)
34
- * - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
32
+ * filter](https://ariakit.com/examples/combobox-filtering-integrated)
33
+ * - [Combobox with links](https://ariakit.com/examples/combobox-links)
34
+ * - [Combobox filtering](https://ariakit.com/examples/combobox-filtering)
35
35
  * - [Multi-selectable
36
- * Combobox](https://ariakit.org/examples/combobox-multiple)
36
+ * Combobox](https://ariakit.com/examples/combobox-multiple)
37
37
  * - [Textarea with inline
38
- * Combobox](https://ariakit.org/examples/combobox-textarea)
38
+ * Combobox](https://ariakit.com/examples/combobox-textarea)
39
39
  * - [Command Menu with
40
- * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
40
+ * Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
41
41
  */
42
42
  value: string;
43
43
  /**
@@ -49,71 +49,71 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
49
49
  /**
50
50
  * The value(s) of the currently selected item(s). This can be a string or an
51
51
  * array of strings. If it's an array, the combobox is considered
52
- * [multi-selectable](https://ariakit.org/examples/combobox-multiple).
52
+ * [multi-selectable](https://ariakit.com/examples/combobox-multiple).
53
53
  *
54
54
  * Live examples:
55
55
  * - [Multi-selectable
56
- * Combobox](https://ariakit.org/examples/combobox-multiple)
56
+ * Combobox](https://ariakit.com/examples/combobox-multiple)
57
57
  */
58
58
  selectedValue: MutableValue<T>;
59
59
  /**
60
60
  * Whether to reset the value when the combobox popover closes. This prop is
61
61
  * automatically set to `true` by default if the combobox supports multiple
62
62
  * selections. In other words, if the
63
- * [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue)
63
+ * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
64
64
  * or
65
- * [`defaultSelectedValue`](https://ariakit.org/reference/combobox-provider#defaultselectedvalue)
65
+ * [`defaultSelectedValue`](https://ariakit.com/reference/combobox-provider#defaultselectedvalue)
66
66
  * props are arrays.
67
67
  *
68
68
  * Live examples:
69
69
  * - [Multi-selectable
70
- * Combobox](https://ariakit.org/examples/combobox-multiple)
71
- * - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
72
- * - [Select with Combobox](https://ariakit.org/examples/select-combobox)
70
+ * Combobox](https://ariakit.com/examples/combobox-multiple)
71
+ * - [Menu with Combobox](https://ariakit.com/examples/menu-combobox)
72
+ * - [Select with Combobox](https://ariakit.com/examples/select-combobox)
73
73
  * - [Submenu with
74
- * Combobox](https://ariakit.org/examples/menu-nested-combobox)
74
+ * Combobox](https://ariakit.com/examples/menu-nested-combobox)
75
75
  * - [Command Menu with
76
- * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
76
+ * Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
77
77
  * - [Select with Combobox and
78
- * Tabs](https://ariakit.org/examples/select-combobox-tab)
78
+ * Tabs](https://ariakit.com/examples/select-combobox-tab)
79
79
  */
80
80
  resetValueOnHide: boolean;
81
81
  /**
82
82
  * Whether to reset the value when an item is selected. This prop is
83
83
  * automatically set to `true` by default if the combobox supports multiple
84
84
  * selections. In other words, if the
85
- * [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue)
85
+ * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
86
86
  * or
87
- * [`defaultSelectedValue`](https://ariakit.org/reference/combobox-provider#defaultselectedvalue)
87
+ * [`defaultSelectedValue`](https://ariakit.com/reference/combobox-provider#defaultselectedvalue)
88
88
  * props are arrays.
89
89
  * @deprecated Use the
90
- * [`resetValueOnSelect`](https://ariakit.org/reference/combobox-item#resetvalueonselect)
91
- * prop on [`ComboboxItem`](https://ariakit.org/reference/combobox-item)
90
+ * [`resetValueOnSelect`](https://ariakit.com/reference/combobox-item#resetvalueonselect)
91
+ * prop on [`ComboboxItem`](https://ariakit.com/reference/combobox-item)
92
92
  * instead.
93
93
  */
94
94
  resetValueOnSelect: boolean;
95
95
  }
96
96
  export interface ComboboxStoreFunctions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends Pick<ComboboxStoreOptions<T>, "tag">, CompositeStoreFunctions<ComboboxStoreItem>, PopoverStoreFunctions {
97
97
  /**
98
- * Sets the [`value`](https://ariakit.org/reference/combobox-provider#value)
98
+ * Sets the [`value`](https://ariakit.com/reference/combobox-provider#value)
99
99
  * state.
100
100
  *
101
101
  * Live examples:
102
102
  * - [Textarea with inline
103
- * Combobox](https://ariakit.org/examples/combobox-textarea)
103
+ * Combobox](https://ariakit.com/examples/combobox-textarea)
104
104
  * @example
105
105
  * store.setValue("Hello world");
106
106
  * store.setValue((value) => value + "!");
107
107
  */
108
108
  setValue: SetState<ComboboxStoreState<T>["value"]>;
109
109
  /**
110
- * Resets the [`value`](https://ariakit.org/reference/combobox-provider#value)
110
+ * Resets the [`value`](https://ariakit.com/reference/combobox-provider#value)
111
111
  * state to its initial value.
112
112
  */
113
113
  resetValue: () => void;
114
114
  /**
115
115
  * Sets the
116
- * [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue)
116
+ * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
117
117
  * state.
118
118
  */
119
119
  setSelectedValue: SetState<ComboboxStoreState<T>["selectedValue"]>;
@@ -128,10 +128,10 @@ export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = Com
128
128
  defaultValue?: ComboboxStoreState<T>["value"];
129
129
  /**
130
130
  * The initial value of the
131
- * [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue)
131
+ * [`selectedValue`](https://ariakit.com/reference/combobox-provider#selectedvalue)
132
132
  * state. This can be a string or an array of strings. If it's an array, the
133
133
  * combobox is considered
134
- * [multi-selectable](https://ariakit.org/examples/combobox-multiple).
134
+ * [multi-selectable](https://ariakit.com/examples/combobox-multiple).
135
135
  * @default ""
136
136
  */
137
137
  defaultSelectedValue?: ComboboxStoreState<T>["selectedValue"];
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  isSafari,
4
4
  isTouchDevice
5
- } from "../__chunks/O6E4ZWCP.js";
5
+ } from "../__chunks/GMGLSF2B.js";
6
6
  import {
7
7
  createPopoverStore
8
- } from "../__chunks/BFGNM53A.js";
8
+ } from "../__chunks/MJ4ZJEIM.js";
9
9
  import {
10
10
  createCompositeStore
11
- } from "../__chunks/73UNQSFO.js";
11
+ } from "../__chunks/UNDE2QJS.js";
12
12
  import "../__chunks/7PRQYBBV.js";
13
- import "../__chunks/KMAUV3TY.js";
14
- import "../__chunks/75BJEVSH.js";
15
- import "../__chunks/AMRA5WUK.js";
16
- import "../__chunks/37JWRFYW.js";
13
+ import "../__chunks/7KNZCZ55.js";
14
+ import "../__chunks/IHNLLH3I.js";
15
+ import "../__chunks/KZX46JDB.js";
16
+ import "../__chunks/G7XPWBXK.js";
17
17
  import {
18
18
  batch,
19
19
  createStore,
@@ -22,11 +22,11 @@ import {
22
22
  setup,
23
23
  sync,
24
24
  throwOnConflictingProps
25
- } from "../__chunks/SXKM4CGU.js";
25
+ } from "../__chunks/XTZ53NXG.js";
26
26
  import {
27
27
  chain,
28
28
  defaultValue
29
- } from "../__chunks/XMCVU3LR.js";
29
+ } from "../__chunks/UWJK2WK2.js";
30
30
 
31
31
  // src/combobox/combobox-store.ts
32
32
  var isTouchSafari = isSafari() && isTouchDevice();
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/BFGNM53A.js";
5
- import "../__chunks/KMAUV3TY.js";
6
- import "../__chunks/75BJEVSH.js";
7
- import "../__chunks/SXKM4CGU.js";
8
- import "../__chunks/XMCVU3LR.js";
4
+ } from "../__chunks/MJ4ZJEIM.js";
5
+ import "../__chunks/7KNZCZ55.js";
6
+ import "../__chunks/IHNLLH3I.js";
7
+ import "../__chunks/XTZ53NXG.js";
8
+ import "../__chunks/UWJK2WK2.js";
9
9
 
10
10
  // src/composite/composite-overflow-store.ts
11
11
  function createCompositeOverflowStore(props = {}) {