@ark-ui/solid 4.10.2 → 5.1.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/{ATMUKDFF.js → 26K66CRD.js} +11 -12
- package/dist/chunk/{U3XJZI3X.jsx → 2LZKFXR5.jsx} +19 -26
- package/dist/chunk/{H4RSHLA7.jsx → 3FYZXSQZ.jsx} +14 -15
- package/dist/chunk/{MQDN267C.jsx → 3VO34CGN.jsx} +13 -13
- package/dist/chunk/{YV5BACLX.js → 46YZVE6D.js} +12 -11
- package/dist/chunk/{MBQQASZE.js → 4QFED3VE.js} +12 -12
- package/dist/chunk/{SWUA2VFC.js → 4UD3WT4B.js} +10 -12
- package/dist/chunk/{IQJBNZOX.jsx → 5T73FAJY.jsx} +13 -8
- package/dist/chunk/{IZC6PKGT.jsx → 65SQKHCI.jsx} +15 -16
- package/dist/chunk/{WM2IZOYM.jsx → 72UBZBQP.jsx} +53 -82
- package/dist/chunk/{F3QPTRGW.jsx → 7IHVZWMT.jsx} +32 -36
- package/dist/chunk/{X34KVQNW.js → 7KGMTGCS.js} +3 -2
- package/dist/chunk/{34MDPAG6.js → 7RR233CD.js} +30 -12
- package/dist/chunk/{7S43DIPW.js → 7S7524Q3.js} +15 -26
- package/dist/chunk/{E72NMPSK.jsx → A4744EEE.jsx} +9 -14
- package/dist/chunk/{BY62F4IV.jsx → AD2EIGNX.jsx} +13 -13
- package/dist/chunk/{3HMZSTYX.js → B246J3FR.js} +10 -11
- package/dist/chunk/{K54W24N6.jsx → B2KZ5VSW.jsx} +15 -17
- package/dist/chunk/{2GATVLPK.js → C4PG7WMU.js} +9 -9
- package/dist/chunk/{3LRXHWW2.js → C745EVQO.js} +32 -27
- package/dist/chunk/{TOVWS5LG.jsx → CA4LWAR2.jsx} +20 -26
- package/dist/chunk/{WKVZFHUH.jsx → CABZW4BQ.jsx} +19 -27
- package/dist/chunk/{Y4LH2CR6.jsx → CGBS64C2.jsx} +13 -13
- package/dist/chunk/{2HTNQLGP.jsx → CHLRHJV2.jsx} +13 -14
- package/dist/chunk/{SJSLQDBZ.jsx → CSDXHOTM.jsx} +15 -20
- package/dist/chunk/{5O4RWSWO.jsx → D2Z5BEON.jsx} +3 -3
- package/dist/chunk/{CPMYIT5J.jsx → D6BC5RCX.jsx} +16 -14
- package/dist/chunk/{6MXKM4GA.js → E4A5DGUC.js} +12 -12
- package/dist/chunk/{2J42A7KM.js → E5BXBABH.js} +2 -2
- package/dist/chunk/{U7SPBSDD.jsx → EEG3DZXG.jsx} +13 -15
- package/dist/chunk/{M2FICVVI.js → EI7I4DR6.js} +12 -13
- package/dist/chunk/{5CYHETDY.js → EWPKE75H.js} +10 -9
- package/dist/chunk/{2W32Z6JZ.js → F5GOQFKX.js} +12 -12
- package/dist/chunk/{CIPYIXIW.js → F7JP3DGZ.js} +11 -12
- package/dist/chunk/{PRMWTLUY.jsx → FUS6GOJL.jsx} +13 -11
- package/dist/chunk/{ASCGEGA5.jsx → GCDTOEZN.jsx} +16 -17
- package/dist/chunk/{G2WIACWP.js → GJSXT6PD.js} +11 -11
- package/dist/chunk/{LVPQ6GR4.js → GMNTJ5KE.js} +9 -9
- package/dist/chunk/{WPFSEVTX.js → I2RQ2435.js} +14 -16
- package/dist/chunk/{AIQFNVCU.jsx → IKA3JJFV.jsx} +14 -20
- package/dist/chunk/{3O5VTKDF.jsx → IYMTFLF3.jsx} +20 -33
- package/dist/chunk/{EHJDQTTW.jsx → JRMTU7C7.jsx} +3 -16
- package/dist/chunk/{VARNCRUN.js → JUYBJNX6.js} +19 -20
- package/dist/chunk/{FNEB2RAF.js → JWXGONCE.js} +12 -12
- package/dist/chunk/{SN5TXTB6.jsx → JZ7ZQZT4.jsx} +17 -54
- package/dist/chunk/{WQQVH7YG.jsx → KBHIJYMD.jsx} +34 -19
- package/dist/chunk/{MMS6MJ72.js → KFJJXGK6.js} +11 -13
- package/dist/chunk/{X3BMEEJH.js → KVVYU5Z3.js} +34 -14
- package/dist/chunk/{T4NRAKVA.jsx → KZCXBFHA.jsx} +14 -12
- package/dist/chunk/{5EVN6V64.js → LK5627GR.js} +15 -17
- package/dist/chunk/{5JS7LFUQ.js → LTZUX6NG.js} +12 -10
- package/dist/chunk/{NK4T7LIZ.jsx → MA35L6TV.jsx} +12 -13
- package/dist/chunk/{ZC6KWJ4T.jsx → MDJAL2LV.jsx} +12 -14
- package/dist/chunk/{CCA5XJM6.jsx → MERJALY6.jsx} +23 -38
- package/dist/chunk/MOG4V2NQ.jsx +15 -0
- package/dist/chunk/{2H4WHODR.js → MSLAT5GQ.js} +10 -12
- package/dist/chunk/{5ONYCKM3.jsx → NEBB7COJ.jsx} +1 -1
- package/dist/chunk/{DU4TY3XA.jsx → NEYCBIOW.jsx} +16 -17
- package/dist/chunk/{DXYB7RYX.js → NF3HZO6T.js} +12 -10
- package/dist/chunk/{5XD5ZSBX.js → NZEL4233.js} +15 -18
- package/dist/chunk/OAPCRIL5.js +8 -0
- package/dist/chunk/{LCESUDZB.js → OY4ARTMM.js} +7 -14
- package/dist/chunk/{Q7NPTAJI.js → QBFJVUX3.js} +10 -10
- package/dist/chunk/{HPDOBQ3V.js → QEMQBM6W.js} +1 -1
- package/dist/chunk/{L7OSYHVR.js → QFAL6GWC.js} +1 -1
- package/dist/chunk/{34OZO53S.js → QTSWXPKO.js} +12 -14
- package/dist/chunk/{JVXNYKNA.js → R5NPBVOA.js} +11 -12
- package/dist/chunk/{3QQZKR3F.jsx → RCXMZN3G.jsx} +1 -1
- package/dist/chunk/{5SRZ3YYC.js → ROXCI3ZP.js} +10 -10
- package/dist/chunk/{GZVCPLKK.jsx → RY6GW37O.jsx} +14 -12
- package/dist/chunk/SDD2HKR3.js +71 -0
- package/dist/chunk/{RAEDLHD3.js → TKGOCHK5.js} +14 -16
- package/dist/chunk/{I5UG2QUO.js → TROPIN4C.js} +1 -7
- package/dist/chunk/{AX5SMQMA.js → TRUQMF25.js} +19 -19
- package/dist/chunk/{NMGUCD2L.jsx → TVCIHLER.jsx} +2 -11
- package/dist/chunk/{YCYZZGN2.jsx → TZDLUIKR.jsx} +14 -10
- package/dist/chunk/{QGV2SUTQ.jsx → U3J33PVO.jsx} +21 -21
- package/dist/chunk/{P7I44WC4.jsx → UCYPIMZC.jsx} +21 -22
- package/dist/chunk/{GXWVYON6.js → UODFV2GS.js} +11 -12
- package/dist/chunk/{7YIHAT7J.jsx → V564AMKR.jsx} +39 -18
- package/dist/chunk/{PSLLOEMD.js → VLQWCBZM.js} +16 -29
- package/dist/chunk/{3WGLTS6O.js → VNK2NPTS.js} +10 -10
- package/dist/chunk/{WIVXL7HJ.jsx → WDXH3NHK.jsx} +14 -15
- package/dist/chunk/{QQUR4MWN.js → WGFUGTWA.js} +18 -19
- package/dist/chunk/{B7LE23PE.jsx → WNIFZKTJ.jsx} +13 -14
- package/dist/chunk/{IOTZAUDA.jsx → WUTUKX4C.jsx} +1 -1
- package/dist/chunk/{XUVXUPEH.js → XN3MSM3M.js} +14 -18
- package/dist/chunk/{MYMGOYXH.js → XR4WJDUT.js} +2 -2
- package/dist/chunk/{DOPROT6M.jsx → XZZ6TULR.jsx} +15 -10
- package/dist/chunk/{QZYE5W7T.jsx → Y7EY3OTU.jsx} +16 -21
- package/dist/chunk/{MRQ2UYM4.jsx → YIVTZ7BP.jsx} +12 -11
- package/dist/chunk/{QODB3C3M.js → YMMMHJJS.js} +3 -3
- package/dist/chunk/{HU7FZMJI.jsx → YPH7FBUN.jsx} +14 -16
- package/dist/chunk/{TC2QHQ47.jsx → Z254KIAA.jsx} +22 -44
- package/dist/chunk/{W43X4SNE.js → Z2TDX72A.js} +9 -8
- package/dist/chunk/{6YQ3EF2J.js → ZGXZNLX2.js} +12 -13
- package/dist/chunk/{R6RE56DG.jsx → ZJM2GZS7.jsx} +4 -1
- package/dist/chunk/{UGKLUHKU.js → ZOGAU3AQ.js} +11 -13
- package/dist/chunk/{7PKUSZKY.jsx → ZPSBF7S2.jsx} +14 -11
- package/dist/chunk/{RZBYC7DR.jsx → ZYF7GVNI.jsx} +21 -27
- package/dist/components/accordion/index.d.ts +4 -9
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +7 -7
- package/dist/components/avatar/index.d.ts +4 -4
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +5 -5
- package/dist/components/carousel/index.d.ts +4 -9
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.jsx +5 -5
- package/dist/components/checkbox/index.d.ts +5 -10
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +8 -8
- package/dist/components/clipboard/index.d.ts +4 -4
- package/dist/components/clipboard/index.js +1 -1
- package/dist/components/clipboard/index.jsx +5 -5
- package/dist/components/collapsible/index.d.ts +4 -9
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/index.jsx +6 -6
- 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 +6 -16
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +10 -9
- package/dist/components/combobox/index.d.ts +5 -15
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/combobox/index.jsx +12 -11
- package/dist/components/date-picker/index.d.ts +6 -18
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.jsx +7 -7
- package/dist/components/dialog/index.d.ts +5 -10
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.jsx +7 -7
- package/dist/components/editable/index.d.ts +4 -14
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +8 -7
- package/dist/components/factory.d.ts +1 -1
- package/dist/components/field/index.d.ts +4 -4
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +5 -3
- package/dist/components/fieldset/index.d.ts +4 -4
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/fieldset/index.jsx +3 -2
- package/dist/components/file-upload/index.d.ts +4 -4
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +8 -7
- package/dist/components/focus-trap/index.d.ts +2 -2
- package/dist/components/format/index.js +1 -1
- package/dist/components/format/index.jsx +4 -4
- package/dist/components/frame/index.d.ts +1 -1
- package/dist/components/frame/index.js +1 -1
- package/dist/components/frame/index.jsx +4 -4
- package/dist/components/highlight/index.d.ts +2 -2
- package/dist/components/highlight/index.js +1 -1
- package/dist/components/highlight/index.jsx +2 -1
- package/dist/components/hover-card/index.d.ts +5 -10
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/index.jsx +7 -7
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +46 -46
- package/dist/components/index.jsx +289 -290
- package/dist/components/menu/index.d.ts +6 -11
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +7 -7
- package/dist/components/number-input/index.d.ts +4 -9
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/index.jsx +8 -7
- package/dist/components/pagination/index.d.ts +4 -9
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.jsx +5 -5
- package/dist/components/pin-input/index.d.ts +4 -9
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +8 -7
- package/dist/components/popover/index.d.ts +5 -10
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.jsx +7 -7
- package/dist/components/presence/index.d.ts +3 -3
- package/dist/components/presence/index.js +1 -1
- package/dist/components/presence/index.jsx +4 -3
- package/dist/components/progress/index.d.ts +4 -9
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.jsx +5 -5
- package/dist/components/qr-code/index.d.ts +4 -9
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/index.jsx +5 -5
- package/dist/components/radio-group/index.d.ts +4 -9
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/index.jsx +5 -5
- package/dist/components/rating-group/index.d.ts +6 -11
- package/dist/components/rating-group/index.js +1 -1
- package/dist/components/rating-group/index.jsx +8 -7
- package/dist/components/segment-group/index.d.ts +5 -10
- package/dist/components/segment-group/index.js +1 -1
- package/dist/components/segment-group/index.jsx +5 -5
- package/dist/components/select/index.d.ts +5 -15
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.jsx +12 -11
- package/dist/components/signature-pad/index.d.ts +4 -4
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +8 -7
- package/dist/components/slider/index.d.ts +4 -9
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.jsx +5 -5
- package/dist/components/splitter/index.d.ts +4 -9
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/splitter/index.jsx +5 -5
- package/dist/components/steps/index.d.ts +8 -12
- package/dist/components/steps/index.js +1 -1
- package/dist/components/steps/index.jsx +5 -5
- package/dist/components/switch/index.d.ts +4 -9
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.jsx +8 -7
- package/dist/components/tabs/index.d.ts +4 -9
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.jsx +7 -7
- package/dist/components/tags-input/index.d.ts +4 -9
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/index.jsx +8 -7
- package/dist/components/time-picker/index.d.ts +5 -15
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/index.jsx +7 -7
- package/dist/components/timer/index.d.ts +4 -4
- package/dist/components/timer/index.js +1 -1
- package/dist/components/timer/index.jsx +5 -5
- package/dist/components/toast/index.d.ts +6 -7
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.jsx +6 -2
- package/dist/components/toggle/index.d.ts +7 -36
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/index.jsx +2 -4
- package/dist/components/toggle-group/index.d.ts +4 -9
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/index.jsx +5 -5
- package/dist/components/tooltip/index.d.ts +5 -10
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.jsx +7 -7
- package/dist/components/tour/index.d.ts +6 -6
- package/dist/components/tour/index.js +1 -1
- package/dist/components/tour/index.jsx +7 -7
- package/dist/components/tree-view/index.d.ts +7 -17
- package/dist/components/tree-view/index.js +2 -2
- package/dist/components/tree-view/index.jsx +9 -9
- package/dist/index.d.ts +3 -2
- package/dist/index.js +48 -48
- package/dist/index.jsx +290 -291
- package/dist/providers/environment/index.js +1 -1
- package/dist/providers/environment/index.jsx +2 -2
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.jsx +4 -4
- package/dist/providers/locale/index.js +1 -1
- package/dist/providers/locale/index.jsx +2 -2
- package/dist/types-CxryXVkR.d.ts +8 -0
- package/dist/{use-presence-Ct1onT3-.d.ts → use-presence-B6QV_j94.d.ts} +3 -3
- 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/JHG4EID2.jsx +0 -233
- package/dist/chunk/MV3KTL7M.js +0 -107
- package/dist/types-B277wCdv.d.ts +0 -5
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,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './OY4ARTMM.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 './YMMMHJJS.js';
|
|
5
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
6
|
+
import { createContext } from './TROPIN4C.js';
|
|
7
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
7
8
|
import { __export } from './ESLJRKWD.js';
|
|
8
9
|
import { createComponent } from 'solid-js/web';
|
|
9
10
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -57,26 +58,24 @@ var HoverCardPositioner = (props) => {
|
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
};
|
|
60
|
-
var useHoverCard = (props
|
|
61
|
+
var useHoverCard = (props) => {
|
|
61
62
|
const locale = useLocaleContext();
|
|
62
63
|
const environment = useEnvironmentContext();
|
|
63
64
|
const id = createUniqueId();
|
|
64
|
-
const
|
|
65
|
+
const machineProps = createMemo(() => ({
|
|
65
66
|
id,
|
|
66
67
|
dir: locale().dir,
|
|
67
68
|
getRootNode: environment().getRootNode,
|
|
68
|
-
|
|
69
|
-
"open.controlled": props.open !== void 0,
|
|
70
|
-
...props
|
|
69
|
+
...runIfFn(props)
|
|
71
70
|
}));
|
|
72
|
-
const
|
|
73
|
-
return createMemo(() => hoverCard.connect(
|
|
71
|
+
const service = useMachine(hoverCard.machine, machineProps);
|
|
72
|
+
return createMemo(() => hoverCard.connect(service, normalizeProps));
|
|
74
73
|
};
|
|
75
74
|
|
|
76
75
|
// src/components/hover-card/hover-card-root.tsx
|
|
77
76
|
var HoverCardRoot = (props) => {
|
|
78
77
|
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
79
|
-
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ["closeDelay", "defaultOpen", "id", "ids", "onOpenChange", "open", "openDelay", "positioning"]);
|
|
78
|
+
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ["closeDelay", "defaultOpen", "id", "ids", "onFocusOutside", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "open", "openDelay", "positioning"]);
|
|
80
79
|
const api = useHoverCard(useHoverCardProps);
|
|
81
80
|
const apiPresence = usePresence(mergeProps(presenceProps, () => ({
|
|
82
81
|
present: api().open
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collapsible_exports
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./WNIFZKTJ.jsx";
|
|
4
4
|
import {
|
|
5
5
|
RenderStrategyProvider,
|
|
6
6
|
splitRenderStrategyProps,
|
|
7
7
|
useRenderStrategyContext
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./NEBB7COJ.jsx";
|
|
9
9
|
import {
|
|
10
10
|
createSplitProps
|
|
11
11
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -14,13 +14,16 @@ import {
|
|
|
14
14
|
} from "./UFYZ7HLU.jsx";
|
|
15
15
|
import {
|
|
16
16
|
useEnvironmentContext
|
|
17
|
-
} from "./
|
|
17
|
+
} from "./D2Z5BEON.jsx";
|
|
18
18
|
import {
|
|
19
19
|
useLocaleContext
|
|
20
|
-
} from "./
|
|
20
|
+
} from "./RCXMZN3G.jsx";
|
|
21
21
|
import {
|
|
22
22
|
createContext
|
|
23
|
-
} from "./
|
|
23
|
+
} from "./TVCIHLER.jsx";
|
|
24
|
+
import {
|
|
25
|
+
runIfFn
|
|
26
|
+
} from "./KGOB2IMX.jsx";
|
|
24
27
|
import {
|
|
25
28
|
__export
|
|
26
29
|
} from "./7IUG3E2V.jsx";
|
|
@@ -66,10 +69,7 @@ var TreeViewBranchContent = (props) => {
|
|
|
66
69
|
const nodeProps = useTreeViewNodePropsContext();
|
|
67
70
|
const branchContentProps = createMemo2(() => {
|
|
68
71
|
const contentProps = treeView2().getBranchContentProps(nodeProps);
|
|
69
|
-
const [, ownProps] = splitVisibilityProps(contentProps, [
|
|
70
|
-
"hidden",
|
|
71
|
-
"data-state"
|
|
72
|
-
]);
|
|
72
|
+
const [, ownProps] = splitVisibilityProps(contentProps, ["hidden", "data-state"]);
|
|
73
73
|
return ownProps;
|
|
74
74
|
});
|
|
75
75
|
const mergedProps = mergeProps2(() => branchContentProps(), props);
|
|
@@ -160,12 +160,10 @@ var TreeViewLabel = (props) => {
|
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
// src/components/tree-view/use-tree-view-node-context.ts
|
|
163
|
-
var [TreeViewNodeProvider, useTreeViewNodeContext] = createContext(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
);
|
|
163
|
+
var [TreeViewNodeProvider, useTreeViewNodeContext] = createContext({
|
|
164
|
+
hookName: "useTreeViewNodeContext",
|
|
165
|
+
providerName: "<TreeViewNodeProvider />"
|
|
166
|
+
});
|
|
169
167
|
|
|
170
168
|
// src/components/tree-view/tree-view-node-context.ts
|
|
171
169
|
var TreeViewNodeContext = (props) => props.children(useTreeViewNodeContext());
|
|
@@ -184,19 +182,17 @@ import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
|
184
182
|
import * as treeView from "@zag-js/tree-view";
|
|
185
183
|
import { createMemo as createMemo3, createUniqueId } from "solid-js";
|
|
186
184
|
var useTreeView = (props) => {
|
|
185
|
+
const id = createUniqueId();
|
|
187
186
|
const locale = useLocaleContext();
|
|
188
187
|
const environment = useEnvironmentContext();
|
|
189
|
-
const
|
|
190
|
-
const context = createMemo3(() => ({
|
|
188
|
+
const machineProps = createMemo3(() => ({
|
|
191
189
|
id,
|
|
192
190
|
dir: locale().dir,
|
|
193
191
|
getRootNode: environment().getRootNode,
|
|
194
|
-
|
|
195
|
-
expandedValue: props.defaultExpandedValue,
|
|
196
|
-
...props
|
|
192
|
+
...runIfFn(props)
|
|
197
193
|
}));
|
|
198
|
-
const
|
|
199
|
-
return createMemo3(() => treeView.connect(
|
|
194
|
+
const service = useMachine(treeView.machine, machineProps);
|
|
195
|
+
return createMemo3(() => treeView.connect(service, normalizeProps));
|
|
200
196
|
};
|
|
201
197
|
|
|
202
198
|
// src/components/tree-view/tree-view-root.tsx
|
|
@@ -231,10 +227,7 @@ var TreeViewRoot = (props) => {
|
|
|
231
227
|
import { mergeProps as mergeProps13 } from "@zag-js/solid";
|
|
232
228
|
var TreeViewRootProvider = (props) => {
|
|
233
229
|
const [renderStrategyProps, treeViewProps] = splitRenderStrategyProps(props);
|
|
234
|
-
const [{ value: treeView2 }, localProps] = createSplitProps()(
|
|
235
|
-
treeViewProps,
|
|
236
|
-
["value"]
|
|
237
|
-
);
|
|
230
|
+
const [{ value: treeView2 }, localProps] = createSplitProps()(treeViewProps, ["value"]);
|
|
238
231
|
const mergedProps = mergeProps13(() => treeView2().getRootProps(), localProps);
|
|
239
232
|
return <TreeViewProvider value={treeView2}>
|
|
240
233
|
<RenderStrategyProvider value={renderStrategyProps}>
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./A4744EEE.jsx";
|
|
7
7
|
import {
|
|
8
8
|
createSplitProps
|
|
9
9
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -12,13 +12,16 @@ import {
|
|
|
12
12
|
} from "./UFYZ7HLU.jsx";
|
|
13
13
|
import {
|
|
14
14
|
useEnvironmentContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./D2Z5BEON.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./RCXMZN3G.jsx";
|
|
19
19
|
import {
|
|
20
20
|
createContext
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./TVCIHLER.jsx";
|
|
22
|
+
import {
|
|
23
|
+
runIfFn
|
|
24
|
+
} from "./KGOB2IMX.jsx";
|
|
22
25
|
import {
|
|
23
26
|
__export
|
|
24
27
|
} from "./7IUG3E2V.jsx";
|
|
@@ -117,20 +120,18 @@ import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
|
117
120
|
import * as popover from "@zag-js/popover";
|
|
118
121
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
119
122
|
import { createMemo, createUniqueId } from "solid-js";
|
|
120
|
-
var usePopover = (props
|
|
123
|
+
var usePopover = (props) => {
|
|
124
|
+
const id = createUniqueId();
|
|
121
125
|
const locale = useLocaleContext();
|
|
122
126
|
const environment = useEnvironmentContext();
|
|
123
|
-
const
|
|
124
|
-
const context = createMemo(() => ({
|
|
127
|
+
const machineProps = createMemo(() => ({
|
|
125
128
|
id,
|
|
126
129
|
dir: locale().dir,
|
|
127
130
|
getRootNode: environment().getRootNode,
|
|
128
|
-
|
|
129
|
-
"open.controlled": props.open !== void 0,
|
|
130
|
-
...props
|
|
131
|
+
...runIfFn(props)
|
|
131
132
|
}));
|
|
132
|
-
const
|
|
133
|
-
return createMemo(() => popover.connect(
|
|
133
|
+
const service = useMachine(popover.machine, machineProps);
|
|
134
|
+
return createMemo(() => popover.connect(service, normalizeProps));
|
|
134
135
|
};
|
|
135
136
|
|
|
136
137
|
// src/components/popover/popover-root.tsx
|
|
@@ -166,9 +167,7 @@ var PopoverRoot = (props) => {
|
|
|
166
167
|
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
167
168
|
var PopoverRootProvider = (props) => {
|
|
168
169
|
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
169
|
-
const presence = usePresence(
|
|
170
|
-
mergeProps10(presenceProps, () => ({ present: popoverProps.value().open }))
|
|
171
|
-
);
|
|
170
|
+
const presence = usePresence(mergeProps10(presenceProps, () => ({ present: popoverProps.value().open })));
|
|
172
171
|
return <PopoverProvider value={popoverProps.value}>
|
|
173
172
|
<PresenceProvider value={presence}>{popoverProps.children}</PresenceProvider>
|
|
174
173
|
</PopoverProvider>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./UCYPIMZC.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,13 +9,16 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./D2Z5BEON.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
|
+
import {
|
|
20
|
+
runIfFn
|
|
21
|
+
} from "./KGOB2IMX.jsx";
|
|
19
22
|
import {
|
|
20
23
|
__export
|
|
21
24
|
} from "./7IUG3E2V.jsx";
|
|
@@ -95,12 +98,12 @@ import { mergeProps as mergeProps8 } from "@zag-js/solid";
|
|
|
95
98
|
import * as editable from "@zag-js/editable";
|
|
96
99
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
97
100
|
import { createMemo, createUniqueId } from "solid-js";
|
|
98
|
-
var useEditable = (props
|
|
101
|
+
var useEditable = (props) => {
|
|
102
|
+
const id = createUniqueId();
|
|
99
103
|
const locale = useLocaleContext();
|
|
100
104
|
const environment = useEnvironmentContext();
|
|
101
|
-
const id = createUniqueId();
|
|
102
105
|
const field = useFieldContext();
|
|
103
|
-
const
|
|
106
|
+
const machineProps = createMemo(() => ({
|
|
104
107
|
id,
|
|
105
108
|
ids: {
|
|
106
109
|
label: field?.().ids.label,
|
|
@@ -112,13 +115,10 @@ var useEditable = (props = {}) => {
|
|
|
112
115
|
readOnly: field?.().readOnly,
|
|
113
116
|
required: field?.().required,
|
|
114
117
|
getRootNode: environment().getRootNode,
|
|
115
|
-
|
|
116
|
-
value: props.defaultValue,
|
|
117
|
-
"edit.controlled": props.edit !== void 0,
|
|
118
|
-
...props
|
|
118
|
+
...runIfFn(props)
|
|
119
119
|
}));
|
|
120
|
-
const
|
|
121
|
-
return createMemo(() => editable.connect(
|
|
120
|
+
const service = useMachine(editable.machine, machineProps);
|
|
121
|
+
return createMemo(() => editable.connect(service, normalizeProps));
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
// src/components/editable/editable-root.tsx
|
|
@@ -1,8 +1,9 @@
|
|
|
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 './YMMMHJJS.js';
|
|
4
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
5
|
+
import { createContext } from './TROPIN4C.js';
|
|
6
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
6
7
|
import { __export } from './ESLJRKWD.js';
|
|
7
8
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
8
9
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -45,24 +46,24 @@ var ProgressRange = (props) => {
|
|
|
45
46
|
const mergedProps = mergeProps(() => api().getRangeProps(), props);
|
|
46
47
|
return createComponent(ark.div, mergedProps);
|
|
47
48
|
};
|
|
48
|
-
var useProgress = (props
|
|
49
|
+
var useProgress = (props) => {
|
|
50
|
+
const id = createUniqueId();
|
|
49
51
|
const locale = useLocaleContext();
|
|
50
52
|
const environment = useEnvironmentContext();
|
|
51
|
-
const
|
|
52
|
-
const context = createMemo(() => ({
|
|
53
|
+
const machineProps = createMemo(() => ({
|
|
53
54
|
id,
|
|
54
55
|
dir: locale().dir,
|
|
56
|
+
locale: locale().locale,
|
|
55
57
|
getRootNode: environment().getRootNode,
|
|
56
|
-
|
|
57
|
-
...props
|
|
58
|
+
...runIfFn(props)
|
|
58
59
|
}));
|
|
59
|
-
const
|
|
60
|
-
return createMemo(() => progress.connect(
|
|
60
|
+
const service = useMachine(progress.machine, machineProps);
|
|
61
|
+
return createMemo(() => progress.connect(service, normalizeProps));
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
// src/components/progress/progress-root.tsx
|
|
64
65
|
var ProgressRoot = (props) => {
|
|
65
|
-
const [progressProps, localProps] = createSplitProps()(props, ["defaultValue", "id", "ids", "max", "min", "onValueChange", "orientation", "translations", "value"]);
|
|
66
|
+
const [progressProps, localProps] = createSplitProps()(props, ["defaultValue", "formatOptions", "id", "ids", "locale", "max", "min", "onValueChange", "orientation", "translations", "value"]);
|
|
66
67
|
const api = useProgress(progressProps);
|
|
67
68
|
const mergedProps = mergeProps(() => api().getRootProps(), localProps);
|
|
68
69
|
return createComponent(ProgressProvider, {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './KVVYU5Z3.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 './YMMMHJJS.js';
|
|
5
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
6
|
+
import { createContext } from './TROPIN4C.js';
|
|
7
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
7
8
|
import { __export } from './ESLJRKWD.js';
|
|
8
9
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
9
10
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -109,12 +110,12 @@ var TagsInputLabel = (props) => {
|
|
|
109
110
|
const mergedProps = mergeProps(() => api().getLabelProps(), props);
|
|
110
111
|
return createComponent(ark.label, mergedProps);
|
|
111
112
|
};
|
|
112
|
-
var useTagsInput = (props
|
|
113
|
+
var useTagsInput = (props) => {
|
|
114
|
+
const id = createUniqueId();
|
|
113
115
|
const locale = useLocaleContext();
|
|
114
116
|
const environment = useEnvironmentContext();
|
|
115
|
-
const id = createUniqueId();
|
|
116
117
|
const field = useFieldContext();
|
|
117
|
-
const
|
|
118
|
+
const machineProps = createMemo(() => ({
|
|
118
119
|
id,
|
|
119
120
|
ids: {
|
|
120
121
|
label: field?.().ids.label,
|
|
@@ -126,16 +127,15 @@ var useTagsInput = (props = {}) => {
|
|
|
126
127
|
readOnly: field?.().readOnly,
|
|
127
128
|
required: field?.().required,
|
|
128
129
|
getRootNode: environment().getRootNode,
|
|
129
|
-
|
|
130
|
-
...props
|
|
130
|
+
...runIfFn(props)
|
|
131
131
|
}));
|
|
132
|
-
const
|
|
133
|
-
return createMemo(() => tagsInput.connect(
|
|
132
|
+
const service = useMachine(tagsInput.machine, machineProps);
|
|
133
|
+
return createMemo(() => tagsInput.connect(service, normalizeProps));
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
// src/components/tags-input/tags-input-root.tsx
|
|
137
137
|
var TagsInputRoot = (props) => {
|
|
138
|
-
const [useTagsInputProps, localProps] = createSplitProps()(props, ["addOnPaste", "allowOverflow", "autoFocus", "blurBehavior", "
|
|
138
|
+
const [useTagsInputProps, localProps] = createSplitProps()(props, ["addOnPaste", "allowOverflow", "autoFocus", "blurBehavior", "defaultInputValue", "defaultValue", "delimiter", "disabled", "editable", "form", "id", "ids", "inputValue", "invalid", "max", "maxLength", "name", "onFocusOutside", "onHighlightChange", "onInputValueChange", "onInteractOutside", "onPointerDownOutside", "onValueChange", "onValueInvalid", "readOnly", "required", "translations", "validate", "value"]);
|
|
139
139
|
const api = useTagsInput(useTagsInputProps);
|
|
140
140
|
const mergedProps = mergeProps(() => api().getRootProps(), localProps);
|
|
141
141
|
return createComponent(TagsInputProvider, {
|
|
@@ -1,8 +1,9 @@
|
|
|
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 './YMMMHJJS.js';
|
|
4
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
5
|
+
import { createContext } from './TROPIN4C.js';
|
|
6
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
6
7
|
import { __export } from './ESLJRKWD.js';
|
|
7
8
|
import { createComponent } from 'solid-js/web';
|
|
8
9
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -24,21 +25,18 @@ var ToggleGroupItem = (props) => {
|
|
|
24
25
|
const mergedProps = mergeProps(() => api().getItemProps(toggleProps), restProps);
|
|
25
26
|
return createComponent(ark.button, mergedProps);
|
|
26
27
|
};
|
|
27
|
-
var useToggleGroup = (props
|
|
28
|
+
var useToggleGroup = (props) => {
|
|
29
|
+
const id = createUniqueId();
|
|
28
30
|
const locale = useLocaleContext();
|
|
29
31
|
const environment = useEnvironmentContext();
|
|
30
|
-
const
|
|
31
|
-
const context = createMemo(() => ({
|
|
32
|
+
const machineProps = createMemo(() => ({
|
|
32
33
|
id,
|
|
33
34
|
dir: locale().dir,
|
|
34
35
|
getRootNode: environment().getRootNode,
|
|
35
|
-
|
|
36
|
-
...props
|
|
36
|
+
...runIfFn(props)
|
|
37
37
|
}));
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
return createMemo(() => toggleGroup.connect(state, send, normalizeProps));
|
|
38
|
+
const service = useMachine(toggleGroup.machine, machineProps);
|
|
39
|
+
return createMemo(() => toggleGroup.connect(service, normalizeProps));
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
// src/components/toggle-group/toggle-group-root.tsx
|
|
@@ -6,10 +6,13 @@ import {
|
|
|
6
6
|
} from "./UFYZ7HLU.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useEnvironmentContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./D2Z5BEON.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./TVCIHLER.jsx";
|
|
13
|
+
import {
|
|
14
|
+
runIfFn
|
|
15
|
+
} from "./KGOB2IMX.jsx";
|
|
13
16
|
import {
|
|
14
17
|
__export
|
|
15
18
|
} from "./7IUG3E2V.jsx";
|
|
@@ -69,24 +72,26 @@ import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
|
69
72
|
import * as clipboard from "@zag-js/clipboard";
|
|
70
73
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
71
74
|
import { createMemo, createUniqueId } from "solid-js";
|
|
72
|
-
var useClipboard = (props
|
|
73
|
-
const environment = useEnvironmentContext();
|
|
75
|
+
var useClipboard = (props) => {
|
|
74
76
|
const id = createUniqueId();
|
|
75
|
-
const
|
|
77
|
+
const environment = useEnvironmentContext();
|
|
78
|
+
const machineProps = createMemo(() => ({
|
|
76
79
|
id,
|
|
77
80
|
getRootNode: environment().getRootNode,
|
|
78
|
-
...props
|
|
81
|
+
...runIfFn(props)
|
|
79
82
|
}));
|
|
80
|
-
const
|
|
81
|
-
return createMemo(() => clipboard.connect(
|
|
83
|
+
const service = useMachine(clipboard.machine, machineProps);
|
|
84
|
+
return createMemo(() => clipboard.connect(service, normalizeProps));
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
// src/components/clipboard/clipboard-root.tsx
|
|
85
88
|
var ClipboardRoot = (props) => {
|
|
86
89
|
const [useClipboardProps, localProps] = createSplitProps()(props, [
|
|
90
|
+
"defaultValue",
|
|
87
91
|
"id",
|
|
88
92
|
"ids",
|
|
89
93
|
"onStatusChange",
|
|
94
|
+
"onValueChange",
|
|
90
95
|
"timeout",
|
|
91
96
|
"value"
|
|
92
97
|
]);
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./A4744EEE.jsx";
|
|
7
7
|
import {
|
|
8
8
|
RenderStrategyProvider,
|
|
9
9
|
splitRenderStrategyProps,
|
|
10
10
|
useRenderStrategyContext
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./NEBB7COJ.jsx";
|
|
12
12
|
import {
|
|
13
13
|
createSplitProps
|
|
14
14
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -17,13 +17,16 @@ import {
|
|
|
17
17
|
} from "./UFYZ7HLU.jsx";
|
|
18
18
|
import {
|
|
19
19
|
useEnvironmentContext
|
|
20
|
-
} from "./
|
|
20
|
+
} from "./D2Z5BEON.jsx";
|
|
21
21
|
import {
|
|
22
22
|
useLocaleContext
|
|
23
|
-
} from "./
|
|
23
|
+
} from "./RCXMZN3G.jsx";
|
|
24
24
|
import {
|
|
25
25
|
createContext
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./TVCIHLER.jsx";
|
|
27
|
+
import {
|
|
28
|
+
runIfFn
|
|
29
|
+
} from "./KGOB2IMX.jsx";
|
|
27
30
|
import {
|
|
28
31
|
__export
|
|
29
32
|
} from "./7IUG3E2V.jsx";
|
|
@@ -107,20 +110,18 @@ import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
|
107
110
|
import * as dialog from "@zag-js/dialog";
|
|
108
111
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
109
112
|
import { createMemo, createUniqueId } from "solid-js";
|
|
110
|
-
var useDialog = (props
|
|
113
|
+
var useDialog = (props) => {
|
|
114
|
+
const id = createUniqueId();
|
|
111
115
|
const locale = useLocaleContext();
|
|
112
116
|
const environment = useEnvironmentContext();
|
|
113
|
-
const
|
|
114
|
-
const context = createMemo(() => ({
|
|
117
|
+
const machineProps = createMemo(() => ({
|
|
115
118
|
id,
|
|
116
119
|
dir: locale().dir,
|
|
117
120
|
getRootNode: environment().getRootNode,
|
|
118
|
-
|
|
119
|
-
"open.controlled": props.open !== void 0,
|
|
120
|
-
...props
|
|
121
|
+
...runIfFn(props)
|
|
121
122
|
}));
|
|
122
|
-
const
|
|
123
|
-
return createMemo(() => dialog.connect(
|
|
123
|
+
const service = useMachine(dialog.machine, machineProps);
|
|
124
|
+
return createMemo(() => dialog.connect(service, normalizeProps));
|
|
124
125
|
};
|
|
125
126
|
|
|
126
127
|
// src/components/dialog/dialog-root.tsx
|
|
@@ -163,9 +164,7 @@ import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
|
163
164
|
var DialogRootProvider = (props) => {
|
|
164
165
|
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
165
166
|
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
166
|
-
const apiPresence = usePresence(
|
|
167
|
-
mergeProps7(presenceProps, () => ({ present: dialogProps.value().open }))
|
|
168
|
-
);
|
|
167
|
+
const apiPresence = usePresence(mergeProps7(presenceProps, () => ({ present: dialogProps.value().open })));
|
|
169
168
|
return <DialogProvider value={dialogProps.value}>
|
|
170
169
|
<RenderStrategyProvider value={renderStrategyProps}>
|
|
171
170
|
<PresenceProvider value={apiPresence}>{dialogProps.children}</PresenceProvider>
|