@sprawlify/vue 0.0.67 → 0.0.72
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/boolean-CpMsIRK4.js +7 -0
- package/dist/{collapsible-DQfAISmg.js → collapsible-jX9S7WYj.js} +5 -4
- package/dist/{collection-Ba0Aeh5P.js → collection-DGKjEgOz.js} +1 -1
- package/dist/components/accordion/index.d.ts +19 -19
- package/dist/components/accordion/index.js +8 -7
- package/dist/components/angle-slider/index.d.ts +18 -18
- package/dist/components/angle-slider/index.js +5 -4
- package/dist/components/avatar/index.d.ts +11 -11
- package/dist/components/avatar/index.js +5 -4
- package/dist/components/bottom-sheet/index.d.ts +22 -22
- package/dist/components/bottom-sheet/index.js +8 -7
- package/dist/components/carousel/index.d.ts +25 -25
- package/dist/components/carousel/index.js +5 -4
- package/dist/components/checkbox/index.d.ts +27 -27
- package/dist/components/checkbox/index.js +8 -12
- package/dist/components/client-only/index.d.ts +2 -2
- package/dist/components/clipboard/index.d.ts +17 -17
- package/dist/components/clipboard/index.js +5 -4
- package/dist/components/collapsible/index.d.ts +16 -16
- package/dist/components/collapsible/index.js +5 -4
- package/dist/components/collection/index.d.ts +1 -1
- package/dist/components/collection/index.js +1 -1
- package/dist/components/color-picker/index.d.ts +56 -56
- package/dist/components/color-picker/index.js +8 -7
- package/dist/components/combobox/index.d.ts +38 -38
- package/dist/components/combobox/index.js +9 -8
- package/dist/components/date-picker/index.d.ts +47 -47
- package/dist/components/date-picker/index.js +7 -6
- package/dist/components/dialog/index.d.ts +35 -35
- package/dist/components/dialog/index.js +7 -6
- package/dist/components/download-trigger/index.d.ts +4 -4
- package/dist/components/download-trigger/index.js +4 -3
- package/dist/components/editable/index.d.ts +29 -29
- package/dist/components/editable/index.js +6 -5
- package/dist/components/field/index.d.ts +25 -25
- package/dist/components/field/index.js +5 -4
- package/dist/components/fieldset/index.d.ts +13 -13
- package/dist/components/fieldset/index.js +5 -4
- package/dist/components/file-upload/index.d.ts +329 -0
- package/dist/components/file-upload/index.js +597 -0
- package/dist/components/floating-panel/index.d.ts +325 -0
- package/dist/components/floating-panel/index.js +568 -0
- package/dist/components/focus-trap/index.d.ts +48 -0
- package/dist/components/focus-trap/index.js +96 -0
- package/dist/components/format/index.d.ts +40 -0
- package/dist/components/format/index.js +148 -0
- package/dist/components/frame/index.d.ts +39 -0
- package/dist/components/frame/index.js +111 -0
- package/dist/components/highlight/index.d.ts +4 -4
- package/dist/components/highlight/index.js +1 -1
- package/dist/components/hover-card/index.d.ts +200 -0
- package/dist/components/hover-card/index.js +335 -0
- package/dist/components/image-cropper/index.d.ts +211 -0
- package/dist/components/image-cropper/index.js +381 -0
- package/dist/components/json-tree-view/index.d.ts +91 -0
- package/dist/components/json-tree-view/index.js +490 -0
- package/dist/components/listbox/index.d.ts +325 -0
- package/dist/components/listbox/index.js +533 -0
- package/dist/components/marquee/index.d.ts +268 -0
- package/dist/components/marquee/index.js +340 -0
- package/dist/components/menu/index.d.ts +55 -56
- package/dist/components/menu/index.js +7 -6
- package/dist/components/navigation-menu/index.d.ts +272 -0
- package/dist/components/navigation-menu/index.js +559 -0
- package/dist/components/number-input/index.d.ts +253 -0
- package/dist/components/number-input/index.js +427 -0
- package/dist/components/pagination/index.d.ts +211 -0
- package/dist/components/pagination/index.js +346 -0
- package/dist/components/password-input/index.d.ts +213 -0
- package/dist/components/password-input/index.js +325 -0
- package/dist/components/pin-input/index.d.ts +198 -0
- package/dist/components/pin-input/index.js +346 -0
- package/dist/components/popover/index.d.ts +318 -0
- package/dist/components/popover/index.js +486 -0
- package/dist/components/presence/index.d.ts +2 -2
- package/dist/components/presence/index.js +4 -3
- package/dist/components/progress/index.d.ts +231 -0
- package/dist/components/progress/index.js +372 -0
- package/dist/components/qr-code/index.d.ts +159 -0
- package/dist/components/qr-code/index.js +263 -0
- package/dist/components/radio-group/index.d.ts +231 -0
- package/dist/components/radio-group/index.js +378 -0
- package/dist/components/rating-group/index.d.ts +201 -0
- package/dist/components/rating-group/index.js +330 -0
- package/dist/components/scroll-area/index.d.ts +171 -0
- package/dist/components/scroll-area/index.js +264 -0
- package/dist/components/segment-group/index.d.ts +231 -0
- package/dist/components/segment-group/index.js +422 -0
- package/dist/components/select/index.d.ts +39 -39
- package/dist/components/select/index.js +9 -8
- package/dist/components/signature-pad/index.d.ts +202 -0
- package/dist/components/signature-pad/index.js +345 -0
- package/dist/components/slider/index.d.ts +300 -0
- package/dist/components/slider/index.js +511 -0
- package/dist/components/splitter/index.d.ts +162 -0
- package/dist/components/splitter/index.js +280 -0
- package/dist/components/steps/index.d.ts +290 -0
- package/dist/components/steps/index.js +469 -0
- package/dist/components/switch/index.d.ts +179 -0
- package/dist/components/switch/index.js +290 -0
- package/dist/components/tabs/index.d.ts +181 -0
- package/dist/components/tabs/index.js +335 -0
- package/dist/components/tags-input/index.d.ts +339 -0
- package/dist/components/tags-input/index.js +569 -0
- package/dist/components/timer/index.d.ts +177 -0
- package/dist/components/timer/index.js +295 -0
- package/dist/components/tree-view/index.d.ts +6 -0
- package/dist/components/tree-view/index.js +11 -0
- package/dist/create-context-Ds1GbsVc.js +16 -0
- package/dist/{field-DnHnX3Tf.js → field-CtPR24u6.js} +4 -3
- package/dist/{fieldset-DzhN7Zrg.js → fieldset-D5SznrKY.js} +4 -3
- package/dist/{index-CDQghZtv.d.ts → index-B_UiXhk3.d.ts} +11 -11
- package/dist/index-DwWFWpls.d.ts +447 -0
- package/dist/{index-BBHms9-0.d.ts → index-xb1q4_02.d.ts} +7 -7
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/{presence-CvUnYMZQ.js → presence-B4-UhJY9.js} +3 -2
- package/dist/{providers-B2CNPFg1.js → providers-DNBWT-O_.js} +1 -1
- package/dist/tree-view-Ctpu5RjE.js +737 -0
- package/dist/{use-forward-expose-4p5AGAI3.js → use-forward-expose-CCAmHTUB.js} +2 -15
- package/dist/{use-render-strategy-BkxoN6ll.js → use-render-strategy-DA33j31C.js} +1 -1
- package/package.json +126 -2
- /package/dist/{clean-props-BDv2zb5M.js → clean-props-D2R4tz5e.js} +0 -0
- /package/dist/{create-split-props-YZ3qgXe_.js → create-split-props-0RD5_O4P.js} +0 -0
- /package/dist/{factory-D_ge_w76.d.ts → factory-B5zr8_kk.d.ts} +0 -0
- /package/dist/{factory-BH3WrWd2.js → factory-Co08Aw8u.js} +0 -0
- /package/dist/{index-B66Om_3U.d.ts → index-CCRVRFFQ.d.ts} +0 -0
- /package/dist/{index-DqRk-Yea.d.ts → index-DhFoJHfp.d.ts} +0 -0
- /package/dist/{presence-types-Bv1E60Cw.d.ts → presence-types-BJRr8tqd.d.ts} +0 -0
- /package/dist/{types-Bj-dS2Hc.d.ts → types-DIEO6uP3.d.ts} +0 -0
- /package/dist/{use-render-strategy-CHj_pCfT.d.ts → use-render-strategy-U5NxU252.d.ts} +0 -0
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../chunk-BN_g-Awi.js";
|
|
2
|
+
import { n as useMachine, r as normalizeProps$1 } from "../../core-DNndr38p.js";
|
|
3
|
+
import { a as useLocaleContext, c as useEnvironmentContext, i as DEFAULT_LOCALE, s as DEFAULT_ENVIRONMENT } from "../../providers-DNBWT-O_.js";
|
|
4
|
+
import { t as createContext } from "../../create-context-Ds1GbsVc.js";
|
|
5
|
+
import { t as useForwardExpose } from "../../use-forward-expose-CCAmHTUB.js";
|
|
6
|
+
import { t as sprawlify } from "../../factory-Co08Aw8u.js";
|
|
7
|
+
import { t as cleanProps } from "../../clean-props-D2R4tz5e.js";
|
|
8
|
+
import { o as createListCollection } from "../../collection-DGKjEgOz.js";
|
|
9
|
+
import { computed, createBlock, createCommentVNode, createTextVNode, defineComponent, guardReactiveProps, mergeDefaults, mergeProps, normalizeProps, openBlock, renderSlot, toDisplayString, toValue, unref, useId, useSlots, withCtx } from "vue";
|
|
10
|
+
import * as listbox from "@sprawlify/primitives/machines/listbox";
|
|
11
|
+
import { anatomy } from "@sprawlify/primitives/machines/listbox";
|
|
12
|
+
|
|
13
|
+
//#region src/components/listbox/use-listbox-context.ts
|
|
14
|
+
const [ListboxProvider, useListboxContext] = createContext("ListboxContext");
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/listbox/listbox-context.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
+
var listbox_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
19
|
+
__name: "listbox-context",
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const listbox = useListboxContext();
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(listbox))));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/listbox/listbox-context.vue
|
|
30
|
+
var listbox_context_default = listbox_context_vue_vue_type_script_setup_true_lang_default;
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/listbox/listbox-content.vue?vue&type=script&setup=true&lang.ts
|
|
34
|
+
var listbox_content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
35
|
+
__name: "listbox-content",
|
|
36
|
+
props: { asChild: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false
|
|
39
|
+
} },
|
|
40
|
+
setup(__props) {
|
|
41
|
+
const listbox = useListboxContext();
|
|
42
|
+
useForwardExpose();
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getContentProps(), { "as-child": __props.asChild }), {
|
|
45
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 16, ["as-child"]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/listbox/listbox-content.vue
|
|
54
|
+
var listbox_content_default = listbox_content_vue_vue_type_script_setup_true_lang_default;
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/listbox/listbox-anatomy.ts
|
|
58
|
+
const listboxAnatomy = anatomy.extendWith("empty");
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/listbox/listbox-empty.vue?vue&type=script&setup=true&lang.ts
|
|
62
|
+
var listbox_empty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
63
|
+
__name: "listbox-empty",
|
|
64
|
+
props: { asChild: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
required: false
|
|
67
|
+
} },
|
|
68
|
+
setup(__props) {
|
|
69
|
+
const parts = listboxAnatomy.build();
|
|
70
|
+
const listbox = useListboxContext();
|
|
71
|
+
const isEmpty = computed(() => listbox.value.collection.size === 0);
|
|
72
|
+
useForwardExpose();
|
|
73
|
+
return (_ctx, _cache) => {
|
|
74
|
+
return isEmpty.value ? (openBlock(), createBlock(unref(sprawlify).div, mergeProps({ key: 0 }, unref(parts).empty.attrs, {
|
|
75
|
+
role: "presentation",
|
|
76
|
+
"as-child": __props.asChild
|
|
77
|
+
}), {
|
|
78
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 16, ["as-child"])) : createCommentVNode("v-if", true);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/listbox/listbox-empty.vue
|
|
87
|
+
var listbox_empty_default = listbox_empty_vue_vue_type_script_setup_true_lang_default;
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/components/listbox/listbox-input.vue?vue&type=script&setup=true&lang.ts
|
|
91
|
+
var listbox_input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
92
|
+
__name: "listbox-input",
|
|
93
|
+
props: { asChild: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
required: false
|
|
96
|
+
} },
|
|
97
|
+
setup(__props) {
|
|
98
|
+
const listbox = useListboxContext();
|
|
99
|
+
useForwardExpose();
|
|
100
|
+
return (_ctx, _cache) => {
|
|
101
|
+
return openBlock(), createBlock(unref(sprawlify).input, mergeProps(unref(listbox).getInputProps(), { "as-child": __props.asChild }), {
|
|
102
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
103
|
+
_: 3
|
|
104
|
+
}, 16, ["as-child"]);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/components/listbox/listbox-input.vue
|
|
111
|
+
var listbox_input_default = listbox_input_vue_vue_type_script_setup_true_lang_default;
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/listbox/use-listbox-item-context.ts
|
|
115
|
+
const [ListboxItemProvider, useListboxItemContext] = createContext("ListboxItemContext");
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/components/listbox/use-listbox-item-props-context.ts
|
|
119
|
+
const [ListboxItemPropsProvider, useListboxItemPropsContext] = createContext("ListboxItemPropsContext");
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/components/listbox/listbox-item.vue?vue&type=script&setup=true&lang.ts
|
|
123
|
+
var listbox_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
124
|
+
__name: "listbox-item",
|
|
125
|
+
props: {
|
|
126
|
+
item: {
|
|
127
|
+
type: null,
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
highlightOnHover: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
required: false,
|
|
133
|
+
skipCheck: true
|
|
134
|
+
},
|
|
135
|
+
asChild: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
setup(__props) {
|
|
141
|
+
const props = __props;
|
|
142
|
+
const listbox = useListboxContext();
|
|
143
|
+
ListboxItemPropsProvider(props);
|
|
144
|
+
ListboxItemProvider(computed(() => listbox.value.getItemState(props)));
|
|
145
|
+
useForwardExpose();
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getItemProps(props), { "as-child": __props.asChild }), {
|
|
148
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
149
|
+
_: 3
|
|
150
|
+
}, 16, ["as-child"]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/listbox/listbox-item.vue
|
|
157
|
+
var listbox_item_default = listbox_item_vue_vue_type_script_setup_true_lang_default;
|
|
158
|
+
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/components/listbox/listbox-item-context.vue?vue&type=script&setup=true&lang.ts
|
|
161
|
+
var listbox_item_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
162
|
+
__name: "listbox-item-context",
|
|
163
|
+
setup(__props) {
|
|
164
|
+
const context = useListboxItemContext();
|
|
165
|
+
return (_ctx, _cache) => {
|
|
166
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(context))));
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/components/listbox/listbox-item-context.vue
|
|
173
|
+
var listbox_item_context_default = listbox_item_context_vue_vue_type_script_setup_true_lang_default;
|
|
174
|
+
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/components/listbox/use-listbox-item-group-props-context.ts
|
|
177
|
+
const [ListboxItemGroupPropsProvider, useListboxItemGroupPropsContext] = createContext("ListboxItemGroupPropsContext");
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/components/listbox/listbox-item-group.vue?vue&type=script&setup=true&lang.ts
|
|
181
|
+
var listbox_item_group_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
182
|
+
__name: "listbox-item-group",
|
|
183
|
+
props: {
|
|
184
|
+
id: {
|
|
185
|
+
type: String,
|
|
186
|
+
required: false
|
|
187
|
+
},
|
|
188
|
+
asChild: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
required: false
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
setup(__props) {
|
|
194
|
+
const props = __props;
|
|
195
|
+
const listbox = useListboxContext();
|
|
196
|
+
const uid = useId();
|
|
197
|
+
const id = props.id ?? uid;
|
|
198
|
+
ListboxItemGroupPropsProvider({ id });
|
|
199
|
+
useForwardExpose();
|
|
200
|
+
return (_ctx, _cache) => {
|
|
201
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getItemGroupProps({ id: unref(id) }), { "as-child": __props.asChild }), {
|
|
202
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
203
|
+
_: 3
|
|
204
|
+
}, 16, ["as-child"]);
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/components/listbox/listbox-item-group.vue
|
|
211
|
+
var listbox_item_group_default = listbox_item_group_vue_vue_type_script_setup_true_lang_default;
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/components/listbox/listbox-item-group-label.vue?vue&type=script&setup=true&lang.ts
|
|
215
|
+
var listbox_item_group_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
216
|
+
__name: "listbox-item-group-label",
|
|
217
|
+
props: { asChild: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
required: false
|
|
220
|
+
} },
|
|
221
|
+
setup(__props) {
|
|
222
|
+
const listbox = useListboxContext();
|
|
223
|
+
const itemGroupProps = useListboxItemGroupPropsContext();
|
|
224
|
+
useForwardExpose();
|
|
225
|
+
return (_ctx, _cache) => {
|
|
226
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getItemGroupLabelProps({ htmlFor: unref(itemGroupProps).id }), { "as-child": __props.asChild }), {
|
|
227
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
228
|
+
_: 3
|
|
229
|
+
}, 16, ["as-child"]);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/listbox/listbox-item-group-label.vue
|
|
236
|
+
var listbox_item_group_label_default = listbox_item_group_label_vue_vue_type_script_setup_true_lang_default;
|
|
237
|
+
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/components/listbox/listbox-item-indicator.vue?vue&type=script&setup=true&lang.ts
|
|
240
|
+
var listbox_item_indicator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
241
|
+
__name: "listbox-item-indicator",
|
|
242
|
+
props: { asChild: {
|
|
243
|
+
type: Boolean,
|
|
244
|
+
required: false
|
|
245
|
+
} },
|
|
246
|
+
setup(__props) {
|
|
247
|
+
const listbox = useListboxContext();
|
|
248
|
+
const itemProps = useListboxItemPropsContext();
|
|
249
|
+
useForwardExpose();
|
|
250
|
+
return (_ctx, _cache) => {
|
|
251
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getItemIndicatorProps(unref(itemProps)), { "as-child": __props.asChild }), {
|
|
252
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
253
|
+
_: 3
|
|
254
|
+
}, 16, ["as-child"]);
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/components/listbox/listbox-item-indicator.vue
|
|
261
|
+
var listbox_item_indicator_default = listbox_item_indicator_vue_vue_type_script_setup_true_lang_default;
|
|
262
|
+
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/components/listbox/listbox-item-text.vue?vue&type=script&setup=true&lang.ts
|
|
265
|
+
var listbox_item_text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
266
|
+
__name: "listbox-item-text",
|
|
267
|
+
props: { asChild: {
|
|
268
|
+
type: Boolean,
|
|
269
|
+
required: false
|
|
270
|
+
} },
|
|
271
|
+
setup(__props) {
|
|
272
|
+
const listbox = useListboxContext();
|
|
273
|
+
const ItemProps = useListboxItemPropsContext();
|
|
274
|
+
useForwardExpose();
|
|
275
|
+
return (_ctx, _cache) => {
|
|
276
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getItemTextProps(unref(ItemProps)), { "as-child": __props.asChild }), {
|
|
277
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
278
|
+
_: 3
|
|
279
|
+
}, 16, ["as-child"]);
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region src/components/listbox/listbox-item-text.vue
|
|
286
|
+
var listbox_item_text_default = listbox_item_text_vue_vue_type_script_setup_true_lang_default;
|
|
287
|
+
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/components/listbox/listbox-label.vue?vue&type=script&setup=true&lang.ts
|
|
290
|
+
var listbox_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
291
|
+
__name: "listbox-label",
|
|
292
|
+
props: { asChild: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
required: false
|
|
295
|
+
} },
|
|
296
|
+
setup(__props) {
|
|
297
|
+
const listbox = useListboxContext();
|
|
298
|
+
useForwardExpose();
|
|
299
|
+
return (_ctx, _cache) => {
|
|
300
|
+
return openBlock(), createBlock(unref(sprawlify).label, mergeProps(unref(listbox).getLabelProps(), { "as-child": __props.asChild }), {
|
|
301
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
302
|
+
_: 3
|
|
303
|
+
}, 16, ["as-child"]);
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/components/listbox/listbox-label.vue
|
|
310
|
+
var listbox_label_default = listbox_label_vue_vue_type_script_setup_true_lang_default;
|
|
311
|
+
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/components/listbox/use-listbox.ts
|
|
314
|
+
const useListbox = (props, emit) => {
|
|
315
|
+
const id = useId();
|
|
316
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
317
|
+
const locale = useLocaleContext(DEFAULT_LOCALE);
|
|
318
|
+
const context = computed(() => {
|
|
319
|
+
const localProps = toValue(props);
|
|
320
|
+
return {
|
|
321
|
+
id,
|
|
322
|
+
dir: locale.value.dir,
|
|
323
|
+
value: localProps.modelValue,
|
|
324
|
+
getRootNode: env?.value.getRootNode,
|
|
325
|
+
...cleanProps(localProps),
|
|
326
|
+
onValueChange: (details) => {
|
|
327
|
+
emit?.("valueChange", details);
|
|
328
|
+
emit?.("update:modelValue", details.value);
|
|
329
|
+
localProps.onValueChange?.(details);
|
|
330
|
+
},
|
|
331
|
+
onHighlightChange: (details) => {
|
|
332
|
+
emit?.("highlightChange", details);
|
|
333
|
+
localProps.onHighlightChange?.(details);
|
|
334
|
+
},
|
|
335
|
+
onSelect: (details) => {
|
|
336
|
+
emit?.("select", details);
|
|
337
|
+
localProps.onSelect?.(details);
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
});
|
|
341
|
+
const service = useMachine(listbox.machine, context);
|
|
342
|
+
return computed(() => listbox.connect(service, normalizeProps$1));
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region src/components/listbox/listbox-root.vue?vue&type=script&setup=true&lang.ts
|
|
347
|
+
var listbox_root_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
348
|
+
__name: "listbox-root",
|
|
349
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
350
|
+
collection: {
|
|
351
|
+
type: null,
|
|
352
|
+
required: true
|
|
353
|
+
},
|
|
354
|
+
defaultHighlightedValue: {
|
|
355
|
+
type: String,
|
|
356
|
+
required: false
|
|
357
|
+
},
|
|
358
|
+
defaultValue: {
|
|
359
|
+
type: Array,
|
|
360
|
+
required: false
|
|
361
|
+
},
|
|
362
|
+
deselectable: {
|
|
363
|
+
type: Boolean,
|
|
364
|
+
required: false
|
|
365
|
+
},
|
|
366
|
+
disabled: {
|
|
367
|
+
type: Boolean,
|
|
368
|
+
required: false
|
|
369
|
+
},
|
|
370
|
+
disallowSelectAll: {
|
|
371
|
+
type: Boolean,
|
|
372
|
+
required: false
|
|
373
|
+
},
|
|
374
|
+
highlightedValue: {
|
|
375
|
+
type: String,
|
|
376
|
+
required: false
|
|
377
|
+
},
|
|
378
|
+
id: {
|
|
379
|
+
type: String,
|
|
380
|
+
required: false
|
|
381
|
+
},
|
|
382
|
+
ids: {
|
|
383
|
+
type: Object,
|
|
384
|
+
required: false
|
|
385
|
+
},
|
|
386
|
+
loopFocus: {
|
|
387
|
+
type: Boolean,
|
|
388
|
+
required: false
|
|
389
|
+
},
|
|
390
|
+
modelValue: {
|
|
391
|
+
type: Array,
|
|
392
|
+
required: false
|
|
393
|
+
},
|
|
394
|
+
orientation: {
|
|
395
|
+
type: String,
|
|
396
|
+
required: false
|
|
397
|
+
},
|
|
398
|
+
scrollToIndexFn: {
|
|
399
|
+
type: Function,
|
|
400
|
+
required: false
|
|
401
|
+
},
|
|
402
|
+
selectOnHighlight: {
|
|
403
|
+
type: Boolean,
|
|
404
|
+
required: false
|
|
405
|
+
},
|
|
406
|
+
selectionMode: {
|
|
407
|
+
type: null,
|
|
408
|
+
required: false
|
|
409
|
+
},
|
|
410
|
+
typeahead: {
|
|
411
|
+
type: Boolean,
|
|
412
|
+
required: false
|
|
413
|
+
},
|
|
414
|
+
asChild: {
|
|
415
|
+
type: Boolean,
|
|
416
|
+
required: false
|
|
417
|
+
}
|
|
418
|
+
}, {
|
|
419
|
+
deselectable: void 0,
|
|
420
|
+
disabled: void 0,
|
|
421
|
+
disallowSelectAll: void 0,
|
|
422
|
+
loopFocus: void 0,
|
|
423
|
+
selectOnHighlight: void 0,
|
|
424
|
+
typeahead: void 0
|
|
425
|
+
}),
|
|
426
|
+
emits: [
|
|
427
|
+
"highlightChange",
|
|
428
|
+
"select",
|
|
429
|
+
"valueChange",
|
|
430
|
+
"update:modelValue"
|
|
431
|
+
],
|
|
432
|
+
setup(__props, { emit: __emit }) {
|
|
433
|
+
const listbox = useListbox(__props, __emit);
|
|
434
|
+
ListboxProvider(listbox);
|
|
435
|
+
useForwardExpose();
|
|
436
|
+
return (_ctx, _cache) => {
|
|
437
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(listbox).getRootProps(), { "as-child": __props.asChild }), {
|
|
438
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
439
|
+
_: 3
|
|
440
|
+
}, 16, ["as-child"]);
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/components/listbox/listbox-root.vue
|
|
447
|
+
var listbox_root_default = listbox_root_vue_vue_type_script_setup_true_lang_default;
|
|
448
|
+
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region src/components/listbox/listbox-root-provider.vue?vue&type=script&setup=true&lang.ts
|
|
451
|
+
var listbox_root_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
452
|
+
__name: "listbox-root-provider",
|
|
453
|
+
props: {
|
|
454
|
+
value: {
|
|
455
|
+
type: null,
|
|
456
|
+
required: true
|
|
457
|
+
},
|
|
458
|
+
asChild: {
|
|
459
|
+
type: Boolean,
|
|
460
|
+
required: false
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
setup(__props) {
|
|
464
|
+
const props = __props;
|
|
465
|
+
const listbox = computed(() => props.value);
|
|
466
|
+
ListboxProvider(listbox);
|
|
467
|
+
useForwardExpose();
|
|
468
|
+
return (_ctx, _cache) => {
|
|
469
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(listbox.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
470
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
471
|
+
_: 3
|
|
472
|
+
}, 16, ["as-child"]);
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region src/components/listbox/listbox-root-provider.vue
|
|
479
|
+
var listbox_root_provider_default = listbox_root_provider_vue_vue_type_script_setup_true_lang_default;
|
|
480
|
+
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region src/components/listbox/listbox-value-text.vue?vue&type=script&setup=true&lang.ts
|
|
483
|
+
var listbox_value_text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
484
|
+
__name: "listbox-value-text",
|
|
485
|
+
props: {
|
|
486
|
+
placeholder: {
|
|
487
|
+
type: String,
|
|
488
|
+
required: false
|
|
489
|
+
},
|
|
490
|
+
asChild: {
|
|
491
|
+
type: Boolean,
|
|
492
|
+
required: false
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
setup(__props) {
|
|
496
|
+
const props = __props;
|
|
497
|
+
const listbox = useListboxContext();
|
|
498
|
+
const slots = useSlots();
|
|
499
|
+
useForwardExpose();
|
|
500
|
+
return (_ctx, _cache) => {
|
|
501
|
+
return openBlock(), createBlock(unref(sprawlify).span, mergeProps(unref(listbox).getValueTextProps(), { "as-child": __props.asChild }), {
|
|
502
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(slots.default?.() || unref(listbox).valueAsString || props.placeholder), 1)])]),
|
|
503
|
+
_: 3
|
|
504
|
+
}, 16, ["as-child"]);
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region src/components/listbox/listbox-value-text.vue
|
|
511
|
+
var listbox_value_text_default = listbox_value_text_vue_vue_type_script_setup_true_lang_default;
|
|
512
|
+
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region src/components/listbox/listbox.ts
|
|
515
|
+
var listbox_exports = /* @__PURE__ */ __exportAll({
|
|
516
|
+
Content: () => listbox_content_default,
|
|
517
|
+
Context: () => listbox_context_default,
|
|
518
|
+
Empty: () => listbox_empty_default,
|
|
519
|
+
Input: () => listbox_input_default,
|
|
520
|
+
Item: () => listbox_item_default,
|
|
521
|
+
ItemContext: () => listbox_item_context_default,
|
|
522
|
+
ItemGroup: () => listbox_item_group_default,
|
|
523
|
+
ItemGroupLabel: () => listbox_item_group_label_default,
|
|
524
|
+
ItemIndicator: () => listbox_item_indicator_default,
|
|
525
|
+
ItemText: () => listbox_item_text_default,
|
|
526
|
+
Label: () => listbox_label_default,
|
|
527
|
+
Root: () => listbox_root_default,
|
|
528
|
+
RootProvider: () => listbox_root_provider_default,
|
|
529
|
+
ValueText: () => listbox_value_text_default
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
//#endregion
|
|
533
|
+
export { listbox_exports as Listbox, listbox_content_default as ListboxContent, listbox_context_default as ListboxContext, listbox_empty_default as ListboxEmpty, listbox_input_default as ListboxInput, listbox_item_default as ListboxItem, listbox_item_context_default as ListboxItemContext, listbox_item_group_default as ListboxItemGroup, listbox_item_group_label_default as ListboxItemGroupLabel, listbox_item_indicator_default as ListboxItemIndicator, listbox_item_text_default as ListboxItemText, listbox_label_default as ListboxLabel, listbox_root_default as ListboxRoot, listbox_root_provider_default as ListboxRootProvider, listbox_value_text_default as ListboxValueText, createListCollection, listboxAnatomy, useListbox, useListboxContext, useListboxItemContext };
|