@ariakit/core 0.3.11 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/cjs/__chunks/{E53JW5BD.cjs → 5JEQEZFR.cjs} +12 -12
  3. package/cjs/__chunks/{YIUPKKEK.cjs → 7DU6YMLQ.cjs} +6 -6
  4. package/cjs/__chunks/{OTVLDMN2.cjs → AETQC2AR.cjs} +17 -16
  5. package/cjs/__chunks/{F6HPKLO2.cjs → B4LYZ4EM.cjs} +12 -12
  6. package/cjs/__chunks/{KBNYGXWI.cjs → EEDWPDM2.cjs} +11 -1
  7. package/cjs/__chunks/{MI6NUQYQ.cjs → FFZYCAXA.cjs} +15 -15
  8. package/cjs/__chunks/{I3Y4EXEF.cjs → LTLFSC4X.cjs} +2 -2
  9. package/cjs/__chunks/{NOFH2BLB.cjs → SU2BSHGB.cjs} +7 -7
  10. package/cjs/__chunks/{TQTGWD5K.cjs → UEZLSKZ4.cjs} +10 -10
  11. package/cjs/__chunks/{5F4DVUNS.cjs → UKR6TQI3.cjs} +1 -2
  12. package/cjs/__chunks/{BFE5R4EZ.cjs → Y7KNI5NS.cjs} +17 -17
  13. package/cjs/checkbox/checkbox-store.cjs +5 -5
  14. package/cjs/collection/collection-store.cjs +5 -5
  15. package/cjs/combobox/combobox-store.cjs +35 -35
  16. package/cjs/combobox/combobox-store.d.cts +13 -8
  17. package/cjs/combobox/combobox-store.d.ts +13 -8
  18. package/cjs/composite/composite-overflow-store.cjs +6 -6
  19. package/cjs/composite/composite-store.cjs +6 -6
  20. package/cjs/composite/composite-store.d.cts +4 -0
  21. package/cjs/composite/composite-store.d.ts +4 -0
  22. package/cjs/dialog/dialog-store.cjs +5 -5
  23. package/cjs/disclosure/disclosure-store.cjs +4 -4
  24. package/cjs/disclosure/disclosure-store.d.cts +6 -2
  25. package/cjs/disclosure/disclosure-store.d.ts +6 -2
  26. package/cjs/form/form-store.cjs +24 -24
  27. package/cjs/hovercard/hovercard-store.cjs +7 -7
  28. package/cjs/hovercard/hovercard-store.d.cts +2 -4
  29. package/cjs/hovercard/hovercard-store.d.ts +2 -4
  30. package/cjs/menu/menu-bar-store.cjs +7 -7
  31. package/cjs/menu/menu-store.cjs +27 -27
  32. package/cjs/menu/menu-store.d.cts +7 -7
  33. package/cjs/menu/menu-store.d.ts +7 -7
  34. package/cjs/menubar/menubar-store.cjs +7 -7
  35. package/cjs/popover/popover-store.cjs +6 -6
  36. package/cjs/radio/radio-store.cjs +9 -9
  37. package/cjs/radio/radio-store.d.cts +2 -4
  38. package/cjs/radio/radio-store.d.ts +2 -4
  39. package/cjs/select/select-store.cjs +29 -29
  40. package/cjs/select/select-store.d.cts +1 -3
  41. package/cjs/select/select-store.d.ts +1 -3
  42. package/cjs/tab/tab-store.cjs +21 -21
  43. package/cjs/toolbar/toolbar-store.cjs +8 -8
  44. package/cjs/toolbar/toolbar-store.d.cts +1 -1
  45. package/cjs/toolbar/toolbar-store.d.ts +1 -1
  46. package/cjs/tooltip/tooltip-store.cjs +21 -12
  47. package/cjs/tooltip/tooltip-store.d.cts +1 -1
  48. package/cjs/tooltip/tooltip-store.d.ts +1 -1
  49. package/cjs/utils/dom.cjs +2 -2
  50. package/cjs/utils/events.cjs +5 -5
  51. package/cjs/utils/focus.cjs +13 -13
  52. package/cjs/utils/misc.cjs +4 -2
  53. package/cjs/utils/misc.d.cts +4 -0
  54. package/cjs/utils/misc.d.ts +4 -0
  55. package/cjs/utils/platform.cjs +3 -3
  56. package/cjs/utils/store.cjs +3 -3
  57. package/esm/__chunks/{Y3OOHFCN.js → 22HHDS5F.js} +10 -0
  58. package/esm/__chunks/{IERTEJ3A.js → 2H5K47H4.js} +3 -3
  59. package/esm/__chunks/{SX2XFD6A.js → 5RJNXXU2.js} +1 -1
  60. package/esm/__chunks/{SOLWE6E5.js → BRS7GKWU.js} +3 -3
  61. package/esm/__chunks/{AF6IUUFN.js → MFZZDIHG.js} +3 -3
  62. package/esm/__chunks/{XU3EOSCU.js → PXYVPXSS.js} +3 -3
  63. package/esm/__chunks/{EAHJFCU4.js → R676XYVY.js} +1 -1
  64. package/esm/__chunks/{DLOEKDPY.js → RRSZHCH6.js} +1 -2
  65. package/esm/__chunks/{22K762VQ.js → URUD7X4C.js} +3 -3
  66. package/esm/__chunks/{MHPO2BXA.js → VDNATJW2.js} +1 -1
  67. package/esm/__chunks/{Z5IGYIPT.js → WCKXDMU7.js} +3 -2
  68. package/esm/checkbox/checkbox-store.js +2 -2
  69. package/esm/collection/collection-store.js +4 -4
  70. package/esm/combobox/combobox-store.d.ts +13 -8
  71. package/esm/combobox/combobox-store.js +9 -9
  72. package/esm/composite/composite-overflow-store.js +5 -5
  73. package/esm/composite/composite-store.d.ts +4 -0
  74. package/esm/composite/composite-store.js +5 -5
  75. package/esm/dialog/dialog-store.js +4 -4
  76. package/esm/disclosure/disclosure-store.d.ts +6 -2
  77. package/esm/disclosure/disclosure-store.js +3 -3
  78. package/esm/form/form-store.js +4 -4
  79. package/esm/hovercard/hovercard-store.d.ts +2 -4
  80. package/esm/hovercard/hovercard-store.js +6 -6
  81. package/esm/menu/menu-bar-store.js +6 -6
  82. package/esm/menu/menu-store.d.ts +7 -7
  83. package/esm/menu/menu-store.js +9 -9
  84. package/esm/menubar/menubar-store.js +6 -6
  85. package/esm/popover/popover-store.js +5 -5
  86. package/esm/radio/radio-store.d.ts +2 -4
  87. package/esm/radio/radio-store.js +5 -5
  88. package/esm/select/select-store.d.ts +1 -3
  89. package/esm/select/select-store.js +8 -8
  90. package/esm/tab/tab-store.js +5 -5
  91. package/esm/toolbar/toolbar-store.d.ts +1 -1
  92. package/esm/toolbar/toolbar-store.js +5 -5
  93. package/esm/tooltip/tooltip-store.d.ts +1 -1
  94. package/esm/tooltip/tooltip-store.js +15 -6
  95. package/esm/utils/dom.js +1 -1
  96. package/esm/utils/events.js +2 -2
  97. package/esm/utils/focus.js +1 -1
  98. package/esm/utils/misc.d.ts +4 -0
  99. package/esm/utils/misc.js +3 -1
  100. package/esm/utils/platform.js +2 -2
  101. package/esm/utils/store.js +2 -2
  102. package/package.json +1 -1
@@ -6,9 +6,7 @@ import type { SetState } from "../utils/types.js";
6
6
  */
7
7
  export declare function createHovercardStore(props?: HovercardStoreProps): HovercardStore;
8
8
  export interface HovercardStoreState extends PopoverStoreState {
9
- /**
10
- * @default "bottom"
11
- */
9
+ /** @default "bottom" */
12
10
  placement: PopoverStoreState["placement"];
13
11
  /**
14
12
  * The amount of time in milliseconds to wait before showing and hiding the
@@ -57,7 +55,7 @@ export interface HovercardStoreFunctions extends PopoverStoreFunctions {
57
55
  */
58
56
  setAutoFocusOnShow: SetState<HovercardStoreState["autoFocusOnShow"]>;
59
57
  }
60
- export interface HovercardStoreOptions extends PopoverStoreOptions, StoreOptions<HovercardStoreState, "placement" | "timeout" | "showTimeout" | "hideTimeout"> {
58
+ export interface HovercardStoreOptions extends StoreOptions<HovercardStoreState, "placement" | "timeout" | "showTimeout" | "hideTimeout">, PopoverStoreOptions {
61
59
  }
62
60
  export interface HovercardStoreProps extends HovercardStoreOptions, StoreProps<HovercardStoreState> {
63
61
  }
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _NOFH2BLBcjs = require('../__chunks/NOFH2BLB.cjs');
5
- require('../__chunks/BFE5R4EZ.cjs');
6
- require('../__chunks/MI6NUQYQ.cjs');
7
- require('../__chunks/F6HPKLO2.cjs');
8
- require('../__chunks/KBNYGXWI.cjs');
9
- require('../__chunks/5F4DVUNS.cjs');
4
+ var _SU2BSHGBcjs = require('../__chunks/SU2BSHGB.cjs');
5
+ require('../__chunks/Y7KNI5NS.cjs');
6
+ require('../__chunks/FFZYCAXA.cjs');
7
+ require('../__chunks/B4LYZ4EM.cjs');
8
+ require('../__chunks/EEDWPDM2.cjs');
9
+ require('../__chunks/UKR6TQI3.cjs');
10
10
  require('../__chunks/ULSPM3Y3.cjs');
11
11
  require('../__chunks/AV6KTKLE.cjs');
12
12
 
13
13
  // src/menu/menu-bar-store.ts
14
14
  function createMenuBarStore(props = {}) {
15
- return _NOFH2BLBcjs.createMenubarStore.call(void 0, props);
15
+ return _SU2BSHGBcjs.createMenubarStore.call(void 0, props);
16
16
  }
17
17
 
18
18
 
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _TQTGWD5Kcjs = require('../__chunks/TQTGWD5K.cjs');
5
- require('../__chunks/E53JW5BD.cjs');
6
- require('../__chunks/I3Y4EXEF.cjs');
7
- require('../__chunks/OTVLDMN2.cjs');
4
+ var _UEZLSKZ4cjs = require('../__chunks/UEZLSKZ4.cjs');
5
+ require('../__chunks/5JEQEZFR.cjs');
6
+ require('../__chunks/LTLFSC4X.cjs');
7
+ require('../__chunks/AETQC2AR.cjs');
8
8
 
9
9
 
10
- var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
11
- require('../__chunks/MI6NUQYQ.cjs');
10
+ var _Y7KNI5NScjs = require('../__chunks/Y7KNI5NS.cjs');
11
+ require('../__chunks/FFZYCAXA.cjs');
12
12
 
13
13
 
14
14
 
@@ -17,12 +17,12 @@ require('../__chunks/MI6NUQYQ.cjs');
17
17
 
18
18
 
19
19
 
20
- var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
20
+ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
21
21
 
22
22
 
23
23
 
24
- var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
25
- require('../__chunks/5F4DVUNS.cjs');
24
+ var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
25
+ require('../__chunks/UKR6TQI3.cjs');
26
26
  require('../__chunks/ULSPM3Y3.cjs');
27
27
 
28
28
 
@@ -42,10 +42,10 @@ function createMenuStore(_a = {}) {
42
42
  "menubar"
43
43
  ]);
44
44
  const parentIsMenubar = !!menubar && !parent;
45
- const store = _F6HPKLO2cjs.mergeStore.call(void 0,
45
+ const store = _B4LYZ4EMcjs.mergeStore.call(void 0,
46
46
  props.store,
47
- _F6HPKLO2cjs.pick.call(void 0, parent, ["values"]),
48
- _F6HPKLO2cjs.omit.call(void 0, combobox, [
47
+ _B4LYZ4EMcjs.pick.call(void 0, parent, ["values"]),
48
+ _B4LYZ4EMcjs.omit.call(void 0, combobox, [
49
49
  "arrowElement",
50
50
  "anchorElement",
51
51
  "contentElement",
@@ -53,51 +53,51 @@ function createMenuStore(_a = {}) {
53
53
  "disclosureElement"
54
54
  ])
55
55
  );
56
- _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, store);
56
+ _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, store);
57
57
  const syncState = store.getState();
58
- const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
58
+ const composite = _Y7KNI5NScjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
59
59
  store,
60
- orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
60
+ orientation: _EEDWPDM2cjs.defaultValue.call(void 0,
61
61
  props.orientation,
62
62
  syncState.orientation,
63
63
  "vertical"
64
64
  )
65
65
  }));
66
- const hovercard = _TQTGWD5Kcjs.createHovercardStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
66
+ const hovercard = _UEZLSKZ4cjs.createHovercardStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
67
67
  store,
68
- placement: _KBNYGXWIcjs.defaultValue.call(void 0,
68
+ placement: _EEDWPDM2cjs.defaultValue.call(void 0,
69
69
  props.placement,
70
70
  syncState.placement,
71
71
  "bottom-start"
72
72
  ),
73
- timeout: _KBNYGXWIcjs.defaultValue.call(void 0,
73
+ timeout: _EEDWPDM2cjs.defaultValue.call(void 0,
74
74
  props.timeout,
75
75
  syncState.timeout,
76
76
  parentIsMenubar ? 0 : 150
77
77
  ),
78
- hideTimeout: _KBNYGXWIcjs.defaultValue.call(void 0, props.hideTimeout, syncState.hideTimeout, 0)
78
+ hideTimeout: _EEDWPDM2cjs.defaultValue.call(void 0, props.hideTimeout, syncState.hideTimeout, 0)
79
79
  }));
80
80
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), hovercard.getState()), {
81
- initialFocus: _KBNYGXWIcjs.defaultValue.call(void 0, syncState.initialFocus, "container"),
82
- values: _KBNYGXWIcjs.defaultValue.call(void 0,
81
+ initialFocus: _EEDWPDM2cjs.defaultValue.call(void 0, syncState.initialFocus, "container"),
82
+ values: _EEDWPDM2cjs.defaultValue.call(void 0,
83
83
  props.values,
84
84
  syncState.values,
85
85
  props.defaultValues,
86
86
  {}
87
87
  )
88
88
  });
89
- const menu = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, hovercard, store);
90
- _F6HPKLO2cjs.setup.call(void 0,
89
+ const menu = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, hovercard, store);
90
+ _B4LYZ4EMcjs.setup.call(void 0,
91
91
  menu,
92
- () => _F6HPKLO2cjs.sync.call(void 0, menu, ["mounted"], (state) => {
92
+ () => _B4LYZ4EMcjs.sync.call(void 0, menu, ["mounted"], (state) => {
93
93
  if (state.mounted)
94
94
  return;
95
95
  menu.setState("activeId", null);
96
96
  })
97
97
  );
98
- _F6HPKLO2cjs.setup.call(void 0,
98
+ _B4LYZ4EMcjs.setup.call(void 0,
99
99
  menu,
100
- () => _F6HPKLO2cjs.sync.call(void 0, parent, ["orientation"], (state) => {
100
+ () => _B4LYZ4EMcjs.sync.call(void 0, parent, ["orientation"], (state) => {
101
101
  menu.setState(
102
102
  "placement",
103
103
  state.orientation === "vertical" ? "right-start" : "bottom-start"
@@ -123,7 +123,7 @@ function createMenuStore(_a = {}) {
123
123
  return;
124
124
  menu.setState("values", (values) => {
125
125
  const prevValue = values[name];
126
- const nextValue = _KBNYGXWIcjs.applyState.call(void 0, value, prevValue);
126
+ const nextValue = _EEDWPDM2cjs.applyState.call(void 0, value, prevValue);
127
127
  if (nextValue === prevValue)
128
128
  return values;
129
129
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, values), {
@@ -8,6 +8,12 @@ export declare function createMenuStore<T extends MenuStoreValues = MenuStoreVal
8
8
  export declare function createMenuStore(props?: MenuStoreProps): MenuStore;
9
9
  export type MenuStoreValues = Record<string, string | boolean | number | Array<string | number>>;
10
10
  export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreState, HovercardStoreState {
11
+ /** @default "vertical" */
12
+ orientation: CompositeStoreState["orientation"];
13
+ /** @default "bottom-start" */
14
+ placement: HovercardStoreState["placement"];
15
+ /** @default 0 */
16
+ hideTimeout?: HovercardStoreState["hideTimeout"];
11
17
  /**
12
18
  * Determines the element that should be focused when the menu is opened.
13
19
  */
@@ -24,12 +30,6 @@ export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> ext
24
30
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
25
31
  */
26
32
  values: T;
27
- /** @default "vertical" */
28
- orientation: CompositeStoreState["orientation"];
29
- /** @default "bottom-start" */
30
- placement: HovercardStoreState["placement"];
31
- /** @default 0 */
32
- hideTimeout?: HovercardStoreState["hideTimeout"];
33
33
  }
34
34
  export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreFunctions, HovercardStoreFunctions, Pick<MenuStoreOptions, "combobox" | "parent" | "menubar"> {
35
35
  /**
@@ -64,7 +64,7 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
64
64
  */
65
65
  setValue: BivariantCallback<(name: string, value: SetStateAction<MenuStoreState<T>["values"][string]>) => void>;
66
66
  }
67
- export interface MenuStoreOptions<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreOptions, HovercardStoreOptions, StoreOptions<MenuStoreState<T>, "orientation" | "placement" | "hideTimeout" | "values"> {
67
+ export interface MenuStoreOptions<T extends MenuStoreValues = MenuStoreValues> extends StoreOptions<MenuStoreState<T>, "orientation" | "placement" | "hideTimeout" | "values">, CompositeStoreOptions, HovercardStoreOptions {
68
68
  /**
69
69
  * A reference to a combobox store. This is used when combining the combobox
70
70
  * with a menu (e.g., dropdown menu with a search input). The stores will
@@ -8,6 +8,12 @@ export declare function createMenuStore<T extends MenuStoreValues = MenuStoreVal
8
8
  export declare function createMenuStore(props?: MenuStoreProps): MenuStore;
9
9
  export type MenuStoreValues = Record<string, string | boolean | number | Array<string | number>>;
10
10
  export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreState, HovercardStoreState {
11
+ /** @default "vertical" */
12
+ orientation: CompositeStoreState["orientation"];
13
+ /** @default "bottom-start" */
14
+ placement: HovercardStoreState["placement"];
15
+ /** @default 0 */
16
+ hideTimeout?: HovercardStoreState["hideTimeout"];
11
17
  /**
12
18
  * Determines the element that should be focused when the menu is opened.
13
19
  */
@@ -24,12 +30,6 @@ export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> ext
24
30
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
25
31
  */
26
32
  values: T;
27
- /** @default "vertical" */
28
- orientation: CompositeStoreState["orientation"];
29
- /** @default "bottom-start" */
30
- placement: HovercardStoreState["placement"];
31
- /** @default 0 */
32
- hideTimeout?: HovercardStoreState["hideTimeout"];
33
33
  }
34
34
  export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreFunctions, HovercardStoreFunctions, Pick<MenuStoreOptions, "combobox" | "parent" | "menubar"> {
35
35
  /**
@@ -64,7 +64,7 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
64
64
  */
65
65
  setValue: BivariantCallback<(name: string, value: SetStateAction<MenuStoreState<T>["values"][string]>) => void>;
66
66
  }
67
- export interface MenuStoreOptions<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreOptions, HovercardStoreOptions, StoreOptions<MenuStoreState<T>, "orientation" | "placement" | "hideTimeout" | "values"> {
67
+ export interface MenuStoreOptions<T extends MenuStoreValues = MenuStoreValues> extends StoreOptions<MenuStoreState<T>, "orientation" | "placement" | "hideTimeout" | "values">, CompositeStoreOptions, HovercardStoreOptions {
68
68
  /**
69
69
  * A reference to a combobox store. This is used when combining the combobox
70
70
  * with a menu (e.g., dropdown menu with a search input). The stores will
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _NOFH2BLBcjs = require('../__chunks/NOFH2BLB.cjs');
5
- require('../__chunks/BFE5R4EZ.cjs');
6
- require('../__chunks/MI6NUQYQ.cjs');
7
- require('../__chunks/F6HPKLO2.cjs');
8
- require('../__chunks/KBNYGXWI.cjs');
9
- require('../__chunks/5F4DVUNS.cjs');
4
+ var _SU2BSHGBcjs = require('../__chunks/SU2BSHGB.cjs');
5
+ require('../__chunks/Y7KNI5NS.cjs');
6
+ require('../__chunks/FFZYCAXA.cjs');
7
+ require('../__chunks/B4LYZ4EM.cjs');
8
+ require('../__chunks/EEDWPDM2.cjs');
9
+ require('../__chunks/UKR6TQI3.cjs');
10
10
  require('../__chunks/ULSPM3Y3.cjs');
11
11
  require('../__chunks/AV6KTKLE.cjs');
12
12
 
13
13
 
14
- exports.createMenubarStore = _NOFH2BLBcjs.createMenubarStore;
14
+ exports.createMenubarStore = _SU2BSHGBcjs.createMenubarStore;
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _E53JW5BDcjs = require('../__chunks/E53JW5BD.cjs');
5
- require('../__chunks/I3Y4EXEF.cjs');
6
- require('../__chunks/OTVLDMN2.cjs');
7
- require('../__chunks/F6HPKLO2.cjs');
8
- require('../__chunks/KBNYGXWI.cjs');
4
+ var _5JEQEZFRcjs = require('../__chunks/5JEQEZFR.cjs');
5
+ require('../__chunks/LTLFSC4X.cjs');
6
+ require('../__chunks/AETQC2AR.cjs');
7
+ require('../__chunks/B4LYZ4EM.cjs');
8
+ require('../__chunks/EEDWPDM2.cjs');
9
9
  require('../__chunks/AV6KTKLE.cjs');
10
10
 
11
11
 
12
- exports.createPopoverStore = _E53JW5BDcjs.createPopoverStore;
12
+ exports.createPopoverStore = _5JEQEZFRcjs.createPopoverStore;
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
5
- require('../__chunks/MI6NUQYQ.cjs');
4
+ var _Y7KNI5NScjs = require('../__chunks/Y7KNI5NS.cjs');
5
+ require('../__chunks/FFZYCAXA.cjs');
6
6
 
7
7
 
8
- var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
8
+ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
9
9
 
10
10
 
11
- var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
12
- require('../__chunks/5F4DVUNS.cjs');
11
+ var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
12
+ require('../__chunks/UKR6TQI3.cjs');
13
13
  require('../__chunks/ULSPM3Y3.cjs');
14
14
 
15
15
 
@@ -22,18 +22,18 @@ function createRadioStore(_a = {}) {
22
22
  var props = _AV6KTKLEcjs.__objRest.call(void 0, _a, []);
23
23
  var _a2;
24
24
  const syncState = (_a2 = props.store) == null ? void 0 : _a2.getState();
25
- const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
26
- focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
25
+ const composite = _Y7KNI5NScjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
26
+ focusLoop: _EEDWPDM2cjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
27
  }));
28
28
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), {
29
- value: _KBNYGXWIcjs.defaultValue.call(void 0,
29
+ value: _EEDWPDM2cjs.defaultValue.call(void 0,
30
30
  props.value,
31
31
  syncState == null ? void 0 : syncState.value,
32
32
  props.defaultValue,
33
33
  null
34
34
  )
35
35
  });
36
- const radio = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, props.store);
36
+ const radio = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, props.store);
37
37
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite), radio), {
38
38
  setValue: (value) => radio.setState("value", value)
39
39
  });
@@ -6,9 +6,7 @@ import type { SetState } from "../utils/types.js";
6
6
  */
7
7
  export declare function createRadioStore({ ...props }?: RadioStoreProps): RadioStore;
8
8
  export interface RadioStoreState extends CompositeStoreState {
9
- /**
10
- * @default true
11
- */
9
+ /** @default true */
12
10
  focusLoop: CompositeStoreState["focusLoop"];
13
11
  /**
14
12
  * The value of the radio group.
@@ -26,7 +24,7 @@ export interface RadioStoreFunctions extends CompositeStoreFunctions {
26
24
  */
27
25
  setValue: SetState<RadioStoreState["value"]>;
28
26
  }
29
- export interface RadioStoreOptions extends CompositeStoreOptions, StoreOptions<RadioStoreState, "focusLoop" | "value"> {
27
+ export interface RadioStoreOptions extends StoreOptions<RadioStoreState, "focusLoop" | "value">, CompositeStoreOptions {
30
28
  /**
31
29
  * The default value of the radio group.
32
30
  * @default null
@@ -6,9 +6,7 @@ import type { SetState } from "../utils/types.js";
6
6
  */
7
7
  export declare function createRadioStore({ ...props }?: RadioStoreProps): RadioStore;
8
8
  export interface RadioStoreState extends CompositeStoreState {
9
- /**
10
- * @default true
11
- */
9
+ /** @default true */
12
10
  focusLoop: CompositeStoreState["focusLoop"];
13
11
  /**
14
12
  * The value of the radio group.
@@ -26,7 +24,7 @@ export interface RadioStoreFunctions extends CompositeStoreFunctions {
26
24
  */
27
25
  setValue: SetState<RadioStoreState["value"]>;
28
26
  }
29
- export interface RadioStoreOptions extends CompositeStoreOptions, StoreOptions<RadioStoreState, "focusLoop" | "value"> {
27
+ export interface RadioStoreOptions extends StoreOptions<RadioStoreState, "focusLoop" | "value">, CompositeStoreOptions {
30
28
  /**
31
29
  * The default value of the radio group.
32
30
  * @default null
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _E53JW5BDcjs = require('../__chunks/E53JW5BD.cjs');
5
- require('../__chunks/I3Y4EXEF.cjs');
6
- require('../__chunks/OTVLDMN2.cjs');
4
+ var _5JEQEZFRcjs = require('../__chunks/5JEQEZFR.cjs');
5
+ require('../__chunks/LTLFSC4X.cjs');
6
+ require('../__chunks/AETQC2AR.cjs');
7
7
 
8
8
 
9
- var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
10
- require('../__chunks/MI6NUQYQ.cjs');
9
+ var _Y7KNI5NScjs = require('../__chunks/Y7KNI5NS.cjs');
10
+ require('../__chunks/FFZYCAXA.cjs');
11
11
 
12
12
 
13
13
 
@@ -16,11 +16,11 @@ require('../__chunks/MI6NUQYQ.cjs');
16
16
 
17
17
 
18
18
 
19
- var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
19
+ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
20
20
 
21
21
 
22
- var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
23
- require('../__chunks/5F4DVUNS.cjs');
22
+ var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
23
+ require('../__chunks/UKR6TQI3.cjs');
24
24
 
25
25
 
26
26
  var _ULSPM3Y3cjs = require('../__chunks/ULSPM3Y3.cjs');
@@ -37,9 +37,9 @@ function createSelectStore(_a = {}) {
37
37
  } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
38
38
  "combobox"
39
39
  ]);
40
- const store = _F6HPKLO2cjs.mergeStore.call(void 0,
40
+ const store = _B4LYZ4EMcjs.mergeStore.call(void 0,
41
41
  props.store,
42
- _F6HPKLO2cjs.omit.call(void 0, combobox, [
42
+ _B4LYZ4EMcjs.omit.call(void 0, combobox, [
43
43
  "value",
44
44
  "items",
45
45
  "renderedItems",
@@ -51,35 +51,35 @@ function createSelectStore(_a = {}) {
51
51
  "disclosureElement"
52
52
  ])
53
53
  );
54
- _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, store);
54
+ _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, store);
55
55
  const syncState = store.getState();
56
- const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
56
+ const composite = _Y7KNI5NScjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
57
57
  store,
58
- virtualFocus: _KBNYGXWIcjs.defaultValue.call(void 0,
58
+ virtualFocus: _EEDWPDM2cjs.defaultValue.call(void 0,
59
59
  props.virtualFocus,
60
60
  syncState.virtualFocus,
61
61
  true
62
62
  ),
63
- includesBaseElement: _KBNYGXWIcjs.defaultValue.call(void 0,
63
+ includesBaseElement: _EEDWPDM2cjs.defaultValue.call(void 0,
64
64
  props.includesBaseElement,
65
65
  syncState.includesBaseElement,
66
66
  false
67
67
  ),
68
- activeId: _KBNYGXWIcjs.defaultValue.call(void 0,
68
+ activeId: _EEDWPDM2cjs.defaultValue.call(void 0,
69
69
  props.activeId,
70
70
  syncState.activeId,
71
71
  props.defaultActiveId,
72
72
  null
73
73
  ),
74
- orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
74
+ orientation: _EEDWPDM2cjs.defaultValue.call(void 0,
75
75
  props.orientation,
76
76
  syncState.orientation,
77
77
  "vertical"
78
78
  )
79
79
  }));
80
- const popover = _E53JW5BDcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
80
+ const popover = _5JEQEZFRcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
81
81
  store,
82
- placement: _KBNYGXWIcjs.defaultValue.call(void 0,
82
+ placement: _EEDWPDM2cjs.defaultValue.call(void 0,
83
83
  props.placement,
84
84
  syncState.placement,
85
85
  "bottom-start"
@@ -87,24 +87,24 @@ function createSelectStore(_a = {}) {
87
87
  }));
88
88
  const initialValue = new String("");
89
89
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), popover.getState()), {
90
- value: _KBNYGXWIcjs.defaultValue.call(void 0,
90
+ value: _EEDWPDM2cjs.defaultValue.call(void 0,
91
91
  props.value,
92
92
  syncState.value,
93
93
  props.defaultValue,
94
94
  initialValue
95
95
  ),
96
- setValueOnMove: _KBNYGXWIcjs.defaultValue.call(void 0,
96
+ setValueOnMove: _EEDWPDM2cjs.defaultValue.call(void 0,
97
97
  props.setValueOnMove,
98
98
  syncState.setValueOnMove,
99
99
  false
100
100
  ),
101
- selectElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState.selectElement, null),
102
- labelElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState.labelElement, null)
101
+ selectElement: _EEDWPDM2cjs.defaultValue.call(void 0, syncState.selectElement, null),
102
+ labelElement: _EEDWPDM2cjs.defaultValue.call(void 0, syncState.labelElement, null)
103
103
  });
104
- const select = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, popover, store);
105
- _F6HPKLO2cjs.setup.call(void 0,
104
+ const select = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, popover, store);
105
+ _B4LYZ4EMcjs.setup.call(void 0,
106
106
  select,
107
- () => _F6HPKLO2cjs.sync.call(void 0, select, ["value", "items"], (state) => {
107
+ () => _B4LYZ4EMcjs.sync.call(void 0, select, ["value", "items"], (state) => {
108
108
  if (state.value !== initialValue)
109
109
  return;
110
110
  if (!state.items.length)
@@ -117,9 +117,9 @@ function createSelectStore(_a = {}) {
117
117
  select.setState("value", item.value);
118
118
  })
119
119
  );
120
- _F6HPKLO2cjs.setup.call(void 0,
120
+ _B4LYZ4EMcjs.setup.call(void 0,
121
121
  select,
122
- () => _F6HPKLO2cjs.sync.call(void 0, select, ["mounted", "items", "value"], (state) => {
122
+ () => _B4LYZ4EMcjs.sync.call(void 0, select, ["mounted", "items", "value"], (state) => {
123
123
  if (combobox)
124
124
  return;
125
125
  if (state.mounted)
@@ -136,9 +136,9 @@ function createSelectStore(_a = {}) {
136
136
  select.setState("activeId", item.id);
137
137
  })
138
138
  );
139
- _F6HPKLO2cjs.setup.call(void 0,
139
+ _B4LYZ4EMcjs.setup.call(void 0,
140
140
  select,
141
- () => _F6HPKLO2cjs.batch.call(void 0, select, ["setValueOnMove", "moves"], (state) => {
141
+ () => _B4LYZ4EMcjs.batch.call(void 0, select, ["setValueOnMove", "moves"], (state) => {
142
142
  const { mounted, value, activeId } = select.getState();
143
143
  if (!state.setValueOnMove && mounted)
144
144
  return;
@@ -13,8 +13,6 @@ export interface SelectStoreItem extends CompositeStoreItem {
13
13
  export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue> extends CompositeStoreState<SelectStoreItem>, PopoverStoreState {
14
14
  /** @default true */
15
15
  virtualFocus: CompositeStoreState<SelectStoreItem>["virtualFocus"];
16
- /** @default false */
17
- includesBaseElement: CompositeStoreState<SelectStoreItem>["includesBaseElement"];
18
16
  /** @default null */
19
17
  activeId: CompositeStoreState<SelectStoreItem>["activeId"];
20
18
  /** @default "vertical" */
@@ -77,7 +75,7 @@ export interface SelectStoreFunctions<T extends SelectStoreValue = SelectStoreVa
77
75
  */
78
76
  setLabelElement: SetState<SelectStoreState<T>["labelElement"]>;
79
77
  }
80
- export interface SelectStoreOptions<T extends SelectStoreValue = SelectStoreValue> extends CompositeStoreOptions<SelectStoreItem>, PopoverStoreOptions, StoreOptions<SelectStoreState<T>, "virtualFocus" | "includesBaseElement" | "activeId" | "orientation" | "placement" | "value" | "setValueOnMove"> {
78
+ export interface SelectStoreOptions<T extends SelectStoreValue = SelectStoreValue> extends StoreOptions<SelectStoreState<T>, "virtualFocus" | "activeId" | "orientation" | "placement" | "value" | "setValueOnMove">, CompositeStoreOptions<SelectStoreItem>, PopoverStoreOptions {
81
79
  /**
82
80
  * A reference to a combobox store. This is used when combining the combobox
83
81
  * with a select (e.g., select with a search input). The stores will share the
@@ -13,8 +13,6 @@ export interface SelectStoreItem extends CompositeStoreItem {
13
13
  export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue> extends CompositeStoreState<SelectStoreItem>, PopoverStoreState {
14
14
  /** @default true */
15
15
  virtualFocus: CompositeStoreState<SelectStoreItem>["virtualFocus"];
16
- /** @default false */
17
- includesBaseElement: CompositeStoreState<SelectStoreItem>["includesBaseElement"];
18
16
  /** @default null */
19
17
  activeId: CompositeStoreState<SelectStoreItem>["activeId"];
20
18
  /** @default "vertical" */
@@ -77,7 +75,7 @@ export interface SelectStoreFunctions<T extends SelectStoreValue = SelectStoreVa
77
75
  */
78
76
  setLabelElement: SetState<SelectStoreState<T>["labelElement"]>;
79
77
  }
80
- export interface SelectStoreOptions<T extends SelectStoreValue = SelectStoreValue> extends CompositeStoreOptions<SelectStoreItem>, PopoverStoreOptions, StoreOptions<SelectStoreState<T>, "virtualFocus" | "includesBaseElement" | "activeId" | "orientation" | "placement" | "value" | "setValueOnMove"> {
78
+ export interface SelectStoreOptions<T extends SelectStoreValue = SelectStoreValue> extends StoreOptions<SelectStoreState<T>, "virtualFocus" | "activeId" | "orientation" | "placement" | "value" | "setValueOnMove">, CompositeStoreOptions<SelectStoreItem>, PopoverStoreOptions {
81
79
  /**
82
80
  * A reference to a combobox store. This is used when combining the combobox
83
81
  * with a select (e.g., select with a search input). The stores will share the