@sprawlify/vue 0.0.66 → 0.0.67
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/{collapsible-BBV8R9Wm.js → collapsible-DQfAISmg.js} +1 -1
- package/dist/{collection-DR2kMzrX.js → collection-Ba0Aeh5P.js} +1 -1
- package/dist/components/accordion/index.d.ts +14 -14
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/angle-slider/index.d.ts +15 -15
- package/dist/components/angle-slider/index.js +1 -1
- package/dist/components/avatar/index.d.ts +8 -8
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/bottom-sheet/index.d.ts +15 -15
- package/dist/components/bottom-sheet/index.js +1 -1
- package/dist/components/carousel/index.d.ts +18 -18
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.d.ts +23 -23
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/client-only/index.d.ts +2 -2
- package/dist/components/clipboard/index.d.ts +14 -14
- package/dist/components/clipboard/index.js +1 -1
- package/dist/components/collapsible/index.d.ts +12 -12
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/collection/index.js +1 -1
- package/dist/components/color-picker/index.d.ts +610 -0
- package/dist/components/color-picker/index.js +1127 -0
- package/dist/components/combobox/index.d.ts +618 -0
- package/dist/components/combobox/index.js +802 -0
- package/dist/components/date-picker/index.d.ts +597 -0
- package/dist/components/date-picker/index.js +1110 -0
- package/dist/components/dialog/index.d.ts +270 -0
- package/dist/components/dialog/index.js +433 -0
- package/dist/components/download-trigger/index.d.ts +29 -0
- package/dist/components/download-trigger/index.js +68 -0
- package/dist/components/editable/index.d.ts +288 -0
- package/dist/components/editable/index.js +459 -0
- package/dist/components/field/index.d.ts +24 -24
- package/dist/components/fieldset/index.d.ts +10 -10
- package/dist/components/highlight/index.d.ts +35 -0
- package/dist/components/highlight/index.js +57 -0
- package/dist/components/menu/index.d.ts +498 -0
- package/dist/components/menu/index.js +885 -0
- package/dist/components/presence/index.d.ts +1 -1
- package/dist/components/select/index.d.ts +30 -29
- package/dist/components/select/index.js +2 -2
- package/dist/index-BBHms9-0.d.ts +91 -0
- package/dist/{index-rHf4D8np.d.ts → index-CDQghZtv.d.ts} +8 -8
- package/dist/index.d.ts +2 -91
- package/package.json +34 -2
- /package/dist/{clean-props-ChPEW0vT.js → clean-props-BDv2zb5M.js} +0 -0
|
@@ -0,0 +1,802 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../chunk-BN_g-Awi.js";
|
|
2
|
+
import { n as useMachine, r as normalizeProps$1, t as mergeProps$1 } from "../../core-DNndr38p.js";
|
|
3
|
+
import { a as useLocaleContext, c as useEnvironmentContext, i as DEFAULT_LOCALE, s as DEFAULT_ENVIRONMENT } from "../../providers-B2CNPFg1.js";
|
|
4
|
+
import { r as createContext, t as useForwardExpose } from "../../use-forward-expose-4p5AGAI3.js";
|
|
5
|
+
import { t as sprawlify } from "../../factory-BH3WrWd2.js";
|
|
6
|
+
import { t as cleanProps } from "../../clean-props-BDv2zb5M.js";
|
|
7
|
+
import { t as RenderStrategyPropsProvider } from "../../use-render-strategy-BkxoN6ll.js";
|
|
8
|
+
import { i as usePresence, n as PresenceProvider, r as usePresenceContext } from "../../presence-CvUnYMZQ.js";
|
|
9
|
+
import { m as useFieldContext } from "../../field-DnHnX3Tf.js";
|
|
10
|
+
import { n as useListCollection, o as createListCollection } from "../../collection-Ba0Aeh5P.js";
|
|
11
|
+
import { computed, createBlock, createCommentVNode, defineComponent, guardReactiveProps, mergeDefaults, mergeProps, normalizeProps, openBlock, renderSlot, toValue, unref, useId, withCtx } from "vue";
|
|
12
|
+
import * as combobox from "@sprawlify/primitives/machines/combobox";
|
|
13
|
+
import { anatomy } from "@sprawlify/primitives/machines/combobox";
|
|
14
|
+
|
|
15
|
+
//#region src/components/combobox/use-combobox-context.ts
|
|
16
|
+
const [ComboboxProvider, useComboboxContext] = createContext("ComboboxContext");
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/combobox/combobox-clear-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
+
var combobox_clear_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "combobox-clear-trigger",
|
|
22
|
+
props: { asChild: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
required: false
|
|
25
|
+
} },
|
|
26
|
+
setup(__props) {
|
|
27
|
+
const combobox = useComboboxContext();
|
|
28
|
+
useForwardExpose();
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(combobox).getClearTriggerProps(), { "as-child": __props.asChild }), {
|
|
31
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
32
|
+
_: 3
|
|
33
|
+
}, 16, ["as-child"]);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/combobox/combobox-clear-trigger.vue
|
|
40
|
+
var combobox_clear_trigger_default = combobox_clear_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/combobox/combobox-content.vue?vue&type=script&setup=true&lang.ts
|
|
44
|
+
var combobox_content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
45
|
+
__name: "combobox-content",
|
|
46
|
+
props: { asChild: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: false
|
|
49
|
+
} },
|
|
50
|
+
setup(__props) {
|
|
51
|
+
const combobox = useComboboxContext();
|
|
52
|
+
const presence = usePresenceContext();
|
|
53
|
+
const mergedProps = computed(() => mergeProps$1(combobox.value.getContentProps(), presence.value.presenceProps));
|
|
54
|
+
useForwardExpose();
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return !unref(presence).unmounted ? (openBlock(), createBlock(unref(sprawlify).div, mergeProps({ key: 0 }, mergedProps.value, { "as-child": __props.asChild }), {
|
|
57
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16, ["as-child"])) : createCommentVNode("v-if", true);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/components/combobox/combobox-content.vue
|
|
66
|
+
var combobox_content_default = combobox_content_vue_vue_type_script_setup_true_lang_default;
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/combobox/combobox-anatomy.ts
|
|
70
|
+
const comboboxAnatomy = anatomy.extendWith("empty");
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/combobox/combobox-empty.vue?vue&type=script&setup=true&lang.ts
|
|
74
|
+
var combobox_empty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
75
|
+
__name: "combobox-empty",
|
|
76
|
+
props: { asChild: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
required: false
|
|
79
|
+
} },
|
|
80
|
+
setup(__props) {
|
|
81
|
+
const parts = comboboxAnatomy.build();
|
|
82
|
+
const combobox = useComboboxContext();
|
|
83
|
+
const isEmpty = computed(() => combobox.value.collection.size === 0);
|
|
84
|
+
useForwardExpose();
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return isEmpty.value ? (openBlock(), createBlock(unref(sprawlify).div, mergeProps({ key: 0 }, unref(parts).empty.attrs, {
|
|
87
|
+
role: "presentation",
|
|
88
|
+
"as-child": __props.asChild
|
|
89
|
+
}), {
|
|
90
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
91
|
+
_: 3
|
|
92
|
+
}, 16, ["as-child"])) : createCommentVNode("v-if", true);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/components/combobox/combobox-empty.vue
|
|
99
|
+
var combobox_empty_default = combobox_empty_vue_vue_type_script_setup_true_lang_default;
|
|
100
|
+
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/components/combobox/combobox-context.vue?vue&type=script&setup=true&lang.ts
|
|
103
|
+
var combobox_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
104
|
+
__name: "combobox-context",
|
|
105
|
+
setup(__props) {
|
|
106
|
+
const combobox = useComboboxContext();
|
|
107
|
+
return (_ctx, _cache) => {
|
|
108
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(combobox))));
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/combobox/combobox-context.vue
|
|
115
|
+
var combobox_context_default = combobox_context_vue_vue_type_script_setup_true_lang_default;
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/components/combobox/combobox-control.vue?vue&type=script&setup=true&lang.ts
|
|
119
|
+
var combobox_control_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
120
|
+
__name: "combobox-control",
|
|
121
|
+
props: { asChild: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
required: false
|
|
124
|
+
} },
|
|
125
|
+
setup(__props) {
|
|
126
|
+
const combobox = useComboboxContext();
|
|
127
|
+
useForwardExpose();
|
|
128
|
+
return (_ctx, _cache) => {
|
|
129
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getControlProps(), { "as-child": __props.asChild }), {
|
|
130
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
131
|
+
_: 3
|
|
132
|
+
}, 16, ["as-child"]);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/components/combobox/combobox-control.vue
|
|
139
|
+
var combobox_control_default = combobox_control_vue_vue_type_script_setup_true_lang_default;
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/combobox/combobox-input.vue?vue&type=script&setup=true&lang.ts
|
|
143
|
+
var combobox_input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
144
|
+
__name: "combobox-input",
|
|
145
|
+
props: { asChild: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
required: false
|
|
148
|
+
} },
|
|
149
|
+
setup(__props) {
|
|
150
|
+
const combobox = useComboboxContext();
|
|
151
|
+
const field = useFieldContext();
|
|
152
|
+
useForwardExpose();
|
|
153
|
+
return (_ctx, _cache) => {
|
|
154
|
+
return openBlock(), createBlock(unref(sprawlify).input, mergeProps({ "aria-describedby": unref(field)?.ariaDescribedby }, unref(combobox).getInputProps(), { "as-child": __props.asChild }), {
|
|
155
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
156
|
+
_: 3
|
|
157
|
+
}, 16, ["aria-describedby", "as-child"]);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/components/combobox/combobox-input.vue
|
|
164
|
+
var combobox_input_default = combobox_input_vue_vue_type_script_setup_true_lang_default;
|
|
165
|
+
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/components/combobox/use-combobox-item-context.ts
|
|
168
|
+
const [ComboboxItemProvider, useComboboxItemContext] = createContext("ComboboxItemContext");
|
|
169
|
+
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/components/combobox/combobox-item-context.vue?vue&type=script&setup=true&lang.ts
|
|
172
|
+
var combobox_item_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
173
|
+
__name: "combobox-item-context",
|
|
174
|
+
setup(__props) {
|
|
175
|
+
const combobox = useComboboxItemContext();
|
|
176
|
+
return (_ctx, _cache) => {
|
|
177
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(combobox))));
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/components/combobox/combobox-item-context.vue
|
|
184
|
+
var combobox_item_context_default = combobox_item_context_vue_vue_type_script_setup_true_lang_default;
|
|
185
|
+
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/components/combobox/use-combobox-item-group-props-context.ts
|
|
188
|
+
const [ComboboxItemGroupPropsProvider, useComboboxItemGroupPropsContext] = createContext("ComboboxItemGroupPropsContext");
|
|
189
|
+
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/components/combobox/combobox-item-group-label.vue?vue&type=script&setup=true&lang.ts
|
|
192
|
+
var combobox_item_group_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
193
|
+
__name: "combobox-item-group-label",
|
|
194
|
+
props: { asChild: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
required: false
|
|
197
|
+
} },
|
|
198
|
+
setup(__props) {
|
|
199
|
+
const combobox = useComboboxContext();
|
|
200
|
+
const itemGroupProps = useComboboxItemGroupPropsContext();
|
|
201
|
+
useForwardExpose();
|
|
202
|
+
return (_ctx, _cache) => {
|
|
203
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getItemGroupLabelProps({ htmlFor: unref(itemGroupProps).id }), { "as-child": __props.asChild }), {
|
|
204
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
205
|
+
_: 3
|
|
206
|
+
}, 16, ["as-child"]);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/components/combobox/combobox-item-group-label.vue
|
|
213
|
+
var combobox_item_group_label_default = combobox_item_group_label_vue_vue_type_script_setup_true_lang_default;
|
|
214
|
+
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/components/combobox/combobox-item-group.vue?vue&type=script&setup=true&lang.ts
|
|
217
|
+
var combobox_item_group_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
218
|
+
__name: "combobox-item-group",
|
|
219
|
+
props: {
|
|
220
|
+
id: {
|
|
221
|
+
type: String,
|
|
222
|
+
required: false
|
|
223
|
+
},
|
|
224
|
+
asChild: {
|
|
225
|
+
type: Boolean,
|
|
226
|
+
required: false
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
setup(__props) {
|
|
230
|
+
const props = __props;
|
|
231
|
+
const combobox = useComboboxContext();
|
|
232
|
+
const uid = useId();
|
|
233
|
+
const id = props.id ?? uid;
|
|
234
|
+
ComboboxItemGroupPropsProvider({ id });
|
|
235
|
+
useForwardExpose();
|
|
236
|
+
return (_ctx, _cache) => {
|
|
237
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getItemGroupProps({ id: unref(id) }), { "as-child": __props.asChild }), {
|
|
238
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
239
|
+
_: 3
|
|
240
|
+
}, 16, ["as-child"]);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/components/combobox/combobox-item-group.vue
|
|
247
|
+
var combobox_item_group_default = combobox_item_group_vue_vue_type_script_setup_true_lang_default;
|
|
248
|
+
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region src/components/combobox/use-combobox-item-props-context.ts
|
|
251
|
+
const [ComboboxItemPropsProvider, useComboboxItemPropsContext] = createContext("ComboboxItemPropsContext");
|
|
252
|
+
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/components/combobox/combobox-item-indicator.vue?vue&type=script&setup=true&lang.ts
|
|
255
|
+
var combobox_item_indicator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
256
|
+
__name: "combobox-item-indicator",
|
|
257
|
+
props: { asChild: {
|
|
258
|
+
type: Boolean,
|
|
259
|
+
required: false
|
|
260
|
+
} },
|
|
261
|
+
setup(__props) {
|
|
262
|
+
const combobox = useComboboxContext();
|
|
263
|
+
const itemProps = useComboboxItemPropsContext();
|
|
264
|
+
useForwardExpose();
|
|
265
|
+
return (_ctx, _cache) => {
|
|
266
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getItemIndicatorProps(unref(itemProps)), { "as-child": __props.asChild }), {
|
|
267
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
268
|
+
_: 3
|
|
269
|
+
}, 16, ["as-child"]);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region src/components/combobox/combobox-item-indicator.vue
|
|
276
|
+
var combobox_item_indicator_default = combobox_item_indicator_vue_vue_type_script_setup_true_lang_default;
|
|
277
|
+
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/components/combobox/combobox-item-text.vue?vue&type=script&setup=true&lang.ts
|
|
280
|
+
var combobox_item_text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
281
|
+
__name: "combobox-item-text",
|
|
282
|
+
props: { asChild: {
|
|
283
|
+
type: Boolean,
|
|
284
|
+
required: false
|
|
285
|
+
} },
|
|
286
|
+
setup(__props) {
|
|
287
|
+
const combobox = useComboboxContext();
|
|
288
|
+
const itemProps = useComboboxItemPropsContext();
|
|
289
|
+
useForwardExpose();
|
|
290
|
+
return (_ctx, _cache) => {
|
|
291
|
+
return openBlock(), createBlock(unref(sprawlify).span, mergeProps(unref(combobox).getItemTextProps(unref(itemProps)), { "as-child": __props.asChild }), {
|
|
292
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
293
|
+
_: 3
|
|
294
|
+
}, 16, ["as-child"]);
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/components/combobox/combobox-item-text.vue
|
|
301
|
+
var combobox_item_text_default = combobox_item_text_vue_vue_type_script_setup_true_lang_default;
|
|
302
|
+
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/components/combobox/combobox-item.vue?vue&type=script&setup=true&lang.ts
|
|
305
|
+
var combobox_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
306
|
+
__name: "combobox-item",
|
|
307
|
+
props: {
|
|
308
|
+
persistFocus: {
|
|
309
|
+
type: Boolean,
|
|
310
|
+
required: false,
|
|
311
|
+
skipCheck: true
|
|
312
|
+
},
|
|
313
|
+
item: {
|
|
314
|
+
type: null,
|
|
315
|
+
required: true
|
|
316
|
+
},
|
|
317
|
+
asChild: {
|
|
318
|
+
type: Boolean,
|
|
319
|
+
required: false
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
setup(__props) {
|
|
323
|
+
const props = __props;
|
|
324
|
+
const combobox = useComboboxContext();
|
|
325
|
+
ComboboxItemPropsProvider(props);
|
|
326
|
+
ComboboxItemProvider(computed(() => combobox.value.getItemState(props)));
|
|
327
|
+
useForwardExpose();
|
|
328
|
+
return (_ctx, _cache) => {
|
|
329
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getItemProps(props), { "as-child": __props.asChild }), {
|
|
330
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
331
|
+
_: 3
|
|
332
|
+
}, 16, ["as-child"]);
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/components/combobox/combobox-item.vue
|
|
339
|
+
var combobox_item_default = combobox_item_vue_vue_type_script_setup_true_lang_default;
|
|
340
|
+
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/components/combobox/combobox-label.vue?vue&type=script&setup=true&lang.ts
|
|
343
|
+
var combobox_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
344
|
+
__name: "combobox-label",
|
|
345
|
+
props: { asChild: {
|
|
346
|
+
type: Boolean,
|
|
347
|
+
required: false
|
|
348
|
+
} },
|
|
349
|
+
setup(__props) {
|
|
350
|
+
const combobox = useComboboxContext();
|
|
351
|
+
useForwardExpose();
|
|
352
|
+
return (_ctx, _cache) => {
|
|
353
|
+
return openBlock(), createBlock(unref(sprawlify).label, mergeProps(unref(combobox).getLabelProps(), { "as-child": __props.asChild }), {
|
|
354
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
355
|
+
_: 3
|
|
356
|
+
}, 16, ["as-child"]);
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region src/components/combobox/combobox-label.vue
|
|
363
|
+
var combobox_label_default = combobox_label_vue_vue_type_script_setup_true_lang_default;
|
|
364
|
+
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/components/combobox/combobox-list.vue?vue&type=script&setup=true&lang.ts
|
|
367
|
+
var combobox_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
368
|
+
__name: "combobox-list",
|
|
369
|
+
props: { asChild: {
|
|
370
|
+
type: Boolean,
|
|
371
|
+
required: false
|
|
372
|
+
} },
|
|
373
|
+
setup(__props) {
|
|
374
|
+
const combobox = useComboboxContext();
|
|
375
|
+
useForwardExpose();
|
|
376
|
+
return (_ctx, _cache) => {
|
|
377
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getListProps(), { "as-child": __props.asChild }), {
|
|
378
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
379
|
+
_: 3
|
|
380
|
+
}, 16, ["as-child"]);
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region src/components/combobox/combobox-list.vue
|
|
387
|
+
var combobox_list_default = combobox_list_vue_vue_type_script_setup_true_lang_default;
|
|
388
|
+
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/components/combobox/combobox-positioner.vue?vue&type=script&setup=true&lang.ts
|
|
391
|
+
var combobox_positioner_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
392
|
+
__name: "combobox-positioner",
|
|
393
|
+
props: { asChild: {
|
|
394
|
+
type: Boolean,
|
|
395
|
+
required: false
|
|
396
|
+
} },
|
|
397
|
+
setup(__props) {
|
|
398
|
+
const combobox = useComboboxContext();
|
|
399
|
+
const presence = usePresenceContext();
|
|
400
|
+
useForwardExpose();
|
|
401
|
+
return (_ctx, _cache) => {
|
|
402
|
+
return !unref(presence).unmounted ? (openBlock(), createBlock(unref(sprawlify).div, mergeProps({ key: 0 }, unref(combobox).getPositionerProps(), { "as-child": __props.asChild }), {
|
|
403
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
404
|
+
_: 3
|
|
405
|
+
}, 16, ["as-child"])) : createCommentVNode("v-if", true);
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/components/combobox/combobox-positioner.vue
|
|
412
|
+
var combobox_positioner_default = combobox_positioner_vue_vue_type_script_setup_true_lang_default;
|
|
413
|
+
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/components/combobox/combobox-root-provider.vue?vue&type=script&setup=true&lang.ts
|
|
416
|
+
var combobox_root_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
417
|
+
__name: "combobox-root-provider",
|
|
418
|
+
props: {
|
|
419
|
+
value: {
|
|
420
|
+
type: null,
|
|
421
|
+
required: true
|
|
422
|
+
},
|
|
423
|
+
lazyMount: {
|
|
424
|
+
type: Boolean,
|
|
425
|
+
required: false
|
|
426
|
+
},
|
|
427
|
+
unmountOnExit: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
required: false
|
|
430
|
+
},
|
|
431
|
+
asChild: {
|
|
432
|
+
type: Boolean,
|
|
433
|
+
required: false
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
emits: ["exitComplete"],
|
|
437
|
+
setup(__props, { emit: __emit }) {
|
|
438
|
+
const props = __props;
|
|
439
|
+
const emits = __emit;
|
|
440
|
+
const combobox = computed(() => props.value);
|
|
441
|
+
const presence = usePresence(computed(() => ({
|
|
442
|
+
present: combobox.value.open,
|
|
443
|
+
lazyMount: props.lazyMount,
|
|
444
|
+
unmountOnExit: props.unmountOnExit
|
|
445
|
+
})), emits);
|
|
446
|
+
ComboboxProvider(combobox);
|
|
447
|
+
PresenceProvider(presence);
|
|
448
|
+
RenderStrategyPropsProvider(computed(() => ({
|
|
449
|
+
lazyMount: props.lazyMount,
|
|
450
|
+
unmountOnExit: props.unmountOnExit
|
|
451
|
+
})));
|
|
452
|
+
useForwardExpose();
|
|
453
|
+
return (_ctx, _cache) => {
|
|
454
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(combobox.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
455
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
456
|
+
_: 3
|
|
457
|
+
}, 16, ["as-child"]);
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region src/components/combobox/combobox-root-provider.vue
|
|
464
|
+
var combobox_root_provider_default = combobox_root_provider_vue_vue_type_script_setup_true_lang_default;
|
|
465
|
+
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region src/components/combobox/use-combobox.ts
|
|
468
|
+
const useCombobox = (props, emit) => {
|
|
469
|
+
const id = useId();
|
|
470
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
471
|
+
const locale = useLocaleContext(DEFAULT_LOCALE);
|
|
472
|
+
const field = useFieldContext();
|
|
473
|
+
const context = computed(() => {
|
|
474
|
+
const localeProps = toValue(props);
|
|
475
|
+
return {
|
|
476
|
+
id,
|
|
477
|
+
ids: {
|
|
478
|
+
label: field?.value.ids.label,
|
|
479
|
+
input: field?.value.ids.control
|
|
480
|
+
},
|
|
481
|
+
disabled: field?.value.disabled,
|
|
482
|
+
readOnly: field?.value.readOnly,
|
|
483
|
+
required: field?.value.required,
|
|
484
|
+
invalid: field?.value.invalid,
|
|
485
|
+
dir: locale.value.dir,
|
|
486
|
+
value: localeProps.modelValue,
|
|
487
|
+
getRootNode: env?.value.getRootNode,
|
|
488
|
+
...cleanProps(localeProps),
|
|
489
|
+
onFocusOutside: (details) => {
|
|
490
|
+
emit?.("focusOutside", details);
|
|
491
|
+
localeProps.onFocusOutside?.(details);
|
|
492
|
+
},
|
|
493
|
+
onHighlightChange: (details) => {
|
|
494
|
+
emit?.("highlightChange", details);
|
|
495
|
+
emit?.("update:highlightedValue", details.highlightedValue);
|
|
496
|
+
localeProps.onHighlightChange?.(details);
|
|
497
|
+
},
|
|
498
|
+
onInputValueChange: (details) => {
|
|
499
|
+
emit?.("inputValueChange", details);
|
|
500
|
+
emit?.("update:inputValue", details.inputValue);
|
|
501
|
+
localeProps.onInputValueChange?.(details);
|
|
502
|
+
},
|
|
503
|
+
onInteractOutside: (details) => {
|
|
504
|
+
emit?.("interactOutside", details);
|
|
505
|
+
localeProps.onInteractOutside?.(details);
|
|
506
|
+
},
|
|
507
|
+
onPointerDownOutside: (details) => {
|
|
508
|
+
emit?.("pointerDownOutside", details);
|
|
509
|
+
localeProps.onPointerDownOutside?.(details);
|
|
510
|
+
},
|
|
511
|
+
onOpenChange: (details) => {
|
|
512
|
+
emit?.("openChange", details);
|
|
513
|
+
emit?.("update:open", details.open);
|
|
514
|
+
localeProps.onOpenChange?.(details);
|
|
515
|
+
},
|
|
516
|
+
onValueChange: (details) => {
|
|
517
|
+
emit?.("valueChange", details);
|
|
518
|
+
emit?.("update:modelValue", details.value);
|
|
519
|
+
localeProps.onValueChange?.(details);
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
});
|
|
523
|
+
const service = useMachine(combobox.machine, context);
|
|
524
|
+
return computed(() => combobox.connect(service, normalizeProps$1));
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/components/combobox/combobox-root.vue?vue&type=script&setup=true&lang.ts
|
|
529
|
+
var combobox_root_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
530
|
+
__name: "combobox-root",
|
|
531
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
532
|
+
allowCustomValue: {
|
|
533
|
+
type: Boolean,
|
|
534
|
+
required: false
|
|
535
|
+
},
|
|
536
|
+
alwaysSubmitOnEnter: {
|
|
537
|
+
type: Boolean,
|
|
538
|
+
required: false
|
|
539
|
+
},
|
|
540
|
+
autoFocus: {
|
|
541
|
+
type: Boolean,
|
|
542
|
+
required: false
|
|
543
|
+
},
|
|
544
|
+
closeOnSelect: {
|
|
545
|
+
type: Boolean,
|
|
546
|
+
required: false
|
|
547
|
+
},
|
|
548
|
+
collection: {
|
|
549
|
+
type: null,
|
|
550
|
+
required: false
|
|
551
|
+
},
|
|
552
|
+
composite: {
|
|
553
|
+
type: Boolean,
|
|
554
|
+
required: false
|
|
555
|
+
},
|
|
556
|
+
defaultHighlightedValue: {
|
|
557
|
+
type: String,
|
|
558
|
+
required: false
|
|
559
|
+
},
|
|
560
|
+
defaultInputValue: {
|
|
561
|
+
type: String,
|
|
562
|
+
required: false
|
|
563
|
+
},
|
|
564
|
+
defaultOpen: {
|
|
565
|
+
type: Boolean,
|
|
566
|
+
required: false
|
|
567
|
+
},
|
|
568
|
+
defaultValue: {
|
|
569
|
+
type: Array,
|
|
570
|
+
required: false
|
|
571
|
+
},
|
|
572
|
+
disableLayer: {
|
|
573
|
+
type: Boolean,
|
|
574
|
+
required: false
|
|
575
|
+
},
|
|
576
|
+
disabled: {
|
|
577
|
+
type: Boolean,
|
|
578
|
+
required: false
|
|
579
|
+
},
|
|
580
|
+
form: {
|
|
581
|
+
type: String,
|
|
582
|
+
required: false
|
|
583
|
+
},
|
|
584
|
+
highlightedValue: {
|
|
585
|
+
type: String,
|
|
586
|
+
required: false
|
|
587
|
+
},
|
|
588
|
+
id: {
|
|
589
|
+
type: String,
|
|
590
|
+
required: false
|
|
591
|
+
},
|
|
592
|
+
ids: {
|
|
593
|
+
type: Object,
|
|
594
|
+
required: false
|
|
595
|
+
},
|
|
596
|
+
inputBehavior: {
|
|
597
|
+
type: String,
|
|
598
|
+
required: false
|
|
599
|
+
},
|
|
600
|
+
inputValue: {
|
|
601
|
+
type: String,
|
|
602
|
+
required: false
|
|
603
|
+
},
|
|
604
|
+
invalid: {
|
|
605
|
+
type: Boolean,
|
|
606
|
+
required: false
|
|
607
|
+
},
|
|
608
|
+
loopFocus: {
|
|
609
|
+
type: Boolean,
|
|
610
|
+
required: false
|
|
611
|
+
},
|
|
612
|
+
modelValue: {
|
|
613
|
+
type: Array,
|
|
614
|
+
required: false
|
|
615
|
+
},
|
|
616
|
+
multiple: {
|
|
617
|
+
type: Boolean,
|
|
618
|
+
required: false
|
|
619
|
+
},
|
|
620
|
+
name: {
|
|
621
|
+
type: String,
|
|
622
|
+
required: false
|
|
623
|
+
},
|
|
624
|
+
navigate: {
|
|
625
|
+
type: Function,
|
|
626
|
+
required: false
|
|
627
|
+
},
|
|
628
|
+
open: {
|
|
629
|
+
type: Boolean,
|
|
630
|
+
required: false
|
|
631
|
+
},
|
|
632
|
+
openOnChange: {
|
|
633
|
+
type: [Boolean, Function],
|
|
634
|
+
required: false
|
|
635
|
+
},
|
|
636
|
+
openOnClick: {
|
|
637
|
+
type: Boolean,
|
|
638
|
+
required: false
|
|
639
|
+
},
|
|
640
|
+
openOnKeyPress: {
|
|
641
|
+
type: Boolean,
|
|
642
|
+
required: false
|
|
643
|
+
},
|
|
644
|
+
placeholder: {
|
|
645
|
+
type: String,
|
|
646
|
+
required: false
|
|
647
|
+
},
|
|
648
|
+
positioning: {
|
|
649
|
+
type: null,
|
|
650
|
+
required: false
|
|
651
|
+
},
|
|
652
|
+
readOnly: {
|
|
653
|
+
type: Boolean,
|
|
654
|
+
required: false
|
|
655
|
+
},
|
|
656
|
+
required: {
|
|
657
|
+
type: Boolean,
|
|
658
|
+
required: false
|
|
659
|
+
},
|
|
660
|
+
scrollToIndexFn: {
|
|
661
|
+
type: Function,
|
|
662
|
+
required: false
|
|
663
|
+
},
|
|
664
|
+
selectionBehavior: {
|
|
665
|
+
type: String,
|
|
666
|
+
required: false
|
|
667
|
+
},
|
|
668
|
+
translations: {
|
|
669
|
+
type: null,
|
|
670
|
+
required: false
|
|
671
|
+
},
|
|
672
|
+
lazyMount: {
|
|
673
|
+
type: Boolean,
|
|
674
|
+
required: false
|
|
675
|
+
},
|
|
676
|
+
unmountOnExit: {
|
|
677
|
+
type: Boolean,
|
|
678
|
+
required: false
|
|
679
|
+
},
|
|
680
|
+
asChild: {
|
|
681
|
+
type: Boolean,
|
|
682
|
+
required: false
|
|
683
|
+
}
|
|
684
|
+
}, {
|
|
685
|
+
allowCustomValue: void 0,
|
|
686
|
+
alwaysSubmitOnEnter: void 0,
|
|
687
|
+
autoFocus: void 0,
|
|
688
|
+
closeOnSelect: void 0,
|
|
689
|
+
composite: void 0,
|
|
690
|
+
defaultOpen: void 0,
|
|
691
|
+
disabled: void 0,
|
|
692
|
+
disableLayer: void 0,
|
|
693
|
+
invalid: void 0,
|
|
694
|
+
loopFocus: void 0,
|
|
695
|
+
multiple: void 0,
|
|
696
|
+
open: void 0,
|
|
697
|
+
openOnChange: void 0,
|
|
698
|
+
openOnClick: void 0,
|
|
699
|
+
openOnKeyPress: void 0,
|
|
700
|
+
readOnly: void 0,
|
|
701
|
+
required: void 0
|
|
702
|
+
}),
|
|
703
|
+
emits: [
|
|
704
|
+
"exitComplete",
|
|
705
|
+
"focusOutside",
|
|
706
|
+
"highlightChange",
|
|
707
|
+
"inputValueChange",
|
|
708
|
+
"interactOutside",
|
|
709
|
+
"openChange",
|
|
710
|
+
"pointerDownOutside",
|
|
711
|
+
"valueChange",
|
|
712
|
+
"select",
|
|
713
|
+
"update:modelValue",
|
|
714
|
+
"update:highlightedValue",
|
|
715
|
+
"update:inputValue",
|
|
716
|
+
"update:open"
|
|
717
|
+
],
|
|
718
|
+
setup(__props, { emit: __emit }) {
|
|
719
|
+
const props = __props;
|
|
720
|
+
const emits = __emit;
|
|
721
|
+
const combobox = useCombobox(props, emits);
|
|
722
|
+
const presence = usePresence(computed(() => ({
|
|
723
|
+
present: combobox.value.open,
|
|
724
|
+
lazyMount: props.lazyMount,
|
|
725
|
+
unmountOnExit: props.unmountOnExit
|
|
726
|
+
})), emits);
|
|
727
|
+
ComboboxProvider(combobox);
|
|
728
|
+
PresenceProvider(presence);
|
|
729
|
+
RenderStrategyPropsProvider(computed(() => ({
|
|
730
|
+
lazyMount: props.lazyMount,
|
|
731
|
+
unmountOnExit: props.unmountOnExit
|
|
732
|
+
})));
|
|
733
|
+
useForwardExpose();
|
|
734
|
+
return (_ctx, _cache) => {
|
|
735
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(combobox).getRootProps(), { "as-child": __props.asChild }), {
|
|
736
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
737
|
+
_: 3
|
|
738
|
+
}, 16, ["as-child"]);
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
//#endregion
|
|
744
|
+
//#region src/components/combobox/combobox-root.vue
|
|
745
|
+
var combobox_root_default = combobox_root_vue_vue_type_script_setup_true_lang_default;
|
|
746
|
+
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region src/components/combobox/combobox-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
749
|
+
var combobox_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
750
|
+
__name: "combobox-trigger",
|
|
751
|
+
props: {
|
|
752
|
+
focusable: {
|
|
753
|
+
type: Boolean,
|
|
754
|
+
required: false,
|
|
755
|
+
skipCheck: true
|
|
756
|
+
},
|
|
757
|
+
asChild: {
|
|
758
|
+
type: Boolean,
|
|
759
|
+
required: false
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
setup(__props) {
|
|
763
|
+
const props = __props;
|
|
764
|
+
const combobox = useComboboxContext();
|
|
765
|
+
return (_ctx, _cache) => {
|
|
766
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(combobox).getTriggerProps(props), { "as-child": __props.asChild }), {
|
|
767
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
768
|
+
_: 3
|
|
769
|
+
}, 16, ["as-child"]);
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region src/components/combobox/combobox-trigger.vue
|
|
776
|
+
var combobox_trigger_default = combobox_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
777
|
+
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/components/combobox/combobox.ts
|
|
780
|
+
var combobox_exports = /* @__PURE__ */ __exportAll({
|
|
781
|
+
ClearTrigger: () => combobox_clear_trigger_default,
|
|
782
|
+
Content: () => combobox_content_default,
|
|
783
|
+
Context: () => combobox_context_default,
|
|
784
|
+
Control: () => combobox_control_default,
|
|
785
|
+
Empty: () => combobox_empty_default,
|
|
786
|
+
Input: () => combobox_input_default,
|
|
787
|
+
Item: () => combobox_item_default,
|
|
788
|
+
ItemContext: () => combobox_item_context_default,
|
|
789
|
+
ItemGroup: () => combobox_item_group_default,
|
|
790
|
+
ItemGroupLabel: () => combobox_item_group_label_default,
|
|
791
|
+
ItemIndicator: () => combobox_item_indicator_default,
|
|
792
|
+
ItemText: () => combobox_item_text_default,
|
|
793
|
+
Label: () => combobox_label_default,
|
|
794
|
+
List: () => combobox_list_default,
|
|
795
|
+
Positioner: () => combobox_positioner_default,
|
|
796
|
+
Root: () => combobox_root_default,
|
|
797
|
+
RootProvider: () => combobox_root_provider_default,
|
|
798
|
+
Trigger: () => combobox_trigger_default
|
|
799
|
+
});
|
|
800
|
+
|
|
801
|
+
//#endregion
|
|
802
|
+
export { combobox_exports as Combobox, combobox_clear_trigger_default as ComboboxClearTrigger, combobox_content_default as ComboboxContent, combobox_context_default as ComboboxContext, combobox_control_default as ComboboxControl, combobox_empty_default as ComboboxEmpty, combobox_input_default as ComboboxInput, combobox_item_default as ComboboxItem, combobox_item_context_default as ComboboxItemContext, combobox_item_group_default as ComboboxItemGroup, combobox_item_group_label_default as ComboboxItemGroupLabel, combobox_item_indicator_default as ComboboxItemIndicator, combobox_item_text_default as ComboboxItemText, combobox_label_default as ComboboxLabel, combobox_list_default as ComboboxList, combobox_positioner_default as ComboboxPositioner, combobox_root_default as ComboboxRoot, combobox_root_provider_default as ComboboxRootProvider, combobox_trigger_default as ComboboxTrigger, comboboxAnatomy, createListCollection, useCombobox, useComboboxContext, useComboboxItemContext, useListCollection };
|