@ark-ui/solid 5.1.1 → 5.3.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/dist/chunk/{MDJAL2LV.jsx → 2H2BP2D4.jsx} +10 -4
- package/dist/chunk/{CABZW4BQ.jsx → 4Y2CGAFZ.jsx} +5 -2
- package/dist/chunk/{LJAETAOB.jsx → 5H25GYRZ.jsx} +5 -2
- package/dist/chunk/{ZGXZNLX2.js → 5N6RITOU.js} +15 -4
- package/dist/chunk/{2XUYX7MZ.jsx → 7HMNRDMK.jsx} +5 -2
- package/dist/chunk/{MOQT5762.js → 7QS2CMYY.js} +8 -2
- package/dist/chunk/A3VC6L75.jsx +38 -0
- package/dist/chunk/{WNIFZKTJ.jsx → AYESR2LP.jsx} +10 -0
- package/dist/chunk/{LK5627GR.js → BPPSBY3Z.js} +8 -2
- package/dist/chunk/BUX3MXSX.js +40 -0
- package/dist/chunk/{B2KZ5VSW.jsx → DV4N466N.jsx} +5 -2
- package/dist/chunk/{B246J3FR.js → DW4NU34Z.js} +7 -1
- package/dist/chunk/{WDXH3NHK.jsx → E3OI2TND.jsx} +5 -2
- package/dist/chunk/{S6TQNQE6.js → FAC6JW4M.js} +12 -4
- package/dist/chunk/{GLMPR4B7.js → GP7PBPSV.js} +8 -2
- package/dist/chunk/{65SQKHCI.jsx → H2PO7WYN.jsx} +6 -3
- package/dist/chunk/{OY4ARTMM.js → JSBTYBVG.js} +6 -1
- package/dist/chunk/{EI7I4DR6.js → KVZN5EIK.js} +9 -3
- package/dist/chunk/{F5GOQFKX.js → L6IGMFHF.js} +9 -3
- package/dist/chunk/{2LZKFXR5.jsx → MM2I4S7S.jsx} +1 -1
- package/dist/chunk/{GMNTJ5KE.js → N3FF6O2Y.js} +3 -3
- package/dist/chunk/{CSDXHOTM.jsx → N4O7ZKCJ.jsx} +1 -1
- package/dist/chunk/{C745EVQO.js → OF3ALDDY.js} +3 -3
- package/dist/chunk/{A4744EEE.jsx → PSNFSH4B.jsx} +5 -2
- package/dist/chunk/{R5NPBVOA.js → QCBVLVTA.js} +9 -3
- package/dist/chunk/{Y7EY3OTU.jsx → T6XMELG3.jsx} +11 -4
- package/dist/chunk/{26K66CRD.js → TVG6ZU7O.js} +9 -3
- package/dist/chunk/{QTSWXPKO.js → U67NSVQP.js} +1 -1
- package/dist/chunk/{7IHVZWMT.jsx → UFXWNPFN.jsx} +5 -2
- package/dist/chunk/{KBHIJYMD.jsx → VDDVCRFC.jsx} +3 -3
- package/dist/chunk/{F7JP3DGZ.js → WEP4LIH4.js} +16 -2
- package/dist/chunk/{3FYZXSQZ.jsx → WNMJRJ4R.jsx} +5 -2
- package/dist/chunk/{JUYBJNX6.js → WXY3QNZF.js} +9 -3
- package/dist/chunk/{DJ375Z4C.jsx → XUCRRVV2.jsx} +12 -4
- package/dist/chunk/{NZEL4233.js → YGOJI6HV.js} +1 -1
- package/dist/chunk/{KZCXBFHA.jsx → YUDHR2PE.jsx} +5 -2
- package/dist/chunk/{D6BC5RCX.jsx → YVFRVXSX.jsx} +5 -2
- package/dist/chunk/{UODFV2GS.js → ZVM34F6R.js} +9 -3
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +2 -2
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/carousel/index.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/clipboard/index.d.ts +1 -1
- package/dist/components/collapsible/index.d.ts +9 -3
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/index.jsx +3 -1
- package/dist/components/color-picker/index.d.ts +7 -3
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +2 -2
- package/dist/components/combobox/index.d.ts +2 -2
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/index.jsx +2 -2
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.jsx +3 -2
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.jsx +3 -2
- package/dist/components/download-trigger/index.d.ts +25 -0
- package/dist/components/download-trigger/index.js +1 -0
- package/dist/components/download-trigger/index.jsx +13 -0
- package/dist/components/editable/index.d.ts +1 -1
- package/dist/components/factory.d.ts +1 -1
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/fieldset/index.d.ts +1 -1
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/focus-trap/index.d.ts +1 -1
- package/dist/components/frame/index.d.ts +1 -1
- package/dist/components/highlight/index.d.ts +1 -1
- package/dist/components/hover-card/index.d.ts +2 -2
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/index.jsx +3 -2
- package/dist/components/index.d.ts +7 -4
- package/dist/components/index.js +24 -23
- package/dist/components/index.jsx +170 -164
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +3 -2
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pin-input/index.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.jsx +3 -2
- package/dist/components/presence/index.d.ts +3 -3
- package/dist/components/presence/index.js +1 -1
- package/dist/components/presence/index.jsx +2 -1
- package/dist/components/progress/index.d.ts +1 -1
- package/dist/components/qr-code/index.d.ts +1 -1
- package/dist/components/radio-group/index.d.ts +1 -1
- package/dist/components/rating-group/index.d.ts +1 -1
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.jsx +2 -2
- package/dist/components/signature-pad/index.d.ts +1 -1
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/splitter/index.d.ts +9 -6
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/splitter/index.jsx +1 -1
- package/dist/components/steps/index.d.ts +1 -1
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.jsx +3 -2
- package/dist/components/tags-input/index.d.ts +1 -1
- package/dist/components/time-picker/index.d.ts +2 -2
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/index.jsx +3 -2
- package/dist/components/timer/index.d.ts +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.jsx +1 -1
- package/dist/components/toggle/index.d.ts +1 -1
- package/dist/components/toggle-group/index.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.jsx +3 -2
- package/dist/components/tour/index.d.ts +2 -2
- package/dist/components/tour/index.js +1 -1
- package/dist/components/tour/index.jsx +3 -2
- package/dist/components/tree-view/index.d.ts +1 -1
- package/dist/components/tree-view/index.js +1 -1
- package/dist/components/tree-view/index.jsx +2 -2
- package/dist/index.d.ts +7 -4
- package/dist/index.js +24 -23
- package/dist/index.jsx +170 -164
- package/dist/{types-CxryXVkR.d.ts → types-Bc0WfPsv.d.ts} +2 -1
- package/dist/{use-presence-B6QV_j94.d.ts → use-presence-BUVPqaFu.d.ts} +2 -2
- package/package.json +53 -51
- /package/dist/chunk/{R2YVXMP7.jsx → 6G6HOPPW.jsx} +0 -0
- /package/dist/chunk/{ZWNW7ARB.js → XUQC4TSL.js} +0 -0
|
@@ -32,7 +32,7 @@ var SplitterContext = (props) => props.children(useSplitterContext());
|
|
|
32
32
|
// src/components/splitter/splitter-panel.tsx
|
|
33
33
|
import { mergeProps } from "@zag-js/solid";
|
|
34
34
|
var SplitterPanel = (props) => {
|
|
35
|
-
const [panelProps, restProps] = createSplitProps()(props, ["id"
|
|
35
|
+
const [panelProps, restProps] = createSplitProps()(props, ["id"]);
|
|
36
36
|
const api = useSplitterContext();
|
|
37
37
|
const mergedProps = mergeProps(() => api().getPanelProps(panelProps), restProps);
|
|
38
38
|
return <ark.div {...mergedProps} />;
|
|
@@ -41,7 +41,7 @@ var SplitterPanel = (props) => {
|
|
|
41
41
|
// src/components/splitter/splitter-resize-trigger.tsx
|
|
42
42
|
import { mergeProps as mergeProps2 } from "@zag-js/solid";
|
|
43
43
|
var SplitterResizeTrigger = (props) => {
|
|
44
|
-
const [resizeTriggerProps, restProps] = createSplitProps()(props, ["disabled", "id"
|
|
44
|
+
const [resizeTriggerProps, restProps] = createSplitProps()(props, ["disabled", "id"]);
|
|
45
45
|
const api = useSplitterContext();
|
|
46
46
|
const mergedProps = mergeProps2(() => api().getResizeTriggerProps(resizeTriggerProps), restProps);
|
|
47
47
|
return <ark.button {...mergedProps} />;
|
|
@@ -74,9 +74,15 @@ var SplitterRoot = (props) => {
|
|
|
74
74
|
"defaultSize",
|
|
75
75
|
"id",
|
|
76
76
|
"ids",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
77
|
+
"keyboardResizeBy",
|
|
78
|
+
"nonce",
|
|
79
|
+
"onCollapse",
|
|
80
|
+
"onExpand",
|
|
81
|
+
"onResize",
|
|
82
|
+
"onResizeEnd",
|
|
83
|
+
"onResizeStart",
|
|
79
84
|
"orientation",
|
|
85
|
+
"panels",
|
|
80
86
|
"size"
|
|
81
87
|
]);
|
|
82
88
|
const api = useSplitter(useSplitterProps);
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
|
+
import {
|
|
8
|
+
composeRefs
|
|
9
|
+
} from "./DOBZPYAN.jsx";
|
|
7
10
|
import {
|
|
8
11
|
createSplitProps
|
|
9
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -57,7 +60,7 @@ var DatePickerContent = (props) => {
|
|
|
57
60
|
props
|
|
58
61
|
);
|
|
59
62
|
return <Show when={!presenceApi().unmounted}>
|
|
60
|
-
<ark.div {...mergedProps} />
|
|
63
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
61
64
|
</Show>;
|
|
62
65
|
};
|
|
63
66
|
|
|
@@ -6,7 +6,10 @@ import {
|
|
|
6
6
|
splitPresenceProps,
|
|
7
7
|
usePresence,
|
|
8
8
|
usePresenceContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./PSNFSH4B.jsx";
|
|
10
|
+
import {
|
|
11
|
+
composeRefs
|
|
12
|
+
} from "./DOBZPYAN.jsx";
|
|
10
13
|
import {
|
|
11
14
|
createSplitProps
|
|
12
15
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -57,7 +60,7 @@ var SelectContent = (props) => {
|
|
|
57
60
|
props
|
|
58
61
|
);
|
|
59
62
|
return <Show when={!presenceApi().unmounted}>
|
|
60
|
-
<ark.div {...mergedProps} />
|
|
63
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
61
64
|
</Show>;
|
|
62
65
|
};
|
|
63
66
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './
|
|
1
|
+
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './JSBTYBVG.js';
|
|
2
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
2
3
|
import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyContext } from './QFAL6GWC.js';
|
|
3
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
5
|
import { ark } from './EPLBB4QN.js';
|
|
@@ -7,7 +8,7 @@ import { useLocaleContext } from './QEMQBM6W.js';
|
|
|
7
8
|
import { createContext } from './TROPIN4C.js';
|
|
8
9
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
10
|
import { __export } from './ESLJRKWD.js';
|
|
10
|
-
import { createComponent } from 'solid-js/web';
|
|
11
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
11
12
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
12
13
|
import { Show, createUniqueId, createMemo } from 'solid-js';
|
|
13
14
|
import * as dialog from '@zag-js/dialog';
|
|
@@ -32,7 +33,12 @@ var DialogBackdrop = (props) => {
|
|
|
32
33
|
return !presenceApi().unmounted;
|
|
33
34
|
},
|
|
34
35
|
get children() {
|
|
35
|
-
return createComponent(ark.div, mergedProps
|
|
36
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
37
|
+
ref(r$) {
|
|
38
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
39
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
36
42
|
}
|
|
37
43
|
});
|
|
38
44
|
};
|
|
@@ -50,7 +56,12 @@ var DialogContent = (props) => {
|
|
|
50
56
|
return !presenceApi().unmounted;
|
|
51
57
|
},
|
|
52
58
|
get children() {
|
|
53
|
-
return createComponent(ark.div, mergedProps
|
|
59
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
60
|
+
ref(r$) {
|
|
61
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
62
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
54
65
|
}
|
|
55
66
|
});
|
|
56
67
|
};
|
|
@@ -6,7 +6,10 @@ import {
|
|
|
6
6
|
splitPresenceProps,
|
|
7
7
|
usePresence,
|
|
8
8
|
usePresenceContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./PSNFSH4B.jsx";
|
|
10
|
+
import {
|
|
11
|
+
composeRefs
|
|
12
|
+
} from "./DOBZPYAN.jsx";
|
|
10
13
|
import {
|
|
11
14
|
createSplitProps
|
|
12
15
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -57,7 +60,7 @@ var ComboboxContent = (props) => {
|
|
|
57
60
|
props
|
|
58
61
|
);
|
|
59
62
|
return <Show when={!presenceApi().unmounted}>
|
|
60
|
-
<ark.div {...mergedProps} />
|
|
63
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
61
64
|
</Show>;
|
|
62
65
|
};
|
|
63
66
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useFieldContext } from './CIIDKCDP.js';
|
|
2
|
-
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './
|
|
2
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './JSBTYBVG.js';
|
|
3
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
3
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
5
|
import { ark } from './EPLBB4QN.js';
|
|
5
6
|
import { useEnvironmentContext } from './YMMMHJJS.js';
|
|
@@ -34,7 +35,12 @@ var SelectContent = (props) => {
|
|
|
34
35
|
return !presenceApi().unmounted;
|
|
35
36
|
},
|
|
36
37
|
get children() {
|
|
37
|
-
return createComponent(ark.div, mergedProps
|
|
38
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
39
|
+
ref(r$) {
|
|
40
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
41
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
38
44
|
}
|
|
39
45
|
});
|
|
40
46
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ark
|
|
3
|
+
} from "./UFYZ7HLU.jsx";
|
|
4
|
+
import {
|
|
5
|
+
useEnvironmentContext
|
|
6
|
+
} from "./D2Z5BEON.jsx";
|
|
7
|
+
|
|
8
|
+
// src/components/download-trigger/download-trigger.tsx
|
|
9
|
+
import { downloadFile } from "@zag-js/file-utils";
|
|
10
|
+
import { splitProps } from "solid-js";
|
|
11
|
+
function DownloadTrigger(props) {
|
|
12
|
+
const [downloadProps, restProps] = splitProps(props, ["fileName", "data", "mimeType", "onClick"]);
|
|
13
|
+
const env = useEnvironmentContext();
|
|
14
|
+
const download = (data) => {
|
|
15
|
+
downloadFile({ file: data, name: downloadProps.fileName, type: downloadProps.mimeType, win: env().getWindow() });
|
|
16
|
+
};
|
|
17
|
+
const handleClick = (e) => {
|
|
18
|
+
if (typeof downloadProps.onClick === "function") {
|
|
19
|
+
downloadProps.onClick(e);
|
|
20
|
+
}
|
|
21
|
+
if (e.defaultPrevented) return;
|
|
22
|
+
if (typeof downloadProps.data === "function") {
|
|
23
|
+
const maybePromise = downloadProps.data();
|
|
24
|
+
if (maybePromise instanceof Promise) {
|
|
25
|
+
maybePromise.then((data) => download(data));
|
|
26
|
+
} else {
|
|
27
|
+
download(maybePromise);
|
|
28
|
+
}
|
|
29
|
+
} else {
|
|
30
|
+
download(downloadProps.data);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return <ark.button {...restProps} type="button" onClick={handleClick} />;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
DownloadTrigger
|
|
38
|
+
};
|
|
@@ -114,6 +114,14 @@ var CollapsibleTrigger = (props) => {
|
|
|
114
114
|
return <ark.button {...mergedProps} />;
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
+
// src/components/collapsible/collapsible-indicator.tsx
|
|
118
|
+
import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
119
|
+
var CollapsibleIndicator = (props) => {
|
|
120
|
+
const collapsible2 = useCollapsibleContext();
|
|
121
|
+
const mergedProps = mergeProps5(() => collapsible2().getIndicatorProps(), props);
|
|
122
|
+
return <ark.div {...mergedProps} />;
|
|
123
|
+
};
|
|
124
|
+
|
|
117
125
|
// src/components/collapsible/collapsible.anatomy.ts
|
|
118
126
|
import { anatomy } from "@zag-js/collapsible";
|
|
119
127
|
|
|
@@ -122,6 +130,7 @@ var collapsible_exports = {};
|
|
|
122
130
|
__export(collapsible_exports, {
|
|
123
131
|
Content: () => CollapsibleContent,
|
|
124
132
|
Context: () => CollapsibleContext,
|
|
133
|
+
Indicator: () => CollapsibleIndicator,
|
|
125
134
|
Root: () => CollapsibleRoot,
|
|
126
135
|
RootProvider: () => CollapsibleRootProvider,
|
|
127
136
|
Trigger: () => CollapsibleTrigger
|
|
@@ -135,6 +144,7 @@ export {
|
|
|
135
144
|
CollapsibleRoot,
|
|
136
145
|
CollapsibleRootProvider,
|
|
137
146
|
CollapsibleTrigger,
|
|
147
|
+
CollapsibleIndicator,
|
|
138
148
|
anatomy,
|
|
139
149
|
collapsible_exports
|
|
140
150
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './
|
|
1
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './JSBTYBVG.js';
|
|
2
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
2
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
4
|
import { ark } from './EPLBB4QN.js';
|
|
4
5
|
import { useEnvironmentContext } from './YMMMHJJS.js';
|
|
@@ -34,7 +35,12 @@ var DatePickerContent = (props) => {
|
|
|
34
35
|
return !presenceApi().unmounted;
|
|
35
36
|
},
|
|
36
37
|
get children() {
|
|
37
|
-
return createComponent(ark.div, mergedProps
|
|
38
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
39
|
+
ref(r$) {
|
|
40
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
41
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
38
44
|
}
|
|
39
45
|
});
|
|
40
46
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ark } from './EPLBB4QN.js';
|
|
2
|
+
import { useEnvironmentContext } from './YMMMHJJS.js';
|
|
3
|
+
import { createComponent, mergeProps } from 'solid-js/web';
|
|
4
|
+
import { downloadFile } from '@zag-js/file-utils';
|
|
5
|
+
import { splitProps } from 'solid-js';
|
|
6
|
+
|
|
7
|
+
function DownloadTrigger(props) {
|
|
8
|
+
const [downloadProps, restProps] = splitProps(props, ["fileName", "data", "mimeType", "onClick"]);
|
|
9
|
+
const env = useEnvironmentContext();
|
|
10
|
+
const download = (data) => {
|
|
11
|
+
downloadFile({
|
|
12
|
+
file: data,
|
|
13
|
+
name: downloadProps.fileName,
|
|
14
|
+
type: downloadProps.mimeType,
|
|
15
|
+
win: env().getWindow()
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const handleClick = (e) => {
|
|
19
|
+
if (typeof downloadProps.onClick === "function") {
|
|
20
|
+
downloadProps.onClick(e);
|
|
21
|
+
}
|
|
22
|
+
if (e.defaultPrevented) return;
|
|
23
|
+
if (typeof downloadProps.data === "function") {
|
|
24
|
+
const maybePromise = downloadProps.data();
|
|
25
|
+
if (maybePromise instanceof Promise) {
|
|
26
|
+
maybePromise.then((data) => download(data));
|
|
27
|
+
} else {
|
|
28
|
+
download(maybePromise);
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
download(downloadProps.data);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return createComponent(ark.button, mergeProps(restProps, {
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: handleClick
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { DownloadTrigger };
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
|
+
import {
|
|
8
|
+
composeRefs
|
|
9
|
+
} from "./DOBZPYAN.jsx";
|
|
7
10
|
import {
|
|
8
11
|
createSplitProps
|
|
9
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -90,7 +93,7 @@ var TimePickerContent = (props) => {
|
|
|
90
93
|
props
|
|
91
94
|
);
|
|
92
95
|
return <Show when={!presenceApi().unmounted}>
|
|
93
|
-
<ark.div {...mergedProps} />
|
|
96
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
94
97
|
</Show>;
|
|
95
98
|
};
|
|
96
99
|
|
|
@@ -87,15 +87,21 @@ var CollapsibleTrigger = (props) => {
|
|
|
87
87
|
const mergedProps = mergeProps(() => api().getTriggerProps(), props);
|
|
88
88
|
return createComponent(ark.button, mergedProps);
|
|
89
89
|
};
|
|
90
|
+
var CollapsibleIndicator = (props) => {
|
|
91
|
+
const collapsible2 = useCollapsibleContext();
|
|
92
|
+
const mergedProps = mergeProps(() => collapsible2().getIndicatorProps(), props);
|
|
93
|
+
return createComponent(ark.div, mergedProps);
|
|
94
|
+
};
|
|
90
95
|
|
|
91
96
|
// src/components/collapsible/collapsible.ts
|
|
92
97
|
var collapsible_exports = {};
|
|
93
98
|
__export(collapsible_exports, {
|
|
94
99
|
Content: () => CollapsibleContent,
|
|
95
100
|
Context: () => CollapsibleContext,
|
|
101
|
+
Indicator: () => CollapsibleIndicator,
|
|
96
102
|
Root: () => CollapsibleRoot,
|
|
97
103
|
RootProvider: () => CollapsibleRootProvider,
|
|
98
104
|
Trigger: () => CollapsibleTrigger
|
|
99
105
|
});
|
|
100
106
|
|
|
101
|
-
export { CollapsibleContent, CollapsibleContext, CollapsibleRoot, CollapsibleRootProvider, CollapsibleTrigger, collapsible_exports, useCollapsible, useCollapsibleContext };
|
|
107
|
+
export { CollapsibleContent, CollapsibleContext, CollapsibleIndicator, CollapsibleRoot, CollapsibleRootProvider, CollapsibleTrigger, collapsible_exports, useCollapsible, useCollapsibleContext };
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
|
+
import {
|
|
8
|
+
composeRefs
|
|
9
|
+
} from "./DOBZPYAN.jsx";
|
|
7
10
|
import {
|
|
8
11
|
createSplitProps
|
|
9
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -62,7 +65,7 @@ var TooltipContent = (props) => {
|
|
|
62
65
|
props
|
|
63
66
|
);
|
|
64
67
|
return <Show when={!presenceApi().unmounted}>
|
|
65
|
-
<ark.div {...mergedProps} />
|
|
68
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
66
69
|
</Show>;
|
|
67
70
|
};
|
|
68
71
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useFieldContext } from './CIIDKCDP.js';
|
|
2
|
-
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './
|
|
2
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './JSBTYBVG.js';
|
|
3
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
3
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
5
|
import { ark } from './EPLBB4QN.js';
|
|
5
6
|
import { useEnvironmentContext } from './YMMMHJJS.js';
|
|
@@ -126,7 +127,12 @@ var ColorPickerContent = (props) => {
|
|
|
126
127
|
return !presenceApi().unmounted;
|
|
127
128
|
},
|
|
128
129
|
get children() {
|
|
129
|
-
return createComponent(ark.div, mergedProps
|
|
130
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
131
|
+
ref(r$) {
|
|
132
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
133
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
134
|
+
}
|
|
135
|
+
}));
|
|
130
136
|
}
|
|
131
137
|
});
|
|
132
138
|
};
|
|
@@ -328,10 +334,12 @@ var ColorPickerValueSwatch = (props) => {
|
|
|
328
334
|
};
|
|
329
335
|
var ColorPickerValueText = (props) => {
|
|
330
336
|
const colorPicker2 = useColorPickerContext();
|
|
331
|
-
const
|
|
337
|
+
const [formatProps, localProps] = createSplitProps()(props, ["format"]);
|
|
338
|
+
const mergedProps = mergeProps(() => colorPicker2().getValueTextProps(), localProps);
|
|
339
|
+
const valueAsString = createMemo(() => formatProps.format ? colorPicker2().value.toString(formatProps.format) : colorPicker2().valueAsString);
|
|
332
340
|
return createComponent(ark.span, mergeProps$1(mergedProps, {
|
|
333
341
|
get children() {
|
|
334
|
-
return
|
|
342
|
+
return props.children || valueAsString();
|
|
335
343
|
}
|
|
336
344
|
}));
|
|
337
345
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useFieldContext } from './CIIDKCDP.js';
|
|
2
|
-
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './
|
|
2
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './JSBTYBVG.js';
|
|
3
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
3
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
5
|
import { ark } from './EPLBB4QN.js';
|
|
5
6
|
import { useEnvironmentContext } from './YMMMHJJS.js';
|
|
@@ -34,7 +35,12 @@ var ComboboxContent = (props) => {
|
|
|
34
35
|
return !presenceApi().unmounted;
|
|
35
36
|
},
|
|
36
37
|
get children() {
|
|
37
|
-
return createComponent(ark.div, mergedProps
|
|
38
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
39
|
+
ref(r$) {
|
|
40
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
41
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
38
44
|
}
|
|
39
45
|
});
|
|
40
46
|
};
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
|
+
import {
|
|
8
|
+
composeRefs
|
|
9
|
+
} from "./DOBZPYAN.jsx";
|
|
7
10
|
import {
|
|
8
11
|
RenderStrategyProvider,
|
|
9
12
|
splitRenderStrategyProps,
|
|
@@ -52,7 +55,7 @@ var DialogBackdrop = (props) => {
|
|
|
52
55
|
props
|
|
53
56
|
);
|
|
54
57
|
return <Show when={!presenceApi().unmounted}>
|
|
55
|
-
<ark.div {...mergedProps} />
|
|
58
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
56
59
|
</Show>;
|
|
57
60
|
};
|
|
58
61
|
|
|
@@ -76,7 +79,7 @@ var DialogContent = (props) => {
|
|
|
76
79
|
props
|
|
77
80
|
);
|
|
78
81
|
return <Show2 when={!presenceApi().unmounted}>
|
|
79
|
-
<ark.div {...mergedProps} />
|
|
82
|
+
<ark.div {...mergedProps} ref={composeRefs(presenceApi().ref, props.ref)} />
|
|
80
83
|
</Show2>;
|
|
81
84
|
};
|
|
82
85
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
1
2
|
import { splitRenderStrategyProps } from './QFAL6GWC.js';
|
|
2
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
4
|
import { ark } from './EPLBB4QN.js';
|
|
@@ -22,8 +23,8 @@ var usePresence = (props) => {
|
|
|
22
23
|
return createMemo(() => ({
|
|
23
24
|
unmounted: !api().present && !wasEverPresent() && renderStrategyProps.lazyMount || renderStrategyProps.unmountOnExit && !api().present && wasEverPresent(),
|
|
24
25
|
present: api().present,
|
|
26
|
+
ref: api().setNode,
|
|
25
27
|
presenceProps: {
|
|
26
|
-
ref: api().setNode,
|
|
27
28
|
hidden: !api().present,
|
|
28
29
|
"data-state": context.present ? "open" : "closed"
|
|
29
30
|
}
|
|
@@ -41,6 +42,10 @@ var Presence = (props) => {
|
|
|
41
42
|
},
|
|
42
43
|
get children() {
|
|
43
44
|
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
45
|
+
ref(r$) {
|
|
46
|
+
var _ref$ = composeRefs(api().ref, props.ref);
|
|
47
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
48
|
+
},
|
|
44
49
|
"data-scope": "presence",
|
|
45
50
|
"data-part": "root"
|
|
46
51
|
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './
|
|
1
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './JSBTYBVG.js';
|
|
2
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
2
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
4
|
import { ark } from './EPLBB4QN.js';
|
|
4
5
|
import { useEnvironmentContext } from './YMMMHJJS.js';
|
|
@@ -7,7 +8,7 @@ import { createContext } from './TROPIN4C.js';
|
|
|
7
8
|
import { runIfFn } from './DT73WLR4.js';
|
|
8
9
|
import { __export } from './ESLJRKWD.js';
|
|
9
10
|
export { parseTime } from '@internationalized/date';
|
|
10
|
-
import { createComponent } from 'solid-js/web';
|
|
11
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
11
12
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
12
13
|
import { Show, createUniqueId, createMemo } from 'solid-js';
|
|
13
14
|
import * as timePicker from '@zag-js/time-picker';
|
|
@@ -64,7 +65,12 @@ var TimePickerContent = (props) => {
|
|
|
64
65
|
return !presenceApi().unmounted;
|
|
65
66
|
},
|
|
66
67
|
get children() {
|
|
67
|
-
return createComponent(ark.div, mergedProps
|
|
68
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
69
|
+
ref(r$) {
|
|
70
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
71
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
68
74
|
}
|
|
69
75
|
});
|
|
70
76
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { usePresence, PresenceProvider } from './
|
|
1
|
+
import { usePresence, PresenceProvider } from './JSBTYBVG.js';
|
|
2
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
2
3
|
import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyContext } from './QFAL6GWC.js';
|
|
3
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
5
|
import { ark } from './EPLBB4QN.js';
|
|
@@ -7,7 +8,7 @@ import { useLocaleContext } from './QEMQBM6W.js';
|
|
|
7
8
|
import { createContext } from './TROPIN4C.js';
|
|
8
9
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
10
|
import { __export } from './ESLJRKWD.js';
|
|
10
|
-
import { createComponent } from 'solid-js/web';
|
|
11
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
11
12
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
12
13
|
import { Show, createUniqueId, createMemo } from 'solid-js';
|
|
13
14
|
import * as tabs from '@zag-js/tabs';
|
|
@@ -37,7 +38,12 @@ var TabContent = (props) => {
|
|
|
37
38
|
return !presenceApi().unmounted;
|
|
38
39
|
},
|
|
39
40
|
get children() {
|
|
40
|
-
return createComponent(ark.div, mergedProps
|
|
41
|
+
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
42
|
+
ref(r$) {
|
|
43
|
+
var _ref$ = composeRefs(presenceApi().ref, props.ref);
|
|
44
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
41
47
|
}
|
|
42
48
|
});
|
|
43
49
|
}
|
|
@@ -20,13 +20,13 @@ var [SplitterProvider, useSplitterContext] = createContext({
|
|
|
20
20
|
// src/components/splitter/splitter-context.tsx
|
|
21
21
|
var SplitterContext = (props) => props.children(useSplitterContext());
|
|
22
22
|
var SplitterPanel = (props) => {
|
|
23
|
-
const [panelProps, restProps] = createSplitProps()(props, ["id"
|
|
23
|
+
const [panelProps, restProps] = createSplitProps()(props, ["id"]);
|
|
24
24
|
const api = useSplitterContext();
|
|
25
25
|
const mergedProps = mergeProps(() => api().getPanelProps(panelProps), restProps);
|
|
26
26
|
return createComponent(ark.div, mergedProps);
|
|
27
27
|
};
|
|
28
28
|
var SplitterResizeTrigger = (props) => {
|
|
29
|
-
const [resizeTriggerProps, restProps] = createSplitProps()(props, ["disabled", "id"
|
|
29
|
+
const [resizeTriggerProps, restProps] = createSplitProps()(props, ["disabled", "id"]);
|
|
30
30
|
const api = useSplitterContext();
|
|
31
31
|
const mergedProps = mergeProps(() => api().getResizeTriggerProps(resizeTriggerProps), restProps);
|
|
32
32
|
return createComponent(ark.button, mergedProps);
|
|
@@ -47,7 +47,7 @@ var useSplitter = (props) => {
|
|
|
47
47
|
|
|
48
48
|
// src/components/splitter/splitter-root.tsx
|
|
49
49
|
var SplitterRoot = (props) => {
|
|
50
|
-
const [useSplitterProps, localProps] = createSplitProps()(props, ["defaultSize", "id", "ids", "
|
|
50
|
+
const [useSplitterProps, localProps] = createSplitProps()(props, ["defaultSize", "id", "ids", "keyboardResizeBy", "nonce", "onCollapse", "onExpand", "onResize", "onResizeEnd", "onResizeStart", "orientation", "panels", "size"]);
|
|
51
51
|
const api = useSplitter(useSplitterProps);
|
|
52
52
|
const mergedProps = mergeProps(() => api().getRootProps(), localProps);
|
|
53
53
|
return createComponent(SplitterProvider, {
|
|
@@ -64,11 +64,11 @@ var Toaster = (props) => {
|
|
|
64
64
|
store: toasterProps.toaster,
|
|
65
65
|
id: createUniqueId(),
|
|
66
66
|
dir: locale()?.dir,
|
|
67
|
-
getRootNode:
|
|
67
|
+
getRootNode: env()?.getRootNode
|
|
68
68
|
}));
|
|
69
69
|
const api = createMemo(() => toast2.group.connect(service, normalizeProps));
|
|
70
70
|
const toasts = createMemo(() => api().getToasts());
|
|
71
|
-
const mergedProps = mergeProps(api().getGroupProps(), localProps);
|
|
71
|
+
const mergedProps = mergeProps(() => api().getGroupProps(), localProps);
|
|
72
72
|
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
73
73
|
get children() {
|
|
74
74
|
return createComponent(Key, {
|
|
@@ -90,7 +90,7 @@ var ToastActor = (props) => {
|
|
|
90
90
|
const localProps = createMemo(() => ({
|
|
91
91
|
...props.value(),
|
|
92
92
|
parent: props.parent,
|
|
93
|
-
index: props.index
|
|
93
|
+
index: props.index()
|
|
94
94
|
}));
|
|
95
95
|
const service = useMachine(toast2.machine, localProps);
|
|
96
96
|
const api = createMemo(() => toast2.connect(service, normalizeProps));
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
composeRefs
|
|
3
|
+
} from "./DOBZPYAN.jsx";
|
|
1
4
|
import {
|
|
2
5
|
splitRenderStrategyProps
|
|
3
6
|
} from "./NEBB7COJ.jsx";
|
|
@@ -37,8 +40,8 @@ var usePresence = (props) => {
|
|
|
37
40
|
return createMemo(() => ({
|
|
38
41
|
unmounted: !api().present && !wasEverPresent() && renderStrategyProps.lazyMount || renderStrategyProps.unmountOnExit && !api().present && wasEverPresent(),
|
|
39
42
|
present: api().present,
|
|
43
|
+
ref: api().setNode,
|
|
40
44
|
presenceProps: {
|
|
41
|
-
ref: api().setNode,
|
|
42
45
|
hidden: !api().present,
|
|
43
46
|
"data-state": context.present ? "open" : "closed"
|
|
44
47
|
}
|
|
@@ -51,7 +54,7 @@ var Presence = (props) => {
|
|
|
51
54
|
const api = usePresence(presenceProps);
|
|
52
55
|
const mergedProps = mergeProps(() => api().presenceProps, localProps);
|
|
53
56
|
return <Show when={!api().unmounted}>
|
|
54
|
-
<ark.div {...mergedProps} data-scope="presence" data-part="root" />
|
|
57
|
+
<ark.div {...mergedProps} ref={composeRefs(api().ref, props.ref)} data-scope="presence" data-part="root" />
|
|
55
58
|
</Show>;
|
|
56
59
|
};
|
|
57
60
|
|