@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,290 @@
|
|
|
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 { m as useFieldContext } from "../../field-CtPR24u6.js";
|
|
9
|
+
import { computed, createBlock, defineComponent, guardReactiveProps, mergeDefaults, mergeProps, normalizeProps, openBlock, renderSlot, toValue, unref, useId, withCtx } from "vue";
|
|
10
|
+
import * as sprawlifySwitch from "@sprawlify/primitives/machines/switch";
|
|
11
|
+
import { anatomy as switchAnatomy } from "@sprawlify/primitives/machines/switch";
|
|
12
|
+
|
|
13
|
+
//#region src/components/switch/use-switch-context.ts
|
|
14
|
+
const [SwitchProvider, useSwitchContext] = createContext("SwitchContext");
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/switch/switch-context.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
+
var switch_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
19
|
+
__name: "switch-context",
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const context = useSwitchContext();
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(context))));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/switch/switch-context.vue
|
|
30
|
+
var switch_context_default = switch_context_vue_vue_type_script_setup_true_lang_default;
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/switch/switch-control.vue?vue&type=script&setup=true&lang.ts
|
|
34
|
+
var switch_control_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
35
|
+
__name: "switch-control",
|
|
36
|
+
props: { asChild: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false
|
|
39
|
+
} },
|
|
40
|
+
setup(__props) {
|
|
41
|
+
const context = useSwitchContext();
|
|
42
|
+
useForwardExpose();
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createBlock(unref(sprawlify).span, mergeProps(unref(context).getControlProps(), { "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/switch/switch-control.vue
|
|
54
|
+
var switch_control_default = switch_control_vue_vue_type_script_setup_true_lang_default;
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/switch/switch-hidden-input.vue?vue&type=script&setup=true&lang.ts
|
|
58
|
+
var switch_hidden_input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
59
|
+
__name: "switch-hidden-input",
|
|
60
|
+
props: { asChild: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
required: false
|
|
63
|
+
} },
|
|
64
|
+
setup(__props) {
|
|
65
|
+
const context = useSwitchContext();
|
|
66
|
+
const field = useFieldContext();
|
|
67
|
+
useForwardExpose();
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createBlock(unref(sprawlify).input, mergeProps({ "aria-describedby": unref(field)?.ariaDescribedby }, unref(context).getHiddenInputProps(), { "as-child": __props.asChild }), {
|
|
70
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
71
|
+
_: 3
|
|
72
|
+
}, 16, ["aria-describedby", "as-child"]);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/switch/switch-hidden-input.vue
|
|
79
|
+
var switch_hidden_input_default = switch_hidden_input_vue_vue_type_script_setup_true_lang_default;
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/switch/switch-label.vue?vue&type=script&setup=true&lang.ts
|
|
83
|
+
var switch_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
84
|
+
__name: "switch-label",
|
|
85
|
+
props: { asChild: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
required: false
|
|
88
|
+
} },
|
|
89
|
+
setup(__props) {
|
|
90
|
+
const context = useSwitchContext();
|
|
91
|
+
useForwardExpose();
|
|
92
|
+
return (_ctx, _cache) => {
|
|
93
|
+
return openBlock(), createBlock(unref(sprawlify).span, mergeProps(unref(context).getLabelProps(), { "as-child": __props.asChild }), {
|
|
94
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
95
|
+
_: 3
|
|
96
|
+
}, 16, ["as-child"]);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/components/switch/switch-label.vue
|
|
103
|
+
var switch_label_default = switch_label_vue_vue_type_script_setup_true_lang_default;
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/components/switch/switch-root-provider.vue?vue&type=script&setup=true&lang.ts
|
|
107
|
+
var switch_root_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
108
|
+
__name: "switch-root-provider",
|
|
109
|
+
props: {
|
|
110
|
+
value: {
|
|
111
|
+
type: null,
|
|
112
|
+
required: true
|
|
113
|
+
},
|
|
114
|
+
asChild: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
required: false
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
setup(__props) {
|
|
120
|
+
const props = __props;
|
|
121
|
+
const api = computed(() => props.value);
|
|
122
|
+
SwitchProvider(api);
|
|
123
|
+
useForwardExpose();
|
|
124
|
+
return (_ctx, _cache) => {
|
|
125
|
+
return openBlock(), createBlock(unref(sprawlify).label, mergeProps(api.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
126
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
127
|
+
_: 3
|
|
128
|
+
}, 16, ["as-child"]);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/components/switch/switch-root-provider.vue
|
|
135
|
+
var switch_root_provider_default = switch_root_provider_vue_vue_type_script_setup_true_lang_default;
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/components/switch/use-switch.ts
|
|
139
|
+
const useSwitch = (props = {}, emit) => {
|
|
140
|
+
const id = useId();
|
|
141
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
142
|
+
const locale = useLocaleContext(DEFAULT_LOCALE);
|
|
143
|
+
const field = useFieldContext();
|
|
144
|
+
const context = computed(() => {
|
|
145
|
+
const localProps = toValue(props);
|
|
146
|
+
return {
|
|
147
|
+
id,
|
|
148
|
+
ids: {
|
|
149
|
+
label: field?.value.ids.label,
|
|
150
|
+
hiddenInput: field?.value.ids.control
|
|
151
|
+
},
|
|
152
|
+
disabled: field?.value.disabled,
|
|
153
|
+
readOnly: field?.value.readOnly,
|
|
154
|
+
invalid: field?.value.invalid,
|
|
155
|
+
required: field?.value.required,
|
|
156
|
+
dir: locale.value.dir,
|
|
157
|
+
getRootNode: env?.value.getRootNode,
|
|
158
|
+
...cleanProps(localProps),
|
|
159
|
+
onCheckedChange(details) {
|
|
160
|
+
emit?.("checkedChange", details);
|
|
161
|
+
emit?.("update:checked", details.checked);
|
|
162
|
+
localProps.onCheckedChange?.(details);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
const service = useMachine(sprawlifySwitch.machine, context);
|
|
167
|
+
return computed(() => sprawlifySwitch.connect(service, normalizeProps$1));
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/components/switch/switch-root.vue?vue&type=script&setup=true&lang.ts
|
|
172
|
+
var switch_root_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
173
|
+
__name: "switch-root",
|
|
174
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
175
|
+
checked: {
|
|
176
|
+
type: Boolean,
|
|
177
|
+
required: false
|
|
178
|
+
},
|
|
179
|
+
defaultChecked: {
|
|
180
|
+
type: Boolean,
|
|
181
|
+
required: false
|
|
182
|
+
},
|
|
183
|
+
disabled: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
required: false
|
|
186
|
+
},
|
|
187
|
+
form: {
|
|
188
|
+
type: String,
|
|
189
|
+
required: false
|
|
190
|
+
},
|
|
191
|
+
id: {
|
|
192
|
+
type: String,
|
|
193
|
+
required: false
|
|
194
|
+
},
|
|
195
|
+
ids: {
|
|
196
|
+
type: Object,
|
|
197
|
+
required: false
|
|
198
|
+
},
|
|
199
|
+
invalid: {
|
|
200
|
+
type: Boolean,
|
|
201
|
+
required: false
|
|
202
|
+
},
|
|
203
|
+
label: {
|
|
204
|
+
type: String,
|
|
205
|
+
required: false
|
|
206
|
+
},
|
|
207
|
+
name: {
|
|
208
|
+
type: String,
|
|
209
|
+
required: false
|
|
210
|
+
},
|
|
211
|
+
readOnly: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
required: false
|
|
214
|
+
},
|
|
215
|
+
required: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
required: false
|
|
218
|
+
},
|
|
219
|
+
value: {
|
|
220
|
+
type: String,
|
|
221
|
+
required: false
|
|
222
|
+
},
|
|
223
|
+
asChild: {
|
|
224
|
+
type: Boolean,
|
|
225
|
+
required: false
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
checked: void 0,
|
|
229
|
+
defaultChecked: void 0,
|
|
230
|
+
disabled: void 0,
|
|
231
|
+
invalid: void 0,
|
|
232
|
+
readOnly: void 0,
|
|
233
|
+
required: void 0
|
|
234
|
+
}),
|
|
235
|
+
emits: ["checkedChange", "update:checked"],
|
|
236
|
+
setup(__props, { emit: __emit }) {
|
|
237
|
+
const context = useSwitch(__props, __emit);
|
|
238
|
+
SwitchProvider(context);
|
|
239
|
+
useForwardExpose();
|
|
240
|
+
return (_ctx, _cache) => {
|
|
241
|
+
return openBlock(), createBlock(unref(sprawlify).label, mergeProps(unref(context).getRootProps(), { "as-child": __props.asChild }), {
|
|
242
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
243
|
+
_: 3
|
|
244
|
+
}, 16, ["as-child"]);
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region src/components/switch/switch-root.vue
|
|
251
|
+
var switch_root_default = switch_root_vue_vue_type_script_setup_true_lang_default;
|
|
252
|
+
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/components/switch/switch-thumb.vue?vue&type=script&setup=true&lang.ts
|
|
255
|
+
var switch_thumb_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
256
|
+
__name: "switch-thumb",
|
|
257
|
+
props: { asChild: {
|
|
258
|
+
type: Boolean,
|
|
259
|
+
required: false
|
|
260
|
+
} },
|
|
261
|
+
setup(__props) {
|
|
262
|
+
const context = useSwitchContext();
|
|
263
|
+
useForwardExpose();
|
|
264
|
+
return (_ctx, _cache) => {
|
|
265
|
+
return openBlock(), createBlock(unref(sprawlify).span, mergeProps(unref(context).getThumbProps(), { "as-child": __props.asChild }), {
|
|
266
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
267
|
+
_: 3
|
|
268
|
+
}, 16, ["as-child"]);
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/components/switch/switch-thumb.vue
|
|
275
|
+
var switch_thumb_default = switch_thumb_vue_vue_type_script_setup_true_lang_default;
|
|
276
|
+
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/components/switch/switch.ts
|
|
279
|
+
var switch_exports = /* @__PURE__ */ __exportAll({
|
|
280
|
+
Context: () => switch_context_default,
|
|
281
|
+
Control: () => switch_control_default,
|
|
282
|
+
HiddenInput: () => switch_hidden_input_default,
|
|
283
|
+
Label: () => switch_label_default,
|
|
284
|
+
Root: () => switch_root_default,
|
|
285
|
+
RootProvider: () => switch_root_provider_default,
|
|
286
|
+
Thumb: () => switch_thumb_default
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
//#endregion
|
|
290
|
+
export { switch_exports as Switch, switch_context_default as SwitchContext, switch_control_default as SwitchControl, switch_hidden_input_default as SwitchHiddenInput, switch_label_default as SwitchLabel, switch_root_default as SwitchRoot, switch_root_provider_default as SwitchRootProvider, switch_thumb_default as SwitchThumb, switchAnatomy, useSwitch, useSwitchContext };
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { t as PolymorphicProps } from "../../factory-B5zr8_kk.js";
|
|
2
|
+
import { a as Optional, r as EmitFn$1 } from "../../types-DIEO6uP3.js";
|
|
3
|
+
import { r as PropTypes } from "../../index-CCRVRFFQ.js";
|
|
4
|
+
import { t as RenderStrategyProps } from "../../use-render-strategy-U5NxU252.js";
|
|
5
|
+
import * as vue657 from "vue";
|
|
6
|
+
import { ButtonHTMLAttributes, ComputedRef, HTMLAttributes, MaybeRef, SlotsType, UnwrapRef } from "vue";
|
|
7
|
+
import * as tabs from "@sprawlify/primitives/machines/tabs";
|
|
8
|
+
import { ContentProps, FocusChangeDetails, FocusChangeDetails as TabsFocusChangeDetails, TriggerProps, ValueChangeDetails, ValueChangeDetails as TabsValueChangeDetails, anatomy as tabsAnatomy } from "@sprawlify/primitives/machines/tabs";
|
|
9
|
+
|
|
10
|
+
//#region src/components/tabs/tab-content.vue.d.ts
|
|
11
|
+
interface TabContentBaseProps extends ContentProps, PolymorphicProps {}
|
|
12
|
+
interface TabContentProps extends TabContentBaseProps,
|
|
13
|
+
/**
|
|
14
|
+
* @vue-ignore
|
|
15
|
+
*/
|
|
16
|
+
HTMLAttributes {}
|
|
17
|
+
declare const _default: typeof __VLS_export$6;
|
|
18
|
+
declare const __VLS_export$6: __VLS_WithSlots$6<vue657.DefineComponent<TabContentProps, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {}, string, vue657.PublicProps, Readonly<TabContentProps> & Readonly<{}>, {}, {}, {}, {}, string, vue657.ComponentProvideOptions, false, {}, any>, {
|
|
19
|
+
default?: (props: {}) => any;
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/tabs/tab-indicator.vue.d.ts
|
|
28
|
+
interface TabIndicatorBaseProps extends PolymorphicProps {}
|
|
29
|
+
interface TabIndicatorProps extends TabIndicatorBaseProps,
|
|
30
|
+
/**
|
|
31
|
+
* @vue-ignore
|
|
32
|
+
*/
|
|
33
|
+
HTMLAttributes {}
|
|
34
|
+
declare const _default$1: typeof __VLS_export$5;
|
|
35
|
+
declare const __VLS_export$5: __VLS_WithSlots$5<vue657.DefineComponent<TabIndicatorProps, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {}, string, vue657.PublicProps, Readonly<TabIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue657.ComponentProvideOptions, false, {}, any>, {
|
|
36
|
+
default?: (props: {}) => any;
|
|
37
|
+
}>;
|
|
38
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/tabs/tab-list.vue.d.ts
|
|
45
|
+
interface TabListBaseProps extends PolymorphicProps {}
|
|
46
|
+
interface TabListProps extends TabListBaseProps,
|
|
47
|
+
/**
|
|
48
|
+
* @vue-ignore
|
|
49
|
+
*/
|
|
50
|
+
HTMLAttributes {}
|
|
51
|
+
declare const _default$2: typeof __VLS_export$4;
|
|
52
|
+
declare const __VLS_export$4: __VLS_WithSlots$4<vue657.DefineComponent<TabListProps, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {}, string, vue657.PublicProps, Readonly<TabListProps> & Readonly<{}>, {}, {}, {}, {}, string, vue657.ComponentProvideOptions, false, {}, any>, {
|
|
53
|
+
default?: (props: {}) => any;
|
|
54
|
+
}>;
|
|
55
|
+
type __VLS_WithSlots$4<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/tabs/tab-trigger.vue.d.ts
|
|
62
|
+
interface TabTriggerBaseProps extends TriggerProps, PolymorphicProps {}
|
|
63
|
+
interface TabTriggerProps extends TabTriggerBaseProps,
|
|
64
|
+
/**
|
|
65
|
+
* @vue-ignore
|
|
66
|
+
*/
|
|
67
|
+
Omit<ButtonHTMLAttributes, 'disabled' | 'value'> {}
|
|
68
|
+
declare const _default$3: typeof __VLS_export$3;
|
|
69
|
+
declare const __VLS_export$3: __VLS_WithSlots$3<vue657.DefineComponent<TabTriggerProps, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {}, string, vue657.PublicProps, Readonly<TabTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue657.ComponentProvideOptions, false, {}, any>, {
|
|
70
|
+
default?: (props: {}) => any;
|
|
71
|
+
}>;
|
|
72
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
73
|
+
new (): {
|
|
74
|
+
$slots: S;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/tabs/tabs-types.d.ts
|
|
79
|
+
interface RootProps {
|
|
80
|
+
activationMode?: 'manual' | 'automatic';
|
|
81
|
+
composite?: boolean;
|
|
82
|
+
defaultValue?: string;
|
|
83
|
+
deselectable?: boolean;
|
|
84
|
+
id?: string;
|
|
85
|
+
ids?: Partial<{
|
|
86
|
+
root: string;
|
|
87
|
+
trigger: (id: string) => string;
|
|
88
|
+
content: (id: string) => string;
|
|
89
|
+
list: string;
|
|
90
|
+
indicator: string;
|
|
91
|
+
}>;
|
|
92
|
+
loopFocus?: boolean;
|
|
93
|
+
modelValue?: string;
|
|
94
|
+
navigate?: (details: tabs.NavigateDetails) => void;
|
|
95
|
+
orientation?: 'horizontal' | 'vertical';
|
|
96
|
+
translations?: tabs.IntlTranslations;
|
|
97
|
+
}
|
|
98
|
+
type RootEmits = {
|
|
99
|
+
focusChange: [details: tabs.FocusChangeDetails];
|
|
100
|
+
valueChange: [details: tabs.ValueChangeDetails];
|
|
101
|
+
'update:modelValue': [value: string];
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/components/tabs/use-tabs.d.ts
|
|
105
|
+
interface UseTabsProps extends Optional<Omit<tabs.Props, 'dir' | 'getRootNode'>, 'id'> {
|
|
106
|
+
modelValue?: tabs.Props['value'];
|
|
107
|
+
}
|
|
108
|
+
interface UseTabsReturn extends ComputedRef<tabs.Api<PropTypes>> {}
|
|
109
|
+
declare const useTabs: (props?: MaybeRef<UseTabsProps>, emit?: EmitFn$1<RootEmits>) => UseTabsReturn;
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/components/tabs/use-tabs-context.d.ts
|
|
112
|
+
interface UseTabsContext extends UseTabsReturn {}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/tabs/tabs-context.vue.d.ts
|
|
115
|
+
interface TabsContextProps extends SlotsType<{
|
|
116
|
+
default: UnwrapRef<UseTabsContext>;
|
|
117
|
+
}> {}
|
|
118
|
+
declare const _default$4: typeof __VLS_export$2;
|
|
119
|
+
declare const __VLS_export$2: __VLS_WithSlots$2<vue657.DefineComponent<{}, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {}, string, vue657.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue657.ComponentProvideOptions, true, {}, any>, {
|
|
120
|
+
default(tabs: UnwrapRef<UseTabsContext>): unknown;
|
|
121
|
+
}>;
|
|
122
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
123
|
+
new (): {
|
|
124
|
+
$slots: S;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/components/tabs/tabs-root-provider.vue.d.ts
|
|
129
|
+
interface RootProviderProps {
|
|
130
|
+
value: UnwrapRef<UseTabsReturn>;
|
|
131
|
+
}
|
|
132
|
+
interface TabsRootProviderBaseProps extends RootProviderProps, RenderStrategyProps, PolymorphicProps {}
|
|
133
|
+
interface TabsRootProviderProps extends TabsRootProviderBaseProps,
|
|
134
|
+
/**
|
|
135
|
+
* @vue-ignore
|
|
136
|
+
*/
|
|
137
|
+
HTMLAttributes {}
|
|
138
|
+
declare const _default$6: typeof __VLS_export$1;
|
|
139
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<vue657.DefineComponent<TabsRootProviderProps, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {}, string, vue657.PublicProps, Readonly<TabsRootProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue657.ComponentProvideOptions, false, {}, any>, {
|
|
140
|
+
default?: (props: {}) => any;
|
|
141
|
+
}>;
|
|
142
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
143
|
+
new (): {
|
|
144
|
+
$slots: S;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/components/tabs/tabs-root.vue.d.ts
|
|
149
|
+
interface TabsRootBaseProps extends RootProps, RenderStrategyProps, PolymorphicProps {}
|
|
150
|
+
interface TabsRootProps extends TabsRootBaseProps,
|
|
151
|
+
/**
|
|
152
|
+
* @vue-ignore
|
|
153
|
+
*/
|
|
154
|
+
HTMLAttributes {}
|
|
155
|
+
interface TabsRootEmits extends RootEmits {}
|
|
156
|
+
declare const _default$5: typeof __VLS_export;
|
|
157
|
+
declare const __VLS_export: __VLS_WithSlots<vue657.DefineComponent<TabsRootProps, {}, {}, {}, {}, vue657.ComponentOptionsMixin, vue657.ComponentOptionsMixin, {
|
|
158
|
+
valueChange: (details: tabs.ValueChangeDetails) => any;
|
|
159
|
+
"update:modelValue": (value: string) => any;
|
|
160
|
+
focusChange: (details: tabs.FocusChangeDetails) => any;
|
|
161
|
+
}, string, vue657.PublicProps, Readonly<TabsRootProps> & Readonly<{
|
|
162
|
+
onValueChange?: ((details: tabs.ValueChangeDetails) => any) | undefined;
|
|
163
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
164
|
+
onFocusChange?: ((details: tabs.FocusChangeDetails) => any) | undefined;
|
|
165
|
+
}>, {
|
|
166
|
+
composite: boolean;
|
|
167
|
+
deselectable: boolean;
|
|
168
|
+
loopFocus: boolean;
|
|
169
|
+
}, {}, {}, {}, string, vue657.ComponentProvideOptions, false, {}, any>, {
|
|
170
|
+
default?: (props: {}) => any;
|
|
171
|
+
}>;
|
|
172
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
173
|
+
new (): {
|
|
174
|
+
$slots: S;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
declare namespace tabs_d_exports {
|
|
178
|
+
export { _default as Content, TabContentBaseProps as ContentBaseProps, TabContentProps as ContentProps, _default$4 as Context, TabsContextProps as ContextProps, FocusChangeDetails, _default$1 as Indicator, TabIndicatorBaseProps as IndicatorBaseProps, TabIndicatorProps as IndicatorProps, _default$2 as List, TabListBaseProps as ListBaseProps, TabListProps as ListProps, _default$5 as Root, TabsRootBaseProps as RootBaseProps, TabsRootEmits as RootEmits, TabsRootProps as RootProps, _default$6 as RootProvider, TabsRootProviderBaseProps as RootProviderBaseProps, TabsRootProviderProps as RootProviderProps, _default$3 as Trigger, TabTriggerBaseProps as TriggerBaseProps, TabTriggerProps as TriggerProps, ValueChangeDetails };
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
export { _default as TabContent, type TabContentBaseProps, type TabContentProps, _default$1 as TabIndicator, type TabIndicatorBaseProps, type TabIndicatorProps, _default$2 as TabList, type TabListBaseProps, type TabListProps, _default$3 as TabTrigger, type TabTriggerBaseProps, type TabTriggerProps, tabs_d_exports as Tabs, _default$4 as TabsContext, type TabsContextProps, type TabsFocusChangeDetails, _default$5 as TabsRoot, type TabsRootBaseProps, type TabsRootEmits, type TabsRootProps, _default$6 as TabsRootProvider, type TabsRootProviderBaseProps, type TabsRootProviderProps, type TabsValueChangeDetails, type UseTabsContext, type UseTabsProps, type UseTabsReturn, tabsAnatomy, useTabs, useTabsContext };
|