@ark-ui/solid 4.10.2 → 5.0.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 +6 -9
- package/dist/chunk/{E72NMPSK.jsx → 2FYSIKNK.jsx} +5 -13
- package/dist/chunk/{ASCGEGA5.jsx → 2TEQVFZN.jsx} +11 -15
- package/dist/chunk/{2H4WHODR.js → 3CUJRNYI.js} +7 -10
- package/dist/chunk/{MRQ2UYM4.jsx → 3VB4UGEY.jsx} +8 -10
- package/dist/chunk/{ATMUKDFF.js → 44YJVOL2.js} +8 -10
- package/dist/chunk/{7YIHAT7J.jsx → 4D76BVTD.jsx} +35 -17
- package/dist/chunk/{VARNCRUN.js → 4E5OPUFZ.js} +16 -18
- package/dist/chunk/{5JS7LFUQ.js → 4GOBFWQB.js} +9 -8
- package/dist/chunk/{RAEDLHD3.js → 55NHLACH.js} +11 -14
- package/dist/chunk/{2HTNQLGP.jsx → 676ULDTZ.jsx} +9 -13
- package/dist/chunk/{U7SPBSDD.jsx → 6AKFQH4M.jsx} +8 -13
- package/dist/chunk/{QODB3C3M.js → 6MQ6S5JP.js} +8 -5
- package/dist/chunk/{CIPYIXIW.js → 6NMPU3T3.js} +8 -10
- package/dist/chunk/{FNEB2RAF.js → 6VITT55B.js} +9 -10
- package/dist/chunk/{MQDN267C.jsx → 7AJYNPOZ.jsx} +8 -11
- package/dist/chunk/{EHJDQTTW.jsx → 7IAJIOJR.jsx} +3 -16
- package/dist/chunk/{UGKLUHKU.js → A4HLKXDW.js} +8 -11
- package/dist/chunk/{3LRXHWW2.js → A6LAAZDX.js} +32 -27
- package/dist/chunk/{LVPQ6GR4.js → AIQ2GVFX.js} +6 -7
- package/dist/chunk/{JVXNYKNA.js → ANDTZLCB.js} +8 -10
- package/dist/chunk/{5O4RWSWO.jsx → BPYAMTER.jsx} +6 -4
- package/dist/chunk/{AIQFNVCU.jsx → BTPWLTJU.jsx} +9 -18
- package/dist/chunk/{6MXKM4GA.js → C4WAO4VB.js} +9 -10
- package/dist/chunk/{2W32Z6JZ.js → DBAO7VQW.js} +9 -10
- package/dist/chunk/{5SRZ3YYC.js → DEA5DIWS.js} +7 -8
- package/dist/chunk/{CCA5XJM6.jsx → DH5DKFFF.jsx} +19 -37
- package/dist/chunk/{Y4LH2CR6.jsx → DS2MX7YY.jsx} +8 -11
- package/dist/chunk/{34OZO53S.js → DVI7TRLG.js} +9 -12
- package/dist/chunk/{QQUR4MWN.js → E2TLJMGI.js} +15 -17
- package/dist/chunk/{H4RSHLA7.jsx → EH5LPBSV.jsx} +9 -13
- package/dist/chunk/{F3QPTRGW.jsx → EIGYBOW2.jsx} +27 -34
- package/dist/chunk/{HU7FZMJI.jsx → ENXUS2WG.jsx} +9 -14
- package/dist/chunk/{AX5SMQMA.js → EUXWRO3A.js} +16 -17
- package/dist/chunk/{K54W24N6.jsx → FHWNUAQM.jsx} +10 -15
- package/dist/chunk/{7S43DIPW.js → FX6TOMB3.js} +13 -25
- package/dist/chunk/{MBQQASZE.js → GUQTNAZU.js} +9 -10
- package/dist/chunk/{B7LE23PE.jsx → H5QZC4VW.jsx} +9 -13
- package/dist/chunk/{NK4T7LIZ.jsx → H7SWP54F.jsx} +7 -11
- package/dist/chunk/{M2FICVVI.js → HQEG6EKY.js} +9 -11
- package/dist/chunk/{U3XJZI3X.jsx → I4VF53LH.jsx} +15 -25
- package/dist/chunk/{G2WIACWP.js → JOWPVE6E.js} +8 -9
- package/dist/chunk/{SN5TXTB6.jsx → JZ7ZQZT4.jsx} +17 -54
- package/dist/chunk/{X3BMEEJH.js → KMFRZGLF.js} +34 -14
- package/dist/chunk/{GZVCPLKK.jsx → KQ4BIFPS.jsx} +9 -10
- package/dist/chunk/{WPFSEVTX.js → LFWIA7VB.js} +11 -14
- package/dist/chunk/{3O5VTKDF.jsx → LKOJO4VB.jsx} +16 -32
- package/dist/chunk/{5XD5ZSBX.js → M2C67TPA.js} +13 -17
- package/dist/chunk/{2GATVLPK.js → M63JXHU4.js} +7 -8
- package/dist/chunk/MOG4V2NQ.jsx +15 -0
- package/dist/chunk/{XUVXUPEH.js → MZD7ZKWI.js} +2 -7
- package/dist/chunk/{YCYZZGN2.jsx → NCURFCYQ.jsx} +9 -8
- package/dist/chunk/{5ONYCKM3.jsx → NEBB7COJ.jsx} +1 -1
- package/dist/chunk/{Q7NPTAJI.js → NNZQ2FQW.js} +8 -9
- package/dist/chunk/{QGV2SUTQ.jsx → O5AHG7DQ.jsx} +16 -19
- package/dist/chunk/{6YQ3EF2J.js → O62NKGT4.js} +9 -11
- package/dist/chunk/{2J42A7KM.js → OA5UZFKE.js} +2 -2
- package/dist/chunk/{CPMYIT5J.jsx → OAH52ZNM.jsx} +11 -12
- package/dist/chunk/OAPCRIL5.js +8 -0
- package/dist/chunk/{T4NRAKVA.jsx → OEZAIQU2.jsx} +9 -10
- package/dist/chunk/{YV5BACLX.js → OIGKROX4.js} +9 -9
- package/dist/chunk/{IQJBNZOX.jsx → PES3MXH3.jsx} +8 -6
- package/dist/chunk/{DXYB7RYX.js → PJNGX4UT.js} +9 -8
- package/dist/chunk/{3HMZSTYX.js → PL4PGQFF.js} +8 -10
- package/dist/chunk/{PRMWTLUY.jsx → POFK2TVP.jsx} +8 -9
- package/dist/chunk/{WKVZFHUH.jsx → PVOFTEOB.jsx} +14 -25
- package/dist/chunk/{HPDOBQ3V.js → QEMQBM6W.js} +1 -1
- package/dist/chunk/{L7OSYHVR.js → QFAL6GWC.js} +1 -1
- package/dist/chunk/{PSLLOEMD.js → QKFZ3XTM.js} +14 -28
- package/dist/chunk/{IZC6PKGT.jsx → QZQUUXCF.jsx} +10 -14
- package/dist/chunk/{MMS6MJ72.js → R6Q7TUSQ.js} +8 -11
- package/dist/chunk/{3QQZKR3F.jsx → RCXMZN3G.jsx} +1 -1
- package/dist/chunk/{WM2IZOYM.jsx → RG3IJESS.jsx} +48 -80
- package/dist/chunk/{SWUA2VFC.js → SAI3RCJY.js} +7 -10
- package/dist/chunk/{ZC6KWJ4T.jsx → SBKJA5N2.jsx} +7 -12
- package/dist/chunk/{RZBYC7DR.jsx → SBLZHOW2.jsx} +3 -12
- package/dist/chunk/SDD2HKR3.js +71 -0
- package/dist/chunk/{WIVXL7HJ.jsx → SL2ZPLSH.jsx} +9 -13
- package/dist/chunk/{3WGLTS6O.js → SRPSYZUL.js} +7 -8
- package/dist/chunk/{DOPROT6M.jsx → SWZSXMPJ.jsx} +10 -8
- package/dist/chunk/{BY62F4IV.jsx → TEZHN26Z.jsx} +8 -11
- package/dist/chunk/{5EVN6V64.js → TMTD3AUG.js} +12 -15
- package/dist/chunk/{I5UG2QUO.js → TROPIN4C.js} +1 -7
- package/dist/chunk/{NMGUCD2L.jsx → TVCIHLER.jsx} +2 -11
- package/dist/chunk/{5CYHETDY.js → UIAQFG6P.js} +7 -7
- package/dist/chunk/{7PKUSZKY.jsx → USV2CYTP.jsx} +9 -9
- package/dist/chunk/{GXWVYON6.js → V2YBSJKS.js} +8 -10
- package/dist/chunk/{WQQVH7YG.jsx → VLUE7XIS.jsx} +34 -19
- package/dist/chunk/{TC2QHQ47.jsx → WPEIDU6T.jsx} +17 -42
- package/dist/chunk/{LCESUDZB.js → WRLQ7Y6E.js} +5 -13
- package/dist/chunk/{34MDPAG6.js → WT3OTYHP.js} +27 -11
- package/dist/chunk/{IOTZAUDA.jsx → WUTUKX4C.jsx} +1 -1
- package/dist/chunk/{DU4TY3XA.jsx → WZ7FNJXM.jsx} +11 -15
- package/dist/chunk/X34KVQNW.js +1 -1
- package/dist/chunk/{P7I44WC4.jsx → XHA6B6L2.jsx} +21 -22
- package/dist/chunk/{TOVWS5LG.jsx → XNZ7GOP4.jsx} +15 -24
- package/dist/chunk/{MYMGOYXH.js → XR4WJDUT.js} +2 -2
- package/dist/chunk/{SJSLQDBZ.jsx → YE6V66JY.jsx} +10 -18
- package/dist/chunk/{W43X4SNE.js → YS6KIHEB.js} +6 -6
- package/dist/chunk/{QZYE5W7T.jsx → ZOMTU4P2.jsx} +11 -19
- package/dist/components/accordion/index.d.ts +2 -7
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +7 -8
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +5 -6
- package/dist/components/carousel/index.d.ts +3 -8
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.jsx +5 -6
- package/dist/components/checkbox/index.d.ts +3 -8
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +8 -9
- package/dist/components/clipboard/index.d.ts +2 -2
- package/dist/components/clipboard/index.js +1 -1
- package/dist/components/clipboard/index.jsx +5 -6
- package/dist/components/collapsible/index.d.ts +2 -7
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/index.jsx +6 -7
- package/dist/components/collection.d.ts +3 -3
- package/dist/components/collection.js +1 -1
- package/dist/components/collection.jsx +1 -1
- package/dist/components/color-picker/index.d.ts +4 -14
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +10 -10
- package/dist/components/combobox/index.d.ts +3 -13
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/combobox/index.jsx +12 -12
- package/dist/components/date-picker/index.d.ts +4 -16
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.jsx +7 -8
- package/dist/components/dialog/index.d.ts +3 -8
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.jsx +7 -8
- package/dist/components/editable/index.d.ts +2 -12
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +8 -8
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +4 -3
- package/dist/components/fieldset/index.d.ts +2 -2
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/fieldset/index.jsx +2 -2
- package/dist/components/file-upload/index.d.ts +2 -2
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +8 -8
- package/dist/components/focus-trap/index.d.ts +1 -1
- package/dist/components/format/index.js +1 -1
- package/dist/components/format/index.jsx +4 -5
- package/dist/components/frame/index.js +1 -1
- package/dist/components/frame/index.jsx +4 -5
- package/dist/components/hover-card/index.d.ts +3 -8
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/index.jsx +7 -8
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +45 -45
- package/dist/components/index.jsx +295 -297
- package/dist/components/menu/index.d.ts +4 -9
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +7 -8
- package/dist/components/number-input/index.d.ts +2 -7
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/index.jsx +8 -8
- package/dist/components/pagination/index.d.ts +2 -7
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.jsx +5 -6
- package/dist/components/pin-input/index.d.ts +2 -7
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +8 -8
- package/dist/components/popover/index.d.ts +3 -8
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.jsx +7 -8
- package/dist/components/presence/index.d.ts +2 -2
- package/dist/components/presence/index.js +1 -1
- package/dist/components/presence/index.jsx +3 -3
- package/dist/components/progress/index.d.ts +2 -7
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.jsx +5 -6
- package/dist/components/qr-code/index.d.ts +2 -7
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/index.jsx +5 -6
- package/dist/components/radio-group/index.d.ts +2 -7
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/index.jsx +5 -6
- package/dist/components/rating-group/index.d.ts +5 -10
- package/dist/components/rating-group/index.js +1 -1
- package/dist/components/rating-group/index.jsx +8 -8
- package/dist/components/segment-group/index.d.ts +3 -8
- package/dist/components/segment-group/index.js +1 -1
- package/dist/components/segment-group/index.jsx +5 -6
- package/dist/components/select/index.d.ts +3 -13
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.jsx +12 -12
- package/dist/components/signature-pad/index.d.ts +2 -2
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +8 -8
- package/dist/components/slider/index.d.ts +3 -8
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.jsx +5 -6
- package/dist/components/splitter/index.d.ts +3 -8
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/splitter/index.jsx +5 -6
- package/dist/components/steps/index.d.ts +6 -10
- package/dist/components/steps/index.js +1 -1
- package/dist/components/steps/index.jsx +5 -6
- package/dist/components/switch/index.d.ts +2 -7
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.jsx +8 -8
- package/dist/components/tabs/index.d.ts +2 -7
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.jsx +7 -8
- package/dist/components/tags-input/index.d.ts +2 -7
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/index.jsx +8 -8
- package/dist/components/time-picker/index.d.ts +3 -13
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/index.jsx +7 -8
- package/dist/components/timer/index.d.ts +2 -2
- package/dist/components/timer/index.js +1 -1
- package/dist/components/timer/index.jsx +5 -6
- package/dist/components/toast/index.d.ts +6 -7
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.jsx +5 -2
- package/dist/components/toggle/index.d.ts +5 -34
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/index.jsx +2 -4
- package/dist/components/toggle-group/index.d.ts +3 -8
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/index.jsx +5 -6
- package/dist/components/tooltip/index.d.ts +3 -8
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.jsx +7 -8
- package/dist/components/tour/index.d.ts +4 -4
- package/dist/components/tour/index.js +1 -1
- package/dist/components/tour/index.jsx +7 -8
- package/dist/components/tree-view/index.d.ts +6 -16
- package/dist/components/tree-view/index.js +2 -2
- package/dist/components/tree-view/index.jsx +9 -10
- package/dist/index.d.ts +2 -1
- package/dist/index.js +47 -47
- package/dist/index.jsx +295 -297
- package/dist/providers/environment/index.js +1 -1
- package/dist/providers/environment/index.jsx +2 -3
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.jsx +3 -4
- package/dist/providers/locale/index.js +1 -1
- package/dist/providers/locale/index.jsx +2 -2
- package/dist/{use-presence-Ct1onT3-.d.ts → use-presence-C07V_WCb.d.ts} +1 -1
- package/package.json +71 -78
- package/dist/chunk/52WUF3CY.jsx +0 -26
- package/dist/chunk/BSPFGETO.js +0 -21
- package/dist/chunk/CTTG4GSG.js +0 -30
- package/dist/chunk/DT73WLR4.js +0 -5
- package/dist/chunk/JHG4EID2.jsx +0 -233
- package/dist/chunk/KGOB2IMX.jsx +0 -7
- package/dist/chunk/MV3KTL7M.js +0 -107
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./BPYAMTER.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useLocaleContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./RCXMZN3G.jsx";
|
|
13
13
|
import {
|
|
14
14
|
createContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./TVCIHLER.jsx";
|
|
16
16
|
import {
|
|
17
17
|
__export
|
|
18
18
|
} from "./7IUG3E2V.jsx";
|
|
@@ -43,20 +43,17 @@ import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
|
43
43
|
import * as toggleGroup from "@zag-js/toggle-group";
|
|
44
44
|
import { createMemo, createUniqueId } from "solid-js";
|
|
45
45
|
var useToggleGroup = (props = {}) => {
|
|
46
|
+
const id = createUniqueId();
|
|
46
47
|
const locale = useLocaleContext();
|
|
47
48
|
const environment = useEnvironmentContext();
|
|
48
|
-
const
|
|
49
|
-
const context = createMemo(() => ({
|
|
49
|
+
const machineProps = createMemo(() => ({
|
|
50
50
|
id,
|
|
51
51
|
dir: locale().dir,
|
|
52
52
|
getRootNode: environment().getRootNode,
|
|
53
|
-
value: props.defaultValue,
|
|
54
53
|
...props
|
|
55
54
|
}));
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
});
|
|
59
|
-
return createMemo(() => toggleGroup.connect(state, send, normalizeProps));
|
|
55
|
+
const service = useMachine(toggleGroup.machine, machineProps);
|
|
56
|
+
return createMemo(() => toggleGroup.connect(service, normalizeProps));
|
|
60
57
|
};
|
|
61
58
|
|
|
62
59
|
// src/components/toggle-group/toggle-group-root.tsx
|
|
@@ -83,9 +80,7 @@ var ToggleGroupRoot = (props) => {
|
|
|
83
80
|
// src/components/toggle-group/toggle-group-root-provider.tsx
|
|
84
81
|
import { mergeProps as mergeProps3 } from "@zag-js/solid";
|
|
85
82
|
var ToggleGroupRootProvider = (props) => {
|
|
86
|
-
const [{ value: toggleGroup2 }, localProps] = createSplitProps()(props, [
|
|
87
|
-
"value"
|
|
88
|
-
]);
|
|
83
|
+
const [{ value: toggleGroup2 }, localProps] = createSplitProps()(props, ["value"]);
|
|
89
84
|
const mergedProps = mergeProps3(() => toggleGroup2().getRootProps(), localProps);
|
|
90
85
|
return <ToggleGroupProvider value={toggleGroup2}>
|
|
91
86
|
<ark.div {...mergedProps} />
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { getDocument, getWindow } from '@zag-js/dom-query';
|
|
1
|
+
import { createContext } from './TROPIN4C.js';
|
|
2
|
+
import { createComponent, memo, template, use } from 'solid-js/web';
|
|
3
|
+
import { getWindow, getDocument } from '@zag-js/dom-query';
|
|
5
4
|
import { createSignal, createMemo, Show } from 'solid-js';
|
|
6
5
|
|
|
6
|
+
// src/utils/run-if-fn.ts
|
|
7
|
+
var isFunction = (value) => typeof value === "function";
|
|
8
|
+
var runIfFn = (valueOrFn, ...args) => isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
|
|
9
|
+
|
|
7
10
|
// src/providers/environment/use-environment-context.ts
|
|
8
11
|
var [EnvironmentContextProvider, useEnvironmentContext] = createContext({
|
|
9
12
|
hookName: "useEnvironmentContext",
|
|
@@ -43,4 +46,4 @@ var EnvironmentProvider = (props) => {
|
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
48
|
|
|
46
|
-
export { EnvironmentProvider, useEnvironmentContext };
|
|
49
|
+
export { EnvironmentProvider, runIfFn, useEnvironmentContext };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { usePresence,
|
|
2
|
-
import { useRenderStrategyContext, splitRenderStrategyProps, RenderStrategyProvider } from './
|
|
1
|
+
import { usePresence, splitPresenceProps, PresenceProvider, usePresenceContext } from './WRLQ7Y6E.js';
|
|
2
|
+
import { useRenderStrategyContext, splitRenderStrategyProps, RenderStrategyProvider } from './QFAL6GWC.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
|
-
import { useEnvironmentContext } from './
|
|
6
|
-
import { useLocaleContext } from './
|
|
7
|
-
import { createContext } from './
|
|
5
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
6
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
7
|
+
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
9
9
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
10
10
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -192,16 +192,14 @@ var useTour = (props = {}) => {
|
|
|
192
192
|
const id = createUniqueId();
|
|
193
193
|
const locale = useLocaleContext();
|
|
194
194
|
const environment = useEnvironmentContext();
|
|
195
|
-
const
|
|
195
|
+
const machineProps = createMemo(() => ({
|
|
196
196
|
id,
|
|
197
197
|
dir: locale().dir,
|
|
198
198
|
getRootNode: environment().getRootNode,
|
|
199
199
|
...props
|
|
200
200
|
}));
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
});
|
|
204
|
-
return createMemo(() => tour.connect(state, send, normalizeProps));
|
|
201
|
+
const service = useMachine(tour.machine, machineProps);
|
|
202
|
+
return createMemo(() => tour.connect(service, normalizeProps));
|
|
205
203
|
};
|
|
206
204
|
|
|
207
205
|
// src/components/tour/tour.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
|
-
import { useEnvironmentContext } from './
|
|
4
|
-
import { useLocaleContext } from './
|
|
5
|
-
import { createContext } from './
|
|
3
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
4
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
5
|
+
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { __export } from './ESLJRKWD.js';
|
|
7
7
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
8
8
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -69,7 +69,7 @@ var StepsItem = (props) => {
|
|
|
69
69
|
return createComponent(StepsItemProvider, {
|
|
70
70
|
value: itemState,
|
|
71
71
|
get children() {
|
|
72
|
-
return createComponent(ark.
|
|
72
|
+
return createComponent(ark.div, mergedProps);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -84,7 +84,7 @@ StepsItemContext.displayName = "StepsItemContext";
|
|
|
84
84
|
var StepsList = (props) => {
|
|
85
85
|
const steps2 = useStepsContext();
|
|
86
86
|
const mergedProps = mergeProps(() => steps2().getListProps(), props);
|
|
87
|
-
return createComponent(ark.
|
|
87
|
+
return createComponent(ark.div, mergedProps);
|
|
88
88
|
};
|
|
89
89
|
var StepsNextTrigger = (props) => {
|
|
90
90
|
const steps2 = useStepsContext();
|
|
@@ -102,18 +102,17 @@ var StepsProgress = (props) => {
|
|
|
102
102
|
return createComponent(ark.div, mergedProps);
|
|
103
103
|
};
|
|
104
104
|
function useSteps(props = {}) {
|
|
105
|
+
const id = createUniqueId();
|
|
105
106
|
const environment = useEnvironmentContext();
|
|
106
107
|
const locale = useLocaleContext();
|
|
107
|
-
const
|
|
108
|
-
const context = createMemo(() => ({
|
|
108
|
+
const machineProps = createMemo(() => ({
|
|
109
109
|
id,
|
|
110
110
|
dir: locale().dir,
|
|
111
111
|
getRootNode: environment().getRootNode,
|
|
112
|
-
step: props.defaultStep,
|
|
113
112
|
...props
|
|
114
113
|
}));
|
|
115
|
-
const
|
|
116
|
-
return createMemo(() => steps.connect(
|
|
114
|
+
const service = useMachine(steps.machine, machineProps);
|
|
115
|
+
return createMemo(() => steps.connect(service, normalizeProps));
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
// src/components/steps/steps-root.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./XHA6B6L2.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./BPYAMTER.jsx";
|
|
13
13
|
import {
|
|
14
14
|
useLocaleContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./RCXMZN3G.jsx";
|
|
16
16
|
import {
|
|
17
17
|
createContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./TVCIHLER.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -96,11 +96,11 @@ import * as editable from "@zag-js/editable";
|
|
|
96
96
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
97
97
|
import { createMemo, createUniqueId } from "solid-js";
|
|
98
98
|
var useEditable = (props = {}) => {
|
|
99
|
+
const id = createUniqueId();
|
|
99
100
|
const locale = useLocaleContext();
|
|
100
101
|
const environment = useEnvironmentContext();
|
|
101
|
-
const id = createUniqueId();
|
|
102
102
|
const field = useFieldContext();
|
|
103
|
-
const
|
|
103
|
+
const machineProps = createMemo(() => ({
|
|
104
104
|
id,
|
|
105
105
|
ids: {
|
|
106
106
|
label: field?.().ids.label,
|
|
@@ -112,13 +112,10 @@ var useEditable = (props = {}) => {
|
|
|
112
112
|
readOnly: field?.().readOnly,
|
|
113
113
|
required: field?.().required,
|
|
114
114
|
getRootNode: environment().getRootNode,
|
|
115
|
-
edit: props.defaultEdit,
|
|
116
|
-
value: props.defaultValue,
|
|
117
|
-
"edit.controlled": props.edit !== void 0,
|
|
118
115
|
...props
|
|
119
116
|
}));
|
|
120
|
-
const
|
|
121
|
-
return createMemo(() => editable.connect(
|
|
117
|
+
const service = useMachine(editable.machine, machineProps);
|
|
118
|
+
return createMemo(() => editable.connect(service, normalizeProps));
|
|
122
119
|
};
|
|
123
120
|
|
|
124
121
|
// src/components/editable/editable-root.tsx
|
|
@@ -3,17 +3,10 @@ import {
|
|
|
3
3
|
} from "./DOBZPYAN.jsx";
|
|
4
4
|
import {
|
|
5
5
|
EnvironmentProvider
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./BPYAMTER.jsx";
|
|
7
7
|
|
|
8
8
|
// src/components/frame/frame.tsx
|
|
9
|
-
import {
|
|
10
|
-
Show,
|
|
11
|
-
createEffect as createEffect2,
|
|
12
|
-
createMemo,
|
|
13
|
-
createSignal,
|
|
14
|
-
onCleanup as onCleanup2,
|
|
15
|
-
splitProps
|
|
16
|
-
} from "solid-js";
|
|
9
|
+
import { Show, createEffect as createEffect2, createMemo, createSignal, onCleanup as onCleanup2, splitProps } from "solid-js";
|
|
17
10
|
import { Portal } from "solid-js/web";
|
|
18
11
|
|
|
19
12
|
// src/components/frame/frame-content.tsx
|
|
@@ -38,13 +31,7 @@ function getMountNode(frame) {
|
|
|
38
31
|
return doc.body.querySelector(".frame-root") || doc.body;
|
|
39
32
|
}
|
|
40
33
|
var Frame = (props) => {
|
|
41
|
-
const [frameProps, localProps] = splitProps(props, [
|
|
42
|
-
"children",
|
|
43
|
-
"head",
|
|
44
|
-
"onMount",
|
|
45
|
-
"onUnmount",
|
|
46
|
-
"srcdoc"
|
|
47
|
-
]);
|
|
34
|
+
const [frameProps, localProps] = splitProps(props, ["children", "head", "onMount", "onUnmount", "srcdoc"]);
|
|
48
35
|
const srcdoc = createMemo(() => frameProps.srcdoc ?? initialSrcDoc);
|
|
49
36
|
const [frameRef, setFrameRef] = createSignal(null);
|
|
50
37
|
const [mountNode, setMountNode] = createSignal(null);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
|
-
import { useEnvironmentContext } from './
|
|
4
|
-
import { useLocaleContext } from './
|
|
5
|
-
import { createContext } from './
|
|
3
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
4
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
5
|
+
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { __export } from './ESLJRKWD.js';
|
|
7
7
|
import { createComponent } from 'solid-js/web';
|
|
8
8
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -40,25 +40,22 @@ var QrCodePattern = (props) => {
|
|
|
40
40
|
return createComponent(ark.path, mergedProps);
|
|
41
41
|
};
|
|
42
42
|
var useQrCode = (props = {}) => {
|
|
43
|
+
const id = createUniqueId();
|
|
43
44
|
const locale = useLocaleContext();
|
|
44
45
|
const environment = useEnvironmentContext();
|
|
45
|
-
const
|
|
46
|
-
const context = createMemo(() => ({
|
|
46
|
+
const machineProps = createMemo(() => ({
|
|
47
47
|
id,
|
|
48
48
|
dir: locale().dir,
|
|
49
49
|
getRootNode: environment().getRootNode,
|
|
50
|
-
value: props.defaultValue,
|
|
51
50
|
...props
|
|
52
51
|
}));
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
return createMemo(() => qrCode.connect(state, send, normalizeProps));
|
|
52
|
+
const service = useMachine(qrCode.machine, machineProps);
|
|
53
|
+
return createMemo(() => qrCode.connect(service, normalizeProps));
|
|
57
54
|
};
|
|
58
55
|
|
|
59
56
|
// src/components/qr-code/qr-code-root.tsx
|
|
60
57
|
var QrCodeRoot = (props) => {
|
|
61
|
-
const [useQrCodeProps, restProps] = createSplitProps()(props, ["defaultValue", "encoding", "id", "ids", "onValueChange", "value"]);
|
|
58
|
+
const [useQrCodeProps, restProps] = createSplitProps()(props, ["defaultValue", "encoding", "id", "ids", "onValueChange", "pixelSize", "value"]);
|
|
62
59
|
const api = useQrCode(useQrCodeProps);
|
|
63
60
|
const mergedProps = mergeProps(() => api().getRootProps(), restProps);
|
|
64
61
|
return createComponent(QrCodeProvider, {
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { ark } from './EPLBB4QN.js';
|
|
2
|
-
import {
|
|
2
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
3
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
4
|
+
import { createContext } from './TROPIN4C.js';
|
|
3
5
|
import { __export } from './ESLJRKWD.js';
|
|
4
|
-
import
|
|
5
|
-
import * as toast from '@zag-js/toast';
|
|
6
|
+
import * as toast2 from '@zag-js/toast';
|
|
6
7
|
export { anatomy } from '@zag-js/toast';
|
|
7
|
-
import { createComponent, spread, mergeProps as mergeProps$1, insert
|
|
8
|
-
import {
|
|
8
|
+
import { createComponent, template, spread, mergeProps as mergeProps$1, insert } from 'solid-js/web';
|
|
9
|
+
import { mergeProps, useMachine, normalizeProps, Key } from '@zag-js/solid';
|
|
10
|
+
import { splitProps, createUniqueId, createMemo } from 'solid-js';
|
|
9
11
|
|
|
10
12
|
var createToaster = (props) => {
|
|
11
|
-
|
|
12
|
-
id: "1",
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
const api = toast.group.connect(machine, machine.send, normalizeProps);
|
|
16
|
-
return {
|
|
17
|
-
...api,
|
|
18
|
-
machine
|
|
19
|
-
};
|
|
13
|
+
return toast2.createStore(props);
|
|
20
14
|
};
|
|
21
15
|
|
|
22
16
|
// src/components/toast/use-toast-context.ts
|
|
@@ -64,21 +58,28 @@ var ToastTitle = (props) => {
|
|
|
64
58
|
};
|
|
65
59
|
var Toaster = (props) => {
|
|
66
60
|
const [toasterProps, localProps] = splitProps(props, ["toaster", "children"]);
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
const locale = useLocaleContext();
|
|
62
|
+
const env = useEnvironmentContext();
|
|
63
|
+
const service = useMachine(toast2.group.machine, () => ({
|
|
64
|
+
store: toasterProps.toaster,
|
|
65
|
+
id: createUniqueId(),
|
|
66
|
+
dir: locale()?.dir,
|
|
67
|
+
getRootNode: () => env()?.getDocument()
|
|
68
|
+
}));
|
|
69
|
+
const api = createMemo(() => toast2.group.connect(service, normalizeProps));
|
|
70
|
+
const toasts = createMemo(() => api().getToasts());
|
|
71
|
+
const mergedProps = mergeProps(api().getGroupProps(), localProps);
|
|
74
72
|
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
75
73
|
get children() {
|
|
76
|
-
return createComponent(
|
|
74
|
+
return createComponent(Key, {
|
|
77
75
|
get each() {
|
|
78
76
|
return toasts();
|
|
79
77
|
},
|
|
80
|
-
|
|
78
|
+
by: "id",
|
|
79
|
+
children: (toast3, index) => createComponent(ToastActor, {
|
|
81
80
|
value: toast3,
|
|
81
|
+
index,
|
|
82
|
+
parent: service,
|
|
82
83
|
children: (ctx) => toasterProps.children(ctx)
|
|
83
84
|
})
|
|
84
85
|
});
|
|
@@ -86,13 +87,17 @@ var Toaster = (props) => {
|
|
|
86
87
|
}));
|
|
87
88
|
};
|
|
88
89
|
var ToastActor = (props) => {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
const localProps = createMemo(() => ({
|
|
91
|
+
...props.value(),
|
|
92
|
+
parent: props.parent,
|
|
93
|
+
index: props.index
|
|
94
|
+
}));
|
|
95
|
+
const service = useMachine(toast2.machine, localProps);
|
|
96
|
+
const api = createMemo(() => toast2.connect(service, normalizeProps));
|
|
92
97
|
return createComponent(ToastProvider, {
|
|
93
98
|
value: api,
|
|
94
99
|
get children() {
|
|
95
|
-
return props.children(
|
|
100
|
+
return props.children(props.value);
|
|
96
101
|
}
|
|
97
102
|
});
|
|
98
103
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
|
-
import { useEnvironmentContext } from './
|
|
4
|
-
import { useLocaleContext } from './
|
|
5
|
-
import { createContext } from './
|
|
3
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
4
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
5
|
+
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { __export } from './ESLJRKWD.js';
|
|
7
7
|
import { createComponent } from 'solid-js/web';
|
|
8
8
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -34,15 +34,14 @@ var useSplitter = (props = {}) => {
|
|
|
34
34
|
const locale = useLocaleContext();
|
|
35
35
|
const environment = useEnvironmentContext();
|
|
36
36
|
const id = createUniqueId();
|
|
37
|
-
const
|
|
37
|
+
const machineProps = createMemo(() => ({
|
|
38
38
|
id,
|
|
39
39
|
dir: locale().dir,
|
|
40
40
|
getRootNode: environment().getRootNode,
|
|
41
|
-
size: props.defaultSize,
|
|
42
41
|
...props
|
|
43
42
|
}));
|
|
44
|
-
const
|
|
45
|
-
return createMemo(() => splitter.connect(
|
|
43
|
+
const service = useMachine(splitter.machine, machineProps);
|
|
44
|
+
return createMemo(() => splitter.connect(service, normalizeProps));
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
// src/components/splitter/splitter-root.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './
|
|
1
|
+
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './WRLQ7Y6E.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
|
-
import { useEnvironmentContext } from './
|
|
5
|
-
import { useLocaleContext } from './
|
|
6
|
-
import { createContext } from './
|
|
4
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
5
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
6
|
+
import { createContext } from './TROPIN4C.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
8
8
|
import { createComponent } from 'solid-js/web';
|
|
9
9
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -78,19 +78,17 @@ var PopoverPositioner = (props) => {
|
|
|
78
78
|
});
|
|
79
79
|
};
|
|
80
80
|
var usePopover = (props = {}) => {
|
|
81
|
+
const id = createUniqueId();
|
|
81
82
|
const locale = useLocaleContext();
|
|
82
83
|
const environment = useEnvironmentContext();
|
|
83
|
-
const
|
|
84
|
-
const context = createMemo(() => ({
|
|
84
|
+
const machineProps = createMemo(() => ({
|
|
85
85
|
id,
|
|
86
86
|
dir: locale().dir,
|
|
87
87
|
getRootNode: environment().getRootNode,
|
|
88
|
-
open: props.defaultOpen,
|
|
89
|
-
"open.controlled": props.open !== void 0,
|
|
90
88
|
...props
|
|
91
89
|
}));
|
|
92
|
-
const
|
|
93
|
-
return createMemo(() => popover.connect(
|
|
90
|
+
const service = useMachine(popover.machine, machineProps);
|
|
91
|
+
return createMemo(() => popover.connect(service, normalizeProps));
|
|
94
92
|
};
|
|
95
93
|
|
|
96
94
|
// src/components/popover/popover-root.tsx
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
runIfFn
|
|
3
|
-
} from "./KGOB2IMX.jsx";
|
|
4
1
|
import {
|
|
5
2
|
createContext
|
|
6
|
-
} from "./
|
|
3
|
+
} from "./TVCIHLER.jsx";
|
|
7
4
|
|
|
8
5
|
// src/providers/environment/environment-provider.tsx
|
|
9
6
|
import { getDocument, getWindow } from "@zag-js/dom-query";
|
|
10
7
|
import { Show, createMemo, createSignal } from "solid-js";
|
|
11
8
|
|
|
9
|
+
// src/utils/run-if-fn.ts
|
|
10
|
+
var isFunction = (value) => typeof value === "function";
|
|
11
|
+
var runIfFn = (valueOrFn, ...args) => isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
|
|
12
|
+
|
|
12
13
|
// src/providers/environment/use-environment-context.ts
|
|
13
14
|
var [EnvironmentContextProvider, useEnvironmentContext] = createContext({
|
|
14
15
|
hookName: "useEnvironmentContext",
|
|
@@ -39,6 +40,7 @@ var EnvironmentProvider = (props) => {
|
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
export {
|
|
43
|
+
runIfFn,
|
|
42
44
|
useEnvironmentContext,
|
|
43
45
|
EnvironmentProvider
|
|
44
46
|
};
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./BPYAMTER.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useLocaleContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./RCXMZN3G.jsx";
|
|
13
13
|
import {
|
|
14
14
|
createContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./TVCIHLER.jsx";
|
|
16
16
|
import {
|
|
17
17
|
__export
|
|
18
18
|
} from "./7IUG3E2V.jsx";
|
|
@@ -52,11 +52,7 @@ var [RadioGroupItemPropsProvider, useRadioGroupItemPropsContext] = createContext
|
|
|
52
52
|
|
|
53
53
|
// src/components/radio-group/radio-group-item.tsx
|
|
54
54
|
var RadioGroupItem = (props) => {
|
|
55
|
-
const [itemProps, localProps] = createSplitProps()(props, [
|
|
56
|
-
"value",
|
|
57
|
-
"disabled",
|
|
58
|
-
"invalid"
|
|
59
|
-
]);
|
|
55
|
+
const [itemProps, localProps] = createSplitProps()(props, ["value", "disabled", "invalid"]);
|
|
60
56
|
const radioGroup = useRadioGroupContext();
|
|
61
57
|
const mergedProps = mergeProps2(() => radioGroup().getItemProps(itemProps), localProps);
|
|
62
58
|
const itemState = createMemo(() => radioGroup().getItemState(itemProps));
|
|
@@ -113,20 +109,17 @@ import * as radio from "@zag-js/radio-group";
|
|
|
113
109
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
114
110
|
import { createMemo as createMemo2, createUniqueId } from "solid-js";
|
|
115
111
|
var useRadioGroup = (props = {}) => {
|
|
112
|
+
const id = createUniqueId();
|
|
116
113
|
const locale = useLocaleContext();
|
|
117
114
|
const environment = useEnvironmentContext();
|
|
118
|
-
const
|
|
119
|
-
const context = createMemo2(() => ({
|
|
115
|
+
const machineProps = createMemo2(() => ({
|
|
120
116
|
id,
|
|
121
117
|
dir: locale().dir,
|
|
122
118
|
getRootNode: environment().getRootNode,
|
|
123
|
-
value: props.defaultValue,
|
|
124
119
|
...props
|
|
125
120
|
}));
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
return createMemo2(() => radio.connect(state, send, normalizeProps));
|
|
121
|
+
const service = useMachine(radio.machine, machineProps);
|
|
122
|
+
return createMemo2(() => radio.connect(service, normalizeProps));
|
|
130
123
|
};
|
|
131
124
|
|
|
132
125
|
// src/components/radio-group/radio-group-root.tsx
|
|
@@ -153,9 +146,7 @@ var RadioGroupRoot = (props) => {
|
|
|
153
146
|
// src/components/radio-group/radio-group-root-provider.tsx
|
|
154
147
|
import { mergeProps as mergeProps8 } from "@zag-js/solid";
|
|
155
148
|
var RadioGroupRootProvider = (props) => {
|
|
156
|
-
const [{ value: radioGroup }, localProps] = createSplitProps()(props, [
|
|
157
|
-
"value"
|
|
158
|
-
]);
|
|
149
|
+
const [{ value: radioGroup }, localProps] = createSplitProps()(props, ["value"]);
|
|
159
150
|
const mergedProps = mergeProps8(() => radioGroup().getRootProps(), localProps);
|
|
160
151
|
return <RadioGroupProvider value={radioGroup}>
|
|
161
152
|
<ark.div {...mergedProps} />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './KMFRZGLF.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
|
-
import { useEnvironmentContext } from './
|
|
5
|
-
import { useLocaleContext } from './
|
|
6
|
-
import { createContext } from './
|
|
4
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
5
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
6
|
+
import { createContext } from './TROPIN4C.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
8
8
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
9
9
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -46,11 +46,11 @@ var PinInputLabel = (props) => {
|
|
|
46
46
|
return createComponent(ark.label, mergedProps);
|
|
47
47
|
};
|
|
48
48
|
var usePinInput = (props = {}) => {
|
|
49
|
+
const id = createUniqueId();
|
|
49
50
|
const locale = useLocaleContext();
|
|
50
51
|
const environment = useEnvironmentContext();
|
|
51
|
-
const id = createUniqueId();
|
|
52
52
|
const field = useFieldContext();
|
|
53
|
-
const
|
|
53
|
+
const machineProps = createMemo(() => ({
|
|
54
54
|
id,
|
|
55
55
|
ids: {
|
|
56
56
|
label: field?.().ids.label,
|
|
@@ -62,16 +62,15 @@ var usePinInput = (props = {}) => {
|
|
|
62
62
|
invalid: field?.().invalid,
|
|
63
63
|
dir: locale().dir,
|
|
64
64
|
getRootNode: environment().getRootNode,
|
|
65
|
-
value: props.defaultValue,
|
|
66
65
|
...props
|
|
67
66
|
}));
|
|
68
|
-
const
|
|
69
|
-
return createMemo(() => pinInput.connect(
|
|
67
|
+
const service = useMachine(pinInput.machine, machineProps);
|
|
68
|
+
return createMemo(() => pinInput.connect(service, normalizeProps));
|
|
70
69
|
};
|
|
71
70
|
|
|
72
71
|
// src/components/pin-input/pin-input-root.tsx
|
|
73
72
|
var PinInputRoot = (props) => {
|
|
74
|
-
const [usePinInputProps, localProps] = createSplitProps()(props, ["autoFocus", "blurOnComplete", "defaultValue", "disabled", "form", "id", "ids", "invalid", "mask", "name", "onValueChange", "onValueComplete", "onValueInvalid", "otp", "pattern", "placeholder", "readOnly", "required", "selectOnFocus", "translations", "type", "value"]);
|
|
73
|
+
const [usePinInputProps, localProps] = createSplitProps()(props, ["autoFocus", "blurOnComplete", "count", "defaultValue", "disabled", "form", "id", "ids", "invalid", "mask", "name", "onValueChange", "onValueComplete", "onValueInvalid", "otp", "pattern", "placeholder", "readOnly", "required", "selectOnFocus", "translations", "type", "value"]);
|
|
75
74
|
const pinInput2 = usePinInput(usePinInputProps);
|
|
76
75
|
const mergedProps = mergeProps(() => pinInput2().getRootProps(), localProps);
|
|
77
76
|
return createComponent(PinInputProvider, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { usePresence, PresenceProvider } from './
|
|
2
|
-
import {
|
|
1
|
+
import { usePresence, PresenceProvider } from './WRLQ7Y6E.js';
|
|
2
|
+
import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyContext } from './QFAL6GWC.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
|
-
import { useEnvironmentContext } from './
|
|
6
|
-
import { useLocaleContext } from './
|
|
7
|
-
import { createContext } from './
|
|
5
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
6
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
7
|
+
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
9
9
|
import { createComponent } from 'solid-js/web';
|
|
10
10
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -62,18 +62,17 @@ var TabTrigger = (props) => {
|
|
|
62
62
|
// src/components/tabs/tabs-context.tsx
|
|
63
63
|
var TabsContext = (props) => props.children(useTabsContext());
|
|
64
64
|
var useTabs = (props = {}) => {
|
|
65
|
+
const id = createUniqueId();
|
|
65
66
|
const locale = useLocaleContext();
|
|
66
67
|
const environment = useEnvironmentContext();
|
|
67
|
-
const
|
|
68
|
-
const context = createMemo(() => ({
|
|
68
|
+
const machineProps = createMemo(() => ({
|
|
69
69
|
id,
|
|
70
70
|
dir: locale().dir,
|
|
71
71
|
getRootNode: environment().getRootNode,
|
|
72
|
-
value: props.defaultValue,
|
|
73
72
|
...props
|
|
74
73
|
}));
|
|
75
|
-
const
|
|
76
|
-
return createMemo(() => tabs.connect(
|
|
74
|
+
const service = useMachine(tabs.machine, machineProps);
|
|
75
|
+
return createMemo(() => tabs.connect(service, normalizeProps));
|
|
77
76
|
};
|
|
78
77
|
|
|
79
78
|
// src/components/tabs/tabs-root.tsx
|