@ark-ui/solid 4.10.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/README.md +6 -9
  2. package/dist/chunk/{E72NMPSK.jsx → 2FYSIKNK.jsx} +5 -13
  3. package/dist/chunk/{ASCGEGA5.jsx → 2TEQVFZN.jsx} +11 -15
  4. package/dist/chunk/{2H4WHODR.js → 3CUJRNYI.js} +7 -10
  5. package/dist/chunk/{MRQ2UYM4.jsx → 3VB4UGEY.jsx} +8 -10
  6. package/dist/chunk/{ATMUKDFF.js → 44YJVOL2.js} +8 -10
  7. package/dist/chunk/{7YIHAT7J.jsx → 4D76BVTD.jsx} +35 -17
  8. package/dist/chunk/{VARNCRUN.js → 4E5OPUFZ.js} +16 -18
  9. package/dist/chunk/{5JS7LFUQ.js → 4GOBFWQB.js} +9 -8
  10. package/dist/chunk/{RAEDLHD3.js → 55NHLACH.js} +11 -14
  11. package/dist/chunk/{2HTNQLGP.jsx → 676ULDTZ.jsx} +9 -13
  12. package/dist/chunk/{U7SPBSDD.jsx → 6AKFQH4M.jsx} +8 -13
  13. package/dist/chunk/{QODB3C3M.js → 6MQ6S5JP.js} +8 -5
  14. package/dist/chunk/{CIPYIXIW.js → 6NMPU3T3.js} +8 -10
  15. package/dist/chunk/{FNEB2RAF.js → 6VITT55B.js} +9 -10
  16. package/dist/chunk/{MQDN267C.jsx → 7AJYNPOZ.jsx} +8 -11
  17. package/dist/chunk/{EHJDQTTW.jsx → 7IAJIOJR.jsx} +3 -16
  18. package/dist/chunk/{UGKLUHKU.js → A4HLKXDW.js} +8 -11
  19. package/dist/chunk/{3LRXHWW2.js → A6LAAZDX.js} +32 -27
  20. package/dist/chunk/{LVPQ6GR4.js → AIQ2GVFX.js} +6 -7
  21. package/dist/chunk/{JVXNYKNA.js → ANDTZLCB.js} +8 -10
  22. package/dist/chunk/{5O4RWSWO.jsx → BPYAMTER.jsx} +6 -4
  23. package/dist/chunk/{AIQFNVCU.jsx → BTPWLTJU.jsx} +9 -18
  24. package/dist/chunk/{6MXKM4GA.js → C4WAO4VB.js} +9 -10
  25. package/dist/chunk/{2W32Z6JZ.js → DBAO7VQW.js} +9 -10
  26. package/dist/chunk/{5SRZ3YYC.js → DEA5DIWS.js} +7 -8
  27. package/dist/chunk/{CCA5XJM6.jsx → DH5DKFFF.jsx} +19 -37
  28. package/dist/chunk/{Y4LH2CR6.jsx → DS2MX7YY.jsx} +8 -11
  29. package/dist/chunk/{34OZO53S.js → DVI7TRLG.js} +9 -12
  30. package/dist/chunk/{QQUR4MWN.js → E2TLJMGI.js} +15 -17
  31. package/dist/chunk/{H4RSHLA7.jsx → EH5LPBSV.jsx} +9 -13
  32. package/dist/chunk/{F3QPTRGW.jsx → EIGYBOW2.jsx} +27 -34
  33. package/dist/chunk/{HU7FZMJI.jsx → ENXUS2WG.jsx} +9 -14
  34. package/dist/chunk/{AX5SMQMA.js → EUXWRO3A.js} +16 -17
  35. package/dist/chunk/{K54W24N6.jsx → FHWNUAQM.jsx} +10 -15
  36. package/dist/chunk/{7S43DIPW.js → FX6TOMB3.js} +13 -25
  37. package/dist/chunk/{MBQQASZE.js → GUQTNAZU.js} +9 -10
  38. package/dist/chunk/{B7LE23PE.jsx → H5QZC4VW.jsx} +9 -13
  39. package/dist/chunk/{NK4T7LIZ.jsx → H7SWP54F.jsx} +7 -11
  40. package/dist/chunk/{M2FICVVI.js → HQEG6EKY.js} +9 -11
  41. package/dist/chunk/{U3XJZI3X.jsx → I4VF53LH.jsx} +15 -25
  42. package/dist/chunk/{G2WIACWP.js → JOWPVE6E.js} +8 -9
  43. package/dist/chunk/{SN5TXTB6.jsx → JZ7ZQZT4.jsx} +17 -54
  44. package/dist/chunk/{X3BMEEJH.js → KMFRZGLF.js} +34 -14
  45. package/dist/chunk/{GZVCPLKK.jsx → KQ4BIFPS.jsx} +9 -10
  46. package/dist/chunk/{WPFSEVTX.js → LFWIA7VB.js} +11 -14
  47. package/dist/chunk/{3O5VTKDF.jsx → LKOJO4VB.jsx} +16 -32
  48. package/dist/chunk/{5XD5ZSBX.js → M2C67TPA.js} +13 -17
  49. package/dist/chunk/{2GATVLPK.js → M63JXHU4.js} +7 -8
  50. package/dist/chunk/MOG4V2NQ.jsx +15 -0
  51. package/dist/chunk/{XUVXUPEH.js → MZD7ZKWI.js} +2 -7
  52. package/dist/chunk/{YCYZZGN2.jsx → NCURFCYQ.jsx} +9 -8
  53. package/dist/chunk/{5ONYCKM3.jsx → NEBB7COJ.jsx} +1 -1
  54. package/dist/chunk/{Q7NPTAJI.js → NNZQ2FQW.js} +8 -9
  55. package/dist/chunk/{QGV2SUTQ.jsx → O5AHG7DQ.jsx} +16 -19
  56. package/dist/chunk/{6YQ3EF2J.js → O62NKGT4.js} +9 -11
  57. package/dist/chunk/{2J42A7KM.js → OA5UZFKE.js} +2 -2
  58. package/dist/chunk/{CPMYIT5J.jsx → OAH52ZNM.jsx} +11 -12
  59. package/dist/chunk/OAPCRIL5.js +8 -0
  60. package/dist/chunk/{T4NRAKVA.jsx → OEZAIQU2.jsx} +9 -10
  61. package/dist/chunk/{YV5BACLX.js → OIGKROX4.js} +9 -9
  62. package/dist/chunk/{IQJBNZOX.jsx → PES3MXH3.jsx} +8 -6
  63. package/dist/chunk/{DXYB7RYX.js → PJNGX4UT.js} +9 -8
  64. package/dist/chunk/{3HMZSTYX.js → PL4PGQFF.js} +8 -10
  65. package/dist/chunk/{PRMWTLUY.jsx → POFK2TVP.jsx} +8 -9
  66. package/dist/chunk/{WKVZFHUH.jsx → PVOFTEOB.jsx} +14 -25
  67. package/dist/chunk/{HPDOBQ3V.js → QEMQBM6W.js} +1 -1
  68. package/dist/chunk/{L7OSYHVR.js → QFAL6GWC.js} +1 -1
  69. package/dist/chunk/{PSLLOEMD.js → QKFZ3XTM.js} +14 -28
  70. package/dist/chunk/{IZC6PKGT.jsx → QZQUUXCF.jsx} +10 -14
  71. package/dist/chunk/{MMS6MJ72.js → R6Q7TUSQ.js} +8 -11
  72. package/dist/chunk/{3QQZKR3F.jsx → RCXMZN3G.jsx} +1 -1
  73. package/dist/chunk/{WM2IZOYM.jsx → RG3IJESS.jsx} +48 -80
  74. package/dist/chunk/{SWUA2VFC.js → SAI3RCJY.js} +7 -10
  75. package/dist/chunk/{ZC6KWJ4T.jsx → SBKJA5N2.jsx} +7 -12
  76. package/dist/chunk/{RZBYC7DR.jsx → SBLZHOW2.jsx} +3 -12
  77. package/dist/chunk/SDD2HKR3.js +71 -0
  78. package/dist/chunk/{WIVXL7HJ.jsx → SL2ZPLSH.jsx} +9 -13
  79. package/dist/chunk/{3WGLTS6O.js → SRPSYZUL.js} +7 -8
  80. package/dist/chunk/{DOPROT6M.jsx → SWZSXMPJ.jsx} +10 -8
  81. package/dist/chunk/{BY62F4IV.jsx → TEZHN26Z.jsx} +8 -11
  82. package/dist/chunk/{5EVN6V64.js → TMTD3AUG.js} +12 -15
  83. package/dist/chunk/{I5UG2QUO.js → TROPIN4C.js} +1 -7
  84. package/dist/chunk/{NMGUCD2L.jsx → TVCIHLER.jsx} +2 -11
  85. package/dist/chunk/{5CYHETDY.js → UIAQFG6P.js} +7 -7
  86. package/dist/chunk/{7PKUSZKY.jsx → USV2CYTP.jsx} +9 -9
  87. package/dist/chunk/{GXWVYON6.js → V2YBSJKS.js} +8 -10
  88. package/dist/chunk/{WQQVH7YG.jsx → VLUE7XIS.jsx} +34 -19
  89. package/dist/chunk/{TC2QHQ47.jsx → WPEIDU6T.jsx} +17 -42
  90. package/dist/chunk/{LCESUDZB.js → WRLQ7Y6E.js} +5 -13
  91. package/dist/chunk/{34MDPAG6.js → WT3OTYHP.js} +27 -11
  92. package/dist/chunk/{IOTZAUDA.jsx → WUTUKX4C.jsx} +1 -1
  93. package/dist/chunk/{DU4TY3XA.jsx → WZ7FNJXM.jsx} +11 -15
  94. package/dist/chunk/X34KVQNW.js +1 -1
  95. package/dist/chunk/{P7I44WC4.jsx → XHA6B6L2.jsx} +21 -22
  96. package/dist/chunk/{TOVWS5LG.jsx → XNZ7GOP4.jsx} +15 -24
  97. package/dist/chunk/{MYMGOYXH.js → XR4WJDUT.js} +2 -2
  98. package/dist/chunk/{SJSLQDBZ.jsx → YE6V66JY.jsx} +10 -18
  99. package/dist/chunk/{W43X4SNE.js → YS6KIHEB.js} +6 -6
  100. package/dist/chunk/{QZYE5W7T.jsx → ZOMTU4P2.jsx} +11 -19
  101. package/dist/components/accordion/index.d.ts +2 -7
  102. package/dist/components/accordion/index.js +1 -1
  103. package/dist/components/accordion/index.jsx +7 -8
  104. package/dist/components/avatar/index.d.ts +2 -2
  105. package/dist/components/avatar/index.js +1 -1
  106. package/dist/components/avatar/index.jsx +5 -6
  107. package/dist/components/carousel/index.d.ts +3 -8
  108. package/dist/components/carousel/index.js +1 -1
  109. package/dist/components/carousel/index.jsx +5 -6
  110. package/dist/components/checkbox/index.d.ts +3 -8
  111. package/dist/components/checkbox/index.js +1 -1
  112. package/dist/components/checkbox/index.jsx +8 -9
  113. package/dist/components/clipboard/index.d.ts +2 -2
  114. package/dist/components/clipboard/index.js +1 -1
  115. package/dist/components/clipboard/index.jsx +5 -6
  116. package/dist/components/collapsible/index.d.ts +2 -7
  117. package/dist/components/collapsible/index.js +1 -1
  118. package/dist/components/collapsible/index.jsx +6 -7
  119. package/dist/components/collection.d.ts +3 -3
  120. package/dist/components/collection.js +1 -1
  121. package/dist/components/collection.jsx +1 -1
  122. package/dist/components/color-picker/index.d.ts +4 -14
  123. package/dist/components/color-picker/index.js +1 -1
  124. package/dist/components/color-picker/index.jsx +10 -10
  125. package/dist/components/combobox/index.d.ts +3 -13
  126. package/dist/components/combobox/index.js +2 -2
  127. package/dist/components/combobox/index.jsx +12 -12
  128. package/dist/components/date-picker/index.d.ts +4 -16
  129. package/dist/components/date-picker/index.js +1 -1
  130. package/dist/components/date-picker/index.jsx +7 -8
  131. package/dist/components/dialog/index.d.ts +3 -8
  132. package/dist/components/dialog/index.js +1 -1
  133. package/dist/components/dialog/index.jsx +7 -8
  134. package/dist/components/editable/index.d.ts +2 -12
  135. package/dist/components/editable/index.js +1 -1
  136. package/dist/components/editable/index.jsx +8 -8
  137. package/dist/components/field/index.d.ts +2 -2
  138. package/dist/components/field/index.js +1 -1
  139. package/dist/components/field/index.jsx +4 -3
  140. package/dist/components/fieldset/index.d.ts +2 -2
  141. package/dist/components/fieldset/index.js +1 -1
  142. package/dist/components/fieldset/index.jsx +2 -2
  143. package/dist/components/file-upload/index.d.ts +2 -2
  144. package/dist/components/file-upload/index.js +1 -1
  145. package/dist/components/file-upload/index.jsx +8 -8
  146. package/dist/components/focus-trap/index.d.ts +1 -1
  147. package/dist/components/format/index.js +1 -1
  148. package/dist/components/format/index.jsx +4 -5
  149. package/dist/components/frame/index.js +1 -1
  150. package/dist/components/frame/index.jsx +4 -5
  151. package/dist/components/hover-card/index.d.ts +3 -8
  152. package/dist/components/hover-card/index.js +1 -1
  153. package/dist/components/hover-card/index.jsx +7 -8
  154. package/dist/components/index.d.ts +2 -1
  155. package/dist/components/index.js +45 -45
  156. package/dist/components/index.jsx +295 -297
  157. package/dist/components/menu/index.d.ts +4 -9
  158. package/dist/components/menu/index.js +1 -1
  159. package/dist/components/menu/index.jsx +7 -8
  160. package/dist/components/number-input/index.d.ts +2 -7
  161. package/dist/components/number-input/index.js +1 -1
  162. package/dist/components/number-input/index.jsx +8 -8
  163. package/dist/components/pagination/index.d.ts +2 -7
  164. package/dist/components/pagination/index.js +1 -1
  165. package/dist/components/pagination/index.jsx +5 -6
  166. package/dist/components/pin-input/index.d.ts +2 -7
  167. package/dist/components/pin-input/index.js +1 -1
  168. package/dist/components/pin-input/index.jsx +8 -8
  169. package/dist/components/popover/index.d.ts +3 -8
  170. package/dist/components/popover/index.js +1 -1
  171. package/dist/components/popover/index.jsx +7 -8
  172. package/dist/components/presence/index.d.ts +2 -2
  173. package/dist/components/presence/index.js +1 -1
  174. package/dist/components/presence/index.jsx +3 -3
  175. package/dist/components/progress/index.d.ts +2 -7
  176. package/dist/components/progress/index.js +1 -1
  177. package/dist/components/progress/index.jsx +5 -6
  178. package/dist/components/qr-code/index.d.ts +2 -7
  179. package/dist/components/qr-code/index.js +1 -1
  180. package/dist/components/qr-code/index.jsx +5 -6
  181. package/dist/components/radio-group/index.d.ts +2 -7
  182. package/dist/components/radio-group/index.js +1 -1
  183. package/dist/components/radio-group/index.jsx +5 -6
  184. package/dist/components/rating-group/index.d.ts +5 -10
  185. package/dist/components/rating-group/index.js +1 -1
  186. package/dist/components/rating-group/index.jsx +8 -8
  187. package/dist/components/segment-group/index.d.ts +3 -8
  188. package/dist/components/segment-group/index.js +1 -1
  189. package/dist/components/segment-group/index.jsx +5 -6
  190. package/dist/components/select/index.d.ts +3 -13
  191. package/dist/components/select/index.js +2 -2
  192. package/dist/components/select/index.jsx +12 -12
  193. package/dist/components/signature-pad/index.d.ts +2 -2
  194. package/dist/components/signature-pad/index.js +1 -1
  195. package/dist/components/signature-pad/index.jsx +8 -8
  196. package/dist/components/slider/index.d.ts +3 -8
  197. package/dist/components/slider/index.js +1 -1
  198. package/dist/components/slider/index.jsx +5 -6
  199. package/dist/components/splitter/index.d.ts +3 -8
  200. package/dist/components/splitter/index.js +1 -1
  201. package/dist/components/splitter/index.jsx +5 -6
  202. package/dist/components/steps/index.d.ts +6 -10
  203. package/dist/components/steps/index.js +1 -1
  204. package/dist/components/steps/index.jsx +5 -6
  205. package/dist/components/switch/index.d.ts +2 -7
  206. package/dist/components/switch/index.js +1 -1
  207. package/dist/components/switch/index.jsx +8 -8
  208. package/dist/components/tabs/index.d.ts +2 -7
  209. package/dist/components/tabs/index.js +1 -1
  210. package/dist/components/tabs/index.jsx +7 -8
  211. package/dist/components/tags-input/index.d.ts +2 -7
  212. package/dist/components/tags-input/index.js +1 -1
  213. package/dist/components/tags-input/index.jsx +8 -8
  214. package/dist/components/time-picker/index.d.ts +3 -13
  215. package/dist/components/time-picker/index.js +1 -1
  216. package/dist/components/time-picker/index.jsx +7 -8
  217. package/dist/components/timer/index.d.ts +2 -2
  218. package/dist/components/timer/index.js +1 -1
  219. package/dist/components/timer/index.jsx +5 -6
  220. package/dist/components/toast/index.d.ts +6 -7
  221. package/dist/components/toast/index.js +1 -1
  222. package/dist/components/toast/index.jsx +5 -2
  223. package/dist/components/toggle/index.d.ts +5 -34
  224. package/dist/components/toggle/index.js +1 -1
  225. package/dist/components/toggle/index.jsx +2 -4
  226. package/dist/components/toggle-group/index.d.ts +3 -8
  227. package/dist/components/toggle-group/index.js +1 -1
  228. package/dist/components/toggle-group/index.jsx +5 -6
  229. package/dist/components/tooltip/index.d.ts +3 -8
  230. package/dist/components/tooltip/index.js +1 -1
  231. package/dist/components/tooltip/index.jsx +7 -8
  232. package/dist/components/tour/index.d.ts +4 -4
  233. package/dist/components/tour/index.js +1 -1
  234. package/dist/components/tour/index.jsx +7 -8
  235. package/dist/components/tree-view/index.d.ts +6 -16
  236. package/dist/components/tree-view/index.js +2 -2
  237. package/dist/components/tree-view/index.jsx +9 -10
  238. package/dist/index.d.ts +2 -1
  239. package/dist/index.js +47 -47
  240. package/dist/index.jsx +295 -297
  241. package/dist/providers/environment/index.js +1 -1
  242. package/dist/providers/environment/index.jsx +2 -3
  243. package/dist/providers/index.js +2 -2
  244. package/dist/providers/index.jsx +3 -4
  245. package/dist/providers/locale/index.js +1 -1
  246. package/dist/providers/locale/index.jsx +2 -2
  247. package/dist/{use-presence-Ct1onT3-.d.ts → use-presence-C07V_WCb.d.ts} +1 -1
  248. package/package.json +71 -78
  249. package/dist/chunk/52WUF3CY.jsx +0 -26
  250. package/dist/chunk/BSPFGETO.js +0 -21
  251. package/dist/chunk/CTTG4GSG.js +0 -30
  252. package/dist/chunk/DT73WLR4.js +0 -5
  253. package/dist/chunk/JHG4EID2.jsx +0 -233
  254. package/dist/chunk/KGOB2IMX.jsx +0 -7
  255. package/dist/chunk/MV3KTL7M.js +0 -107
@@ -1,14 +1,14 @@
1
- import { useFieldContext } from './X3BMEEJH.js';
2
- import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './LCESUDZB.js';
1
+ import { useFieldContext } from './KMFRZGLF.js';
2
+ import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './WRLQ7Y6E.js';
3
3
  import { createSplitProps } from './ZMHI4GDJ.js';
4
4
  import { ark } from './EPLBB4QN.js';
5
- import { useEnvironmentContext } from './QODB3C3M.js';
6
- import { useLocaleContext } from './HPDOBQ3V.js';
7
- import { createContext } from './I5UG2QUO.js';
5
+ import { useEnvironmentContext } from './6MQ6S5JP.js';
6
+ import { useLocaleContext } from './QEMQBM6W.js';
7
+ import { createContext } from './TROPIN4C.js';
8
8
  import { __export } from './ESLJRKWD.js';
9
9
  import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
10
10
  import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
11
- import { Show, createMemo, createUniqueId, splitProps, createEffect } from 'solid-js';
11
+ import { Show, createUniqueId, createMemo } from 'solid-js';
12
12
  import * as combobox from '@zag-js/combobox';
13
13
  export { anatomy } from '@zag-js/combobox';
14
14
 
@@ -57,12 +57,10 @@ var ComboboxInput = (props) => {
57
57
  };
58
58
 
59
59
  // src/components/combobox/use-combobox-item-context.ts
60
- var [ComboboxItemProvider, useComboboxItemContext] = createContext(
61
- {
62
- hookName: "useComboboxItemContext",
63
- providerName: "<ComboboxItemProvider />"
64
- }
65
- );
60
+ var [ComboboxItemProvider, useComboboxItemContext] = createContext({
61
+ hookName: "useComboboxItemContext",
62
+ providerName: "<ComboboxItemProvider />"
63
+ });
66
64
 
67
65
  // src/components/combobox/use-combobox-item-props-context.ts
68
66
  var [ComboboxItemPropsProvider, useComboboxItemPropsContext] = createContext({
@@ -161,7 +159,7 @@ var useCombobox = (props) => {
161
159
  const environment = useEnvironmentContext();
162
160
  const id = createUniqueId();
163
161
  const field = useFieldContext();
164
- const initialContext = createMemo(() => ({
162
+ const machineProps = createMemo(() => ({
165
163
  id,
166
164
  ids: {
167
165
  label: field?.().ids.label,
@@ -173,28 +171,16 @@ var useCombobox = (props) => {
173
171
  invalid: field?.().invalid,
174
172
  dir: locale().dir,
175
173
  getRootNode: environment().getRootNode,
176
- open: props.defaultOpen,
177
- value: props.defaultValue,
178
- "open.controlled": props.open !== void 0,
179
174
  ...props
180
175
  }));
181
- const context = createMemo(() => {
182
- const [, restProps] = splitProps(initialContext(), ["collection"]);
183
- return restProps;
184
- });
185
- const [state, send, service] = useMachine(combobox.machine(initialContext()), {
186
- context
187
- });
188
- createEffect(() => {
189
- service.setContext({ collection: props.collection });
190
- });
191
- return createMemo(() => combobox.connect(state, send, normalizeProps));
176
+ const service = useMachine(combobox.machine, machineProps);
177
+ return createMemo(() => combobox.connect(service, normalizeProps));
192
178
  };
193
179
 
194
180
  // src/components/combobox/combobox-root.tsx
195
181
  var ComboboxRoot = (props) => {
196
182
  const [presenceProps, comboboxProps] = splitPresenceProps(props);
197
- const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ["allowCustomValue", "autoFocus", "closeOnSelect", "collection", "composite", "defaultOpen", "defaultValue", "disabled", "disableLayer", "form", "highlightedValue", "id", "ids", "inputBehavior", "inputValue", "invalid", "loopFocus", "multiple", "name", "navigate", "onFocusOutside", "onHighlightChange", "onInputValueChange", "onInteractOutside", "onOpenChange", "onOpenChange", "onPointerDownOutside", "onValueChange", "open", "openOnChange", "openOnClick", "openOnKeyPress", "placeholder", "positioning", "readOnly", "required", "scrollToIndexFn", "selectionBehavior", "translations", "value"]);
183
+ const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ["allowCustomValue", "autoFocus", "closeOnSelect", "collection", "composite", "defaultHighlightedValue", "defaultInputValue", "defaultOpen", "defaultValue", "disabled", "disableLayer", "form", "highlightedValue", "id", "ids", "inputBehavior", "inputValue", "invalid", "loopFocus", "multiple", "name", "navigate", "onFocusOutside", "onHighlightChange", "onInputValueChange", "onInteractOutside", "onOpenChange", "onOpenChange", "onPointerDownOutside", "onValueChange", "open", "openOnChange", "openOnClick", "openOnKeyPress", "placeholder", "positioning", "readOnly", "required", "scrollToIndexFn", "selectionBehavior", "translations", "value"]);
198
184
  const api = useCombobox(useComboboxProps);
199
185
  const apiPresence = usePresence(mergeProps(presenceProps, () => ({
200
186
  present: api().open
@@ -3,12 +3,12 @@ import {
3
3
  splitPresenceProps,
4
4
  usePresence,
5
5
  usePresenceContext
6
- } from "./E72NMPSK.jsx";
6
+ } from "./2FYSIKNK.jsx";
7
7
  import {
8
8
  RenderStrategyProvider,
9
9
  splitRenderStrategyProps,
10
10
  useRenderStrategyContext
11
- } from "./5ONYCKM3.jsx";
11
+ } from "./NEBB7COJ.jsx";
12
12
  import {
13
13
  createSplitProps
14
14
  } from "./6WEDGJKQ.jsx";
@@ -17,13 +17,13 @@ import {
17
17
  } from "./UFYZ7HLU.jsx";
18
18
  import {
19
19
  useEnvironmentContext
20
- } from "./5O4RWSWO.jsx";
20
+ } from "./BPYAMTER.jsx";
21
21
  import {
22
22
  useLocaleContext
23
- } from "./3QQZKR3F.jsx";
23
+ } from "./RCXMZN3G.jsx";
24
24
  import {
25
25
  createContext
26
- } from "./NMGUCD2L.jsx";
26
+ } from "./TVCIHLER.jsx";
27
27
  import {
28
28
  __export
29
29
  } from "./7IUG3E2V.jsx";
@@ -108,19 +108,17 @@ import * as dialog from "@zag-js/dialog";
108
108
  import { normalizeProps, useMachine } from "@zag-js/solid";
109
109
  import { createMemo, createUniqueId } from "solid-js";
110
110
  var useDialog = (props = {}) => {
111
+ const id = createUniqueId();
111
112
  const locale = useLocaleContext();
112
113
  const environment = useEnvironmentContext();
113
- const id = createUniqueId();
114
- const context = createMemo(() => ({
114
+ const machineProps = createMemo(() => ({
115
115
  id,
116
116
  dir: locale().dir,
117
117
  getRootNode: environment().getRootNode,
118
- open: props.defaultOpen,
119
- "open.controlled": props.open !== void 0,
120
118
  ...props
121
119
  }));
122
- const [state, send] = useMachine(dialog.machine(context()), { context });
123
- return createMemo(() => dialog.connect(state, send, normalizeProps));
120
+ const service = useMachine(dialog.machine, machineProps);
121
+ return createMemo(() => dialog.connect(service, normalizeProps));
124
122
  };
125
123
 
126
124
  // src/components/dialog/dialog-root.tsx
@@ -163,9 +161,7 @@ import { mergeProps as mergeProps7 } from "@zag-js/solid";
163
161
  var DialogRootProvider = (props) => {
164
162
  const [presenceProps, dialogProps] = splitPresenceProps(props);
165
163
  const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
166
- const apiPresence = usePresence(
167
- mergeProps7(presenceProps, () => ({ present: dialogProps.value().open }))
168
- );
164
+ const apiPresence = usePresence(mergeProps7(presenceProps, () => ({ present: dialogProps.value().open })));
169
165
  return <DialogProvider value={dialogProps.value}>
170
166
  <RenderStrategyProvider value={renderStrategyProps}>
171
167
  <PresenceProvider value={apiPresence}>{dialogProps.children}</PresenceProvider>
@@ -1,9 +1,9 @@
1
- import { useFieldContext } from './X3BMEEJH.js';
1
+ import { useFieldContext } from './KMFRZGLF.js';
2
2
  import { createSplitProps } from './ZMHI4GDJ.js';
3
3
  import { ark } from './EPLBB4QN.js';
4
- import { useEnvironmentContext } from './QODB3C3M.js';
5
- import { useLocaleContext } from './HPDOBQ3V.js';
6
- import { createContext } from './I5UG2QUO.js';
4
+ import { useEnvironmentContext } from './6MQ6S5JP.js';
5
+ import { useLocaleContext } from './QEMQBM6W.js';
6
+ import { createContext } from './TROPIN4C.js';
7
7
  import { __export } from './ESLJRKWD.js';
8
8
  import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
9
9
  import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
@@ -62,11 +62,11 @@ var EditablePreview = (props) => {
62
62
  return createComponent(ark.span, mergedProps);
63
63
  };
64
64
  var useEditable = (props = {}) => {
65
+ const id = createUniqueId();
65
66
  const locale = useLocaleContext();
66
67
  const environment = useEnvironmentContext();
67
- const id = createUniqueId();
68
68
  const field = useFieldContext();
69
- const context = createMemo(() => ({
69
+ const machineProps = createMemo(() => ({
70
70
  id,
71
71
  ids: {
72
72
  label: field?.().ids.label,
@@ -78,13 +78,10 @@ var useEditable = (props = {}) => {
78
78
  readOnly: field?.().readOnly,
79
79
  required: field?.().required,
80
80
  getRootNode: environment().getRootNode,
81
- edit: props.defaultEdit,
82
- value: props.defaultValue,
83
- "edit.controlled": props.edit !== void 0,
84
81
  ...props
85
82
  }));
86
- const [state, send] = useMachine(editable.machine(context()), { context });
87
- return createMemo(() => editable.connect(state, send, normalizeProps));
83
+ const service = useMachine(editable.machine, machineProps);
84
+ return createMemo(() => editable.connect(service, normalizeProps));
88
85
  };
89
86
 
90
87
  // src/components/editable/editable-root.tsx
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createContext
3
- } from "./NMGUCD2L.jsx";
3
+ } from "./TVCIHLER.jsx";
4
4
 
5
5
  // src/providers/locale/locale-provider.tsx
6
6
  import { isRTL } from "@zag-js/i18n-utils";
@@ -1,12 +1,12 @@
1
+ import {
2
+ useFieldContext
3
+ } from "./XHA6B6L2.jsx";
1
4
  import {
2
5
  PresenceProvider,
3
6
  splitPresenceProps,
4
7
  usePresence,
5
8
  usePresenceContext
6
- } from "./E72NMPSK.jsx";
7
- import {
8
- useFieldContext
9
- } from "./P7I44WC4.jsx";
9
+ } from "./2FYSIKNK.jsx";
10
10
  import {
11
11
  createSplitProps
12
12
  } from "./6WEDGJKQ.jsx";
@@ -15,13 +15,13 @@ import {
15
15
  } from "./UFYZ7HLU.jsx";
16
16
  import {
17
17
  useEnvironmentContext
18
- } from "./5O4RWSWO.jsx";
18
+ } from "./BPYAMTER.jsx";
19
19
  import {
20
20
  useLocaleContext
21
- } from "./3QQZKR3F.jsx";
21
+ } from "./RCXMZN3G.jsx";
22
22
  import {
23
23
  createContext
24
- } from "./NMGUCD2L.jsx";
24
+ } from "./TVCIHLER.jsx";
25
25
  import {
26
26
  __export
27
27
  } from "./7IUG3E2V.jsx";
@@ -75,10 +75,7 @@ var ColorPickerAreaThumb = (props) => {
75
75
  // src/components/color-picker/color-picker-channel-input.tsx
76
76
  import { mergeProps as mergeProps4 } from "@zag-js/solid";
77
77
  var ColorPickerChannelInput = (props) => {
78
- const [channelProps, inputProps] = createSplitProps()(props, [
79
- "channel",
80
- "orientation"
81
- ]);
78
+ const [channelProps, inputProps] = createSplitProps()(props, ["channel", "orientation"]);
82
79
  const api = useColorPickerContext();
83
80
  const mergedProps = mergeProps4(() => api().getChannelInputProps(channelProps), inputProps);
84
81
  return <ark.input {...mergedProps} />;
@@ -102,10 +99,7 @@ var [ColorPickerFormatPropsProvider, useColorPickerFormatPropsContext] = createC
102
99
 
103
100
  // src/components/color-picker/color-picker-channel-slider.tsx
104
101
  var ColorPickerChannelSlider = (props) => {
105
- const [channelProps, localProps] = createSplitProps()(props, [
106
- "channel",
107
- "orientation"
108
- ]);
102
+ const [channelProps, localProps] = createSplitProps()(props, ["channel", "orientation"]);
109
103
  const api = useColorPickerContext();
110
104
  const formatProps = useColorPickerFormatPropsContext();
111
105
  const channelSliderProps = mergeProps5(channelProps, formatProps);
@@ -120,10 +114,7 @@ import { mergeProps as mergeProps6 } from "@zag-js/solid";
120
114
  var ColorPickerChannelSliderLabel = (props) => {
121
115
  const colorPicker2 = useColorPickerContext();
122
116
  const channelProps = useColorPickerChannelPropsContext();
123
- const mergedProps = mergeProps6(
124
- () => colorPicker2().getChannelSliderLabelProps(channelProps),
125
- props
126
- );
117
+ const mergedProps = mergeProps6(() => colorPicker2().getChannelSliderLabelProps(channelProps), props);
127
118
  return <ark.label {...mergedProps} />;
128
119
  };
129
120
 
@@ -155,10 +146,7 @@ var ColorPickerChannelSliderValueText = (props) => {
155
146
  const colorPicker2 = useColorPickerContext();
156
147
  const localeContext = useLocaleContext();
157
148
  const channelProps = useColorPickerChannelPropsContext();
158
- const mergedProps = mergeProps9(
159
- () => colorPicker2().getChannelSliderValueTextProps(channelProps),
160
- props
161
- );
149
+ const mergedProps = mergeProps9(() => colorPicker2().getChannelSliderValueTextProps(channelProps), props);
162
150
  return <ark.span {...mergedProps}>
163
151
  {props.children || colorPicker2().getChannelValueText(channelProps.channel, localeContext().locale)}
164
152
  </ark.span>;
@@ -206,9 +194,7 @@ var ColorPickerFormatSelect = (props) => {
206
194
  const api = useColorPickerContext();
207
195
  const mergedProps = mergeProps13(() => api().getFormatSelectProps(), props);
208
196
  return <ark.select {...mergedProps}>
209
- <Index each={["rgba", "hsla", "hsba"]}>
210
- {(format) => <ark.option value={format()}>{format()}</ark.option>}
211
- </Index>
197
+ <Index each={["rgba", "hsla", "hsba"]}>{(format) => <ark.option value={format()}>{format()}</ark.option>}</Index>
212
198
  </ark.select>;
213
199
  };
214
200
 
@@ -257,11 +243,11 @@ import * as colorPicker from "@zag-js/color-picker";
257
243
  import { normalizeProps, useMachine } from "@zag-js/solid";
258
244
  import { createMemo, createUniqueId } from "solid-js";
259
245
  var useColorPicker = (props = {}) => {
246
+ const id = createUniqueId();
260
247
  const locale = useLocaleContext();
261
248
  const environment = useEnvironmentContext();
262
249
  const field = useFieldContext();
263
- const id = createUniqueId();
264
- const context = createMemo(() => ({
250
+ const machineProps = createMemo(() => ({
265
251
  id,
266
252
  ids: {
267
253
  label: field?.().ids.label,
@@ -273,47 +259,42 @@ var useColorPicker = (props = {}) => {
273
259
  readOnly: field?.().readOnly,
274
260
  required: field?.().required,
275
261
  getRootNode: environment().getRootNode,
276
- open: props.defaultOpen,
277
- "open.controlled": props.open !== void 0,
278
- value: props.defaultValue,
279
262
  ...props
280
263
  }));
281
- const [state, send] = useMachine(colorPicker.machine(context()), { context });
282
- return createMemo(() => colorPicker.connect(state, send, normalizeProps));
264
+ const service = useMachine(colorPicker.machine, machineProps);
265
+ return createMemo(() => colorPicker.connect(service, normalizeProps));
283
266
  };
284
267
 
285
268
  // src/components/color-picker/color-picker-root.tsx
286
269
  var ColorPickerRoot = (props) => {
287
270
  const [presenceProps, colorPickerProps] = splitPresenceProps(props);
288
- const [useColorPickerProps, localProps] = createSplitProps()(
289
- colorPickerProps,
290
- [
291
- "closeOnSelect",
292
- "defaultOpen",
293
- "defaultValue",
294
- "disabled",
295
- "format",
296
- "id",
297
- "ids",
298
- "initialFocusEl",
299
- "invalid",
300
- "name",
301
- "name",
302
- "onFocusOutside",
303
- "onFormatChange",
304
- "onInteractOutside",
305
- "onOpenChange",
306
- "onPointerDownOutside",
307
- "onValueChange",
308
- "onValueChangeEnd",
309
- "open",
310
- "openAutoFocus",
311
- "positioning",
312
- "readOnly",
313
- "required",
314
- "value"
315
- ]
316
- );
271
+ const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, [
272
+ "closeOnSelect",
273
+ "defaultOpen",
274
+ "defaultValue",
275
+ "defaultFormat",
276
+ "disabled",
277
+ "format",
278
+ "id",
279
+ "ids",
280
+ "initialFocusEl",
281
+ "invalid",
282
+ "name",
283
+ "name",
284
+ "onFocusOutside",
285
+ "onFormatChange",
286
+ "onInteractOutside",
287
+ "onOpenChange",
288
+ "onPointerDownOutside",
289
+ "onValueChange",
290
+ "onValueChangeEnd",
291
+ "open",
292
+ "openAutoFocus",
293
+ "positioning",
294
+ "readOnly",
295
+ "required",
296
+ "value"
297
+ ]);
317
298
  const api = useColorPicker(useColorPickerProps);
318
299
  const apiPresence = usePresence(mergeProps18(presenceProps, () => ({ present: api().open })));
319
300
  const mergedProps = mergeProps18(() => api().getRootProps(), localProps);
@@ -328,13 +309,8 @@ var ColorPickerRoot = (props) => {
328
309
  import { mergeProps as mergeProps19 } from "@zag-js/solid";
329
310
  var ColorPickerRootProvider = (props) => {
330
311
  const [presenceProps, colorPickerProps] = splitPresenceProps(props);
331
- const [{ value: colorPicker2 }, localProps] = createSplitProps()(
332
- colorPickerProps,
333
- ["value"]
334
- );
335
- const apiPresence = usePresence(
336
- mergeProps19(presenceProps, () => ({ present: colorPicker2().open }))
337
- );
312
+ const [{ value: colorPicker2 }, localProps] = createSplitProps()(colorPickerProps, ["value"]);
313
+ const apiPresence = usePresence(mergeProps19(presenceProps, () => ({ present: colorPicker2().open })));
338
314
  const mergedProps = mergeProps19(() => colorPicker2().getRootProps(), localProps);
339
315
  return <ColorPickerProvider value={colorPicker2}>
340
316
  <PresenceProvider value={apiPresence}>
@@ -354,10 +330,7 @@ var [ColorPickerSwatchPropsProvider, useColorPickerSwatchPropsContext] = createC
354
330
 
355
331
  // src/components/color-picker/color-picker-swatch.tsx
356
332
  var ColorPickerSwatch = (props) => {
357
- const [swatchProps, localProps] = createSplitProps()(props, [
358
- "respectAlpha",
359
- "value"
360
- ]);
333
+ const [swatchProps, localProps] = createSplitProps()(props, ["respectAlpha", "value"]);
361
334
  const api = useColorPickerContext();
362
335
  const mergedProps = mergeProps20(() => api().getSwatchProps(swatchProps), localProps);
363
336
  return <ColorPickerSwatchPropsProvider value={swatchProps}>
@@ -385,10 +358,7 @@ var ColorPickerSwatchIndicator = (props) => {
385
358
  // src/components/color-picker/color-picker-swatch-trigger.tsx
386
359
  import { mergeProps as mergeProps23 } from "@zag-js/solid";
387
360
  var ColorPickerSwatchTrigger = (props) => {
388
- const [triggerProps, localProps] = createSplitProps()(props, [
389
- "value",
390
- "disabled"
391
- ]);
361
+ const [triggerProps, localProps] = createSplitProps()(props, ["value", "disabled"]);
392
362
  const api = useColorPickerContext();
393
363
  const mergedProps = mergeProps23(() => api().getSwatchTriggerProps(triggerProps), localProps);
394
364
  return <ark.button {...mergedProps} />;
@@ -415,9 +385,7 @@ var ColorPickerTrigger = (props) => {
415
385
  import { mergeProps as mergeProps26 } from "@zag-js/solid";
416
386
  import { createMemo as createMemo2 } from "solid-js";
417
387
  var ColorPickerValueSwatch = (props) => {
418
- const [{ respectAlpha }, localProps] = createSplitProps()(props, [
419
- "respectAlpha"
420
- ]);
388
+ const [{ respectAlpha }, localProps] = createSplitProps()(props, ["respectAlpha"]);
421
389
  const colorPicker2 = useColorPickerContext();
422
390
  const swatchProps = createMemo2(() => ({
423
391
  respectAlpha,
@@ -1,8 +1,8 @@
1
1
  import { createSplitProps } from './ZMHI4GDJ.js';
2
2
  import { ark } from './EPLBB4QN.js';
3
- import { useEnvironmentContext } from './QODB3C3M.js';
4
- import { useLocaleContext } from './HPDOBQ3V.js';
5
- import { createContext } from './I5UG2QUO.js';
3
+ import { useEnvironmentContext } from './6MQ6S5JP.js';
4
+ import { useLocaleContext } from './QEMQBM6W.js';
5
+ import { createContext } from './TROPIN4C.js';
6
6
  import { __export } from './ESLJRKWD.js';
7
7
  import { createComponent } from 'solid-js/web';
8
8
  import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
@@ -25,20 +25,17 @@ var ToggleGroupItem = (props) => {
25
25
  return createComponent(ark.button, mergedProps);
26
26
  };
27
27
  var useToggleGroup = (props = {}) => {
28
+ const id = createUniqueId();
28
29
  const locale = useLocaleContext();
29
30
  const environment = useEnvironmentContext();
30
- const id = createUniqueId();
31
- const context = createMemo(() => ({
31
+ const machineProps = createMemo(() => ({
32
32
  id,
33
33
  dir: locale().dir,
34
34
  getRootNode: environment().getRootNode,
35
- value: props.defaultValue,
36
35
  ...props
37
36
  }));
38
- const [state, send] = useMachine(toggleGroup.machine(context()), {
39
- context
40
- });
41
- return createMemo(() => toggleGroup.connect(state, send, normalizeProps));
37
+ const service = useMachine(toggleGroup.machine, machineProps);
38
+ return createMemo(() => toggleGroup.connect(service, normalizeProps));
42
39
  };
43
40
 
44
41
  // src/components/toggle-group/toggle-group-root.tsx
@@ -6,13 +6,13 @@ import {
6
6
  } from "./UFYZ7HLU.jsx";
7
7
  import {
8
8
  useEnvironmentContext
9
- } from "./5O4RWSWO.jsx";
9
+ } from "./BPYAMTER.jsx";
10
10
  import {
11
11
  useLocaleContext
12
- } from "./3QQZKR3F.jsx";
12
+ } from "./RCXMZN3G.jsx";
13
13
  import {
14
14
  createContext
15
- } from "./NMGUCD2L.jsx";
15
+ } from "./TVCIHLER.jsx";
16
16
  import {
17
17
  __export
18
18
  } from "./7IUG3E2V.jsx";
@@ -38,11 +38,7 @@ var SplitterPanel = (props) => {
38
38
  // src/components/splitter/splitter-resize-trigger.tsx
39
39
  import { mergeProps as mergeProps2 } from "@zag-js/solid";
40
40
  var SplitterResizeTrigger = (props) => {
41
- const [resizeTriggerProps, restProps] = createSplitProps()(props, [
42
- "disabled",
43
- "id",
44
- "step"
45
- ]);
41
+ const [resizeTriggerProps, restProps] = createSplitProps()(props, ["disabled", "id", "step"]);
46
42
  const api = useSplitterContext();
47
43
  const mergedProps = mergeProps2(() => api().getResizeTriggerProps(resizeTriggerProps), restProps);
48
44
  return <ark.button {...mergedProps} />;
@@ -59,15 +55,14 @@ var useSplitter = (props = {}) => {
59
55
  const locale = useLocaleContext();
60
56
  const environment = useEnvironmentContext();
61
57
  const id = createUniqueId();
62
- const context = createMemo(() => ({
58
+ const machineProps = createMemo(() => ({
63
59
  id,
64
60
  dir: locale().dir,
65
61
  getRootNode: environment().getRootNode,
66
- size: props.defaultSize,
67
62
  ...props
68
63
  }));
69
- const [state, send] = useMachine(splitter.machine(context()), { context });
70
- return createMemo(() => splitter.connect(state, send, normalizeProps));
64
+ const service = useMachine(splitter.machine, machineProps);
65
+ return createMemo(() => splitter.connect(service, normalizeProps));
71
66
  };
72
67
 
73
68
  // src/components/splitter/splitter-root.tsx
@@ -6,7 +6,7 @@ import {
6
6
  } from "./UFYZ7HLU.jsx";
7
7
  import {
8
8
  createContext
9
- } from "./NMGUCD2L.jsx";
9
+ } from "./TVCIHLER.jsx";
10
10
  import {
11
11
  __export
12
12
  } from "./7IUG3E2V.jsx";
@@ -57,12 +57,7 @@ import { createEffect, createMemo, createSignal, createUniqueId, onCleanup } fro
57
57
 
58
58
  // src/components/fieldset/fieldset.anatomy.ts
59
59
  import { createAnatomy } from "@zag-js/anatomy";
60
- var fieldsetAnatomy = createAnatomy("fieldset").parts(
61
- "root",
62
- "errorText",
63
- "helperText",
64
- "legend"
65
- );
60
+ var fieldsetAnatomy = createAnatomy("fieldset").parts("root", "errorText", "helperText", "legend");
66
61
  var parts = fieldsetAnatomy.build();
67
62
 
68
63
  // src/components/fieldset/use-fieldset.ts
@@ -128,11 +123,7 @@ var dataAttr = (condition) => condition ? "" : void 0;
128
123
 
129
124
  // src/components/fieldset/fieldset-root.tsx
130
125
  var FieldsetRoot = (props) => {
131
- const [useFieldsetProps, localProps] = createSplitProps()(props, [
132
- "id",
133
- "disabled",
134
- "invalid"
135
- ]);
126
+ const [useFieldsetProps, localProps] = createSplitProps()(props, ["id", "disabled", "invalid"]);
136
127
  const fieldset = useFieldset(useFieldsetProps);
137
128
  const mergedProps = mergeProps4(() => fieldset().getRootProps(), localProps);
138
129
  return <FieldsetProvider value={fieldset}>
@@ -0,0 +1,71 @@
1
+ import { createSplitProps } from './ZMHI4GDJ.js';
2
+ import { ark } from './EPLBB4QN.js';
3
+ import { createContext } from './TROPIN4C.js';
4
+ import { __export } from './ESLJRKWD.js';
5
+ import { createComponent, mergeProps as mergeProps$1, template, spread } from 'solid-js/web';
6
+ import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
7
+ import { Show, createMemo } from 'solid-js';
8
+ import * as toggle from '@zag-js/toggle';
9
+ import { createAnatomy } from '@zag-js/anatomy';
10
+
11
+ // src/components/toggle/toggle.ts
12
+ var toggle_exports = {};
13
+ __export(toggle_exports, {
14
+ Context: () => ToggleContext,
15
+ Indicator: () => ToggleIndicator,
16
+ Root: () => ToggleRoot,
17
+ toggleAnatomy: () => toggleAnatomy
18
+ });
19
+
20
+ // src/components/toggle/use-toggle-context.ts
21
+ var [ToggleProvider, useToggleContext] = createContext({
22
+ hookName: "useToggleContext",
23
+ providerName: "<ToggleProvider />"
24
+ });
25
+
26
+ // src/components/toggle/toggle-context.tsx
27
+ var ToggleContext = (props) => props.children(useToggleContext());
28
+ var ToggleIndicator = (props) => {
29
+ const {
30
+ children,
31
+ fallback,
32
+ ...restProps
33
+ } = props;
34
+ const toggle2 = useToggleContext();
35
+ const mergedProps = mergeProps(() => toggle2().getIndicatorProps(), restProps);
36
+ return createComponent(ark.div, mergeProps$1(mergedProps, {
37
+ get children() {
38
+ return createComponent(Show, {
39
+ get when() {
40
+ return toggle2().pressed;
41
+ },
42
+ fallback,
43
+ children
44
+ });
45
+ }
46
+ }));
47
+ };
48
+ function useToggle(props) {
49
+ const service = useMachine(toggle.machine, props);
50
+ return createMemo(() => toggle.connect(service, normalizeProps));
51
+ }
52
+
53
+ // src/components/toggle/toggle-root.tsx
54
+ var _tmpl$ = /* @__PURE__ */ template(`<button>`);
55
+ var ToggleRoot = (props) => {
56
+ const [useToggleProps, localProps] = createSplitProps()(props, ["pressed", "defaultPressed", "disabled", "onPressedChange"]);
57
+ const toggle2 = useToggle(useToggleProps);
58
+ const mergedProps = mergeProps(() => toggle2().getRootProps(), localProps);
59
+ return createComponent(ToggleProvider, {
60
+ value: toggle2,
61
+ get children() {
62
+ var _el$ = _tmpl$();
63
+ spread(_el$, mergedProps, false, false);
64
+ return _el$;
65
+ }
66
+ });
67
+ };
68
+ var toggleAnatomy = createAnatomy("toggle", ["root", "indicator"]);
69
+ toggleAnatomy.build();
70
+
71
+ export { ToggleContext, ToggleIndicator, ToggleRoot, toggleAnatomy, toggle_exports, useToggle, useToggleContext };