@nuxt/ui 2.11.0 → 2.11.1
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/module.d.mts +196 -22
- package/dist/module.d.ts +196 -22
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -3
- package/dist/runtime/components/data/Table.vue +3 -3
- package/dist/runtime/components/data/Table.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Accordion.vue +2 -2
- package/dist/runtime/components/elements/Accordion.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Alert.vue +6 -6
- package/dist/runtime/components/elements/Alert.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Avatar.vue +2 -2
- package/dist/runtime/components/elements/Avatar.vue.d.ts +7 -7
- package/dist/runtime/components/elements/AvatarGroup.d.ts +7 -7
- package/dist/runtime/components/elements/AvatarGroup.mjs +2 -2
- package/dist/runtime/components/elements/Badge.vue +2 -2
- package/dist/runtime/components/elements/Badge.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Button.vue +8 -6
- package/dist/runtime/components/elements/Button.vue.d.ts +8 -7
- package/dist/runtime/components/elements/ButtonGroup.d.ts +7 -7
- package/dist/runtime/components/elements/ButtonGroup.mjs +3 -16
- package/dist/runtime/components/elements/Chip.vue +2 -2
- package/dist/runtime/components/elements/Chip.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Dropdown.vue +5 -5
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Kbd.vue +2 -2
- package/dist/runtime/components/elements/Kbd.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Meter.vue +2 -2
- package/dist/runtime/components/elements/Meter.vue.d.ts +7 -7
- package/dist/runtime/components/elements/MeterGroup.d.ts +9 -9
- package/dist/runtime/components/elements/MeterGroup.mjs +8 -21
- package/dist/runtime/components/elements/Progress.vue +5 -94
- package/dist/runtime/components/elements/Progress.vue.d.ts +123 -1
- package/dist/runtime/components/forms/Checkbox.vue +7 -7
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +8 -8
- package/dist/runtime/components/forms/Form.vue +1 -1
- package/dist/runtime/components/forms/FormGroup.vue +2 -2
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +7 -7
- package/dist/runtime/components/forms/Input.vue +7 -7
- package/dist/runtime/components/forms/Input.vue.d.ts +10 -10
- package/dist/runtime/components/forms/Radio.vue +7 -7
- package/dist/runtime/components/forms/Radio.vue.d.ts +7 -7
- package/dist/runtime/components/forms/RadioGroup.vue +4 -4
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +13 -13
- package/dist/runtime/components/forms/Range.vue +5 -5
- package/dist/runtime/components/forms/Range.vue.d.ts +8 -8
- package/dist/runtime/components/forms/Select.vue +7 -7
- package/dist/runtime/components/forms/Select.vue.d.ts +9 -9
- package/dist/runtime/components/forms/SelectMenu.vue +18 -18
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +13 -13
- package/dist/runtime/components/forms/Textarea.vue +3 -3
- package/dist/runtime/components/forms/Textarea.vue.d.ts +10 -10
- package/dist/runtime/components/forms/Toggle.vue +9 -9
- package/dist/runtime/components/forms/Toggle.vue.d.ts +14 -14
- package/dist/runtime/components/layout/Card.vue +2 -2
- package/dist/runtime/components/layout/Card.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Container.vue +2 -2
- package/dist/runtime/components/layout/Container.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Divider.vue +3 -8
- package/dist/runtime/components/layout/Divider.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Skeleton.vue +2 -2
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +7 -7
- package/dist/runtime/components/navigation/Breadcrumb.vue +2 -2
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +7 -7
- package/dist/runtime/components/navigation/CommandPalette.vue +42 -33
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +15 -8
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
- package/dist/runtime/components/navigation/Pagination.vue +7 -7
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +7 -7
- package/dist/runtime/components/navigation/Tabs.vue +8 -5
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +9 -9
- package/dist/runtime/components/navigation/VerticalNavigation.vue +2 -2
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/ContextMenu.vue +4 -3
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Modal.vue +3 -6
- package/dist/runtime/components/overlays/Modal.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Notification.vue +7 -7
- package/dist/runtime/components/overlays/Notification.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Notifications.vue +2 -2
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Popover.vue +5 -4
- package/dist/runtime/components/overlays/Popover.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Slideover.vue +6 -6
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Tooltip.vue +6 -5
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +7 -7
- package/dist/runtime/composables/useFormGroup.d.ts +3 -3
- package/dist/runtime/composables/useFormGroup.mjs +1 -1
- package/dist/runtime/composables/useUI.d.ts +3 -3
- package/dist/runtime/types/breadcrumb.d.ts +2 -0
- package/dist/runtime/types/form.d.ts +1 -1
- package/dist/runtime/types/popper.d.ts +2 -0
- package/dist/runtime/types/utils.d.ts +4 -4
- package/dist/runtime/ui.config/data/table.d.ts +2 -2
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -1
- package/dist/runtime/ui.config/elements/alert.d.ts +5 -4
- package/dist/runtime/ui.config/elements/alert.mjs +1 -0
- package/dist/runtime/ui.config/elements/button.d.ts +4 -0
- package/dist/runtime/ui.config/elements/button.mjs +4 -0
- package/dist/runtime/ui.config/elements/buttonGroup.d.ts +92 -0
- package/dist/runtime/ui.config/elements/buttonGroup.mjs +12 -1
- package/dist/runtime/ui.config/elements/dropdown.d.ts +3 -1
- package/dist/runtime/ui.config/elements/dropdown.mjs +4 -2
- package/dist/runtime/ui.config/elements/meterGroup.d.ts +40 -0
- package/dist/runtime/ui.config/elements/meterGroup.mjs +14 -1
- package/dist/runtime/ui.config/forms/checkbox.d.ts +3 -0
- package/dist/runtime/ui.config/forms/checkbox.mjs +3 -0
- package/dist/runtime/ui.config/forms/input.d.ts +2 -0
- package/dist/runtime/ui.config/forms/input.mjs +2 -0
- package/dist/runtime/ui.config/forms/radio.d.ts +3 -0
- package/dist/runtime/ui.config/forms/radio.mjs +3 -0
- package/dist/runtime/ui.config/forms/select.d.ts +2 -0
- package/dist/runtime/ui.config/forms/select.mjs +1 -0
- package/dist/runtime/ui.config/forms/selectMenu.d.ts +6 -1
- package/dist/runtime/ui.config/forms/selectMenu.mjs +7 -2
- package/dist/runtime/ui.config/forms/textarea.d.ts +2 -0
- package/dist/runtime/ui.config/forms/textarea.mjs +1 -0
- package/dist/runtime/ui.config/layout/divider.d.ts +6 -1
- package/dist/runtime/ui.config/layout/divider.mjs +5 -0
- package/dist/runtime/ui.config/navigation/breadcrumb.mjs +1 -1
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +5 -1
- package/dist/runtime/ui.config/navigation/commandPalette.mjs +5 -1
- package/dist/runtime/ui.config/navigation/pagination.d.ts +6 -6
- package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +1 -1
- package/dist/runtime/ui.config/overlays/contextMenu.mjs +1 -1
- package/dist/runtime/ui.config/overlays/modal.d.ts +1 -0
- package/dist/runtime/ui.config/overlays/modal.mjs +3 -2
- package/dist/runtime/ui.config/overlays/notification.d.ts +5 -4
- package/dist/runtime/ui.config/overlays/notification.mjs +1 -0
- package/dist/runtime/ui.config/overlays/popover.d.ts +1 -0
- package/dist/runtime/ui.config/overlays/popover.mjs +2 -1
- package/dist/runtime/ui.config/overlays/slideover.d.ts +5 -0
- package/dist/runtime/ui.config/overlays/slideover.mjs +5 -0
- package/dist/runtime/ui.config/overlays/tooltip.d.ts +1 -0
- package/dist/runtime/ui.config/overlays/tooltip.mjs +2 -1
- package/dist/runtime/ui.config/{_popperArrow.d.ts → popper.d.ts} +1 -2
- package/dist/runtime/ui.config/{_popperArrow.mjs → popper.mjs} +2 -2
- package/dist/runtime/ui.css +1 -13
- package/dist/runtime/utils/index.mjs +1 -1
- package/package.json +12 -14
|
@@ -43,11 +43,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
};
|
|
44
44
|
class: {
|
|
45
45
|
type: PropType<any>;
|
|
46
|
-
default:
|
|
46
|
+
default: () => "";
|
|
47
47
|
};
|
|
48
48
|
ui: {
|
|
49
|
-
type: PropType<
|
|
50
|
-
default:
|
|
49
|
+
type: PropType<any>;
|
|
50
|
+
default: () => {};
|
|
51
51
|
};
|
|
52
52
|
}, {
|
|
53
53
|
inputId: import("vue").Ref<string>;
|
|
@@ -102,17 +102,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
102
102
|
};
|
|
103
103
|
class: {
|
|
104
104
|
type: PropType<any>;
|
|
105
|
-
default:
|
|
105
|
+
default: () => "";
|
|
106
106
|
};
|
|
107
107
|
ui: {
|
|
108
|
-
type: PropType<
|
|
109
|
-
default:
|
|
108
|
+
type: PropType<any>;
|
|
109
|
+
default: () => {};
|
|
110
110
|
};
|
|
111
111
|
}>> & {
|
|
112
112
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
113
113
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
114
114
|
}, {
|
|
115
|
-
ui:
|
|
115
|
+
ui: any;
|
|
116
116
|
value: string | number | boolean;
|
|
117
117
|
id: string;
|
|
118
118
|
color: any;
|
|
@@ -77,22 +77,22 @@ export default defineComponent({
|
|
|
77
77
|
},
|
|
78
78
|
class: {
|
|
79
79
|
type: [String, Object, Array],
|
|
80
|
-
default:
|
|
80
|
+
default: () => ""
|
|
81
81
|
},
|
|
82
82
|
ui: {
|
|
83
83
|
type: Object,
|
|
84
|
-
default:
|
|
84
|
+
default: () => ({})
|
|
85
85
|
},
|
|
86
86
|
uiRadio: {
|
|
87
87
|
type: Object,
|
|
88
|
-
default:
|
|
88
|
+
default: () => ({})
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
emits: ["update:modelValue", "change"],
|
|
92
92
|
setup(props, { emit }) {
|
|
93
93
|
const { ui, attrs } = useUI("radioGroup", toRef(props, "ui"), config, toRef(props, "class"));
|
|
94
94
|
const { ui: uiRadio } = useUI("radio", toRef(props, "uiRadio"), configRadio);
|
|
95
|
-
const { emitFormChange, color, name } = useFormGroup(
|
|
95
|
+
const { emitFormChange, color, name } = useFormGroup(props, config);
|
|
96
96
|
provide("radio-group", { color, name });
|
|
97
97
|
const onUpdate = (value) => {
|
|
98
98
|
emit("update:modelValue", value);
|
|
@@ -35,15 +35,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
};
|
|
36
36
|
class: {
|
|
37
37
|
type: PropType<any>;
|
|
38
|
-
default:
|
|
38
|
+
default: () => "";
|
|
39
39
|
};
|
|
40
40
|
ui: {
|
|
41
|
-
type: PropType<
|
|
42
|
-
default:
|
|
41
|
+
type: PropType<any>;
|
|
42
|
+
default: () => {};
|
|
43
43
|
};
|
|
44
44
|
uiRadio: {
|
|
45
|
-
type: PropType<
|
|
46
|
-
default:
|
|
45
|
+
type: PropType<any>;
|
|
46
|
+
default: () => {};
|
|
47
47
|
};
|
|
48
48
|
}, {
|
|
49
49
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -89,30 +89,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
89
|
};
|
|
90
90
|
class: {
|
|
91
91
|
type: PropType<any>;
|
|
92
|
-
default:
|
|
92
|
+
default: () => "";
|
|
93
93
|
};
|
|
94
94
|
ui: {
|
|
95
|
-
type: PropType<
|
|
96
|
-
default:
|
|
95
|
+
type: PropType<any>;
|
|
96
|
+
default: () => {};
|
|
97
97
|
};
|
|
98
98
|
uiRadio: {
|
|
99
|
-
type: PropType<
|
|
100
|
-
default:
|
|
99
|
+
type: PropType<any>;
|
|
100
|
+
default: () => {};
|
|
101
101
|
};
|
|
102
102
|
}>> & {
|
|
103
103
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
104
104
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
105
105
|
}, {
|
|
106
|
-
ui:
|
|
106
|
+
ui: any;
|
|
107
107
|
color: any;
|
|
108
|
+
legend: string;
|
|
108
109
|
options: unknown[];
|
|
109
110
|
name: string;
|
|
110
111
|
class: any;
|
|
111
|
-
legend: string;
|
|
112
112
|
modelValue: string | number | Record<string, any>;
|
|
113
113
|
disabled: boolean;
|
|
114
114
|
optionAttribute: string;
|
|
115
115
|
valueAttribute: string;
|
|
116
|
-
uiRadio:
|
|
116
|
+
uiRadio: any;
|
|
117
117
|
}, {}>;
|
|
118
118
|
export default _default;
|
|
@@ -79,11 +79,11 @@ export default defineComponent({
|
|
|
79
79
|
},
|
|
80
80
|
class: {
|
|
81
81
|
type: [String, Object, Array],
|
|
82
|
-
default:
|
|
82
|
+
default: () => ""
|
|
83
83
|
},
|
|
84
84
|
ui: {
|
|
85
85
|
type: Object,
|
|
86
|
-
default:
|
|
86
|
+
default: () => ({})
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
emits: ["update:modelValue", "change"],
|
|
@@ -113,7 +113,7 @@ export default defineComponent({
|
|
|
113
113
|
ui.value.base,
|
|
114
114
|
ui.value.background,
|
|
115
115
|
ui.value.rounded,
|
|
116
|
-
ui.value.ring.replaceAll("{color}", color.value),
|
|
116
|
+
color.value && ui.value.ring.replaceAll("{color}", color.value),
|
|
117
117
|
ui.value.size[size.value]
|
|
118
118
|
), props.inputClass);
|
|
119
119
|
});
|
|
@@ -121,7 +121,7 @@ export default defineComponent({
|
|
|
121
121
|
return twJoin(
|
|
122
122
|
ui.value.thumb.base,
|
|
123
123
|
// Intermediate class to allow thumb ring or background color (set to `current`) as it's impossible to safelist with arbitrary values
|
|
124
|
-
ui.value.thumb.color.replaceAll("{color}", color.value),
|
|
124
|
+
color.value && ui.value.thumb.color.replaceAll("{color}", color.value),
|
|
125
125
|
ui.value.thumb.ring,
|
|
126
126
|
ui.value.thumb.background,
|
|
127
127
|
ui.value.thumb.size[size.value]
|
|
@@ -139,7 +139,7 @@ export default defineComponent({
|
|
|
139
139
|
return twJoin(
|
|
140
140
|
ui.value.progress.base,
|
|
141
141
|
ui.value.progress.rounded,
|
|
142
|
-
ui.value.progress.background.replaceAll("{color}", color.value),
|
|
142
|
+
color.value && ui.value.progress.background.replaceAll("{color}", color.value),
|
|
143
143
|
ui.value.progress.size[size.value]
|
|
144
144
|
);
|
|
145
145
|
});
|
|
@@ -45,11 +45,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
};
|
|
46
46
|
class: {
|
|
47
47
|
type: PropType<any>;
|
|
48
|
-
default:
|
|
48
|
+
default: () => "";
|
|
49
49
|
};
|
|
50
50
|
ui: {
|
|
51
|
-
type: PropType<
|
|
52
|
-
default:
|
|
51
|
+
type: PropType<any>;
|
|
52
|
+
default: () => {};
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -57,7 +57,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
57
|
[x: string]: unknown;
|
|
58
58
|
}, string>>;
|
|
59
59
|
name: import("vue").ComputedRef<string | undefined>;
|
|
60
|
-
inputId: import("vue").Ref<string |
|
|
60
|
+
inputId: import("vue").Ref<string | undefined>;
|
|
61
61
|
value: import("vue").WritableComputedRef<number>;
|
|
62
62
|
wrapperClass: import("vue").ComputedRef<string>;
|
|
63
63
|
inputClass: import("vue").ComputedRef<string>;
|
|
@@ -113,18 +113,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
113
113
|
};
|
|
114
114
|
class: {
|
|
115
115
|
type: PropType<any>;
|
|
116
|
-
default:
|
|
116
|
+
default: () => "";
|
|
117
117
|
};
|
|
118
118
|
ui: {
|
|
119
|
-
type: PropType<
|
|
120
|
-
default:
|
|
119
|
+
type: PropType<any>;
|
|
120
|
+
default: () => {};
|
|
121
121
|
};
|
|
122
122
|
}>> & {
|
|
123
123
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
124
124
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
125
125
|
}, {
|
|
126
126
|
size: RangeSize;
|
|
127
|
-
ui:
|
|
127
|
+
ui: any;
|
|
128
128
|
id: string;
|
|
129
129
|
color: any;
|
|
130
130
|
name: string;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
:value="modelValue"
|
|
7
7
|
:required="required"
|
|
8
8
|
:disabled="disabled || loading"
|
|
9
|
-
class="form-select"
|
|
10
9
|
:class="selectClass"
|
|
11
10
|
v-bind="attrs"
|
|
12
11
|
@input="onInput"
|
|
@@ -168,11 +167,11 @@ export default defineComponent({
|
|
|
168
167
|
},
|
|
169
168
|
class: {
|
|
170
169
|
type: [String, Object, Array],
|
|
171
|
-
default:
|
|
170
|
+
default: () => ""
|
|
172
171
|
},
|
|
173
172
|
ui: {
|
|
174
173
|
type: Object,
|
|
175
|
-
default:
|
|
174
|
+
default: () => ({})
|
|
176
175
|
}
|
|
177
176
|
},
|
|
178
177
|
emits: ["update:modelValue", "change"],
|
|
@@ -235,6 +234,7 @@ export default defineComponent({
|
|
|
235
234
|
const variant = ui.value.color?.[color.value]?.[props.variant] || ui.value.variant[props.variant];
|
|
236
235
|
return twMerge(twJoin(
|
|
237
236
|
ui.value.base,
|
|
237
|
+
ui.value.form,
|
|
238
238
|
rounded.value,
|
|
239
239
|
ui.value.size[size.value],
|
|
240
240
|
props.padded ? ui.value.padding[size.value] : "p-0",
|
|
@@ -271,9 +271,9 @@ export default defineComponent({
|
|
|
271
271
|
const leadingIconClass = computed(() => {
|
|
272
272
|
return twJoin(
|
|
273
273
|
ui.value.icon.base,
|
|
274
|
-
appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
274
|
+
color.value && appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
275
275
|
ui.value.icon.size[size.value],
|
|
276
|
-
props.loading &&
|
|
276
|
+
props.loading && ui.value.icon.loading
|
|
277
277
|
);
|
|
278
278
|
});
|
|
279
279
|
const trailingWrapperIconClass = computed(() => {
|
|
@@ -286,9 +286,9 @@ export default defineComponent({
|
|
|
286
286
|
const trailingIconClass = computed(() => {
|
|
287
287
|
return twJoin(
|
|
288
288
|
ui.value.icon.base,
|
|
289
|
-
appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
289
|
+
color.value && appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
290
290
|
ui.value.icon.size[size.value],
|
|
291
|
-
props.loading && !isLeading.value &&
|
|
291
|
+
props.loading && !isLeading.value && ui.value.icon.loading
|
|
292
292
|
);
|
|
293
293
|
});
|
|
294
294
|
return {
|
|
@@ -90,11 +90,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
90
|
};
|
|
91
91
|
class: {
|
|
92
92
|
type: PropType<any>;
|
|
93
|
-
default:
|
|
93
|
+
default: () => "";
|
|
94
94
|
};
|
|
95
95
|
ui: {
|
|
96
|
-
type: PropType<
|
|
97
|
-
default:
|
|
96
|
+
type: PropType<any>;
|
|
97
|
+
default: () => {};
|
|
98
98
|
};
|
|
99
99
|
}, {
|
|
100
100
|
ui: ComputedRef<any>;
|
|
@@ -102,7 +102,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
102
102
|
[x: string]: unknown;
|
|
103
103
|
}, string>>;
|
|
104
104
|
name: ComputedRef<string | undefined>;
|
|
105
|
-
inputId: import("vue").Ref<string |
|
|
105
|
+
inputId: import("vue").Ref<string | undefined>;
|
|
106
106
|
normalizedOptionsWithPlaceholder: ComputedRef<{
|
|
107
107
|
disabled?: boolean | undefined;
|
|
108
108
|
children: {
|
|
@@ -119,7 +119,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
119
119
|
trailingIconName: ComputedRef<string | undefined>;
|
|
120
120
|
trailingIconClass: ComputedRef<string>;
|
|
121
121
|
trailingWrapperIconClass: ComputedRef<string>;
|
|
122
|
-
onInput: (event:
|
|
122
|
+
onInput: (event: Event) => void;
|
|
123
123
|
onChange: (event: Event) => void;
|
|
124
124
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
125
125
|
modelValue: {
|
|
@@ -211,18 +211,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
211
211
|
};
|
|
212
212
|
class: {
|
|
213
213
|
type: PropType<any>;
|
|
214
|
-
default:
|
|
214
|
+
default: () => "";
|
|
215
215
|
};
|
|
216
216
|
ui: {
|
|
217
|
-
type: PropType<
|
|
218
|
-
default:
|
|
217
|
+
type: PropType<any>;
|
|
218
|
+
default: () => {};
|
|
219
219
|
};
|
|
220
220
|
}>> & {
|
|
221
221
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
222
222
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
223
223
|
}, {
|
|
224
224
|
size: SelectSize;
|
|
225
|
-
ui:
|
|
225
|
+
ui: any;
|
|
226
226
|
id: string;
|
|
227
227
|
icon: string;
|
|
228
228
|
color: any;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
v-if="required"
|
|
16
16
|
:value="modelValue"
|
|
17
17
|
:required="required"
|
|
18
|
-
class="
|
|
18
|
+
:class="uiMenu.required"
|
|
19
19
|
tabindex="-1"
|
|
20
20
|
aria-hidden="true"
|
|
21
21
|
>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
ref="trigger"
|
|
26
26
|
as="div"
|
|
27
27
|
role="button"
|
|
28
|
-
class="
|
|
28
|
+
:class="uiMenu.trigger"
|
|
29
29
|
>
|
|
30
30
|
<slot :open="open" :disabled="disabled" :loading="loading">
|
|
31
31
|
<button :id="inputId" :class="selectClass" :disabled="disabled || loading" type="button" v-bind="attrs">
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
</span>
|
|
37
37
|
|
|
38
38
|
<slot name="label">
|
|
39
|
-
<span v-if="multiple && Array.isArray(modelValue) && modelValue.length" class="
|
|
40
|
-
<span v-else-if="!multiple && modelValue" class="
|
|
41
|
-
<span v-else
|
|
39
|
+
<span v-if="multiple && Array.isArray(modelValue) && modelValue.length" :class="uiMenu.label">{{ modelValue.length }} selected</span>
|
|
40
|
+
<span v-else-if="!multiple && modelValue" :class="uiMenu.label">{{ ['string', 'number'].includes(typeof modelValue) ? modelValue : modelValue[optionAttribute] }}</span>
|
|
41
|
+
<span v-else :class="uiMenu.label">{{ placeholder || ' ' }}</span>
|
|
42
42
|
</slot>
|
|
43
43
|
|
|
44
44
|
<span v-if="(isTrailing && trailingIconName) || $slots.trailing" :class="trailingWrapperIconClass">
|
|
@@ -53,8 +53,9 @@
|
|
|
53
53
|
<div v-if="open" ref="container" :class="[uiMenu.container, uiMenu.width]">
|
|
54
54
|
<Transition appear v-bind="uiMenu.transition">
|
|
55
55
|
<div>
|
|
56
|
-
<div v-if="popper.arrow" data-popper-arrow :class="
|
|
57
|
-
|
|
56
|
+
<div v-if="popper.arrow" data-popper-arrow :class="Object.values(uiMenu.arrow)" />
|
|
57
|
+
|
|
58
|
+
<component :is="searchable ? 'HComboboxOptions' : 'HListboxOptions'" static :class="[uiMenu.base, uiMenu.ring, uiMenu.rounded, uiMenu.shadow, uiMenu.background, uiMenu.padding, uiMenu.height]">
|
|
58
59
|
<HComboboxInput
|
|
59
60
|
v-if="searchable"
|
|
60
61
|
ref="searchInput"
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
<li :class="[uiMenu.option.base, uiMenu.option.rounded, uiMenu.option.padding, uiMenu.option.size, uiMenu.option.color, active ? uiMenu.option.active : uiMenu.option.inactive]">
|
|
102
103
|
<div :class="uiMenu.option.container">
|
|
103
104
|
<slot name="option-create" :option="queryOption" :active="active" :selected="selected">
|
|
104
|
-
<span class="
|
|
105
|
+
<span :class="uiMenu.option.create">Create "{{ queryOption[optionAttribute] }}"</span>
|
|
105
106
|
</slot>
|
|
106
107
|
</div>
|
|
107
108
|
</li>
|
|
@@ -299,15 +300,15 @@ export default defineComponent({
|
|
|
299
300
|
},
|
|
300
301
|
class: {
|
|
301
302
|
type: [String, Object, Array],
|
|
302
|
-
default:
|
|
303
|
+
default: () => ""
|
|
303
304
|
},
|
|
304
305
|
ui: {
|
|
305
306
|
type: Object,
|
|
306
|
-
default:
|
|
307
|
+
default: () => ({})
|
|
307
308
|
},
|
|
308
309
|
uiMenu: {
|
|
309
310
|
type: Object,
|
|
310
|
-
default:
|
|
311
|
+
default: () => ({})
|
|
311
312
|
}
|
|
312
313
|
},
|
|
313
314
|
emits: ["update:modelValue", "open", "close", "change"],
|
|
@@ -325,15 +326,14 @@ export default defineComponent({
|
|
|
325
326
|
const variant = ui.value.color?.[color.value]?.[props.variant] || ui.value.variant[props.variant];
|
|
326
327
|
return twMerge(twJoin(
|
|
327
328
|
ui.value.base,
|
|
329
|
+
uiMenu.value.select,
|
|
328
330
|
rounded.value,
|
|
329
|
-
"text-left cursor-default",
|
|
330
331
|
ui.value.size[size.value],
|
|
331
332
|
ui.value.gap[size.value],
|
|
332
333
|
props.padded ? ui.value.padding[size.value] : "p-0",
|
|
333
334
|
variant?.replaceAll("{color}", color.value),
|
|
334
335
|
(isLeading.value || slots.leading) && ui.value.leading.padding[size.value],
|
|
335
|
-
(isTrailing.value || slots.trailing) && ui.value.trailing.padding[size.value]
|
|
336
|
-
"inline-flex items-center"
|
|
336
|
+
(isTrailing.value || slots.trailing) && ui.value.trailing.padding[size.value]
|
|
337
337
|
), props.selectClass);
|
|
338
338
|
});
|
|
339
339
|
const isLeading = computed(() => {
|
|
@@ -364,9 +364,9 @@ export default defineComponent({
|
|
|
364
364
|
const leadingIconClass = computed(() => {
|
|
365
365
|
return twJoin(
|
|
366
366
|
ui.value.icon.base,
|
|
367
|
-
appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
367
|
+
color.value && appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
368
368
|
ui.value.icon.size[size.value],
|
|
369
|
-
props.loading &&
|
|
369
|
+
props.loading && ui.value.icon.loading
|
|
370
370
|
);
|
|
371
371
|
});
|
|
372
372
|
const trailingWrapperIconClass = computed(() => {
|
|
@@ -379,9 +379,9 @@ export default defineComponent({
|
|
|
379
379
|
const trailingIconClass = computed(() => {
|
|
380
380
|
return twJoin(
|
|
381
381
|
ui.value.icon.base,
|
|
382
|
-
appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
382
|
+
color.value && appConfig.ui.colors.includes(color.value) && ui.value.icon.color.replaceAll("{color}", color.value),
|
|
383
383
|
ui.value.icon.size[size.value],
|
|
384
|
-
props.loading && !isLeading.value &&
|
|
384
|
+
props.loading && !isLeading.value && ui.value.icon.loading
|
|
385
385
|
);
|
|
386
386
|
});
|
|
387
387
|
const debouncedSearch = typeof props.searchable === "function" ? useDebounceFn(props.searchable, props.debounce) : void 0;
|
|
@@ -133,15 +133,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
133
|
};
|
|
134
134
|
class: {
|
|
135
135
|
type: PropType<any>;
|
|
136
|
-
default:
|
|
136
|
+
default: () => "";
|
|
137
137
|
};
|
|
138
138
|
ui: {
|
|
139
|
-
type: PropType<
|
|
140
|
-
default:
|
|
139
|
+
type: PropType<any>;
|
|
140
|
+
default: () => {};
|
|
141
141
|
};
|
|
142
142
|
uiMenu: {
|
|
143
|
-
type: PropType<
|
|
144
|
-
default:
|
|
143
|
+
type: PropType<any>;
|
|
144
|
+
default: () => {};
|
|
145
145
|
};
|
|
146
146
|
}, {
|
|
147
147
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -150,7 +150,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
150
|
[x: string]: unknown;
|
|
151
151
|
}, string>>;
|
|
152
152
|
name: import("vue").ComputedRef<string | undefined>;
|
|
153
|
-
inputId: import("vue").Ref<string |
|
|
153
|
+
inputId: import("vue").Ref<string | undefined>;
|
|
154
154
|
popper: import("vue").ComputedRef<PopperOptions>;
|
|
155
155
|
trigger: import("vue").Ref<import("@vueuse/core").MaybeElement>;
|
|
156
156
|
container: import("vue").Ref<import("@vueuse/core").MaybeElement>;
|
|
@@ -302,15 +302,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
302
302
|
};
|
|
303
303
|
class: {
|
|
304
304
|
type: PropType<any>;
|
|
305
|
-
default:
|
|
305
|
+
default: () => "";
|
|
306
306
|
};
|
|
307
307
|
ui: {
|
|
308
|
-
type: PropType<
|
|
309
|
-
default:
|
|
308
|
+
type: PropType<any>;
|
|
309
|
+
default: () => {};
|
|
310
310
|
};
|
|
311
311
|
uiMenu: {
|
|
312
|
-
type: PropType<
|
|
313
|
-
default:
|
|
312
|
+
type: PropType<any>;
|
|
313
|
+
default: () => {};
|
|
314
314
|
};
|
|
315
315
|
}>> & {
|
|
316
316
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -319,7 +319,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
319
319
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
320
320
|
}, {
|
|
321
321
|
size: SelectSize;
|
|
322
|
-
ui:
|
|
322
|
+
ui: any;
|
|
323
323
|
id: string;
|
|
324
324
|
icon: string;
|
|
325
325
|
color: any;
|
|
@@ -354,6 +354,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
354
354
|
debounce: number;
|
|
355
355
|
creatable: boolean;
|
|
356
356
|
searchAttributes: unknown[];
|
|
357
|
-
uiMenu:
|
|
357
|
+
uiMenu: any;
|
|
358
358
|
}, {}>;
|
|
359
359
|
export default _default;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
:required="required"
|
|
10
10
|
:disabled="disabled"
|
|
11
11
|
:placeholder="placeholder"
|
|
12
|
-
class="form-textarea"
|
|
13
12
|
:class="textareaClass"
|
|
14
13
|
v-bind="attrs"
|
|
15
14
|
@input="onInput"
|
|
@@ -112,11 +111,11 @@ export default defineComponent({
|
|
|
112
111
|
},
|
|
113
112
|
class: {
|
|
114
113
|
type: [String, Object, Array],
|
|
115
|
-
default:
|
|
114
|
+
default: () => ""
|
|
116
115
|
},
|
|
117
116
|
ui: {
|
|
118
117
|
type: Object,
|
|
119
|
-
default:
|
|
118
|
+
default: () => ({})
|
|
120
119
|
},
|
|
121
120
|
modelModifiers: {
|
|
122
121
|
type: Object,
|
|
@@ -199,6 +198,7 @@ export default defineComponent({
|
|
|
199
198
|
const variant = ui.value.color?.[color.value]?.[props.variant] || ui.value.variant[props.variant];
|
|
200
199
|
return twMerge(twJoin(
|
|
201
200
|
ui.value.base,
|
|
201
|
+
ui.value.form,
|
|
202
202
|
ui.value.rounded,
|
|
203
203
|
ui.value.placeholder,
|
|
204
204
|
ui.value.size[size.value],
|
|
@@ -70,11 +70,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
70
70
|
};
|
|
71
71
|
class: {
|
|
72
72
|
type: PropType<any>;
|
|
73
|
-
default:
|
|
73
|
+
default: () => "";
|
|
74
74
|
};
|
|
75
75
|
ui: {
|
|
76
|
-
type: PropType<
|
|
77
|
-
default:
|
|
76
|
+
type: PropType<any>;
|
|
77
|
+
default: () => {};
|
|
78
78
|
};
|
|
79
79
|
modelModifiers: {
|
|
80
80
|
type: PropType<{
|
|
@@ -90,11 +90,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
90
|
[x: string]: unknown;
|
|
91
91
|
}, string>>;
|
|
92
92
|
name: import("vue").ComputedRef<string | undefined>;
|
|
93
|
-
inputId: import("vue").Ref<string |
|
|
93
|
+
inputId: import("vue").Ref<string | undefined>;
|
|
94
94
|
textarea: import("vue").Ref<HTMLTextAreaElement | null>;
|
|
95
95
|
textareaClass: import("vue").ComputedRef<string>;
|
|
96
|
-
onInput: (event:
|
|
97
|
-
onChange: (event:
|
|
96
|
+
onInput: (event: Event) => void;
|
|
97
|
+
onChange: (event: Event) => void;
|
|
98
98
|
onBlur: (event: FocusEvent) => void;
|
|
99
99
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
100
|
modelValue: {
|
|
@@ -166,11 +166,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
166
166
|
};
|
|
167
167
|
class: {
|
|
168
168
|
type: PropType<any>;
|
|
169
|
-
default:
|
|
169
|
+
default: () => "";
|
|
170
170
|
};
|
|
171
171
|
ui: {
|
|
172
|
-
type: PropType<
|
|
173
|
-
default:
|
|
172
|
+
type: PropType<any>;
|
|
173
|
+
default: () => {};
|
|
174
174
|
};
|
|
175
175
|
modelModifiers: {
|
|
176
176
|
type: PropType<{
|
|
@@ -186,7 +186,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
186
186
|
}, {
|
|
187
187
|
resize: boolean;
|
|
188
188
|
size: TextareaSize;
|
|
189
|
-
ui:
|
|
189
|
+
ui: any;
|
|
190
190
|
id: string;
|
|
191
191
|
color: any;
|
|
192
192
|
name: string;
|
|
@@ -67,10 +67,6 @@ export default defineComponent({
|
|
|
67
67
|
return appConfig.ui.colors.includes(value);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
class: {
|
|
71
|
-
type: [String, Object, Array],
|
|
72
|
-
default: void 0
|
|
73
|
-
},
|
|
74
70
|
size: {
|
|
75
71
|
type: String,
|
|
76
72
|
default: config.default.size,
|
|
@@ -78,9 +74,13 @@ export default defineComponent({
|
|
|
78
74
|
return Object.keys(config.size).includes(value);
|
|
79
75
|
}
|
|
80
76
|
},
|
|
77
|
+
class: {
|
|
78
|
+
type: [String, Object, Array],
|
|
79
|
+
default: () => ""
|
|
80
|
+
},
|
|
81
81
|
ui: {
|
|
82
82
|
type: Object,
|
|
83
|
-
default:
|
|
83
|
+
default: () => ({})
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
@@ -101,8 +101,8 @@ export default defineComponent({
|
|
|
101
101
|
ui.value.base,
|
|
102
102
|
ui.value.size[props.size],
|
|
103
103
|
ui.value.rounded,
|
|
104
|
-
ui.value.ring.replaceAll("{color}", color.value),
|
|
105
|
-
(active.value ? ui.value.active : ui.value.inactive).replaceAll("{color}", color.value)
|
|
104
|
+
color.value && ui.value.ring.replaceAll("{color}", color.value),
|
|
105
|
+
color.value && (active.value ? ui.value.active : ui.value.inactive).replaceAll("{color}", color.value)
|
|
106
106
|
), props.class);
|
|
107
107
|
});
|
|
108
108
|
const containerClass = computed(() => {
|
|
@@ -115,13 +115,13 @@ export default defineComponent({
|
|
|
115
115
|
const onIconClass = computed(() => {
|
|
116
116
|
return twJoin(
|
|
117
117
|
ui.value.icon.size[props.size],
|
|
118
|
-
ui.value.icon.on.replaceAll("{color}", color.value)
|
|
118
|
+
color.value && ui.value.icon.on.replaceAll("{color}", color.value)
|
|
119
119
|
);
|
|
120
120
|
});
|
|
121
121
|
const offIconClass = computed(() => {
|
|
122
122
|
return twJoin(
|
|
123
123
|
ui.value.icon.size[props.size],
|
|
124
|
-
ui.value.icon.off.replaceAll("{color}", color.value)
|
|
124
|
+
color.value && ui.value.icon.off.replaceAll("{color}", color.value)
|
|
125
125
|
);
|
|
126
126
|
});
|
|
127
127
|
return {
|