@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
package/README.md
CHANGED
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
# Welcome to Ark UI
|
|
8
8
|
|
|
9
|
-
Ark UI is a headless, open-source UI library with over 45+ components designed for building
|
|
10
|
-
|
|
11
|
-
dedciated packages for each supported framework.
|
|
9
|
+
Ark UI is a headless, open-source UI library with over 45+ components designed for building reusable, scalable Design
|
|
10
|
+
Systems. It supports a wide range of JavaScript frameworks, offering dedciated packages for each supported framework.
|
|
12
11
|
|
|
13
12
|
## Supported Frameworks
|
|
14
13
|
|
|
@@ -101,8 +100,7 @@ export const MySlider = () => {
|
|
|
101
100
|
|
|
102
101
|
## Documentation
|
|
103
102
|
|
|
104
|
-
For more detailed documentation and examples, please visit the
|
|
105
|
-
[official documentation](https://ark-ui.com/).
|
|
103
|
+
For more detailed documentation and examples, please visit the [official documentation](https://ark-ui.com/).
|
|
106
104
|
|
|
107
105
|
## Roadmap
|
|
108
106
|
|
|
@@ -111,10 +109,9 @@ You can request, vote for, and check upcoming features on our [roadmap](https://
|
|
|
111
109
|
## Contribution
|
|
112
110
|
|
|
113
111
|
We welcome contributions to Ark UI. Please read our
|
|
114
|
-
[contributing guidelines](https://github.com/chakra-ui/ark/blob/main/CONTRIBUTING.md) for more
|
|
115
|
-
|
|
112
|
+
[contributing guidelines](https://github.com/chakra-ui/ark/blob/main/CONTRIBUTING.md) for more information on how to
|
|
113
|
+
contribute.
|
|
116
114
|
|
|
117
115
|
## License
|
|
118
116
|
|
|
119
|
-
This project is licensed under the terms of the
|
|
120
|
-
[MIT license](https://github.com/chakra-ui/ark/blob/main/LICENSE).
|
|
117
|
+
This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/ark/blob/main/LICENSE).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
splitRenderStrategyProps
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./NEBB7COJ.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,20 +9,14 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./TVCIHLER.jsx";
|
|
13
13
|
|
|
14
14
|
// src/components/presence/presence.tsx
|
|
15
15
|
import { mergeProps } from "@zag-js/solid";
|
|
16
16
|
import { Show } from "solid-js";
|
|
17
17
|
|
|
18
18
|
// src/components/presence/split-presence-props.ts
|
|
19
|
-
var splitPresenceProps = (props) => createSplitProps()(props, [
|
|
20
|
-
"immediate",
|
|
21
|
-
"lazyMount",
|
|
22
|
-
"onExitComplete",
|
|
23
|
-
"present",
|
|
24
|
-
"unmountOnExit"
|
|
25
|
-
]);
|
|
19
|
+
var splitPresenceProps = (props) => createSplitProps()(props, ["immediate", "lazyMount", "onExitComplete", "present", "unmountOnExit"]);
|
|
26
20
|
|
|
27
21
|
// src/components/presence/use-presence.ts
|
|
28
22
|
import * as presence from "@zag-js/presence";
|
|
@@ -31,10 +25,8 @@ import { createEffect, createMemo, createSignal } from "solid-js";
|
|
|
31
25
|
var usePresence = (props) => {
|
|
32
26
|
const [renderStrategyProps, context] = splitRenderStrategyProps(props);
|
|
33
27
|
const [wasEverPresent, setWasEverPresent] = createSignal(false);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
const api = createMemo(() => presence.connect(state, send, normalizeProps));
|
|
28
|
+
const service = useMachine(presence.machine, props);
|
|
29
|
+
const api = createMemo(() => presence.connect(service, normalizeProps));
|
|
38
30
|
createEffect(() => {
|
|
39
31
|
const present = api().present;
|
|
40
32
|
if (present) setWasEverPresent(true);
|
|
@@ -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";
|
|
@@ -123,10 +123,7 @@ var FileUploadItemPreviewImage = (props) => {
|
|
|
123
123
|
const cleanup = fileUpload2().createFileUrl(itemProps.file, (url2) => setUrl(url2));
|
|
124
124
|
onCleanup(cleanup);
|
|
125
125
|
});
|
|
126
|
-
const mergedProps = mergeProps9(
|
|
127
|
-
() => fileUpload2().getItemPreviewImageProps({ ...itemProps, url: url() }),
|
|
128
|
-
props
|
|
129
|
-
);
|
|
126
|
+
const mergedProps = mergeProps9(() => fileUpload2().getItemPreviewImageProps({ ...itemProps, url: url() }), props);
|
|
130
127
|
return <Show when={url()}>
|
|
131
128
|
<ark.img {...mergedProps} />
|
|
132
129
|
</Show>;
|
|
@@ -157,11 +154,11 @@ import * as fileUpload from "@zag-js/file-upload";
|
|
|
157
154
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
158
155
|
import { createMemo, createUniqueId } from "solid-js";
|
|
159
156
|
var useFileUpload = (props = {}) => {
|
|
157
|
+
const id = createUniqueId();
|
|
160
158
|
const locale = useLocaleContext();
|
|
161
159
|
const environment = useEnvironmentContext();
|
|
162
|
-
const id = createUniqueId();
|
|
163
160
|
const field = useFieldContext();
|
|
164
|
-
const
|
|
161
|
+
const machineProps = createMemo(() => ({
|
|
165
162
|
id,
|
|
166
163
|
ids: {
|
|
167
164
|
label: field?.().ids.label,
|
|
@@ -169,13 +166,14 @@ var useFileUpload = (props = {}) => {
|
|
|
169
166
|
},
|
|
170
167
|
dir: locale().dir,
|
|
171
168
|
disabled: field?.().disabled,
|
|
169
|
+
locale: locale().locale,
|
|
172
170
|
required: field?.().required,
|
|
173
171
|
invalid: field?.().invalid,
|
|
174
172
|
getRootNode: environment().getRootNode,
|
|
175
173
|
...props
|
|
176
174
|
}));
|
|
177
|
-
const
|
|
178
|
-
return createMemo(() => fileUpload.connect(
|
|
175
|
+
const service = useMachine(fileUpload.machine, machineProps);
|
|
176
|
+
return createMemo(() => fileUpload.connect(service, normalizeProps));
|
|
179
177
|
};
|
|
180
178
|
|
|
181
179
|
// src/components/file-upload/file-upload-root.tsx
|
|
@@ -212,9 +210,7 @@ var FileUploadRoot = (props) => {
|
|
|
212
210
|
// src/components/file-upload/file-upload-root-provider.tsx
|
|
213
211
|
import { mergeProps as mergeProps13 } from "@zag-js/solid";
|
|
214
212
|
var FileUploadRootProvider = (props) => {
|
|
215
|
-
const [{ value: fileUpload2 }, localProps] = createSplitProps()(props, [
|
|
216
|
-
"value"
|
|
217
|
-
]);
|
|
213
|
+
const [{ value: fileUpload2 }, localProps] = createSplitProps()(props, ["value"]);
|
|
218
214
|
const mergedProps = mergeProps13(() => fileUpload2().getRootProps(), localProps);
|
|
219
215
|
return <FileUploadProvider value={fileUpload2}>
|
|
220
216
|
<ark.div {...mergedProps} />
|
|
@@ -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';
|
|
@@ -81,20 +81,17 @@ var RadioGroupLabel = (props) => {
|
|
|
81
81
|
return createComponent(ark.label, mergedProps);
|
|
82
82
|
};
|
|
83
83
|
var useRadioGroup = (props = {}) => {
|
|
84
|
+
const id = createUniqueId();
|
|
84
85
|
const locale = useLocaleContext();
|
|
85
86
|
const environment = useEnvironmentContext();
|
|
86
|
-
const
|
|
87
|
-
const context = createMemo(() => ({
|
|
87
|
+
const machineProps = createMemo(() => ({
|
|
88
88
|
id,
|
|
89
89
|
dir: locale().dir,
|
|
90
90
|
getRootNode: environment().getRootNode,
|
|
91
|
-
value: props.defaultValue,
|
|
92
91
|
...props
|
|
93
92
|
}));
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
});
|
|
97
|
-
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
93
|
+
const service = useMachine(radio.machine, machineProps);
|
|
94
|
+
return createMemo(() => radio.connect(service, normalizeProps));
|
|
98
95
|
};
|
|
99
96
|
|
|
100
97
|
// src/components/radio-group/radio-group-root.tsx
|
|
@@ -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";
|
|
@@ -71,15 +71,14 @@ var usePagination = (props) => {
|
|
|
71
71
|
const locale = useLocaleContext();
|
|
72
72
|
const environment = useEnvironmentContext();
|
|
73
73
|
const id = createUniqueId();
|
|
74
|
-
const
|
|
74
|
+
const machineProps = createMemo(() => ({
|
|
75
75
|
id,
|
|
76
76
|
dir: locale().dir,
|
|
77
77
|
getRootNode: environment().getRootNode,
|
|
78
|
-
page: props.defaultPage,
|
|
79
78
|
...props
|
|
80
79
|
}));
|
|
81
|
-
const
|
|
82
|
-
return createMemo(() => pagination.connect(
|
|
80
|
+
const service = useMachine(pagination.machine, machineProps);
|
|
81
|
+
return createMemo(() => pagination.connect(service, normalizeProps));
|
|
83
82
|
};
|
|
84
83
|
|
|
85
84
|
// src/components/pagination/pagination-root.tsx
|
|
@@ -87,6 +86,7 @@ var PaginationRoot = (props) => {
|
|
|
87
86
|
const [usePaginationProps, localProps] = createSplitProps()(props, [
|
|
88
87
|
"count",
|
|
89
88
|
"defaultPage",
|
|
89
|
+
"defaultPageSize",
|
|
90
90
|
"id",
|
|
91
91
|
"ids",
|
|
92
92
|
"onPageChange",
|
|
@@ -107,9 +107,7 @@ var PaginationRoot = (props) => {
|
|
|
107
107
|
// src/components/pagination/pagination-root-provider.tsx
|
|
108
108
|
import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
109
109
|
var PaginationRootProvider = (props) => {
|
|
110
|
-
const [{ value: pagination2 }, localProps] = createSplitProps()(props, [
|
|
111
|
-
"value"
|
|
112
|
-
]);
|
|
110
|
+
const [{ value: pagination2 }, localProps] = createSplitProps()(props, ["value"]);
|
|
113
111
|
const mergedProps = mergeProps6(() => pagination2().getRootProps(), localProps);
|
|
114
112
|
return <PaginationProvider value={pagination2}>
|
|
115
113
|
<ark.nav {...mergedProps} />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } 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';
|
|
@@ -61,22 +61,20 @@ var useHoverCard = (props = {}) => {
|
|
|
61
61
|
const locale = useLocaleContext();
|
|
62
62
|
const environment = useEnvironmentContext();
|
|
63
63
|
const id = createUniqueId();
|
|
64
|
-
const
|
|
64
|
+
const machineProps = createMemo(() => ({
|
|
65
65
|
id,
|
|
66
66
|
dir: locale().dir,
|
|
67
67
|
getRootNode: environment().getRootNode,
|
|
68
|
-
open: props.defaultOpen,
|
|
69
|
-
"open.controlled": props.open !== void 0,
|
|
70
68
|
...props
|
|
71
69
|
}));
|
|
72
|
-
const
|
|
73
|
-
return createMemo(() => hoverCard.connect(
|
|
70
|
+
const service = useMachine(hoverCard.machine, machineProps);
|
|
71
|
+
return createMemo(() => hoverCard.connect(service, normalizeProps));
|
|
74
72
|
};
|
|
75
73
|
|
|
76
74
|
// src/components/hover-card/hover-card-root.tsx
|
|
77
75
|
var HoverCardRoot = (props) => {
|
|
78
76
|
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
79
|
-
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ["closeDelay", "defaultOpen", "id", "ids", "onOpenChange", "open", "openDelay", "positioning"]);
|
|
77
|
+
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ["closeDelay", "defaultOpen", "id", "ids", "onFocusOutside", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "open", "openDelay", "positioning"]);
|
|
80
78
|
const api = useHoverCard(useHoverCardProps);
|
|
81
79
|
const apiPresence = usePresence(mergeProps(presenceProps, () => ({
|
|
82
80
|
present: api().open
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useControllableState
|
|
3
|
-
} from "./52WUF3CY.jsx";
|
|
4
1
|
import {
|
|
5
2
|
useFieldContext
|
|
6
|
-
} from "./
|
|
3
|
+
} from "./XHA6B6L2.jsx";
|
|
7
4
|
import {
|
|
8
5
|
createSplitProps
|
|
9
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -11,14 +8,15 @@ import {
|
|
|
11
8
|
ark
|
|
12
9
|
} from "./UFYZ7HLU.jsx";
|
|
13
10
|
import {
|
|
11
|
+
runIfFn,
|
|
14
12
|
useEnvironmentContext
|
|
15
|
-
} from "./
|
|
13
|
+
} from "./BPYAMTER.jsx";
|
|
16
14
|
import {
|
|
17
15
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
16
|
+
} from "./RCXMZN3G.jsx";
|
|
19
17
|
import {
|
|
20
18
|
createContext
|
|
21
|
-
} from "./
|
|
19
|
+
} from "./TVCIHLER.jsx";
|
|
22
20
|
import {
|
|
23
21
|
__export
|
|
24
22
|
} from "./7IUG3E2V.jsx";
|
|
@@ -45,15 +43,36 @@ import { anatomy } from "@zag-js/checkbox";
|
|
|
45
43
|
var checkboxAnatomy = anatomy.extendWith("group");
|
|
46
44
|
|
|
47
45
|
// src/components/checkbox/use-checkbox-group.ts
|
|
48
|
-
import { createMemo } from "solid-js";
|
|
46
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
47
|
+
|
|
48
|
+
// src/utils/use-controllable-state.ts
|
|
49
|
+
import { createMemo, createSignal, untrack } from "solid-js";
|
|
50
|
+
function useControllableState(props) {
|
|
51
|
+
const [uncontrolledValue, setUncontrolledValue] = createSignal(runIfFn(props.defaultValue));
|
|
52
|
+
const controlled = createMemo(() => props.value?.() !== void 0);
|
|
53
|
+
const currentValue = createMemo(() => controlled() ? props.value?.() : uncontrolledValue());
|
|
54
|
+
const setValue = (next) => {
|
|
55
|
+
untrack(() => {
|
|
56
|
+
const nextValue = runIfFn(next, currentValue());
|
|
57
|
+
if (controlled()) {
|
|
58
|
+
return props.onChange?.(nextValue);
|
|
59
|
+
}
|
|
60
|
+
setUncontrolledValue(nextValue);
|
|
61
|
+
return props.onChange?.(nextValue);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
return [currentValue, setValue];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/components/checkbox/use-checkbox-group.ts
|
|
49
68
|
function useCheckboxGroup(props = {}) {
|
|
50
|
-
const interactive =
|
|
69
|
+
const interactive = createMemo2(() => !(props.disabled || props.readOnly));
|
|
51
70
|
const [value, setValue] = useControllableState({
|
|
52
71
|
value: props.value,
|
|
53
72
|
defaultValue: props.defaultValue || [],
|
|
54
73
|
onChange: props.onValueChange
|
|
55
74
|
});
|
|
56
|
-
return
|
|
75
|
+
return createMemo2(() => {
|
|
57
76
|
const isChecked = (val) => {
|
|
58
77
|
return value().some((v) => String(v) === String(val));
|
|
59
78
|
};
|
|
@@ -157,17 +176,17 @@ import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
|
157
176
|
// src/components/checkbox/use-checkbox.ts
|
|
158
177
|
import * as checkbox from "@zag-js/checkbox";
|
|
159
178
|
import { mergeProps as mergeProps5, normalizeProps, useMachine } from "@zag-js/solid";
|
|
160
|
-
import { createMemo as
|
|
179
|
+
import { createMemo as createMemo3, createUniqueId } from "solid-js";
|
|
161
180
|
var useCheckbox = (ownProps = {}) => {
|
|
162
181
|
const checkboxGroup = useCheckboxGroupContext();
|
|
163
|
-
const props =
|
|
182
|
+
const props = createMemo3(() => {
|
|
164
183
|
return mergeProps5(ownProps, checkboxGroup?.().getItemProps({ value: ownProps.value }) ?? {});
|
|
165
184
|
}, [ownProps, checkboxGroup]);
|
|
185
|
+
const id = createUniqueId();
|
|
166
186
|
const locale = useLocaleContext();
|
|
167
187
|
const environment = useEnvironmentContext();
|
|
168
|
-
const id = createUniqueId();
|
|
169
188
|
const field = useFieldContext();
|
|
170
|
-
const
|
|
189
|
+
const machineProps = createMemo3(() => ({
|
|
171
190
|
id,
|
|
172
191
|
ids: {
|
|
173
192
|
label: field?.().ids.label,
|
|
@@ -179,11 +198,10 @@ var useCheckbox = (ownProps = {}) => {
|
|
|
179
198
|
required: field?.().required,
|
|
180
199
|
dir: locale().dir,
|
|
181
200
|
getRootNode: environment().getRootNode,
|
|
182
|
-
checked: props().defaultChecked,
|
|
183
201
|
...props()
|
|
184
202
|
}));
|
|
185
|
-
const
|
|
186
|
-
return
|
|
203
|
+
const service = useMachine(checkbox.machine, machineProps);
|
|
204
|
+
return createMemo3(() => checkbox.connect(service, normalizeProps));
|
|
187
205
|
};
|
|
188
206
|
|
|
189
207
|
// src/components/checkbox/checkbox-root.tsx
|
|
@@ -1,13 +1,13 @@
|
|
|
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';
|
|
10
|
-
import {
|
|
10
|
+
import { createEffect, onMount, createUniqueId, createMemo, Show } from 'solid-js';
|
|
11
11
|
import * as menu from '@zag-js/menu';
|
|
12
12
|
export { anatomy } from '@zag-js/menu';
|
|
13
13
|
|
|
@@ -199,22 +199,20 @@ var MenuRadioItemGroup = (props) => {
|
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
201
|
var useMenu = (props = {}) => {
|
|
202
|
+
const id = createUniqueId();
|
|
202
203
|
const locale = useLocaleContext();
|
|
203
204
|
const environment = useEnvironmentContext();
|
|
204
|
-
const
|
|
205
|
-
const context = createMemo(() => ({
|
|
205
|
+
const machineProps = createMemo(() => ({
|
|
206
206
|
id,
|
|
207
207
|
dir: locale().dir,
|
|
208
208
|
getRootNode: environment().getRootNode,
|
|
209
|
-
open: props.defaultOpen,
|
|
210
|
-
"open.controlled": props.open !== void 0,
|
|
211
209
|
...props
|
|
212
210
|
}));
|
|
213
|
-
const
|
|
214
|
-
const api = createMemo(() => menu.connect(
|
|
211
|
+
const service = useMachine(menu.machine, machineProps);
|
|
212
|
+
const api = createMemo(() => menu.connect(service, normalizeProps));
|
|
215
213
|
return {
|
|
216
214
|
api,
|
|
217
|
-
|
|
215
|
+
service
|
|
218
216
|
};
|
|
219
217
|
};
|
|
220
218
|
|
|
@@ -235,16 +233,16 @@ var [MenuTriggerItemProvider, useMenuTriggerItemContext] = createContext({
|
|
|
235
233
|
// src/components/menu/menu-root.tsx
|
|
236
234
|
var MenuRoot = (props) => {
|
|
237
235
|
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
238
|
-
const [useMenuProps, localProps] = createSplitProps()(menuProps, ["anchorPoint", "aria-label", "closeOnSelect", "composite", "defaultOpen", "highlightedValue", "id", "ids", "loopFocus", "onEscapeKeyDown", "onFocusOutside", "onHighlightChange", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "onSelect", "open", "
|
|
236
|
+
const [useMenuProps, localProps] = createSplitProps()(menuProps, ["anchorPoint", "aria-label", "closeOnSelect", "composite", "defaultHighlightedValue", "defaultOpen", "highlightedValue", "id", "ids", "loopFocus", "navigate", "onEscapeKeyDown", "onFocusOutside", "onHighlightChange", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "onSelect", "open", "positioning", "typeahead"]);
|
|
239
237
|
const parentApi = useMenuContext();
|
|
240
238
|
const parentMachine = useMenuMachineContext();
|
|
241
239
|
const menu2 = useMenu(useMenuProps);
|
|
242
240
|
const presenceApi = usePresence(mergeProps(presenceProps, () => ({
|
|
243
241
|
present: menu2.api().open
|
|
244
242
|
})));
|
|
245
|
-
|
|
243
|
+
onMount(() => {
|
|
246
244
|
if (!parentMachine) return;
|
|
247
|
-
parentApi?.().setChild(menu2.
|
|
245
|
+
parentApi?.().setChild(menu2.service);
|
|
248
246
|
menu2.api().setParent(parentMachine);
|
|
249
247
|
});
|
|
250
248
|
const triggerItemContext = () => parentApi?.().getTriggerItemProps(menu2.api());
|
|
@@ -253,7 +251,7 @@ var MenuRoot = (props) => {
|
|
|
253
251
|
get children() {
|
|
254
252
|
return createComponent(MenuMachineProvider, {
|
|
255
253
|
get value() {
|
|
256
|
-
return menu2.
|
|
254
|
+
return menu2.service;
|
|
257
255
|
},
|
|
258
256
|
get children() {
|
|
259
257
|
return createComponent(MenuProvider, {
|
|
@@ -283,7 +281,7 @@ var MenuRootProvider = (props) => {
|
|
|
283
281
|
})));
|
|
284
282
|
createEffect(() => {
|
|
285
283
|
if (!parentMachine) return;
|
|
286
|
-
parentApi?.().setChild(menuProps.value.
|
|
284
|
+
parentApi?.().setChild(menuProps.value.service);
|
|
287
285
|
menuProps.value.api().setParent(parentMachine);
|
|
288
286
|
});
|
|
289
287
|
const triggerItemContext = () => parentApi?.().getTriggerItemProps(menuProps.value.api());
|
|
@@ -292,7 +290,7 @@ var MenuRootProvider = (props) => {
|
|
|
292
290
|
get children() {
|
|
293
291
|
return createComponent(MenuMachineProvider, {
|
|
294
292
|
get value() {
|
|
295
|
-
return menuProps.value.
|
|
293
|
+
return menuProps.value.service;
|
|
296
294
|
},
|
|
297
295
|
get children() {
|
|
298
296
|
return createComponent(MenuProvider, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
|
-
import { useEnvironmentContext } from './
|
|
4
|
-
import { createContext } from './
|
|
3
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
4
|
+
import { createContext } from './TROPIN4C.js';
|
|
5
5
|
import { __export } from './ESLJRKWD.js';
|
|
6
6
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
7
7
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -17,8 +17,9 @@ var [TimerProvider, useTimerContext] = createContext({
|
|
|
17
17
|
|
|
18
18
|
// src/components/timer/timer-action-trigger.tsx
|
|
19
19
|
var TimerActionTrigger = (props) => {
|
|
20
|
+
const [actionTriggerProps, localProps] = createSplitProps()(props, ["action"]);
|
|
20
21
|
const timer2 = useTimerContext();
|
|
21
|
-
const mergedProps = mergeProps(() => timer2().getActionTriggerProps(
|
|
22
|
+
const mergedProps = mergeProps(() => timer2().getActionTriggerProps(actionTriggerProps), localProps);
|
|
22
23
|
return createComponent(ark.button, mergedProps);
|
|
23
24
|
};
|
|
24
25
|
var TimerArea = (props) => {
|
|
@@ -45,15 +46,15 @@ var TimerItem = (props) => {
|
|
|
45
46
|
}));
|
|
46
47
|
};
|
|
47
48
|
var useTimer = (props = {}) => {
|
|
48
|
-
const env = useEnvironmentContext();
|
|
49
49
|
const id = createUniqueId();
|
|
50
|
-
const
|
|
50
|
+
const environment = useEnvironmentContext();
|
|
51
|
+
const machineProps = createMemo(() => ({
|
|
51
52
|
id,
|
|
52
|
-
getRootNode:
|
|
53
|
+
getRootNode: environment().getRootNode,
|
|
53
54
|
...props
|
|
54
55
|
}));
|
|
55
|
-
const
|
|
56
|
-
return createMemo(() => timer.connect(
|
|
56
|
+
const service = useMachine(timer.machine, machineProps);
|
|
57
|
+
return createMemo(() => timer.connect(service, normalizeProps));
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
// src/components/timer/timer-root.tsx
|
|
@@ -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';
|
|
@@ -11,12 +11,10 @@ import { anatomy } from '@zag-js/radio-group';
|
|
|
11
11
|
import { createMemo, createUniqueId } from 'solid-js';
|
|
12
12
|
|
|
13
13
|
// src/components/segment-group/use-segment-group-context.ts
|
|
14
|
-
var [SegmentGroupProvider, useSegmentGroupContext] = createContext(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
);
|
|
14
|
+
var [SegmentGroupProvider, useSegmentGroupContext] = createContext({
|
|
15
|
+
hookName: "useSegmentGroupContext",
|
|
16
|
+
providerName: "<SegmentGroupProvider />"
|
|
17
|
+
});
|
|
20
18
|
|
|
21
19
|
// src/components/segment-group/segment-group-context.tsx
|
|
22
20
|
var SegmentGroupContext = (props) => props.children(useSegmentGroupContext());
|
|
@@ -87,18 +85,17 @@ var SegmentGroupLabel = (props) => {
|
|
|
87
85
|
return createComponent(ark.label, mergedProps);
|
|
88
86
|
};
|
|
89
87
|
var useSegmentGroup = (props = {}) => {
|
|
88
|
+
const id = createUniqueId();
|
|
90
89
|
const locale = useLocaleContext();
|
|
91
90
|
const environment = useEnvironmentContext();
|
|
92
|
-
const
|
|
93
|
-
const context = createMemo(() => ({
|
|
91
|
+
const machineProps = createMemo(() => ({
|
|
94
92
|
id,
|
|
95
93
|
dir: locale().dir,
|
|
96
94
|
getRootNode: environment().getRootNode,
|
|
97
|
-
value: props.defaultValue,
|
|
98
95
|
...props
|
|
99
96
|
}));
|
|
100
|
-
const
|
|
101
|
-
return createMemo(() => segmentGroup.connect(
|
|
97
|
+
const service = useMachine(segmentGroup.machine, machineProps);
|
|
98
|
+
return createMemo(() => segmentGroup.connect(service, normalizeProps));
|
|
102
99
|
};
|
|
103
100
|
|
|
104
101
|
// src/components/segment-group/segment-group-root.tsx
|
|
@@ -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";
|
|
@@ -47,10 +47,7 @@ var CarouselControl = (props) => {
|
|
|
47
47
|
// src/components/carousel/carousel-indicator.tsx
|
|
48
48
|
import { mergeProps as mergeProps3 } from "@zag-js/solid";
|
|
49
49
|
var CarouselIndicator = (props) => {
|
|
50
|
-
const [indicatorProps, localProps] = createSplitProps()(props, [
|
|
51
|
-
"index",
|
|
52
|
-
"readOnly"
|
|
53
|
-
]);
|
|
50
|
+
const [indicatorProps, localProps] = createSplitProps()(props, ["index", "readOnly"]);
|
|
54
51
|
const api = useCarouselContext();
|
|
55
52
|
const mergedProps = mergeProps3(() => api().getIndicatorProps(indicatorProps), localProps);
|
|
56
53
|
return <ark.button {...mergedProps} />;
|
|
@@ -104,19 +101,18 @@ import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
|
104
101
|
import * as carousel from "@zag-js/carousel";
|
|
105
102
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
106
103
|
import { createMemo, createUniqueId } from "solid-js";
|
|
107
|
-
var useCarousel = (props
|
|
104
|
+
var useCarousel = (props) => {
|
|
105
|
+
const id = createUniqueId();
|
|
108
106
|
const locale = useLocaleContext();
|
|
109
107
|
const environment = useEnvironmentContext();
|
|
110
|
-
const
|
|
111
|
-
const context = createMemo(() => ({
|
|
108
|
+
const machineProps = createMemo(() => ({
|
|
112
109
|
id,
|
|
113
110
|
dir: locale().dir,
|
|
114
111
|
getRootNode: environment().getRootNode,
|
|
115
|
-
index: props.defaultPage,
|
|
116
112
|
...props
|
|
117
113
|
}));
|
|
118
|
-
const
|
|
119
|
-
return createMemo(() => carousel.connect(
|
|
114
|
+
const service = useMachine(carousel.machine, machineProps);
|
|
115
|
+
return createMemo(() => carousel.connect(service, normalizeProps));
|
|
120
116
|
};
|
|
121
117
|
|
|
122
118
|
// src/components/carousel/carousel-root.tsx
|