@ark-ui/solid 4.8.0 → 4.9.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/{UXJGHMFS.js → 22UQ4DZC.js} +1 -1
- package/dist/chunk/{D4XLNL66.jsx → 2ILK4IFM.jsx} +16 -5
- package/dist/chunk/{JTHKX457.js → 2J42A7KM.js} +1 -14
- package/dist/chunk/{MARFWGWI.jsx → 2NEVBQW4.jsx} +1 -1
- package/dist/chunk/{RCK6LCJM.jsx → 34JAVC2R.jsx} +1 -1
- package/dist/chunk/{35R4VP6U.js → 3V3HI6QW.js} +12 -4
- package/dist/chunk/{T6IREKKO.js → 7KPVYYFT.js} +1 -1
- package/dist/chunk/ANUFR4QW.jsx +36 -0
- package/dist/chunk/{G7GWGK6F.js → AWO62YTJ.js} +1 -1
- package/dist/chunk/CIPYIXIW.js +227 -0
- package/dist/chunk/{6L7HNED6.jsx → CQN5S4C3.jsx} +1 -1
- package/dist/chunk/DOBZPYAN.jsx +18 -0
- package/dist/chunk/{MZPPLECL.js → DUDD2T7G.js} +1 -1
- package/dist/chunk/{VIUEKSBO.js → DUYGPLFV.js} +1 -1
- package/dist/chunk/{YCESXPIN.jsx → EHJDQTTW.jsx} +3 -15
- package/dist/chunk/{VZFG6XYZ.js → FDN5MSFM.js} +1 -1
- package/dist/chunk/{GVRRR27D.jsx → FS3LMJ37.jsx} +1 -1
- package/dist/chunk/FVMQXW27.jsx +265 -0
- package/dist/chunk/{SZH7YUGW.jsx → GWNETTAV.jsx} +3 -3
- package/dist/chunk/IL7WZATP.js +25 -0
- package/dist/chunk/{VQWGXSW6.js → MJNR43Q5.js} +1 -1
- package/dist/chunk/{TY6NCPFG.jsx → MSHQY44G.jsx} +22 -22
- package/dist/chunk/{PZ7ZCWGA.js → NDY7YFV2.js} +1 -1
- package/dist/chunk/{4FXOTC23.js → QA6ZMN5Y.js} +1 -1
- package/dist/chunk/{DT5WVDUV.jsx → RH2PDRKN.jsx} +1 -1
- package/dist/chunk/{YVIJOCWC.jsx → RVUYRERH.jsx} +1 -1
- package/dist/chunk/{3NSM24PL.jsx → SBPY26HV.jsx} +1 -1
- package/dist/chunk/{4XC3UALJ.jsx → T433MZNC.jsx} +3 -3
- package/dist/chunk/{ZYF7ARA6.jsx → TDD2LTPZ.jsx} +3 -3
- package/dist/chunk/{3EJGSZCP.jsx → TMUQ6SLE.jsx} +1 -1
- package/dist/chunk/{U23DU73Q.js → XCNALQF7.js} +1 -1
- package/dist/chunk/XN6EERRM.js +16 -0
- package/dist/chunk/{BUWVAHRG.js → XTV6ZFAA.js} +1 -1
- package/dist/components/accordion/index.jsx +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +3 -3
- package/dist/components/carousel/index.jsx +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +4 -4
- package/dist/components/clipboard/index.jsx +2 -2
- package/dist/components/collapsible/index.jsx +2 -2
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.jsx +5 -5
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/index.jsx +7 -7
- package/dist/components/date-picker/index.jsx +2 -2
- package/dist/components/dialog/index.jsx +2 -2
- package/dist/components/editable/index.js +1 -1
- package/dist/components/editable/index.jsx +4 -4
- package/dist/components/field/index.d.ts +7 -7
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.jsx +1 -1
- package/dist/components/file-upload/index.d.ts +5 -5
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/file-upload/index.jsx +4 -4
- package/dist/components/focus-trap/index.d.ts +18 -0
- package/dist/components/focus-trap/index.js +1 -0
- package/dist/components/focus-trap/index.jsx +10 -0
- package/dist/components/format/index.jsx +1 -1
- package/dist/components/frame/index.js +1 -1
- package/dist/components/frame/index.jsx +3 -2
- package/dist/components/hover-card/index.jsx +2 -2
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +25 -23
- package/dist/components/index.jsx +320 -275
- 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.jsx +2 -2
- package/dist/components/pin-input/index.js +1 -1
- package/dist/components/pin-input/index.jsx +4 -4
- package/dist/components/popover/index.jsx +2 -2
- package/dist/components/progress/index.jsx +2 -2
- package/dist/components/qr-code/index.jsx +2 -2
- 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/segment-group/index.jsx +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.jsx +7 -7
- package/dist/components/signature-pad/index.js +1 -1
- package/dist/components/signature-pad/index.jsx +4 -4
- package/dist/components/slider/index.jsx +2 -2
- package/dist/components/splitter/index.jsx +2 -2
- 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.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.jsx +2 -2
- package/dist/components/timer/index.jsx +2 -2
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/index.jsx +1 -1
- package/dist/components/toggle-group/index.jsx +2 -2
- package/dist/components/tooltip/index.jsx +2 -2
- package/dist/components/tour/index.d.ts +136 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/tour/index.jsx +52 -0
- package/dist/components/tree-view/index.jsx +5 -5
- package/dist/index.d.ts +4 -0
- package/dist/index.js +25 -23
- package/dist/index.jsx +320 -275
- package/dist/providers/index.jsx +1 -1
- package/package.json +54 -51
- package/dist/chunk/{PBJ7MGGS.js → 632HFNZF.js} +19 -19
- package/dist/chunk/{7KBRNVZ6.js → MV3KTL7M.js} +9 -9
- package/dist/chunk/{5D3VKQUP.jsx → NK4T7LIZ.jsx} +0 -0
- package/dist/chunk/{2PEBPAD5.jsx → R2YVXMP7.jsx} +0 -0
- package/dist/chunk/{CFEFSYGC.jsx → SN5TXTB6.jsx} +9 -9
- /package/dist/chunk/{ZKHLGP7Q.js → W43X4SNE.js} +0 -0
- /package/dist/chunk/{FE2WXPJR.js → ZWNW7ARB.js} +0 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PresenceProvider,
|
|
3
|
+
splitPresenceProps,
|
|
4
|
+
usePresence,
|
|
5
|
+
usePresenceContext
|
|
6
|
+
} from "./E72NMPSK.jsx";
|
|
7
|
+
import {
|
|
8
|
+
RenderStrategyProvider,
|
|
9
|
+
splitRenderStrategyProps,
|
|
10
|
+
useRenderStrategyContext
|
|
11
|
+
} from "./5ONYCKM3.jsx";
|
|
12
|
+
import {
|
|
13
|
+
createSplitProps
|
|
14
|
+
} from "./6WEDGJKQ.jsx";
|
|
15
|
+
import {
|
|
16
|
+
ark
|
|
17
|
+
} from "./UFYZ7HLU.jsx";
|
|
18
|
+
import {
|
|
19
|
+
useEnvironmentContext
|
|
20
|
+
} from "./5O4RWSWO.jsx";
|
|
21
|
+
import {
|
|
22
|
+
useLocaleContext
|
|
23
|
+
} from "./3QQZKR3F.jsx";
|
|
24
|
+
import {
|
|
25
|
+
createContext
|
|
26
|
+
} from "./NMGUCD2L.jsx";
|
|
27
|
+
import {
|
|
28
|
+
__export
|
|
29
|
+
} from "./7IUG3E2V.jsx";
|
|
30
|
+
|
|
31
|
+
// src/components/tour/tour-action-trigger.tsx
|
|
32
|
+
import { mergeProps } from "@zag-js/solid";
|
|
33
|
+
|
|
34
|
+
// src/components/tour/use-tour-context.ts
|
|
35
|
+
var [TourProvider, useTourContext] = createContext({
|
|
36
|
+
hookName: "useTourContext",
|
|
37
|
+
providerName: "<TourProvider />"
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// src/components/tour/tour-action-trigger.tsx
|
|
41
|
+
var TourActionTrigger = (props) => {
|
|
42
|
+
const [actionTriggerProps, localProps] = createSplitProps()(props, [
|
|
43
|
+
"action"
|
|
44
|
+
]);
|
|
45
|
+
const tour2 = useTourContext();
|
|
46
|
+
const mergedProps = mergeProps(() => tour2().getActionTriggerProps(actionTriggerProps), localProps);
|
|
47
|
+
return <ark.button {...mergedProps}>
|
|
48
|
+
{mergedProps.children || actionTriggerProps.action.label}
|
|
49
|
+
</ark.button>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/components/tour/tour-actions.tsx
|
|
53
|
+
var TourActions = (props) => {
|
|
54
|
+
const tour2 = useTourContext();
|
|
55
|
+
return props.children(() => tour2().step?.actions ?? []);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/components/tour/tour-arrow.tsx
|
|
59
|
+
import { mergeProps as mergeProps2 } from "@zag-js/solid";
|
|
60
|
+
import { Show } from "solid-js";
|
|
61
|
+
var TourArrow = (props) => {
|
|
62
|
+
const tour2 = useTourContext();
|
|
63
|
+
const mergedProps = mergeProps2(() => tour2().getArrowProps(), props);
|
|
64
|
+
return <Show when={tour2().step?.arrow}>
|
|
65
|
+
<ark.div {...mergedProps} />
|
|
66
|
+
</Show>;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// src/components/tour/tour-arrow-tip.tsx
|
|
70
|
+
import { mergeProps as mergeProps3 } from "@zag-js/solid";
|
|
71
|
+
var TourArrowTip = (props) => {
|
|
72
|
+
const tour2 = useTourContext();
|
|
73
|
+
const mergedProps = mergeProps3(() => tour2().getArrowTipProps(), props);
|
|
74
|
+
return <ark.div {...mergedProps} />;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// src/components/tour/tour-backdrop.tsx
|
|
78
|
+
import { mergeProps as mergeProps4 } from "@zag-js/solid";
|
|
79
|
+
import { Show as Show2 } from "solid-js";
|
|
80
|
+
var TourBackdrop = (props) => {
|
|
81
|
+
const tour2 = useTourContext();
|
|
82
|
+
const renderStrategyProps = useRenderStrategyContext();
|
|
83
|
+
const presence = usePresence(mergeProps4(renderStrategyProps, () => ({ present: tour2().open })));
|
|
84
|
+
const mergedProps = mergeProps4(
|
|
85
|
+
() => tour2().getBackdropProps(),
|
|
86
|
+
() => presence().presenceProps,
|
|
87
|
+
props
|
|
88
|
+
);
|
|
89
|
+
return <Show2 when={!presence().unmounted}>
|
|
90
|
+
<ark.div {...mergedProps} hidden={!tour2().step?.backdrop} />
|
|
91
|
+
</Show2>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// src/components/tour/tour-close-trigger.tsx
|
|
95
|
+
import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
96
|
+
var TourCloseTrigger = (props) => {
|
|
97
|
+
const tour2 = useTourContext();
|
|
98
|
+
const mergedProps = mergeProps5(() => tour2().getCloseTriggerProps(), props);
|
|
99
|
+
return <ark.button {...mergedProps} />;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// src/components/tour/tour-content.tsx
|
|
103
|
+
import { mergeProps as mergeProps6 } from "@zag-js/solid";
|
|
104
|
+
import { Show as Show3 } from "solid-js";
|
|
105
|
+
var TourContent = (props) => {
|
|
106
|
+
const tour2 = useTourContext();
|
|
107
|
+
const renderStrategyProps = useRenderStrategyContext();
|
|
108
|
+
const presence = usePresence(mergeProps6(renderStrategyProps, () => ({ present: tour2().open })));
|
|
109
|
+
const mergedProps = mergeProps6(
|
|
110
|
+
() => tour2().getContentProps(),
|
|
111
|
+
() => presence().presenceProps,
|
|
112
|
+
props
|
|
113
|
+
);
|
|
114
|
+
return <Show3 when={!presence().unmounted}>
|
|
115
|
+
<ark.div {...mergedProps} />
|
|
116
|
+
</Show3>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// src/components/tour/tour-context.tsx
|
|
120
|
+
var TourContext = (props) => props.children(useTourContext());
|
|
121
|
+
|
|
122
|
+
// src/components/tour/tour-control.tsx
|
|
123
|
+
import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
124
|
+
|
|
125
|
+
// src/components/tour/tour.anatomy.ts
|
|
126
|
+
import { anatomy } from "@zag-js/tour";
|
|
127
|
+
var tourAnatomy = anatomy.extendWith("control");
|
|
128
|
+
|
|
129
|
+
// src/components/tour/tour-control.tsx
|
|
130
|
+
var TourControl = (props) => {
|
|
131
|
+
const mergedProps = mergeProps7(() => tourAnatomy.build().control.attrs, props);
|
|
132
|
+
return <ark.div {...mergedProps} />;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// src/components/tour/tour-description.tsx
|
|
136
|
+
import { mergeProps as mergeProps8 } from "@zag-js/solid";
|
|
137
|
+
var TourDescription = (props) => {
|
|
138
|
+
const tour2 = useTourContext();
|
|
139
|
+
const mergedProps = mergeProps8(() => tour2().getDescriptionProps(), props);
|
|
140
|
+
return <ark.div {...mergedProps}>{mergedProps.children || tour2().step?.description}</ark.div>;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// src/components/tour/tour-positioner.tsx
|
|
144
|
+
import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
145
|
+
import { Show as Show4 } from "solid-js";
|
|
146
|
+
var TourPositioner = (props) => {
|
|
147
|
+
const tour2 = useTourContext();
|
|
148
|
+
const presence = usePresenceContext();
|
|
149
|
+
const mergedProps = mergeProps9(() => tour2().getPositionerProps(), props);
|
|
150
|
+
return <Show4 when={!presence().unmounted}>
|
|
151
|
+
<ark.div {...mergedProps} />
|
|
152
|
+
</Show4>;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// src/components/tour/tour-progress-text.tsx
|
|
156
|
+
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
157
|
+
var TourProgressText = (props) => {
|
|
158
|
+
const tour2 = useTourContext();
|
|
159
|
+
const mergedProps = mergeProps10(() => tour2().getProgressTextProps(), props);
|
|
160
|
+
return <ark.div {...mergedProps}>
|
|
161
|
+
{mergedProps.children || tour2().getProgressText()}
|
|
162
|
+
</ark.div>;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// src/components/tour/tour-root.tsx
|
|
166
|
+
import { mergeProps as mergeProps11 } from "@zag-js/solid";
|
|
167
|
+
var TourRoot = (props) => {
|
|
168
|
+
const [presenceProps, rootProps] = splitPresenceProps(props);
|
|
169
|
+
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
170
|
+
const presence = usePresence(
|
|
171
|
+
mergeProps11(presenceProps, () => ({ present: rootProps.tour().open }))
|
|
172
|
+
);
|
|
173
|
+
return <TourProvider value={rootProps.tour}>
|
|
174
|
+
<RenderStrategyProvider value={renderStrategyProps}>
|
|
175
|
+
<PresenceProvider value={presence}>{rootProps.children}</PresenceProvider>
|
|
176
|
+
</RenderStrategyProvider>
|
|
177
|
+
</TourProvider>;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// src/components/tour/tour-spotlight.tsx
|
|
181
|
+
import { mergeProps as mergeProps12 } from "@zag-js/solid";
|
|
182
|
+
import { Show as Show5 } from "solid-js";
|
|
183
|
+
var TourSpotlight = (props) => {
|
|
184
|
+
const tour2 = useTourContext();
|
|
185
|
+
const renderStrategyProps = useRenderStrategyContext();
|
|
186
|
+
const presenceApi = usePresence(mergeProps12(renderStrategyProps, () => ({ present: tour2().open })));
|
|
187
|
+
const mergedProps = mergeProps12(
|
|
188
|
+
() => tour2().getSpotlightProps(),
|
|
189
|
+
() => presenceApi().presenceProps,
|
|
190
|
+
props
|
|
191
|
+
);
|
|
192
|
+
return <Show5 when={!presenceApi().unmounted}>
|
|
193
|
+
<ark.div {...mergedProps} hidden={!tour2().open || !tour2().step?.target?.()} />
|
|
194
|
+
</Show5>;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
// src/components/tour/tour-title.tsx
|
|
198
|
+
import { mergeProps as mergeProps13 } from "@zag-js/solid";
|
|
199
|
+
var TourTitle = (props) => {
|
|
200
|
+
const tour2 = useTourContext();
|
|
201
|
+
const mergedProps = mergeProps13(() => tour2().getTitleProps(), props);
|
|
202
|
+
return <ark.h2 {...mergedProps}>{mergedProps.children || tour2().step?.title}</ark.h2>;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// src/components/tour/use-tour.ts
|
|
206
|
+
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
207
|
+
import * as tour from "@zag-js/tour";
|
|
208
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
209
|
+
var useTour = (props = {}) => {
|
|
210
|
+
const id = createUniqueId();
|
|
211
|
+
const locale = useLocaleContext();
|
|
212
|
+
const environment = useEnvironmentContext();
|
|
213
|
+
const context = createMemo(() => ({
|
|
214
|
+
id,
|
|
215
|
+
dir: locale().dir,
|
|
216
|
+
getRootNode: environment().getRootNode,
|
|
217
|
+
...props
|
|
218
|
+
}));
|
|
219
|
+
const [state, send] = useMachine(tour.machine(context()), {
|
|
220
|
+
context
|
|
221
|
+
});
|
|
222
|
+
return createMemo(() => tour.connect(state, send, normalizeProps));
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
// src/components/tour/tour.ts
|
|
226
|
+
var tour_exports = {};
|
|
227
|
+
__export(tour_exports, {
|
|
228
|
+
ActionTrigger: () => TourActionTrigger,
|
|
229
|
+
Actions: () => TourActions,
|
|
230
|
+
Arrow: () => TourArrow,
|
|
231
|
+
ArrowTip: () => TourArrowTip,
|
|
232
|
+
Backdrop: () => TourBackdrop,
|
|
233
|
+
CloseTrigger: () => TourCloseTrigger,
|
|
234
|
+
Content: () => TourContent,
|
|
235
|
+
Context: () => TourContext,
|
|
236
|
+
Control: () => TourControl,
|
|
237
|
+
Description: () => TourDescription,
|
|
238
|
+
Positioner: () => TourPositioner,
|
|
239
|
+
ProgressText: () => TourProgressText,
|
|
240
|
+
Root: () => TourRoot,
|
|
241
|
+
Spotlight: () => TourSpotlight,
|
|
242
|
+
Title: () => TourTitle
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
export {
|
|
246
|
+
useTourContext,
|
|
247
|
+
TourActionTrigger,
|
|
248
|
+
TourActions,
|
|
249
|
+
TourArrow,
|
|
250
|
+
TourArrowTip,
|
|
251
|
+
TourBackdrop,
|
|
252
|
+
TourCloseTrigger,
|
|
253
|
+
TourContent,
|
|
254
|
+
TourContext,
|
|
255
|
+
tourAnatomy,
|
|
256
|
+
TourControl,
|
|
257
|
+
TourDescription,
|
|
258
|
+
TourPositioner,
|
|
259
|
+
TourProgressText,
|
|
260
|
+
TourRoot,
|
|
261
|
+
TourSpotlight,
|
|
262
|
+
TourTitle,
|
|
263
|
+
useTour,
|
|
264
|
+
tour_exports
|
|
265
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./TY6NCPFG.jsx";
|
|
4
1
|
import {
|
|
5
2
|
PresenceProvider,
|
|
6
3
|
splitPresenceProps,
|
|
7
4
|
usePresence,
|
|
8
5
|
usePresenceContext
|
|
9
6
|
} from "./E72NMPSK.jsx";
|
|
7
|
+
import {
|
|
8
|
+
useFieldContext
|
|
9
|
+
} from "./MSHQY44G.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { composeRefs } from './XN6EERRM.js';
|
|
2
|
+
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
3
|
+
import { ark } from './EPLBB4QN.js';
|
|
4
|
+
import { createComponent, mergeProps } from 'solid-js/web';
|
|
5
|
+
import { trapFocus } from '@zag-js/focus-trap';
|
|
6
|
+
import { createEffect, onCleanup } from 'solid-js';
|
|
7
|
+
|
|
8
|
+
var FocusTrap = (props) => {
|
|
9
|
+
let localNode;
|
|
10
|
+
const [trapProps, localProps] = createSplitProps()(props, ["disabled", "onActivate", "onDeactivate", "initialFocus", "fallbackFocus", "returnFocusOnDeactivate", "setReturnFocus"]);
|
|
11
|
+
createEffect(() => {
|
|
12
|
+
if (!localNode || trapProps.disabled) return;
|
|
13
|
+
const autoFocusNode = localNode.querySelector("[autofocus], [data-autofocus]");
|
|
14
|
+
trapProps.initialFocus ||= autoFocusNode ?? void 0;
|
|
15
|
+
onCleanup(trapFocus(localNode, trapProps));
|
|
16
|
+
});
|
|
17
|
+
return createComponent(ark.div, mergeProps(localProps, {
|
|
18
|
+
ref(r$) {
|
|
19
|
+
var _ref$ = composeRefs((el) => localNode = el, props.ref);
|
|
20
|
+
typeof _ref$ === "function" && _ref$(r$);
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { FocusTrap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './632HFNZF.js';
|
|
2
2
|
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './LCESUDZB.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
@@ -59,8 +59,19 @@ var FieldLabel = (props) => {
|
|
|
59
59
|
return <ark.label {...mergedProps} />;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
// src/components/field/field-required-indicator.tsx
|
|
63
|
+
import { mergeProps as mergeProps5 } from "@zag-js/solid";
|
|
64
|
+
import { Show as Show2 } from "solid-js";
|
|
65
|
+
var FieldRequiredIndicator = (props) => {
|
|
66
|
+
const field = useFieldContext();
|
|
67
|
+
const mergedProps = mergeProps5(() => field().getRequiredIndicatorProps(), props);
|
|
68
|
+
return <Show2 when={field().required} fallback={props.fallback}>
|
|
69
|
+
<ark.span {...mergedProps}>{props.children ?? "*"}</ark.span>
|
|
70
|
+
</Show2>;
|
|
71
|
+
};
|
|
72
|
+
|
|
62
73
|
// src/components/field/field-root.tsx
|
|
63
|
-
import { mergeProps as
|
|
74
|
+
import { mergeProps as mergeProps7 } from "@zag-js/solid";
|
|
64
75
|
|
|
65
76
|
// src/components/field/use-field.ts
|
|
66
77
|
import { ariaAttr, dataAttr, getWindow } from "@zag-js/dom-query";
|
|
@@ -69,7 +80,7 @@ import {
|
|
|
69
80
|
createMemo,
|
|
70
81
|
createSignal,
|
|
71
82
|
createUniqueId,
|
|
72
|
-
mergeProps as
|
|
83
|
+
mergeProps as mergeProps6,
|
|
73
84
|
onCleanup
|
|
74
85
|
} from "solid-js";
|
|
75
86
|
|
|
@@ -90,7 +101,7 @@ var parts = fieldAnatomy.build();
|
|
|
90
101
|
// src/components/field/use-field.ts
|
|
91
102
|
var useField = (props) => {
|
|
92
103
|
const fieldset = useFieldsetContext();
|
|
93
|
-
const fieldProps =
|
|
104
|
+
const fieldProps = mergeProps6(
|
|
94
105
|
{ disabled: Boolean(fieldset?.().disabled), required: false, invalid: false, readOnly: false },
|
|
95
106
|
props
|
|
96
107
|
);
|
|
@@ -208,39 +219,39 @@ var FieldRoot = (props) => {
|
|
|
208
219
|
"required"
|
|
209
220
|
]);
|
|
210
221
|
const field = useField(useFieldProps);
|
|
211
|
-
const mergedProps =
|
|
222
|
+
const mergedProps = mergeProps7(() => field().getRootProps(), localProps);
|
|
212
223
|
return <FieldProvider value={field}>
|
|
213
224
|
<ark.div {...mergedProps} />
|
|
214
225
|
</FieldProvider>;
|
|
215
226
|
};
|
|
216
227
|
|
|
217
228
|
// src/components/field/field-root-provider.tsx
|
|
218
|
-
import { mergeProps as
|
|
229
|
+
import { mergeProps as mergeProps8 } from "@zag-js/solid";
|
|
219
230
|
var FieldRootProvider = (props) => {
|
|
220
231
|
const [{ value: field }, localProps] = createSplitProps()(props, ["value"]);
|
|
221
|
-
const mergedProps =
|
|
232
|
+
const mergedProps = mergeProps8(() => field().getRootProps(), localProps);
|
|
222
233
|
return <FieldProvider value={field}>
|
|
223
234
|
<ark.div {...mergedProps} />
|
|
224
235
|
</FieldProvider>;
|
|
225
236
|
};
|
|
226
237
|
|
|
227
238
|
// src/components/field/field-select.tsx
|
|
228
|
-
import { mergeProps as
|
|
239
|
+
import { mergeProps as mergeProps9 } from "@zag-js/solid";
|
|
229
240
|
var FieldSelect = (props) => {
|
|
230
241
|
const field = useFieldContext();
|
|
231
|
-
const mergedProps =
|
|
242
|
+
const mergedProps = mergeProps9(() => field?.().getSelectProps(), props);
|
|
232
243
|
return <ark.select {...mergedProps} />;
|
|
233
244
|
};
|
|
234
245
|
|
|
235
246
|
// src/components/field/field-textarea.tsx
|
|
236
247
|
import { autoresizeTextarea } from "@zag-js/auto-resize";
|
|
237
|
-
import { mergeProps as
|
|
248
|
+
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
238
249
|
import { createEffect as createEffect2 } from "solid-js";
|
|
239
250
|
var FieldTextarea = (props) => {
|
|
240
251
|
const field = useFieldContext();
|
|
241
252
|
let textareaRef;
|
|
242
253
|
const { autoresize, ...textareaProps } = props;
|
|
243
|
-
const mergedProps =
|
|
254
|
+
const mergedProps = mergeProps10(
|
|
244
255
|
() => field?.().getTextareaProps(),
|
|
245
256
|
() => ({ style: { resize: autoresize ? "none" : void 0 } }),
|
|
246
257
|
textareaProps
|
|
@@ -258,17 +269,6 @@ var FieldTextarea = (props) => {
|
|
|
258
269
|
/>;
|
|
259
270
|
};
|
|
260
271
|
|
|
261
|
-
// src/components/field/field-required-indicator.tsx
|
|
262
|
-
import { mergeProps as mergeProps10 } from "@zag-js/solid";
|
|
263
|
-
import { Show as Show2 } from "solid-js";
|
|
264
|
-
var FieldRequiredIndicator = (props) => {
|
|
265
|
-
const field = useFieldContext();
|
|
266
|
-
const mergedProps = mergeProps10(() => field().getRequiredIndicatorProps(), props);
|
|
267
|
-
return <Show2 when={field().required} fallback={props.fallback}>
|
|
268
|
-
<ark.span {...mergedProps}>{props.children ?? "*"}</ark.span>
|
|
269
|
-
</Show2>;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
272
|
// src/components/field/field.ts
|
|
273
273
|
var field_exports = {};
|
|
274
274
|
__export(field_exports, {
|
|
@@ -291,11 +291,11 @@ export {
|
|
|
291
291
|
FieldHelperText,
|
|
292
292
|
FieldInput,
|
|
293
293
|
FieldLabel,
|
|
294
|
+
FieldRequiredIndicator,
|
|
294
295
|
fieldAnatomy,
|
|
295
296
|
FieldRoot,
|
|
296
297
|
FieldRootProvider,
|
|
297
298
|
FieldSelect,
|
|
298
299
|
FieldTextarea,
|
|
299
|
-
FieldRequiredIndicator,
|
|
300
300
|
field_exports
|
|
301
301
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './632HFNZF.js';
|
|
2
2
|
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './LCESUDZB.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./TY6NCPFG.jsx";
|
|
4
1
|
import {
|
|
5
2
|
PresenceProvider,
|
|
6
3
|
splitPresenceProps,
|
|
7
4
|
usePresence,
|
|
8
5
|
usePresenceContext
|
|
9
6
|
} from "./E72NMPSK.jsx";
|
|
7
|
+
import {
|
|
8
|
+
useFieldContext
|
|
9
|
+
} from "./MSHQY44G.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./TY6NCPFG.jsx";
|
|
4
1
|
import {
|
|
5
2
|
PresenceProvider,
|
|
6
3
|
splitPresenceProps,
|
|
7
4
|
usePresence,
|
|
8
5
|
usePresenceContext
|
|
9
6
|
} from "./E72NMPSK.jsx";
|
|
7
|
+
import {
|
|
8
|
+
useFieldContext
|
|
9
|
+
} from "./MSHQY44G.jsx";
|
|
10
10
|
import {
|
|
11
11
|
createSplitProps
|
|
12
12
|
} from "./6WEDGJKQ.jsx";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFieldContext } from './
|
|
1
|
+
import { useFieldContext } from './632HFNZF.js';
|
|
2
2
|
import { usePresenceContext, splitPresenceProps, usePresence, PresenceProvider } from './LCESUDZB.js';
|
|
3
3
|
import { createSplitProps } from './ZMHI4GDJ.js';
|
|
4
4
|
import { ark } from './EPLBB4QN.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/utils/compose-refs.ts
|
|
2
|
+
var isRefFn = (ref) => typeof ref === "function";
|
|
3
|
+
function setRef(ref, value) {
|
|
4
|
+
if (isRefFn(ref)) {
|
|
5
|
+
ref(value);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function composeRefs(...refs) {
|
|
9
|
+
return (node) => {
|
|
10
|
+
for (const ref of refs) {
|
|
11
|
+
setRef(ref, node);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { composeRefs };
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
import "../../chunk/B7LE23PE.jsx";
|
|
17
17
|
import "../../chunk/5ONYCKM3.jsx";
|
|
18
18
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
19
|
-
import "../../chunk/UFYZ7HLU.jsx";
|
|
20
19
|
import "../../chunk/ODQYYKL5.jsx";
|
|
20
|
+
import "../../chunk/UFYZ7HLU.jsx";
|
|
21
21
|
import "../../chunk/5O4RWSWO.jsx";
|
|
22
|
-
import "../../chunk/3QQZKR3F.jsx";
|
|
23
22
|
import "../../chunk/KGOB2IMX.jsx";
|
|
23
|
+
import "../../chunk/3QQZKR3F.jsx";
|
|
24
24
|
import "../../chunk/NMGUCD2L.jsx";
|
|
25
25
|
import "../../chunk/7IUG3E2V.jsx";
|
|
26
26
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { avatar_exports as Avatar, AvatarContext, AvatarFallback, AvatarImage, AvatarRoot, AvatarRootProvider, anatomy as avatarAnatomy, useAvatar, useAvatarContext } from '../../chunk/
|
|
1
|
+
export { avatar_exports as Avatar, AvatarContext, AvatarFallback, AvatarImage, AvatarRoot, AvatarRootProvider, anatomy as avatarAnatomy, useAvatar, useAvatarContext } from '../../chunk/W43X4SNE.js';
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
avatar_exports,
|
|
9
9
|
useAvatar,
|
|
10
10
|
useAvatarContext
|
|
11
|
-
} from "../../chunk/
|
|
11
|
+
} from "../../chunk/NK4T7LIZ.jsx";
|
|
12
12
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
13
|
-
import "../../chunk/UFYZ7HLU.jsx";
|
|
14
13
|
import "../../chunk/ODQYYKL5.jsx";
|
|
14
|
+
import "../../chunk/UFYZ7HLU.jsx";
|
|
15
15
|
import "../../chunk/5O4RWSWO.jsx";
|
|
16
|
-
import "../../chunk/3QQZKR3F.jsx";
|
|
17
16
|
import "../../chunk/KGOB2IMX.jsx";
|
|
17
|
+
import "../../chunk/3QQZKR3F.jsx";
|
|
18
18
|
import "../../chunk/NMGUCD2L.jsx";
|
|
19
19
|
import "../../chunk/7IUG3E2V.jsx";
|
|
20
20
|
export {
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
useCarouselContext
|
|
17
17
|
} from "../../chunk/2HTNQLGP.jsx";
|
|
18
18
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
19
|
-
import "../../chunk/UFYZ7HLU.jsx";
|
|
20
19
|
import "../../chunk/ODQYYKL5.jsx";
|
|
20
|
+
import "../../chunk/UFYZ7HLU.jsx";
|
|
21
21
|
import "../../chunk/5O4RWSWO.jsx";
|
|
22
|
-
import "../../chunk/3QQZKR3F.jsx";
|
|
23
22
|
import "../../chunk/KGOB2IMX.jsx";
|
|
23
|
+
import "../../chunk/3QQZKR3F.jsx";
|
|
24
24
|
import "../../chunk/NMGUCD2L.jsx";
|
|
25
25
|
import "../../chunk/7IUG3E2V.jsx";
|
|
26
26
|
export {
|
|
@@ -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/7KPVYYFT.js';
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
useCheckboxContext,
|
|
14
14
|
useCheckboxGroup,
|
|
15
15
|
useCheckboxGroupContext
|
|
16
|
-
} from "../../chunk/
|
|
16
|
+
} from "../../chunk/RVUYRERH.jsx";
|
|
17
17
|
import "../../chunk/52WUF3CY.jsx";
|
|
18
|
-
import "../../chunk/
|
|
18
|
+
import "../../chunk/MSHQY44G.jsx";
|
|
19
19
|
import "../../chunk/RZBYC7DR.jsx";
|
|
20
20
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
21
|
-
import "../../chunk/UFYZ7HLU.jsx";
|
|
22
21
|
import "../../chunk/ODQYYKL5.jsx";
|
|
22
|
+
import "../../chunk/UFYZ7HLU.jsx";
|
|
23
23
|
import "../../chunk/5O4RWSWO.jsx";
|
|
24
|
-
import "../../chunk/3QQZKR3F.jsx";
|
|
25
24
|
import "../../chunk/KGOB2IMX.jsx";
|
|
25
|
+
import "../../chunk/3QQZKR3F.jsx";
|
|
26
26
|
import "../../chunk/NMGUCD2L.jsx";
|
|
27
27
|
import "../../chunk/7IUG3E2V.jsx";
|
|
28
28
|
export {
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
useClipboardContext
|
|
15
15
|
} from "../../chunk/IQJBNZOX.jsx";
|
|
16
16
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
17
|
-
import "../../chunk/UFYZ7HLU.jsx";
|
|
18
17
|
import "../../chunk/ODQYYKL5.jsx";
|
|
18
|
+
import "../../chunk/UFYZ7HLU.jsx";
|
|
19
19
|
import "../../chunk/5O4RWSWO.jsx";
|
|
20
|
-
import "../../chunk/3QQZKR3F.jsx";
|
|
21
20
|
import "../../chunk/KGOB2IMX.jsx";
|
|
21
|
+
import "../../chunk/3QQZKR3F.jsx";
|
|
22
22
|
import "../../chunk/NMGUCD2L.jsx";
|
|
23
23
|
import "../../chunk/7IUG3E2V.jsx";
|
|
24
24
|
export {
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "../../chunk/B7LE23PE.jsx";
|
|
12
12
|
import "../../chunk/5ONYCKM3.jsx";
|
|
13
13
|
import "../../chunk/6WEDGJKQ.jsx";
|
|
14
|
-
import "../../chunk/UFYZ7HLU.jsx";
|
|
15
14
|
import "../../chunk/ODQYYKL5.jsx";
|
|
15
|
+
import "../../chunk/UFYZ7HLU.jsx";
|
|
16
16
|
import "../../chunk/5O4RWSWO.jsx";
|
|
17
|
-
import "../../chunk/3QQZKR3F.jsx";
|
|
18
17
|
import "../../chunk/KGOB2IMX.jsx";
|
|
18
|
+
import "../../chunk/3QQZKR3F.jsx";
|
|
19
19
|
import "../../chunk/NMGUCD2L.jsx";
|
|
20
20
|
import "../../chunk/7IUG3E2V.jsx";
|
|
21
21
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { color_picker_exports as ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderLabel, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerChannelSliderValueText, ColorPickerContent, ColorPickerContext, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerFormatSelect, ColorPickerFormatTrigger, ColorPickerHiddenInput, ColorPickerLabel, ColorPickerPositioner, ColorPickerRoot, ColorPickerRootProvider, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchIndicator, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueSwatch, ColorPickerValueText, ColorPickerView, colorPickerAnatomy, parse as parseColor, useColorPicker, useColorPickerContext } from '../../chunk/
|
|
1
|
+
export { color_picker_exports as ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderLabel, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerChannelSliderValueText, ColorPickerContent, ColorPickerContext, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerFormatSelect, ColorPickerFormatTrigger, ColorPickerHiddenInput, ColorPickerLabel, ColorPickerPositioner, ColorPickerRoot, ColorPickerRootProvider, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchIndicator, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueSwatch, ColorPickerValueText, ColorPickerView, colorPickerAnatomy, parse as parseColor, useColorPicker, useColorPickerContext } from '../../chunk/XCNALQF7.js';
|