@sfxcode/nuxt-ui-formkit 1.2.4 → 1.2.6

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.
Files changed (85) hide show
  1. package/README.md +2 -1
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/FUAutoForm.d.vue.ts +7 -8
  4. package/dist/runtime/components/FUAutoForm.vue +7 -4
  5. package/dist/runtime/components/FUAutoForm.vue.d.ts +7 -8
  6. package/dist/runtime/components/FUAutoFormOverlay.d.vue.ts +1 -1
  7. package/dist/runtime/components/FUAutoFormOverlay.vue.d.ts +1 -1
  8. package/dist/runtime/components/FUDataEdit.d.vue.ts +7 -7
  9. package/dist/runtime/components/FUDataEdit.vue +1 -1
  10. package/dist/runtime/components/FUDataEdit.vue.d.ts +7 -7
  11. package/dist/runtime/components/FUDataView.d.vue.ts +7 -7
  12. package/dist/runtime/components/FUDataView.vue +1 -1
  13. package/dist/runtime/components/FUDataView.vue.d.ts +7 -7
  14. package/dist/runtime/components/inputs/FUCalendar.vue +2 -2
  15. package/dist/runtime/components/inputs/FUCheckbox.d.vue.ts +1 -0
  16. package/dist/runtime/components/inputs/FUCheckbox.vue +3 -2
  17. package/dist/runtime/components/inputs/FUCheckbox.vue.d.ts +1 -0
  18. package/dist/runtime/components/inputs/FUCheckboxGroup.vue +3 -2
  19. package/dist/runtime/components/inputs/FUColorPicker.vue +2 -2
  20. package/dist/runtime/components/inputs/FUEditor.vue +2 -2
  21. package/dist/runtime/components/inputs/FUFileUpload.vue +3 -3
  22. package/dist/runtime/components/inputs/FUInput.vue +2 -2
  23. package/dist/runtime/components/inputs/FUInputDate.vue +2 -2
  24. package/dist/runtime/components/inputs/FUInputMenu.d.vue.ts +1 -0
  25. package/dist/runtime/components/inputs/FUInputMenu.vue +3 -2
  26. package/dist/runtime/components/inputs/FUInputMenu.vue.d.ts +1 -0
  27. package/dist/runtime/components/inputs/FUInputNumber.vue +2 -2
  28. package/dist/runtime/components/inputs/FUInputTags.vue +2 -2
  29. package/dist/runtime/components/inputs/FUInputTime.vue +2 -2
  30. package/dist/runtime/components/inputs/FUListbox.d.vue.ts +1 -0
  31. package/dist/runtime/components/inputs/FUListbox.vue +10 -6
  32. package/dist/runtime/components/inputs/FUListbox.vue.d.ts +1 -0
  33. package/dist/runtime/components/inputs/FUPinInput.d.vue.ts +1 -0
  34. package/dist/runtime/components/inputs/FUPinInput.vue +3 -2
  35. package/dist/runtime/components/inputs/FUPinInput.vue.d.ts +1 -0
  36. package/dist/runtime/components/inputs/FURadioGroup.vue +3 -3
  37. package/dist/runtime/components/inputs/FUSelect.d.vue.ts +1 -0
  38. package/dist/runtime/components/inputs/FUSelect.vue +3 -2
  39. package/dist/runtime/components/inputs/FUSelect.vue.d.ts +1 -0
  40. package/dist/runtime/components/inputs/FUSelectMenu.d.vue.ts +1 -0
  41. package/dist/runtime/components/inputs/FUSelectMenu.vue +3 -2
  42. package/dist/runtime/components/inputs/FUSelectMenu.vue.d.ts +1 -0
  43. package/dist/runtime/components/inputs/FUSlider.vue +3 -3
  44. package/dist/runtime/components/inputs/FUSwitch.d.vue.ts +1 -0
  45. package/dist/runtime/components/inputs/FUSwitch.vue +3 -2
  46. package/dist/runtime/components/inputs/FUSwitch.vue.d.ts +1 -0
  47. package/dist/runtime/components/inputs/FUTextarea.vue +2 -2
  48. package/dist/runtime/components/inputs/FUTree.d.vue.ts +36 -0
  49. package/dist/runtime/components/inputs/FUTree.vue +52 -0
  50. package/dist/runtime/components/inputs/FUTree.vue.d.ts +36 -0
  51. package/dist/runtime/components/output/FUOutputBoolean.d.vue.ts +2 -0
  52. package/dist/runtime/components/output/FUOutputBoolean.vue.d.ts +2 -0
  53. package/dist/runtime/components/output/FUOutputDate.d.vue.ts +2 -0
  54. package/dist/runtime/components/output/FUOutputDate.vue.d.ts +2 -0
  55. package/dist/runtime/components/output/FUOutputLink.d.vue.ts +2 -0
  56. package/dist/runtime/components/output/FUOutputLink.vue.d.ts +2 -0
  57. package/dist/runtime/components/output/FUOutputList.d.vue.ts +2 -0
  58. package/dist/runtime/components/output/FUOutputList.vue +2 -1
  59. package/dist/runtime/components/output/FUOutputList.vue.d.ts +2 -0
  60. package/dist/runtime/components/output/FUOutputNumber.d.vue.ts +2 -0
  61. package/dist/runtime/components/output/FUOutputNumber.vue.d.ts +2 -0
  62. package/dist/runtime/components/output/FUOutputText.d.vue.ts +2 -0
  63. package/dist/runtime/components/output/FUOutputText.vue.d.ts +2 -0
  64. package/dist/runtime/composables/useFormKitAutoForm.d.ts +2 -0
  65. package/dist/runtime/composables/useFormKitAutoForm.js +86 -1
  66. package/dist/runtime/composables/useFormKitRepeater.js +5 -5
  67. package/dist/runtime/composables/useFormKitSchema.d.ts +7 -24
  68. package/dist/runtime/formkit/definitions/index.d.ts +1 -0
  69. package/dist/runtime/formkit/definitions/index.js +2 -1
  70. package/dist/runtime/formkit/definitions/index.mjs +2 -1
  71. package/dist/runtime/formkit/definitions/input.d.ts +1 -0
  72. package/dist/runtime/formkit/definitions/input.js +12 -7
  73. package/dist/runtime/formkit/definitions/input.mjs +12 -7
  74. package/dist/runtime/formkit/definitions/multiStep.js +8 -4
  75. package/dist/runtime/formkit/definitions/multiStep.mjs +8 -4
  76. package/dist/runtime/formkit/definitions/output.js +6 -6
  77. package/dist/runtime/formkit/definitions/output.mjs +6 -6
  78. package/dist/runtime/formkit/definitions/repeater.js +4 -0
  79. package/dist/runtime/formkit/definitions/repeater.mjs +4 -0
  80. package/dist/runtime/formkit/index.d.ts +10 -1
  81. package/dist/runtime/utils/useFormKitInput.d.ts +1 -0
  82. package/dist/runtime/utils/useFormKitInput.js +10 -2
  83. package/dist/runtime/utils/useFormKitOutput.d.ts +25 -0
  84. package/dist/runtime/utils/useFormKitOutput.js +21 -5
  85. package/package.json +6 -6
@@ -7,7 +7,7 @@ const props = defineProps({
7
7
  required: true
8
8
  }
9
9
  });
10
- const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
10
+ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
11
11
  const handleContainerBlur = createContainerBlurHandler(props.context);
12
12
  </script>
13
13
 
@@ -45,7 +45,7 @@ const handleContainerBlur = createContainerBlurHandler(props.context);
45
45
  :hide-time-zone="context.hideTimeZone"
46
46
  :max-value="context.maxValue"
47
47
  :min-value="context.minValue"
48
- :ui="context.ui"
48
+ :ui="ui"
49
49
  @change="handleChange"
50
50
  @update:model-value="handleInput"
51
51
  @blur="handleBlur"
@@ -49,6 +49,7 @@ export interface FormKitListboxProps {
49
49
  autofocus?: boolean;
50
50
  autofocusDelay?: number;
51
51
  searchTerm?: string;
52
+ name?: string;
52
53
  ui?: Record<string, unknown>;
53
54
  }
54
55
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -8,7 +8,7 @@ const props = defineProps({
8
8
  required: true
9
9
  }
10
10
  });
11
- const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
11
+ const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
12
12
  const handleContainerBlur = createContainerBlurHandler(props.context);
13
13
  const targetItems = ref(modelValue.value || []);
14
14
  const sourceSelection = ref([]);
@@ -24,6 +24,7 @@ const sourceItems = computed(() => {
24
24
  return items.value.filter((item) => !targetItems.value.some((t) => t[valueKey] === item[valueKey]));
25
25
  });
26
26
  const transferSlotNames = computed(() => validSlotNames.value.filter((name) => name !== "item-trailing"));
27
+ const transferDefaultValue = computed(() => props.context.defaultValue);
27
28
  const sourceContainerRef = ref();
28
29
  const targetContainerRef = ref();
29
30
  const sourceDragActive = ref(false);
@@ -211,6 +212,7 @@ watch(targetItems, (newVal) => {
211
212
  v-if="!context.displayMode || context.displayMode === 'single'"
212
213
  :id="context.id"
213
214
  v-model="modelValue"
215
+ :name="context.node.name"
214
216
  v-bind="{ ...context?.attrs }"
215
217
  :class="styleClass"
216
218
  :style="context?.attrs.style"
@@ -239,7 +241,7 @@ watch(targetItems, (newVal) => {
239
241
  :autofocus="context.autofocus"
240
242
  :autofocus-delay="context.autofocusDelay"
241
243
  :search-term="context.searchTerm"
242
- :ui="context.ui"
244
+ :ui="ui"
243
245
  @change="handleChange"
244
246
  @update:model-value="handleInput"
245
247
  @focusout="handleContainerBlur"
@@ -277,6 +279,7 @@ watch(targetItems, (newVal) => {
277
279
  <UListbox
278
280
  :id="context.id + '-transfer-left'"
279
281
  v-model="sourceSelection"
282
+ :name="context.node.name + '-transfer-left'"
280
283
  v-bind="{ ...context?.attrs }"
281
284
  :class="styleClass"
282
285
  :style="context?.attrs.style"
@@ -287,7 +290,7 @@ watch(targetItems, (newVal) => {
287
290
  :orientation="context.orientation"
288
291
  :selection-behavior="context.selectionBehavior"
289
292
  :disabled="!!context?.disabled"
290
- :default-value="context.defaultValue"
293
+ :default-value="transferDefaultValue"
291
294
  :multiple="true"
292
295
  :value-key="context.valueKey"
293
296
  :label-key="context.labelKey"
@@ -304,7 +307,7 @@ watch(targetItems, (newVal) => {
304
307
  :autofocus="context.autofocus"
305
308
  :autofocus-delay="context.autofocusDelay"
306
309
  :search-term="context.searchTerm"
307
- :ui="context.ui"
310
+ :ui="ui"
308
311
  @change="handleChange"
309
312
  @update:model-value="handleInput"
310
313
  >
@@ -379,6 +382,7 @@ watch(targetItems, (newVal) => {
379
382
  <UListbox
380
383
  :id="context.id + '-transfer-right'"
381
384
  v-model="targetSelection"
385
+ :name="context.node.name + '-transfer-right'"
382
386
  v-bind="{ ...context?.attrs }"
383
387
  :class="styleClass"
384
388
  :style="context?.attrs.style"
@@ -389,7 +393,7 @@ watch(targetItems, (newVal) => {
389
393
  :orientation="context.orientation"
390
394
  :selection-behavior="context.selectionBehavior"
391
395
  :disabled="!!context?.disabled"
392
- :default-value="context.defaultValue"
396
+ :default-value="transferDefaultValue"
393
397
  :multiple="true"
394
398
  :value-key="context.valueKey"
395
399
  :label-key="context.labelKey"
@@ -406,7 +410,7 @@ watch(targetItems, (newVal) => {
406
410
  :autofocus="context.autofocus"
407
411
  :autofocus-delay="context.autofocusDelay"
408
412
  :search-term="context.searchTerm"
409
- :ui="context.ui"
413
+ :ui="ui"
410
414
  @change="handleChange"
411
415
  @update:model-value="handleInput"
412
416
  >
@@ -49,6 +49,7 @@ export interface FormKitListboxProps {
49
49
  autofocus?: boolean;
50
50
  autofocusDelay?: number;
51
51
  searchTerm?: string;
52
+ name?: string;
52
53
  ui?: Record<string, unknown>;
53
54
  }
54
55
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -15,6 +15,7 @@ export interface FormKitPinInputProps {
15
15
  separator?: number | number[];
16
16
  type?: 'text' | 'number';
17
17
  placeholder?: string;
18
+ name?: string;
18
19
  ui?: Record<string, unknown>;
19
20
  }
20
21
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -7,7 +7,7 @@ const props = defineProps({
7
7
  required: true
8
8
  }
9
9
  });
10
- const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue } = useFormKitInput(props.context);
10
+ const { handleInput, handleChange, handleBlur, isInvalid, styleClass, color, modelValue, ui } = useFormKitInput(props.context);
11
11
  const handleContainerBlur = createContainerBlurHandler(props.context);
12
12
  function handlePinBlur(event) {
13
13
  handleBlur(event);
@@ -18,6 +18,7 @@ function handlePinBlur(event) {
18
18
  <UPinInput
19
19
  :id="context.id"
20
20
  v-model="modelValue"
21
+ :name="context.node.name"
21
22
  v-bind="{ ...context?.attrs }"
22
23
  :default-value="context.defaultValue"
23
24
  :class="styleClass"
@@ -37,7 +38,7 @@ function handlePinBlur(event) {
37
38
  :separator="context.separator"
38
39
  :type="context.type ?? 'text'"
39
40
  :placeholder="context.placeholder"
40
- :ui="context.ui"
41
+ :ui="ui"
41
42
  @change="handleChange"
42
43
  @update:model-value="handleInput"
43
44
  @blur="handlePinBlur"
@@ -15,6 +15,7 @@ export interface FormKitPinInputProps {
15
15
  separator?: number | number[];
16
16
  type?: 'text' | 'number';
17
17
  placeholder?: string;
18
+ name?: string;
18
19
  ui?: Record<string, unknown>;
19
20
  }
20
21
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -7,7 +7,7 @@ const props = defineProps({
7
7
  required: true
8
8
  }
9
9
  });
10
- const { handleInput, handleChange, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
10
+ const { handleInput, handleChange, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
11
11
  const handleContainerBlur = createContainerBlurHandler(props.context);
12
12
  </script>
13
13
 
@@ -29,8 +29,8 @@ const handleContainerBlur = createContainerBlurHandler(props.context);
29
29
  :label-key="context.labelKey"
30
30
  :description-key="context.descriptionKey"
31
31
  :loop="context.loop ?? false"
32
- :name="context.name"
33
- :ui="context.ui"
32
+ :name="context.node.name"
33
+ :ui="ui"
34
34
  @change="handleChange"
35
35
  @update:model-value="handleInput"
36
36
  @focusout="handleContainerBlur"
@@ -32,6 +32,7 @@ export interface FormKitSelectProps {
32
32
  trailingIcon?: string;
33
33
  loading?: boolean;
34
34
  loadingIcon?: string;
35
+ name?: string;
35
36
  ui?: Record<string, unknown>;
36
37
  }
37
38
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -6,13 +6,14 @@ const props = defineProps({
6
6
  required: true
7
7
  }
8
8
  });
9
- const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, items, validSlotNames } = useFormKitInput(props.context);
9
+ const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
10
10
  </script>
11
11
 
12
12
  <template>
13
13
  <USelect
14
14
  :id="context.id"
15
15
  v-model="modelValue"
16
+ :name="context.node.name"
16
17
  v-bind="{ ...context?.attrs }"
17
18
  :class="styleClass"
18
19
  :disabled="!!context?.disabled"
@@ -45,7 +46,7 @@ const { handleInput, handleChange, isInvalid, color, styleClass, modelValue, ite
45
46
  :open="context.open"
46
47
  :default-open="context.defaultOpen"
47
48
  :autocomplete="context.autocomplete"
48
- :ui="context.ui"
49
+ :ui="ui"
49
50
  @change="handleChange"
50
51
  @update:model-value="handleInput"
51
52
  >
@@ -32,6 +32,7 @@ export interface FormKitSelectProps {
32
32
  trailingIcon?: string;
33
33
  loading?: boolean;
34
34
  loadingIcon?: string;
35
+ name?: string;
35
36
  ui?: Record<string, unknown>;
36
37
  }
37
38
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -58,6 +58,7 @@ export interface FormKitSelectMenuProps {
58
58
  resetModelValueOnClear?: boolean;
59
59
  highlightOnHover?: boolean;
60
60
  searchTerm?: string;
61
+ name?: string;
61
62
  ui?: Record<string, unknown>;
62
63
  }
63
64
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -6,13 +6,14 @@ const props = defineProps({
6
6
  required: true
7
7
  }
8
8
  });
9
- const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items, validSlotNames } = useFormKitInput(props.context);
9
+ const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
10
10
  </script>
11
11
 
12
12
  <template>
13
13
  <USelectMenu
14
14
  :id="context.id"
15
15
  v-model="modelValue"
16
+ :name="context.node.name"
16
17
  v-bind="{ ...context?.attrs }"
17
18
  :class="styleClass"
18
19
  :disabled="!!context?.disabled"
@@ -57,7 +58,7 @@ const { handleInput, handleChange, isInvalid, styleClass, color, modelValue, ite
57
58
  :reset-model-value-on-clear="context.resetModelValueOnClear"
58
59
  :highlight-on-hover="context.highlightOnHover"
59
60
  :search-term="context.searchTerm"
60
- :ui="context.ui"
61
+ :ui="ui"
61
62
  @change="handleChange"
62
63
  @update:model-value="handleInput"
63
64
  >
@@ -58,6 +58,7 @@ export interface FormKitSelectMenuProps {
58
58
  resetModelValueOnClear?: boolean;
59
59
  highlightOnHover?: boolean;
60
60
  searchTerm?: string;
61
+ name?: string;
61
62
  ui?: Record<string, unknown>;
62
63
  }
63
64
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -6,7 +6,7 @@ const props = defineProps({
6
6
  required: true
7
7
  }
8
8
  });
9
- const { handleInput, handleChange, styleClass, color, modelValue } = useFormKitInput(props.context);
9
+ const { handleInput, handleChange, styleClass, color, modelValue, ui } = useFormKitInput(props.context);
10
10
  </script>
11
11
 
12
12
  <template>
@@ -23,13 +23,13 @@ const { handleInput, handleChange, styleClass, color, modelValue } = useFormKitI
23
23
  :orientation="context.orientation ?? 'horizontal'"
24
24
  :tooltip="context.tooltip"
25
25
  :default-value="context.defaultValue"
26
- :name="context.name"
26
+ :name="context.node.name"
27
27
  :inverted="context.inverted"
28
28
  :min="context.min"
29
29
  :max="context.max"
30
30
  :step="context.step"
31
31
  :min-steps-between-thumbs="context.minStepsBetweenThumbs"
32
- :ui="context.ui"
32
+ :ui="ui"
33
33
  @change="handleChange"
34
34
  @update:model-value="handleInput"
35
35
  />
@@ -13,6 +13,7 @@ export interface FormKitSwitchProps {
13
13
  trueValue?: unknown;
14
14
  falseValue?: unknown;
15
15
  autofocus?: false | true | 'true' | 'false';
16
+ name?: string;
16
17
  ui?: Record<string, unknown>;
17
18
  }
18
19
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -6,13 +6,14 @@ const props = defineProps({
6
6
  required: true
7
7
  }
8
8
  });
9
- const { handleInput, handleChange, handleBlur, styleClass, color, modelValue, validSlotNames } = useFormKitInput(props.context);
9
+ const { handleInput, handleChange, handleBlur, styleClass, color, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
10
10
  </script>
11
11
 
12
12
  <template>
13
13
  <USwitch
14
14
  :id="context.id"
15
15
  v-model="modelValue"
16
+ :name="context.node.name"
16
17
  v-bind="{ ...context?.attrs }"
17
18
  :class="styleClass"
18
19
  :disabled="!!context?.disabled"
@@ -29,7 +30,7 @@ const { handleInput, handleChange, handleBlur, styleClass, color, modelValue, va
29
30
  :true-value="context.trueValue"
30
31
  :false-value="context.falseValue"
31
32
  :autofocus="context.autofocus"
32
- :ui="context.ui"
33
+ :ui="ui"
33
34
  @change="handleChange"
34
35
  @update:model-value="handleInput"
35
36
  @blur="handleBlur"
@@ -13,6 +13,7 @@ export interface FormKitSwitchProps {
13
13
  trueValue?: unknown;
14
14
  falseValue?: unknown;
15
15
  autofocus?: false | true | 'true' | 'false';
16
+ name?: string;
16
17
  ui?: Record<string, unknown>;
17
18
  }
18
19
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -6,7 +6,7 @@ const props = defineProps({
6
6
  required: true
7
7
  }
8
8
  });
9
- const { handleInput, handleChange, handleBlur, styleClass, color, isInvalid, modelValue, validSlotNames } = useFormKitInput(props.context);
9
+ const { handleInput, handleChange, handleBlur, styleClass, color, isInvalid, modelValue, validSlotNames, ui } = useFormKitInput(props.context);
10
10
  </script>
11
11
 
12
12
  <template>
@@ -43,7 +43,7 @@ const { handleInput, handleChange, handleBlur, styleClass, color, isInvalid, mod
43
43
  :maxlength="context.maxlength"
44
44
  :minlength="context.minlength"
45
45
  :wrap="context.wrap"
46
- :ui="context.ui"
46
+ :ui="ui"
47
47
  @change="handleChange"
48
48
  @update:model-value="handleInput"
49
49
  @blur="handleBlur"
@@ -0,0 +1,36 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitTreeProps {
4
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
5
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
+ disabled?: boolean;
7
+ multiple?: boolean;
8
+ nested?: boolean;
9
+ virtualize?: boolean | {
10
+ overscan?: number;
11
+ estimateSize?: number | ((index: number) => number);
12
+ };
13
+ labelKey?: string;
14
+ trailingIcon?: string;
15
+ expandedIcon?: string;
16
+ collapsedIcon?: string;
17
+ expanded?: string[];
18
+ defaultExpanded?: string[];
19
+ selectionBehavior?: 'toggle' | 'replace';
20
+ propagateSelect?: boolean;
21
+ bubbleSelect?: boolean;
22
+ ui?: Record<string, unknown>;
23
+ }
24
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
25
+ context: {
26
+ type: PropType<FormKitFrameworkContext & FormKitTreeProps>;
27
+ required: true;
28
+ };
29
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ context: {
31
+ type: PropType<FormKitFrameworkContext & FormKitTreeProps>;
32
+ required: true;
33
+ };
34
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
@@ -0,0 +1,52 @@
1
+ <script setup>
2
+ import { useFormKitInput } from "../../utils/useFormKitInput";
3
+ import { createContainerBlurHandler } from "../../utils/useFormKitContainerBlur";
4
+ const props = defineProps({
5
+ context: {
6
+ type: Object,
7
+ required: true
8
+ }
9
+ });
10
+ const { handleInput, styleClass, color, modelValue, items, validSlotNames, ui } = useFormKitInput(props.context);
11
+ const handleContainerBlur = createContainerBlurHandler(props.context);
12
+ </script>
13
+
14
+ <template>
15
+ <UTree
16
+ :id="context.id"
17
+ v-model="modelValue"
18
+ v-bind="{ ...context?.attrs }"
19
+ :class="styleClass"
20
+ :style="context?.attrs.style"
21
+ :color="color"
22
+ :size="context.size ?? 'md'"
23
+ :items="items"
24
+ :disabled="!!context?.disabled"
25
+ :multiple="context.multiple"
26
+ :nested="context.nested ?? true"
27
+ :virtualize="context.virtualize"
28
+ :label-key="context.labelKey"
29
+ :trailing-icon="context.trailingIcon"
30
+ :expanded-icon="context.expandedIcon"
31
+ :collapsed-icon="context.collapsedIcon"
32
+ :expanded="context.expanded"
33
+ :default-expanded="context.defaultExpanded"
34
+ :selection-behavior="context.selectionBehavior"
35
+ :propagate-select="context.propagateSelect"
36
+ :bubble-select="context.bubbleSelect"
37
+ :ui="ui"
38
+ @update:model-value="handleInput"
39
+ @focusout="handleContainerBlur"
40
+ >
41
+ <template
42
+ v-for="slotName in validSlotNames"
43
+ :key="slotName"
44
+ #[slotName]="slotProps"
45
+ >
46
+ <component
47
+ :is="context?.slots[slotName]"
48
+ v-bind="{ ...context, ...slotProps }"
49
+ />
50
+ </template>
51
+ </UTree>
52
+ </template>
@@ -0,0 +1,36 @@
1
+ import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { PropType } from 'vue';
3
+ export interface FormKitTreeProps {
4
+ color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
5
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
+ disabled?: boolean;
7
+ multiple?: boolean;
8
+ nested?: boolean;
9
+ virtualize?: boolean | {
10
+ overscan?: number;
11
+ estimateSize?: number | ((index: number) => number);
12
+ };
13
+ labelKey?: string;
14
+ trailingIcon?: string;
15
+ expandedIcon?: string;
16
+ collapsedIcon?: string;
17
+ expanded?: string[];
18
+ defaultExpanded?: string[];
19
+ selectionBehavior?: 'toggle' | 'replace';
20
+ propagateSelect?: boolean;
21
+ bubbleSelect?: boolean;
22
+ ui?: Record<string, unknown>;
23
+ }
24
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
25
+ context: {
26
+ type: PropType<FormKitFrameworkContext & FormKitTreeProps>;
27
+ required: true;
28
+ };
29
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ context: {
31
+ type: PropType<FormKitFrameworkContext & FormKitTreeProps>;
32
+ required: true;
33
+ };
34
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
2
3
  import type { PropType } from 'vue';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputBooleanProps {
@@ -14,6 +15,7 @@ export interface FormKitOutputBooleanProps {
14
15
  trueIcon?: string;
15
16
  trueValue?: string;
16
17
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
18
+ ui?: FormKitOutputUi;
17
19
  }
18
20
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
21
  context: {
@@ -1,4 +1,5 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
2
3
  import type { PropType } from 'vue';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputBooleanProps {
@@ -14,6 +15,7 @@ export interface FormKitOutputBooleanProps {
14
15
  trueIcon?: string;
15
16
  trueValue?: string;
16
17
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
18
+ ui?: FormKitOutputUi;
17
19
  }
18
20
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
21
  context: {
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputDateProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -14,6 +15,7 @@ export interface FormKitOutputDateProps {
14
15
  trailing?: boolean;
15
16
  trailingIcon?: string;
16
17
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
18
+ ui?: FormKitOutputUi;
17
19
  }
18
20
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
21
  context: {
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputDateProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -14,6 +15,7 @@ export interface FormKitOutputDateProps {
14
15
  trailing?: boolean;
15
16
  trailingIcon?: string;
16
17
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
18
+ ui?: FormKitOutputUi;
17
19
  }
18
20
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
19
21
  context: {
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputLinkProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -12,6 +13,7 @@ export interface FormKitOutputLinkProps {
12
13
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
13
14
  target?: '_blank' | '_self' | '_parent' | '_top';
14
15
  rel?: string;
16
+ ui?: FormKitOutputUi;
15
17
  }
16
18
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
19
  context: {
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputLinkProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -12,6 +13,7 @@ export interface FormKitOutputLinkProps {
12
13
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
13
14
  target?: '_blank' | '_self' | '_parent' | '_top';
14
15
  rel?: string;
16
+ ui?: FormKitOutputUi;
15
17
  }
16
18
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
19
  context: {
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputListProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -13,6 +14,7 @@ export interface FormKitOutputListProps {
13
14
  trailing?: boolean;
14
15
  trailingIcon?: string;
15
16
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
17
+ ui?: FormKitOutputUi;
16
18
  }
17
19
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
20
  context: {
@@ -44,7 +44,7 @@ const badgeVariant = computed(() => {
44
44
  if (variant === "ghost" || variant === "none") return "soft";
45
45
  return variant;
46
46
  });
47
- const { containerClass, iconClass, leadingIconName, trailingIconName } = useFormKitOutput(props.context);
47
+ const { containerClass, iconClass, leadingIconName, trailingIconName, ui } = useFormKitOutput(props.context);
48
48
  </script>
49
49
 
50
50
  <template>
@@ -128,6 +128,7 @@ const { containerClass, iconClass, leadingIconName, trailingIconName } = useForm
128
128
  :variant="badgeVariant"
129
129
  :size="context.size"
130
130
  :class="itemClass"
131
+ :ui="ui?.badge"
131
132
  >
132
133
  {{ item }}
133
134
  </UBadge>
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputListProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -13,6 +14,7 @@ export interface FormKitOutputListProps {
13
14
  trailing?: boolean;
14
15
  trailingIcon?: string;
15
16
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
17
+ ui?: FormKitOutputUi;
16
18
  }
17
19
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
20
  context: {
@@ -1,5 +1,6 @@
1
1
  import type { FormKitFrameworkContext } from '@formkit/core';
2
2
  import type { PropType } from 'vue';
3
+ import type { FormKitOutputUi } from '../../utils/useFormKitOutput.js';
3
4
  import type { FormKitIconProps } from './FUIcon.vue.js';
4
5
  export interface FormKitOutputNumberProps {
5
6
  color?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
@@ -12,6 +13,7 @@ export interface FormKitOutputNumberProps {
12
13
  trailing?: boolean;
13
14
  trailingIcon?: string;
14
15
  variant?: 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
16
+ ui?: FormKitOutputUi;
15
17
  }
16
18
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
17
19
  context: {