@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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./UCYPIMZC.jsx";
|
|
1
4
|
import {
|
|
2
5
|
PresenceProvider,
|
|
3
6
|
splitPresenceProps,
|
|
4
7
|
usePresence,
|
|
5
8
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
7
|
-
import {
|
|
8
|
-
useFieldContext
|
|
9
|
-
} from "./P7I44WC4.jsx";
|
|
9
|
+
} from "./A4744EEE.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,13 +15,16 @@ import {
|
|
|
15
15
|
} from "./UFYZ7HLU.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useEnvironmentContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./D2Z5BEON.jsx";
|
|
19
19
|
import {
|
|
20
20
|
useLocaleContext
|
|
21
|
-
} from "./
|
|
21
|
+
} from "./RCXMZN3G.jsx";
|
|
22
22
|
import {
|
|
23
23
|
createContext
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./TVCIHLER.jsx";
|
|
25
|
+
import {
|
|
26
|
+
runIfFn
|
|
27
|
+
} from "./KGOB2IMX.jsx";
|
|
25
28
|
import {
|
|
26
29
|
__export
|
|
27
30
|
} from "./7IUG3E2V.jsx";
|
|
@@ -75,10 +78,7 @@ var ColorPickerAreaThumb = (props) => {
|
|
|
75
78
|
// src/components/color-picker/color-picker-channel-input.tsx
|
|
76
79
|
import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
77
80
|
var ColorPickerChannelInput = (props) => {
|
|
78
|
-
const [channelProps, inputProps] = createSplitProps()(props, [
|
|
79
|
-
"channel",
|
|
80
|
-
"orientation"
|
|
81
|
-
]);
|
|
81
|
+
const [channelProps, inputProps] = createSplitProps()(props, ["channel", "orientation"]);
|
|
82
82
|
const api = useColorPickerContext();
|
|
83
83
|
const mergedProps = mergeProps4(() => api().getChannelInputProps(channelProps), inputProps);
|
|
84
84
|
return <ark.input {...mergedProps} />;
|
|
@@ -102,10 +102,7 @@ var [ColorPickerFormatPropsProvider, useColorPickerFormatPropsContext] = createC
|
|
|
102
102
|
|
|
103
103
|
// src/components/color-picker/color-picker-channel-slider.tsx
|
|
104
104
|
var ColorPickerChannelSlider = (props) => {
|
|
105
|
-
const [channelProps, localProps] = createSplitProps()(props, [
|
|
106
|
-
"channel",
|
|
107
|
-
"orientation"
|
|
108
|
-
]);
|
|
105
|
+
const [channelProps, localProps] = createSplitProps()(props, ["channel", "orientation"]);
|
|
109
106
|
const api = useColorPickerContext();
|
|
110
107
|
const formatProps = useColorPickerFormatPropsContext();
|
|
111
108
|
const channelSliderProps = mergeProps5(channelProps, formatProps);
|
|
@@ -120,10 +117,7 @@ import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
|
120
117
|
var ColorPickerChannelSliderLabel = (props) => {
|
|
121
118
|
const colorPicker2 = useColorPickerContext();
|
|
122
119
|
const channelProps = useColorPickerChannelPropsContext();
|
|
123
|
-
const mergedProps = mergeProps6(
|
|
124
|
-
() => colorPicker2().getChannelSliderLabelProps(channelProps),
|
|
125
|
-
props
|
|
126
|
-
);
|
|
120
|
+
const mergedProps = mergeProps6(() => colorPicker2().getChannelSliderLabelProps(channelProps), props);
|
|
127
121
|
return <ark.label {...mergedProps} />;
|
|
128
122
|
};
|
|
129
123
|
|
|
@@ -155,10 +149,7 @@ var ColorPickerChannelSliderValueText = (props) => {
|
|
|
155
149
|
const colorPicker2 = useColorPickerContext();
|
|
156
150
|
const localeContext = useLocaleContext();
|
|
157
151
|
const channelProps = useColorPickerChannelPropsContext();
|
|
158
|
-
const mergedProps = mergeProps9(
|
|
159
|
-
() => colorPicker2().getChannelSliderValueTextProps(channelProps),
|
|
160
|
-
props
|
|
161
|
-
);
|
|
152
|
+
const mergedProps = mergeProps9(() => colorPicker2().getChannelSliderValueTextProps(channelProps), props);
|
|
162
153
|
return <ark.span {...mergedProps}>
|
|
163
154
|
{props.children || colorPicker2().getChannelValueText(channelProps.channel, localeContext().locale)}
|
|
164
155
|
</ark.span>;
|
|
@@ -206,9 +197,7 @@ var ColorPickerFormatSelect = (props) => {
|
|
|
206
197
|
const api = useColorPickerContext();
|
|
207
198
|
const mergedProps = mergeProps13(() => api().getFormatSelectProps(), props);
|
|
208
199
|
return <ark.select {...mergedProps}>
|
|
209
|
-
<Index each={["rgba", "hsla", "hsba"]}>
|
|
210
|
-
{(format) => <ark.option value={format()}>{format()}</ark.option>}
|
|
211
|
-
</Index>
|
|
200
|
+
<Index each={["rgba", "hsla", "hsba"]}>{(format) => <ark.option value={format()}>{format()}</ark.option>}</Index>
|
|
212
201
|
</ark.select>;
|
|
213
202
|
};
|
|
214
203
|
|
|
@@ -256,12 +245,12 @@ import { mergeProps as mergeProps18 } from "@zag-js/solid";
|
|
|
256
245
|
import * as colorPicker from "@zag-js/color-picker";
|
|
257
246
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
258
247
|
import { createMemo, createUniqueId } from "solid-js";
|
|
259
|
-
var useColorPicker = (props
|
|
248
|
+
var useColorPicker = (props) => {
|
|
249
|
+
const id = createUniqueId();
|
|
260
250
|
const locale = useLocaleContext();
|
|
261
251
|
const environment = useEnvironmentContext();
|
|
262
252
|
const field = useFieldContext();
|
|
263
|
-
const
|
|
264
|
-
const context = createMemo(() => ({
|
|
253
|
+
const machineProps = createMemo(() => ({
|
|
265
254
|
id,
|
|
266
255
|
ids: {
|
|
267
256
|
label: field?.().ids.label,
|
|
@@ -273,47 +262,42 @@ var useColorPicker = (props = {}) => {
|
|
|
273
262
|
readOnly: field?.().readOnly,
|
|
274
263
|
required: field?.().required,
|
|
275
264
|
getRootNode: environment().getRootNode,
|
|
276
|
-
|
|
277
|
-
"open.controlled": props.open !== void 0,
|
|
278
|
-
value: props.defaultValue,
|
|
279
|
-
...props
|
|
265
|
+
...runIfFn(props)
|
|
280
266
|
}));
|
|
281
|
-
const
|
|
282
|
-
return createMemo(() => colorPicker.connect(
|
|
267
|
+
const service = useMachine(colorPicker.machine, machineProps);
|
|
268
|
+
return createMemo(() => colorPicker.connect(service, normalizeProps));
|
|
283
269
|
};
|
|
284
270
|
|
|
285
271
|
// src/components/color-picker/color-picker-root.tsx
|
|
286
272
|
var ColorPickerRoot = (props) => {
|
|
287
273
|
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
288
|
-
const [useColorPickerProps, localProps] = createSplitProps()(
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
]
|
|
316
|
-
);
|
|
274
|
+
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, [
|
|
275
|
+
"closeOnSelect",
|
|
276
|
+
"defaultOpen",
|
|
277
|
+
"defaultValue",
|
|
278
|
+
"defaultFormat",
|
|
279
|
+
"disabled",
|
|
280
|
+
"format",
|
|
281
|
+
"id",
|
|
282
|
+
"ids",
|
|
283
|
+
"initialFocusEl",
|
|
284
|
+
"invalid",
|
|
285
|
+
"name",
|
|
286
|
+
"name",
|
|
287
|
+
"onFocusOutside",
|
|
288
|
+
"onFormatChange",
|
|
289
|
+
"onInteractOutside",
|
|
290
|
+
"onOpenChange",
|
|
291
|
+
"onPointerDownOutside",
|
|
292
|
+
"onValueChange",
|
|
293
|
+
"onValueChangeEnd",
|
|
294
|
+
"open",
|
|
295
|
+
"openAutoFocus",
|
|
296
|
+
"positioning",
|
|
297
|
+
"readOnly",
|
|
298
|
+
"required",
|
|
299
|
+
"value"
|
|
300
|
+
]);
|
|
317
301
|
const api = useColorPicker(useColorPickerProps);
|
|
318
302
|
const apiPresence = usePresence(mergeProps18(presenceProps, () => ({ present: api().open })));
|
|
319
303
|
const mergedProps = mergeProps18(() => api().getRootProps(), localProps);
|
|
@@ -328,13 +312,8 @@ var ColorPickerRoot = (props) => {
|
|
|
328
312
|
import { mergeProps as mergeProps19 } from "@zag-js/solid";
|
|
329
313
|
var ColorPickerRootProvider = (props) => {
|
|
330
314
|
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
331
|
-
const [{ value: colorPicker2 }, localProps] = createSplitProps()(
|
|
332
|
-
|
|
333
|
-
["value"]
|
|
334
|
-
);
|
|
335
|
-
const apiPresence = usePresence(
|
|
336
|
-
mergeProps19(presenceProps, () => ({ present: colorPicker2().open }))
|
|
337
|
-
);
|
|
315
|
+
const [{ value: colorPicker2 }, localProps] = createSplitProps()(colorPickerProps, ["value"]);
|
|
316
|
+
const apiPresence = usePresence(mergeProps19(presenceProps, () => ({ present: colorPicker2().open })));
|
|
338
317
|
const mergedProps = mergeProps19(() => colorPicker2().getRootProps(), localProps);
|
|
339
318
|
return <ColorPickerProvider value={colorPicker2}>
|
|
340
319
|
<PresenceProvider value={apiPresence}>
|
|
@@ -354,10 +333,7 @@ var [ColorPickerSwatchPropsProvider, useColorPickerSwatchPropsContext] = createC
|
|
|
354
333
|
|
|
355
334
|
// src/components/color-picker/color-picker-swatch.tsx
|
|
356
335
|
var ColorPickerSwatch = (props) => {
|
|
357
|
-
const [swatchProps, localProps] = createSplitProps()(props, [
|
|
358
|
-
"respectAlpha",
|
|
359
|
-
"value"
|
|
360
|
-
]);
|
|
336
|
+
const [swatchProps, localProps] = createSplitProps()(props, ["respectAlpha", "value"]);
|
|
361
337
|
const api = useColorPickerContext();
|
|
362
338
|
const mergedProps = mergeProps20(() => api().getSwatchProps(swatchProps), localProps);
|
|
363
339
|
return <ColorPickerSwatchPropsProvider value={swatchProps}>
|
|
@@ -385,10 +361,7 @@ var ColorPickerSwatchIndicator = (props) => {
|
|
|
385
361
|
// src/components/color-picker/color-picker-swatch-trigger.tsx
|
|
386
362
|
import { mergeProps as mergeProps23 } from "@zag-js/solid";
|
|
387
363
|
var ColorPickerSwatchTrigger = (props) => {
|
|
388
|
-
const [triggerProps, localProps] = createSplitProps()(props, [
|
|
389
|
-
"value",
|
|
390
|
-
"disabled"
|
|
391
|
-
]);
|
|
364
|
+
const [triggerProps, localProps] = createSplitProps()(props, ["value", "disabled"]);
|
|
392
365
|
const api = useColorPickerContext();
|
|
393
366
|
const mergedProps = mergeProps23(() => api().getSwatchTriggerProps(triggerProps), localProps);
|
|
394
367
|
return <ark.button {...mergedProps} />;
|
|
@@ -415,9 +388,7 @@ var ColorPickerTrigger = (props) => {
|
|
|
415
388
|
import { mergeProps as mergeProps26 } from "@zag-js/solid";
|
|
416
389
|
import { createMemo as createMemo2 } from "solid-js";
|
|
417
390
|
var ColorPickerValueSwatch = (props) => {
|
|
418
|
-
const [{ respectAlpha }, localProps] = createSplitProps()(props, [
|
|
419
|
-
"respectAlpha"
|
|
420
|
-
]);
|
|
391
|
+
const [{ respectAlpha }, localProps] = createSplitProps()(props, ["respectAlpha"]);
|
|
421
392
|
const colorPicker2 = useColorPickerContext();
|
|
422
393
|
const swatchProps = createMemo2(() => ({
|
|
423
394
|
respectAlpha,
|
|
@@ -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";
|
|
@@ -155,9 +158,7 @@ var [MenuItemGroupProvider, useMenuItemGroupContext] = createContext({
|
|
|
155
158
|
|
|
156
159
|
// src/components/menu/menu-item-group.tsx
|
|
157
160
|
var MenuItemGroup = (props) => {
|
|
158
|
-
const [optionalItemGroupProps, localProps] = createSplitProps()(props, [
|
|
159
|
-
"id"
|
|
160
|
-
]);
|
|
161
|
+
const [optionalItemGroupProps, localProps] = createSplitProps()(props, ["id"]);
|
|
161
162
|
const itemGroupProps = mergeProps8({ id: createUniqueId() }, optionalItemGroupProps);
|
|
162
163
|
const menu2 = useMenuContext();
|
|
163
164
|
const mergedProps = mergeProps8(() => menu2().getItemGroupProps(itemGroupProps), localProps);
|
|
@@ -171,10 +172,7 @@ import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
|
171
172
|
var MenuItemGroupLabel = (props) => {
|
|
172
173
|
const context = useMenuContext();
|
|
173
174
|
const itemGroupContext = useMenuItemGroupContext();
|
|
174
|
-
const mergedProps = mergeProps9(
|
|
175
|
-
context().getItemGroupLabelProps({ htmlFor: itemGroupContext.id }),
|
|
176
|
-
props
|
|
177
|
-
);
|
|
175
|
+
const mergedProps = mergeProps9(context().getItemGroupLabelProps({ htmlFor: itemGroupContext.id }), props);
|
|
178
176
|
return <ark.div {...mergedProps} />;
|
|
179
177
|
};
|
|
180
178
|
|
|
@@ -238,10 +236,11 @@ var MenuRadioItem = (props) => {
|
|
|
238
236
|
import { mergeProps as mergeProps14 } from "@zag-js/solid";
|
|
239
237
|
import { createUniqueId as createUniqueId2 } from "solid-js";
|
|
240
238
|
var MenuRadioItemGroup = (props) => {
|
|
241
|
-
const [optionalItemGroupProps, localProps] = createSplitProps()(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
const [optionalItemGroupProps, localProps] = createSplitProps()(props, [
|
|
240
|
+
"id",
|
|
241
|
+
"onValueChange",
|
|
242
|
+
"value"
|
|
243
|
+
]);
|
|
245
244
|
const context = useMenuContext();
|
|
246
245
|
const itemGroupProps = mergeProps14({ id: createUniqueId2() }, optionalItemGroupProps);
|
|
247
246
|
const mergedProps = mergeProps14(() => context().getItemGroupProps(itemGroupProps), localProps);
|
|
@@ -252,29 +251,27 @@ var MenuRadioItemGroup = (props) => {
|
|
|
252
251
|
|
|
253
252
|
// src/components/menu/menu-root.tsx
|
|
254
253
|
import { mergeProps as mergeProps15 } from "@zag-js/solid";
|
|
255
|
-
import {
|
|
254
|
+
import { onMount } from "solid-js";
|
|
256
255
|
|
|
257
256
|
// src/components/menu/use-menu.ts
|
|
258
257
|
import * as menu from "@zag-js/menu";
|
|
259
258
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
260
259
|
import { createMemo as createMemo4, createUniqueId as createUniqueId3 } from "solid-js";
|
|
261
|
-
var useMenu = (props
|
|
260
|
+
var useMenu = (props) => {
|
|
261
|
+
const id = createUniqueId3();
|
|
262
262
|
const locale = useLocaleContext();
|
|
263
263
|
const environment = useEnvironmentContext();
|
|
264
|
-
const
|
|
265
|
-
const context = createMemo4(() => ({
|
|
264
|
+
const machineProps = createMemo4(() => ({
|
|
266
265
|
id,
|
|
267
266
|
dir: locale().dir,
|
|
268
267
|
getRootNode: environment().getRootNode,
|
|
269
|
-
|
|
270
|
-
"open.controlled": props.open !== void 0,
|
|
271
|
-
...props
|
|
268
|
+
...runIfFn(props)
|
|
272
269
|
}));
|
|
273
|
-
const
|
|
274
|
-
const api = createMemo4(() => menu.connect(
|
|
270
|
+
const service = useMachine(menu.machine, machineProps);
|
|
271
|
+
const api = createMemo4(() => menu.connect(service, normalizeProps));
|
|
275
272
|
return {
|
|
276
273
|
api,
|
|
277
|
-
|
|
274
|
+
service
|
|
278
275
|
};
|
|
279
276
|
};
|
|
280
277
|
|
|
@@ -300,11 +297,13 @@ var MenuRoot = (props) => {
|
|
|
300
297
|
"aria-label",
|
|
301
298
|
"closeOnSelect",
|
|
302
299
|
"composite",
|
|
300
|
+
"defaultHighlightedValue",
|
|
303
301
|
"defaultOpen",
|
|
304
302
|
"highlightedValue",
|
|
305
303
|
"id",
|
|
306
304
|
"ids",
|
|
307
305
|
"loopFocus",
|
|
306
|
+
"navigate",
|
|
308
307
|
"onEscapeKeyDown",
|
|
309
308
|
"onFocusOutside",
|
|
310
309
|
"onHighlightChange",
|
|
@@ -313,7 +312,6 @@ var MenuRoot = (props) => {
|
|
|
313
312
|
"onPointerDownOutside",
|
|
314
313
|
"onSelect",
|
|
315
314
|
"open",
|
|
316
|
-
"navigate",
|
|
317
315
|
"positioning",
|
|
318
316
|
"typeahead"
|
|
319
317
|
]);
|
|
@@ -321,14 +319,14 @@ var MenuRoot = (props) => {
|
|
|
321
319
|
const parentMachine = useMenuMachineContext();
|
|
322
320
|
const menu2 = useMenu(useMenuProps);
|
|
323
321
|
const presenceApi = usePresence(mergeProps15(presenceProps, () => ({ present: menu2.api().open })));
|
|
324
|
-
|
|
322
|
+
onMount(() => {
|
|
325
323
|
if (!parentMachine) return;
|
|
326
|
-
parentApi?.().setChild(menu2.
|
|
324
|
+
parentApi?.().setChild(menu2.service);
|
|
327
325
|
menu2.api().setParent(parentMachine);
|
|
328
326
|
});
|
|
329
327
|
const triggerItemContext = () => parentApi?.().getTriggerItemProps(menu2.api());
|
|
330
328
|
return <MenuTriggerItemProvider value={triggerItemContext}>
|
|
331
|
-
<MenuMachineProvider value={menu2.
|
|
329
|
+
<MenuMachineProvider value={menu2.service}>
|
|
332
330
|
<MenuProvider value={menu2.api}>
|
|
333
331
|
<PresenceProvider value={presenceApi}>{localProps.children}</PresenceProvider>
|
|
334
332
|
</MenuProvider>
|
|
@@ -338,22 +336,20 @@ var MenuRoot = (props) => {
|
|
|
338
336
|
|
|
339
337
|
// src/components/menu/menu-root-provider.tsx
|
|
340
338
|
import { mergeProps as mergeProps16 } from "@zag-js/solid";
|
|
341
|
-
import { createEffect
|
|
339
|
+
import { createEffect } from "solid-js";
|
|
342
340
|
var MenuRootProvider = (props) => {
|
|
343
341
|
const parentApi = useMenuContext();
|
|
344
342
|
const parentMachine = useMenuMachineContext();
|
|
345
343
|
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
346
|
-
const presenceApi = usePresence(
|
|
347
|
-
|
|
348
|
-
);
|
|
349
|
-
createEffect2(() => {
|
|
344
|
+
const presenceApi = usePresence(mergeProps16(presenceProps, () => ({ present: menuProps.value.api().open })));
|
|
345
|
+
createEffect(() => {
|
|
350
346
|
if (!parentMachine) return;
|
|
351
|
-
parentApi?.().setChild(menuProps.value.
|
|
347
|
+
parentApi?.().setChild(menuProps.value.service);
|
|
352
348
|
menuProps.value.api().setParent(parentMachine);
|
|
353
349
|
});
|
|
354
350
|
const triggerItemContext = () => parentApi?.().getTriggerItemProps(menuProps.value.api());
|
|
355
351
|
return <MenuTriggerItemProvider value={triggerItemContext}>
|
|
356
|
-
<MenuMachineProvider value={menuProps.value.
|
|
352
|
+
<MenuMachineProvider value={menuProps.value.service}>
|
|
357
353
|
<MenuProvider value={menuProps.value.api}>
|
|
358
354
|
<PresenceProvider value={presenceApi}>{menuProps.children}</PresenceProvider>
|
|
359
355
|
</MenuProvider>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
|
-
import {
|
|
2
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
3
|
+
import { createComponent, template, spread, insert } from 'solid-js/web';
|
|
3
4
|
import { createMemo, For, Show } from 'solid-js';
|
|
4
5
|
import { highlightWord } from '@zag-js/highlight-word';
|
|
5
6
|
|
|
6
7
|
var useHighlight = (props) => {
|
|
7
|
-
return createMemo(() => highlightWord(props));
|
|
8
|
+
return createMemo(() => highlightWord(runIfFn(props)));
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
// src/components/highlight/highlight.tsx
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useFieldContext } from './X3BMEEJH.js';
|
|
1
|
+
import { useFieldContext } from './KVVYU5Z3.js';
|
|
3
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
3
|
import { ark } from './EPLBB4QN.js';
|
|
5
|
-
import { useEnvironmentContext } from './
|
|
6
|
-
import { useLocaleContext } from './
|
|
7
|
-
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';
|
|
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';
|
|
11
11
|
import * as checkbox from '@zag-js/checkbox';
|
|
12
12
|
import { anatomy } from '@zag-js/checkbox';
|
|
13
|
-
import { createMemo, createUniqueId } from 'solid-js';
|
|
13
|
+
import { createMemo, createUniqueId, createSignal, untrack } from 'solid-js';
|
|
14
14
|
|
|
15
15
|
// src/components/checkbox/use-checkbox-context.ts
|
|
16
16
|
var [CheckboxProvider, useCheckboxContext] = createContext({
|
|
@@ -26,6 +26,24 @@ var CheckboxControl = (props) => {
|
|
|
26
26
|
return createComponent(ark.div, mergedProps);
|
|
27
27
|
};
|
|
28
28
|
var checkboxAnatomy = anatomy.extendWith("group");
|
|
29
|
+
function useControllableState(props) {
|
|
30
|
+
const [uncontrolledValue, setUncontrolledValue] = createSignal(runIfFn(props.defaultValue));
|
|
31
|
+
const controlled = createMemo(() => props.value?.() !== void 0);
|
|
32
|
+
const currentValue = createMemo(() => controlled() ? props.value?.() : uncontrolledValue());
|
|
33
|
+
const setValue = (next) => {
|
|
34
|
+
untrack(() => {
|
|
35
|
+
const nextValue = runIfFn(next, currentValue());
|
|
36
|
+
if (controlled()) {
|
|
37
|
+
return props.onChange?.(nextValue);
|
|
38
|
+
}
|
|
39
|
+
setUncontrolledValue(nextValue);
|
|
40
|
+
return props.onChange?.(nextValue);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
return [currentValue, setValue];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/components/checkbox/use-checkbox-group.ts
|
|
29
47
|
function useCheckboxGroup(props = {}) {
|
|
30
48
|
const interactive = createMemo(() => !(props.disabled || props.readOnly));
|
|
31
49
|
const [value, setValue] = useControllableState({
|
|
@@ -126,13 +144,14 @@ var CheckboxLabel = (props) => {
|
|
|
126
144
|
var useCheckbox = (ownProps = {}) => {
|
|
127
145
|
const checkboxGroup = useCheckboxGroupContext();
|
|
128
146
|
const props = createMemo(() => {
|
|
129
|
-
|
|
147
|
+
const resolvedProps = runIfFn(ownProps);
|
|
148
|
+
return mergeProps(resolvedProps, checkboxGroup?.().getItemProps({ value: resolvedProps.value }) ?? {});
|
|
130
149
|
}, [ownProps, checkboxGroup]);
|
|
150
|
+
const id = createUniqueId();
|
|
131
151
|
const locale = useLocaleContext();
|
|
132
152
|
const environment = useEnvironmentContext();
|
|
133
|
-
const id = createUniqueId();
|
|
134
153
|
const field = useFieldContext();
|
|
135
|
-
const
|
|
154
|
+
const machineProps = createMemo(() => ({
|
|
136
155
|
id,
|
|
137
156
|
ids: {
|
|
138
157
|
label: field?.().ids.label,
|
|
@@ -144,11 +163,10 @@ var useCheckbox = (ownProps = {}) => {
|
|
|
144
163
|
required: field?.().required,
|
|
145
164
|
dir: locale().dir,
|
|
146
165
|
getRootNode: environment().getRootNode,
|
|
147
|
-
checked: props().defaultChecked,
|
|
148
166
|
...props()
|
|
149
167
|
}));
|
|
150
|
-
const
|
|
151
|
-
return createMemo(() => checkbox.connect(
|
|
168
|
+
const service = useMachine(checkbox.machine, machineProps);
|
|
169
|
+
return createMemo(() => checkbox.connect(service, normalizeProps));
|
|
152
170
|
};
|
|
153
171
|
|
|
154
172
|
// src/components/checkbox/checkbox-root.tsx
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './OY4ARTMM.js';
|
|
2
|
+
import { useFieldContext } from './KVVYU5Z3.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 './YMMMHJJS.js';
|
|
6
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
7
|
+
import { createContext } from './TROPIN4C.js';
|
|
8
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
8
9
|
import { __export } from './ESLJRKWD.js';
|
|
9
|
-
import { createComponent, mergeProps as mergeProps$1, insert, effect
|
|
10
|
+
import { createComponent, mergeProps as mergeProps$1, template, insert, effect } from 'solid-js/web';
|
|
10
11
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
11
|
-
import { Show,
|
|
12
|
+
import { Show, createUniqueId, createMemo, Index } from 'solid-js';
|
|
12
13
|
import * as select from '@zag-js/select';
|
|
13
14
|
export { anatomy } from '@zag-js/select';
|
|
14
15
|
|
|
@@ -45,7 +46,7 @@ var SelectControl = (props) => {
|
|
|
45
46
|
const mergedProps = mergeProps(() => select2().getControlProps(), props);
|
|
46
47
|
return createComponent(ark.div, mergedProps);
|
|
47
48
|
};
|
|
48
|
-
var _tmpl$ = /* @__PURE__ */ template(`<option value
|
|
49
|
+
var _tmpl$ = /* @__PURE__ */ template(`<option value>`);
|
|
49
50
|
var _tmpl$2 = /* @__PURE__ */ template(`<option>`);
|
|
50
51
|
var SelectHiddenSelect = (props) => {
|
|
51
52
|
const select2 = useSelectContext();
|
|
@@ -185,11 +186,11 @@ var SelectPositioner = (props) => {
|
|
|
185
186
|
});
|
|
186
187
|
};
|
|
187
188
|
var useSelect = (props) => {
|
|
189
|
+
const id = createUniqueId();
|
|
188
190
|
const locale = useLocaleContext();
|
|
189
191
|
const environment = useEnvironmentContext();
|
|
190
|
-
const id = createUniqueId();
|
|
191
192
|
const field = useFieldContext();
|
|
192
|
-
const
|
|
193
|
+
const machineProps = createMemo(() => ({
|
|
193
194
|
id,
|
|
194
195
|
ids: {
|
|
195
196
|
label: field?.().ids.label,
|
|
@@ -201,28 +202,16 @@ var useSelect = (props) => {
|
|
|
201
202
|
required: field?.().required,
|
|
202
203
|
dir: locale().dir,
|
|
203
204
|
getRootNode: environment().getRootNode,
|
|
204
|
-
|
|
205
|
-
value: props.defaultValue,
|
|
206
|
-
"open.controlled": props.open !== void 0,
|
|
207
|
-
...props
|
|
205
|
+
...runIfFn(props)
|
|
208
206
|
}));
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
return restProps;
|
|
212
|
-
});
|
|
213
|
-
const [state, send, service] = useMachine(select.machine(initialContext()), {
|
|
214
|
-
context
|
|
215
|
-
});
|
|
216
|
-
createEffect(() => {
|
|
217
|
-
service.setContext({ collection: props.collection });
|
|
218
|
-
});
|
|
219
|
-
return createMemo(() => select.connect(state, send, normalizeProps));
|
|
207
|
+
const service = useMachine(select.machine, machineProps);
|
|
208
|
+
return createMemo(() => select.connect(service, normalizeProps));
|
|
220
209
|
};
|
|
221
210
|
|
|
222
211
|
// src/components/select/select-root.tsx
|
|
223
212
|
var SelectRoot = (props) => {
|
|
224
213
|
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
225
|
-
const [useSelectProps, localProps] = createSplitProps()(selectProps, ["closeOnSelect", "composite", "
|
|
214
|
+
const [useSelectProps, localProps] = createSplitProps()(selectProps, ["closeOnSelect", "collection", "composite", "defaultHighlightedValue", "defaultOpen", "defaultValue", "deselectable", "disabled", "form", "highlightedValue", "id", "ids", "invalid", "loopFocus", "multiple", "name", "onFocusOutside", "onHighlightChange", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "onValueChange", "open", "positioning", "readOnly", "required", "scrollToIndexFn", "value"]);
|
|
226
215
|
const select2 = useSelect(useSelectProps);
|
|
227
216
|
const presenceApi = usePresence(mergeProps(() => ({
|
|
228
217
|
present: select2().open
|
|
@@ -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,32 +9,27 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./TVCIHLER.jsx";
|
|
13
|
+
import {
|
|
14
|
+
runIfFn
|
|
15
|
+
} from "./KGOB2IMX.jsx";
|
|
13
16
|
|
|
14
17
|
// src/components/presence/presence.tsx
|
|
15
18
|
import { mergeProps } from "@zag-js/solid";
|
|
16
19
|
import { Show } from "solid-js";
|
|
17
20
|
|
|
18
21
|
// src/components/presence/split-presence-props.ts
|
|
19
|
-
var splitPresenceProps = (props) => createSplitProps()(props, [
|
|
20
|
-
"immediate",
|
|
21
|
-
"lazyMount",
|
|
22
|
-
"onExitComplete",
|
|
23
|
-
"present",
|
|
24
|
-
"unmountOnExit"
|
|
25
|
-
]);
|
|
22
|
+
var splitPresenceProps = (props) => createSplitProps()(props, ["immediate", "lazyMount", "onExitComplete", "present", "unmountOnExit"]);
|
|
26
23
|
|
|
27
24
|
// src/components/presence/use-presence.ts
|
|
28
25
|
import * as presence from "@zag-js/presence";
|
|
29
26
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
30
27
|
import { createEffect, createMemo, createSignal } from "solid-js";
|
|
31
28
|
var usePresence = (props) => {
|
|
32
|
-
const [renderStrategyProps, context] = splitRenderStrategyProps(props);
|
|
29
|
+
const [renderStrategyProps, context] = splitRenderStrategyProps(runIfFn(props));
|
|
33
30
|
const [wasEverPresent, setWasEverPresent] = createSignal(false);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
const api = createMemo(() => presence.connect(state, send, normalizeProps));
|
|
31
|
+
const service = useMachine(presence.machine, props);
|
|
32
|
+
const api = createMemo(() => presence.connect(service, normalizeProps));
|
|
38
33
|
createEffect(() => {
|
|
39
34
|
const present = api().present;
|
|
40
35
|
if (present) setWasEverPresent(true);
|