@ark-ui/solid 5.3.1 → 5.4.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/{DVSH7A7L.jsx → 2H2BP2D4.jsx} +4 -4
- package/dist/chunk/{XF64K6LQ.js → 2HLGNCOQ.js} +1 -1
- package/dist/chunk/{5KEAUWCK.jsx → 4HPQVVRP.jsx} +8 -13
- package/dist/chunk/{FEUZDHU2.jsx → 4QD4ZSJK.jsx} +5 -5
- package/dist/chunk/{UN6AEOOQ.jsx → 5EMVTPVL.jsx} +14 -9
- package/dist/chunk/{356AM4NT.jsx → 5T73FAJY.jsx} +4 -4
- package/dist/chunk/{QYAKJNEK.jsx → A3VC6L75.jsx} +1 -1
- package/dist/chunk/{JZ7ZQZT4.jsx → A6A626ZB.jsx} +4 -7
- package/dist/chunk/{JDKXSGP6.jsx → AD2EIGNX.jsx} +4 -4
- package/dist/chunk/{YQSWID53.jsx → AMEMCPNB.jsx} +5 -5
- package/dist/chunk/{YXY2VFNT.jsx → AYESR2LP.jsx} +4 -4
- package/dist/chunk/{XQTUHUMS.jsx → BFPOA7P4.jsx} +8 -8
- package/dist/chunk/{RIHGRA4D.js → BT2NIRPC.js} +1 -1
- package/dist/chunk/{T7DC3WIE.js → C5HFE3OV.js} +1 -1
- package/dist/chunk/{WXY3QNZF.js → CCJXFSD4.js} +9 -2
- package/dist/chunk/{JBBHDVFZ.jsx → CHLRHJV2.jsx} +4 -4
- package/dist/chunk/{GP7PBPSV.js → CSQ4G2ZR.js} +1 -1
- package/dist/chunk/{MBJCX2DE.js → DUMB6XV5.js} +1 -1
- package/dist/chunk/{ORM2J7MT.jsx → DV4N466N.jsx} +5 -5
- package/dist/chunk/{4GAEMXVU.jsx → E3OI2TND.jsx} +5 -5
- package/dist/chunk/{BLTYQMQJ.jsx → EDWTEZRE.jsx} +8 -8
- package/dist/chunk/{TDJM3IRG.jsx → EEG3DZXG.jsx} +4 -4
- package/dist/chunk/{ZVGO7HAT.jsx → H2PO7WYN.jsx} +5 -5
- package/dist/chunk/{V5BZ3V7L.jsx → IKA3JJFV.jsx} +4 -4
- package/dist/chunk/{FMI5WHH2.js → IXXDQXSI.js} +1 -1
- package/dist/chunk/{4G65Z7EU.jsx → JN5MJP56.jsx} +5 -5
- package/dist/chunk/{R6OIHEOD.jsx → JRMTU7C7.jsx} +1 -1
- package/dist/chunk/{SDD2HKR3.js → LUMJHQNS.js} +8 -8
- package/dist/chunk/{OPRWSVMJ.jsx → MA35L6TV.jsx} +4 -4
- package/dist/chunk/{U2AFGSZ6.jsx → MM2I4S7S.jsx} +5 -5
- package/dist/chunk/{DXGRBGHM.jsx → MSINFF7E.jsx} +5 -5
- package/dist/chunk/{KMH2DP4D.jsx → N4O7ZKCJ.jsx} +5 -5
- package/dist/chunk/{LYAU75M2.jsx → O6XGGFFV.jsx} +5 -5
- package/dist/chunk/{BPPSBY3Z.js → QDNMUVUH.js} +6 -8
- package/dist/chunk/{LJ6EHJR3.jsx → QN2KHWAW.jsx} +5 -5
- package/dist/chunk/{2ZNYOQIC.jsx → ROFVSOHA.jsx} +5 -5
- package/dist/chunk/{MNHPXDZV.jsx → RY6GW37O.jsx} +4 -4
- package/dist/chunk/{BJVPZDAL.jsx → SKLHGDXX.jsx} +8 -8
- package/dist/chunk/{SPF2T7O4.js → SUOC3NNA.js} +1 -1
- package/dist/chunk/{53HPEI6C.jsx → T6XMELG3.jsx} +5 -5
- package/dist/chunk/{7QS2CMYY.js → TOZ7BU2Z.js} +1 -1
- package/dist/chunk/{SIMDMQSR.jsx → TZDLUIKR.jsx} +4 -4
- package/dist/chunk/{CIIDKCDP.js → UL6NTZA6.js} +9 -11
- package/dist/chunk/{XWXTZFLM.jsx → VDDVCRFC.jsx} +1 -1
- package/dist/chunk/{DQTWKOSF.jsx → WNMJRJ4R.jsx} +5 -5
- package/dist/chunk/{PJMEM6IP.jsx → WR7AKRSO.jsx} +5 -5
- package/dist/chunk/{QB2OYQ6F.js → WW35AWP2.js} +1 -1
- package/dist/chunk/{5GDLVWNX.js → WXJYBPWI.js} +1 -1
- package/dist/chunk/{ILQH74NT.jsx → XZZ6TULR.jsx} +4 -4
- package/dist/chunk/{XWB4HZV3.jsx → YIVTZ7BP.jsx} +4 -4
- package/dist/chunk/{FAC6JW4M.js → YKX6LWQZ.js} +1 -1
- package/dist/chunk/{QVLKI3LC.jsx → YPH7FBUN.jsx} +4 -4
- package/dist/chunk/{XPKZUA4I.jsx → YUDHR2PE.jsx} +5 -5
- package/dist/chunk/{2FDSOAL6.jsx → YVFRVXSX.jsx} +5 -5
- package/dist/chunk/{NQLZI36R.jsx → Z254KIAA.jsx} +4 -4
- package/dist/chunk/{FZIYLDQP.js → Z3MPOJ5X.js} +1 -1
- package/dist/chunk/{IJHRDDI5.jsx → ZDKSAOA5.jsx} +5 -5
- package/dist/chunk/{USB7GKYK.jsx → ZEKNH4J5.jsx} +8 -7
- package/dist/components/accordion/index.jsx +5 -5
- package/dist/components/avatar/index.jsx +4 -4
- package/dist/components/carousel/index.jsx +4 -4
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +6 -6
- package/dist/components/clipboard/index.jsx +4 -4
- package/dist/components/collapsible/index.jsx +4 -4
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +7 -7
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/index.jsx +9 -9
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.jsx +5 -5
- package/dist/components/dialog/index.jsx +5 -5
- package/dist/components/download-trigger/index.jsx +4 -4
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +6 -6
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +3 -3
- package/dist/components/fieldset/index.jsx +2 -2
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +6 -6
- package/dist/components/format/index.jsx +2 -2
- package/dist/components/frame/index.jsx +3 -3
- package/dist/components/hover-card/index.jsx +5 -5
- package/dist/components/index.js +20 -20
- package/dist/components/index.jsx +248 -248
- package/dist/components/menu/index.d.ts +9 -3
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +5 -5
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/index.jsx +6 -6
- package/dist/components/pagination/index.jsx +4 -4
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +6 -6
- package/dist/components/popover/index.jsx +5 -5
- package/dist/components/presence/index.jsx +2 -2
- package/dist/components/progress/index.jsx +4 -4
- package/dist/components/qr-code/index.jsx +4 -4
- package/dist/components/radio-group/index.jsx +4 -4
- package/dist/components/rating-group/index.js +1 -1
- package/dist/components/rating-group/index.jsx +6 -6
- package/dist/components/segment-group/index.jsx +4 -4
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.jsx +9 -9
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +6 -6
- package/dist/components/slider/index.jsx +4 -4
- package/dist/components/splitter/index.jsx +4 -4
- package/dist/components/steps/index.jsx +4 -4
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.jsx +6 -6
- package/dist/components/tabs/index.jsx +5 -5
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/index.jsx +6 -6
- package/dist/components/time-picker/index.jsx +5 -5
- package/dist/components/timer/index.jsx +4 -4
- package/dist/components/toast/index.jsx +4 -4
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/index.jsx +1 -1
- package/dist/components/toggle-group/index.jsx +4 -4
- package/dist/components/tooltip/index.jsx +5 -5
- package/dist/components/tour/index.jsx +5 -5
- package/dist/components/tree-view/index.jsx +7 -7
- package/dist/index.js +20 -20
- package/dist/index.jsx +248 -248
- package/dist/providers/environment/index.jsx +2 -2
- package/dist/providers/index.jsx +2 -2
- package/package.json +59 -59
- package/dist/chunk/{HD73LMEZ.jsx → D2Z5BEON.jsx} +3 -3
- package/dist/chunk/{PHH4JVAQ.jsx → PSNFSH4B.jsx} +3 -3
- package/dist/chunk/{NLXZ3NC4.jsx → ZYF7GVNI.jsx} +3 -3
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
runIfFn
|
|
12
|
-
} from "./KGOB2IMX.jsx";
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
13
10
|
import {
|
|
14
11
|
useLocaleContext
|
|
15
12
|
} from "./RCXMZN3G.jsx";
|
|
16
13
|
import {
|
|
17
14
|
createContext
|
|
18
15
|
} from "./TVCIHLER.jsx";
|
|
16
|
+
import {
|
|
17
|
+
runIfFn
|
|
18
|
+
} from "./KGOB2IMX.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldsetContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./ZYF7GVNI.jsx";
|
|
4
4
|
import {
|
|
5
5
|
composeRefs
|
|
6
6
|
} from "./DOBZPYAN.jsx";
|
|
@@ -246,27 +246,22 @@ var FieldSelect = (props) => {
|
|
|
246
246
|
// src/components/field/field-textarea.tsx
|
|
247
247
|
import { autoresizeTextarea } from "@zag-js/auto-resize";
|
|
248
248
|
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
249
|
-
import {
|
|
249
|
+
import { onCleanup as onCleanup2, onMount as onMount2, splitProps } from "solid-js";
|
|
250
250
|
var FieldTextarea = (props) => {
|
|
251
251
|
const field = useFieldContext();
|
|
252
252
|
let textareaRef;
|
|
253
|
-
const
|
|
253
|
+
const [autoresizeProps, textareaProps] = splitProps(props, ["autoresize"]);
|
|
254
254
|
const mergedProps = mergeProps10(
|
|
255
255
|
() => field?.().getTextareaProps(),
|
|
256
|
-
() => ({ style: { resize: autoresize ? "none" : void 0 } }),
|
|
256
|
+
() => ({ style: { resize: autoresizeProps.autoresize ? "none" : void 0 } }),
|
|
257
257
|
textareaProps
|
|
258
258
|
);
|
|
259
|
-
|
|
260
|
-
if (!autoresize) return;
|
|
259
|
+
onMount2(() => {
|
|
260
|
+
if (!autoresizeProps.autoresize) return;
|
|
261
261
|
const cleanup = autoresizeTextarea(textareaRef);
|
|
262
|
-
|
|
262
|
+
onCleanup2(() => cleanup?.());
|
|
263
263
|
});
|
|
264
|
-
return <ark.textarea
|
|
265
|
-
{...mergedProps}
|
|
266
|
-
ref={(el) => {
|
|
267
|
-
textareaRef = el;
|
|
268
|
-
}}
|
|
269
|
-
/>;
|
|
264
|
+
return <ark.textarea {...mergedProps} ref={composeRefs((el) => textareaRef = el, props.ref)} />;
|
|
270
265
|
};
|
|
271
266
|
|
|
272
267
|
// src/components/field/field.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./4HPQVVRP.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
13
|
-
import {
|
|
14
|
-
runIfFn
|
|
15
|
-
} from "./KGOB2IMX.jsx";
|
|
12
|
+
} from "./D2Z5BEON.jsx";
|
|
16
13
|
import {
|
|
17
14
|
useLocaleContext
|
|
18
15
|
} from "./RCXMZN3G.jsx";
|
|
19
16
|
import {
|
|
20
17
|
createContext
|
|
21
18
|
} from "./TVCIHLER.jsx";
|
|
19
|
+
import {
|
|
20
|
+
runIfFn
|
|
21
|
+
} from "./KGOB2IMX.jsx";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./7IUG3E2V.jsx";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
7
|
import {
|
|
8
8
|
composeRefs
|
|
9
9
|
} from "./DOBZPYAN.jsx";
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
} from "./UFYZ7HLU.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useEnvironmentContext
|
|
18
|
-
} from "./
|
|
19
|
-
import {
|
|
20
|
-
runIfFn
|
|
21
|
-
} from "./KGOB2IMX.jsx";
|
|
18
|
+
} from "./D2Z5BEON.jsx";
|
|
22
19
|
import {
|
|
23
20
|
useLocaleContext
|
|
24
21
|
} from "./RCXMZN3G.jsx";
|
|
25
22
|
import {
|
|
26
23
|
createContext
|
|
27
24
|
} from "./TVCIHLER.jsx";
|
|
25
|
+
import {
|
|
26
|
+
runIfFn
|
|
27
|
+
} from "./KGOB2IMX.jsx";
|
|
28
28
|
import {
|
|
29
29
|
__export
|
|
30
30
|
} from "./7IUG3E2V.jsx";
|
|
@@ -130,17 +130,22 @@ var MenuIndicator = (props) => {
|
|
|
130
130
|
|
|
131
131
|
// src/components/menu/menu-item.tsx
|
|
132
132
|
import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
133
|
-
import { createMemo as createMemo2 } from "solid-js";
|
|
133
|
+
import { createEffect, createMemo as createMemo2, onCleanup } from "solid-js";
|
|
134
134
|
var MenuItem = (props) => {
|
|
135
135
|
const [itemProps, localProps] = createSplitProps()(props, [
|
|
136
136
|
"closeOnSelect",
|
|
137
137
|
"disabled",
|
|
138
138
|
"value",
|
|
139
|
-
"valueText"
|
|
139
|
+
"valueText",
|
|
140
|
+
"onSelect"
|
|
140
141
|
]);
|
|
141
142
|
const context = useMenuContext();
|
|
142
143
|
const mergedProps = mergeProps7(() => context().getItemProps(itemProps), localProps);
|
|
143
144
|
const itemState = createMemo2(() => context().getItemState(itemProps));
|
|
145
|
+
createEffect(() => {
|
|
146
|
+
const cleanup = context().addItemListener({ id: itemState().id, onSelect: itemProps.onSelect });
|
|
147
|
+
onCleanup(() => cleanup?.());
|
|
148
|
+
});
|
|
144
149
|
return <MenuItemProvider value={itemState}>
|
|
145
150
|
<ark.div {...mergedProps} />
|
|
146
151
|
</MenuItemProvider>;
|
|
@@ -339,13 +344,13 @@ var MenuRoot = (props) => {
|
|
|
339
344
|
|
|
340
345
|
// src/components/menu/menu-root-provider.tsx
|
|
341
346
|
import { mergeProps as mergeProps16 } from "@zag-js/solid";
|
|
342
|
-
import { createEffect } from "solid-js";
|
|
347
|
+
import { createEffect as createEffect2 } from "solid-js";
|
|
343
348
|
var MenuRootProvider = (props) => {
|
|
344
349
|
const parentApi = useMenuContext();
|
|
345
350
|
const parentMachine = useMenuMachineContext();
|
|
346
351
|
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
347
352
|
const presenceApi = usePresence(mergeProps16(presenceProps, () => ({ present: menuProps.value.api().open })));
|
|
348
|
-
|
|
353
|
+
createEffect2(() => {
|
|
349
354
|
if (!parentMachine) return;
|
|
350
355
|
parentApi?.().setChild(menuProps.value.service);
|
|
351
356
|
menuProps.value.api().setParent(parentMachine);
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
runIfFn
|
|
12
|
-
} from "./KGOB2IMX.jsx";
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
13
10
|
import {
|
|
14
11
|
createContext
|
|
15
12
|
} from "./TVCIHLER.jsx";
|
|
13
|
+
import {
|
|
14
|
+
runIfFn
|
|
15
|
+
} from "./KGOB2IMX.jsx";
|
|
16
16
|
import {
|
|
17
17
|
__export
|
|
18
18
|
} from "./7IUG3E2V.jsx";
|
|
@@ -31,17 +31,14 @@ var ToggleContext = (props) => props.children(useToggleContext());
|
|
|
31
31
|
|
|
32
32
|
// src/components/toggle/toggle-indicator.tsx
|
|
33
33
|
import { mergeProps } from "@zag-js/solid";
|
|
34
|
-
import { Show } from "solid-js";
|
|
34
|
+
import { Show, splitProps } from "solid-js";
|
|
35
35
|
var ToggleIndicator = (props) => {
|
|
36
|
-
const
|
|
36
|
+
const [baseProps, restProps] = splitProps(props, ["children", "fallback"]);
|
|
37
37
|
const toggle2 = useToggleContext();
|
|
38
38
|
const mergedProps = mergeProps(() => toggle2().getIndicatorProps(), restProps);
|
|
39
39
|
return <ark.div {...mergedProps}>
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
<Show when={toggle2().pressed} fallback={fallback}>
|
|
44
|
-
{children}
|
|
40
|
+
<Show when={toggle2().pressed} fallback={baseProps.fallback}>
|
|
41
|
+
{baseProps.children}
|
|
45
42
|
</Show>
|
|
46
43
|
</ark.div>;
|
|
47
44
|
};
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
runIfFn
|
|
12
|
-
} from "./KGOB2IMX.jsx";
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
13
10
|
import {
|
|
14
11
|
useLocaleContext
|
|
15
12
|
} from "./RCXMZN3G.jsx";
|
|
16
13
|
import {
|
|
17
14
|
createContext
|
|
18
15
|
} from "./TVCIHLER.jsx";
|
|
16
|
+
import {
|
|
17
|
+
runIfFn
|
|
18
|
+
} from "./KGOB2IMX.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./4HPQVVRP.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
13
|
-
import {
|
|
14
|
-
runIfFn
|
|
15
|
-
} from "./KGOB2IMX.jsx";
|
|
12
|
+
} from "./D2Z5BEON.jsx";
|
|
16
13
|
import {
|
|
17
14
|
useLocaleContext
|
|
18
15
|
} from "./RCXMZN3G.jsx";
|
|
19
16
|
import {
|
|
20
17
|
createContext
|
|
21
18
|
} from "./TVCIHLER.jsx";
|
|
19
|
+
import {
|
|
20
|
+
runIfFn
|
|
21
|
+
} from "./KGOB2IMX.jsx";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./7IUG3E2V.jsx";
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
13
|
-
import {
|
|
14
|
-
runIfFn
|
|
15
|
-
} from "./KGOB2IMX.jsx";
|
|
12
|
+
} from "./D2Z5BEON.jsx";
|
|
16
13
|
import {
|
|
17
14
|
useLocaleContext
|
|
18
15
|
} from "./RCXMZN3G.jsx";
|
|
19
16
|
import {
|
|
20
17
|
createContext
|
|
21
18
|
} from "./TVCIHLER.jsx";
|
|
19
|
+
import {
|
|
20
|
+
runIfFn
|
|
21
|
+
} from "./KGOB2IMX.jsx";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./7IUG3E2V.jsx";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./4HPQVVRP.jsx";
|
|
1
4
|
import {
|
|
2
5
|
PresenceProvider,
|
|
3
6
|
splitPresenceProps,
|
|
4
7
|
usePresence,
|
|
5
8
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
7
|
-
import {
|
|
8
|
-
useFieldContext
|
|
9
|
-
} from "./5KEAUWCK.jsx";
|
|
9
|
+
} from "./PSNFSH4B.jsx";
|
|
10
10
|
import {
|
|
11
11
|
composeRefs
|
|
12
12
|
} from "./DOBZPYAN.jsx";
|
|
@@ -18,16 +18,16 @@ import {
|
|
|
18
18
|
} from "./UFYZ7HLU.jsx";
|
|
19
19
|
import {
|
|
20
20
|
useEnvironmentContext
|
|
21
|
-
} from "./
|
|
22
|
-
import {
|
|
23
|
-
runIfFn
|
|
24
|
-
} from "./KGOB2IMX.jsx";
|
|
21
|
+
} from "./D2Z5BEON.jsx";
|
|
25
22
|
import {
|
|
26
23
|
useLocaleContext
|
|
27
24
|
} from "./RCXMZN3G.jsx";
|
|
28
25
|
import {
|
|
29
26
|
createContext
|
|
30
27
|
} from "./TVCIHLER.jsx";
|
|
28
|
+
import {
|
|
29
|
+
runIfFn
|
|
30
|
+
} from "./KGOB2IMX.jsx";
|
|
31
31
|
import {
|
|
32
32
|
__export
|
|
33
33
|
} from "./7IUG3E2V.jsx";
|
|
@@ -9,7 +9,7 @@ import { runIfFn } from './DT73WLR4.js';
|
|
|
9
9
|
import { __export } from './ESLJRKWD.js';
|
|
10
10
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
11
11
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
12
|
-
import { createEffect, onMount, createUniqueId, createMemo, Show } from 'solid-js';
|
|
12
|
+
import { createEffect, onMount, createUniqueId, createMemo, Show, onCleanup } from 'solid-js';
|
|
13
13
|
import * as menu from '@zag-js/menu';
|
|
14
14
|
export { anatomy } from '@zag-js/menu';
|
|
15
15
|
|
|
@@ -97,10 +97,17 @@ var MenuIndicator = (props) => {
|
|
|
97
97
|
return createComponent(ark.div, mergedProps);
|
|
98
98
|
};
|
|
99
99
|
var MenuItem = (props) => {
|
|
100
|
-
const [itemProps, localProps] = createSplitProps()(props, ["closeOnSelect", "disabled", "value", "valueText"]);
|
|
100
|
+
const [itemProps, localProps] = createSplitProps()(props, ["closeOnSelect", "disabled", "value", "valueText", "onSelect"]);
|
|
101
101
|
const context = useMenuContext();
|
|
102
102
|
const mergedProps = mergeProps(() => context().getItemProps(itemProps), localProps);
|
|
103
103
|
const itemState = createMemo(() => context().getItemState(itemProps));
|
|
104
|
+
createEffect(() => {
|
|
105
|
+
const cleanup = context().addItemListener({
|
|
106
|
+
id: itemState().id,
|
|
107
|
+
onSelect: itemProps.onSelect
|
|
108
|
+
});
|
|
109
|
+
onCleanup(() => cleanup?.());
|
|
110
|
+
});
|
|
104
111
|
return createComponent(MenuItemProvider, {
|
|
105
112
|
value: itemState,
|
|
106
113
|
get children() {
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
runIfFn
|
|
12
|
-
} from "./KGOB2IMX.jsx";
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
13
10
|
import {
|
|
14
11
|
useLocaleContext
|
|
15
12
|
} from "./RCXMZN3G.jsx";
|
|
16
13
|
import {
|
|
17
14
|
createContext
|
|
18
15
|
} from "./TVCIHLER.jsx";
|
|
16
|
+
import {
|
|
17
|
+
runIfFn
|
|
18
|
+
} from "./KGOB2IMX.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './UL6NTZA6.js';
|
|
2
2
|
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './JSBTYBVG.js';
|
|
3
3
|
import { composeRefs } from './XN6EERRM.js';
|
|
4
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
7
|
import {
|
|
8
8
|
composeRefs
|
|
9
9
|
} from "./DOBZPYAN.jsx";
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
} from "./UFYZ7HLU.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useEnvironmentContext
|
|
18
|
-
} from "./
|
|
19
|
-
import {
|
|
20
|
-
runIfFn
|
|
21
|
-
} from "./KGOB2IMX.jsx";
|
|
18
|
+
} from "./D2Z5BEON.jsx";
|
|
22
19
|
import {
|
|
23
20
|
useLocaleContext
|
|
24
21
|
} from "./RCXMZN3G.jsx";
|
|
25
22
|
import {
|
|
26
23
|
createContext
|
|
27
24
|
} from "./TVCIHLER.jsx";
|
|
25
|
+
import {
|
|
26
|
+
runIfFn
|
|
27
|
+
} from "./KGOB2IMX.jsx";
|
|
28
28
|
import {
|
|
29
29
|
__export
|
|
30
30
|
} from "./7IUG3E2V.jsx";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
7
|
import {
|
|
8
8
|
composeRefs
|
|
9
9
|
} from "./DOBZPYAN.jsx";
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
} from "./UFYZ7HLU.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useEnvironmentContext
|
|
18
|
-
} from "./
|
|
19
|
-
import {
|
|
20
|
-
runIfFn
|
|
21
|
-
} from "./KGOB2IMX.jsx";
|
|
18
|
+
} from "./D2Z5BEON.jsx";
|
|
22
19
|
import {
|
|
23
20
|
useLocaleContext
|
|
24
21
|
} from "./RCXMZN3G.jsx";
|
|
25
22
|
import {
|
|
26
23
|
createContext
|
|
27
24
|
} from "./TVCIHLER.jsx";
|
|
25
|
+
import {
|
|
26
|
+
runIfFn
|
|
27
|
+
} from "./KGOB2IMX.jsx";
|
|
28
28
|
import {
|
|
29
29
|
__export
|
|
30
30
|
} from "./7IUG3E2V.jsx";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./4HPQVVRP.jsx";
|
|
1
4
|
import {
|
|
2
5
|
PresenceProvider,
|
|
3
6
|
splitPresenceProps,
|
|
4
7
|
usePresence,
|
|
5
8
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
7
|
-
import {
|
|
8
|
-
useFieldContext
|
|
9
|
-
} from "./5KEAUWCK.jsx";
|
|
9
|
+
} from "./PSNFSH4B.jsx";
|
|
10
10
|
import {
|
|
11
11
|
composeRefs
|
|
12
12
|
} from "./DOBZPYAN.jsx";
|
|
@@ -18,16 +18,16 @@ import {
|
|
|
18
18
|
} from "./UFYZ7HLU.jsx";
|
|
19
19
|
import {
|
|
20
20
|
useEnvironmentContext
|
|
21
|
-
} from "./
|
|
22
|
-
import {
|
|
23
|
-
runIfFn
|
|
24
|
-
} from "./KGOB2IMX.jsx";
|
|
21
|
+
} from "./D2Z5BEON.jsx";
|
|
25
22
|
import {
|
|
26
23
|
useLocaleContext
|
|
27
24
|
} from "./RCXMZN3G.jsx";
|
|
28
25
|
import {
|
|
29
26
|
createContext
|
|
30
27
|
} from "./TVCIHLER.jsx";
|
|
28
|
+
import {
|
|
29
|
+
runIfFn
|
|
30
|
+
} from "./KGOB2IMX.jsx";
|
|
31
31
|
import {
|
|
32
32
|
__export
|
|
33
33
|
} from "./7IUG3E2V.jsx";
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
runIfFn
|
|
12
|
-
} from "./KGOB2IMX.jsx";
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
13
10
|
import {
|
|
14
11
|
useLocaleContext
|
|
15
12
|
} from "./RCXMZN3G.jsx";
|
|
16
13
|
import {
|
|
17
14
|
createContext
|
|
18
15
|
} from "./TVCIHLER.jsx";
|
|
16
|
+
import {
|
|
17
|
+
runIfFn
|
|
18
|
+
} from "./KGOB2IMX.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./PSNFSH4B.jsx";
|
|
7
7
|
import {
|
|
8
8
|
composeRefs
|
|
9
9
|
} from "./DOBZPYAN.jsx";
|
|
@@ -20,16 +20,16 @@ import {
|
|
|
20
20
|
} from "./UFYZ7HLU.jsx";
|
|
21
21
|
import {
|
|
22
22
|
useEnvironmentContext
|
|
23
|
-
} from "./
|
|
24
|
-
import {
|
|
25
|
-
runIfFn
|
|
26
|
-
} from "./KGOB2IMX.jsx";
|
|
23
|
+
} from "./D2Z5BEON.jsx";
|
|
27
24
|
import {
|
|
28
25
|
useLocaleContext
|
|
29
26
|
} from "./RCXMZN3G.jsx";
|
|
30
27
|
import {
|
|
31
28
|
createContext
|
|
32
29
|
} from "./TVCIHLER.jsx";
|
|
30
|
+
import {
|
|
31
|
+
runIfFn
|
|
32
|
+
} from "./KGOB2IMX.jsx";
|
|
33
33
|
import {
|
|
34
34
|
__export
|
|
35
35
|
} from "./7IUG3E2V.jsx";
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
10
|
-
import {
|
|
11
|
-
runIfFn
|
|
12
|
-
} from "./KGOB2IMX.jsx";
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
13
10
|
import {
|
|
14
11
|
useLocaleContext
|
|
15
12
|
} from "./RCXMZN3G.jsx";
|
|
16
13
|
import {
|
|
17
14
|
createContext
|
|
18
15
|
} from "./TVCIHLER.jsx";
|
|
16
|
+
import {
|
|
17
|
+
runIfFn
|
|
18
|
+
} from "./KGOB2IMX.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./4HPQVVRP.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
13
|
-
import {
|
|
14
|
-
runIfFn
|
|
15
|
-
} from "./KGOB2IMX.jsx";
|
|
12
|
+
} from "./D2Z5BEON.jsx";
|
|
16
13
|
import {
|
|
17
14
|
useLocaleContext
|
|
18
15
|
} from "./RCXMZN3G.jsx";
|
|
19
16
|
import {
|
|
20
17
|
createContext
|
|
21
18
|
} from "./TVCIHLER.jsx";
|
|
19
|
+
import {
|
|
20
|
+
runIfFn
|
|
21
|
+
} from "./KGOB2IMX.jsx";
|
|
22
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./7IUG3E2V.jsx";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./DOBZPYAN.jsx";
|
|
4
4
|
import {
|
|
5
5
|
EnvironmentProvider
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./D2Z5BEON.jsx";
|
|
7
7
|
|
|
8
8
|
// src/components/frame/frame.tsx
|
|
9
9
|
import { Show, createEffect as createEffect2, createMemo, createSignal, onCleanup as onCleanup2, splitProps } from "solid-js";
|
|
@@ -4,7 +4,7 @@ import { createContext } from './TROPIN4C.js';
|
|
|
4
4
|
import { __export } from './ESLJRKWD.js';
|
|
5
5
|
import { createComponent, mergeProps as mergeProps$1, template, spread } from 'solid-js/web';
|
|
6
6
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
7
|
-
import { Show, createMemo } from 'solid-js';
|
|
7
|
+
import { splitProps, Show, createMemo } from 'solid-js';
|
|
8
8
|
import * as toggle from '@zag-js/toggle';
|
|
9
9
|
import { createAnatomy } from '@zag-js/anatomy';
|
|
10
10
|
|
|
@@ -26,11 +26,7 @@ var [ToggleProvider, useToggleContext] = createContext({
|
|
|
26
26
|
// src/components/toggle/toggle-context.tsx
|
|
27
27
|
var ToggleContext = (props) => props.children(useToggleContext());
|
|
28
28
|
var ToggleIndicator = (props) => {
|
|
29
|
-
const
|
|
30
|
-
children,
|
|
31
|
-
fallback,
|
|
32
|
-
...restProps
|
|
33
|
-
} = props;
|
|
29
|
+
const [baseProps, restProps] = splitProps(props, ["children", "fallback"]);
|
|
34
30
|
const toggle2 = useToggleContext();
|
|
35
31
|
const mergedProps = mergeProps(() => toggle2().getIndicatorProps(), restProps);
|
|
36
32
|
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
@@ -39,8 +35,12 @@ var ToggleIndicator = (props) => {
|
|
|
39
35
|
get when() {
|
|
40
36
|
return toggle2().pressed;
|
|
41
37
|
},
|
|
42
|
-
fallback
|
|
43
|
-
|
|
38
|
+
get fallback() {
|
|
39
|
+
return baseProps.fallback;
|
|
40
|
+
},
|
|
41
|
+
get children() {
|
|
42
|
+
return baseProps.children;
|
|
43
|
+
}
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
}));
|