@ark-ui/solid 5.17.0 → 5.18.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 (122) hide show
  1. package/dist/chunk/5FRMO4AQ.jsx +237 -0
  2. package/dist/chunk/{AQUEJK4Z.jsx → DZGDAEOH.jsx} +106 -1
  3. package/dist/chunk/{P7WR6WX5.js → HJFJPRY5.js} +1 -1
  4. package/dist/chunk/{FQGMWBGA.js → HSBJVWHB.js} +1 -1
  5. package/dist/chunk/{KAYDBHSW.jsx → IDNDLSEV.jsx} +4 -4
  6. package/dist/chunk/{JEPST7BN.jsx → LBI4ZRKN.jsx} +5 -3
  7. package/dist/chunk/{XL4VFEPW.js → O5UHP4CA.js} +103 -3
  8. package/dist/chunk/{AKYIM67Z.jsx → UYFUB47A.jsx} +5 -3
  9. package/dist/chunk/{NCRPFSNO.jsx → VR5BNKL7.jsx} +4 -4
  10. package/dist/chunk/ZUWL6SV5.js +321 -0
  11. package/dist/components/accordion/index.jsx +3 -3
  12. package/dist/components/angle-slider/index.jsx +2 -2
  13. package/dist/components/avatar/index.jsx +2 -2
  14. package/dist/components/carousel/index.jsx +2 -2
  15. package/dist/components/checkbox/index.d.ts +1 -1
  16. package/dist/components/checkbox/index.jsx +2 -2
  17. package/dist/components/clipboard/index.jsx +1 -1
  18. package/dist/components/collapsible/index.jsx +2 -2
  19. package/dist/components/collection/index.d.ts +93 -3
  20. package/dist/components/collection/index.js +1 -1
  21. package/dist/components/collection/index.jsx +5 -3
  22. package/dist/components/color-picker/index.d.ts +1 -1
  23. package/dist/components/color-picker/index.jsx +2 -2
  24. package/dist/components/combobox/index.js +1 -1
  25. package/dist/components/combobox/index.jsx +5 -5
  26. package/dist/components/date-picker/index.d.ts +1 -1
  27. package/dist/components/date-picker/index.jsx +2 -2
  28. package/dist/components/dialog/index.jsx +2 -2
  29. package/dist/components/download-trigger/index.jsx +1 -1
  30. package/dist/components/editable/index.jsx +2 -2
  31. package/dist/components/field/index.d.ts +1 -1
  32. package/dist/components/field/index.jsx +1 -1
  33. package/dist/components/fieldset/index.d.ts +1 -1
  34. package/dist/components/fieldset/index.jsx +1 -1
  35. package/dist/components/file-upload/index.js +1 -1
  36. package/dist/components/file-upload/index.jsx +2 -2
  37. package/dist/components/floating-panel/index.jsx +2 -2
  38. package/dist/components/format/index.jsx +1 -1
  39. package/dist/components/frame/index.jsx +1 -1
  40. package/dist/components/hover-card/index.jsx +2 -2
  41. package/dist/components/index.d.ts +4 -1
  42. package/dist/components/index.js +24 -23
  43. package/dist/components/index.jsx +502 -490
  44. package/dist/components/json-tree-view/index.d.ts +69 -0
  45. package/dist/components/json-tree-view/index.js +1 -0
  46. package/dist/components/json-tree-view/index.jsx +26 -0
  47. package/dist/components/listbox/index.js +1 -1
  48. package/dist/components/listbox/index.jsx +3 -3
  49. package/dist/components/menu/index.jsx +2 -2
  50. package/dist/components/number-input/index.jsx +2 -2
  51. package/dist/components/pagination/index.jsx +2 -2
  52. package/dist/components/password-input/index.jsx +2 -2
  53. package/dist/components/pin-input/index.jsx +2 -2
  54. package/dist/components/popover/index.jsx +2 -2
  55. package/dist/components/progress/index.jsx +2 -2
  56. package/dist/components/qr-code/index.jsx +2 -2
  57. package/dist/components/radio-group/index.jsx +2 -2
  58. package/dist/components/rating-group/index.jsx +2 -2
  59. package/dist/components/segment-group/index.jsx +2 -2
  60. package/dist/components/select/index.js +1 -1
  61. package/dist/components/select/index.jsx +5 -5
  62. package/dist/components/signature-pad/index.js +1 -1
  63. package/dist/components/signature-pad/index.jsx +2 -2
  64. package/dist/components/slider/index.jsx +2 -2
  65. package/dist/components/splitter/index.jsx +2 -2
  66. package/dist/components/steps/index.jsx +2 -2
  67. package/dist/components/switch/index.jsx +2 -2
  68. package/dist/components/tabs/index.jsx +2 -2
  69. package/dist/components/tags-input/index.jsx +2 -2
  70. package/dist/components/time-picker/index.jsx +2 -2
  71. package/dist/components/timer/index.jsx +1 -1
  72. package/dist/components/toast/index.jsx +2 -2
  73. package/dist/components/toggle-group/index.jsx +2 -2
  74. package/dist/components/tooltip/index.jsx +2 -2
  75. package/dist/components/tour/index.jsx +2 -2
  76. package/dist/components/tree-view/index.d.ts +9 -39
  77. package/dist/components/tree-view/index.js +1 -1
  78. package/dist/components/tree-view/index.jsx +4 -4
  79. package/dist/index.d.ts +5 -2
  80. package/dist/index.js +24 -23
  81. package/dist/index.jsx +487 -475
  82. package/dist/providers/index.jsx +4 -4
  83. package/dist/tree-view-tree-CbBeWSwi.d.ts +41 -0
  84. package/package.json +63 -62
  85. package/dist/chunk/{XUH2TAUG.jsx → 4L4266PL.jsx} +3 -3
  86. package/dist/chunk/{2WR5J3OZ.jsx → 6XAZQVOY.jsx} +3 -3
  87. package/dist/chunk/{HP3ZGMDZ.jsx → 7FASJWDK.jsx} +3 -3
  88. package/dist/chunk/{ZTNABPZL.jsx → 7OXBQSIZ.jsx} +3 -3
  89. package/dist/chunk/{YAOPG62Z.jsx → 7RYPC5LL.jsx} +3 -3
  90. package/dist/chunk/{4FUKCXPR.jsx → 7UNWOGPT.jsx} +3 -3
  91. package/dist/chunk/{35XSFKD5.jsx → CINP4S7J.jsx} +3 -3
  92. package/dist/chunk/{ZSMY7WCA.jsx → D2MI7N5P.jsx} +3 -3
  93. package/dist/chunk/{PPQSRJ6X.jsx → DLZTFD37.jsx} +3 -3
  94. package/dist/chunk/{4UNGYCFT.jsx → FG427CLW.jsx} +3 -3
  95. package/dist/chunk/{2UVDYZIY.jsx → FOIEK72O.jsx} +3 -3
  96. package/dist/chunk/{HDKSS6KE.jsx → GLN6WFQR.jsx} +3 -3
  97. package/dist/chunk/{WOUVNHGI.jsx → H4MJ4254.jsx} +3 -3
  98. package/dist/chunk/{BJ3QT4LE.jsx → H7TJLB3R.jsx} +0 -0
  99. package/dist/chunk/{CBGZAFEX.jsx → I7VQFKYT.jsx} +3 -3
  100. package/dist/chunk/{3DOPQCHJ.jsx → JK6QXH6B.jsx} +3 -3
  101. package/dist/chunk/{UW5WJ2LL.jsx → JKM73NGJ.jsx} +3 -3
  102. package/dist/chunk/{3WT7Q753.jsx → L22RABDV.jsx} +3 -3
  103. package/dist/chunk/{U5CBLW6U.jsx → L5XYJCAK.jsx} +3 -3
  104. package/dist/chunk/{NPHS6PVV.jsx → MJTOTU2A.jsx} +3 -3
  105. package/dist/chunk/{QBN5FEQF.js → NWXJCBMN.js} +0 -0
  106. package/dist/chunk/{OKNWZYMH.jsx → OM7DNJ6L.jsx} +3 -3
  107. package/dist/chunk/{JUBTXT4B.jsx → OM7V7VVC.jsx} +3 -3
  108. package/dist/chunk/{5U4KEVIU.jsx → PRA2XFQE.jsx} +3 -3
  109. package/dist/chunk/{MM6NNI6M.jsx → QXYWHKF7.jsx} +3 -3
  110. package/dist/chunk/{QC5C6JJA.jsx → V6S3C3U7.jsx} +3 -3
  111. package/dist/chunk/{LKPEYZZO.jsx → V75EMOIC.jsx} +3 -3
  112. package/dist/chunk/{S4OS4UYL.jsx → VXQNQSLM.jsx} +3 -3
  113. package/dist/chunk/{ZNBZTQ46.jsx → WBLWV2L4.jsx} +3 -3
  114. package/dist/chunk/{POJRD725.jsx → X5GWQYGE.jsx} +3 -3
  115. package/dist/chunk/{WG67YHCV.jsx → XENPQFEN.jsx} +3 -3
  116. package/dist/chunk/{AHH5Z3VJ.jsx → XOIHVYJ7.jsx} +3 -3
  117. package/dist/chunk/{N3H47LNB.jsx → XSGHIZ6Q.jsx} +3 -3
  118. package/dist/chunk/{L64MXP66.jsx → Y2LC36B4.jsx} +3 -3
  119. package/dist/chunk/{XKBIT7L5.jsx → YJX4W6VT.jsx} +3 -3
  120. package/dist/chunk/{RC4UV6HP.jsx → YM35RFYG.jsx} +3 -3
  121. package/dist/chunk/{WHXDBQDP.jsx → Z2BXVXSV.jsx} +3 -3
  122. package/dist/chunk/{3B7I46SI.jsx → ZHLQWQXX.jsx} +3 -3
@@ -0,0 +1,321 @@
1
+ import { useTreeViewContext, tree_view_exports, useTreeView } from './ZLUEV2MH.js';
2
+ import { createTreeCollection } from './O5UHP4CA.js';
3
+ import { createSplitProps } from './ZMHI4GDJ.js';
4
+ import { createContext } from './TROPIN4C.js';
5
+ import { __export } from './ESLJRKWD.js';
6
+ import { createComponent, mergeProps, Show, Index as Index$1, template, insert, memo, effect, setAttribute, Dynamic, untrack } from 'solid-js/web';
7
+ import { getRootNode, nodeToString, nodeToValue, keyPathToKey, jsonNodeToElement, getAccessibleDescription } from '@zag-js/json-tree-utils';
8
+ import { Index, splitProps, createMemo, For } from 'solid-js';
9
+
10
+ // src/components/json-tree-view/get-branch-value.ts
11
+ function getBranchValues(tree, depth) {
12
+ let values = [];
13
+ tree.visit({
14
+ onEnter: (node, indexPath) => {
15
+ if (indexPath.length === 0) return;
16
+ if (tree.isBranchNode(node) && indexPath.length <= depth) {
17
+ values.push(tree.getNodeValue(node));
18
+ }
19
+ }
20
+ });
21
+ return values;
22
+ }
23
+
24
+ // src/components/json-tree-view/json-tree-view-props-context.ts
25
+ var [JsonTreeViewPropsProvider, useJsonTreeViewPropsContext] = createContext({
26
+ hookName: "useJsonTreeViewPropsContext",
27
+ providerName: "<JsonTreeViewPropsProvider />"
28
+ });
29
+
30
+ // src/components/json-tree-view/json-tree-view-root.tsx
31
+ var splitJsonTreeViewProps = createSplitProps();
32
+ var JsonTreeViewRoot = (props) => {
33
+ const [jsonTreeProps, localProps] = splitJsonTreeViewProps(props, ["maxPreviewItems", "collapseStringsAfterLength", "quotesOnKeys", "groupArraysAfterLength", "showNonenumerable"]);
34
+ const [jsonProps, restProps] = splitProps(localProps, ["data", "defaultExpandedDepth"]);
35
+ const collection = createMemo(() => {
36
+ return createTreeCollection({
37
+ nodeToValue,
38
+ nodeToString,
39
+ rootNode: getRootNode(jsonProps.data)
40
+ });
41
+ });
42
+ const defaultExpandedValue = createMemo(() => {
43
+ return jsonProps.defaultExpandedDepth != null ? getBranchValues(collection(), jsonProps.defaultExpandedDepth) : void 0;
44
+ });
45
+ return createComponent(JsonTreeViewPropsProvider, {
46
+ value: jsonTreeProps,
47
+ get children() {
48
+ return createComponent(tree_view_exports.Root, mergeProps({
49
+ "data-scope": "json-tree-view",
50
+ get collection() {
51
+ return collection();
52
+ },
53
+ get defaultExpandedValue() {
54
+ return defaultExpandedValue();
55
+ }
56
+ }, restProps, {
57
+ get children() {
58
+ return props.children;
59
+ }
60
+ }));
61
+ }
62
+ });
63
+ };
64
+ var JsonTreeViewRootProvider = (props) => {
65
+ return createComponent(tree_view_exports.RootProvider, mergeProps({
66
+ "data-scope": "json-tree-view"
67
+ }, props));
68
+ };
69
+ var _tmpl$ = /* @__PURE__ */ template(`<span data-kind=key>`);
70
+ var _tmpl$2 = /* @__PURE__ */ template(`<span data-kind=colon>: `);
71
+ var JsonTreeViewKeyNode = (props) => {
72
+ const key = createMemo(() => keyPathToKey(props.node.keyPath));
73
+ return [(() => {
74
+ var _el$ = _tmpl$();
75
+ insert(_el$, (() => {
76
+ var _c$ = memo(() => !!props.showQuotes);
77
+ return () => _c$() ? `"${key()}"` : key();
78
+ })());
79
+ effect(() => setAttribute(_el$, "data-non-enumerable", props.node.isNonEnumerable ? "" : void 0));
80
+ return _el$;
81
+ })(), _tmpl$2()];
82
+ };
83
+ var JsonTreeViewValueNode = (props) => {
84
+ if (props.node.type === "text") {
85
+ return memo(() => props.renderValue?.(props.node) ?? props.node.value);
86
+ }
87
+ return createComponent(Dynamic, {
88
+ get component() {
89
+ return props.node.tagName;
90
+ },
91
+ get ["data-root"]() {
92
+ return props.node.properties.root ? "" : void 0;
93
+ },
94
+ get ["data-type"]() {
95
+ return props.node.properties.nodeType;
96
+ },
97
+ get ["data-kind"]() {
98
+ return props.node.properties.kind;
99
+ },
100
+ get children() {
101
+ return createComponent(For, {
102
+ get each() {
103
+ return props.node.children;
104
+ },
105
+ children: (child) => createComponent(JsonTreeViewValueNode, {
106
+ node: child,
107
+ get renderValue() {
108
+ return props.renderValue;
109
+ }
110
+ })
111
+ });
112
+ }
113
+ });
114
+ };
115
+
116
+ // src/components/json-tree-view/json-tree-view-node.tsx
117
+ var scopeProps = {
118
+ "data-scope": "json-tree-view"
119
+ };
120
+ function JsonTreeViewNode(props) {
121
+ const tree = useTreeViewContext();
122
+ const nodeState = createMemo(() => tree().getNodeState({
123
+ node: props.node,
124
+ indexPath: props.indexPath
125
+ }));
126
+ const options = useJsonTreeViewPropsContext();
127
+ const key = createMemo(() => keyPathToKey(props.node.keyPath, {
128
+ excludeRoot: true
129
+ }));
130
+ const valueNode = createMemo(() => jsonNodeToElement(props.node, options));
131
+ const nodeProps = createMemo(() => {
132
+ const desc = getAccessibleDescription(props.node);
133
+ const line = props.indexPath.reduce((acc, curr) => acc + curr, 1);
134
+ const lineLength = props.indexPath.length - 1;
135
+ return {
136
+ ...scopeProps,
137
+ "aria-label": desc,
138
+ "data-line": line,
139
+ style: {
140
+ ["--line-length"]: lineLength
141
+ }
142
+ };
143
+ });
144
+ return createComponent(tree_view_exports.NodeProvider, {
145
+ get node() {
146
+ return props.node;
147
+ },
148
+ get indexPath() {
149
+ return props.indexPath;
150
+ },
151
+ get children() {
152
+ return createComponent(Show, {
153
+ get when() {
154
+ return nodeState().isBranch;
155
+ },
156
+ get fallback() {
157
+ return createComponent(tree_view_exports.Item, mergeProps(nodeProps, {
158
+ get children() {
159
+ return createComponent(tree_view_exports.ItemText, mergeProps(scopeProps, {
160
+ get children() {
161
+ return [createComponent(Show, {
162
+ get when() {
163
+ return key();
164
+ },
165
+ get children() {
166
+ return createComponent(JsonTreeViewKeyNode, {
167
+ get node() {
168
+ return props.node;
169
+ },
170
+ get showQuotes() {
171
+ return options.quotesOnKeys;
172
+ }
173
+ });
174
+ }
175
+ }), createComponent(JsonTreeViewValueNode, {
176
+ get node() {
177
+ return valueNode();
178
+ },
179
+ get renderValue() {
180
+ return props.renderValue;
181
+ }
182
+ })];
183
+ }
184
+ }));
185
+ }
186
+ }));
187
+ },
188
+ get children() {
189
+ return createComponent(tree_view_exports.Branch, mergeProps(scopeProps, {
190
+ get children() {
191
+ return [createComponent(tree_view_exports.BranchControl, mergeProps(nodeProps, {
192
+ get children() {
193
+ return [createComponent(Show, {
194
+ get when() {
195
+ return props.arrow;
196
+ },
197
+ get children() {
198
+ return createComponent(tree_view_exports.BranchIndicator, mergeProps(scopeProps, {
199
+ get children() {
200
+ return props.arrow;
201
+ }
202
+ }));
203
+ }
204
+ }), createComponent(tree_view_exports.BranchText, mergeProps(scopeProps, {
205
+ get children() {
206
+ return [createComponent(Show, {
207
+ get when() {
208
+ return key();
209
+ },
210
+ get children() {
211
+ return createComponent(JsonTreeViewKeyNode, {
212
+ get node() {
213
+ return props.node;
214
+ },
215
+ get showQuotes() {
216
+ return options.quotesOnKeys;
217
+ }
218
+ });
219
+ }
220
+ }), createComponent(JsonTreeViewValueNode, {
221
+ get node() {
222
+ return valueNode();
223
+ },
224
+ get renderValue() {
225
+ return props.renderValue;
226
+ }
227
+ })];
228
+ }
229
+ }))];
230
+ }
231
+ })), createComponent(tree_view_exports.BranchContent, mergeProps(scopeProps, {
232
+ get children() {
233
+ return [createComponent(Show, {
234
+ get when() {
235
+ return typeof props.indentGuide === "boolean";
236
+ },
237
+ get fallback() {
238
+ return props.indentGuide;
239
+ },
240
+ get children() {
241
+ return createComponent(tree_view_exports.BranchIndentGuide, {});
242
+ }
243
+ }), createComponent(Index$1, {
244
+ get each() {
245
+ return props.node.children;
246
+ },
247
+ children: (child, index) => createComponent(JsonTreeViewNode, mergeProps(props, {
248
+ get node() {
249
+ return child();
250
+ },
251
+ get indexPath() {
252
+ return [...props.indexPath, index];
253
+ }
254
+ }))
255
+ })];
256
+ }
257
+ }))];
258
+ }
259
+ }));
260
+ }
261
+ });
262
+ }
263
+ });
264
+ }
265
+
266
+ // src/components/json-tree-view/json-tree-view-tree.tsx
267
+ var splitTreeNodeProps = createSplitProps();
268
+ var JsonTreeViewTree = (props) => {
269
+ const [nodeProps, treeProps] = splitTreeNodeProps(props, ["arrow", "indentGuide", "renderValue"]);
270
+ const tree = useTreeViewContext();
271
+ const children = () => tree().collection.getNodeChildren(tree().collection.rootNode);
272
+ return createComponent(tree_view_exports.Tree, mergeProps({
273
+ "data-scope": "json-tree-view"
274
+ }, treeProps, {
275
+ get children() {
276
+ return createComponent(Index, {
277
+ get each() {
278
+ return children();
279
+ },
280
+ children: (child, index) => createComponent(JsonTreeViewNode, mergeProps({
281
+ get node() {
282
+ return child();
283
+ },
284
+ indexPath: [index]
285
+ }, nodeProps))
286
+ });
287
+ }
288
+ }));
289
+ };
290
+ var useJsonTreeView = (props) => {
291
+ const [jsonProps, restProps] = splitProps(props, ["data", "defaultExpandedDepth"]);
292
+ const collection = createMemo(() => {
293
+ return createTreeCollection({
294
+ nodeToValue: nodeToValue,
295
+ nodeToString: nodeToString,
296
+ rootNode: getRootNode(jsonProps.data)
297
+ });
298
+ });
299
+ const defaultExpandedValue = createMemo(() => {
300
+ return jsonProps.defaultExpandedDepth != null ? getBranchValues(collection(), jsonProps.defaultExpandedDepth) : void 0;
301
+ });
302
+ const machineProps = createMemo(() => {
303
+ return {
304
+ defaultExpandedValue: untrack(defaultExpandedValue),
305
+ ...restProps,
306
+ collection: collection(),
307
+ typeahead: false
308
+ };
309
+ });
310
+ return useTreeView(machineProps);
311
+ };
312
+
313
+ // src/components/json-tree-view/json-tree-view.tsx
314
+ var json_tree_view_exports = {};
315
+ __export(json_tree_view_exports, {
316
+ Root: () => JsonTreeViewRoot,
317
+ RootProvider: () => JsonTreeViewRootProvider,
318
+ Tree: () => JsonTreeViewTree
319
+ });
320
+
321
+ export { JsonTreeViewRoot, JsonTreeViewRootProvider, JsonTreeViewTree, json_tree_view_exports, useJsonTreeView };
@@ -12,14 +12,14 @@ import {
12
12
  useAccordion,
13
13
  useAccordionContext,
14
14
  useAccordionItemContext
15
- } from "../../chunk/KAYDBHSW.jsx";
16
- import "../../chunk/WHXDBQDP.jsx";
15
+ } from "../../chunk/IDNDLSEV.jsx";
16
+ import "../../chunk/Z2BXVXSV.jsx";
17
17
  import "../../chunk/NEBB7COJ.jsx";
18
18
  import "../../chunk/6WEDGJKQ.jsx";
19
19
  import "../../chunk/UFYZ7HLU.jsx";
20
20
  import "../../chunk/ODQYYKL5.jsx";
21
- import "../../chunk/E2L62MKC.jsx";
22
21
  import "../../chunk/YUC6JE7K.jsx";
22
+ import "../../chunk/E2L62MKC.jsx";
23
23
  import "../../chunk/TVCIHLER.jsx";
24
24
  import "../../chunk/KGOB2IMX.jsx";
25
25
  import "../../chunk/7IUG3E2V.jsx";
@@ -13,12 +13,12 @@ import {
13
13
  angle_slider_exports,
14
14
  useAngleSlider,
15
15
  useAngleSliderContext
16
- } from "../../chunk/POJRD725.jsx";
16
+ } from "../../chunk/X5GWQYGE.jsx";
17
17
  import "../../chunk/6WEDGJKQ.jsx";
18
18
  import "../../chunk/UFYZ7HLU.jsx";
19
19
  import "../../chunk/ODQYYKL5.jsx";
20
- import "../../chunk/E2L62MKC.jsx";
21
20
  import "../../chunk/YUC6JE7K.jsx";
21
+ import "../../chunk/E2L62MKC.jsx";
22
22
  import "../../chunk/TVCIHLER.jsx";
23
23
  import "../../chunk/KGOB2IMX.jsx";
24
24
  import "../../chunk/7IUG3E2V.jsx";
@@ -8,12 +8,12 @@ import {
8
8
  avatar_exports,
9
9
  useAvatar,
10
10
  useAvatarContext
11
- } from "../../chunk/YAOPG62Z.jsx";
11
+ } from "../../chunk/7RYPC5LL.jsx";
12
12
  import "../../chunk/6WEDGJKQ.jsx";
13
13
  import "../../chunk/UFYZ7HLU.jsx";
14
14
  import "../../chunk/ODQYYKL5.jsx";
15
- import "../../chunk/E2L62MKC.jsx";
16
15
  import "../../chunk/YUC6JE7K.jsx";
16
+ import "../../chunk/E2L62MKC.jsx";
17
17
  import "../../chunk/TVCIHLER.jsx";
18
18
  import "../../chunk/KGOB2IMX.jsx";
19
19
  import "../../chunk/7IUG3E2V.jsx";
@@ -14,12 +14,12 @@ import {
14
14
  carousel_exports,
15
15
  useCarousel,
16
16
  useCarouselContext
17
- } from "../../chunk/HP3ZGMDZ.jsx";
17
+ } from "../../chunk/7FASJWDK.jsx";
18
18
  import "../../chunk/6WEDGJKQ.jsx";
19
19
  import "../../chunk/UFYZ7HLU.jsx";
20
20
  import "../../chunk/ODQYYKL5.jsx";
21
- import "../../chunk/E2L62MKC.jsx";
22
21
  import "../../chunk/YUC6JE7K.jsx";
22
+ import "../../chunk/E2L62MKC.jsx";
23
23
  import "../../chunk/TVCIHLER.jsx";
24
24
  import "../../chunk/KGOB2IMX.jsx";
25
25
  import "../../chunk/7IUG3E2V.jsx";
@@ -139,7 +139,7 @@ interface CheckboxRootProviderProps extends HTMLProps<'label'>, RootProviderProp
139
139
  }
140
140
  declare const CheckboxRootProvider: (props: CheckboxRootProviderProps) => solid_js.JSX.Element;
141
141
 
142
- declare const checkboxAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "root" | "group" | "control" | "indicator">;
142
+ declare const checkboxAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "group" | "root" | "control" | "indicator">;
143
143
 
144
144
  declare const checkbox_CheckedChangeDetails: typeof CheckedChangeDetails;
145
145
  declare const checkbox_CheckedState: typeof CheckedState;
@@ -14,15 +14,15 @@ import {
14
14
  useCheckboxContext,
15
15
  useCheckboxGroup,
16
16
  useCheckboxGroupContext
17
- } from "../../chunk/3WT7Q753.jsx";
17
+ } from "../../chunk/L22RABDV.jsx";
18
18
  import "../../chunk/HQOIDGRU.jsx";
19
19
  import "../../chunk/JY6PMVAK.jsx";
20
20
  import "../../chunk/DOBZPYAN.jsx";
21
21
  import "../../chunk/6WEDGJKQ.jsx";
22
22
  import "../../chunk/UFYZ7HLU.jsx";
23
23
  import "../../chunk/ODQYYKL5.jsx";
24
- import "../../chunk/E2L62MKC.jsx";
25
24
  import "../../chunk/YUC6JE7K.jsx";
25
+ import "../../chunk/E2L62MKC.jsx";
26
26
  import "../../chunk/TVCIHLER.jsx";
27
27
  import "../../chunk/KGOB2IMX.jsx";
28
28
  import "../../chunk/7IUG3E2V.jsx";
@@ -16,8 +16,8 @@ import {
16
16
  import "../../chunk/6WEDGJKQ.jsx";
17
17
  import "../../chunk/UFYZ7HLU.jsx";
18
18
  import "../../chunk/ODQYYKL5.jsx";
19
- import "../../chunk/E2L62MKC.jsx";
20
19
  import "../../chunk/YUC6JE7K.jsx";
20
+ import "../../chunk/E2L62MKC.jsx";
21
21
  import "../../chunk/TVCIHLER.jsx";
22
22
  import "../../chunk/KGOB2IMX.jsx";
23
23
  import "../../chunk/7IUG3E2V.jsx";
@@ -9,13 +9,13 @@ import {
9
9
  collapsible_exports,
10
10
  useCollapsible,
11
11
  useCollapsibleContext
12
- } from "../../chunk/WHXDBQDP.jsx";
12
+ } from "../../chunk/Z2BXVXSV.jsx";
13
13
  import "../../chunk/NEBB7COJ.jsx";
14
14
  import "../../chunk/6WEDGJKQ.jsx";
15
15
  import "../../chunk/UFYZ7HLU.jsx";
16
16
  import "../../chunk/ODQYYKL5.jsx";
17
- import "../../chunk/E2L62MKC.jsx";
18
17
  import "../../chunk/YUC6JE7K.jsx";
18
+ import "../../chunk/E2L62MKC.jsx";
19
19
  import "../../chunk/TVCIHLER.jsx";
20
20
  import "../../chunk/KGOB2IMX.jsx";
21
21
  import "../../chunk/7IUG3E2V.jsx";
@@ -1,11 +1,101 @@
1
- import { CollectionItem, GridCollectionOptions, GridCollection } from '@zag-js/collection';
1
+ import { CollectionItem, GridCollectionOptions, GridCollection, SelectionMode, ListCollection } from '@zag-js/collection';
2
2
  export { CollectionItem, CollectionOptions, FilePathTreeNode, FlatTreeNode, GridCollection, GridCollectionOptions, ListCollection, TreeCollection, TreeCollectionOptions, TreeNode } from '@zag-js/collection';
3
3
  export { c as createListCollection } from '../../list-collection-nOYDJvsQ.js';
4
4
  export { c as createFileTreeCollection, a as createTreeCollection } from '../../tree-collection-BGrnj3vg.js';
5
5
  export { U as UseListCollectionProps, a as UseListCollectionReturn, u as useListCollection } from '../../use-list-collection-Dk2gVdQ2.js';
6
- import '../../types-Bc0WfPsv.js';
6
+ import { M as MaybeAccessor } from '../../types-Bc0WfPsv.js';
7
7
  import 'solid-js';
8
8
 
9
9
  declare const createGridCollection: <T extends CollectionItem>(options: GridCollectionOptions<T>) => GridCollection<T>;
10
10
 
11
- export { createGridCollection };
11
+ interface UseListSelectionProps<T extends CollectionItem> {
12
+ /**
13
+ * The selection mode.
14
+ */
15
+ selectionMode?: SelectionMode;
16
+ /**
17
+ * Whether the selection is deselectable.
18
+ */
19
+ deselectable?: boolean;
20
+ /**
21
+ * The initial selected values.
22
+ */
23
+ initialSelectedValues?: string[];
24
+ /**
25
+ * Whether to reset the selection when the collection changes.
26
+ */
27
+ resetOnCollectionChange?: boolean;
28
+ /**
29
+ * The collection to use.
30
+ */
31
+ collection: ListCollection<T>;
32
+ }
33
+ declare function useListSelection<T extends CollectionItem>(props: MaybeAccessor<UseListSelectionProps<T>>): UseListSelectionReturn;
34
+ interface UseListSelectionReturn {
35
+ /**
36
+ * The selected values as an array.
37
+ */
38
+ selectedValues: () => string[];
39
+ /**
40
+ * Whether the selection is empty.
41
+ */
42
+ isEmpty: () => boolean;
43
+ /**
44
+ * The first selected value.
45
+ */
46
+ firstSelectedValue: () => string | null;
47
+ /**
48
+ * The last selected value.
49
+ */
50
+ lastSelectedValue: () => string | null;
51
+ /**
52
+ * Check if a value is selected.
53
+ */
54
+ isSelected: (value: string | null) => boolean;
55
+ /**
56
+ * Check if a value can be selected.
57
+ */
58
+ canSelect: (value: string) => boolean;
59
+ /**
60
+ * Select a value.
61
+ */
62
+ select: (value: string, forceToggle?: boolean) => void;
63
+ /**
64
+ * Deselect a value.
65
+ */
66
+ deselect: (value: string) => void;
67
+ /**
68
+ * Toggle selection of a value.
69
+ */
70
+ toggle: (value: string) => void;
71
+ /**
72
+ * Replace the selection with a single value.
73
+ */
74
+ replace: (value: string | null) => void;
75
+ /**
76
+ * Extend the selection from anchor to target.
77
+ */
78
+ extend: (anchorValue: string, targetValue: string) => void;
79
+ /**
80
+ * Set the selected values.
81
+ */
82
+ setSelectedValues: (values: string[]) => void;
83
+ /**
84
+ * Clear the selection.
85
+ */
86
+ clear: () => void;
87
+ /**
88
+ * Clear all selections.
89
+ */
90
+ resetSelection: () => void;
91
+ /**
92
+ * Returns true if all items from the collection are selected.
93
+ */
94
+ isAllSelected: () => boolean;
95
+ /**
96
+ * Returns true if at least one item from the collection is selected.
97
+ */
98
+ isSomeSelected: () => boolean;
99
+ }
100
+
101
+ export { type UseListSelectionProps, type UseListSelectionReturn, createGridCollection, useListSelection };
@@ -1 +1 @@
1
- export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useListCollection } from '../../chunk/XL4VFEPW.js';
1
+ export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useListCollection, useListSelection } from '../../chunk/O5UHP4CA.js';
@@ -3,13 +3,15 @@ import {
3
3
  createGridCollection,
4
4
  createListCollection,
5
5
  createTreeCollection,
6
- useListCollection
7
- } from "../../chunk/AQUEJK4Z.jsx";
6
+ useListCollection,
7
+ useListSelection
8
+ } from "../../chunk/DZGDAEOH.jsx";
8
9
  import "../../chunk/7IUG3E2V.jsx";
9
10
  export {
10
11
  createFileTreeCollection,
11
12
  createGridCollection,
12
13
  createListCollection,
13
14
  createTreeCollection,
14
- useListCollection
15
+ useListCollection,
16
+ useListSelection
15
17
  };
@@ -206,7 +206,7 @@ interface ColorPickerViewProps extends HTMLProps<'div'>, ColorPickerViewBaseProp
206
206
  }
207
207
  declare const ColorPickerView: (props: ColorPickerViewProps) => solid_js.JSX.Element;
208
208
 
209
- declare const colorPickerAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "root" | "area" | "view" | "content" | "trigger" | "control" | "valueText" | "positioner" | "formatSelect" | "areaThumb" | "channelInput" | "channelSliderTrack" | "channelSliderThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderValueText" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger">;
209
+ declare const colorPickerAnatomy: _zag_js_anatomy.AnatomyInstance<"area" | "label" | "view" | "content" | "root" | "trigger" | "control" | "valueText" | "positioner" | "formatSelect" | "areaThumb" | "channelInput" | "channelSliderTrack" | "channelSliderThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderValueText" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger">;
210
210
 
211
211
  declare const colorPicker_Color: typeof Color;
212
212
  declare const colorPicker_ColorFormat: typeof ColorFormat;
@@ -33,7 +33,7 @@ import {
33
33
  parse,
34
34
  useColorPicker,
35
35
  useColorPickerContext
36
- } from "../../chunk/AHH5Z3VJ.jsx";
36
+ } from "../../chunk/XOIHVYJ7.jsx";
37
37
  import "../../chunk/HQOIDGRU.jsx";
38
38
  import "../../chunk/JY6PMVAK.jsx";
39
39
  import "../../chunk/WC2HBDLJ.jsx";
@@ -42,8 +42,8 @@ import "../../chunk/NEBB7COJ.jsx";
42
42
  import "../../chunk/6WEDGJKQ.jsx";
43
43
  import "../../chunk/UFYZ7HLU.jsx";
44
44
  import "../../chunk/ODQYYKL5.jsx";
45
- import "../../chunk/E2L62MKC.jsx";
46
45
  import "../../chunk/YUC6JE7K.jsx";
46
+ import "../../chunk/E2L62MKC.jsx";
47
47
  import "../../chunk/TVCIHLER.jsx";
48
48
  import "../../chunk/KGOB2IMX.jsx";
49
49
  import "../../chunk/7IUG3E2V.jsx";
@@ -1,2 +1,2 @@
1
1
  export { combobox_exports as Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxContext, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemContext, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxRootProvider, ComboboxTrigger, anatomy as comboboxAnatomy, useCombobox, useComboboxContext, useComboboxItemContext } from '../../chunk/5UKLBKNF.js';
2
- export { createListCollection, useListCollection } from '../../chunk/XL4VFEPW.js';
2
+ export { createListCollection, useListCollection } from '../../chunk/O5UHP4CA.js';
@@ -21,21 +21,21 @@ import {
21
21
  useCombobox,
22
22
  useComboboxContext,
23
23
  useComboboxItemContext
24
- } from "../../chunk/2WR5J3OZ.jsx";
25
- import "../../chunk/HQOIDGRU.jsx";
26
- import "../../chunk/JY6PMVAK.jsx";
24
+ } from "../../chunk/6XAZQVOY.jsx";
27
25
  import {
28
26
  createListCollection,
29
27
  useListCollection
30
- } from "../../chunk/AQUEJK4Z.jsx";
28
+ } from "../../chunk/DZGDAEOH.jsx";
29
+ import "../../chunk/HQOIDGRU.jsx";
30
+ import "../../chunk/JY6PMVAK.jsx";
31
31
  import "../../chunk/WC2HBDLJ.jsx";
32
32
  import "../../chunk/DOBZPYAN.jsx";
33
33
  import "../../chunk/NEBB7COJ.jsx";
34
34
  import "../../chunk/6WEDGJKQ.jsx";
35
35
  import "../../chunk/UFYZ7HLU.jsx";
36
36
  import "../../chunk/ODQYYKL5.jsx";
37
- import "../../chunk/E2L62MKC.jsx";
38
37
  import "../../chunk/YUC6JE7K.jsx";
38
+ import "../../chunk/E2L62MKC.jsx";
39
39
  import "../../chunk/TVCIHLER.jsx";
40
40
  import "../../chunk/KGOB2IMX.jsx";
41
41
  import "../../chunk/7IUG3E2V.jsx";
@@ -186,7 +186,7 @@ interface DatePickerYearSelectProps extends HTMLProps<'select'>, DatePickerYearS
186
186
  }
187
187
  declare const DatePickerYearSelect: (props: DatePickerYearSelectProps) => solid_js.JSX.Element;
188
188
 
189
- declare const datePickerAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "input" | "root" | "table" | "view" | "content" | "trigger" | "control" | "nextTrigger" | "prevTrigger" | "positioner" | "clearTrigger" | "tableHeader" | "tableBody" | "tableRow" | "viewTrigger" | "monthSelect" | "yearSelect" | "presetTrigger" | "rangeText" | "tableCell" | "tableCellTrigger" | "tableHead" | "viewControl">;
189
+ declare const datePickerAnatomy: _zag_js_anatomy.AnatomyInstance<"input" | "label" | "table" | "view" | "content" | "root" | "trigger" | "control" | "nextTrigger" | "prevTrigger" | "positioner" | "clearTrigger" | "tableHeader" | "tableBody" | "tableRow" | "viewTrigger" | "monthSelect" | "yearSelect" | "presetTrigger" | "rangeText" | "tableCell" | "tableCellTrigger" | "tableHead" | "viewControl">;
190
190
 
191
191
  declare const datePicker_DateValue: typeof DateValue;
192
192
  declare const datePicker_FocusChangeDetails: typeof FocusChangeDetails;
@@ -30,15 +30,15 @@ import {
30
30
  parse,
31
31
  useDatePicker,
32
32
  useDatePickerContext
33
- } from "../../chunk/ZSMY7WCA.jsx";
33
+ } from "../../chunk/D2MI7N5P.jsx";
34
34
  import "../../chunk/WC2HBDLJ.jsx";
35
35
  import "../../chunk/DOBZPYAN.jsx";
36
36
  import "../../chunk/NEBB7COJ.jsx";
37
37
  import "../../chunk/6WEDGJKQ.jsx";
38
38
  import "../../chunk/UFYZ7HLU.jsx";
39
39
  import "../../chunk/ODQYYKL5.jsx";
40
- import "../../chunk/E2L62MKC.jsx";
41
40
  import "../../chunk/YUC6JE7K.jsx";
41
+ import "../../chunk/E2L62MKC.jsx";
42
42
  import "../../chunk/TVCIHLER.jsx";
43
43
  import "../../chunk/KGOB2IMX.jsx";
44
44
  import "../../chunk/7IUG3E2V.jsx";