@ark-ui/solid 5.20.0 → 5.22.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/dist/chunk/{VL4J24YY.js → 32XOEHJA.js} +2 -2
- package/dist/chunk/{KLX5OWO4.js → 3MXQ4UTL.js} +1 -1
- package/dist/chunk/{DAORON6X.js → 4DBNFXQT.js} +1 -1
- package/dist/chunk/{OTEN4SAY.jsx → 4HMPTYYS.jsx} +2 -2
- package/dist/chunk/{YADTZSXX.js → 4NJHH6IA.js} +2 -2
- package/dist/chunk/{M3FJ4ZUY.jsx → 5EIABR36.jsx} +30 -14
- package/dist/chunk/{AEHKRB27.jsx → 5HPWBPXN.jsx} +1 -1
- package/dist/chunk/{MSDICFK5.jsx → 5HS4XHPV.jsx} +2 -2
- package/dist/chunk/{B2TMVKY3.js → 5LWXP72T.js} +23 -4
- package/dist/chunk/{4HQIDBKB.js → 5MPUJF73.js} +1 -1
- package/dist/chunk/{MMEPVOO3.jsx → 6MGH6HEP.jsx} +1 -1
- package/dist/chunk/{57XFSJSJ.jsx → 6RI5RLL4.jsx} +2 -2
- package/dist/chunk/{OKT2RIHV.js → 6SS4HF64.js} +1 -1
- package/dist/chunk/{4XV3T2RT.jsx → 7BHNFUPW.jsx} +1 -1
- package/dist/chunk/{ZHS5GCPH.js → A3GLAR2K.js} +1 -1
- package/dist/chunk/{5UVX33V2.jsx → ANEDGTU4.jsx} +1 -1
- package/dist/chunk/{O5UHP4CA.js → APULXWCH.js} +9 -2
- package/dist/chunk/{DPP7XCXL.js → AQICSUXF.js} +1 -1
- package/dist/chunk/{SSWISV43.jsx → AWD5DIFD.jsx} +1 -1
- package/dist/chunk/{QPEAMFRL.jsx → B5KMHNSV.jsx} +2 -2
- package/dist/chunk/{YYWITIS7.jsx → BIBVXHZ2.jsx} +2 -2
- package/dist/chunk/{SWUMYWUU.js → CBBODIIA.js} +2 -2
- package/dist/chunk/{BOR6VUN5.js → CJ7ZPDYK.js} +1 -1
- package/dist/chunk/{NMJ67UCO.js → CPLXH5IA.js} +1 -1
- package/dist/chunk/{EJFRDVCX.jsx → CTLTBA6P.jsx} +2 -2
- package/dist/chunk/{HNLRXJ54.js → D63ULIQQ.js} +2 -2
- package/dist/chunk/{FFVNMZA6.js → DR6ZXQ4K.js} +2 -2
- package/dist/chunk/{JQIXCEUN.jsx → DTSVIUAM.jsx} +1 -1
- package/dist/chunk/{K6EEABL5.js → E7OGB2A5.js} +2 -2
- package/dist/chunk/{DZGDAEOH.jsx → EFII6TXL.jsx} +24 -9
- package/dist/chunk/{5OA4XEHW.jsx → EODO532W.jsx} +1 -1
- package/dist/chunk/{J4VOAZA3.jsx → EWPHO4ND.jsx} +1 -1
- package/dist/chunk/{UMVBUCBO.js → FDNBKLQD.js} +1 -1
- package/dist/chunk/{VJ2ZFW6U.js → FLTSMA4B.js} +1 -1
- package/dist/chunk/{XOVDOF3R.jsx → FQDJD5WT.jsx} +1 -1
- package/dist/chunk/{P5ZRUIVB.jsx → FX3X3KI4.jsx} +1 -1
- package/dist/chunk/{2Z37DOO5.jsx → FYV3OPJE.jsx} +2 -2
- package/dist/chunk/{UZXWP4N2.js → FZMB5WQY.js} +2 -2
- package/dist/chunk/{J2I54ALY.jsx → GBEEXVXU.jsx} +2 -2
- package/dist/chunk/{KYIRNJBT.jsx → GDROOPOD.jsx} +2 -2
- package/dist/chunk/{5FW3VV3B.jsx → GF6IMD4V.jsx} +1 -1
- package/dist/chunk/{OIG52XTL.jsx → HACBFHHT.jsx} +1 -1
- package/dist/chunk/{XZ7Z672B.js → HIA6P7A2.js} +2 -2
- package/dist/chunk/{TJJO7RK5.js → HQFAQX4S.js} +2 -2
- package/dist/chunk/{MYOMDGBL.jsx → HQRZRCZN.jsx} +2 -1
- package/dist/chunk/{LORIOKHL.js → HVQPMEHH.js} +1 -1
- package/dist/chunk/{7S4FM6EK.js → IEZKTVGR.js} +2 -2
- package/dist/chunk/{Q3QMDHRY.jsx → IIQ4DVBM.jsx} +2 -2
- package/dist/chunk/{QNB2UJP7.jsx → IQBPSALU.jsx} +2 -1
- package/dist/chunk/{OKZ64GSY.js → JOLWKIPW.js} +10 -2
- package/dist/chunk/{7IV674K5.jsx → JPVFWVKB.jsx} +2 -2
- package/dist/chunk/{ROUJC6XC.js → JVPZ5H4S.js} +1 -1
- package/dist/chunk/{LY6KT2RR.jsx → K4PAURBN.jsx} +1 -1
- package/dist/chunk/{FS6GEMRM.jsx → KSBRZHY3.jsx} +4 -1
- package/dist/chunk/{A6XGGK7D.jsx → L6VQ5JYK.jsx} +1 -1
- package/dist/chunk/{K43XFCKD.js → LBDJJRGP.js} +1 -1
- package/dist/chunk/{T4JGZ7KR.js → LHPNWFI4.js} +1 -1
- package/dist/chunk/{TTICFFSM.jsx → LQ6T5YT7.jsx} +1 -1
- package/dist/chunk/{VQ3I3Z7G.js → LZPARB53.js} +1 -1
- package/dist/chunk/{4VCRFRFE.js → M3YQ2ERY.js} +1 -1
- package/dist/chunk/{6HQNY7WM.js → MSG5CNFB.js} +4 -1
- package/dist/chunk/{SCH26OXU.jsx → NNRIF2OF.jsx} +1 -1
- package/dist/chunk/{JWPRFVT7.jsx → NU2LGEQO.jsx} +1 -1
- package/dist/chunk/{PNYN26W7.jsx → NZZ47TNF.jsx} +1 -1
- package/dist/chunk/{B4ZXV6YG.jsx → O4BTJAES.jsx} +1 -1
- package/dist/chunk/{TKINUEE2.js → OJDEGAOM.js} +2 -2
- package/dist/chunk/{Z7NWMXVR.js → OKPKUWZY.js} +2 -2
- package/dist/chunk/{U3SNCYTA.jsx → P2MZ2BIM.jsx} +2 -2
- package/dist/chunk/{H5DXY5W4.js → PELRXKOJ.js} +1 -1
- package/dist/chunk/{D66BAI2Q.jsx → PJ75DKGV.jsx} +2 -1
- package/dist/chunk/{LRA73ZZJ.js → QLR5DW7S.js} +1 -1
- package/dist/chunk/{ZCVENRH5.js → QNUM5QZD.js} +2 -2
- package/dist/chunk/{RDUJFJ2K.js → QY4J4YQ6.js} +2 -2
- package/dist/chunk/{DIUPFYX7.jsx → R7HAMD4C.jsx} +2 -2
- package/dist/chunk/{WYNHVCCC.jsx → RC6LTFJF.jsx} +1 -1
- package/dist/chunk/{5LNAXBVF.js → RUJWWVJQ.js} +1 -1
- package/dist/chunk/{MSQY6ZYN.jsx → RYMIVK37.jsx} +2 -2
- package/dist/chunk/{DTZQE35T.jsx → S4LPOWLW.jsx} +1 -1
- package/dist/chunk/{XUBES5JE.js → S4P7KO2W.js} +1 -1
- package/dist/chunk/{I6UGYR2R.js → SA6DA5B7.js} +1 -1
- package/dist/chunk/{PS4L3DPM.js → SVBOLS3G.js} +2 -2
- package/dist/chunk/{QOPFLH2O.jsx → TTZG6CCV.jsx} +2 -1
- package/dist/chunk/{S33APHEF.js → U4Z72T3S.js} +2 -2
- package/dist/chunk/{LB3LJBHI.js → U5RPTTBY.js} +1 -1
- package/dist/chunk/{2MXPLL4O.js → UFCT3N6F.js} +1 -1
- package/dist/chunk/{Y3SDT2HS.jsx → UMNJMCPE.jsx} +2 -2
- package/dist/chunk/{OEQFRTGI.js → UXNYIEZZ.js} +23 -4
- package/dist/chunk/{7K5D5OB5.jsx → UZHM5FTR.jsx} +24 -8
- package/dist/chunk/{UBCF5HI7.jsx → WKYHO45J.jsx} +1 -1
- package/dist/chunk/{46K5OEJ2.js → WS5HMYK2.js} +2 -2
- package/dist/chunk/{YUC6JE7K.jsx → XIYHIOP3.jsx} +16 -3
- package/dist/chunk/{TDCYVNLO.js → XQYQZYIR.js} +2 -2
- package/dist/chunk/{3WQEWZPN.js → ZI253QBN.js} +2 -2
- package/dist/chunk/{TUTPYVIE.jsx → ZKV7ELLL.jsx} +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +3 -3
- package/dist/components/angle-slider/index.js +1 -1
- package/dist/components/angle-slider/index.jsx +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +2 -2
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.jsx +2 -2
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +4 -4
- package/dist/components/clipboard/index.jsx +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collapsible/index.jsx +2 -2
- package/dist/components/collection/index.d.ts +10 -3
- package/dist/components/collection/index.js +1 -1
- package/dist/components/collection/index.jsx +4 -1
- package/dist/components/color-picker/index.d.ts +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +4 -4
- package/dist/components/combobox/index.d.ts +12 -3
- package/dist/components/combobox/index.js +2 -2
- package/dist/components/combobox/index.jsx +9 -7
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.jsx +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.jsx +2 -2
- package/dist/components/download-trigger/index.jsx +1 -1
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +4 -4
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +3 -3
- package/dist/components/fieldset/index.d.ts +5 -3
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/fieldset/index.jsx +2 -2
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +4 -4
- package/dist/components/floating-panel/index.js +1 -1
- package/dist/components/floating-panel/index.jsx +2 -2
- package/dist/components/format/index.js +1 -1
- package/dist/components/format/index.jsx +2 -2
- package/dist/components/frame/index.jsx +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/hover-card/index.jsx +2 -2
- package/dist/components/index.d.ts +11 -9
- package/dist/components/index.js +48 -48
- package/dist/components/index.jsx +267 -257
- package/dist/components/json-tree-view/index.js +1 -1
- package/dist/components/json-tree-view/index.jsx +5 -5
- package/dist/components/listbox/index.d.ts +12 -3
- package/dist/components/listbox/index.js +2 -2
- package/dist/components/listbox/index.jsx +7 -5
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +2 -2
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/index.jsx +4 -4
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.jsx +2 -2
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/password-input/index.jsx +4 -4
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +4 -4
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.jsx +2 -2
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.jsx +2 -2
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/qr-code/index.jsx +2 -2
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/index.jsx +2 -2
- package/dist/components/rating-group/index.js +1 -1
- package/dist/components/rating-group/index.jsx +4 -4
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/index.jsx +2 -2
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/segment-group/index.js +1 -1
- package/dist/components/segment-group/index.jsx +2 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/index.jsx +5 -5
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +4 -4
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.jsx +2 -2
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/splitter/index.jsx +2 -2
- package/dist/components/steps/index.js +1 -1
- package/dist/components/steps/index.jsx +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.jsx +4 -4
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.jsx +2 -2
- package/dist/components/tags-input/index.js +1 -1
- package/dist/components/tags-input/index.jsx +4 -4
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/index.jsx +2 -2
- package/dist/components/timer/index.jsx +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.jsx +2 -2
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/index.jsx +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.jsx +2 -2
- package/dist/components/tour/index.js +1 -1
- package/dist/components/tour/index.jsx +2 -2
- package/dist/components/tree-view/index.js +2 -2
- package/dist/components/tree-view/index.jsx +4 -4
- package/dist/index.d.ts +13 -11
- package/dist/index.js +49 -49
- package/dist/index.jsx +269 -257
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.jsx +3 -1
- package/dist/providers/locale/index.d.ts +8 -1
- package/dist/providers/locale/index.js +1 -1
- package/dist/providers/locale/index.jsx +3 -1
- package/package.json +69 -68
- /package/dist/chunk/{HRWYG4MB.jsx → 5XTAFT5P.jsx} +0 -0
- /package/dist/chunk/{5WVPNAWS.js → W6MHACH4.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCollapsibleContext, collapsible_exports } from './
|
|
1
|
+
import { useCollapsibleContext, collapsible_exports } from './JVPZ5H4S.js';
|
|
2
2
|
import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyContext } from './QFAL6GWC.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
5
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
6
|
-
import { useLocaleContext } from './
|
|
6
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
7
7
|
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
9
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
3
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
4
|
-
import { useLocaleContext } from './
|
|
4
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
5
5
|
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { __export } from './ESLJRKWD.js';
|
|
7
7
|
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
3
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
4
|
-
import { useLocaleContext } from './
|
|
4
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
5
5
|
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { runIfFn } from './DT73WLR4.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./NNRIF2OF.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./KGOB2IMX.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./XIYHIOP3.jsx";
|
|
19
19
|
import {
|
|
20
20
|
createContext
|
|
21
21
|
} from "./TVCIHLER.jsx";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './FLTSMA4B.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
4
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
5
|
-
import { useLocaleContext } from './
|
|
5
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
6
6
|
import { createContext } from './TROPIN4C.js';
|
|
7
7
|
import { runIfFn } from './DT73WLR4.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./4LUY46IM.jsx";
|
|
7
7
|
import {
|
|
8
8
|
useFieldContext
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./NNRIF2OF.jsx";
|
|
10
10
|
import {
|
|
11
11
|
composeRefs
|
|
12
12
|
} from "./PT2CJE3O.jsx";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./KGOB2IMX.jsx";
|
|
25
25
|
import {
|
|
26
26
|
useLocaleContext
|
|
27
|
-
} from "./
|
|
27
|
+
} from "./XIYHIOP3.jsx";
|
|
28
28
|
import {
|
|
29
29
|
createContext
|
|
30
30
|
} from "./TVCIHLER.jsx";
|
|
@@ -64,6 +64,23 @@ var ComboboxContent = (props) => {
|
|
|
64
64
|
</Show>;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
+
// src/components/combobox/combobox-empty.tsx
|
|
68
|
+
import { createMemo, Show as Show2 } from "solid-js";
|
|
69
|
+
|
|
70
|
+
// src/components/combobox/combobox.anatomy.ts
|
|
71
|
+
import { anatomy } from "@zag-js/combobox";
|
|
72
|
+
var comboboxAnatomy = anatomy.extendWith("empty");
|
|
73
|
+
|
|
74
|
+
// src/components/combobox/combobox-empty.tsx
|
|
75
|
+
var parts = comboboxAnatomy.build();
|
|
76
|
+
var ComboboxEmpty = (props) => {
|
|
77
|
+
const combobox2 = useComboboxContext();
|
|
78
|
+
const size = createMemo(() => combobox2().collection.size);
|
|
79
|
+
return <Show2 when={size() === 0}>
|
|
80
|
+
<ark.div {...parts.empty.attrs} {...props} role="presentation" />
|
|
81
|
+
</Show2>;
|
|
82
|
+
};
|
|
83
|
+
|
|
67
84
|
// src/components/combobox/combobox-context.tsx
|
|
68
85
|
var ComboboxContext = (props) => props.children(useComboboxContext());
|
|
69
86
|
|
|
@@ -86,7 +103,7 @@ var ComboboxInput = (props) => {
|
|
|
86
103
|
|
|
87
104
|
// src/components/combobox/combobox-item.tsx
|
|
88
105
|
import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
89
|
-
import { createMemo } from "solid-js";
|
|
106
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
90
107
|
|
|
91
108
|
// src/components/combobox/use-combobox-item-context.ts
|
|
92
109
|
var [ComboboxItemProvider, useComboboxItemContext] = createContext({
|
|
@@ -105,7 +122,7 @@ var ComboboxItem = (props) => {
|
|
|
105
122
|
const [itemProps, localProps] = createSplitProps()(props, ["item", "persistFocus"]);
|
|
106
123
|
const api = useComboboxContext();
|
|
107
124
|
const mergedProps = mergeProps5(() => api().getItemProps(itemProps), localProps);
|
|
108
|
-
const itemState =
|
|
125
|
+
const itemState = createMemo2(() => api().getItemState(itemProps));
|
|
109
126
|
return <ComboboxItemPropsProvider value={itemProps}>
|
|
110
127
|
<ComboboxItemProvider value={itemState}>
|
|
111
128
|
<ark.div {...mergedProps} />
|
|
@@ -182,14 +199,14 @@ var ComboboxList = (props) => {
|
|
|
182
199
|
|
|
183
200
|
// src/components/combobox/combobox-positioner.tsx
|
|
184
201
|
import { mergeProps as mergeProps12 } from "@zag-js/solid";
|
|
185
|
-
import { Show as
|
|
202
|
+
import { Show as Show3 } from "solid-js";
|
|
186
203
|
var ComboboxPositioner = (props) => {
|
|
187
204
|
const api = useComboboxContext();
|
|
188
205
|
const presenceApi = usePresenceContext();
|
|
189
206
|
const mergedProps = mergeProps12(() => api().getPositionerProps(), props);
|
|
190
|
-
return <
|
|
207
|
+
return <Show3 when={!presenceApi().unmounted}>
|
|
191
208
|
<ark.div {...mergedProps} />
|
|
192
|
-
</
|
|
209
|
+
</Show3>;
|
|
193
210
|
};
|
|
194
211
|
|
|
195
212
|
// src/components/combobox/combobox-root.tsx
|
|
@@ -198,13 +215,13 @@ import { mergeProps as mergeProps13 } from "@zag-js/solid";
|
|
|
198
215
|
// src/components/combobox/use-combobox.ts
|
|
199
216
|
import * as combobox from "@zag-js/combobox";
|
|
200
217
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
201
|
-
import { createMemo as
|
|
218
|
+
import { createMemo as createMemo3, createUniqueId as createUniqueId2 } from "solid-js";
|
|
202
219
|
var useCombobox = (props) => {
|
|
203
220
|
const locale = useLocaleContext();
|
|
204
221
|
const environment = useEnvironmentContext();
|
|
205
222
|
const id = createUniqueId2();
|
|
206
223
|
const field = useFieldContext();
|
|
207
|
-
const machineProps =
|
|
224
|
+
const machineProps = createMemo3(() => ({
|
|
208
225
|
id,
|
|
209
226
|
ids: {
|
|
210
227
|
label: field?.().ids.label,
|
|
@@ -219,7 +236,7 @@ var useCombobox = (props) => {
|
|
|
219
236
|
...runIfFn(props)
|
|
220
237
|
}));
|
|
221
238
|
const service = useMachine(combobox.machine, machineProps);
|
|
222
|
-
return
|
|
239
|
+
return createMemo3(() => combobox.connect(service, normalizeProps));
|
|
223
240
|
};
|
|
224
241
|
|
|
225
242
|
// src/components/combobox/combobox-root.tsx
|
|
@@ -302,9 +319,6 @@ var ComboboxTrigger = (props) => {
|
|
|
302
319
|
return <ark.button {...mergedProps} />;
|
|
303
320
|
};
|
|
304
321
|
|
|
305
|
-
// src/components/combobox/combobox.anatomy.ts
|
|
306
|
-
import { anatomy } from "@zag-js/combobox";
|
|
307
|
-
|
|
308
322
|
// src/components/combobox/combobox.ts
|
|
309
323
|
var combobox_exports = {};
|
|
310
324
|
__export(combobox_exports, {
|
|
@@ -312,6 +326,7 @@ __export(combobox_exports, {
|
|
|
312
326
|
Content: () => ComboboxContent,
|
|
313
327
|
Context: () => ComboboxContext,
|
|
314
328
|
Control: () => ComboboxControl,
|
|
329
|
+
Empty: () => ComboboxEmpty,
|
|
315
330
|
Input: () => ComboboxInput,
|
|
316
331
|
Item: () => ComboboxItem,
|
|
317
332
|
ItemContext: () => ComboboxItemContext,
|
|
@@ -331,6 +346,8 @@ export {
|
|
|
331
346
|
useComboboxContext,
|
|
332
347
|
ComboboxClearTrigger,
|
|
333
348
|
ComboboxContent,
|
|
349
|
+
comboboxAnatomy,
|
|
350
|
+
ComboboxEmpty,
|
|
334
351
|
ComboboxContext,
|
|
335
352
|
ComboboxControl,
|
|
336
353
|
ComboboxInput,
|
|
@@ -348,6 +365,5 @@ export {
|
|
|
348
365
|
ComboboxRoot,
|
|
349
366
|
ComboboxRootProvider,
|
|
350
367
|
ComboboxTrigger,
|
|
351
|
-
anatomy,
|
|
352
368
|
combobox_exports
|
|
353
369
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./NNRIF2OF.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./KGOB2IMX.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./XIYHIOP3.jsx";
|
|
19
19
|
import {
|
|
20
20
|
createContext
|
|
21
21
|
} from "./TVCIHLER.jsx";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { splitPresenceProps, usePresence, PresenceProvider, usePresenceContext } from './SIT3D7TL.js';
|
|
2
|
-
import { useFieldContext } from './
|
|
2
|
+
import { useFieldContext } from './FLTSMA4B.js';
|
|
3
3
|
import { composeRefs } from './ROP6QZQ7.js';
|
|
4
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
5
5
|
import { ark } from './EPLBB4QN.js';
|
|
6
6
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
7
|
-
import { useLocaleContext } from './
|
|
7
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
8
8
|
import { createContext } from './TROPIN4C.js';
|
|
9
9
|
import { runIfFn } from './DT73WLR4.js';
|
|
10
10
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -12,7 +12,7 @@ import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
|
12
12
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
13
13
|
import { Show, createUniqueId, createMemo } from 'solid-js';
|
|
14
14
|
import * as combobox from '@zag-js/combobox';
|
|
15
|
-
|
|
15
|
+
import { anatomy } from '@zag-js/combobox';
|
|
16
16
|
|
|
17
17
|
// src/components/combobox/use-combobox-context.ts
|
|
18
18
|
var [ComboboxProvider, useComboboxContext] = createContext({
|
|
@@ -44,6 +44,24 @@ var ComboboxContent = (props) => {
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
+
var comboboxAnatomy = anatomy.extendWith("empty");
|
|
48
|
+
|
|
49
|
+
// src/components/combobox/combobox-empty.tsx
|
|
50
|
+
var parts = comboboxAnatomy.build();
|
|
51
|
+
var ComboboxEmpty = (props) => {
|
|
52
|
+
const combobox2 = useComboboxContext();
|
|
53
|
+
const size = createMemo(() => combobox2().collection.size);
|
|
54
|
+
return createComponent(Show, {
|
|
55
|
+
get when() {
|
|
56
|
+
return size() === 0;
|
|
57
|
+
},
|
|
58
|
+
get children() {
|
|
59
|
+
return createComponent(ark.div, mergeProps$1(() => parts.empty.attrs, props, {
|
|
60
|
+
role: "presentation"
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
47
65
|
|
|
48
66
|
// src/components/combobox/combobox-context.tsx
|
|
49
67
|
var ComboboxContext = (props) => props.children(useComboboxContext());
|
|
@@ -240,6 +258,7 @@ __export(combobox_exports, {
|
|
|
240
258
|
Content: () => ComboboxContent,
|
|
241
259
|
Context: () => ComboboxContext,
|
|
242
260
|
Control: () => ComboboxControl,
|
|
261
|
+
Empty: () => ComboboxEmpty,
|
|
243
262
|
Input: () => ComboboxInput,
|
|
244
263
|
Item: () => ComboboxItem,
|
|
245
264
|
ItemContext: () => ComboboxItemContext,
|
|
@@ -255,4 +274,4 @@ __export(combobox_exports, {
|
|
|
255
274
|
Trigger: () => ComboboxTrigger
|
|
256
275
|
});
|
|
257
276
|
|
|
258
|
-
export { ComboboxClearTrigger, ComboboxContent, ComboboxContext, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemContext, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxRootProvider, ComboboxTrigger, combobox_exports, useCombobox, useComboboxContext, useComboboxItemContext };
|
|
277
|
+
export { ComboboxClearTrigger, ComboboxContent, ComboboxContext, ComboboxControl, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxItemContext, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxRootProvider, ComboboxTrigger, comboboxAnatomy, combobox_exports, useCombobox, useComboboxContext, useComboboxItemContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
3
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
4
|
-
import { useLocaleContext } from './
|
|
4
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
5
5
|
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { runIfFn } from './DT73WLR4.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
tree_view_exports,
|
|
3
3
|
useTreeView,
|
|
4
4
|
useTreeViewContext
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./IIQ4DVBM.jsx";
|
|
6
6
|
import {
|
|
7
7
|
createTreeCollection
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./EFII6TXL.jsx";
|
|
9
9
|
import {
|
|
10
10
|
createSplitProps
|
|
11
11
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
3
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
4
|
-
import { useLocaleContext } from './
|
|
4
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
5
5
|
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { runIfFn } from './DT73WLR4.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -3,7 +3,7 @@ import { composeRefs } from './ROP6QZQ7.js';
|
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
5
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
6
|
-
import { useLocaleContext } from './
|
|
6
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
7
7
|
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
9
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import { runIfFn } from './DT73WLR4.js';
|
|
1
2
|
import { GridCollection, ListCollection, TreeCollection, filePathToTree, Selection } from '@zag-js/collection';
|
|
3
|
+
import * as asyncList from '@zag-js/async-list';
|
|
4
|
+
import { useMachine } from '@zag-js/solid';
|
|
2
5
|
import { createMemo, splitProps, createSignal, createEffect, on } from 'solid-js';
|
|
3
6
|
|
|
4
|
-
// src/components/collection/grid-collection.ts
|
|
5
7
|
var createGridCollection = (options) => new GridCollection(options);
|
|
6
8
|
var createListCollection = (options) => new ListCollection(options);
|
|
7
9
|
var createTreeCollection = (options) => new TreeCollection(options);
|
|
8
10
|
var createFileTreeCollection = (paths) => filePathToTree(paths);
|
|
11
|
+
var useAsyncList = (props) => {
|
|
12
|
+
const machineProps = createMemo(() => runIfFn(props));
|
|
13
|
+
const service = useMachine(asyncList.machine, machineProps);
|
|
14
|
+
return createMemo(() => asyncList.connect(service));
|
|
15
|
+
};
|
|
9
16
|
function useListCollection(props) {
|
|
10
17
|
const splittedProps = createMemo(() => {
|
|
11
18
|
const rawProps = typeof props === "function" ? props() : props;
|
|
@@ -201,4 +208,4 @@ function useListSelection(props) {
|
|
|
201
208
|
};
|
|
202
209
|
}
|
|
203
210
|
|
|
204
|
-
export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useListCollection, useListSelection };
|
|
211
|
+
export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
3
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
4
|
-
import { useLocaleContext } from './
|
|
4
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
5
5
|
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { runIfFn } from './DT73WLR4.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./NNRIF2OF.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./KGOB2IMX.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./XIYHIOP3.jsx";
|
|
19
19
|
import {
|
|
20
20
|
createContext
|
|
21
21
|
} from "./TVCIHLER.jsx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./NNRIF2OF.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./KGOB2IMX.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./XIYHIOP3.jsx";
|
|
19
19
|
import {
|
|
20
20
|
createContext
|
|
21
21
|
} from "./TVCIHLER.jsx";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { collapsible_exports } from './
|
|
1
|
+
import { collapsible_exports } from './JVPZ5H4S.js';
|
|
2
2
|
import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyContext } from './QFAL6GWC.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
5
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
6
|
-
import { useLocaleContext } from './
|
|
6
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
7
7
|
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
9
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
2
2
|
import { ark } from './EPLBB4QN.js';
|
|
3
3
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
4
|
-
import { useLocaleContext } from './
|
|
4
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
5
5
|
import { createContext } from './TROPIN4C.js';
|
|
6
6
|
import { runIfFn } from './DT73WLR4.js';
|
|
7
7
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -4,7 +4,7 @@ import { splitRenderStrategyProps, RenderStrategyProvider, useRenderStrategyCont
|
|
|
4
4
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
5
5
|
import { ark } from './EPLBB4QN.js';
|
|
6
6
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
7
|
-
import { useLocaleContext } from './
|
|
7
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
8
8
|
import { createContext } from './TROPIN4C.js';
|
|
9
9
|
import { runIfFn } from './DT73WLR4.js';
|
|
10
10
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldContext
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./NNRIF2OF.jsx";
|
|
4
4
|
import {
|
|
5
5
|
createSplitProps
|
|
6
6
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./KGOB2IMX.jsx";
|
|
16
16
|
import {
|
|
17
17
|
useLocaleContext
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./XIYHIOP3.jsx";
|
|
19
19
|
import {
|
|
20
20
|
createContext
|
|
21
21
|
} from "./TVCIHLER.jsx";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './FLTSMA4B.js';
|
|
2
2
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
3
|
import { ark } from './EPLBB4QN.js';
|
|
4
4
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
5
|
-
import { useLocaleContext } from './
|
|
5
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
6
6
|
import { createContext } from './TROPIN4C.js';
|
|
7
7
|
import { runIfFn } from './DT73WLR4.js';
|
|
8
8
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -3,7 +3,7 @@ import { composeRefs } from './ROP6QZQ7.js';
|
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
5
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
6
|
-
import { useLocaleContext } from './
|
|
6
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
7
7
|
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
9
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -101,7 +101,7 @@ var usePopover = (props) => {
|
|
|
101
101
|
// src/components/popover/popover-root.tsx
|
|
102
102
|
var PopoverRoot = (props) => {
|
|
103
103
|
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
104
|
-
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ["autoFocus", "closeOnEscape", "closeOnInteractOutside", "defaultOpen", "id", "ids", "initialFocusEl", "modal", "onEscapeKeyDown", "onFocusOutside", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "open", "persistentElements", "portalled", "positioning"]);
|
|
104
|
+
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ["autoFocus", "closeOnEscape", "closeOnInteractOutside", "defaultOpen", "id", "ids", "initialFocusEl", "modal", "onEscapeKeyDown", "onFocusOutside", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "onRequestDismiss", "open", "persistentElements", "portalled", "positioning"]);
|
|
105
105
|
const api = usePopover(usePopoverProps);
|
|
106
106
|
const apiPresence = usePresence(mergeProps(presenceProps, () => ({
|
|
107
107
|
present: api().open
|
|
@@ -3,7 +3,7 @@ import { composeRefs } from './ROP6QZQ7.js';
|
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
5
5
|
import { useEnvironmentContext } from './YO2MCGXO.js';
|
|
6
|
-
import { useLocaleContext } from './
|
|
6
|
+
import { useLocaleContext } from './JOLWKIPW.js';
|
|
7
7
|
import { createContext } from './TROPIN4C.js';
|
|
8
8
|
import { runIfFn } from './DT73WLR4.js';
|
|
9
9
|
import { __export } from './ESLJRKWD.js';
|
|
@@ -81,7 +81,7 @@ var useHoverCard = (props) => {
|
|
|
81
81
|
// src/components/hover-card/hover-card-root.tsx
|
|
82
82
|
var HoverCardRoot = (props) => {
|
|
83
83
|
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
84
|
-
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ["closeDelay", "defaultOpen", "id", "ids", "onFocusOutside", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "open", "openDelay", "positioning"]);
|
|
84
|
+
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ["closeDelay", "defaultOpen", "disabled", "id", "ids", "onFocusOutside", "onInteractOutside", "onOpenChange", "onPointerDownOutside", "open", "openDelay", "positioning"]);
|
|
85
85
|
const api = useHoverCard(useHoverCardProps);
|
|
86
86
|
const apiPresence = usePresence(mergeProps(presenceProps, () => ({
|
|
87
87
|
present: api().open
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runIfFn
|
|
3
|
+
} from "./KGOB2IMX.jsx";
|
|
4
|
+
|
|
1
5
|
// src/components/collection/grid-collection.ts
|
|
2
6
|
import {
|
|
3
7
|
GridCollection
|
|
@@ -16,10 +20,20 @@ import {
|
|
|
16
20
|
var createTreeCollection = (options) => new TreeCollection(options);
|
|
17
21
|
var createFileTreeCollection = (paths) => filePathToTree(paths);
|
|
18
22
|
|
|
23
|
+
// src/components/collection/use-async-list.ts
|
|
24
|
+
import * as asyncList from "@zag-js/async-list";
|
|
25
|
+
import { useMachine } from "@zag-js/solid";
|
|
26
|
+
import { createMemo } from "solid-js";
|
|
27
|
+
var useAsyncList = (props) => {
|
|
28
|
+
const machineProps = createMemo(() => runIfFn(props));
|
|
29
|
+
const service = useMachine(asyncList.machine, machineProps);
|
|
30
|
+
return createMemo(() => asyncList.connect(service));
|
|
31
|
+
};
|
|
32
|
+
|
|
19
33
|
// src/components/collection/use-list-collection.ts
|
|
20
|
-
import { createMemo, createSignal, splitProps } from "solid-js";
|
|
34
|
+
import { createMemo as createMemo2, createSignal, splitProps } from "solid-js";
|
|
21
35
|
function useListCollection(props) {
|
|
22
|
-
const splittedProps =
|
|
36
|
+
const splittedProps = createMemo2(() => {
|
|
23
37
|
const rawProps = typeof props === "function" ? props() : props;
|
|
24
38
|
return splitProps(rawProps, ["initialItems", "filter", "limit"]);
|
|
25
39
|
});
|
|
@@ -37,7 +51,7 @@ function useListCollection(props) {
|
|
|
37
51
|
const [, collectionOptions] = splittedProps();
|
|
38
52
|
return createListCollection({ ...collectionOptions, items: itemsToCreate });
|
|
39
53
|
};
|
|
40
|
-
const collection =
|
|
54
|
+
const collection = createMemo2(() => {
|
|
41
55
|
const [localProps, collectionOptions] = splittedProps();
|
|
42
56
|
const filter = localProps.filter;
|
|
43
57
|
let activeItems = items();
|
|
@@ -115,9 +129,9 @@ function useListCollection(props) {
|
|
|
115
129
|
|
|
116
130
|
// src/components/collection/use-list-selection.ts
|
|
117
131
|
import { Selection } from "@zag-js/collection";
|
|
118
|
-
import { createEffect, createMemo as
|
|
132
|
+
import { createEffect, createMemo as createMemo3, createSignal as createSignal2, on, splitProps as splitProps2 } from "solid-js";
|
|
119
133
|
function useListSelection(props) {
|
|
120
|
-
const splittedProps =
|
|
134
|
+
const splittedProps = createMemo3(() => {
|
|
121
135
|
const rawProps = typeof props === "function" ? props() : props;
|
|
122
136
|
return splitProps2(rawProps, [
|
|
123
137
|
"collection",
|
|
@@ -154,13 +168,13 @@ function useListSelection(props) {
|
|
|
154
168
|
{ defer: true }
|
|
155
169
|
)
|
|
156
170
|
);
|
|
157
|
-
const selectedValues =
|
|
158
|
-
const isEmpty =
|
|
159
|
-
const firstSelectedValue =
|
|
171
|
+
const selectedValues = createMemo3(() => Array.from(selection()));
|
|
172
|
+
const isEmpty = createMemo3(() => selection().isEmpty());
|
|
173
|
+
const firstSelectedValue = createMemo3(() => {
|
|
160
174
|
const [localProps] = splittedProps();
|
|
161
175
|
return selection().firstSelectedValue(localProps.collection);
|
|
162
176
|
});
|
|
163
|
-
const lastSelectedValue =
|
|
177
|
+
const lastSelectedValue = createMemo3(() => {
|
|
164
178
|
const [localProps] = splittedProps();
|
|
165
179
|
return selection().lastSelectedValue(localProps.collection);
|
|
166
180
|
});
|
|
@@ -222,6 +236,7 @@ export {
|
|
|
222
236
|
createListCollection,
|
|
223
237
|
createTreeCollection,
|
|
224
238
|
createFileTreeCollection,
|
|
239
|
+
useAsyncList,
|
|
225
240
|
useListCollection,
|
|
226
241
|
useListSelection
|
|
227
242
|
};
|