@ark-ui/solid 4.3.0 → 4.5.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.
- package/README.md +1 -1
- package/dist/chunk/{CYRK6TAN.js → 34OZO53S.js} +3 -3
- package/dist/chunk/{KJ3FKIIK.js → AHNBDCEA.js} +2 -2
- package/dist/chunk/{OEWX5CKM.jsx → AZBVL3C5.jsx} +1 -1
- package/dist/chunk/{E4USRLNU.jsx → CLZWNSRO.jsx} +3 -3
- package/dist/chunk/{QUGFFYRX.jsx → CRUV7XPV.jsx} +4 -0
- package/dist/chunk/{AOG74HPY.jsx → CUHGQRR2.jsx} +3 -4
- package/dist/chunk/DFMOPRAE.jsx +299 -0
- package/dist/chunk/{PIUV7KP7.js → DLHPAHCZ.js} +4 -2
- package/dist/chunk/{UPYUPAKW.jsx → DV2ZLINV.jsx} +1 -1
- package/dist/chunk/{KBVWLUJ7.jsx → EDCPFD3E.jsx} +10 -2
- package/dist/chunk/{F66KWWUN.js → FC5DK746.js} +2 -2
- package/dist/chunk/{POMWY2MG.jsx → FNDB3E7F.jsx} +1 -1
- package/dist/chunk/{SYODOK2B.js → G7GWGK6F.js} +2 -2
- package/dist/chunk/IUQBNCKP.js +214 -0
- package/dist/chunk/{OAZ77M7Q.jsx → LQVOH74V.jsx} +1 -1
- package/dist/chunk/{42CZQMX2.js → M2FICVVI.js} +2 -1
- package/dist/chunk/{OKMXOUR3.js → MXNJZWRV.js} +3 -3
- package/dist/chunk/{2HGEDMNF.js → MZPPLECL.js} +2 -2
- package/dist/chunk/{Q5KLHHE3.js → PBJ7MGGS.js} +22 -3
- package/dist/chunk/{3FKZ6KJD.jsx → PSWXIR5X.jsx} +1 -1
- package/dist/chunk/{PTS474GD.js → PZ7ZCWGA.js} +2 -2
- package/dist/chunk/{IZYDGYQY.jsx → PZDCODVM.jsx} +2 -2
- package/dist/chunk/{RFPBNMT7.js → QKZQOQUB.js} +2 -2
- package/dist/chunk/{OX5YYZLK.jsx → RSBH7AZU.jsx} +1 -1
- package/dist/chunk/{SWSA36TD.jsx → THR7KNY2.jsx} +3 -3
- package/dist/chunk/{LS7TV3SH.jsx → TY6NCPFG.jsx} +20 -2
- package/dist/chunk/{GLJ4SETU.jsx → U6PDXLCA.jsx} +1 -1
- package/dist/chunk/{NCE7GTLS.js → UXJGHMFS.js} +2 -2
- package/dist/chunk/{FGNZD6WP.jsx → UYIC346K.jsx} +1 -1
- package/dist/chunk/{JS3C64H5.js → VIUEKSBO.js} +2 -2
- package/dist/chunk/{IFXE5SWX.js → VQWGXSW6.js} +2 -2
- package/dist/chunk/{7WAPCEAY.js → VZFG6XYZ.js} +2 -2
- package/dist/chunk/{HEKFQEI5.js → ZUPWC76X.js} +3 -3
- package/dist/chunk/{VDX7IT74.jsx → ZX3QOLR2.jsx} +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +1 -1
- package/dist/components/anatomy.d.ts +1 -0
- package/dist/components/anatomy.js +1 -0
- package/dist/components/anatomy.jsx +2 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +2 -2
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collection.d.ts +6 -3
- package/dist/components/collection.js +1 -1
- package/dist/components/collection.jsx +7 -3
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +3 -3
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/combobox/index.jsx +4 -4
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +2 -2
- package/dist/components/field/index.d.ts +5 -0
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +2 -2
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/index.d.ts +4 -4
- package/dist/components/index.js +37 -37
- package/dist/components/index.jsx +242 -240
- package/dist/components/menu/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/index.jsx +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/rating-group/index.js +1 -1
- package/dist/components/rating-group/index.jsx +2 -2
- package/dist/components/segment-group/index.js +1 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.jsx +4 -4
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/steps/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.jsx +2 -2
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/index.jsx +2 -2
- package/dist/components/time-picker/index.d.ts +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/index.jsx +3 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tree-view/index.d.ts +73 -59
- package/dist/components/tree-view/index.js +2 -1
- package/dist/components/tree-view/index.jsx +15 -11
- package/dist/index.d.ts +4 -4
- package/dist/index.js +38 -38
- package/dist/index.jsx +242 -240
- package/dist/providers/index.js +1 -1
- package/package.json +62 -55
- package/dist/chunk/5G6GUK6S.js +0 -213
- package/dist/chunk/OTMHVJ6C.jsx +0 -279
- package/dist/chunk/{TM6MNCJB.js → 2GATVLPK.js} +1 -1
- package/dist/chunk/{JSMOACQ5.js → 2H4WHODR.js} +1 -1
- package/dist/chunk/{KQLVMRLF.js → 3HMZSTYX.js} +1 -1
- package/dist/chunk/{VQXL4BNM.js → 4SB6TBGW.js} +1 -1
- package/dist/chunk/{UZJR5LMS.js → 5FRMEOAS.js} +1 -1
- package/dist/chunk/{WEGHFH3B.js → 5SHQ33Q6.js} +1 -1
- package/dist/chunk/{AK2LUFHG.js → 5SRZ3YYC.js} +1 -1
- package/dist/chunk/{YN36NFIE.js → 6YQ3EF2J.js} +1 -1
- package/dist/chunk/{WLUB7JYL.js → ATMUKDFF.js} +1 -1
- package/dist/chunk/{YKYATBPX.js → FNEB2RAF.js} +1 -1
- package/dist/chunk/{UW63M5GW.js → GXWVYON6.js} +1 -1
- package/dist/chunk/{KKCBAUHZ.js → HFRKBFLW.js} +1 -1
- package/dist/chunk/{BNMRTYLU.js → IRGNKWCM.js} +1 -1
- package/dist/chunk/{L6HRKS4V.js → JVXNYKNA.js} +1 -1
- package/dist/chunk/{R3KGHDYR.js → LVPQ6GR4.js} +1 -1
- package/dist/chunk/{SPA64RV2.js → OICUXBOZ.js} +1 -1
- package/dist/chunk/{4DPMLML4.js → RAEDLHD3.js} +1 -1
- package/dist/chunk/{ENHIBLQ6.js → SWUA2VFC.js} +1 -1
- package/dist/chunk/{KUTJELYB.js → ZKHLGP7Q.js} +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Welcome to Ark UI
|
|
8
8
|
|
|
9
|
-
Ark UI is a headless, open-source UI library with over
|
|
9
|
+
Ark UI is a headless, open-source UI library with over 45+ components designed for building
|
|
10
10
|
reusable, scalable Design Systems. It supports a wide range of JavaScript frameworks, offering
|
|
11
11
|
dedciated packages for each supported framework.
|
|
12
12
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { collapsible_exports, useCollapsibleContext } from './
|
|
1
|
+
import { collapsible_exports, useCollapsibleContext } from './3HMZSTYX.js';
|
|
2
2
|
import { useRenderStrategyContext, splitRenderStrategyProps, RenderStrategyProvider } from './L7OSYHVR.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
|
-
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
6
5
|
import { useEnvironmentContext } from './QODB3C3M.js';
|
|
6
|
+
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
7
7
|
import { createContext } from './I5UG2QUO.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
9
9
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
@@ -71,7 +71,7 @@ var AccordionItemContent = (props) => {
|
|
|
71
71
|
const [, ownProps] = splitVisibilityProps(contentProps, ["hidden", "data-state"]);
|
|
72
72
|
return ownProps;
|
|
73
73
|
});
|
|
74
|
-
const mergedProps = mergeProps(itemContentProps, props);
|
|
74
|
+
const mergedProps = mergeProps(() => itemContentProps(), props);
|
|
75
75
|
return createComponent(collapsible_exports.Content, mergedProps);
|
|
76
76
|
};
|
|
77
77
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './PBJ7MGGS.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
|
-
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
5
4
|
import { useEnvironmentContext } from './QODB3C3M.js';
|
|
5
|
+
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
6
6
|
import { createContext } from './I5UG2QUO.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
8
8
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./TY6NCPFG.jsx";
|
|
1
4
|
import {
|
|
2
5
|
PresenceProvider,
|
|
3
6
|
splitPresenceProps,
|
|
4
7
|
usePresence,
|
|
5
8
|
usePresenceContext
|
|
6
9
|
} from "./E72NMPSK.jsx";
|
|
7
|
-
import {
|
|
8
|
-
useFieldContext
|
|
9
|
-
} from "./LS7TV3SH.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -222,6 +222,9 @@ var TimePickerTrigger = (props) => {
|
|
|
222
222
|
return <ark.button {...mergedProps} />;
|
|
223
223
|
};
|
|
224
224
|
|
|
225
|
+
// src/components/time-picker/time-picker.anatomy.ts
|
|
226
|
+
import { anatomy } from "@zag-js/time-picker";
|
|
227
|
+
|
|
225
228
|
// src/components/time-picker/time-picker.ts
|
|
226
229
|
var time_picker_exports = {};
|
|
227
230
|
__export(time_picker_exports, {
|
|
@@ -256,6 +259,7 @@ export {
|
|
|
256
259
|
TimePickerRootProvider,
|
|
257
260
|
TimePickerSpacer,
|
|
258
261
|
TimePickerTrigger,
|
|
262
|
+
anatomy,
|
|
259
263
|
time_picker_exports,
|
|
260
264
|
parseTime
|
|
261
265
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./TY6NCPFG.jsx";
|
|
1
4
|
import {
|
|
2
5
|
PresenceProvider,
|
|
3
6
|
splitPresenceProps,
|
|
4
7
|
usePresence,
|
|
5
8
|
usePresenceContext
|
|
6
9
|
} from "./E72NMPSK.jsx";
|
|
7
|
-
import {
|
|
8
|
-
useFieldContext
|
|
9
|
-
} from "./LS7TV3SH.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -247,7 +247,6 @@ var ComboboxRoot = (props) => {
|
|
|
247
247
|
"disabled",
|
|
248
248
|
"disableLayer",
|
|
249
249
|
"form",
|
|
250
|
-
"getSelectionValue",
|
|
251
250
|
"highlightedValue",
|
|
252
251
|
"id",
|
|
253
252
|
"ids",
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import {
|
|
2
|
+
collapsible_exports
|
|
3
|
+
} from "./PQ3UNZE4.jsx";
|
|
4
|
+
import {
|
|
5
|
+
RenderStrategyProvider,
|
|
6
|
+
splitRenderStrategyProps,
|
|
7
|
+
useRenderStrategyContext
|
|
8
|
+
} from "./5ONYCKM3.jsx";
|
|
9
|
+
import {
|
|
10
|
+
createSplitProps
|
|
11
|
+
} from "./6WEDGJKQ.jsx";
|
|
12
|
+
import {
|
|
13
|
+
ark
|
|
14
|
+
} from "./UFYZ7HLU.jsx";
|
|
15
|
+
import {
|
|
16
|
+
useLocaleContext
|
|
17
|
+
} from "./3QQZKR3F.jsx";
|
|
18
|
+
import {
|
|
19
|
+
useEnvironmentContext
|
|
20
|
+
} from "./5O4RWSWO.jsx";
|
|
21
|
+
import {
|
|
22
|
+
createContext
|
|
23
|
+
} from "./NMGUCD2L.jsx";
|
|
24
|
+
import {
|
|
25
|
+
__export
|
|
26
|
+
} from "./7IUG3E2V.jsx";
|
|
27
|
+
|
|
28
|
+
// src/components/tree-view/tree-view-branch.tsx
|
|
29
|
+
import { mergeProps } from "@zag-js/solid";
|
|
30
|
+
import { createMemo } from "solid-js";
|
|
31
|
+
|
|
32
|
+
// src/components/tree-view/use-tree-view-context.ts
|
|
33
|
+
var [TreeViewProvider, useTreeViewContext] = createContext({
|
|
34
|
+
hookName: "useTreeViewContext",
|
|
35
|
+
providerName: "<TreeViewProvider />"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// src/components/tree-view/use-tree-view-node-props-context.ts
|
|
39
|
+
var [TreeViewNodePropsProvider, useTreeViewNodePropsContext] = createContext({
|
|
40
|
+
hookName: "useTreeViewNodePropsContext",
|
|
41
|
+
providerName: "<TreeViewNodeProvider />"
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// src/components/tree-view/tree-view-branch.tsx
|
|
45
|
+
var TreeViewBranch = (props) => {
|
|
46
|
+
const treeView2 = useTreeViewContext();
|
|
47
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
48
|
+
const renderStrategyProps = useRenderStrategyContext();
|
|
49
|
+
const nodeState = createMemo(() => treeView2().getNodeState(nodeProps));
|
|
50
|
+
const branchContentProps = treeView2().getBranchContentProps(nodeProps);
|
|
51
|
+
const mergedProps = mergeProps(() => treeView2().getBranchProps(nodeProps), props);
|
|
52
|
+
return <collapsible_exports.Root
|
|
53
|
+
open={nodeState().expanded}
|
|
54
|
+
ids={{ content: branchContentProps.id }}
|
|
55
|
+
{...renderStrategyProps}
|
|
56
|
+
{...mergedProps}
|
|
57
|
+
/>;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// src/components/tree-view/tree-view-branch-content.tsx
|
|
61
|
+
import { mergeProps as mergeProps2 } from "@zag-js/solid";
|
|
62
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
63
|
+
var splitVisibilityProps = createSplitProps();
|
|
64
|
+
var TreeViewBranchContent = (props) => {
|
|
65
|
+
const treeView2 = useTreeViewContext();
|
|
66
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
67
|
+
const branchContentProps = createMemo2(() => {
|
|
68
|
+
const contentProps = treeView2().getBranchContentProps(nodeProps);
|
|
69
|
+
const [, ownProps] = splitVisibilityProps(contentProps, [
|
|
70
|
+
"hidden",
|
|
71
|
+
"data-state"
|
|
72
|
+
]);
|
|
73
|
+
return ownProps;
|
|
74
|
+
});
|
|
75
|
+
const mergedProps = mergeProps2(() => branchContentProps(), props);
|
|
76
|
+
return <collapsible_exports.Content {...mergedProps} />;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/components/tree-view/tree-view-branch-control.tsx
|
|
80
|
+
import { mergeProps as mergeProps3 } from "@zag-js/solid";
|
|
81
|
+
var TreeViewBranchControl = (props) => {
|
|
82
|
+
const treeView2 = useTreeViewContext();
|
|
83
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
84
|
+
const mergedProps = mergeProps3(() => treeView2().getBranchControlProps(nodeProps), props);
|
|
85
|
+
return <ark.div {...mergedProps} />;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// src/components/tree-view/tree-view-branch-indent-guide.tsx
|
|
89
|
+
import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
90
|
+
var TreeViewBranchIndentGuide = (props) => {
|
|
91
|
+
const treeView2 = useTreeViewContext();
|
|
92
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
93
|
+
const mergedProps = mergeProps4(() => treeView2().getBranchIndentGuideProps(nodeProps), props);
|
|
94
|
+
return <ark.div {...mergedProps} />;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// src/components/tree-view/tree-view-branch-indicator.tsx
|
|
98
|
+
import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
99
|
+
var TreeViewBranchIndicator = (props) => {
|
|
100
|
+
const treeView2 = useTreeViewContext();
|
|
101
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
102
|
+
const mergedProps = mergeProps5(() => treeView2().getBranchIndicatorProps(nodeProps), props);
|
|
103
|
+
return <ark.div {...mergedProps} />;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// src/components/tree-view/tree-view-branch-text.tsx
|
|
107
|
+
import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
108
|
+
var TreeViewBranchText = (props) => {
|
|
109
|
+
const treeView2 = useTreeViewContext();
|
|
110
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
111
|
+
const mergedProps = mergeProps6(() => treeView2().getBranchTextProps(nodeProps), props);
|
|
112
|
+
return <ark.span {...mergedProps} />;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// src/components/tree-view/tree-view-branch-trigger.tsx
|
|
116
|
+
import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
117
|
+
var TreeViewBranchTrigger = (props) => {
|
|
118
|
+
const treeView2 = useTreeViewContext();
|
|
119
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
120
|
+
const mergedProps = mergeProps7(() => treeView2().getBranchTriggerProps(nodeProps), props);
|
|
121
|
+
return <ark.div {...mergedProps} />;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// src/components/tree-view/tree-view-item.tsx
|
|
125
|
+
import { mergeProps as mergeProps8 } from "@zag-js/solid";
|
|
126
|
+
var TreeViewItem = (props) => {
|
|
127
|
+
const treeView2 = useTreeViewContext();
|
|
128
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
129
|
+
const mergedProps = mergeProps8(() => treeView2().getItemProps(nodeProps), props);
|
|
130
|
+
return <ark.div {...mergedProps} />;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/components/tree-view/tree-view-item-indicator.tsx
|
|
134
|
+
import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
135
|
+
var TreeViewItemIndicator = (props) => {
|
|
136
|
+
const treeView2 = useTreeViewContext();
|
|
137
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
138
|
+
const mergedProps = mergeProps9(() => treeView2().getItemIndicatorProps(nodeProps), props);
|
|
139
|
+
return <ark.div {...mergedProps} />;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// src/components/tree-view/tree-view-item-text.tsx
|
|
143
|
+
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
144
|
+
var TreeViewItemText = (props) => {
|
|
145
|
+
const treeView2 = useTreeViewContext();
|
|
146
|
+
const nodeProps = useTreeViewNodePropsContext();
|
|
147
|
+
const mergedProps = mergeProps10(() => treeView2().getItemTextProps(nodeProps), props);
|
|
148
|
+
return <ark.span {...mergedProps} />;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// src/components/tree-view/tree-view-label.tsx
|
|
152
|
+
import { mergeProps as mergeProps11 } from "@zag-js/solid";
|
|
153
|
+
var TreeViewLabel = (props) => {
|
|
154
|
+
const treeView2 = useTreeViewContext();
|
|
155
|
+
const mergedProps = mergeProps11(() => treeView2().getLabelProps(), props);
|
|
156
|
+
return <ark.label {...mergedProps} />;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// src/components/tree-view/use-tree-view-node-context.ts
|
|
160
|
+
var [TreeViewNodeProvider, useTreeViewNodeContext] = createContext(
|
|
161
|
+
{
|
|
162
|
+
hookName: "useTreeViewNodeContext",
|
|
163
|
+
providerName: "<TreeViewNodeProvider />"
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
// src/components/tree-view/tree-view-node-context.ts
|
|
168
|
+
var TreeViewNodeContext = (props) => props.children(useTreeViewNodeContext());
|
|
169
|
+
|
|
170
|
+
// src/components/tree-view/tree-view-node-provider.tsx
|
|
171
|
+
function TreeViewNodeProvider2(props) {
|
|
172
|
+
const [nodeProps, localProps] = createSplitProps()(props, ["indexPath", "node"]);
|
|
173
|
+
return <TreeViewNodePropsProvider value={nodeProps}>{localProps.children}</TreeViewNodePropsProvider>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/components/tree-view/tree-view-root.tsx
|
|
177
|
+
import { mergeProps as mergeProps12 } from "@zag-js/solid";
|
|
178
|
+
|
|
179
|
+
// src/components/tree-view/use-tree-view.ts
|
|
180
|
+
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
181
|
+
import * as treeView from "@zag-js/tree-view";
|
|
182
|
+
import { createMemo as createMemo3, createUniqueId } from "solid-js";
|
|
183
|
+
var useTreeView = (props) => {
|
|
184
|
+
const locale = useLocaleContext();
|
|
185
|
+
const environment = useEnvironmentContext();
|
|
186
|
+
const id = createUniqueId();
|
|
187
|
+
const context = createMemo3(() => ({
|
|
188
|
+
id,
|
|
189
|
+
dir: locale().dir,
|
|
190
|
+
getRootNode: environment().getRootNode,
|
|
191
|
+
selectedValue: props.defaultSelectedValue,
|
|
192
|
+
expandedValue: props.defaultExpandedValue,
|
|
193
|
+
...props
|
|
194
|
+
}));
|
|
195
|
+
const [state, send] = useMachine(treeView.machine(context()), { context });
|
|
196
|
+
return createMemo3(() => treeView.connect(state, send, normalizeProps));
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// src/components/tree-view/tree-view-root.tsx
|
|
200
|
+
var TreeViewRoot = (props) => {
|
|
201
|
+
const [renderStrategyProps, treeViewProps] = splitRenderStrategyProps(props);
|
|
202
|
+
const [useTreeViewProps, localProps] = createSplitProps()(treeViewProps, [
|
|
203
|
+
"collection",
|
|
204
|
+
"defaultExpandedValue",
|
|
205
|
+
"defaultSelectedValue",
|
|
206
|
+
"expandedValue",
|
|
207
|
+
"expandOnClick",
|
|
208
|
+
"focusedValue",
|
|
209
|
+
"id",
|
|
210
|
+
"ids",
|
|
211
|
+
"onExpandedChange",
|
|
212
|
+
"onFocusChange",
|
|
213
|
+
"onSelectionChange",
|
|
214
|
+
"selectedValue",
|
|
215
|
+
"selectionMode",
|
|
216
|
+
"typeahead"
|
|
217
|
+
]);
|
|
218
|
+
const treeView2 = useTreeView(useTreeViewProps);
|
|
219
|
+
const mergedProps = mergeProps12(() => treeView2().getRootProps(), localProps);
|
|
220
|
+
return <TreeViewProvider value={treeView2}>
|
|
221
|
+
<RenderStrategyProvider value={renderStrategyProps}>
|
|
222
|
+
<ark.div {...mergedProps} />
|
|
223
|
+
</RenderStrategyProvider>
|
|
224
|
+
</TreeViewProvider>;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// src/components/tree-view/tree-view-root-provider.tsx
|
|
228
|
+
import { mergeProps as mergeProps13 } from "@zag-js/solid";
|
|
229
|
+
var TreeViewRootProvider = (props) => {
|
|
230
|
+
const [renderStrategyProps, treeViewProps] = splitRenderStrategyProps(props);
|
|
231
|
+
const [{ value: treeView2 }, localProps] = createSplitProps()(
|
|
232
|
+
treeViewProps,
|
|
233
|
+
["value"]
|
|
234
|
+
);
|
|
235
|
+
const mergedProps = mergeProps13(() => treeView2().getRootProps(), localProps);
|
|
236
|
+
return <TreeViewProvider value={treeView2}>
|
|
237
|
+
<RenderStrategyProvider value={renderStrategyProps}>
|
|
238
|
+
<ark.div {...mergedProps} />
|
|
239
|
+
</RenderStrategyProvider>
|
|
240
|
+
</TreeViewProvider>;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// src/components/tree-view/tree-view-tree.tsx
|
|
244
|
+
import { mergeProps as mergeProps14 } from "@zag-js/solid";
|
|
245
|
+
var TreeViewTree = (props) => {
|
|
246
|
+
const treeView2 = useTreeViewContext();
|
|
247
|
+
const mergedProps = mergeProps14(() => treeView2().getTreeProps(), props);
|
|
248
|
+
return <ark.div {...mergedProps} />;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/components/tree-view/tree-view.anatomy.ts
|
|
252
|
+
import { anatomy } from "@zag-js/tree-view";
|
|
253
|
+
|
|
254
|
+
// src/components/tree-view/tree-view.ts
|
|
255
|
+
var tree_view_exports = {};
|
|
256
|
+
__export(tree_view_exports, {
|
|
257
|
+
Branch: () => TreeViewBranch,
|
|
258
|
+
BranchContent: () => TreeViewBranchContent,
|
|
259
|
+
BranchControl: () => TreeViewBranchControl,
|
|
260
|
+
BranchIndentGuide: () => TreeViewBranchIndentGuide,
|
|
261
|
+
BranchIndicator: () => TreeViewBranchIndicator,
|
|
262
|
+
BranchText: () => TreeViewBranchText,
|
|
263
|
+
BranchTrigger: () => TreeViewBranchTrigger,
|
|
264
|
+
Context: () => TreeViewContext,
|
|
265
|
+
Item: () => TreeViewItem,
|
|
266
|
+
ItemIndicator: () => TreeViewItemIndicator,
|
|
267
|
+
ItemText: () => TreeViewItemText,
|
|
268
|
+
Label: () => TreeViewLabel,
|
|
269
|
+
NodeContext: () => TreeViewNodeContext,
|
|
270
|
+
NodeProvider: () => TreeViewNodeProvider2,
|
|
271
|
+
Root: () => TreeViewRoot,
|
|
272
|
+
RootProvider: () => TreeViewRootProvider,
|
|
273
|
+
Tree: () => TreeViewTree
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// src/components/tree-view/tree-view-context.tsx
|
|
277
|
+
var TreeViewContext = (props) => props.children(useTreeViewContext());
|
|
278
|
+
|
|
279
|
+
export {
|
|
280
|
+
TreeViewBranch,
|
|
281
|
+
TreeViewBranchContent,
|
|
282
|
+
TreeViewBranchControl,
|
|
283
|
+
TreeViewBranchIndentGuide,
|
|
284
|
+
TreeViewBranchIndicator,
|
|
285
|
+
TreeViewBranchText,
|
|
286
|
+
TreeViewBranchTrigger,
|
|
287
|
+
TreeViewItem,
|
|
288
|
+
TreeViewItemIndicator,
|
|
289
|
+
TreeViewItemText,
|
|
290
|
+
TreeViewLabel,
|
|
291
|
+
TreeViewNodeContext,
|
|
292
|
+
TreeViewNodeProvider2 as TreeViewNodeProvider,
|
|
293
|
+
useTreeView,
|
|
294
|
+
TreeViewRoot,
|
|
295
|
+
TreeViewRootProvider,
|
|
296
|
+
TreeViewTree,
|
|
297
|
+
anatomy,
|
|
298
|
+
tree_view_exports
|
|
299
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ListCollection } from '@zag-js/collection';
|
|
1
|
+
import { ListCollection, TreeCollection, filePathToTree } from '@zag-js/collection';
|
|
2
2
|
|
|
3
3
|
// src/components/collection.ts
|
|
4
4
|
|
|
@@ -24,5 +24,7 @@ function ref(obj) {
|
|
|
24
24
|
|
|
25
25
|
// src/components/collection.ts
|
|
26
26
|
var createListCollection = (options) => ref(new ListCollection(options));
|
|
27
|
+
var createTreeCollection = (options) => ref(new TreeCollection(options));
|
|
28
|
+
var createFileTreeCollection = (paths) => ref(filePathToTree(paths));
|
|
27
29
|
|
|
28
|
-
export { createListCollection };
|
|
30
|
+
export { createFileTreeCollection, createListCollection, createTreeCollection };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
// src/components/collection.ts
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ListCollection,
|
|
4
|
+
TreeCollection,
|
|
5
|
+
filePathToTree
|
|
6
|
+
} from "@zag-js/collection";
|
|
3
7
|
|
|
4
8
|
// ../../node_modules/proxy-compare/dist/index.js
|
|
5
9
|
var TRACK_MEMO_SYMBOL = Symbol();
|
|
@@ -242,7 +246,11 @@ function ref(obj) {
|
|
|
242
246
|
|
|
243
247
|
// src/components/collection.ts
|
|
244
248
|
var createListCollection = (options) => ref(new ListCollection(options));
|
|
249
|
+
var createTreeCollection = (options) => ref(new TreeCollection(options));
|
|
250
|
+
var createFileTreeCollection = (paths) => ref(filePathToTree(paths));
|
|
245
251
|
|
|
246
252
|
export {
|
|
247
|
-
createListCollection
|
|
253
|
+
createListCollection,
|
|
254
|
+
createTreeCollection,
|
|
255
|
+
createFileTreeCollection
|
|
248
256
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useFieldContext } from './PBJ7MGGS.js';
|
|
1
2
|
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './LCESUDZB.js';
|
|
2
|
-
import { useFieldContext } from './Q5KLHHE3.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
|
-
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
6
5
|
import { useEnvironmentContext } from './QODB3C3M.js';
|
|
6
|
+
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
7
7
|
import { createContext } from './I5UG2QUO.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
9
9
|
import * as colorPicker from '@zag-js/color-picker';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './PBJ7MGGS.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
|
-
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
5
4
|
import { useEnvironmentContext } from './QODB3C3M.js';
|
|
5
|
+
import { useLocaleContext } from './HPDOBQ3V.js';
|
|
6
6
|
import { createContext } from './I5UG2QUO.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
8
8
|
import { createComponent, mergeProps as mergeProps$1, spread, template } from 'solid-js/web';
|