@ark-ui/solid 4.10.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -9
- package/dist/chunk/{E72NMPSK.jsx → 2FYSIKNK.jsx} +5 -13
- package/dist/chunk/{ASCGEGA5.jsx → 2TEQVFZN.jsx} +11 -15
- package/dist/chunk/{2H4WHODR.js → 3CUJRNYI.js} +7 -10
- package/dist/chunk/{MRQ2UYM4.jsx → 3VB4UGEY.jsx} +8 -10
- package/dist/chunk/{ATMUKDFF.js → 44YJVOL2.js} +8 -10
- package/dist/chunk/{7YIHAT7J.jsx → 4D76BVTD.jsx} +35 -17
- package/dist/chunk/{VARNCRUN.js → 4E5OPUFZ.js} +16 -18
- package/dist/chunk/{5JS7LFUQ.js → 4GOBFWQB.js} +9 -8
- package/dist/chunk/{RAEDLHD3.js → 55NHLACH.js} +11 -14
- package/dist/chunk/{2HTNQLGP.jsx → 676ULDTZ.jsx} +9 -13
- package/dist/chunk/{U7SPBSDD.jsx → 6AKFQH4M.jsx} +8 -13
- package/dist/chunk/{QODB3C3M.js → 6MQ6S5JP.js} +8 -5
- package/dist/chunk/{CIPYIXIW.js → 6NMPU3T3.js} +8 -10
- package/dist/chunk/{FNEB2RAF.js → 6VITT55B.js} +9 -10
- package/dist/chunk/{MQDN267C.jsx → 7AJYNPOZ.jsx} +8 -11
- package/dist/chunk/{EHJDQTTW.jsx → 7IAJIOJR.jsx} +3 -16
- package/dist/chunk/{UGKLUHKU.js → A4HLKXDW.js} +8 -11
- package/dist/chunk/{3LRXHWW2.js → A6LAAZDX.js} +32 -27
- package/dist/chunk/{LVPQ6GR4.js → AIQ2GVFX.js} +6 -7
- package/dist/chunk/{JVXNYKNA.js → ANDTZLCB.js} +8 -10
- package/dist/chunk/{5O4RWSWO.jsx → BPYAMTER.jsx} +6 -4
- package/dist/chunk/{AIQFNVCU.jsx → BTPWLTJU.jsx} +9 -18
- package/dist/chunk/{6MXKM4GA.js → C4WAO4VB.js} +9 -10
- package/dist/chunk/{2W32Z6JZ.js → DBAO7VQW.js} +9 -10
- package/dist/chunk/{5SRZ3YYC.js → DEA5DIWS.js} +7 -8
- package/dist/chunk/{CCA5XJM6.jsx → DH5DKFFF.jsx} +19 -37
- package/dist/chunk/{Y4LH2CR6.jsx → DS2MX7YY.jsx} +8 -11
- package/dist/chunk/{34OZO53S.js → DVI7TRLG.js} +9 -12
- package/dist/chunk/{QQUR4MWN.js → E2TLJMGI.js} +15 -17
- package/dist/chunk/{H4RSHLA7.jsx → EH5LPBSV.jsx} +9 -13
- package/dist/chunk/{F3QPTRGW.jsx → EIGYBOW2.jsx} +27 -34
- package/dist/chunk/{HU7FZMJI.jsx → ENXUS2WG.jsx} +9 -14
- package/dist/chunk/{AX5SMQMA.js → EUXWRO3A.js} +16 -17
- package/dist/chunk/{K54W24N6.jsx → FHWNUAQM.jsx} +10 -15
- package/dist/chunk/{7S43DIPW.js → FX6TOMB3.js} +13 -25
- package/dist/chunk/{MBQQASZE.js → GUQTNAZU.js} +9 -10
- package/dist/chunk/{B7LE23PE.jsx → H5QZC4VW.jsx} +9 -13
- package/dist/chunk/{NK4T7LIZ.jsx → H7SWP54F.jsx} +7 -11
- package/dist/chunk/{M2FICVVI.js → HQEG6EKY.js} +9 -11
- package/dist/chunk/{U3XJZI3X.jsx → I4VF53LH.jsx} +15 -25
- package/dist/chunk/{G2WIACWP.js → JOWPVE6E.js} +8 -9
- package/dist/chunk/{SN5TXTB6.jsx → JZ7ZQZT4.jsx} +17 -54
- package/dist/chunk/{X3BMEEJH.js → KMFRZGLF.js} +34 -14
- package/dist/chunk/{GZVCPLKK.jsx → KQ4BIFPS.jsx} +9 -10
- package/dist/chunk/{WPFSEVTX.js → LFWIA7VB.js} +11 -14
- package/dist/chunk/{3O5VTKDF.jsx → LKOJO4VB.jsx} +16 -32
- package/dist/chunk/{5XD5ZSBX.js → M2C67TPA.js} +13 -17
- package/dist/chunk/{2GATVLPK.js → M63JXHU4.js} +7 -8
- package/dist/chunk/MOG4V2NQ.jsx +15 -0
- package/dist/chunk/{XUVXUPEH.js → MZD7ZKWI.js} +2 -7
- package/dist/chunk/{YCYZZGN2.jsx → NCURFCYQ.jsx} +9 -8
- package/dist/chunk/{5ONYCKM3.jsx → NEBB7COJ.jsx} +1 -1
- package/dist/chunk/{Q7NPTAJI.js → NNZQ2FQW.js} +8 -9
- package/dist/chunk/{QGV2SUTQ.jsx → O5AHG7DQ.jsx} +16 -19
- package/dist/chunk/{6YQ3EF2J.js → O62NKGT4.js} +9 -11
- package/dist/chunk/{2J42A7KM.js → OA5UZFKE.js} +2 -2
- package/dist/chunk/{CPMYIT5J.jsx → OAH52ZNM.jsx} +11 -12
- package/dist/chunk/OAPCRIL5.js +8 -0
- package/dist/chunk/{T4NRAKVA.jsx → OEZAIQU2.jsx} +9 -10
- package/dist/chunk/{YV5BACLX.js → OIGKROX4.js} +9 -9
- package/dist/chunk/{IQJBNZOX.jsx → PES3MXH3.jsx} +8 -6
- package/dist/chunk/{DXYB7RYX.js → PJNGX4UT.js} +9 -8
- package/dist/chunk/{3HMZSTYX.js → PL4PGQFF.js} +8 -10
- package/dist/chunk/{PRMWTLUY.jsx → POFK2TVP.jsx} +8 -9
- package/dist/chunk/{WKVZFHUH.jsx → PVOFTEOB.jsx} +14 -25
- package/dist/chunk/{HPDOBQ3V.js → QEMQBM6W.js} +1 -1
- package/dist/chunk/{L7OSYHVR.js → QFAL6GWC.js} +1 -1
- package/dist/chunk/{PSLLOEMD.js → QKFZ3XTM.js} +14 -28
- package/dist/chunk/{IZC6PKGT.jsx → QZQUUXCF.jsx} +10 -14
- package/dist/chunk/{MMS6MJ72.js → R6Q7TUSQ.js} +8 -11
- package/dist/chunk/{3QQZKR3F.jsx → RCXMZN3G.jsx} +1 -1
- package/dist/chunk/{WM2IZOYM.jsx → RG3IJESS.jsx} +48 -80
- package/dist/chunk/{SWUA2VFC.js → SAI3RCJY.js} +7 -10
- package/dist/chunk/{ZC6KWJ4T.jsx → SBKJA5N2.jsx} +7 -12
- package/dist/chunk/{RZBYC7DR.jsx → SBLZHOW2.jsx} +3 -12
- package/dist/chunk/SDD2HKR3.js +71 -0
- package/dist/chunk/{WIVXL7HJ.jsx → SL2ZPLSH.jsx} +9 -13
- package/dist/chunk/{3WGLTS6O.js → SRPSYZUL.js} +7 -8
- package/dist/chunk/{DOPROT6M.jsx → SWZSXMPJ.jsx} +10 -8
- package/dist/chunk/{BY62F4IV.jsx → TEZHN26Z.jsx} +8 -11
- package/dist/chunk/{5EVN6V64.js → TMTD3AUG.js} +12 -15
- package/dist/chunk/{I5UG2QUO.js → TROPIN4C.js} +1 -7
- package/dist/chunk/{NMGUCD2L.jsx → TVCIHLER.jsx} +2 -11
- package/dist/chunk/{5CYHETDY.js → UIAQFG6P.js} +7 -7
- package/dist/chunk/{7PKUSZKY.jsx → USV2CYTP.jsx} +9 -9
- package/dist/chunk/{GXWVYON6.js → V2YBSJKS.js} +8 -10
- package/dist/chunk/{WQQVH7YG.jsx → VLUE7XIS.jsx} +34 -19
- package/dist/chunk/{TC2QHQ47.jsx → WPEIDU6T.jsx} +17 -42
- package/dist/chunk/{LCESUDZB.js → WRLQ7Y6E.js} +5 -13
- package/dist/chunk/{34MDPAG6.js → WT3OTYHP.js} +27 -11
- package/dist/chunk/{IOTZAUDA.jsx → WUTUKX4C.jsx} +1 -1
- package/dist/chunk/{DU4TY3XA.jsx → WZ7FNJXM.jsx} +11 -15
- package/dist/chunk/X34KVQNW.js +1 -1
- package/dist/chunk/{P7I44WC4.jsx → XHA6B6L2.jsx} +21 -22
- package/dist/chunk/{TOVWS5LG.jsx → XNZ7GOP4.jsx} +15 -24
- package/dist/chunk/{MYMGOYXH.js → XR4WJDUT.js} +2 -2
- package/dist/chunk/{SJSLQDBZ.jsx → YE6V66JY.jsx} +10 -18
- package/dist/chunk/{W43X4SNE.js → YS6KIHEB.js} +6 -6
- package/dist/chunk/{QZYE5W7T.jsx → ZOMTU4P2.jsx} +11 -19
- package/dist/components/accordion/index.d.ts +2 -7
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +7 -8
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +5 -6
- package/dist/components/carousel/index.d.ts +3 -8
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.jsx +5 -6
- package/dist/components/checkbox/index.d.ts +3 -8
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +8 -9
- package/dist/components/clipboard/index.d.ts +2 -2
- package/dist/components/clipboard/index.js +1 -1
- package/dist/components/clipboard/index.jsx +5 -6
- package/dist/components/collapsible/index.d.ts +2 -7
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/index.jsx +6 -7
- package/dist/components/collection.d.ts +3 -3
- package/dist/components/collection.js +1 -1
- package/dist/components/collection.jsx +1 -1
- package/dist/components/color-picker/index.d.ts +4 -14
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +10 -10
- package/dist/components/combobox/index.d.ts +3 -13
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/combobox/index.jsx +12 -12
- package/dist/components/date-picker/index.d.ts +4 -16
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.jsx +7 -8
- package/dist/components/dialog/index.d.ts +3 -8
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.jsx +7 -8
- package/dist/components/editable/index.d.ts +2 -12
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +8 -8
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +4 -3
- package/dist/components/fieldset/index.d.ts +2 -2
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/fieldset/index.jsx +2 -2
- package/dist/components/file-upload/index.d.ts +2 -2
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +8 -8
- package/dist/components/focus-trap/index.d.ts +1 -1
- package/dist/components/format/index.js +1 -1
- package/dist/components/format/index.jsx +4 -5
- package/dist/components/frame/index.js +1 -1
- package/dist/components/frame/index.jsx +4 -5
- package/dist/components/hover-card/index.d.ts +3 -8
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/index.jsx +7 -8
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +45 -45
- package/dist/components/index.jsx +295 -297
- package/dist/components/menu/index.d.ts +4 -9
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +7 -8
- package/dist/components/number-input/index.d.ts +2 -7
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/index.jsx +8 -8
- package/dist/components/pagination/index.d.ts +2 -7
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.jsx +5 -6
- package/dist/components/pin-input/index.d.ts +2 -7
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +8 -8
- package/dist/components/popover/index.d.ts +3 -8
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.jsx +7 -8
- package/dist/components/presence/index.d.ts +2 -2
- package/dist/components/presence/index.js +1 -1
- package/dist/components/presence/index.jsx +3 -3
- package/dist/components/progress/index.d.ts +2 -7
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.jsx +5 -6
- package/dist/components/qr-code/index.d.ts +2 -7
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/index.jsx +5 -6
- package/dist/components/radio-group/index.d.ts +2 -7
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/index.jsx +5 -6
- package/dist/components/rating-group/index.d.ts +5 -10
- package/dist/components/rating-group/index.js +1 -1
- package/dist/components/rating-group/index.jsx +8 -8
- package/dist/components/segment-group/index.d.ts +3 -8
- package/dist/components/segment-group/index.js +1 -1
- package/dist/components/segment-group/index.jsx +5 -6
- package/dist/components/select/index.d.ts +3 -13
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.jsx +12 -12
- package/dist/components/signature-pad/index.d.ts +2 -2
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +8 -8
- package/dist/components/slider/index.d.ts +3 -8
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.jsx +5 -6
- package/dist/components/splitter/index.d.ts +3 -8
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/splitter/index.jsx +5 -6
- package/dist/components/steps/index.d.ts +6 -10
- package/dist/components/steps/index.js +1 -1
- package/dist/components/steps/index.jsx +5 -6
- package/dist/components/switch/index.d.ts +2 -7
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.jsx +8 -8
- package/dist/components/tabs/index.d.ts +2 -7
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.jsx +7 -8
- package/dist/components/tags-input/index.d.ts +2 -7
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/index.jsx +8 -8
- package/dist/components/time-picker/index.d.ts +3 -13
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/index.jsx +7 -8
- package/dist/components/timer/index.d.ts +2 -2
- package/dist/components/timer/index.js +1 -1
- package/dist/components/timer/index.jsx +5 -6
- package/dist/components/toast/index.d.ts +6 -7
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.jsx +5 -2
- package/dist/components/toggle/index.d.ts +5 -34
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/index.jsx +2 -4
- package/dist/components/toggle-group/index.d.ts +3 -8
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/index.jsx +5 -6
- package/dist/components/tooltip/index.d.ts +3 -8
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.jsx +7 -8
- package/dist/components/tour/index.d.ts +4 -4
- package/dist/components/tour/index.js +1 -1
- package/dist/components/tour/index.jsx +7 -8
- package/dist/components/tree-view/index.d.ts +6 -16
- package/dist/components/tree-view/index.js +2 -2
- package/dist/components/tree-view/index.jsx +9 -10
- package/dist/index.d.ts +2 -1
- package/dist/index.js +47 -47
- package/dist/index.jsx +295 -297
- package/dist/providers/environment/index.js +1 -1
- package/dist/providers/environment/index.jsx +2 -3
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.jsx +3 -4
- package/dist/providers/locale/index.js +1 -1
- package/dist/providers/locale/index.jsx +2 -2
- package/dist/{use-presence-Ct1onT3-.d.ts → use-presence-C07V_WCb.d.ts} +1 -1
- package/package.json +71 -78
- package/dist/chunk/52WUF3CY.jsx +0 -26
- package/dist/chunk/BSPFGETO.js +0 -21
- package/dist/chunk/CTTG4GSG.js +0 -30
- package/dist/chunk/DT73WLR4.js +0 -5
- package/dist/chunk/JHG4EID2.jsx +0 -233
- package/dist/chunk/KGOB2IMX.jsx +0 -7
- package/dist/chunk/MV3KTL7M.js +0 -107
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
import { splitRenderStrategyProps } from './
|
|
1
|
+
import { splitRenderStrategyProps } from './QFAL6GWC.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
|
-
import { createContext } from './
|
|
4
|
+
import { createContext } from './TROPIN4C.js';
|
|
5
5
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
6
6
|
import { useMachine, normalizeProps, mergeProps } from '@zag-js/solid';
|
|
7
7
|
import { createSignal, createMemo, createEffect, Show } from 'solid-js';
|
|
8
8
|
import * as presence from '@zag-js/presence';
|
|
9
9
|
|
|
10
10
|
// src/components/presence/split-presence-props.ts
|
|
11
|
-
var splitPresenceProps = (props) => createSplitProps()(props, [
|
|
12
|
-
"immediate",
|
|
13
|
-
"lazyMount",
|
|
14
|
-
"onExitComplete",
|
|
15
|
-
"present",
|
|
16
|
-
"unmountOnExit"
|
|
17
|
-
]);
|
|
11
|
+
var splitPresenceProps = (props) => createSplitProps()(props, ["immediate", "lazyMount", "onExitComplete", "present", "unmountOnExit"]);
|
|
18
12
|
var usePresence = (props) => {
|
|
19
13
|
const [renderStrategyProps, context] = splitRenderStrategyProps(props);
|
|
20
14
|
const [wasEverPresent, setWasEverPresent] = createSignal(false);
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
const api = createMemo(() => presence.connect(state, send, normalizeProps));
|
|
15
|
+
const service = useMachine(presence.machine, props);
|
|
16
|
+
const api = createMemo(() => presence.connect(service, normalizeProps));
|
|
25
17
|
createEffect(() => {
|
|
26
18
|
const present = api().present;
|
|
27
19
|
if (present) setWasEverPresent(true);
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useFieldContext } from './X3BMEEJH.js';
|
|
1
|
+
import { useFieldContext } from './KMFRZGLF.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, runIfFn } from './6MQ6S5JP.js';
|
|
5
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
6
|
+
import { createContext } from './TROPIN4C.js';
|
|
8
7
|
import { __export } from './ESLJRKWD.js';
|
|
9
8
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
10
9
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
11
10
|
import * as checkbox from '@zag-js/checkbox';
|
|
12
11
|
import { anatomy } from '@zag-js/checkbox';
|
|
13
|
-
import { createMemo, createUniqueId } from 'solid-js';
|
|
12
|
+
import { createMemo, createUniqueId, createSignal, untrack } from 'solid-js';
|
|
14
13
|
|
|
15
14
|
// src/components/checkbox/use-checkbox-context.ts
|
|
16
15
|
var [CheckboxProvider, useCheckboxContext] = createContext({
|
|
@@ -26,6 +25,24 @@ var CheckboxControl = (props) => {
|
|
|
26
25
|
return createComponent(ark.div, mergedProps);
|
|
27
26
|
};
|
|
28
27
|
var checkboxAnatomy = anatomy.extendWith("group");
|
|
28
|
+
function useControllableState(props) {
|
|
29
|
+
const [uncontrolledValue, setUncontrolledValue] = createSignal(runIfFn(props.defaultValue));
|
|
30
|
+
const controlled = createMemo(() => props.value?.() !== void 0);
|
|
31
|
+
const currentValue = createMemo(() => controlled() ? props.value?.() : uncontrolledValue());
|
|
32
|
+
const setValue = (next) => {
|
|
33
|
+
untrack(() => {
|
|
34
|
+
const nextValue = runIfFn(next, currentValue());
|
|
35
|
+
if (controlled()) {
|
|
36
|
+
return props.onChange?.(nextValue);
|
|
37
|
+
}
|
|
38
|
+
setUncontrolledValue(nextValue);
|
|
39
|
+
return props.onChange?.(nextValue);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return [currentValue, setValue];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/components/checkbox/use-checkbox-group.ts
|
|
29
46
|
function useCheckboxGroup(props = {}) {
|
|
30
47
|
const interactive = createMemo(() => !(props.disabled || props.readOnly));
|
|
31
48
|
const [value, setValue] = useControllableState({
|
|
@@ -128,11 +145,11 @@ var useCheckbox = (ownProps = {}) => {
|
|
|
128
145
|
const props = createMemo(() => {
|
|
129
146
|
return mergeProps(ownProps, checkboxGroup?.().getItemProps({ value: ownProps.value }) ?? {});
|
|
130
147
|
}, [ownProps, checkboxGroup]);
|
|
148
|
+
const id = createUniqueId();
|
|
131
149
|
const locale = useLocaleContext();
|
|
132
150
|
const environment = useEnvironmentContext();
|
|
133
|
-
const id = createUniqueId();
|
|
134
151
|
const field = useFieldContext();
|
|
135
|
-
const
|
|
152
|
+
const machineProps = createMemo(() => ({
|
|
136
153
|
id,
|
|
137
154
|
ids: {
|
|
138
155
|
label: field?.().ids.label,
|
|
@@ -144,11 +161,10 @@ var useCheckbox = (ownProps = {}) => {
|
|
|
144
161
|
required: field?.().required,
|
|
145
162
|
dir: locale().dir,
|
|
146
163
|
getRootNode: environment().getRootNode,
|
|
147
|
-
checked: props().defaultChecked,
|
|
148
164
|
...props()
|
|
149
165
|
}));
|
|
150
|
-
const
|
|
151
|
-
return createMemo(() => checkbox.connect(
|
|
166
|
+
const service = useMachine(checkbox.machine, machineProps);
|
|
167
|
+
return createMemo(() => checkbox.connect(service, normalizeProps));
|
|
152
168
|
};
|
|
153
169
|
|
|
154
170
|
// src/components/checkbox/checkbox-root.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./XHA6B6L2.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./BPYAMTER.jsx";
|
|
13
13
|
import {
|
|
14
14
|
useLocaleContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./RCXMZN3G.jsx";
|
|
16
16
|
import {
|
|
17
17
|
createContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./TVCIHLER.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -82,11 +82,7 @@ var [TagsInputItemPropsProvider, useTagsInputItemPropsContext] = createContext({
|
|
|
82
82
|
|
|
83
83
|
// src/components/tags-input/tags-input-item.tsx
|
|
84
84
|
var TagsInputItem = (props) => {
|
|
85
|
-
const [itemProps, localProps] = createSplitProps()(props, [
|
|
86
|
-
"disabled",
|
|
87
|
-
"index",
|
|
88
|
-
"value"
|
|
89
|
-
]);
|
|
85
|
+
const [itemProps, localProps] = createSplitProps()(props, ["disabled", "index", "value"]);
|
|
90
86
|
const api = useTagsInputContext();
|
|
91
87
|
const mergedProps = mergeProps5(() => api().getItemProps(itemProps), localProps);
|
|
92
88
|
const itemState = createMemo(() => api().getItemState(itemProps));
|
|
@@ -152,11 +148,11 @@ import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
|
152
148
|
import * as tagsInput from "@zag-js/tags-input";
|
|
153
149
|
import { createMemo as createMemo2, createUniqueId } from "solid-js";
|
|
154
150
|
var useTagsInput = (props = {}) => {
|
|
151
|
+
const id = createUniqueId();
|
|
155
152
|
const locale = useLocaleContext();
|
|
156
153
|
const environment = useEnvironmentContext();
|
|
157
|
-
const id = createUniqueId();
|
|
158
154
|
const field = useFieldContext();
|
|
159
|
-
const
|
|
155
|
+
const machineProps = createMemo2(() => ({
|
|
160
156
|
id,
|
|
161
157
|
ids: {
|
|
162
158
|
label: field?.().ids.label,
|
|
@@ -168,11 +164,10 @@ var useTagsInput = (props = {}) => {
|
|
|
168
164
|
readOnly: field?.().readOnly,
|
|
169
165
|
required: field?.().required,
|
|
170
166
|
getRootNode: environment().getRootNode,
|
|
171
|
-
value: props.defaultValue,
|
|
172
167
|
...props
|
|
173
168
|
}));
|
|
174
|
-
const
|
|
175
|
-
return createMemo2(() => tagsInput.connect(
|
|
169
|
+
const service = useMachine(tagsInput.machine, machineProps);
|
|
170
|
+
return createMemo2(() => tagsInput.connect(service, normalizeProps));
|
|
176
171
|
};
|
|
177
172
|
|
|
178
173
|
// src/components/tags-input/tags-input-root.tsx
|
|
@@ -182,8 +177,9 @@ var TagsInputRoot = (props) => {
|
|
|
182
177
|
"allowOverflow",
|
|
183
178
|
"autoFocus",
|
|
184
179
|
"blurBehavior",
|
|
185
|
-
"
|
|
180
|
+
"defaultInputValue",
|
|
186
181
|
"defaultValue",
|
|
182
|
+
"delimiter",
|
|
187
183
|
"disabled",
|
|
188
184
|
"editable",
|
|
189
185
|
"form",
|
package/dist/chunk/X34KVQNW.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
|
-
import { createComponent, spread, insert
|
|
2
|
+
import { createComponent, template, spread, insert } from 'solid-js/web';
|
|
3
3
|
import { createMemo, For, Show } from 'solid-js';
|
|
4
4
|
import { highlightWord } from '@zag-js/highlight-word';
|
|
5
5
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldsetContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./SBLZHOW2.jsx";
|
|
4
|
+
import {
|
|
5
|
+
composeRefs
|
|
6
|
+
} from "./DOBZPYAN.jsx";
|
|
4
7
|
import {
|
|
5
8
|
createSplitProps
|
|
6
9
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,7 +12,7 @@ import {
|
|
|
9
12
|
} from "./UFYZ7HLU.jsx";
|
|
10
13
|
import {
|
|
11
14
|
createContext
|
|
12
|
-
} from "./
|
|
15
|
+
} from "./TVCIHLER.jsx";
|
|
13
16
|
import {
|
|
14
17
|
__export
|
|
15
18
|
} from "./7IUG3E2V.jsx";
|
|
@@ -75,14 +78,7 @@ import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
|
75
78
|
|
|
76
79
|
// src/components/field/use-field.ts
|
|
77
80
|
import { ariaAttr, dataAttr, getWindow } from "@zag-js/dom-query";
|
|
78
|
-
import {
|
|
79
|
-
createEffect,
|
|
80
|
-
createMemo,
|
|
81
|
-
createSignal,
|
|
82
|
-
createUniqueId,
|
|
83
|
-
mergeProps as mergeProps6,
|
|
84
|
-
onCleanup
|
|
85
|
-
} from "solid-js";
|
|
81
|
+
import { createMemo, createSignal, createUniqueId, mergeProps as mergeProps6, onCleanup, onMount } from "solid-js";
|
|
86
82
|
|
|
87
83
|
// src/components/field/field.anatomy.ts
|
|
88
84
|
import { createAnatomy } from "@zag-js/anatomy";
|
|
@@ -108,13 +104,13 @@ var useField = (props) => {
|
|
|
108
104
|
const [hasErrorText, setHasErrorText] = createSignal(false);
|
|
109
105
|
const [hasHelperText, setHasHelperText] = createSignal(false);
|
|
110
106
|
const id = fieldProps.id ?? createUniqueId();
|
|
111
|
-
|
|
107
|
+
const [rootRef, setRootRef] = createSignal(void 0);
|
|
112
108
|
const rootId = fieldProps.ids?.control ?? `field::${id}`;
|
|
113
109
|
const errorTextId = fieldProps.ids?.errorText ?? `field::${id}::error-text`;
|
|
114
110
|
const helperTextId = fieldProps.ids?.helperText ?? `field::${id}::helper-text`;
|
|
115
111
|
const labelId = fieldProps.ids?.label ?? `field::${id}::label`;
|
|
116
|
-
|
|
117
|
-
const rootNode = rootRef;
|
|
112
|
+
onMount(() => {
|
|
113
|
+
const rootNode = rootRef();
|
|
118
114
|
if (!rootNode) return;
|
|
119
115
|
const win = getWindow(rootNode);
|
|
120
116
|
const doc = win.document;
|
|
@@ -143,11 +139,14 @@ var useField = (props) => {
|
|
|
143
139
|
"data-readonly": dataAttr(fieldProps.readOnly),
|
|
144
140
|
htmlFor: id
|
|
145
141
|
});
|
|
146
|
-
const labelIds =
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
const labelIds = createMemo(() => {
|
|
143
|
+
const ids = [];
|
|
144
|
+
if (hasErrorText() && fieldProps.invalid) ids.push(errorTextId);
|
|
145
|
+
if (hasHelperText()) ids.push(helperTextId);
|
|
146
|
+
return ids;
|
|
147
|
+
});
|
|
149
148
|
const getControlProps = () => ({
|
|
150
|
-
"aria-describedby": labelIds.join(" ") || void 0,
|
|
149
|
+
"aria-describedby": labelIds().join(" ") || void 0,
|
|
151
150
|
"aria-invalid": ariaAttr(fieldProps.invalid),
|
|
152
151
|
"data-invalid": dataAttr(fieldProps.invalid),
|
|
153
152
|
"data-required": dataAttr(fieldProps.required),
|
|
@@ -184,7 +183,7 @@ var useField = (props) => {
|
|
|
184
183
|
...parts.requiredIndicator.attrs
|
|
185
184
|
});
|
|
186
185
|
return createMemo(() => ({
|
|
187
|
-
ariaDescribedby: labelIds.join(" "),
|
|
186
|
+
ariaDescribedby: labelIds().join(" "),
|
|
188
187
|
ids: {
|
|
189
188
|
control: id,
|
|
190
189
|
label: labelId,
|
|
@@ -192,7 +191,7 @@ var useField = (props) => {
|
|
|
192
191
|
helperText: helperTextId
|
|
193
192
|
},
|
|
194
193
|
refs: {
|
|
195
|
-
rootRef
|
|
194
|
+
rootRef: setRootRef
|
|
196
195
|
},
|
|
197
196
|
disabled: fieldProps.disabled,
|
|
198
197
|
invalid: fieldProps.invalid,
|
|
@@ -222,7 +221,7 @@ var FieldRoot = (props) => {
|
|
|
222
221
|
const field = useField(useFieldProps);
|
|
223
222
|
const mergedProps = mergeProps7(() => field().getRootProps(), localProps);
|
|
224
223
|
return <FieldProvider value={field}>
|
|
225
|
-
<ark.div {...mergedProps} />
|
|
224
|
+
<ark.div {...mergedProps} ref={composeRefs(field().refs.rootRef, props.ref)} />
|
|
226
225
|
</FieldProvider>;
|
|
227
226
|
};
|
|
228
227
|
|
|
@@ -247,7 +246,7 @@ var FieldSelect = (props) => {
|
|
|
247
246
|
// src/components/field/field-textarea.tsx
|
|
248
247
|
import { autoresizeTextarea } from "@zag-js/auto-resize";
|
|
249
248
|
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
250
|
-
import { createEffect
|
|
249
|
+
import { createEffect } from "solid-js";
|
|
251
250
|
var FieldTextarea = (props) => {
|
|
252
251
|
const field = useFieldContext();
|
|
253
252
|
let textareaRef;
|
|
@@ -257,7 +256,7 @@ var FieldTextarea = (props) => {
|
|
|
257
256
|
() => ({ style: { resize: autoresize ? "none" : void 0 } }),
|
|
258
257
|
textareaProps
|
|
259
258
|
);
|
|
260
|
-
|
|
259
|
+
createEffect(() => {
|
|
261
260
|
if (!autoresize) return;
|
|
262
261
|
const cleanup = autoresizeTextarea(textareaRef);
|
|
263
262
|
return cleanup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./XHA6B6L2.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./UFYZ7HLU.jsx";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironmentContext
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./BPYAMTER.jsx";
|
|
13
13
|
import {
|
|
14
14
|
useLocaleContext
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./RCXMZN3G.jsx";
|
|
16
16
|
import {
|
|
17
17
|
createContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./TVCIHLER.jsx";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./7IUG3E2V.jsx";
|
|
@@ -24,12 +24,10 @@ import {
|
|
|
24
24
|
import { mergeProps } from "@zag-js/solid";
|
|
25
25
|
|
|
26
26
|
// src/components/signature-pad/use-signature-pad-context.ts
|
|
27
|
-
var [SignaturePadProvider, useSignaturePadContext] = createContext(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
);
|
|
27
|
+
var [SignaturePadProvider, useSignaturePadContext] = createContext({
|
|
28
|
+
hookName: "useSignaturePadContext",
|
|
29
|
+
providerName: "<SignaturePadProvider />"
|
|
30
|
+
});
|
|
33
31
|
|
|
34
32
|
// src/components/signature-pad/signature-pad-clear-trigger.tsx
|
|
35
33
|
var SignaturePadClearTrigger = (props) => {
|
|
@@ -62,10 +60,7 @@ import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
|
62
60
|
var SignaturePadHiddenInput = (props) => {
|
|
63
61
|
const [hiddenInputProps, localProps] = createSplitProps()(props, ["value"]);
|
|
64
62
|
const signaturePad2 = useSignaturePadContext();
|
|
65
|
-
const mergedProps = mergeProps4(
|
|
66
|
-
() => signaturePad2().getHiddenInputProps(hiddenInputProps),
|
|
67
|
-
localProps
|
|
68
|
-
);
|
|
63
|
+
const mergedProps = mergeProps4(() => signaturePad2().getHiddenInputProps(hiddenInputProps), localProps);
|
|
69
64
|
const field = useFieldContext();
|
|
70
65
|
return <ark.input aria-describedby={field?.().ariaDescribedby} {...mergedProps} />;
|
|
71
66
|
};
|
|
@@ -86,11 +81,11 @@ import * as signaturePad from "@zag-js/signature-pad";
|
|
|
86
81
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
87
82
|
import { createMemo, createUniqueId } from "solid-js";
|
|
88
83
|
var useSignaturePad = (props = {}) => {
|
|
84
|
+
const id = createUniqueId();
|
|
89
85
|
const locale = useLocaleContext();
|
|
90
86
|
const environment = useEnvironmentContext();
|
|
91
|
-
const id = createUniqueId();
|
|
92
87
|
const field = useFieldContext();
|
|
93
|
-
const
|
|
88
|
+
const machineProps = createMemo(() => ({
|
|
94
89
|
id,
|
|
95
90
|
ids: {
|
|
96
91
|
label: field?.().ids.label,
|
|
@@ -103,8 +98,8 @@ var useSignaturePad = (props = {}) => {
|
|
|
103
98
|
getRootNode: environment().getRootNode,
|
|
104
99
|
...props
|
|
105
100
|
}));
|
|
106
|
-
const
|
|
107
|
-
return createMemo(() => signaturePad.connect(
|
|
101
|
+
const service = useMachine(signaturePad.machine, machineProps);
|
|
102
|
+
return createMemo(() => signaturePad.connect(service, normalizeProps));
|
|
108
103
|
};
|
|
109
104
|
|
|
110
105
|
// src/components/signature-pad/signature-pad-root.tsx
|
|
@@ -132,9 +127,7 @@ var SignaturePadRoot = (props) => {
|
|
|
132
127
|
// src/components/signature-pad/signature-pad-root-provider.tsx
|
|
133
128
|
import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
134
129
|
var SignaturePadRootProvider = (props) => {
|
|
135
|
-
const [{ value: signaturePad2 }, localProps] = createSplitProps()(props, [
|
|
136
|
-
"value"
|
|
137
|
-
]);
|
|
130
|
+
const [{ value: signaturePad2 }, localProps] = createSplitProps()(props, ["value"]);
|
|
138
131
|
const mergedProps = mergeProps7(() => signaturePad2().getRootProps(), localProps);
|
|
139
132
|
return <SignaturePadProvider value={signaturePad2}>
|
|
140
133
|
<ark.div {...mergedProps} />
|
|
@@ -149,9 +142,7 @@ var SignaturePadSegment = (props) => {
|
|
|
149
142
|
const mergedProps = mergeProps8(() => signaturePad2().getSegmentProps(), props);
|
|
150
143
|
return <ark.svg {...mergedProps}>
|
|
151
144
|
<title>Signature</title>
|
|
152
|
-
<For each={signaturePad2().paths}>
|
|
153
|
-
{(path) => <path {...signaturePad2().getSegmentPathProps({ path })} />}
|
|
154
|
-
</For>
|
|
145
|
+
<For each={signaturePad2().paths}>{(path) => <path {...signaturePad2().getSegmentPathProps({ path })} />}</For>
|
|
155
146
|
<Show when={signaturePad2().currentPath}>
|
|
156
147
|
{
|
|
157
148
|
/* @ts-expect-error */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useLocaleContext } from './
|
|
1
|
+
import { useLocaleContext } from './QEMQBM6W.js';
|
|
2
2
|
import { __export } from './ESLJRKWD.js';
|
|
3
|
-
import {
|
|
3
|
+
import { formatNumber, formatBytes } from '@zag-js/i18n-utils';
|
|
4
4
|
import { splitProps, createMemo } from 'solid-js';
|
|
5
5
|
|
|
6
6
|
var FormatByte = (props) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collapsible_exports,
|
|
3
3
|
useCollapsibleContext
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./H5QZC4VW.jsx";
|
|
5
5
|
import {
|
|
6
6
|
RenderStrategyProvider,
|
|
7
7
|
splitRenderStrategyProps,
|
|
8
8
|
useRenderStrategyContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./NEBB7COJ.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";
|
|
@@ -80,10 +80,7 @@ var AccordionItemContent = (props) => {
|
|
|
80
80
|
const itemProps = useAccordionItemPropsContext();
|
|
81
81
|
const itemContentProps = createMemo2(() => {
|
|
82
82
|
const contentProps = accordion2().getItemContentProps(itemProps);
|
|
83
|
-
const [, ownProps] = splitVisibilityProps(contentProps, [
|
|
84
|
-
"hidden",
|
|
85
|
-
"data-state"
|
|
86
|
-
]);
|
|
83
|
+
const [, ownProps] = splitVisibilityProps(contentProps, ["hidden", "data-state"]);
|
|
87
84
|
return ownProps;
|
|
88
85
|
});
|
|
89
86
|
const mergedProps = mergeProps2(() => itemContentProps(), props);
|
|
@@ -125,17 +122,14 @@ var useAccordion = (props = {}) => {
|
|
|
125
122
|
const id = createUniqueId();
|
|
126
123
|
const locale = useLocaleContext();
|
|
127
124
|
const environment = useEnvironmentContext();
|
|
128
|
-
const
|
|
125
|
+
const machineProps = createMemo3(() => ({
|
|
129
126
|
id,
|
|
130
127
|
dir: locale().dir,
|
|
131
|
-
value: props.defaultValue,
|
|
132
128
|
getRootNode: environment().getRootNode,
|
|
133
129
|
...props
|
|
134
130
|
}));
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
});
|
|
138
|
-
return createMemo3(() => accordion.connect(state, send, normalizeProps));
|
|
131
|
+
const service = useMachine(accordion.machine, machineProps);
|
|
132
|
+
return createMemo3(() => accordion.connect(service, normalizeProps));
|
|
139
133
|
};
|
|
140
134
|
|
|
141
135
|
// src/components/accordion/accordion-root.tsx
|
|
@@ -166,9 +160,7 @@ var AccordionRoot = (props) => {
|
|
|
166
160
|
import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
167
161
|
var AccordionRootProvider = (props) => {
|
|
168
162
|
const [renderStrategyProps, accordionProps] = splitRenderStrategyProps(props);
|
|
169
|
-
const [{ value: accordion2 }, localProps] = createSplitProps()(accordionProps, [
|
|
170
|
-
"value"
|
|
171
|
-
]);
|
|
163
|
+
const [{ value: accordion2 }, localProps] = createSplitProps()(accordionProps, ["value"]);
|
|
172
164
|
const mergedProps = mergeProps6(() => accordion2().getRootProps(), localProps);
|
|
173
165
|
return <AccordionProvider value={accordion2}>
|
|
174
166
|
<RenderStrategyProvider value={renderStrategyProps}>
|
|
@@ -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';
|
|
@@ -32,14 +32,14 @@ var useAvatar = (props = {}) => {
|
|
|
32
32
|
const locale = useLocaleContext();
|
|
33
33
|
const environment = useEnvironmentContext();
|
|
34
34
|
const id = createUniqueId();
|
|
35
|
-
const
|
|
35
|
+
const machineProps = createMemo(() => ({
|
|
36
36
|
id,
|
|
37
37
|
dir: locale().dir,
|
|
38
38
|
getRootNode: environment().getRootNode,
|
|
39
39
|
...props
|
|
40
40
|
}));
|
|
41
|
-
const
|
|
42
|
-
return createMemo(() => avatar.connect(
|
|
41
|
+
const service = useMachine(avatar.machine, machineProps);
|
|
42
|
+
return createMemo(() => avatar.connect(service, normalizeProps));
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
// src/components/avatar/avatar-root.tsx
|
|
@@ -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";
|
|
@@ -39,14 +39,10 @@ var [TourProvider, useTourContext] = createContext({
|
|
|
39
39
|
|
|
40
40
|
// src/components/tour/tour-action-trigger.tsx
|
|
41
41
|
var TourActionTrigger = (props) => {
|
|
42
|
-
const [actionTriggerProps, localProps] = createSplitProps()(props, [
|
|
43
|
-
"action"
|
|
44
|
-
]);
|
|
42
|
+
const [actionTriggerProps, localProps] = createSplitProps()(props, ["action"]);
|
|
45
43
|
const tour2 = useTourContext();
|
|
46
44
|
const mergedProps = mergeProps(() => tour2().getActionTriggerProps(actionTriggerProps), localProps);
|
|
47
|
-
return <ark.button {...mergedProps}>
|
|
48
|
-
{mergedProps.children || actionTriggerProps.action.label}
|
|
49
|
-
</ark.button>;
|
|
45
|
+
return <ark.button {...mergedProps}>{mergedProps.children || actionTriggerProps.action.label}</ark.button>;
|
|
50
46
|
};
|
|
51
47
|
|
|
52
48
|
// src/components/tour/tour-actions.tsx
|
|
@@ -165,9 +161,7 @@ import { mergeProps as mergeProps11 } from "@zag-js/solid";
|
|
|
165
161
|
var TourRoot = (props) => {
|
|
166
162
|
const [presenceProps, rootProps] = splitPresenceProps(props);
|
|
167
163
|
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
168
|
-
const presence = usePresence(
|
|
169
|
-
mergeProps11(presenceProps, () => ({ present: rootProps.tour().open }))
|
|
170
|
-
);
|
|
164
|
+
const presence = usePresence(mergeProps11(presenceProps, () => ({ present: rootProps.tour().open })));
|
|
171
165
|
return <TourProvider value={rootProps.tour}>
|
|
172
166
|
<RenderStrategyProvider value={renderStrategyProps}>
|
|
173
167
|
<PresenceProvider value={presence}>{rootProps.children}</PresenceProvider>
|
|
@@ -208,16 +202,14 @@ var useTour = (props = {}) => {
|
|
|
208
202
|
const id = createUniqueId();
|
|
209
203
|
const locale = useLocaleContext();
|
|
210
204
|
const environment = useEnvironmentContext();
|
|
211
|
-
const
|
|
205
|
+
const machineProps = createMemo(() => ({
|
|
212
206
|
id,
|
|
213
207
|
dir: locale().dir,
|
|
214
208
|
getRootNode: environment().getRootNode,
|
|
215
209
|
...props
|
|
216
210
|
}));
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
});
|
|
220
|
-
return createMemo(() => tour.connect(state, send, normalizeProps));
|
|
211
|
+
const service = useMachine(tour.machine, machineProps);
|
|
212
|
+
return createMemo(() => tour.connect(service, normalizeProps));
|
|
221
213
|
};
|
|
222
214
|
|
|
223
215
|
// src/components/tour/tour.ts
|
|
@@ -5,15 +5,10 @@ import * as solid_js from 'solid-js';
|
|
|
5
5
|
import { Accessor, JSX } from 'solid-js';
|
|
6
6
|
import { PropTypes } from '@zag-js/solid';
|
|
7
7
|
import { O as Optional } from '../../types-B277wCdv.js';
|
|
8
|
-
import {
|
|
8
|
+
import { HTMLProps, PolymorphicProps } from '../factory.js';
|
|
9
9
|
import { R as RenderStrategyProps } from '../../render-strategy-B5MqQP3X.js';
|
|
10
10
|
|
|
11
|
-
interface UseAccordionProps extends Optional<Omit<accordion$1.
|
|
12
|
-
/**
|
|
13
|
-
* The initial value of the accordion when it is first rendered.
|
|
14
|
-
* Use when you do not need to control the state of the color picker.
|
|
15
|
-
*/
|
|
16
|
-
defaultValue?: accordion$1.Context['value'];
|
|
11
|
+
interface UseAccordionProps extends Optional<Omit<accordion$1.Props, 'dir' | 'getRootNode'>, 'id'> {
|
|
17
12
|
}
|
|
18
13
|
interface UseAccordionReturn extends Accessor<accordion$1.Api<PropTypes>> {
|
|
19
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { accordion_exports as Accordion, AccordionContext, AccordionItem, AccordionItemContent, AccordionItemContext, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, AccordionRootProvider, anatomy as accordionAnatomy, useAccordion, useAccordionContext, useAccordionItemContext } from '../../chunk/
|
|
1
|
+
export { accordion_exports as Accordion, AccordionContext, AccordionItem, AccordionItemContent, AccordionItemContext, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, AccordionRootProvider, anatomy as accordionAnatomy, useAccordion, useAccordionContext, useAccordionItemContext } from '../../chunk/DVI7TRLG.js';
|
|
@@ -12,16 +12,15 @@ import {
|
|
|
12
12
|
useAccordion,
|
|
13
13
|
useAccordionContext,
|
|
14
14
|
useAccordionItemContext
|
|
15
|
-
} from "../../chunk/
|
|
16
|
-
import "../../chunk/
|
|
17
|
-
import "../../chunk/
|
|
15
|
+
} from "../../chunk/YE6V66JY.jsx";
|
|
16
|
+
import "../../chunk/H5QZC4VW.jsx";
|
|
17
|
+
import "../../chunk/NEBB7COJ.jsx";
|
|
18
18
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
19
|
-
import "../../chunk/ODQYYKL5.jsx";
|
|
20
19
|
import "../../chunk/UFYZ7HLU.jsx";
|
|
21
|
-
import "../../chunk/
|
|
22
|
-
import "../../chunk/
|
|
23
|
-
import "../../chunk/
|
|
24
|
-
import "../../chunk/
|
|
20
|
+
import "../../chunk/ODQYYKL5.jsx";
|
|
21
|
+
import "../../chunk/BPYAMTER.jsx";
|
|
22
|
+
import "../../chunk/RCXMZN3G.jsx";
|
|
23
|
+
import "../../chunk/TVCIHLER.jsx";
|
|
25
24
|
import "../../chunk/7IUG3E2V.jsx";
|
|
26
25
|
export {
|
|
27
26
|
accordion_exports as Accordion,
|