@ark-ui/solid 5.15.1 → 5.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +1 -0
  2. package/dist/chunk/6ATAHZBX.js +193 -0
  3. package/dist/chunk/I7VQFKYT.jsx +172 -0
  4. package/dist/chunk/{KAYDBHSW.jsx → IDNDLSEV.jsx} +4 -4
  5. package/dist/chunk/L5XYJCAK.jsx +264 -0
  6. package/dist/chunk/{VL4J24YY.js → NEP3K5KL.js} +2 -2
  7. package/dist/chunk/P5BHXVYK.js +126 -0
  8. package/dist/chunk/TBR4XVH2.js +172 -0
  9. package/dist/chunk/{NCRPFSNO.jsx → VR5BNKL7.jsx} +4 -4
  10. package/dist/chunk/ZHLQWQXX.jsx +253 -0
  11. package/dist/chunk/{SWUMYWUU.js → ZLUEV2MH.js} +2 -2
  12. package/dist/components/accordion/index.js +1 -1
  13. package/dist/components/accordion/index.jsx +3 -3
  14. package/dist/components/angle-slider/index.js +1 -1
  15. package/dist/components/angle-slider/index.jsx +2 -2
  16. package/dist/components/avatar/index.js +1 -1
  17. package/dist/components/avatar/index.jsx +2 -2
  18. package/dist/components/carousel/index.js +1 -1
  19. package/dist/components/carousel/index.jsx +2 -2
  20. package/dist/components/checkbox/index.js +1 -1
  21. package/dist/components/checkbox/index.jsx +2 -2
  22. package/dist/components/clipboard/index.jsx +1 -1
  23. package/dist/components/collapsible/index.js +1 -1
  24. package/dist/components/collapsible/index.jsx +2 -2
  25. package/dist/components/color-picker/index.js +1 -1
  26. package/dist/components/color-picker/index.jsx +2 -2
  27. package/dist/components/combobox/index.js +1 -1
  28. package/dist/components/combobox/index.jsx +2 -2
  29. package/dist/components/date-picker/index.js +1 -1
  30. package/dist/components/date-picker/index.jsx +2 -2
  31. package/dist/components/dialog/index.js +1 -1
  32. package/dist/components/dialog/index.jsx +2 -2
  33. package/dist/components/download-trigger/index.jsx +1 -1
  34. package/dist/components/editable/index.js +1 -1
  35. package/dist/components/editable/index.jsx +2 -2
  36. package/dist/components/field/index.jsx +1 -1
  37. package/dist/components/fieldset/index.jsx +1 -1
  38. package/dist/components/file-upload/index.js +1 -1
  39. package/dist/components/file-upload/index.jsx +2 -2
  40. package/dist/components/floating-panel/index.js +1 -1
  41. package/dist/components/floating-panel/index.jsx +2 -3
  42. package/dist/components/format/index.jsx +1 -1
  43. package/dist/components/frame/index.jsx +1 -1
  44. package/dist/components/hover-card/index.js +1 -1
  45. package/dist/components/hover-card/index.jsx +2 -2
  46. package/dist/components/index.js +43 -43
  47. package/dist/components/index.jsx +348 -349
  48. package/dist/components/listbox/index.js +1 -1
  49. package/dist/components/listbox/index.jsx +2 -3
  50. package/dist/components/menu/index.js +1 -1
  51. package/dist/components/menu/index.jsx +2 -2
  52. package/dist/components/number-input/index.js +1 -1
  53. package/dist/components/number-input/index.jsx +2 -2
  54. package/dist/components/pagination/index.js +1 -1
  55. package/dist/components/pagination/index.jsx +2 -2
  56. package/dist/components/password-input/index.js +1 -1
  57. package/dist/components/password-input/index.jsx +2 -3
  58. package/dist/components/pin-input/index.js +1 -1
  59. package/dist/components/pin-input/index.jsx +2 -2
  60. package/dist/components/popover/index.js +1 -1
  61. package/dist/components/popover/index.jsx +2 -2
  62. package/dist/components/progress/index.js +1 -1
  63. package/dist/components/progress/index.jsx +2 -2
  64. package/dist/components/qr-code/index.js +1 -1
  65. package/dist/components/qr-code/index.jsx +2 -2
  66. package/dist/components/radio-group/index.js +1 -1
  67. package/dist/components/radio-group/index.jsx +2 -2
  68. package/dist/components/rating-group/index.js +1 -1
  69. package/dist/components/rating-group/index.jsx +2 -2
  70. package/dist/components/segment-group/index.js +1 -1
  71. package/dist/components/segment-group/index.jsx +2 -2
  72. package/dist/components/select/index.js +1 -1
  73. package/dist/components/select/index.jsx +2 -2
  74. package/dist/components/signature-pad/index.js +1 -1
  75. package/dist/components/signature-pad/index.jsx +2 -2
  76. package/dist/components/slider/index.js +1 -1
  77. package/dist/components/slider/index.jsx +2 -2
  78. package/dist/components/splitter/index.js +1 -1
  79. package/dist/components/splitter/index.jsx +2 -2
  80. package/dist/components/steps/index.js +1 -1
  81. package/dist/components/steps/index.jsx +2 -2
  82. package/dist/components/switch/index.js +1 -1
  83. package/dist/components/switch/index.jsx +2 -2
  84. package/dist/components/tabs/index.js +1 -1
  85. package/dist/components/tabs/index.jsx +2 -2
  86. package/dist/components/tags-input/index.js +1 -1
  87. package/dist/components/tags-input/index.jsx +2 -2
  88. package/dist/components/time-picker/index.js +1 -1
  89. package/dist/components/time-picker/index.jsx +2 -2
  90. package/dist/components/timer/index.jsx +1 -1
  91. package/dist/components/toast/index.js +1 -1
  92. package/dist/components/toast/index.jsx +2 -2
  93. package/dist/components/toggle-group/index.js +1 -1
  94. package/dist/components/toggle-group/index.jsx +2 -2
  95. package/dist/components/tooltip/index.js +1 -1
  96. package/dist/components/tooltip/index.jsx +2 -2
  97. package/dist/components/tour/index.js +1 -1
  98. package/dist/components/tour/index.jsx +2 -2
  99. package/dist/components/tree-view/index.js +1 -1
  100. package/dist/components/tree-view/index.jsx +3 -3
  101. package/dist/index.js +44 -44
  102. package/dist/index.jsx +351 -352
  103. package/dist/providers/index.js +1 -1
  104. package/dist/providers/index.jsx +4 -4
  105. package/package.json +58 -53
  106. package/dist/chunk/4NULU2IK.jsx +0 -1818
  107. package/dist/chunk/A62XIWGT.js +0 -1071
  108. package/dist/chunk/AUU5NNSJ.js +0 -1706
  109. package/dist/chunk/AWEBBQKG.js +0 -352
  110. package/dist/chunk/ETB2BIQZ.jsx +0 -30
  111. package/dist/chunk/KOMUYUJE.jsx +0 -1144
  112. package/dist/chunk/MTT5ESIK.jsx +0 -400
  113. package/dist/chunk/PKUUD527.js +0 -25
  114. package/dist/chunk/{DAORON6X.js → 25PYT2EL.js} +1 -1
  115. package/dist/chunk/{OF23HNNE.js → 4B42LT3B.js} +1 -1
  116. package/dist/chunk/{VQ3I3Z7G.js → 4B53AHD6.js} +1 -1
  117. package/dist/chunk/{XUH2TAUG.jsx → 4L4266PL.jsx} +3 -3
  118. package/dist/chunk/{AKYIM67Z.jsx → 4T2T3PMU.jsx} +3 -3
  119. package/dist/chunk/{I6UGYR2R.js → 4V2VMH2Z.js} +1 -1
  120. package/dist/chunk/{HHGCJUZP.js → 5UKLBKNF.js} +1 -1
  121. package/dist/chunk/{2WR5J3OZ.jsx → 6XAZQVOY.jsx} +3 -3
  122. package/dist/chunk/{WI6PP4EF.js → 74W4D3KY.js} +1 -1
  123. package/dist/chunk/{NQSCRM4A.js → 7E5K2JFP.js} +1 -1
  124. package/dist/chunk/{HP3ZGMDZ.jsx → 7FASJWDK.jsx} +3 -3
  125. package/dist/chunk/{ZTNABPZL.jsx → 7OXBQSIZ.jsx} +3 -3
  126. package/dist/chunk/{YAOPG62Z.jsx → 7RYPC5LL.jsx} +3 -3
  127. package/dist/chunk/{4FUKCXPR.jsx → 7UNWOGPT.jsx} +3 -3
  128. package/dist/chunk/{OKT2RIHV.js → 7YHVIYNP.js} +1 -1
  129. package/dist/chunk/{AD6K3UTR.js → ASBQTDT2.js} +1 -1
  130. package/dist/chunk/{6QX2AKIJ.js → ASEDJSVN.js} +1 -1
  131. package/dist/chunk/{UK24ZAUL.js → CDA7SUTE.js} +1 -1
  132. package/dist/chunk/{35XSFKD5.jsx → CINP4S7J.jsx} +3 -3
  133. package/dist/chunk/{MTVQZNY6.js → D65IYCJS.js} +1 -1
  134. package/dist/chunk/{QSOUO2RW.js → D6MFUKUH.js} +1 -1
  135. package/dist/chunk/{PPQSRJ6X.jsx → DLZTFD37.jsx} +3 -3
  136. package/dist/chunk/{2MXPLL4O.js → EJDY3MNV.js} +1 -1
  137. package/dist/chunk/{4UNGYCFT.jsx → FG427CLW.jsx} +3 -3
  138. package/dist/chunk/{2UVDYZIY.jsx → FOIEK72O.jsx} +3 -3
  139. package/dist/chunk/{WZ75PULC.js → FQGMWBGA.js} +1 -1
  140. package/dist/chunk/{BOR6VUN5.js → GAB5O55Q.js} +1 -1
  141. package/dist/chunk/{HDKSS6KE.jsx → GLN6WFQR.jsx} +3 -3
  142. package/dist/chunk/{WOUVNHGI.jsx → H4MJ4254.jsx} +3 -3
  143. package/dist/chunk/{LORIOKHL.js → HKFF76YQ.js} +1 -1
  144. package/dist/chunk/{3DOPQCHJ.jsx → JK6QXH6B.jsx} +3 -3
  145. package/dist/chunk/{UW5WJ2LL.jsx → JKM73NGJ.jsx} +3 -3
  146. package/dist/chunk/{T7GUEJBF.js → JXJHXSF4.js} +1 -1
  147. package/dist/chunk/{JEPST7BN.jsx → KJ353BY6.jsx} +3 -3
  148. package/dist/chunk/{AUVF4L3Q.jsx → KNVMVQG6.jsx} +3 -3
  149. package/dist/chunk/{72JQEDEW.js → L4PQJRRA.js} +1 -1
  150. package/dist/chunk/{364QFYBV.js → LNLL2OTD.js} +1 -1
  151. package/dist/chunk/{NPHS6PVV.jsx → MJTOTU2A.jsx} +3 -3
  152. package/dist/chunk/{3VOFK5T4.jsx → N3W3K2ZD.jsx} +3 -3
  153. package/dist/chunk/{IWBBR7PD.js → N65DCNIH.js} +1 -1
  154. package/dist/chunk/{4HQIDBKB.js → O5A5KQPC.js} +1 -1
  155. package/dist/chunk/{T4JGZ7KR.js → OA4CU2PL.js} +1 -1
  156. package/dist/chunk/{OKNWZYMH.jsx → OM7DNJ6L.jsx} +3 -3
  157. package/dist/chunk/{JUBTXT4B.jsx → OM7V7VVC.jsx} +3 -3
  158. package/dist/chunk/{H5DXY5W4.js → OVFUGKNG.js} +1 -1
  159. package/dist/chunk/{74TH35IC.js → P7WR6WX5.js} +1 -1
  160. package/dist/chunk/{5U4KEVIU.jsx → PRA2XFQE.jsx} +3 -3
  161. package/dist/chunk/{FJ5JNMAY.js → QJQKZL6X.js} +1 -1
  162. package/dist/chunk/{MM6NNI6M.jsx → QXYWHKF7.jsx} +3 -3
  163. package/dist/chunk/{OPAESICE.js → SFEMNN6F.js} +1 -1
  164. package/dist/chunk/{ROUJC6XC.js → SGY2KGDL.js} +1 -1
  165. package/dist/chunk/{LDOGINY6.js → TECDLRTB.js} +1 -1
  166. package/dist/chunk/{XIT3ASUI.jsx → U7QDCJXT.jsx} +3 -3
  167. package/dist/chunk/{DPP7XCXL.js → UAANHQJZ.js} +1 -1
  168. package/dist/chunk/{3IJ5QLEM.js → UU6XEYFI.js} +1 -1
  169. package/dist/chunk/{QC5C6JJA.jsx → V6S3C3U7.jsx} +3 -3
  170. package/dist/chunk/{LKPEYZZO.jsx → V75EMOIC.jsx} +3 -3
  171. package/dist/chunk/{RVK7FAUI.js → VEV5HF3M.js} +1 -1
  172. package/dist/chunk/{S4OS4UYL.jsx → VXQNQSLM.jsx} +3 -3
  173. package/dist/chunk/{ZNBZTQ46.jsx → WBLWV2L4.jsx} +3 -3
  174. package/dist/chunk/{LB3LJBHI.js → WTNRGPVN.js} +1 -1
  175. package/dist/chunk/{POJRD725.jsx → X5GWQYGE.jsx} +3 -3
  176. package/dist/chunk/{WG67YHCV.jsx → XENPQFEN.jsx} +3 -3
  177. package/dist/chunk/{LRA73ZZJ.js → XQNGFJ2M.js} +1 -1
  178. package/dist/chunk/{N3H47LNB.jsx → XSGHIZ6Q.jsx} +3 -3
  179. package/dist/chunk/{L64MXP66.jsx → Y2LC36B4.jsx} +3 -3
  180. package/dist/chunk/{XKBIT7L5.jsx → YJX4W6VT.jsx} +3 -3
  181. package/dist/chunk/{RC4UV6HP.jsx → YM35RFYG.jsx} +3 -3
  182. package/dist/chunk/{WHXDBQDP.jsx → Z2BXVXSV.jsx} +3 -3
  183. package/dist/chunk/{33DAWPKS.js → ZRSPQAUK.js} +1 -1
@@ -1,352 +0,0 @@
1
- import { createMachine } from './PKUUD527.js';
2
- import { useFieldContext } from './NC7W2KIE.js';
3
- import { createSplitProps as createSplitProps$1 } from './ZMHI4GDJ.js';
4
- import { ark } from './EPLBB4QN.js';
5
- import { useEnvironmentContext } from './YO2MCGXO.js';
6
- import { useLocaleContext } from './OKZ64GSY.js';
7
- import { createContext } from './TROPIN4C.js';
8
- import { runIfFn } from './DT73WLR4.js';
9
- import { __export } from './ESLJRKWD.js';
10
- import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
11
- import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
12
- import { Show, createUniqueId, createMemo } from 'solid-js';
13
- import { createAnatomy } from '@zag-js/anatomy';
14
- import { dataAttr, isLeftClick, ariaAttr } from '@zag-js/dom-query';
15
- import { uuid, createSplitProps } from '@zag-js/utils';
16
- import { createProps } from '@zag-js/types';
17
-
18
- // src/components/password-input/use-password-input-context.ts
19
- var [PasswordInputProvider, usePasswordInputContext] = createContext({
20
- hookName: "usePasswordInputContext",
21
- providerName: "<PasswordInputProvider />"
22
- });
23
-
24
- // src/components/password-input/password-input-context.tsx
25
- var PasswordInputContext = (props2) => props2.children(usePasswordInputContext());
26
- var PasswordInputControl = (props2) => {
27
- const passwordInput = usePasswordInputContext();
28
- const mergedProps = mergeProps(() => passwordInput().getControlProps(), props2);
29
- return createComponent(ark.div, mergedProps);
30
- };
31
- var PasswordInputIndicator = (props2) => {
32
- const passwordInput = usePasswordInputContext();
33
- const mergedProps = mergeProps(() => passwordInput().getIndicatorProps(), props2);
34
- return createComponent(ark.span, mergeProps$1(mergedProps, {
35
- get children() {
36
- return createComponent(Show, {
37
- get when() {
38
- return passwordInput().visible;
39
- },
40
- get fallback() {
41
- return props2.fallback;
42
- },
43
- get children() {
44
- return props2.children;
45
- }
46
- });
47
- }
48
- }));
49
- };
50
- var PasswordInputInput = (props2) => {
51
- const passwordInput = usePasswordInputContext();
52
- const mergedProps = mergeProps(() => passwordInput().getInputProps(), props2);
53
- const field = useFieldContext();
54
- return createComponent(ark.input, mergeProps$1({
55
- get ["aria-describedby"]() {
56
- return field?.().ariaDescribedby;
57
- }
58
- }, mergedProps));
59
- };
60
- var PasswordInputLabel = (props2) => {
61
- const passwordInput = usePasswordInputContext();
62
- const mergedProps = mergeProps(() => passwordInput().getLabelProps(), props2);
63
- return createComponent(ark.label, mergedProps);
64
- };
65
- var anatomy = createAnatomy("password-input").parts(
66
- "root",
67
- "input",
68
- "label",
69
- "control",
70
- "indicator",
71
- "visibilityTrigger"
72
- );
73
- var parts = anatomy.build();
74
- var getInputId = (ctx) => ctx.ids?.input ?? `p-input-${ctx.id}-input`;
75
- var getInputEl = (ctx) => ctx.getById(getInputId(ctx));
76
- function connect(service, normalize) {
77
- const { scope, prop, context } = service;
78
- const visible = context.get("visible");
79
- const disabled = !!prop("disabled");
80
- const invalid = !!prop("invalid");
81
- const readOnly = !!prop("readOnly");
82
- const interactive = !(readOnly || disabled);
83
- const translations = prop("translations");
84
- return {
85
- visible,
86
- disabled,
87
- invalid,
88
- focus() {
89
- getInputEl(scope)?.focus();
90
- },
91
- setVisible(value) {
92
- service.send({ type: "VISIBILITY.SET", value });
93
- },
94
- toggleVisible() {
95
- service.send({ type: "VISIBILITY.SET", value: !visible });
96
- },
97
- getRootProps() {
98
- return normalize.element({
99
- ...parts.root.attrs,
100
- dir: prop("dir"),
101
- "data-disabled": dataAttr(disabled),
102
- "data-invalid": dataAttr(invalid),
103
- "data-readonly": dataAttr(readOnly)
104
- });
105
- },
106
- getLabelProps() {
107
- return normalize.label({
108
- ...parts.label.attrs,
109
- htmlFor: getInputId(scope),
110
- "data-disabled": dataAttr(disabled),
111
- "data-invalid": dataAttr(invalid),
112
- "data-readonly": dataAttr(readOnly)
113
- });
114
- },
115
- getInputProps() {
116
- return normalize.input({
117
- ...parts.input.attrs,
118
- id: getInputId(scope),
119
- autoCapitalize: "off",
120
- name: prop("name"),
121
- required: prop("required"),
122
- autoComplete: prop("autoComplete"),
123
- spellCheck: false,
124
- readOnly,
125
- disabled,
126
- type: visible ? "text" : "password",
127
- "data-state": visible ? "visible" : "hidden",
128
- "aria-invalid": ariaAttr(invalid),
129
- "data-disabled": dataAttr(disabled),
130
- "data-invalid": dataAttr(invalid),
131
- "data-readonly": dataAttr(readOnly),
132
- ...prop("ignorePasswordManagers") ? passwordManagerProps : {}
133
- });
134
- },
135
- getVisibilityTriggerProps() {
136
- return normalize.button({
137
- ...parts.visibilityTrigger.attrs,
138
- type: "button",
139
- tabIndex: -1,
140
- "aria-controls": getInputId(scope),
141
- "aria-expanded": visible,
142
- "data-readonly": dataAttr(readOnly),
143
- disabled,
144
- "data-disabled": dataAttr(disabled),
145
- "data-state": visible ? "visible" : "hidden",
146
- "aria-label": translations?.visibilityTrigger?.(visible),
147
- onPointerDown(event) {
148
- if (!isLeftClick(event)) return;
149
- if (!interactive) return;
150
- event.preventDefault();
151
- service.send({ type: "TRIGGER.CLICK" });
152
- }
153
- });
154
- },
155
- getIndicatorProps() {
156
- return normalize.element({
157
- ...parts.indicator.attrs,
158
- "aria-hidden": true,
159
- "data-state": visible ? "visible" : "hidden",
160
- "data-disabled": dataAttr(disabled),
161
- "data-invalid": dataAttr(invalid),
162
- "data-readonly": dataAttr(readOnly)
163
- });
164
- },
165
- getControlProps() {
166
- return normalize.element({
167
- ...parts.control.attrs,
168
- "data-disabled": dataAttr(disabled),
169
- "data-invalid": dataAttr(invalid),
170
- "data-readonly": dataAttr(readOnly)
171
- });
172
- }
173
- };
174
- }
175
- var passwordManagerProps = {
176
- // 1Password
177
- "data-1p-ignore": "",
178
- // LastPass
179
- "data-lpignore": "true",
180
- // Bitwarden
181
- "data-bwignore": "true",
182
- // Dashlane
183
- "data-form-type": "other",
184
- // Proton Pass
185
- "data-protonpass-ignore": "true"
186
- };
187
- var machine = createMachine({
188
- props({ props: props2 }) {
189
- return {
190
- id: uuid(),
191
- defaultVisible: false,
192
- autoComplete: "current-password",
193
- ignorePasswordManagers: false,
194
- ...props2,
195
- translations: {
196
- visibilityTrigger(visible) {
197
- return visible ? "Hide password" : "Show password";
198
- },
199
- ...props2.translations
200
- }
201
- };
202
- },
203
- context({ prop, bindable }) {
204
- return {
205
- visible: bindable(() => ({
206
- value: prop("visible"),
207
- defaultValue: prop("defaultVisible"),
208
- onChange(value) {
209
- prop("onVisibilityChange")?.({ visible: value });
210
- }
211
- }))
212
- };
213
- },
214
- initialState() {
215
- return "idle";
216
- },
217
- effects: ["trackFormEvents"],
218
- states: {
219
- idle: {
220
- on: {
221
- "VISIBILITY.SET": {
222
- actions: ["setVisibility"]
223
- },
224
- "TRIGGER.CLICK": {
225
- actions: ["toggleVisibility", "focusInputEl"]
226
- }
227
- }
228
- }
229
- },
230
- implementations: {
231
- actions: {
232
- setVisibility({ context, event }) {
233
- context.set("visible", event.value);
234
- },
235
- toggleVisibility({ context }) {
236
- context.set("visible", (c) => !c);
237
- },
238
- focusInputEl({ scope }) {
239
- const inputEl = getInputEl(scope);
240
- inputEl?.focus();
241
- }
242
- },
243
- effects: {
244
- trackFormEvents({ scope, send }) {
245
- const inputEl = getInputEl(scope);
246
- const form = inputEl?.form;
247
- if (!form) return;
248
- const win = scope.getWin();
249
- const controller = new win.AbortController();
250
- form.addEventListener(
251
- "reset",
252
- (event) => {
253
- if (event.defaultPrevented) return;
254
- send({ type: "VISIBILITY.SET", value: false });
255
- },
256
- { signal: controller.signal }
257
- );
258
- form.addEventListener(
259
- "submit",
260
- () => {
261
- send({ type: "VISIBILITY.SET", value: false });
262
- },
263
- { signal: controller.signal }
264
- );
265
- return () => controller.abort();
266
- }
267
- }
268
- }
269
- });
270
- var props = createProps()([
271
- "defaultVisible",
272
- "dir",
273
- "id",
274
- "onVisibilityChange",
275
- "visible",
276
- "ids",
277
- "getRootNode",
278
- "disabled",
279
- "invalid",
280
- "required",
281
- "readOnly",
282
- "translations",
283
- "ignorePasswordManagers",
284
- "autoComplete",
285
- "name"
286
- ]);
287
- createSplitProps(props);
288
- var usePasswordInput = (props2) => {
289
- const id = createUniqueId();
290
- const locale = useLocaleContext();
291
- const environment = useEnvironmentContext();
292
- const field = useFieldContext();
293
- const machineProps = createMemo(() => ({
294
- id,
295
- ids: {
296
- input: field?.().ids.control
297
- },
298
- disabled: field?.().disabled,
299
- readOnly: field?.().readOnly,
300
- required: field?.().required,
301
- invalid: field?.().invalid,
302
- dir: locale().dir,
303
- getRootNode: environment().getRootNode,
304
- ...runIfFn(props2)
305
- }));
306
- const service = useMachine(machine, machineProps);
307
- return createMemo(() => connect(service, normalizeProps));
308
- };
309
-
310
- // src/components/password-input/password-input-root.tsx
311
- var PasswordInputRoot = (props2) => {
312
- const [usePasswordInputProps, localProps] = createSplitProps$1()(props2, ["autoComplete", "defaultVisible", "disabled", "id", "ids", "ignorePasswordManagers", "invalid", "name", "onVisibilityChange", "readOnly", "required", "translations", "visible"]);
313
- const passwordInput = usePasswordInput(usePasswordInputProps);
314
- const mergedProps = mergeProps(() => passwordInput().getRootProps(), localProps);
315
- return createComponent(PasswordInputProvider, {
316
- value: passwordInput,
317
- get children() {
318
- return createComponent(ark.div, mergedProps);
319
- }
320
- });
321
- };
322
- var PasswordInputRootProvider = (props2) => {
323
- const mergedProps = mergeProps(() => props2.value().getRootProps(), props2);
324
- return createComponent(PasswordInputProvider, {
325
- get value() {
326
- return props2.value;
327
- },
328
- get children() {
329
- return createComponent(ark.div, mergedProps);
330
- }
331
- });
332
- };
333
- var PasswordInputVisibilityTrigger = (props2) => {
334
- const passwordInput = usePasswordInputContext();
335
- const mergedProps = mergeProps(() => passwordInput().getVisibilityTriggerProps(), props2);
336
- return createComponent(ark.button, mergedProps);
337
- };
338
-
339
- // src/components/password-input/password-input.ts
340
- var password_input_exports = {};
341
- __export(password_input_exports, {
342
- Context: () => PasswordInputContext,
343
- Control: () => PasswordInputControl,
344
- Indicator: () => PasswordInputIndicator,
345
- Input: () => PasswordInputInput,
346
- Label: () => PasswordInputLabel,
347
- Root: () => PasswordInputRoot,
348
- RootProvider: () => PasswordInputRootProvider,
349
- VisibilityTrigger: () => PasswordInputVisibilityTrigger
350
- });
351
-
352
- export { PasswordInputContext, PasswordInputControl, PasswordInputIndicator, PasswordInputInput, PasswordInputLabel, PasswordInputRoot, PasswordInputRootProvider, PasswordInputVisibilityTrigger, anatomy, password_input_exports, usePasswordInput, usePasswordInputContext };
@@ -1,30 +0,0 @@
1
- // ../../node_modules/@zag-js/core/dist/index.mjs
2
- import { callAll, isEqual, isString } from "@zag-js/utils";
3
- import { getActiveElement, getDocument } from "@zag-js/dom-query";
4
- function createGuards() {
5
- return {
6
- and: (...guards) => {
7
- return function andGuard(params) {
8
- return guards.every((str) => params.guard(str));
9
- };
10
- },
11
- or: (...guards) => {
12
- return function orGuard(params) {
13
- return guards.some((str) => params.guard(str));
14
- };
15
- },
16
- not: (guard) => {
17
- return function notGuard(params) {
18
- return !params.guard(guard);
19
- };
20
- }
21
- };
22
- }
23
- function createMachine(config) {
24
- return config;
25
- }
26
-
27
- export {
28
- createGuards,
29
- createMachine
30
- };