@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,459 @@
|
|
|
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-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 { m as useFieldContext } from "../../field-DnHnX3Tf.js";
|
|
8
|
+
import { computed, createBlock, defineComponent, guardReactiveProps, mergeDefaults, mergeProps, normalizeProps, openBlock, renderSlot, toValue, unref, useId, withCtx } from "vue";
|
|
9
|
+
import * as editable from "@sprawlify/primitives/machines/editable";
|
|
10
|
+
import { anatomy as editableAnatomy } from "@sprawlify/primitives/machines/editable";
|
|
11
|
+
|
|
12
|
+
//#region src/components/editable/use-editable-context.ts
|
|
13
|
+
const [EditableProvider, useEditableContext] = createContext("EditableContext");
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/editable/editable-area.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
+
var editable_area_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
18
|
+
__name: "editable-area",
|
|
19
|
+
props: { asChild: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: false
|
|
22
|
+
} },
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const editable = useEditableContext();
|
|
25
|
+
useForwardExpose();
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(editable).getAreaProps(), { "as-child": __props.asChild }), {
|
|
28
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
29
|
+
_: 3
|
|
30
|
+
}, 16, ["as-child"]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/editable/editable-area.vue
|
|
37
|
+
var editable_area_default = editable_area_vue_vue_type_script_setup_true_lang_default;
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/editable/editable-cancel-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
41
|
+
var editable_cancel_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
42
|
+
__name: "editable-cancel-trigger",
|
|
43
|
+
props: { asChild: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false
|
|
46
|
+
} },
|
|
47
|
+
setup(__props) {
|
|
48
|
+
const editable = useEditableContext();
|
|
49
|
+
useForwardExpose();
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(editable).getCancelTriggerProps(), { "as-child": __props.asChild }), {
|
|
52
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 16, ["as-child"]);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/editable/editable-cancel-trigger.vue
|
|
61
|
+
var editable_cancel_trigger_default = editable_cancel_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/editable/editable-context.vue?vue&type=script&setup=true&lang.ts
|
|
65
|
+
var editable_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
66
|
+
__name: "editable-context",
|
|
67
|
+
setup(__props) {
|
|
68
|
+
const editable = useEditableContext();
|
|
69
|
+
return (_ctx, _cache) => {
|
|
70
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(editable))));
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/editable/editable-context.vue
|
|
77
|
+
var editable_context_default = editable_context_vue_vue_type_script_setup_true_lang_default;
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/components/editable/editable-control.vue?vue&type=script&setup=true&lang.ts
|
|
81
|
+
var editable_control_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
82
|
+
__name: "editable-control",
|
|
83
|
+
props: { asChild: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
required: false
|
|
86
|
+
} },
|
|
87
|
+
setup(__props) {
|
|
88
|
+
const editable = useEditableContext();
|
|
89
|
+
useForwardExpose();
|
|
90
|
+
return (_ctx, _cache) => {
|
|
91
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(editable).getControlProps(), { "as-child": __props.asChild }), {
|
|
92
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 16, ["as-child"]);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/components/editable/editable-control.vue
|
|
101
|
+
var editable_control_default = editable_control_vue_vue_type_script_setup_true_lang_default;
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/components/editable/editable-edit-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
105
|
+
var editable_edit_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
106
|
+
__name: "editable-edit-trigger",
|
|
107
|
+
props: { asChild: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
required: false
|
|
110
|
+
} },
|
|
111
|
+
setup(__props) {
|
|
112
|
+
const editable = useEditableContext();
|
|
113
|
+
useForwardExpose();
|
|
114
|
+
return (_ctx, _cache) => {
|
|
115
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(editable).getEditTriggerProps(), { "as-child": __props.asChild }), {
|
|
116
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
117
|
+
_: 3
|
|
118
|
+
}, 16, ["as-child"]);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/components/editable/editable-edit-trigger.vue
|
|
125
|
+
var editable_edit_trigger_default = editable_edit_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/components/editable/editable-input.vue?vue&type=script&setup=true&lang.ts
|
|
129
|
+
var editable_input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
130
|
+
__name: "editable-input",
|
|
131
|
+
props: { asChild: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
required: false
|
|
134
|
+
} },
|
|
135
|
+
setup(__props) {
|
|
136
|
+
const editable = useEditableContext();
|
|
137
|
+
const field = useFieldContext();
|
|
138
|
+
useForwardExpose();
|
|
139
|
+
return (_ctx, _cache) => {
|
|
140
|
+
return openBlock(), createBlock(unref(sprawlify).input, mergeProps({ "aria-describedby": unref(field)?.ariaDescribedby }, unref(editable).getInputProps(), { "as-child": __props.asChild }), {
|
|
141
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
142
|
+
_: 3
|
|
143
|
+
}, 16, ["aria-describedby", "as-child"]);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/components/editable/editable-input.vue
|
|
150
|
+
var editable_input_default = editable_input_vue_vue_type_script_setup_true_lang_default;
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/components/editable/editable-label.vue?vue&type=script&setup=true&lang.ts
|
|
154
|
+
var editable_label_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
155
|
+
__name: "editable-label",
|
|
156
|
+
props: { asChild: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
required: false
|
|
159
|
+
} },
|
|
160
|
+
setup(__props) {
|
|
161
|
+
const editable = useEditableContext();
|
|
162
|
+
useForwardExpose();
|
|
163
|
+
return (_ctx, _cache) => {
|
|
164
|
+
return openBlock(), createBlock(unref(sprawlify).label, mergeProps(unref(editable).getLabelProps(), { "as-child": __props.asChild }), {
|
|
165
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
166
|
+
_: 3
|
|
167
|
+
}, 16, ["as-child"]);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/components/editable/editable-label.vue
|
|
174
|
+
var editable_label_default = editable_label_vue_vue_type_script_setup_true_lang_default;
|
|
175
|
+
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/components/editable/editable-preview.vue?vue&type=script&setup=true&lang.ts
|
|
178
|
+
var editable_preview_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
179
|
+
__name: "editable-preview",
|
|
180
|
+
props: { asChild: {
|
|
181
|
+
type: Boolean,
|
|
182
|
+
required: false
|
|
183
|
+
} },
|
|
184
|
+
setup(__props) {
|
|
185
|
+
const editable = useEditableContext();
|
|
186
|
+
useForwardExpose();
|
|
187
|
+
return (_ctx, _cache) => {
|
|
188
|
+
return openBlock(), createBlock(unref(sprawlify).span, mergeProps(unref(editable).getPreviewProps(), { "as-child": __props.asChild }), {
|
|
189
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
190
|
+
_: 3
|
|
191
|
+
}, 16, ["as-child"]);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/components/editable/editable-preview.vue
|
|
198
|
+
var editable_preview_default = editable_preview_vue_vue_type_script_setup_true_lang_default;
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/components/editable/editable-root-provider.vue?vue&type=script&setup=true&lang.ts
|
|
202
|
+
var editable_root_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
203
|
+
__name: "editable-root-provider",
|
|
204
|
+
props: {
|
|
205
|
+
value: {
|
|
206
|
+
type: null,
|
|
207
|
+
required: true
|
|
208
|
+
},
|
|
209
|
+
asChild: {
|
|
210
|
+
type: Boolean,
|
|
211
|
+
required: false
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
setup(__props) {
|
|
215
|
+
const props = __props;
|
|
216
|
+
const editable = computed(() => props.value);
|
|
217
|
+
EditableProvider(editable);
|
|
218
|
+
useForwardExpose();
|
|
219
|
+
return (_ctx, _cache) => {
|
|
220
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(editable.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
221
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 16, ["as-child"]);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/components/editable/editable-root-provider.vue
|
|
230
|
+
var editable_root_provider_default = editable_root_provider_vue_vue_type_script_setup_true_lang_default;
|
|
231
|
+
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/components/editable/use-editable.ts
|
|
234
|
+
const useEditable = (props = {}, emit) => {
|
|
235
|
+
const id = useId();
|
|
236
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
237
|
+
const locale = useLocaleContext(DEFAULT_LOCALE);
|
|
238
|
+
const field = useFieldContext();
|
|
239
|
+
const context = computed(() => {
|
|
240
|
+
const localeProps = toValue(props);
|
|
241
|
+
return {
|
|
242
|
+
id,
|
|
243
|
+
ids: {
|
|
244
|
+
label: field?.value.ids.label,
|
|
245
|
+
input: field?.value.ids.control
|
|
246
|
+
},
|
|
247
|
+
disabled: field?.value.disabled,
|
|
248
|
+
invalid: field?.value.invalid,
|
|
249
|
+
readOnly: field?.value.readOnly,
|
|
250
|
+
required: field?.value.required,
|
|
251
|
+
dir: locale.value.dir,
|
|
252
|
+
value: localeProps.modelValue,
|
|
253
|
+
getRootNode: env?.value.getRootNode,
|
|
254
|
+
...cleanProps(localeProps),
|
|
255
|
+
onEditChange: (details) => {
|
|
256
|
+
emit?.("editChange", details);
|
|
257
|
+
emit?.("update:edit", details.edit);
|
|
258
|
+
localeProps.onEditChange?.(details);
|
|
259
|
+
},
|
|
260
|
+
onValueChange(details) {
|
|
261
|
+
emit?.("valueChange", details);
|
|
262
|
+
emit?.("update:modelValue", details.value);
|
|
263
|
+
localeProps.onValueChange?.(details);
|
|
264
|
+
},
|
|
265
|
+
onFocusOutside: (details) => {
|
|
266
|
+
emit?.("focusOutside", details);
|
|
267
|
+
localeProps.onFocusOutside?.(details);
|
|
268
|
+
},
|
|
269
|
+
onInteractOutside: (details) => {
|
|
270
|
+
emit?.("interactOutside", details);
|
|
271
|
+
localeProps.onInteractOutside?.(details);
|
|
272
|
+
},
|
|
273
|
+
onPointerDownOutside: (details) => {
|
|
274
|
+
emit?.("pointerDownOutside", details);
|
|
275
|
+
localeProps.onPointerDownOutside?.(details);
|
|
276
|
+
},
|
|
277
|
+
onValueCommit: (details) => {
|
|
278
|
+
emit?.("valueCommit", details);
|
|
279
|
+
localeProps.onValueCommit?.(details);
|
|
280
|
+
},
|
|
281
|
+
onValueRevert: (details) => {
|
|
282
|
+
emit?.("valueRevert", details);
|
|
283
|
+
localeProps.onValueRevert?.(details);
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
});
|
|
287
|
+
const service = useMachine(editable.machine, context);
|
|
288
|
+
return computed(() => editable.connect(service, normalizeProps$1));
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/components/editable/editable-root.vue?vue&type=script&setup=true&lang.ts
|
|
293
|
+
var editable_root_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
294
|
+
__name: "editable-root",
|
|
295
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
296
|
+
activationMode: {
|
|
297
|
+
type: null,
|
|
298
|
+
required: false
|
|
299
|
+
},
|
|
300
|
+
autoResize: {
|
|
301
|
+
type: Boolean,
|
|
302
|
+
required: false
|
|
303
|
+
},
|
|
304
|
+
defaultEdit: {
|
|
305
|
+
type: Boolean,
|
|
306
|
+
required: false
|
|
307
|
+
},
|
|
308
|
+
defaultValue: {
|
|
309
|
+
type: String,
|
|
310
|
+
required: false
|
|
311
|
+
},
|
|
312
|
+
disabled: {
|
|
313
|
+
type: Boolean,
|
|
314
|
+
required: false
|
|
315
|
+
},
|
|
316
|
+
edit: {
|
|
317
|
+
type: Boolean,
|
|
318
|
+
required: false
|
|
319
|
+
},
|
|
320
|
+
finalFocusEl: {
|
|
321
|
+
type: Function,
|
|
322
|
+
required: false
|
|
323
|
+
},
|
|
324
|
+
form: {
|
|
325
|
+
type: String,
|
|
326
|
+
required: false
|
|
327
|
+
},
|
|
328
|
+
id: {
|
|
329
|
+
type: String,
|
|
330
|
+
required: false
|
|
331
|
+
},
|
|
332
|
+
ids: {
|
|
333
|
+
type: Object,
|
|
334
|
+
required: false
|
|
335
|
+
},
|
|
336
|
+
invalid: {
|
|
337
|
+
type: Boolean,
|
|
338
|
+
required: false
|
|
339
|
+
},
|
|
340
|
+
maxLength: {
|
|
341
|
+
type: Number,
|
|
342
|
+
required: false
|
|
343
|
+
},
|
|
344
|
+
modelValue: {
|
|
345
|
+
type: String,
|
|
346
|
+
required: false
|
|
347
|
+
},
|
|
348
|
+
name: {
|
|
349
|
+
type: String,
|
|
350
|
+
required: false
|
|
351
|
+
},
|
|
352
|
+
placeholder: {
|
|
353
|
+
type: [String, Object],
|
|
354
|
+
required: false
|
|
355
|
+
},
|
|
356
|
+
readOnly: {
|
|
357
|
+
type: Boolean,
|
|
358
|
+
required: false
|
|
359
|
+
},
|
|
360
|
+
required: {
|
|
361
|
+
type: Boolean,
|
|
362
|
+
required: false
|
|
363
|
+
},
|
|
364
|
+
selectOnFocus: {
|
|
365
|
+
type: Boolean,
|
|
366
|
+
required: false
|
|
367
|
+
},
|
|
368
|
+
submitMode: {
|
|
369
|
+
type: null,
|
|
370
|
+
required: false
|
|
371
|
+
},
|
|
372
|
+
translations: {
|
|
373
|
+
type: null,
|
|
374
|
+
required: false
|
|
375
|
+
},
|
|
376
|
+
asChild: {
|
|
377
|
+
type: Boolean,
|
|
378
|
+
required: false
|
|
379
|
+
}
|
|
380
|
+
}, {
|
|
381
|
+
autoResize: void 0,
|
|
382
|
+
defaultEdit: void 0,
|
|
383
|
+
disabled: void 0,
|
|
384
|
+
edit: void 0,
|
|
385
|
+
invalid: void 0,
|
|
386
|
+
readOnly: void 0,
|
|
387
|
+
required: void 0,
|
|
388
|
+
selectOnFocus: void 0
|
|
389
|
+
}),
|
|
390
|
+
emits: [
|
|
391
|
+
"editChange",
|
|
392
|
+
"focusOutside",
|
|
393
|
+
"interactOutside",
|
|
394
|
+
"pointerDownOutside",
|
|
395
|
+
"valueChange",
|
|
396
|
+
"valueCommit",
|
|
397
|
+
"valueRevert",
|
|
398
|
+
"update:modelValue",
|
|
399
|
+
"update:edit"
|
|
400
|
+
],
|
|
401
|
+
setup(__props, { emit: __emit }) {
|
|
402
|
+
const editable = useEditable(__props, __emit);
|
|
403
|
+
EditableProvider(editable);
|
|
404
|
+
useForwardExpose();
|
|
405
|
+
return (_ctx, _cache) => {
|
|
406
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(editable).getRootProps(), { "as-child": __props.asChild }), {
|
|
407
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
408
|
+
_: 3
|
|
409
|
+
}, 16, ["as-child"]);
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/components/editable/editable-root.vue
|
|
416
|
+
var editable_root_default = editable_root_vue_vue_type_script_setup_true_lang_default;
|
|
417
|
+
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/components/editable/editable-submit-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
420
|
+
var editable_submit_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
421
|
+
__name: "editable-submit-trigger",
|
|
422
|
+
props: { asChild: {
|
|
423
|
+
type: Boolean,
|
|
424
|
+
required: false
|
|
425
|
+
} },
|
|
426
|
+
setup(__props) {
|
|
427
|
+
const editable = useEditableContext();
|
|
428
|
+
useForwardExpose();
|
|
429
|
+
return (_ctx, _cache) => {
|
|
430
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(editable).getSubmitTriggerProps(), { "as-child": __props.asChild }), {
|
|
431
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
432
|
+
_: 3
|
|
433
|
+
}, 16, ["as-child"]);
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/components/editable/editable-submit-trigger.vue
|
|
440
|
+
var editable_submit_trigger_default = editable_submit_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
441
|
+
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region src/components/editable/editable.ts
|
|
444
|
+
var editable_exports = /* @__PURE__ */ __exportAll({
|
|
445
|
+
Area: () => editable_area_default,
|
|
446
|
+
CancelTrigger: () => editable_cancel_trigger_default,
|
|
447
|
+
Context: () => editable_context_default,
|
|
448
|
+
Control: () => editable_control_default,
|
|
449
|
+
EditTrigger: () => editable_edit_trigger_default,
|
|
450
|
+
Input: () => editable_input_default,
|
|
451
|
+
Label: () => editable_label_default,
|
|
452
|
+
Preview: () => editable_preview_default,
|
|
453
|
+
Root: () => editable_root_default,
|
|
454
|
+
RootProvider: () => editable_root_provider_default,
|
|
455
|
+
SubmitTrigger: () => editable_submit_trigger_default
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
//#endregion
|
|
459
|
+
export { editable_exports as Editable, editable_area_default as EditableArea, editable_cancel_trigger_default as EditableCancelTrigger, editable_context_default as EditableContext, editable_control_default as EditableControl, editable_edit_trigger_default as EditableEditTrigger, editable_input_default as EditableInput, editable_label_default as EditableLabel, editable_preview_default as EditablePreview, editable_root_default as EditableRoot, editable_root_provider_default as EditableRootProvider, editable_submit_trigger_default as EditableSubmitTrigger, editableAnatomy, useEditable, useEditableContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as PolymorphicProps } from "../../factory-D_ge_w76.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue419 from "vue";
|
|
3
3
|
import { HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, MaybeRef, SelectHTMLAttributes, SlotsType, TextareaHTMLAttributes, UnwrapRef } from "vue";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _sprawlify_primitives_anatomy1 from "@sprawlify/primitives/anatomy";
|
|
5
5
|
|
|
6
6
|
//#region src/components/field/field-types.d.ts
|
|
7
7
|
interface ElementIds {
|
|
@@ -30,7 +30,7 @@ interface UseFieldProps {
|
|
|
30
30
|
readOnly?: boolean;
|
|
31
31
|
}
|
|
32
32
|
type UseFieldReturn = ReturnType<typeof useField>;
|
|
33
|
-
declare const useField: (props?: MaybeRef<UseFieldProps>) =>
|
|
33
|
+
declare const useField: (props?: MaybeRef<UseFieldProps>) => vue419.ComputedRef<{
|
|
34
34
|
ariaDescribedby: string | undefined;
|
|
35
35
|
ids: {
|
|
36
36
|
control: string;
|
|
@@ -39,7 +39,7 @@ declare const useField: (props?: MaybeRef<UseFieldProps>) => vue454.ComputedRef<
|
|
|
39
39
|
helperText: string;
|
|
40
40
|
};
|
|
41
41
|
refs: {
|
|
42
|
-
rootRef:
|
|
42
|
+
rootRef: vue419.Ref<null, null>;
|
|
43
43
|
};
|
|
44
44
|
disabled: boolean | undefined;
|
|
45
45
|
invalid: boolean | undefined;
|
|
@@ -121,7 +121,7 @@ interface FieldContextProps extends SlotsType<{
|
|
|
121
121
|
default: UnwrapRef<UseFieldContext>;
|
|
122
122
|
}> {}
|
|
123
123
|
declare const _default: typeof __VLS_export$9;
|
|
124
|
-
declare const __VLS_export$9: __VLS_WithSlots$9<
|
|
124
|
+
declare const __VLS_export$9: __VLS_WithSlots$9<vue419.DefineComponent<{}, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, true, {}, any>, {
|
|
125
125
|
default(field: UnwrapRef<UseFieldContext>): unknown;
|
|
126
126
|
}>;
|
|
127
127
|
type __VLS_WithSlots$9<T, S> = T & {
|
|
@@ -138,7 +138,7 @@ interface FieldErrorTextProps extends FieldErrorTextBaseProps,
|
|
|
138
138
|
*/
|
|
139
139
|
HTMLAttributes {}
|
|
140
140
|
declare const _default$1: typeof __VLS_export$8;
|
|
141
|
-
declare const __VLS_export$8: __VLS_WithSlots$8<
|
|
141
|
+
declare const __VLS_export$8: __VLS_WithSlots$8<vue419.DefineComponent<FieldErrorTextProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<FieldErrorTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
142
142
|
default?: (props: {}) => any;
|
|
143
143
|
}>;
|
|
144
144
|
type __VLS_WithSlots$8<T, S> = T & {
|
|
@@ -155,7 +155,7 @@ interface FieldHelperTextProps extends FieldHelperTextBaseProps,
|
|
|
155
155
|
*/
|
|
156
156
|
HTMLAttributes {}
|
|
157
157
|
declare const _default$2: typeof __VLS_export$7;
|
|
158
|
-
declare const __VLS_export$7: __VLS_WithSlots$7<
|
|
158
|
+
declare const __VLS_export$7: __VLS_WithSlots$7<vue419.DefineComponent<FieldHelperTextProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<FieldHelperTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
159
159
|
default?: (props: {}) => any;
|
|
160
160
|
}>;
|
|
161
161
|
type __VLS_WithSlots$7<T, S> = T & {
|
|
@@ -174,11 +174,11 @@ Omit<InputHTMLAttributes, 'value'> {
|
|
|
174
174
|
modelValue?: InputHTMLAttributes['value'];
|
|
175
175
|
}
|
|
176
176
|
declare const _default$3: typeof __VLS_export$6;
|
|
177
|
-
declare const __VLS_export$6: __VLS_WithSlots$6<
|
|
177
|
+
declare const __VLS_export$6: __VLS_WithSlots$6<vue419.DefineComponent<FieldInputProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {
|
|
178
178
|
"update:modelValue": (...args: any[]) => void;
|
|
179
|
-
}, string,
|
|
179
|
+
}, string, vue419.PublicProps, Readonly<FieldInputProps> & Readonly<{
|
|
180
180
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
181
|
-
}>, {}, {}, {}, {}, string,
|
|
181
|
+
}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
182
182
|
default?: (props: {}) => any;
|
|
183
183
|
}>;
|
|
184
184
|
type __VLS_WithSlots$6<T, S> = T & {
|
|
@@ -195,7 +195,7 @@ interface FieldLabelProps extends FieldLabelBaseProps,
|
|
|
195
195
|
*/
|
|
196
196
|
LabelHTMLAttributes {}
|
|
197
197
|
declare const _default$4: typeof __VLS_export$5;
|
|
198
|
-
declare const __VLS_export$5: __VLS_WithSlots$5<
|
|
198
|
+
declare const __VLS_export$5: __VLS_WithSlots$5<vue419.DefineComponent<FieldLabelProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<FieldLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
199
199
|
default?: (props: {}) => any;
|
|
200
200
|
}>;
|
|
201
201
|
type __VLS_WithSlots$5<T, S> = T & {
|
|
@@ -212,7 +212,7 @@ interface FieldRequiredIndicatorProps extends FieldRequiredIndicatorBaseProps,
|
|
|
212
212
|
*/
|
|
213
213
|
HTMLAttributes {}
|
|
214
214
|
declare const _default$5: typeof __VLS_export$4;
|
|
215
|
-
declare const __VLS_export$4: __VLS_WithSlots$4<
|
|
215
|
+
declare const __VLS_export$4: __VLS_WithSlots$4<vue419.DefineComponent<FieldRequiredIndicatorProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<FieldRequiredIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
216
216
|
default?: (props: {}) => any;
|
|
217
217
|
} & {
|
|
218
218
|
fallback?: (props: {}) => any;
|
|
@@ -234,7 +234,7 @@ interface FieldRootProviderProps extends FieldRootProviderBaseProps,
|
|
|
234
234
|
*/
|
|
235
235
|
HTMLAttributes {}
|
|
236
236
|
declare const _default$7: typeof __VLS_export$3;
|
|
237
|
-
declare const __VLS_export$3: __VLS_WithSlots$3<
|
|
237
|
+
declare const __VLS_export$3: __VLS_WithSlots$3<vue419.DefineComponent<FieldRootProviderProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<FieldRootProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
238
238
|
default?: (props: {}) => any;
|
|
239
239
|
}>;
|
|
240
240
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
@@ -251,12 +251,12 @@ interface FieldRootProps extends FieldRootBaseProps,
|
|
|
251
251
|
*/
|
|
252
252
|
HTMLAttributes {}
|
|
253
253
|
declare const _default$6: typeof __VLS_export$2;
|
|
254
|
-
declare const __VLS_export$2: __VLS_WithSlots$2<
|
|
254
|
+
declare const __VLS_export$2: __VLS_WithSlots$2<vue419.DefineComponent<FieldRootProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {}, string, vue419.PublicProps, Readonly<FieldRootProps> & Readonly<{}>, {
|
|
255
255
|
disabled: boolean;
|
|
256
|
+
required: boolean;
|
|
256
257
|
invalid: boolean;
|
|
257
258
|
readOnly: boolean;
|
|
258
|
-
|
|
259
|
-
}, {}, {}, {}, string, vue454.ComponentProvideOptions, false, {}, any>, {
|
|
259
|
+
}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
260
260
|
default?: (props: {}) => any;
|
|
261
261
|
}>;
|
|
262
262
|
type __VLS_WithSlots$2<T, S> = T & {
|
|
@@ -275,15 +275,15 @@ Omit<SelectHTMLAttributes, 'value'> {
|
|
|
275
275
|
modelValue?: SelectHTMLAttributes['value'];
|
|
276
276
|
}
|
|
277
277
|
declare const _default$8: typeof __VLS_export$1;
|
|
278
|
-
declare const __VLS_export$1: __VLS_WithSlots$1<
|
|
278
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<vue419.DefineComponent<FieldSelectProps & {
|
|
279
279
|
modelValue?: string;
|
|
280
|
-
}, {}, {}, {}, {},
|
|
280
|
+
}, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {
|
|
281
281
|
"update:modelValue": (...args: any[]) => void;
|
|
282
|
-
}, string,
|
|
282
|
+
}, string, vue419.PublicProps, Readonly<FieldSelectProps & {
|
|
283
283
|
modelValue?: string;
|
|
284
284
|
}> & Readonly<{
|
|
285
285
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
286
|
-
}>, {}, {}, {}, {}, string,
|
|
286
|
+
}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
287
287
|
default?: (props: {}) => any;
|
|
288
288
|
}>;
|
|
289
289
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
@@ -304,11 +304,11 @@ Omit<TextareaHTMLAttributes, 'value'> {
|
|
|
304
304
|
modelValue?: TextareaHTMLAttributes['value'];
|
|
305
305
|
}
|
|
306
306
|
declare const _default$9: typeof __VLS_export;
|
|
307
|
-
declare const __VLS_export: __VLS_WithSlots<
|
|
307
|
+
declare const __VLS_export: __VLS_WithSlots<vue419.DefineComponent<FieldTextareaProps, {}, {}, {}, {}, vue419.ComponentOptionsMixin, vue419.ComponentOptionsMixin, {
|
|
308
308
|
"update:modelValue": (...args: any[]) => void;
|
|
309
|
-
}, string,
|
|
309
|
+
}, string, vue419.PublicProps, Readonly<FieldTextareaProps> & Readonly<{
|
|
310
310
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
311
|
-
}>, {}, {}, {}, {}, string,
|
|
311
|
+
}>, {}, {}, {}, {}, string, vue419.ComponentProvideOptions, false, {}, any>, {
|
|
312
312
|
default?: (props: {}) => any;
|
|
313
313
|
}>;
|
|
314
314
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -318,7 +318,7 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
318
318
|
};
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/components/field/field-anatomy.d.ts
|
|
321
|
-
declare const fieldAnatomy:
|
|
321
|
+
declare const fieldAnatomy: _sprawlify_primitives_anatomy1.AnatomyInstance<"input" | "label" | "select" | "textarea" | "root" | "errorText" | "helperText" | "requiredIndicator">;
|
|
322
322
|
declare namespace field_d_exports {
|
|
323
323
|
export { _default as Context, FieldContextProps as ContextProps, _default$1 as ErrorText, FieldErrorTextBaseProps as ErrorTextBaseProps, FieldErrorTextProps as ErrorTextProps, _default$2 as HelperText, FieldHelperTextBaseProps as HelperTextBaseProps, FieldHelperTextProps as HelperTextProps, _default$3 as Input, FieldInputBaseProps as InputBaseProps, FieldInputProps as InputProps, _default$4 as Label, FieldLabelBaseProps as LabelBaseProps, FieldLabelProps as LabelProps, _default$5 as RequiredIndicator, FieldRequiredIndicatorBaseProps as RequiredIndicatorBaseProps, FieldRequiredIndicatorProps as RequiredIndicatorProps, _default$6 as Root, FieldRootBaseProps as RootBaseProps, FieldRootProps as RootProps, _default$7 as RootProvider, FieldRootProviderBaseProps as RootProviderBaseProps, FieldRootProviderProps as RootProviderProps, _default$8 as Select, FieldSelectBaseProps as SelectBaseProps, FieldSelectProps as SelectProps, _default$9 as Textarea, FieldTextareaBaseProps as TextareaBaseProps, FieldTextareaProps as TextareaProps };
|
|
324
324
|
}
|