@ark-ui/solid 4.10.1 → 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/{2ILK4IFM.jsx → 2TEQVFZN.jsx} +16 -28
- 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/{RVUYRERH.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/{SBPY26HV.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/{22UQ4DZC.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/{SUVE6C6L.jsx → DH5DKFFF.jsx} +17 -35
- package/dist/chunk/{TMUQ6SLE.jsx → DS2MX7YY.jsx} +8 -11
- package/dist/chunk/{34OZO53S.js → DVI7TRLG.js} +9 -12
- package/dist/chunk/{AWO62YTJ.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/{NDY7YFV2.js → EUXWRO3A.js} +16 -17
- package/dist/chunk/{K54W24N6.jsx → FHWNUAQM.jsx} +10 -15
- package/dist/chunk/{MJNR43Q5.js → FX6TOMB3.js} +14 -25
- package/dist/chunk/{DUYGPLFV.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/{FDN5MSFM.js → JOWPVE6E.js} +8 -9
- package/dist/chunk/{SN5TXTB6.jsx → JZ7ZQZT4.jsx} +17 -54
- package/dist/chunk/{632HFNZF.js → KMFRZGLF.js} +36 -15
- package/dist/chunk/{GZVCPLKK.jsx → KQ4BIFPS.jsx} +9 -10
- package/dist/chunk/{XCNALQF7.js → LFWIA7VB.js} +11 -14
- package/dist/chunk/{7BGOIKYK.jsx → LKOJO4VB.jsx} +17 -31
- 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/{FS3LMJ37.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/{3V3HI6QW.js → PJNGX4UT.js} +9 -8
- package/dist/chunk/{3HMZSTYX.js → PL4PGQFF.js} +8 -10
- package/dist/chunk/{RH2PDRKN.jsx → POFK2TVP.jsx} +8 -9
- package/dist/chunk/{HWL7X2QR.jsx → PVOFTEOB.jsx} +21 -40
- package/dist/chunk/{HPDOBQ3V.js → QEMQBM6W.js} +1 -1
- package/dist/chunk/{L7OSYHVR.js → QFAL6GWC.js} +1 -1
- package/dist/chunk/{QA6ZMN5Y.js → QKFZ3XTM.js} +14 -28
- package/dist/chunk/{IZC6PKGT.jsx → QZQUUXCF.jsx} +10 -14
- package/dist/chunk/{DUDD2T7G.js → R6Q7TUSQ.js} +8 -11
- package/dist/chunk/{3QQZKR3F.jsx → RCXMZN3G.jsx} +1 -1
- package/dist/chunk/{N73ADPX5.jsx → RG3IJESS.jsx} +46 -78
- 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/{XTV6ZFAA.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/{2NEVBQW4.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/{7KPVYYFT.js → WT3OTYHP.js} +27 -11
- package/dist/chunk/{IOTZAUDA.jsx → WUTUKX4C.jsx} +1 -1
- package/dist/chunk/{34JAVC2R.jsx → WZ7FNJXM.jsx} +11 -15
- package/dist/chunk/X34KVQNW.js +1 -1
- package/dist/chunk/{MSHQY44G.jsx → XHA6B6L2.jsx} +23 -23
- package/dist/chunk/{CQN5S4C3.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/{FVMQXW27.jsx → ZOMTU4P2.jsx} +12 -22
- 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 +8 -20
- 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 +3 -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 +6 -6
- 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 +325 -327
- 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 +6 -6
- 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 +325 -327
- 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 +76 -83
- 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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./2FYSIKNK.jsx";
|
|
7
7
|
import {
|
|
8
8
|
createSplitProps
|
|
9
9
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
} from "./UFYZ7HLU.jsx";
|
|
13
13
|
import {
|
|
14
14
|
useEnvironmentContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./BPYAMTER.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
22
|
import {
|
|
23
23
|
__export
|
|
24
24
|
} from "./7IUG3E2V.jsx";
|
|
@@ -72,15 +72,9 @@ var DatePickerControl = (props) => {
|
|
|
72
72
|
// src/components/date-picker/date-picker-input.tsx
|
|
73
73
|
import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
74
74
|
var DatePickerInput = (props) => {
|
|
75
|
-
const [inputProps, localProps] = createSplitProps()(props, [
|
|
76
|
-
"index",
|
|
77
|
-
"fixOnBlur"
|
|
78
|
-
]);
|
|
75
|
+
const [inputProps, localProps] = createSplitProps()(props, ["index", "fixOnBlur"]);
|
|
79
76
|
const datePicker2 = useDatePickerContext();
|
|
80
|
-
const mergedProps = mergeProps4(
|
|
81
|
-
() => datePicker2().getInputProps(inputProps),
|
|
82
|
-
localProps
|
|
83
|
-
);
|
|
77
|
+
const mergedProps = mergeProps4(() => datePicker2().getInputProps(inputProps), localProps);
|
|
84
78
|
return <ark.input {...mergedProps} />;
|
|
85
79
|
};
|
|
86
80
|
|
|
@@ -99,9 +93,7 @@ var DatePickerMonthSelect = (props) => {
|
|
|
99
93
|
const datePicker2 = useDatePickerContext();
|
|
100
94
|
const mergedProps = mergeProps6(() => datePicker2().getMonthSelectProps(), props);
|
|
101
95
|
return <ark.select {...mergedProps}>
|
|
102
|
-
<Index each={datePicker2().getMonths()}>
|
|
103
|
-
{(month) => <option value={month().value}>{month().label}</option>}
|
|
104
|
-
</Index>
|
|
96
|
+
<Index each={datePicker2().getMonths()}>{(month) => <option value={month().value}>{month().label}</option>}</Index>
|
|
105
97
|
</ark.select>;
|
|
106
98
|
};
|
|
107
99
|
|
|
@@ -170,21 +162,18 @@ import * as datePicker from "@zag-js/date-picker";
|
|
|
170
162
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
171
163
|
import { createMemo, createUniqueId } from "solid-js";
|
|
172
164
|
var useDatePicker = (props = {}) => {
|
|
165
|
+
const id = createUniqueId();
|
|
173
166
|
const locale = useLocaleContext();
|
|
174
167
|
const environment = useEnvironmentContext();
|
|
175
|
-
const
|
|
176
|
-
const context = createMemo(() => ({
|
|
168
|
+
const machineProps = createMemo(() => ({
|
|
177
169
|
id,
|
|
178
170
|
dir: locale().dir,
|
|
171
|
+
locale: locale().locale,
|
|
179
172
|
getRootNode: environment().getRootNode,
|
|
180
|
-
open: props.defaultOpen,
|
|
181
|
-
"open.controlled": props.open !== void 0,
|
|
182
|
-
value: props.defaultValue,
|
|
183
|
-
view: props.defaultView,
|
|
184
173
|
...props
|
|
185
174
|
}));
|
|
186
|
-
const
|
|
187
|
-
return createMemo(() => datePicker.connect(
|
|
175
|
+
const service = useMachine(datePicker.machine, machineProps);
|
|
176
|
+
return createMemo(() => datePicker.connect(service, normalizeProps));
|
|
188
177
|
};
|
|
189
178
|
|
|
190
179
|
// src/components/date-picker/date-picker-root.tsx
|
|
@@ -192,6 +181,7 @@ var DatePickerRoot = (props) => {
|
|
|
192
181
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
193
182
|
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, [
|
|
194
183
|
"closeOnSelect",
|
|
184
|
+
"defaultFocusedValue",
|
|
195
185
|
"defaultOpen",
|
|
196
186
|
"defaultValue",
|
|
197
187
|
"defaultView",
|
|
@@ -227,25 +217,20 @@ var DatePickerRoot = (props) => {
|
|
|
227
217
|
"view"
|
|
228
218
|
]);
|
|
229
219
|
const api = useDatePicker(useDatePickerProps);
|
|
230
|
-
const apiPresence = usePresence(
|
|
231
|
-
mergeProps12(presenceProps, () => ({ present: api().open }))
|
|
232
|
-
);
|
|
220
|
+
const apiPresence = usePresence(mergeProps12(presenceProps, () => ({ present: api().open })));
|
|
233
221
|
const mergedProps = mergeProps12(() => api().getRootProps(), localProps);
|
|
234
222
|
return <DatePickerProvider value={api}>
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
223
|
+
<PresenceProvider value={apiPresence}>
|
|
224
|
+
<ark.div {...mergedProps} />
|
|
225
|
+
</PresenceProvider>
|
|
226
|
+
</DatePickerProvider>;
|
|
239
227
|
};
|
|
240
228
|
|
|
241
229
|
// src/components/date-picker/date-picker-root-provider.tsx
|
|
242
230
|
import { mergeProps as mergeProps13 } from "@zag-js/solid";
|
|
243
231
|
var DatePickerRootProvider = (props) => {
|
|
244
232
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
245
|
-
const [{ value: datePicker2 }, localProps] = createSplitProps()(
|
|
246
|
-
datePickerProps,
|
|
247
|
-
["value"]
|
|
248
|
-
);
|
|
233
|
+
const [{ value: datePicker2 }, localProps] = createSplitProps()(datePickerProps, ["value"]);
|
|
249
234
|
const presence = usePresence(mergeProps13(presenceProps, () => ({ present: datePicker2().open })));
|
|
250
235
|
const mergedProps = mergeProps13(() => datePicker2().getRootProps(), localProps);
|
|
251
236
|
return <DatePickerProvider value={datePicker2}>
|
|
@@ -267,9 +252,7 @@ var [DatePickerTableProvider, useDatePickerTableContext] = createContext({
|
|
|
267
252
|
|
|
268
253
|
// src/components/date-picker/date-picker-table.tsx
|
|
269
254
|
var DatePickerTable = (props) => {
|
|
270
|
-
const [{ columns }, localProps] = createSplitProps()(props, [
|
|
271
|
-
"columns"
|
|
272
|
-
]);
|
|
255
|
+
const [{ columns }, localProps] = createSplitProps()(props, ["columns"]);
|
|
273
256
|
const api = useDatePickerContext();
|
|
274
257
|
const viewProps = useDatePickerViewContext();
|
|
275
258
|
const tableProps = { columns, id: createUniqueId2(), ...viewProps };
|
|
@@ -420,9 +403,7 @@ var DatePickerYearSelect = (props) => {
|
|
|
420
403
|
const datePicker2 = useDatePickerContext();
|
|
421
404
|
const mergedProps = mergeProps25(() => datePicker2().getYearSelectProps(), props);
|
|
422
405
|
return <ark.select {...mergedProps}>
|
|
423
|
-
<Index2 each={datePicker2().getYears()}>
|
|
424
|
-
{(year) => <option value={year().value}>{year().label}</option>}
|
|
425
|
-
</Index2>
|
|
406
|
+
<Index2 each={datePicker2().getYears()}>{(year) => <option value={year().value}>{year().label}</option>}</Index2>
|
|
426
407
|
</ark.select>;
|
|
427
408
|
};
|
|
428
409
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
2
|
-
import {
|
|
1
|
+
import { useFieldContext } from './KMFRZGLF.js';
|
|
2
|
+
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './WRLQ7Y6E.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
|
-
import { useEnvironmentContext } from './
|
|
6
|
-
import { useLocaleContext } from './
|
|
7
|
-
import { createContext } from './
|
|
5
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
6
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
7
|
+
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
9
9
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
10
10
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
11
|
-
import { Show,
|
|
11
|
+
import { Show, createUniqueId, createMemo } from 'solid-js';
|
|
12
12
|
import * as combobox from '@zag-js/combobox';
|
|
13
13
|
export { anatomy } from '@zag-js/combobox';
|
|
14
14
|
|
|
@@ -57,12 +57,10 @@ var ComboboxInput = (props) => {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
// src/components/combobox/use-combobox-item-context.ts
|
|
60
|
-
var [ComboboxItemProvider, useComboboxItemContext] = createContext(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
);
|
|
60
|
+
var [ComboboxItemProvider, useComboboxItemContext] = createContext({
|
|
61
|
+
hookName: "useComboboxItemContext",
|
|
62
|
+
providerName: "<ComboboxItemProvider />"
|
|
63
|
+
});
|
|
66
64
|
|
|
67
65
|
// src/components/combobox/use-combobox-item-props-context.ts
|
|
68
66
|
var [ComboboxItemPropsProvider, useComboboxItemPropsContext] = createContext({
|
|
@@ -161,7 +159,7 @@ var useCombobox = (props) => {
|
|
|
161
159
|
const environment = useEnvironmentContext();
|
|
162
160
|
const id = createUniqueId();
|
|
163
161
|
const field = useFieldContext();
|
|
164
|
-
const
|
|
162
|
+
const machineProps = createMemo(() => ({
|
|
165
163
|
id,
|
|
166
164
|
ids: {
|
|
167
165
|
label: field?.().ids.label,
|
|
@@ -173,28 +171,16 @@ var useCombobox = (props) => {
|
|
|
173
171
|
invalid: field?.().invalid,
|
|
174
172
|
dir: locale().dir,
|
|
175
173
|
getRootNode: environment().getRootNode,
|
|
176
|
-
open: props.defaultOpen,
|
|
177
|
-
value: props.defaultValue,
|
|
178
|
-
"open.controlled": props.open !== void 0,
|
|
179
174
|
...props
|
|
180
175
|
}));
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
return restProps;
|
|
184
|
-
});
|
|
185
|
-
const [state, send, service] = useMachine(combobox.machine(initialContext()), {
|
|
186
|
-
context
|
|
187
|
-
});
|
|
188
|
-
createEffect(() => {
|
|
189
|
-
service.setContext({ collection: props.collection });
|
|
190
|
-
});
|
|
191
|
-
return createMemo(() => combobox.connect(state, send, normalizeProps));
|
|
176
|
+
const service = useMachine(combobox.machine, machineProps);
|
|
177
|
+
return createMemo(() => combobox.connect(service, normalizeProps));
|
|
192
178
|
};
|
|
193
179
|
|
|
194
180
|
// src/components/combobox/combobox-root.tsx
|
|
195
181
|
var ComboboxRoot = (props) => {
|
|
196
182
|
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
197
|
-
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ["allowCustomValue", "autoFocus", "closeOnSelect", "collection", "composite", "defaultOpen", "defaultValue", "disabled", "disableLayer", "form", "highlightedValue", "id", "ids", "inputBehavior", "inputValue", "invalid", "loopFocus", "multiple", "name", "navigate", "onFocusOutside", "onHighlightChange", "onInputValueChange", "onInteractOutside", "onOpenChange", "onOpenChange", "onPointerDownOutside", "onValueChange", "open", "openOnChange", "openOnClick", "openOnKeyPress", "placeholder", "positioning", "readOnly", "required", "scrollToIndexFn", "selectionBehavior", "translations", "value"]);
|
|
183
|
+
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ["allowCustomValue", "autoFocus", "closeOnSelect", "collection", "composite", "defaultHighlightedValue", "defaultInputValue", "defaultOpen", "defaultValue", "disabled", "disableLayer", "form", "highlightedValue", "id", "ids", "inputBehavior", "inputValue", "invalid", "loopFocus", "multiple", "name", "navigate", "onFocusOutside", "onHighlightChange", "onInputValueChange", "onInteractOutside", "onOpenChange", "onOpenChange", "onPointerDownOutside", "onValueChange", "open", "openOnChange", "openOnClick", "openOnKeyPress", "placeholder", "positioning", "readOnly", "required", "scrollToIndexFn", "selectionBehavior", "translations", "value"]);
|
|
198
184
|
const api = useCombobox(useComboboxProps);
|
|
199
185
|
const apiPresence = usePresence(mergeProps(presenceProps, () => ({
|
|
200
186
|
present: api().open
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
splitPresenceProps,
|
|
4
4
|
usePresence,
|
|
5
5
|
usePresenceContext
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./2FYSIKNK.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,13 @@ import {
|
|
|
17
17
|
} from "./UFYZ7HLU.jsx";
|
|
18
18
|
import {
|
|
19
19
|
useEnvironmentContext
|
|
20
|
-
} from "./
|
|
20
|
+
} from "./BPYAMTER.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
27
|
import {
|
|
28
28
|
__export
|
|
29
29
|
} from "./7IUG3E2V.jsx";
|
|
@@ -108,19 +108,17 @@ import * as dialog from "@zag-js/dialog";
|
|
|
108
108
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
109
109
|
import { createMemo, createUniqueId } from "solid-js";
|
|
110
110
|
var useDialog = (props = {}) => {
|
|
111
|
+
const id = createUniqueId();
|
|
111
112
|
const locale = useLocaleContext();
|
|
112
113
|
const environment = useEnvironmentContext();
|
|
113
|
-
const
|
|
114
|
-
const context = createMemo(() => ({
|
|
114
|
+
const machineProps = createMemo(() => ({
|
|
115
115
|
id,
|
|
116
116
|
dir: locale().dir,
|
|
117
117
|
getRootNode: environment().getRootNode,
|
|
118
|
-
open: props.defaultOpen,
|
|
119
|
-
"open.controlled": props.open !== void 0,
|
|
120
118
|
...props
|
|
121
119
|
}));
|
|
122
|
-
const
|
|
123
|
-
return createMemo(() => dialog.connect(
|
|
120
|
+
const service = useMachine(dialog.machine, machineProps);
|
|
121
|
+
return createMemo(() => dialog.connect(service, normalizeProps));
|
|
124
122
|
};
|
|
125
123
|
|
|
126
124
|
// src/components/dialog/dialog-root.tsx
|
|
@@ -163,9 +161,7 @@ import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
|
163
161
|
var DialogRootProvider = (props) => {
|
|
164
162
|
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
165
163
|
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
166
|
-
const apiPresence = usePresence(
|
|
167
|
-
mergeProps7(presenceProps, () => ({ present: dialogProps.value().open }))
|
|
168
|
-
);
|
|
164
|
+
const apiPresence = usePresence(mergeProps7(presenceProps, () => ({ present: dialogProps.value().open })));
|
|
169
165
|
return <DialogProvider value={dialogProps.value}>
|
|
170
166
|
<RenderStrategyProvider value={renderStrategyProps}>
|
|
171
167
|
<PresenceProvider value={apiPresence}>{dialogProps.children}</PresenceProvider>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './KMFRZGLF.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
|
-
import { useEnvironmentContext } from './
|
|
5
|
-
import { useLocaleContext } from './
|
|
6
|
-
import { createContext } from './
|
|
4
|
+
import { useEnvironmentContext } from './6MQ6S5JP.js';
|
|
5
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
6
|
+
import { createContext } from './TROPIN4C.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
8
8
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
9
9
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
@@ -62,11 +62,11 @@ var EditablePreview = (props) => {
|
|
|
62
62
|
return createComponent(ark.span, mergedProps);
|
|
63
63
|
};
|
|
64
64
|
var useEditable = (props = {}) => {
|
|
65
|
+
const id = createUniqueId();
|
|
65
66
|
const locale = useLocaleContext();
|
|
66
67
|
const environment = useEnvironmentContext();
|
|
67
|
-
const id = createUniqueId();
|
|
68
68
|
const field = useFieldContext();
|
|
69
|
-
const
|
|
69
|
+
const machineProps = createMemo(() => ({
|
|
70
70
|
id,
|
|
71
71
|
ids: {
|
|
72
72
|
label: field?.().ids.label,
|
|
@@ -78,13 +78,10 @@ var useEditable = (props = {}) => {
|
|
|
78
78
|
readOnly: field?.().readOnly,
|
|
79
79
|
required: field?.().required,
|
|
80
80
|
getRootNode: environment().getRootNode,
|
|
81
|
-
edit: props.defaultEdit,
|
|
82
|
-
value: props.defaultValue,
|
|
83
|
-
"edit.controlled": props.edit !== void 0,
|
|
84
81
|
...props
|
|
85
82
|
}));
|
|
86
|
-
const
|
|
87
|
-
return createMemo(() => editable.connect(
|
|
83
|
+
const service = useMachine(editable.machine, machineProps);
|
|
84
|
+
return createMemo(() => editable.connect(service, normalizeProps));
|
|
88
85
|
};
|
|
89
86
|
|
|
90
87
|
// src/components/editable/editable-root.tsx
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./XHA6B6L2.jsx";
|
|
4
4
|
import {
|
|
5
5
|
PresenceProvider,
|
|
6
6
|
splitPresenceProps,
|
|
7
7
|
usePresence,
|
|
8
8
|
usePresenceContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./2FYSIKNK.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
} from "./UFYZ7HLU.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useEnvironmentContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./BPYAMTER.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
25
|
import {
|
|
26
26
|
__export
|
|
27
27
|
} from "./7IUG3E2V.jsx";
|
|
@@ -75,10 +75,7 @@ var ColorPickerAreaThumb = (props) => {
|
|
|
75
75
|
// src/components/color-picker/color-picker-channel-input.tsx
|
|
76
76
|
import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
77
77
|
var ColorPickerChannelInput = (props) => {
|
|
78
|
-
const [channelProps, inputProps] = createSplitProps()(props, [
|
|
79
|
-
"channel",
|
|
80
|
-
"orientation"
|
|
81
|
-
]);
|
|
78
|
+
const [channelProps, inputProps] = createSplitProps()(props, ["channel", "orientation"]);
|
|
82
79
|
const api = useColorPickerContext();
|
|
83
80
|
const mergedProps = mergeProps4(() => api().getChannelInputProps(channelProps), inputProps);
|
|
84
81
|
return <ark.input {...mergedProps} />;
|
|
@@ -102,10 +99,7 @@ var [ColorPickerFormatPropsProvider, useColorPickerFormatPropsContext] = createC
|
|
|
102
99
|
|
|
103
100
|
// src/components/color-picker/color-picker-channel-slider.tsx
|
|
104
101
|
var ColorPickerChannelSlider = (props) => {
|
|
105
|
-
const [channelProps, localProps] = createSplitProps()(props, [
|
|
106
|
-
"channel",
|
|
107
|
-
"orientation"
|
|
108
|
-
]);
|
|
102
|
+
const [channelProps, localProps] = createSplitProps()(props, ["channel", "orientation"]);
|
|
109
103
|
const api = useColorPickerContext();
|
|
110
104
|
const formatProps = useColorPickerFormatPropsContext();
|
|
111
105
|
const channelSliderProps = mergeProps5(channelProps, formatProps);
|
|
@@ -120,10 +114,7 @@ import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
|
120
114
|
var ColorPickerChannelSliderLabel = (props) => {
|
|
121
115
|
const colorPicker2 = useColorPickerContext();
|
|
122
116
|
const channelProps = useColorPickerChannelPropsContext();
|
|
123
|
-
const mergedProps = mergeProps6(
|
|
124
|
-
() => colorPicker2().getChannelSliderLabelProps(channelProps),
|
|
125
|
-
props
|
|
126
|
-
);
|
|
117
|
+
const mergedProps = mergeProps6(() => colorPicker2().getChannelSliderLabelProps(channelProps), props);
|
|
127
118
|
return <ark.label {...mergedProps} />;
|
|
128
119
|
};
|
|
129
120
|
|
|
@@ -155,10 +146,7 @@ var ColorPickerChannelSliderValueText = (props) => {
|
|
|
155
146
|
const colorPicker2 = useColorPickerContext();
|
|
156
147
|
const localeContext = useLocaleContext();
|
|
157
148
|
const channelProps = useColorPickerChannelPropsContext();
|
|
158
|
-
const mergedProps = mergeProps9(
|
|
159
|
-
() => colorPicker2().getChannelSliderValueTextProps(channelProps),
|
|
160
|
-
props
|
|
161
|
-
);
|
|
149
|
+
const mergedProps = mergeProps9(() => colorPicker2().getChannelSliderValueTextProps(channelProps), props);
|
|
162
150
|
return <ark.span {...mergedProps}>
|
|
163
151
|
{props.children || colorPicker2().getChannelValueText(channelProps.channel, localeContext().locale)}
|
|
164
152
|
</ark.span>;
|
|
@@ -206,9 +194,7 @@ var ColorPickerFormatSelect = (props) => {
|
|
|
206
194
|
const api = useColorPickerContext();
|
|
207
195
|
const mergedProps = mergeProps13(() => api().getFormatSelectProps(), props);
|
|
208
196
|
return <ark.select {...mergedProps}>
|
|
209
|
-
<Index each={["rgba", "hsla", "hsba"]}>
|
|
210
|
-
{(format) => <ark.option value={format()}>{format()}</ark.option>}
|
|
211
|
-
</Index>
|
|
197
|
+
<Index each={["rgba", "hsla", "hsba"]}>{(format) => <ark.option value={format()}>{format()}</ark.option>}</Index>
|
|
212
198
|
</ark.select>;
|
|
213
199
|
};
|
|
214
200
|
|
|
@@ -257,11 +243,11 @@ import * as colorPicker from "@zag-js/color-picker";
|
|
|
257
243
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
258
244
|
import { createMemo, createUniqueId } from "solid-js";
|
|
259
245
|
var useColorPicker = (props = {}) => {
|
|
246
|
+
const id = createUniqueId();
|
|
260
247
|
const locale = useLocaleContext();
|
|
261
248
|
const environment = useEnvironmentContext();
|
|
262
249
|
const field = useFieldContext();
|
|
263
|
-
const
|
|
264
|
-
const context = createMemo(() => ({
|
|
250
|
+
const machineProps = createMemo(() => ({
|
|
265
251
|
id,
|
|
266
252
|
ids: {
|
|
267
253
|
label: field?.().ids.label,
|
|
@@ -273,47 +259,42 @@ var useColorPicker = (props = {}) => {
|
|
|
273
259
|
readOnly: field?.().readOnly,
|
|
274
260
|
required: field?.().required,
|
|
275
261
|
getRootNode: environment().getRootNode,
|
|
276
|
-
open: props.defaultOpen,
|
|
277
|
-
"open.controlled": props.open !== void 0,
|
|
278
|
-
value: props.defaultValue,
|
|
279
262
|
...props
|
|
280
263
|
}));
|
|
281
|
-
const
|
|
282
|
-
return createMemo(() => colorPicker.connect(
|
|
264
|
+
const service = useMachine(colorPicker.machine, machineProps);
|
|
265
|
+
return createMemo(() => colorPicker.connect(service, normalizeProps));
|
|
283
266
|
};
|
|
284
267
|
|
|
285
268
|
// src/components/color-picker/color-picker-root.tsx
|
|
286
269
|
var ColorPickerRoot = (props) => {
|
|
287
270
|
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
|
-
);
|
|
271
|
+
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, [
|
|
272
|
+
"closeOnSelect",
|
|
273
|
+
"defaultOpen",
|
|
274
|
+
"defaultValue",
|
|
275
|
+
"defaultFormat",
|
|
276
|
+
"disabled",
|
|
277
|
+
"format",
|
|
278
|
+
"id",
|
|
279
|
+
"ids",
|
|
280
|
+
"initialFocusEl",
|
|
281
|
+
"invalid",
|
|
282
|
+
"name",
|
|
283
|
+
"name",
|
|
284
|
+
"onFocusOutside",
|
|
285
|
+
"onFormatChange",
|
|
286
|
+
"onInteractOutside",
|
|
287
|
+
"onOpenChange",
|
|
288
|
+
"onPointerDownOutside",
|
|
289
|
+
"onValueChange",
|
|
290
|
+
"onValueChangeEnd",
|
|
291
|
+
"open",
|
|
292
|
+
"openAutoFocus",
|
|
293
|
+
"positioning",
|
|
294
|
+
"readOnly",
|
|
295
|
+
"required",
|
|
296
|
+
"value"
|
|
297
|
+
]);
|
|
317
298
|
const api = useColorPicker(useColorPickerProps);
|
|
318
299
|
const apiPresence = usePresence(mergeProps18(presenceProps, () => ({ present: api().open })));
|
|
319
300
|
const mergedProps = mergeProps18(() => api().getRootProps(), localProps);
|
|
@@ -328,13 +309,8 @@ var ColorPickerRoot = (props) => {
|
|
|
328
309
|
import { mergeProps as mergeProps19 } from "@zag-js/solid";
|
|
329
310
|
var ColorPickerRootProvider = (props) => {
|
|
330
311
|
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
|
-
);
|
|
312
|
+
const [{ value: colorPicker2 }, localProps] = createSplitProps()(colorPickerProps, ["value"]);
|
|
313
|
+
const apiPresence = usePresence(mergeProps19(presenceProps, () => ({ present: colorPicker2().open })));
|
|
338
314
|
const mergedProps = mergeProps19(() => colorPicker2().getRootProps(), localProps);
|
|
339
315
|
return <ColorPickerProvider value={colorPicker2}>
|
|
340
316
|
<PresenceProvider value={apiPresence}>
|
|
@@ -354,10 +330,7 @@ var [ColorPickerSwatchPropsProvider, useColorPickerSwatchPropsContext] = createC
|
|
|
354
330
|
|
|
355
331
|
// src/components/color-picker/color-picker-swatch.tsx
|
|
356
332
|
var ColorPickerSwatch = (props) => {
|
|
357
|
-
const [swatchProps, localProps] = createSplitProps()(props, [
|
|
358
|
-
"respectAlpha",
|
|
359
|
-
"value"
|
|
360
|
-
]);
|
|
333
|
+
const [swatchProps, localProps] = createSplitProps()(props, ["respectAlpha", "value"]);
|
|
361
334
|
const api = useColorPickerContext();
|
|
362
335
|
const mergedProps = mergeProps20(() => api().getSwatchProps(swatchProps), localProps);
|
|
363
336
|
return <ColorPickerSwatchPropsProvider value={swatchProps}>
|
|
@@ -385,10 +358,7 @@ var ColorPickerSwatchIndicator = (props) => {
|
|
|
385
358
|
// src/components/color-picker/color-picker-swatch-trigger.tsx
|
|
386
359
|
import { mergeProps as mergeProps23 } from "@zag-js/solid";
|
|
387
360
|
var ColorPickerSwatchTrigger = (props) => {
|
|
388
|
-
const [triggerProps, localProps] = createSplitProps()(props, [
|
|
389
|
-
"value",
|
|
390
|
-
"disabled"
|
|
391
|
-
]);
|
|
361
|
+
const [triggerProps, localProps] = createSplitProps()(props, ["value", "disabled"]);
|
|
392
362
|
const api = useColorPickerContext();
|
|
393
363
|
const mergedProps = mergeProps23(() => api().getSwatchTriggerProps(triggerProps), localProps);
|
|
394
364
|
return <ark.button {...mergedProps} />;
|
|
@@ -415,9 +385,7 @@ var ColorPickerTrigger = (props) => {
|
|
|
415
385
|
import { mergeProps as mergeProps26 } from "@zag-js/solid";
|
|
416
386
|
import { createMemo as createMemo2 } from "solid-js";
|
|
417
387
|
var ColorPickerValueSwatch = (props) => {
|
|
418
|
-
const [{ respectAlpha }, localProps] = createSplitProps()(props, [
|
|
419
|
-
"respectAlpha"
|
|
420
|
-
]);
|
|
388
|
+
const [{ respectAlpha }, localProps] = createSplitProps()(props, ["respectAlpha"]);
|
|
421
389
|
const colorPicker2 = useColorPickerContext();
|
|
422
390
|
const swatchProps = createMemo2(() => ({
|
|
423
391
|
respectAlpha,
|
|
@@ -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';
|
|
@@ -25,20 +25,17 @@ var ToggleGroupItem = (props) => {
|
|
|
25
25
|
return createComponent(ark.button, mergedProps);
|
|
26
26
|
};
|
|
27
27
|
var useToggleGroup = (props = {}) => {
|
|
28
|
+
const id = createUniqueId();
|
|
28
29
|
const locale = useLocaleContext();
|
|
29
30
|
const environment = useEnvironmentContext();
|
|
30
|
-
const
|
|
31
|
-
const context = createMemo(() => ({
|
|
31
|
+
const machineProps = createMemo(() => ({
|
|
32
32
|
id,
|
|
33
33
|
dir: locale().dir,
|
|
34
34
|
getRootNode: environment().getRootNode,
|
|
35
|
-
value: props.defaultValue,
|
|
36
35
|
...props
|
|
37
36
|
}));
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
return createMemo(() => toggleGroup.connect(state, send, normalizeProps));
|
|
37
|
+
const service = useMachine(toggleGroup.machine, machineProps);
|
|
38
|
+
return createMemo(() => toggleGroup.connect(service, normalizeProps));
|
|
42
39
|
};
|
|
43
40
|
|
|
44
41
|
// src/components/toggle-group/toggle-group-root.tsx
|