@ark-ui/solid 5.15.0 → 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 (121) hide show
  1. package/README.md +1 -0
  2. package/dist/chunk/{QTPO6CAG.jsx → 4L4266PL.jsx} +10 -10
  3. package/dist/chunk/{LHJM3X56.jsx → 4T2T3PMU.jsx} +7 -7
  4. package/dist/chunk/6ATAHZBX.js +193 -0
  5. package/dist/chunk/{QZL7A4I6.jsx → 6XAZQVOY.jsx} +10 -10
  6. package/dist/chunk/{WYNHVCCC.jsx → 7FASJWDK.jsx} +6 -6
  7. package/dist/chunk/{4JKVIHU2.jsx → 7OXBQSIZ.jsx} +10 -10
  8. package/dist/chunk/{UBCF5HI7.jsx → 7RYPC5LL.jsx} +6 -6
  9. package/dist/chunk/{NUPYPPGN.jsx → 7UNWOGPT.jsx} +7 -7
  10. package/dist/chunk/{5UVX33V2.jsx → CINP4S7J.jsx} +6 -6
  11. package/dist/chunk/{IFVMP7PM.jsx → DLZTFD37.jsx} +10 -10
  12. package/dist/chunk/{PNYN26W7.jsx → FG427CLW.jsx} +6 -6
  13. package/dist/chunk/{P5ZRUIVB.jsx → FOIEK72O.jsx} +6 -6
  14. package/dist/chunk/{6Q4ZZUWZ.jsx → GKS4JQZJ.jsx} +4 -4
  15. package/dist/chunk/{OIG52XTL.jsx → GLN6WFQR.jsx} +3 -3
  16. package/dist/chunk/{7JA2F6LW.jsx → H4MJ4254.jsx} +7 -7
  17. package/dist/chunk/{O2Q7MOG6.jsx → HQOIDGRU.jsx} +2 -2
  18. package/dist/chunk/I7VQFKYT.jsx +172 -0
  19. package/dist/chunk/{2Z37DOO5.jsx → IDNDLSEV.jsx} +7 -7
  20. package/dist/chunk/{5FW3VV3B.jsx → JK6QXH6B.jsx} +6 -6
  21. package/dist/chunk/{5OA4XEHW.jsx → JKM73NGJ.jsx} +6 -6
  22. package/dist/chunk/{FS6GEMRM.jsx → JY6PMVAK.jsx} +4 -4
  23. package/dist/chunk/{7AMCFBJH.jsx → KJ353BY6.jsx} +7 -7
  24. package/dist/chunk/{SXZY4NGI.jsx → KNVMVQG6.jsx} +7 -7
  25. package/dist/chunk/L5XYJCAK.jsx +264 -0
  26. package/dist/chunk/{A6XGGK7D.jsx → MJTOTU2A.jsx} +6 -6
  27. package/dist/chunk/{FKI6A35L.jsx → N3W3K2ZD.jsx} +7 -7
  28. package/dist/chunk/{VSLHNUS2.jsx → OM7DNJ6L.jsx} +7 -7
  29. package/dist/chunk/{TTZNIVIU.jsx → OM7V7VVC.jsx} +7 -7
  30. package/dist/chunk/P5BHXVYK.js +126 -0
  31. package/dist/chunk/{B4ZXV6YG.jsx → PRA2XFQE.jsx} +6 -6
  32. package/dist/chunk/{J4VOAZA3.jsx → QXYWHKF7.jsx} +6 -6
  33. package/dist/chunk/{ZF7UP5R3.jsx → RULCXX3A.jsx} +4 -4
  34. package/dist/chunk/TBR4XVH2.js +172 -0
  35. package/dist/chunk/{ZMXVBUJS.jsx → TTIVTOWQ.jsx} +1 -1
  36. package/dist/chunk/{N4LRXFJX.jsx → U7QDCJXT.jsx} +10 -10
  37. package/dist/chunk/{3HYU2MCP.jsx → V2GDFVDR.jsx} +1 -1
  38. package/dist/chunk/{7BS7ZITV.jsx → V6S3C3U7.jsx} +7 -7
  39. package/dist/chunk/{TILCNQZF.jsx → V75EMOIC.jsx} +7 -7
  40. package/dist/chunk/{Q3QMDHRY.jsx → VR5BNKL7.jsx} +7 -7
  41. package/dist/chunk/{WKKFHYOJ.jsx → VXQNQSLM.jsx} +10 -10
  42. package/dist/chunk/{YIQG5BP3.jsx → WBLWV2L4.jsx} +7 -7
  43. package/dist/chunk/{LY6KT2RR.jsx → X5GWQYGE.jsx} +6 -6
  44. package/dist/chunk/{44EPTWQE.jsx → XENPQFEN.jsx} +7 -7
  45. package/dist/chunk/{JWPRFVT7.jsx → XSGHIZ6Q.jsx} +6 -6
  46. package/dist/chunk/{7EHWC54T.jsx → Y2LC36B4.jsx} +7 -7
  47. package/dist/chunk/{2JINNNT3.jsx → YJX4W6VT.jsx} +7 -7
  48. package/dist/chunk/{CFW2CEDK.jsx → YM35RFYG.jsx} +7 -7
  49. package/dist/chunk/{XOVDOF3R.jsx → Z2BXVXSV.jsx} +6 -6
  50. package/dist/chunk/ZHLQWQXX.jsx +253 -0
  51. package/dist/components/accordion/index.jsx +5 -5
  52. package/dist/components/angle-slider/index.jsx +4 -4
  53. package/dist/components/avatar/index.jsx +4 -4
  54. package/dist/components/carousel/index.jsx +4 -4
  55. package/dist/components/checkbox/index.jsx +6 -6
  56. package/dist/components/clipboard/index.jsx +4 -4
  57. package/dist/components/collapsible/index.jsx +4 -4
  58. package/dist/components/color-picker/index.jsx +8 -8
  59. package/dist/components/combobox/index.jsx +9 -9
  60. package/dist/components/date-picker/index.jsx +6 -6
  61. package/dist/components/dialog/index.jsx +6 -6
  62. package/dist/components/download-trigger/index.jsx +4 -4
  63. package/dist/components/editable/index.jsx +6 -6
  64. package/dist/components/field/index.jsx +5 -5
  65. package/dist/components/fieldset/index.jsx +4 -4
  66. package/dist/components/file-upload/index.jsx +6 -6
  67. package/dist/components/floating-panel/index.js +1 -1
  68. package/dist/components/floating-panel/index.jsx +6 -7
  69. package/dist/components/format/index.jsx +2 -2
  70. package/dist/components/frame/index.jsx +3 -3
  71. package/dist/components/hover-card/index.jsx +6 -6
  72. package/dist/components/index.d.ts +1 -1
  73. package/dist/components/index.js +25 -25
  74. package/dist/components/index.jsx +465 -464
  75. package/dist/components/listbox/index.d.ts +11 -6
  76. package/dist/components/listbox/index.js +1 -1
  77. package/dist/components/listbox/index.jsx +6 -5
  78. package/dist/components/menu/index.jsx +6 -6
  79. package/dist/components/number-input/index.jsx +6 -6
  80. package/dist/components/pagination/index.jsx +4 -4
  81. package/dist/components/password-input/index.js +1 -1
  82. package/dist/components/password-input/index.jsx +6 -7
  83. package/dist/components/pin-input/index.jsx +6 -6
  84. package/dist/components/popover/index.jsx +6 -6
  85. package/dist/components/presence/index.jsx +3 -3
  86. package/dist/components/progress/index.jsx +4 -4
  87. package/dist/components/qr-code/index.jsx +4 -4
  88. package/dist/components/radio-group/index.jsx +4 -4
  89. package/dist/components/rating-group/index.jsx +6 -6
  90. package/dist/components/segment-group/index.jsx +4 -4
  91. package/dist/components/select/index.jsx +9 -9
  92. package/dist/components/signature-pad/index.jsx +6 -6
  93. package/dist/components/slider/index.jsx +4 -4
  94. package/dist/components/splitter/index.jsx +4 -4
  95. package/dist/components/steps/index.jsx +4 -4
  96. package/dist/components/switch/index.jsx +6 -6
  97. package/dist/components/tabs/index.jsx +6 -6
  98. package/dist/components/tags-input/index.jsx +6 -6
  99. package/dist/components/time-picker/index.jsx +6 -6
  100. package/dist/components/timer/index.jsx +4 -4
  101. package/dist/components/toast/index.jsx +4 -4
  102. package/dist/components/toggle-group/index.jsx +4 -4
  103. package/dist/components/tooltip/index.jsx +6 -6
  104. package/dist/components/tour/index.jsx +6 -6
  105. package/dist/components/tree-view/index.jsx +6 -6
  106. package/dist/index.d.ts +1 -1
  107. package/dist/index.js +25 -25
  108. package/dist/index.jsx +443 -442
  109. package/dist/providers/environment/index.jsx +2 -2
  110. package/dist/providers/index.jsx +5 -5
  111. package/package.json +58 -53
  112. package/dist/chunk/6IL4FKPO.jsx +0 -1818
  113. package/dist/chunk/ETB2BIQZ.jsx +0 -30
  114. package/dist/chunk/I3E4ZWU3.js +0 -1065
  115. package/dist/chunk/OO4YLIXE.js +0 -352
  116. package/dist/chunk/PKUUD527.js +0 -25
  117. package/dist/chunk/VWQOTIDH.jsx +0 -1137
  118. package/dist/chunk/XWFAYRYW.jsx +0 -400
  119. package/dist/chunk/YGAFIEFX.js +0 -1706
  120. package/dist/chunk/{6J5H27AQ.jsx → E2L62MKC.jsx} +3 -3
  121. package/dist/chunk/{T67EMHNB.jsx → WC2HBDLJ.jsx} +6 -6
@@ -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 { useLocaleContext } from './OKZ64GSY.js';
6
- import { useEnvironmentContext } from './YO2MCGXO.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,25 +0,0 @@
1
- // ../../node_modules/@zag-js/core/dist/index.mjs
2
- function createGuards() {
3
- return {
4
- and: (...guards) => {
5
- return function andGuard(params) {
6
- return guards.every((str) => params.guard(str));
7
- };
8
- },
9
- or: (...guards) => {
10
- return function orGuard(params) {
11
- return guards.some((str) => params.guard(str));
12
- };
13
- },
14
- not: (guard) => {
15
- return function notGuard(params) {
16
- return !params.guard(guard);
17
- };
18
- }
19
- };
20
- }
21
- function createMachine(config) {
22
- return config;
23
- }
24
-
25
- export { createGuards, createMachine };