@ark-ui/solid 4.6.0 → 4.7.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/{WLTUCUPQ.js → 34GYXRNO.js} +3 -3
- package/dist/chunk/{BNMRTYLU.js → 3XNNMNPS.js} +16 -16
- package/dist/chunk/{HTPFX5I5.js → CTTG4GSG.js} +5 -5
- package/dist/chunk/{PZEZKJF3.jsx → EZ7NDY7U.jsx} +52 -43
- package/dist/chunk/{VFFKWKKV.jsx → JHG4EID2.jsx} +14 -37
- package/dist/chunk/{DV2ZLINV.jsx → NEI5JM4A.jsx} +3 -3
- package/dist/components/carousel/index.d.ts +16 -17
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.jsx +5 -5
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +1 -1
- package/dist/components/collection.js +1 -1
- package/dist/components/collection.jsx +1 -1
- package/dist/components/color-picker/index.d.ts +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/index.jsx +1 -1
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +6 -6
- package/dist/components/index.jsx +231 -231
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.jsx +1 -1
- package/dist/components/tree-view/index.js +1 -1
- package/dist/components/tree-view/index.jsx +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.jsx +231 -231
- package/package.json +50 -50
|
@@ -27,7 +27,7 @@ var CheckboxControl = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
var checkboxAnatomy = anatomy.extendWith("group");
|
|
29
29
|
function useCheckboxGroup(props = {}) {
|
|
30
|
-
const
|
|
30
|
+
const interactive = createMemo(() => !(props.disabled || props.readOnly));
|
|
31
31
|
const [value, setValue] = useControllableState({
|
|
32
32
|
value: props.value,
|
|
33
33
|
defaultValue: props.defaultValue || [],
|
|
@@ -41,12 +41,12 @@ function useCheckboxGroup(props = {}) {
|
|
|
41
41
|
isChecked(val) ? removeValue(val) : addValue(val);
|
|
42
42
|
};
|
|
43
43
|
const addValue = (val) => {
|
|
44
|
-
if (!
|
|
44
|
+
if (!interactive()) return;
|
|
45
45
|
if (isChecked(val)) return;
|
|
46
46
|
setValue(value().concat(val));
|
|
47
47
|
};
|
|
48
48
|
const removeValue = (val) => {
|
|
49
|
-
if (!
|
|
49
|
+
if (!interactive()) return;
|
|
50
50
|
setValue(value().filter((v) => String(v) !== String(val)));
|
|
51
51
|
};
|
|
52
52
|
const getItemProps = (itemProps) => {
|
|
@@ -7,7 +7,7 @@ import { __export } from './ESLJRKWD.js';
|
|
|
7
7
|
import { createComponent } from 'solid-js/web';
|
|
8
8
|
import { mergeProps, useMachine, normalizeProps } from '@zag-js/solid';
|
|
9
9
|
import * as carousel from '@zag-js/carousel';
|
|
10
|
-
|
|
10
|
+
export { anatomy } from '@zag-js/carousel';
|
|
11
11
|
import { createUniqueId, createMemo } from 'solid-js';
|
|
12
12
|
|
|
13
13
|
// src/components/carousel/use-carousel-context.ts
|
|
@@ -16,13 +16,18 @@ var [CarouselProvider, useCarouselContext] = createContext({
|
|
|
16
16
|
providerName: "<CarouselProvider />"
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
+
// src/components/carousel/carousel-autoplay-trigger.tsx
|
|
20
|
+
var CarouselAutoplayTrigger = (props) => {
|
|
21
|
+
const api = useCarouselContext();
|
|
22
|
+
const mergedProps = mergeProps(() => api().getAutoplayTriggerProps(), props);
|
|
23
|
+
return createComponent(ark.button, mergedProps);
|
|
24
|
+
};
|
|
25
|
+
|
|
19
26
|
// src/components/carousel/carousel-context.tsx
|
|
20
27
|
var CarouselContext = (props) => props.children(useCarouselContext());
|
|
21
|
-
var carouselAnatomy = anatomy.extendWith("control");
|
|
22
|
-
|
|
23
|
-
// src/components/carousel/carousel-control.tsx
|
|
24
28
|
var CarouselControl = (props) => {
|
|
25
|
-
const
|
|
29
|
+
const api = useCarouselContext();
|
|
30
|
+
const mergedProps = mergeProps(() => api().getControlProps(), props);
|
|
26
31
|
return createComponent(ark.div, mergedProps);
|
|
27
32
|
};
|
|
28
33
|
var CarouselIndicator = (props) => {
|
|
@@ -37,7 +42,7 @@ var CarouselIndicatorGroup = (props) => {
|
|
|
37
42
|
return createComponent(ark.div, mergedProps);
|
|
38
43
|
};
|
|
39
44
|
var CarouselItem = (props) => {
|
|
40
|
-
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
45
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index", "snapAlign"]);
|
|
41
46
|
const api = useCarouselContext();
|
|
42
47
|
const mergedProps = mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
43
48
|
return createComponent(ark.div, mergedProps);
|
|
@@ -65,7 +70,7 @@ var useCarousel = (props = {}) => {
|
|
|
65
70
|
id,
|
|
66
71
|
dir: locale().dir,
|
|
67
72
|
getRootNode: environment().getRootNode,
|
|
68
|
-
index: props.
|
|
73
|
+
index: props.defaultPage,
|
|
69
74
|
...props
|
|
70
75
|
}));
|
|
71
76
|
const [state, send] = useMachine(carousel.machine(context()), { context });
|
|
@@ -74,7 +79,7 @@ var useCarousel = (props = {}) => {
|
|
|
74
79
|
|
|
75
80
|
// src/components/carousel/carousel-root.tsx
|
|
76
81
|
var CarouselRoot = (props) => {
|
|
77
|
-
const [useCarouselProps, localProps] = createSplitProps()(props, ["
|
|
82
|
+
const [useCarouselProps, localProps] = createSplitProps()(props, ["allowMouseDrag", "autoplay", "defaultPage", "id", "ids", "inViewThreshold", "loop", "onAutoplayStatusChange", "onDragStatusChange", "onPageChange", "orientation", "padding", "page", "slideCount", "slidesPerMove", "slidesPerPage", "snapType", "spacing", "translations"]);
|
|
78
83
|
const api = useCarousel(useCarouselProps);
|
|
79
84
|
const mergedProps = mergeProps(() => api().getRootProps(), localProps);
|
|
80
85
|
return createComponent(CarouselProvider, {
|
|
@@ -96,15 +101,11 @@ var CarouselRootProvider = (props) => {
|
|
|
96
101
|
}
|
|
97
102
|
});
|
|
98
103
|
};
|
|
99
|
-
var CarouselViewport = (props) => {
|
|
100
|
-
const api = useCarouselContext();
|
|
101
|
-
const mergedProps = mergeProps(() => api().getViewportProps(), props);
|
|
102
|
-
return createComponent(ark.div, mergedProps);
|
|
103
|
-
};
|
|
104
104
|
|
|
105
105
|
// src/components/carousel/carousel.ts
|
|
106
106
|
var carousel_exports = {};
|
|
107
107
|
__export(carousel_exports, {
|
|
108
|
+
AutoplayTrigger: () => CarouselAutoplayTrigger,
|
|
108
109
|
Context: () => CarouselContext,
|
|
109
110
|
Control: () => CarouselControl,
|
|
110
111
|
Indicator: () => CarouselIndicator,
|
|
@@ -114,8 +115,7 @@ __export(carousel_exports, {
|
|
|
114
115
|
NextTrigger: () => CarouselNextTrigger,
|
|
115
116
|
PrevTrigger: () => CarouselPrevTrigger,
|
|
116
117
|
Root: () => CarouselRoot,
|
|
117
|
-
RootProvider: () => CarouselRootProvider
|
|
118
|
-
Viewport: () => CarouselViewport
|
|
118
|
+
RootProvider: () => CarouselRootProvider
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
export { CarouselContext, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselRoot, CarouselRootProvider,
|
|
121
|
+
export { CarouselAutoplayTrigger, CarouselContext, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselRoot, CarouselRootProvider, carousel_exports, useCarousel, useCarouselContext };
|
|
@@ -3,20 +3,20 @@ import { ListCollection, TreeCollection, filePathToTree } from '@zag-js/collecti
|
|
|
3
3
|
// src/components/collection.ts
|
|
4
4
|
|
|
5
5
|
// ../../node_modules/@zag-js/store/dist/index.mjs
|
|
6
|
-
function
|
|
6
|
+
function glob() {
|
|
7
7
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
8
8
|
if (typeof self !== "undefined") return self;
|
|
9
9
|
if (typeof window !== "undefined") return window;
|
|
10
10
|
if (typeof global !== "undefined") return global;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const g =
|
|
12
|
+
function globalRef(key, value) {
|
|
13
|
+
const g = glob();
|
|
14
14
|
if (!g) return value();
|
|
15
15
|
g[key] || (g[key] = value());
|
|
16
16
|
return g[key];
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var refSet = globalRef("__zag__refSet", () => /* @__PURE__ */ new WeakSet());
|
|
19
|
+
globalRef("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
|
|
20
20
|
function ref(obj) {
|
|
21
21
|
refSet.add(obj);
|
|
22
22
|
return obj;
|
|
@@ -17,83 +17,88 @@ import {
|
|
|
17
17
|
__export
|
|
18
18
|
} from "./7IUG3E2V.jsx";
|
|
19
19
|
|
|
20
|
+
// src/components/carousel/carousel-autoplay-trigger.tsx
|
|
21
|
+
import { mergeProps } from "@zag-js/solid";
|
|
22
|
+
|
|
20
23
|
// src/components/carousel/use-carousel-context.ts
|
|
21
24
|
var [CarouselProvider, useCarouselContext] = createContext({
|
|
22
25
|
hookName: "useCarouselContext",
|
|
23
26
|
providerName: "<CarouselProvider />"
|
|
24
27
|
});
|
|
25
28
|
|
|
29
|
+
// src/components/carousel/carousel-autoplay-trigger.tsx
|
|
30
|
+
var CarouselAutoplayTrigger = (props) => {
|
|
31
|
+
const api = useCarouselContext();
|
|
32
|
+
const mergedProps = mergeProps(() => api().getAutoplayTriggerProps(), props);
|
|
33
|
+
return <ark.button {...mergedProps} />;
|
|
34
|
+
};
|
|
35
|
+
|
|
26
36
|
// src/components/carousel/carousel-context.tsx
|
|
27
37
|
var CarouselContext = (props) => props.children(useCarouselContext());
|
|
28
38
|
|
|
29
39
|
// src/components/carousel/carousel-control.tsx
|
|
30
|
-
import { mergeProps } from "@zag-js/solid";
|
|
31
|
-
|
|
32
|
-
// src/components/carousel/carousel.anatomy.ts
|
|
33
|
-
import { anatomy } from "@zag-js/carousel";
|
|
34
|
-
var carouselAnatomy = anatomy.extendWith("control");
|
|
35
|
-
|
|
36
|
-
// src/components/carousel/carousel-control.tsx
|
|
40
|
+
import { mergeProps as mergeProps2 } from "@zag-js/solid";
|
|
37
41
|
var CarouselControl = (props) => {
|
|
38
|
-
const
|
|
42
|
+
const api = useCarouselContext();
|
|
43
|
+
const mergedProps = mergeProps2(() => api().getControlProps(), props);
|
|
39
44
|
return <ark.div {...mergedProps} />;
|
|
40
45
|
};
|
|
41
46
|
|
|
42
47
|
// src/components/carousel/carousel-indicator.tsx
|
|
43
|
-
import { mergeProps as
|
|
48
|
+
import { mergeProps as mergeProps3 } from "@zag-js/solid";
|
|
44
49
|
var CarouselIndicator = (props) => {
|
|
45
50
|
const [indicatorProps, localProps] = createSplitProps()(props, [
|
|
46
51
|
"index",
|
|
47
52
|
"readOnly"
|
|
48
53
|
]);
|
|
49
54
|
const api = useCarouselContext();
|
|
50
|
-
const mergedProps =
|
|
55
|
+
const mergedProps = mergeProps3(() => api().getIndicatorProps(indicatorProps), localProps);
|
|
51
56
|
return <ark.button {...mergedProps} />;
|
|
52
57
|
};
|
|
53
58
|
|
|
54
59
|
// src/components/carousel/carousel-indicator-group.tsx
|
|
55
|
-
import { mergeProps as
|
|
60
|
+
import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
56
61
|
var CarouselIndicatorGroup = (props) => {
|
|
57
62
|
const api = useCarouselContext();
|
|
58
|
-
const mergedProps =
|
|
63
|
+
const mergedProps = mergeProps4(() => api().getIndicatorGroupProps(), props);
|
|
59
64
|
return <ark.div {...mergedProps} />;
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
// src/components/carousel/carousel-item.tsx
|
|
63
|
-
import { mergeProps as
|
|
68
|
+
import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
64
69
|
var CarouselItem = (props) => {
|
|
65
|
-
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
70
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index", "snapAlign"]);
|
|
66
71
|
const api = useCarouselContext();
|
|
67
|
-
const mergedProps =
|
|
72
|
+
const mergedProps = mergeProps5(() => api().getItemProps(itemProps), localProps);
|
|
68
73
|
return <ark.div {...mergedProps} />;
|
|
69
74
|
};
|
|
70
75
|
|
|
71
76
|
// src/components/carousel/carousel-item-group.tsx
|
|
72
|
-
import { mergeProps as
|
|
77
|
+
import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
73
78
|
var CarouselItemGroup = (props) => {
|
|
74
79
|
const api = useCarouselContext();
|
|
75
|
-
const mergedProps =
|
|
80
|
+
const mergedProps = mergeProps6(() => api().getItemGroupProps(), props);
|
|
76
81
|
return <ark.div {...mergedProps} />;
|
|
77
82
|
};
|
|
78
83
|
|
|
79
84
|
// src/components/carousel/carousel-next-trigger.tsx
|
|
80
|
-
import { mergeProps as
|
|
85
|
+
import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
81
86
|
var CarouselNextTrigger = (props) => {
|
|
82
87
|
const api = useCarouselContext();
|
|
83
|
-
const mergedProps =
|
|
88
|
+
const mergedProps = mergeProps7(() => api().getNextTriggerProps(), props);
|
|
84
89
|
return <ark.button {...mergedProps} />;
|
|
85
90
|
};
|
|
86
91
|
|
|
87
92
|
// src/components/carousel/carousel-prev-trigger.tsx
|
|
88
|
-
import { mergeProps as
|
|
93
|
+
import { mergeProps as mergeProps8 } from "@zag-js/solid";
|
|
89
94
|
var CarouselPrevTrigger = (props) => {
|
|
90
95
|
const api = useCarouselContext();
|
|
91
|
-
const mergedProps =
|
|
96
|
+
const mergedProps = mergeProps8(() => api().getPrevTriggerProps(), props);
|
|
92
97
|
return <ark.button {...mergedProps} />;
|
|
93
98
|
};
|
|
94
99
|
|
|
95
100
|
// src/components/carousel/carousel-root.tsx
|
|
96
|
-
import { mergeProps as
|
|
101
|
+
import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
97
102
|
|
|
98
103
|
// src/components/carousel/use-carousel.ts
|
|
99
104
|
import * as carousel from "@zag-js/carousel";
|
|
@@ -107,7 +112,7 @@ var useCarousel = (props = {}) => {
|
|
|
107
112
|
id,
|
|
108
113
|
dir: locale().dir,
|
|
109
114
|
getRootNode: environment().getRootNode,
|
|
110
|
-
index: props.
|
|
115
|
+
index: props.defaultPage,
|
|
111
116
|
...props
|
|
112
117
|
}));
|
|
113
118
|
const [state, send] = useMachine(carousel.machine(context()), { context });
|
|
@@ -117,45 +122,50 @@ var useCarousel = (props = {}) => {
|
|
|
117
122
|
// src/components/carousel/carousel-root.tsx
|
|
118
123
|
var CarouselRoot = (props) => {
|
|
119
124
|
const [useCarouselProps, localProps] = createSplitProps()(props, [
|
|
120
|
-
"
|
|
121
|
-
"
|
|
125
|
+
"allowMouseDrag",
|
|
126
|
+
"autoplay",
|
|
127
|
+
"defaultPage",
|
|
122
128
|
"id",
|
|
123
129
|
"ids",
|
|
124
|
-
"
|
|
130
|
+
"inViewThreshold",
|
|
125
131
|
"loop",
|
|
126
|
-
"
|
|
132
|
+
"onAutoplayStatusChange",
|
|
133
|
+
"onDragStatusChange",
|
|
134
|
+
"onPageChange",
|
|
127
135
|
"orientation",
|
|
128
|
-
"
|
|
129
|
-
"
|
|
136
|
+
"padding",
|
|
137
|
+
"page",
|
|
138
|
+
"slideCount",
|
|
139
|
+
"slidesPerMove",
|
|
140
|
+
"slidesPerPage",
|
|
141
|
+
"snapType",
|
|
142
|
+
"spacing",
|
|
143
|
+
"translations"
|
|
130
144
|
]);
|
|
131
145
|
const api = useCarousel(useCarouselProps);
|
|
132
|
-
const mergedProps =
|
|
146
|
+
const mergedProps = mergeProps9(() => api().getRootProps(), localProps);
|
|
133
147
|
return <CarouselProvider value={api}>
|
|
134
148
|
<ark.div {...mergedProps} />
|
|
135
149
|
</CarouselProvider>;
|
|
136
150
|
};
|
|
137
151
|
|
|
138
152
|
// src/components/carousel/carousel-root-provider.tsx
|
|
139
|
-
import { mergeProps as
|
|
153
|
+
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
140
154
|
var CarouselRootProvider = (props) => {
|
|
141
155
|
const [{ value: carousel2 }, localProps] = createSplitProps()(props, ["value"]);
|
|
142
|
-
const mergedProps =
|
|
156
|
+
const mergedProps = mergeProps10(() => carousel2().getRootProps(), localProps);
|
|
143
157
|
return <CarouselProvider value={carousel2}>
|
|
144
158
|
<ark.div {...mergedProps} />
|
|
145
159
|
</CarouselProvider>;
|
|
146
160
|
};
|
|
147
161
|
|
|
148
|
-
// src/components/carousel/carousel
|
|
149
|
-
import {
|
|
150
|
-
var CarouselViewport = (props) => {
|
|
151
|
-
const api = useCarouselContext();
|
|
152
|
-
const mergedProps = mergeProps10(() => api().getViewportProps(), props);
|
|
153
|
-
return <ark.div {...mergedProps} />;
|
|
154
|
-
};
|
|
162
|
+
// src/components/carousel/carousel.anatomy.ts
|
|
163
|
+
import { anatomy } from "@zag-js/carousel";
|
|
155
164
|
|
|
156
165
|
// src/components/carousel/carousel.ts
|
|
157
166
|
var carousel_exports = {};
|
|
158
167
|
__export(carousel_exports, {
|
|
168
|
+
AutoplayTrigger: () => CarouselAutoplayTrigger,
|
|
159
169
|
Context: () => CarouselContext,
|
|
160
170
|
Control: () => CarouselControl,
|
|
161
171
|
Indicator: () => CarouselIndicator,
|
|
@@ -165,14 +175,13 @@ __export(carousel_exports, {
|
|
|
165
175
|
NextTrigger: () => CarouselNextTrigger,
|
|
166
176
|
PrevTrigger: () => CarouselPrevTrigger,
|
|
167
177
|
Root: () => CarouselRoot,
|
|
168
|
-
RootProvider: () => CarouselRootProvider
|
|
169
|
-
Viewport: () => CarouselViewport
|
|
178
|
+
RootProvider: () => CarouselRootProvider
|
|
170
179
|
});
|
|
171
180
|
|
|
172
181
|
export {
|
|
173
182
|
useCarouselContext,
|
|
183
|
+
CarouselAutoplayTrigger,
|
|
174
184
|
CarouselContext,
|
|
175
|
-
carouselAnatomy,
|
|
176
185
|
CarouselControl,
|
|
177
186
|
CarouselIndicator,
|
|
178
187
|
CarouselIndicatorGroup,
|
|
@@ -183,6 +192,6 @@ export {
|
|
|
183
192
|
useCarousel,
|
|
184
193
|
CarouselRoot,
|
|
185
194
|
CarouselRootProvider,
|
|
186
|
-
|
|
195
|
+
anatomy,
|
|
187
196
|
carousel_exports
|
|
188
197
|
};
|
|
@@ -22,36 +22,28 @@ var markToTrack = (obj, mark = true) => {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// ../../node_modules/@zag-js/store/dist/index.mjs
|
|
25
|
-
function
|
|
25
|
+
function glob() {
|
|
26
26
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
27
27
|
if (typeof self !== "undefined") return self;
|
|
28
28
|
if (typeof window !== "undefined") return window;
|
|
29
29
|
if (typeof global !== "undefined") return global;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const g =
|
|
31
|
+
function globalRef(key, value) {
|
|
32
|
+
const g = glob();
|
|
33
33
|
if (!g) return value();
|
|
34
34
|
g[key] || (g[key] = value());
|
|
35
35
|
return g[key];
|
|
36
36
|
}
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var proxyStateMap = makeGlobal("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
|
|
40
|
-
var refSet = makeGlobal("__zag__refSet", () => /* @__PURE__ */ new WeakSet());
|
|
41
|
-
var isReactElement = (x) => typeof x === "object" && x !== null && "$$typeof" in x;
|
|
37
|
+
var refSet = globalRef("__zag__refSet", () => /* @__PURE__ */ new WeakSet());
|
|
38
|
+
var isReactElement = (x) => typeof x === "object" && x !== null && "$$typeof" in x && "props" in x;
|
|
42
39
|
var isVueElement = (x) => typeof x === "object" && x !== null && "__v_isVNode" in x;
|
|
43
40
|
var isDOMElement = (x) => typeof x === "object" && x !== null && "nodeType" in x && typeof x.nodeName === "string";
|
|
44
41
|
var isElement = (x) => isReactElement(x) || isVueElement(x) || isDOMElement(x);
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
throw promise.reason;
|
|
51
|
-
default:
|
|
52
|
-
throw promise;
|
|
53
|
-
}
|
|
54
|
-
}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {
|
|
42
|
+
var isObject = (x) => x !== null && typeof x === "object";
|
|
43
|
+
var canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !isElement(x) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer) && !(x instanceof Promise);
|
|
44
|
+
var isDev = () => true;
|
|
45
|
+
var proxyStateMap = globalRef("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
|
|
46
|
+
var buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version) => {
|
|
55
47
|
const cache = snapCache.get(target);
|
|
56
48
|
if (cache?.[0] === version) {
|
|
57
49
|
return cache[1];
|
|
@@ -64,14 +56,8 @@ var buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) =>
|
|
|
64
56
|
if (refSet.has(value)) {
|
|
65
57
|
markToTrack(value, false);
|
|
66
58
|
snap[key] = value;
|
|
67
|
-
} else if (value instanceof Promise) {
|
|
68
|
-
Object.defineProperty(snap, key, {
|
|
69
|
-
get() {
|
|
70
|
-
return handlePromise(value);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
59
|
} else if (proxyStateMap.has(value)) {
|
|
74
|
-
snap[key] = snapshot(value
|
|
60
|
+
snap[key] = snapshot(value);
|
|
75
61
|
} else {
|
|
76
62
|
snap[key] = value;
|
|
77
63
|
}
|
|
@@ -177,15 +163,7 @@ var buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) =>
|
|
|
177
163
|
}
|
|
178
164
|
let nextValue = value;
|
|
179
165
|
if (Object.getOwnPropertyDescriptor(target, prop)?.set) ;
|
|
180
|
-
else
|
|
181
|
-
value.then((v) => {
|
|
182
|
-
Object.assign(value, { status: "fulfilled", value: v });
|
|
183
|
-
notifyUpdate(["resolve", [prop], v]);
|
|
184
|
-
}).catch((e) => {
|
|
185
|
-
Object.assign(value, { status: "rejected", reason: e });
|
|
186
|
-
notifyUpdate(["reject", [prop], e]);
|
|
187
|
-
});
|
|
188
|
-
} else {
|
|
166
|
+
else {
|
|
189
167
|
if (!proxyStateMap.has(value) && canProxy(value)) {
|
|
190
168
|
nextValue = proxy(value);
|
|
191
169
|
}
|
|
@@ -222,7 +200,6 @@ var buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) =>
|
|
|
222
200
|
objectIs,
|
|
223
201
|
newProxy,
|
|
224
202
|
canProxy,
|
|
225
|
-
defaultHandlePromise,
|
|
226
203
|
snapCache,
|
|
227
204
|
createSnapshot,
|
|
228
205
|
proxyCache,
|
|
@@ -232,12 +209,12 @@ var [proxyFunction] = buildProxyFunction();
|
|
|
232
209
|
function proxy(initialObject = {}) {
|
|
233
210
|
return proxyFunction(initialObject);
|
|
234
211
|
}
|
|
235
|
-
function snapshot(proxyObject
|
|
212
|
+
function snapshot(proxyObject) {
|
|
236
213
|
const proxyState = proxyStateMap.get(proxyObject);
|
|
237
214
|
if (isDev() && !proxyState) {
|
|
238
215
|
}
|
|
239
216
|
const [target, ensureVersion, createSnapshot] = proxyState;
|
|
240
|
-
return createSnapshot(target, ensureVersion()
|
|
217
|
+
return createSnapshot(target, ensureVersion());
|
|
241
218
|
}
|
|
242
219
|
function ref(obj) {
|
|
243
220
|
refSet.add(obj);
|
|
@@ -47,7 +47,7 @@ var checkboxAnatomy = anatomy.extendWith("group");
|
|
|
47
47
|
// src/components/checkbox/use-checkbox-group.ts
|
|
48
48
|
import { createMemo } from "solid-js";
|
|
49
49
|
function useCheckboxGroup(props = {}) {
|
|
50
|
-
const
|
|
50
|
+
const interactive = createMemo(() => !(props.disabled || props.readOnly));
|
|
51
51
|
const [value, setValue] = useControllableState({
|
|
52
52
|
value: props.value,
|
|
53
53
|
defaultValue: props.defaultValue || [],
|
|
@@ -61,12 +61,12 @@ function useCheckboxGroup(props = {}) {
|
|
|
61
61
|
isChecked(val) ? removeValue(val) : addValue(val);
|
|
62
62
|
};
|
|
63
63
|
const addValue = (val) => {
|
|
64
|
-
if (!
|
|
64
|
+
if (!interactive()) return;
|
|
65
65
|
if (isChecked(val)) return;
|
|
66
66
|
setValue(value().concat(val));
|
|
67
67
|
};
|
|
68
68
|
const removeValue = (val) => {
|
|
69
|
-
if (!
|
|
69
|
+
if (!interactive()) return;
|
|
70
70
|
setValue(value().filter((v) => String(v) !== String(val)));
|
|
71
71
|
};
|
|
72
72
|
const getItemProps = (itemProps) => {
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import * as carousel$1 from '@zag-js/carousel';
|
|
2
|
-
import { IndicatorProps, ItemProps,
|
|
3
|
-
export {
|
|
2
|
+
import { IndicatorProps, ItemProps, AutoplayStatusDetails, DragStatusDetails, PageChangeDetails } from '@zag-js/carousel';
|
|
3
|
+
export { AutoplayStatusDetails as CarouselAutoplayStatusDetails, DragStatusDetails as CarouselDragStatusDetails, PageChangeDetails as CarouselPageChangeDetails, anatomy as carouselAnatomy } from '@zag-js/carousel';
|
|
4
4
|
import * as solid_js from 'solid-js';
|
|
5
5
|
import { Accessor, JSX } from 'solid-js';
|
|
6
|
+
import { PolymorphicProps, HTMLProps } from '../factory.js';
|
|
6
7
|
import { PropTypes } from '@zag-js/solid';
|
|
7
8
|
import { O as Optional } from '../../types-B277wCdv.js';
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
interface CarouselAutoplayTriggerBaseProps extends PolymorphicProps<'button'> {
|
|
11
|
+
}
|
|
12
|
+
interface CarouselAutoplayTriggerProps extends HTMLProps<'button'>, CarouselAutoplayTriggerBaseProps {
|
|
13
|
+
}
|
|
14
|
+
declare const CarouselAutoplayTrigger: (props: CarouselAutoplayTriggerProps) => solid_js.JSX.Element;
|
|
10
15
|
|
|
11
16
|
interface UseCarouselProps extends Optional<Omit<carousel$1.Context, 'dir' | 'getRootNode'>, 'id'> {
|
|
12
17
|
/**
|
|
13
|
-
* The initial
|
|
18
|
+
* The initial page of the carousel when it is first rendered.
|
|
14
19
|
* Use this when you do not need to control the state of the carousel.
|
|
15
20
|
*/
|
|
16
|
-
|
|
21
|
+
defaultPage?: carousel$1.Context['page'];
|
|
17
22
|
}
|
|
18
23
|
interface UseCarouselReturn extends Accessor<carousel$1.Api<PropTypes>> {
|
|
19
24
|
}
|
|
@@ -85,17 +90,11 @@ interface CarouselRootProviderProps extends HTMLProps<'div'>, RootProviderProps,
|
|
|
85
90
|
}
|
|
86
91
|
declare const CarouselRootProvider: (props: CarouselRootProviderProps) => solid_js.JSX.Element;
|
|
87
92
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
declare const CarouselViewport: (props: CarouselViewportProps) => solid_js.JSX.Element;
|
|
93
|
-
|
|
94
|
-
declare const carouselAnatomy: _zag_js_anatomy.AnatomyInstance<"root" | "viewport" | "itemGroup" | "item" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "indicator" | "control">;
|
|
95
|
-
|
|
96
|
-
declare const carousel_SlideChangeDetails: typeof SlideChangeDetails;
|
|
93
|
+
declare const carousel_AutoplayStatusDetails: typeof AutoplayStatusDetails;
|
|
94
|
+
declare const carousel_DragStatusDetails: typeof DragStatusDetails;
|
|
95
|
+
declare const carousel_PageChangeDetails: typeof PageChangeDetails;
|
|
97
96
|
declare namespace carousel {
|
|
98
|
-
export { CarouselContext as Context, type CarouselContextProps as ContextProps, CarouselControl as Control, type CarouselControlBaseProps as ControlBaseProps, type CarouselControlProps as ControlProps, CarouselIndicator as Indicator, type CarouselIndicatorBaseProps as IndicatorBaseProps, CarouselIndicatorGroup as IndicatorGroup, type CarouselIndicatorGroupBaseProps as IndicatorGroupBaseProps, type CarouselIndicatorGroupProps as IndicatorGroupProps, type CarouselIndicatorProps as IndicatorProps, CarouselItem as Item, type CarouselItemBaseProps as ItemBaseProps, CarouselItemGroup as ItemGroup, type CarouselItemGroupBaseProps as ItemGroupBaseProps, type CarouselItemGroupProps as ItemGroupProps, type CarouselItemProps as ItemProps, CarouselNextTrigger as NextTrigger, type CarouselNextTriggerBaseProps as NextTriggerBaseProps, type CarouselNextTriggerProps as NextTriggerProps, CarouselPrevTrigger as PrevTrigger, type CarouselPrevTriggerBaseProps as PrevTriggerBaseProps, type CarouselPrevTriggerProps as PrevTriggerProps, CarouselRoot as Root, type CarouselRootBaseProps as RootBaseProps, type CarouselRootProps as RootProps, CarouselRootProvider as RootProvider, type CarouselRootProviderBaseProps as RootProviderBaseProps, type CarouselRootProviderProps as RootProviderProps
|
|
97
|
+
export { carousel_AutoplayStatusDetails as AutoplayStatusDetails, CarouselAutoplayTrigger as AutoplayTrigger, type CarouselAutoplayTriggerBaseProps as AutoplayTriggerBaseProps, type CarouselAutoplayTriggerProps as AutoplayTriggerProps, CarouselContext as Context, type CarouselContextProps as ContextProps, CarouselControl as Control, type CarouselControlBaseProps as ControlBaseProps, type CarouselControlProps as ControlProps, carousel_DragStatusDetails as DragStatusDetails, CarouselIndicator as Indicator, type CarouselIndicatorBaseProps as IndicatorBaseProps, CarouselIndicatorGroup as IndicatorGroup, type CarouselIndicatorGroupBaseProps as IndicatorGroupBaseProps, type CarouselIndicatorGroupProps as IndicatorGroupProps, type CarouselIndicatorProps as IndicatorProps, CarouselItem as Item, type CarouselItemBaseProps as ItemBaseProps, CarouselItemGroup as ItemGroup, type CarouselItemGroupBaseProps as ItemGroupBaseProps, type CarouselItemGroupProps as ItemGroupProps, type CarouselItemProps as ItemProps, CarouselNextTrigger as NextTrigger, type CarouselNextTriggerBaseProps as NextTriggerBaseProps, type CarouselNextTriggerProps as NextTriggerProps, carousel_PageChangeDetails as PageChangeDetails, CarouselPrevTrigger as PrevTrigger, type CarouselPrevTriggerBaseProps as PrevTriggerBaseProps, type CarouselPrevTriggerProps as PrevTriggerProps, CarouselRoot as Root, type CarouselRootBaseProps as RootBaseProps, type CarouselRootProps as RootProps, CarouselRootProvider as RootProvider, type CarouselRootProviderBaseProps as RootProviderBaseProps, type CarouselRootProviderProps as RootProviderProps };
|
|
99
98
|
}
|
|
100
99
|
|
|
101
|
-
export { carousel as Carousel, CarouselContext, type CarouselContextProps, CarouselControl, type CarouselControlBaseProps, type CarouselControlProps, CarouselIndicator, type CarouselIndicatorBaseProps, CarouselIndicatorGroup, type CarouselIndicatorGroupBaseProps, type CarouselIndicatorGroupProps, type CarouselIndicatorProps, CarouselItem, type CarouselItemBaseProps, CarouselItemGroup, type CarouselItemGroupBaseProps, type CarouselItemGroupProps, type CarouselItemProps, CarouselNextTrigger, type CarouselNextTriggerBaseProps, type CarouselNextTriggerProps, CarouselPrevTrigger, type CarouselPrevTriggerBaseProps, type CarouselPrevTriggerProps, CarouselRoot, type CarouselRootBaseProps, type CarouselRootProps, CarouselRootProvider, type CarouselRootProviderBaseProps, type CarouselRootProviderProps,
|
|
100
|
+
export { carousel as Carousel, CarouselAutoplayTrigger, type CarouselAutoplayTriggerBaseProps, type CarouselAutoplayTriggerProps, CarouselContext, type CarouselContextProps, CarouselControl, type CarouselControlBaseProps, type CarouselControlProps, CarouselIndicator, type CarouselIndicatorBaseProps, CarouselIndicatorGroup, type CarouselIndicatorGroupBaseProps, type CarouselIndicatorGroupProps, type CarouselIndicatorProps, CarouselItem, type CarouselItemBaseProps, CarouselItemGroup, type CarouselItemGroupBaseProps, type CarouselItemGroupProps, type CarouselItemProps, CarouselNextTrigger, type CarouselNextTriggerBaseProps, type CarouselNextTriggerProps, CarouselPrevTrigger, type CarouselPrevTriggerBaseProps, type CarouselPrevTriggerProps, CarouselRoot, type CarouselRootBaseProps, type CarouselRootProps, CarouselRootProvider, type CarouselRootProviderBaseProps, type CarouselRootProviderProps, type UseCarouselContext, type UseCarouselProps, type UseCarouselReturn, useCarousel, useCarouselContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { carousel_exports as Carousel, CarouselContext, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselRoot, CarouselRootProvider,
|
|
1
|
+
export { carousel_exports as Carousel, CarouselAutoplayTrigger, CarouselContext, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselRoot, CarouselRootProvider, anatomy as carouselAnatomy, useCarousel, useCarouselContext } from '../../chunk/3XNNMNPS.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CarouselAutoplayTrigger,
|
|
2
3
|
CarouselContext,
|
|
3
4
|
CarouselControl,
|
|
4
5
|
CarouselIndicator,
|
|
@@ -9,12 +10,11 @@ import {
|
|
|
9
10
|
CarouselPrevTrigger,
|
|
10
11
|
CarouselRoot,
|
|
11
12
|
CarouselRootProvider,
|
|
12
|
-
|
|
13
|
-
carouselAnatomy,
|
|
13
|
+
anatomy,
|
|
14
14
|
carousel_exports,
|
|
15
15
|
useCarousel,
|
|
16
16
|
useCarouselContext
|
|
17
|
-
} from "../../chunk/
|
|
17
|
+
} from "../../chunk/EZ7NDY7U.jsx";
|
|
18
18
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
19
19
|
import "../../chunk/UFYZ7HLU.jsx";
|
|
20
20
|
import "../../chunk/ODQYYKL5.jsx";
|
|
@@ -25,6 +25,7 @@ import "../../chunk/NMGUCD2L.jsx";
|
|
|
25
25
|
import "../../chunk/7IUG3E2V.jsx";
|
|
26
26
|
export {
|
|
27
27
|
carousel_exports as Carousel,
|
|
28
|
+
CarouselAutoplayTrigger,
|
|
28
29
|
CarouselContext,
|
|
29
30
|
CarouselControl,
|
|
30
31
|
CarouselIndicator,
|
|
@@ -35,8 +36,7 @@ export {
|
|
|
35
36
|
CarouselPrevTrigger,
|
|
36
37
|
CarouselRoot,
|
|
37
38
|
CarouselRootProvider,
|
|
38
|
-
|
|
39
|
-
carouselAnatomy,
|
|
39
|
+
anatomy as carouselAnatomy,
|
|
40
40
|
useCarousel,
|
|
41
41
|
useCarouselContext
|
|
42
42
|
};
|
|
@@ -131,7 +131,7 @@ interface CheckboxRootProviderProps extends HTMLProps<'label'>, RootProviderProp
|
|
|
131
131
|
}
|
|
132
132
|
declare const CheckboxRootProvider: (props: CheckboxRootProviderProps) => solid_js.JSX.Element;
|
|
133
133
|
|
|
134
|
-
declare const checkboxAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "group" | "root" | "
|
|
134
|
+
declare const checkboxAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "group" | "root" | "control" | "indicator">;
|
|
135
135
|
|
|
136
136
|
interface UseCheckboxGroupContext extends UseCheckboxGroupReturn {
|
|
137
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { checkbox_exports as Checkbox, CheckboxContext, CheckboxControl, CheckboxGroup, CheckboxHiddenInput, CheckboxIndicator, CheckboxLabel, CheckboxRoot, CheckboxRootProvider, checkboxAnatomy, useCheckbox, useCheckboxContext, useCheckboxGroup, useCheckboxGroupContext } from '../../chunk/
|
|
1
|
+
export { checkbox_exports as Checkbox, CheckboxContext, CheckboxControl, CheckboxGroup, CheckboxHiddenInput, CheckboxIndicator, CheckboxLabel, CheckboxRoot, CheckboxRootProvider, checkboxAnatomy, useCheckbox, useCheckboxContext, useCheckboxGroup, useCheckboxGroupContext } from '../../chunk/34GYXRNO.js';
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
useCheckboxContext,
|
|
14
14
|
useCheckboxGroup,
|
|
15
15
|
useCheckboxGroupContext
|
|
16
|
-
} from "../../chunk/
|
|
16
|
+
} from "../../chunk/NEI5JM4A.jsx";
|
|
17
17
|
import "../../chunk/52WUF3CY.jsx";
|
|
18
18
|
import "../../chunk/TY6NCPFG.jsx";
|
|
19
19
|
import "../../chunk/RZBYC7DR.jsx";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createFileTreeCollection, createListCollection, createTreeCollection } from '../chunk/
|
|
1
|
+
export { createFileTreeCollection, createListCollection, createTreeCollection } from '../chunk/CTTG4GSG.js';
|
|
@@ -212,7 +212,7 @@ interface ColorPickerViewProps extends HTMLProps<'div'>, ColorPickerViewBaseProp
|
|
|
212
212
|
}
|
|
213
213
|
declare const ColorPickerView: (props: ColorPickerViewProps) => solid_js.JSX.Element;
|
|
214
214
|
|
|
215
|
-
declare const colorPickerAnatomy: _zag_js_anatomy.AnatomyInstance<"
|
|
215
|
+
declare const colorPickerAnatomy: _zag_js_anatomy.AnatomyInstance<"label" | "area" | "view" | "content" | "root" | "trigger" | "control" | "positioner" | "formatSelect" | "areaThumb" | "channelInput" | "channelSliderTrack" | "channelSliderThumb" | "valueText" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderValueText" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger">;
|
|
216
216
|
|
|
217
217
|
declare const colorPicker_Color: typeof Color;
|
|
218
218
|
declare const colorPicker_ColorFormat: typeof ColorFormat;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { combobox_exports as Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxContext, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemContext, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxRootProvider, ComboboxTrigger, anatomy as comboboxAnatomy, useCombobox, useComboboxContext, useComboboxItemContext } from '../../chunk/YEVD47QN.js';
|
|
2
|
-
export { createListCollection } from '../../chunk/
|
|
2
|
+
export { createListCollection } from '../../chunk/CTTG4GSG.js';
|