@nuxt/ui 2.13.0 → 2.14.0
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/README.md +8 -8
- package/dist/module.d.mts +61 -2
- package/dist/module.d.ts +61 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +131 -144
- package/dist/runtime/components/data/Table.vue +16 -4
- package/dist/runtime/components/data/Table.vue.d.ts +21 -3
- package/dist/runtime/components/elements/Accordion.vue +11 -2
- package/dist/runtime/components/elements/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Alert.vue +2 -2
- package/dist/runtime/components/elements/Alert.vue.d.ts +4 -3
- package/dist/runtime/components/elements/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/elements/AvatarGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Badge.vue.d.ts +2 -2
- package/dist/runtime/components/elements/Button.vue.d.ts +63 -37
- package/dist/runtime/components/elements/ButtonGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Carousel.vue +19 -12
- package/dist/runtime/components/elements/Carousel.vue.d.ts +4 -4
- package/dist/runtime/components/elements/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/elements/Dropdown.vue +3 -1
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +3 -3
- package/dist/runtime/components/elements/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Link.vue +1 -1
- package/dist/runtime/components/elements/Link.vue.d.ts +62 -36
- package/dist/runtime/components/elements/Meter.vue +4 -0
- package/dist/runtime/components/elements/Meter.vue.d.ts +1 -1
- package/dist/runtime/components/elements/MeterGroup.d.ts +1 -1
- package/dist/runtime/components/elements/Progress.vue +4 -1
- package/dist/runtime/components/elements/Progress.vue.d.ts +5 -5
- package/dist/runtime/components/forms/Checkbox.vue +1 -6
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +6 -15
- package/dist/runtime/components/forms/Form.vue +6 -3
- package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
- package/dist/runtime/components/forms/FormGroup.vue +20 -17
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
- package/dist/runtime/components/forms/Input.vue +1 -0
- package/dist/runtime/components/forms/Input.vue.d.ts +6 -6
- package/dist/runtime/components/forms/InputMenu.vue +4 -1
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +7 -7
- package/dist/runtime/components/forms/Radio.vue +5 -11
- package/dist/runtime/components/forms/Radio.vue.d.ts +6 -6
- package/dist/runtime/components/forms/RadioGroup.vue +1 -0
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +4 -4
- package/dist/runtime/components/forms/Range.vue.d.ts +4 -4
- package/dist/runtime/components/forms/Select.vue.d.ts +6 -6
- package/dist/runtime/components/forms/SelectMenu.vue +4 -1
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +7 -7
- package/dist/runtime/components/forms/Textarea.vue +5 -1
- package/dist/runtime/components/forms/Textarea.vue.d.ts +15 -6
- package/dist/runtime/components/forms/Toggle.vue +3 -1
- package/dist/runtime/components/forms/Toggle.vue.d.ts +4 -4
- package/dist/runtime/components/layout/Card.vue +1 -1
- package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
- package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
- package/dist/runtime/components/layout/Divider.vue +8 -1
- package/dist/runtime/components/layout/Divider.vue.d.ts +15 -4
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/CommandPalette.vue +3 -1
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +2 -2
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +3 -1
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Tabs.vue +8 -8
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +10 -1
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +3 -3
- package/dist/runtime/components/overlays/Modal.vue +3 -1
- package/dist/runtime/components/overlays/Modal.vue.d.ts +5 -5
- package/dist/runtime/components/overlays/Modals.client.vue +12 -0
- package/dist/runtime/components/overlays/Notification.vue +2 -2
- package/dist/runtime/components/overlays/Notification.vue.d.ts +4 -3
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/Popover.vue +3 -1
- package/dist/runtime/components/overlays/Popover.vue.d.ts +3 -3
- package/dist/runtime/components/overlays/Slideover.vue +3 -1
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +5 -5
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/composables/useFormGroup.d.ts +1 -1
- package/dist/runtime/composables/useFormGroup.mjs +9 -12
- package/dist/runtime/composables/useModal.d.ts +12 -0
- package/dist/runtime/composables/useModal.mjs +37 -0
- package/dist/runtime/plugins/modals.d.ts +2 -0
- package/dist/runtime/plugins/modals.mjs +10 -0
- package/dist/runtime/types/component.d.ts +14 -0
- package/dist/runtime/types/divider.d.ts +3 -0
- package/dist/runtime/types/form.d.ts +2 -1
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/modal.d.ts +18 -0
- package/dist/runtime/types/progress.d.ts +2 -0
- package/dist/runtime/types/range.d.ts +2 -0
- package/dist/runtime/types/toggle.d.ts +2 -0
- package/dist/runtime/ui.config/data/table.d.ts +7 -0
- package/dist/runtime/ui.config/data/table.mjs +10 -3
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -0
- package/dist/runtime/ui.config/elements/accordion.mjs +1 -0
- package/dist/runtime/ui.config/forms/formGroup.d.ts +1 -0
- package/dist/runtime/ui.config/forms/formGroup.mjs +1 -0
- package/dist/runtime/ui.config/forms/input.d.ts +11 -0
- package/dist/runtime/ui.config/forms/input.mjs +11 -0
- package/dist/runtime/ui.config/forms/select.d.ts +11 -0
- package/dist/runtime/ui.config/forms/textarea.d.ts +11 -0
- package/dist/runtime/ui.config/layout/divider.d.ts +19 -2
- package/dist/runtime/ui.config/layout/divider.mjs +20 -3
- package/dist/runtime/utils/colors.d.ts +3 -0
- package/dist/runtime/utils/colors.mjs +261 -0
- package/dist/runtime/utils/index.mjs +9 -0
- package/dist/runtime/utils/link.d.ts +24 -11
- package/dist/runtime/utils/link.mjs +26 -13
- package/package.json +21 -19
- package/dist/runtime/utils/uid.d.ts +0 -1
- package/dist/runtime/utils/uid.mjs +0 -5
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script>
|
|
29
|
-
import { computed, defineComponent, inject, toRef
|
|
29
|
+
import { computed, defineComponent, inject, toRef } from "vue";
|
|
30
30
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
31
31
|
import { useUI } from "../../composables/useUI";
|
|
32
|
+
import { useFormGroup } from "../../composables/useFormGroup";
|
|
32
33
|
import { mergeConfig } from "../../utils";
|
|
33
34
|
import appConfig from "#build/app.config";
|
|
34
35
|
import { radio } from "#ui/ui.config";
|
|
35
|
-
import {
|
|
36
|
-
import { useFormGroup } from "../../composables/useFormGroup";
|
|
36
|
+
import { useId } from "#imports";
|
|
37
37
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.radio, radio);
|
|
38
38
|
export default defineComponent({
|
|
39
|
-
inheritAttrs: false,
|
|
40
39
|
props: {
|
|
41
40
|
id: {
|
|
42
41
|
type: String,
|
|
43
|
-
default:
|
|
42
|
+
default: null
|
|
44
43
|
},
|
|
45
44
|
value: {
|
|
46
45
|
type: [String, Number, Boolean],
|
|
@@ -93,14 +92,9 @@ export default defineComponent({
|
|
|
93
92
|
emits: ["update:modelValue", "change"],
|
|
94
93
|
setup(props, { emit }) {
|
|
95
94
|
const { ui, attrs } = useUI("radio", toRef(props, "ui"), config, toRef(props, "class"));
|
|
95
|
+
const inputId = props.id ?? useId();
|
|
96
96
|
const radioGroup = inject("radio-group", null);
|
|
97
97
|
const { emitFormChange, color, name } = radioGroup ?? useFormGroup(props, config);
|
|
98
|
-
const inputId = ref(props.id);
|
|
99
|
-
onMounted(() => {
|
|
100
|
-
if (!inputId.value) {
|
|
101
|
-
inputId.value = uid();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
98
|
const pick = computed({
|
|
105
99
|
get() {
|
|
106
100
|
return props.modelValue;
|
|
@@ -2,7 +2,7 @@ import type { PropType } from 'vue';
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
id: {
|
|
4
4
|
type: StringConstructor;
|
|
5
|
-
default:
|
|
5
|
+
default: null;
|
|
6
6
|
};
|
|
7
7
|
value: {
|
|
8
8
|
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
@@ -50,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
50
|
default: () => {};
|
|
51
51
|
};
|
|
52
52
|
}, {
|
|
53
|
-
inputId:
|
|
53
|
+
inputId: string;
|
|
54
54
|
ui: import("vue").ComputedRef<any>;
|
|
55
55
|
attrs: import("vue").ComputedRef<Pick<{
|
|
56
56
|
[x: string]: unknown;
|
|
@@ -58,10 +58,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
58
|
pick: import("vue").WritableComputedRef<string | number | boolean | Record<string, any>>;
|
|
59
59
|
name: import("vue").ComputedRef<string | undefined>;
|
|
60
60
|
inputClass: import("vue").ComputedRef<string>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
id: {
|
|
63
63
|
type: StringConstructor;
|
|
64
|
-
default:
|
|
64
|
+
default: null;
|
|
65
65
|
};
|
|
66
66
|
value: {
|
|
67
67
|
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
@@ -116,11 +116,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
116
116
|
value: string | number | boolean;
|
|
117
117
|
id: string;
|
|
118
118
|
color: any;
|
|
119
|
-
name: string;
|
|
120
119
|
class: any;
|
|
120
|
+
name: string;
|
|
121
121
|
label: string;
|
|
122
|
-
modelValue: string | number | boolean | Record<string, any>;
|
|
123
122
|
disabled: boolean;
|
|
123
|
+
modelValue: string | number | boolean | Record<string, any>;
|
|
124
124
|
required: boolean;
|
|
125
125
|
help: string;
|
|
126
126
|
inputClass: string;
|
|
@@ -53,7 +53,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
}, string>>;
|
|
54
54
|
normalizedOptions: import("vue").ComputedRef<any[]>;
|
|
55
55
|
onUpdate: (value: any) => void;
|
|
56
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
56
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
57
57
|
modelValue: {
|
|
58
58
|
type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
|
|
59
59
|
default: string;
|
|
@@ -105,12 +105,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
105
105
|
}, {
|
|
106
106
|
ui: any;
|
|
107
107
|
color: any;
|
|
108
|
-
|
|
108
|
+
class: any;
|
|
109
109
|
options: unknown[];
|
|
110
110
|
name: string;
|
|
111
|
-
|
|
112
|
-
modelValue: string | number | Record<string, any>;
|
|
111
|
+
legend: string;
|
|
113
112
|
disabled: boolean;
|
|
113
|
+
modelValue: string | number | Record<string, any>;
|
|
114
114
|
optionAttribute: string;
|
|
115
115
|
valueAttribute: string;
|
|
116
116
|
uiRadio: 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").
|
|
60
|
+
inputId: import("vue").ComputedRef<string | undefined>;
|
|
61
61
|
value: import("vue").WritableComputedRef<number>;
|
|
62
62
|
wrapperClass: import("vue").ComputedRef<string>;
|
|
63
63
|
inputClass: import("vue").ComputedRef<string>;
|
|
@@ -68,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
68
|
width: string;
|
|
69
69
|
}>;
|
|
70
70
|
onChange: (event: Event) => void;
|
|
71
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
71
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
72
72
|
modelValue: {
|
|
73
73
|
type: NumberConstructor;
|
|
74
74
|
default: number;
|
|
@@ -127,10 +127,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
127
|
ui: any;
|
|
128
128
|
id: string;
|
|
129
129
|
color: any;
|
|
130
|
-
name: string;
|
|
131
130
|
class: any;
|
|
132
|
-
|
|
131
|
+
name: string;
|
|
133
132
|
disabled: boolean;
|
|
133
|
+
modelValue: number;
|
|
134
134
|
max: number;
|
|
135
135
|
min: number;
|
|
136
136
|
inputClass: string;
|
|
@@ -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:
|
|
105
|
+
inputId: ComputedRef<string | undefined>;
|
|
106
106
|
normalizedOptionsWithPlaceholder: ComputedRef<{
|
|
107
107
|
disabled?: boolean | undefined;
|
|
108
108
|
children: {
|
|
@@ -121,7 +121,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
121
121
|
trailingWrapperIconClass: ComputedRef<string>;
|
|
122
122
|
onInput: (event: Event) => void;
|
|
123
123
|
onChange: (event: Event) => void;
|
|
124
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
124
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
125
125
|
modelValue: {
|
|
126
126
|
type: (ObjectConstructor | NumberConstructor | StringConstructor)[];
|
|
127
127
|
default: string;
|
|
@@ -226,21 +226,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
226
226
|
id: string;
|
|
227
227
|
icon: string;
|
|
228
228
|
color: any;
|
|
229
|
+
class: any;
|
|
229
230
|
options: unknown[];
|
|
230
231
|
name: string;
|
|
231
232
|
leading: boolean;
|
|
232
|
-
|
|
233
|
+
variant: SelectVariant;
|
|
234
|
+
disabled: boolean;
|
|
233
235
|
modelValue: string | number | Record<string, any>;
|
|
234
236
|
loading: boolean;
|
|
235
|
-
disabled: boolean;
|
|
236
|
-
variant: SelectVariant;
|
|
237
|
-
required: boolean;
|
|
238
237
|
placeholder: string;
|
|
239
238
|
padded: boolean;
|
|
240
239
|
loadingIcon: string;
|
|
241
240
|
leadingIcon: string;
|
|
242
241
|
trailingIcon: string;
|
|
243
242
|
trailing: boolean;
|
|
243
|
+
required: boolean;
|
|
244
244
|
optionAttribute: string;
|
|
245
245
|
valueAttribute: string;
|
|
246
246
|
selectClass: string;
|
|
@@ -133,7 +133,8 @@ import {
|
|
|
133
133
|
Listbox as HListbox,
|
|
134
134
|
ListboxButton as HListboxButton,
|
|
135
135
|
ListboxOptions as HListboxOptions,
|
|
136
|
-
ListboxOption as HListboxOption
|
|
136
|
+
ListboxOption as HListboxOption,
|
|
137
|
+
provideUseId
|
|
137
138
|
} from "@headlessui/vue";
|
|
138
139
|
import { computedAsync, useDebounceFn } from "@vueuse/core";
|
|
139
140
|
import { defu } from "defu";
|
|
@@ -147,6 +148,7 @@ import { get, mergeConfig } from "../../utils";
|
|
|
147
148
|
import { useInjectButtonGroup } from "../../composables/useButtonGroup";
|
|
148
149
|
import appConfig from "#build/app.config";
|
|
149
150
|
import { select, selectMenu } from "#ui/ui.config";
|
|
151
|
+
import { useId } from "#imports";
|
|
150
152
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.select, select);
|
|
151
153
|
const configMenu = mergeConfig(appConfig.ui.strategy, appConfig.ui.selectMenu, selectMenu);
|
|
152
154
|
export default defineComponent({
|
|
@@ -474,6 +476,7 @@ export default defineComponent({
|
|
|
474
476
|
function onChange(event) {
|
|
475
477
|
query.value = event.target.value;
|
|
476
478
|
}
|
|
479
|
+
provideUseId(() => useId());
|
|
477
480
|
return {
|
|
478
481
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
479
482
|
ui,
|
|
@@ -158,7 +158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
158
158
|
[x: string]: unknown;
|
|
159
159
|
}, string>>;
|
|
160
160
|
name: import("vue").ComputedRef<string | undefined>;
|
|
161
|
-
inputId: import("vue").
|
|
161
|
+
inputId: import("vue").ComputedRef<string | undefined>;
|
|
162
162
|
popper: import("vue").ComputedRef<PopperOptions>;
|
|
163
163
|
trigger: import("vue").Ref<import("@vueuse/core").MaybeElement>;
|
|
164
164
|
container: import("vue").Ref<import("@vueuse/core").MaybeElement>;
|
|
@@ -179,7 +179,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
179
179
|
query: import("vue").WritableComputedRef<string>;
|
|
180
180
|
onUpdate: (event: any) => void;
|
|
181
181
|
onChange: (event: any) => void;
|
|
182
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:modelValue" | "open" | "update:query")[], "change" | "close" | "update:modelValue" | "open" | "update:query", import("vue").
|
|
182
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "close" | "update:modelValue" | "open" | "update:query")[], "change" | "close" | "update:modelValue" | "open" | "update:query", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
183
183
|
modelValue: {
|
|
184
184
|
type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
|
|
185
185
|
default: string;
|
|
@@ -331,9 +331,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
331
331
|
default: () => {};
|
|
332
332
|
};
|
|
333
333
|
}>> & {
|
|
334
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
334
335
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
335
336
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
336
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
337
337
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
338
338
|
"onUpdate:query"?: ((...args: any[]) => any) | undefined;
|
|
339
339
|
}, {
|
|
@@ -342,6 +342,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
342
342
|
id: string;
|
|
343
343
|
icon: string;
|
|
344
344
|
color: any;
|
|
345
|
+
class: any;
|
|
345
346
|
options: string[] | {
|
|
346
347
|
[key: string]: any;
|
|
347
348
|
disabled?: boolean | undefined;
|
|
@@ -349,20 +350,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
349
350
|
popper: PopperOptions;
|
|
350
351
|
name: string;
|
|
351
352
|
leading: boolean;
|
|
352
|
-
|
|
353
|
+
variant: SelectVariant;
|
|
354
|
+
disabled: boolean;
|
|
353
355
|
modelValue: string | number | unknown[] | Record<string, any>;
|
|
354
356
|
by: string;
|
|
355
357
|
loading: boolean;
|
|
356
|
-
disabled: boolean;
|
|
357
358
|
multiple: boolean;
|
|
358
|
-
variant: SelectVariant;
|
|
359
|
-
required: boolean;
|
|
360
359
|
placeholder: string;
|
|
361
360
|
padded: boolean;
|
|
362
361
|
loadingIcon: string;
|
|
363
362
|
leadingIcon: string;
|
|
364
363
|
trailingIcon: string;
|
|
365
364
|
trailing: boolean;
|
|
365
|
+
required: boolean;
|
|
366
366
|
query: string;
|
|
367
367
|
selectedIcon: string;
|
|
368
368
|
optionAttribute: string;
|
|
@@ -61,6 +61,10 @@ export default defineComponent({
|
|
|
61
61
|
type: Number,
|
|
62
62
|
default: 3
|
|
63
63
|
},
|
|
64
|
+
maxrows: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 0
|
|
67
|
+
},
|
|
64
68
|
autoresize: {
|
|
65
69
|
type: Boolean,
|
|
66
70
|
default: false
|
|
@@ -147,7 +151,7 @@ export default defineComponent({
|
|
|
147
151
|
const { scrollHeight } = textarea2.value;
|
|
148
152
|
const newRows = (scrollHeight - padding) / lineHeight;
|
|
149
153
|
if (newRows > props.rows) {
|
|
150
|
-
textarea2.value.rows = newRows;
|
|
154
|
+
textarea2.value.rows = props.maxrows ? Math.min(newRows, props.maxrows) : newRows;
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
};
|
|
@@ -29,6 +29,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
type: NumberConstructor;
|
|
30
30
|
default: number;
|
|
31
31
|
};
|
|
32
|
+
maxrows: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
default: number;
|
|
35
|
+
};
|
|
32
36
|
autoresize: {
|
|
33
37
|
type: BooleanConstructor;
|
|
34
38
|
default: boolean;
|
|
@@ -90,13 +94,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
94
|
[x: string]: unknown;
|
|
91
95
|
}, string>>;
|
|
92
96
|
name: import("vue").ComputedRef<string | undefined>;
|
|
93
|
-
inputId: import("vue").
|
|
97
|
+
inputId: import("vue").ComputedRef<string | undefined>;
|
|
94
98
|
textarea: import("vue").Ref<HTMLTextAreaElement | null>;
|
|
95
99
|
textareaClass: import("vue").ComputedRef<string>;
|
|
96
100
|
onInput: (event: Event) => void;
|
|
97
101
|
onChange: (event: Event) => void;
|
|
98
102
|
onBlur: (event: FocusEvent) => void;
|
|
99
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").
|
|
103
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "update:modelValue")[], "blur" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
104
|
modelValue: {
|
|
101
105
|
type: (NumberConstructor | StringConstructor)[];
|
|
102
106
|
default: string;
|
|
@@ -125,6 +129,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
125
129
|
type: NumberConstructor;
|
|
126
130
|
default: number;
|
|
127
131
|
};
|
|
132
|
+
maxrows: {
|
|
133
|
+
type: NumberConstructor;
|
|
134
|
+
default: number;
|
|
135
|
+
};
|
|
128
136
|
autoresize: {
|
|
129
137
|
type: BooleanConstructor;
|
|
130
138
|
default: boolean;
|
|
@@ -189,15 +197,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
189
197
|
ui: any;
|
|
190
198
|
id: string;
|
|
191
199
|
color: any;
|
|
192
|
-
name: string;
|
|
193
200
|
class: any;
|
|
201
|
+
name: string;
|
|
202
|
+
variant: TextareaVariant;
|
|
203
|
+
disabled: boolean;
|
|
194
204
|
modelValue: string | number;
|
|
195
205
|
rows: number;
|
|
196
|
-
disabled: boolean;
|
|
197
|
-
variant: TextareaVariant;
|
|
198
|
-
required: boolean;
|
|
199
206
|
placeholder: string;
|
|
200
207
|
padded: boolean;
|
|
208
|
+
required: boolean;
|
|
201
209
|
autofocus: boolean;
|
|
202
210
|
autofocusDelay: number;
|
|
203
211
|
modelModifiers: {
|
|
@@ -205,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
205
213
|
lazy?: boolean | undefined;
|
|
206
214
|
number?: boolean | undefined;
|
|
207
215
|
};
|
|
216
|
+
maxrows: number;
|
|
208
217
|
autoresize: boolean;
|
|
209
218
|
textareaClass: string;
|
|
210
219
|
}, {}>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
22
|
import { computed, toRef, defineComponent } from "vue";
|
|
23
|
-
import { Switch as HSwitch } from "@headlessui/vue";
|
|
23
|
+
import { Switch as HSwitch, provideUseId } from "@headlessui/vue";
|
|
24
24
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
25
25
|
import UIcon from "../elements/Icon.vue";
|
|
26
26
|
import { useUI } from "../../composables/useUI";
|
|
@@ -28,6 +28,7 @@ import { useFormGroup } from "../../composables/useFormGroup";
|
|
|
28
28
|
import { mergeConfig } from "../../utils";
|
|
29
29
|
import appConfig from "#build/app.config";
|
|
30
30
|
import { toggle } from "#ui/ui.config";
|
|
31
|
+
import { useId } from "#imports";
|
|
31
32
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.toggle, toggle);
|
|
32
33
|
export default defineComponent({
|
|
33
34
|
components: {
|
|
@@ -124,6 +125,7 @@ export default defineComponent({
|
|
|
124
125
|
color.value && ui.value.icon.off.replaceAll("{color}", color.value)
|
|
125
126
|
);
|
|
126
127
|
});
|
|
128
|
+
provideUseId(() => useId());
|
|
127
129
|
return {
|
|
128
130
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
129
131
|
ui,
|
|
@@ -49,13 +49,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
[x: string]: unknown;
|
|
50
50
|
}, string>>;
|
|
51
51
|
name: import("vue").ComputedRef<string | undefined>;
|
|
52
|
-
inputId: import("vue").
|
|
52
|
+
inputId: import("vue").ComputedRef<string | undefined>;
|
|
53
53
|
active: import("vue").WritableComputedRef<boolean>;
|
|
54
54
|
switchClass: import("vue").ComputedRef<string>;
|
|
55
55
|
containerClass: import("vue").ComputedRef<string>;
|
|
56
56
|
onIconClass: import("vue").ComputedRef<string>;
|
|
57
57
|
offIconClass: import("vue").ComputedRef<string>;
|
|
58
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").
|
|
58
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
59
|
id: {
|
|
60
60
|
type: StringConstructor;
|
|
61
61
|
default: null;
|
|
@@ -106,10 +106,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
106
106
|
ui: any;
|
|
107
107
|
id: string;
|
|
108
108
|
color: any;
|
|
109
|
-
name: string;
|
|
110
109
|
class: any;
|
|
111
|
-
|
|
110
|
+
name: string;
|
|
112
111
|
disabled: boolean;
|
|
112
|
+
modelValue: boolean;
|
|
113
113
|
onIcon: string;
|
|
114
114
|
offIcon: string;
|
|
115
115
|
}, {}>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div v-if="$slots.header" :class="[ui.header.base, ui.header.padding, ui.header.background]">
|
|
8
8
|
<slot name="header" />
|
|
9
9
|
</div>
|
|
10
|
-
<div :class="[ui.body.base, ui.body.padding, ui.body.background]">
|
|
10
|
+
<div v-if="$slots.default" :class="[ui.body.base, ui.body.padding, ui.body.background]">
|
|
11
11
|
<slot />
|
|
12
12
|
</div>
|
|
13
13
|
<div v-if="$slots.footer" :class="[ui.footer.base, ui.footer.padding, ui.footer.background]">
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
[x: string]: unknown;
|
|
19
19
|
}, string>>;
|
|
20
20
|
cardClass: import("vue").ComputedRef<string>;
|
|
21
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
as: {
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
[x: string]: unknown;
|
|
19
19
|
}, string>>;
|
|
20
20
|
containerClass: import("vue").ComputedRef<string>;
|
|
21
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
as: {
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
default: string;
|
|
@@ -47,6 +47,13 @@ export default defineComponent({
|
|
|
47
47
|
type: Object,
|
|
48
48
|
default: null
|
|
49
49
|
},
|
|
50
|
+
size: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: () => config.default.size,
|
|
53
|
+
validator(value) {
|
|
54
|
+
return Object.keys(config.border.size.horizontal).includes(value) || Object.keys(config.border.size.vertical).includes(value);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
50
57
|
orientation: {
|
|
51
58
|
type: String,
|
|
52
59
|
default: "horizontal",
|
|
@@ -84,7 +91,7 @@ export default defineComponent({
|
|
|
84
91
|
return twJoin(
|
|
85
92
|
ui.value.border.base,
|
|
86
93
|
ui.value.border[props.orientation],
|
|
87
|
-
ui.value.border.size[props.orientation],
|
|
94
|
+
ui.value.border.size[props.orientation][props.size],
|
|
88
95
|
ui.value.border.type[props.type]
|
|
89
96
|
);
|
|
90
97
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Avatar } from '../../types';
|
|
2
|
+
import type { Avatar, DividerSize } from '../../types';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
label: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -13,6 +13,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
type: PropType<Avatar>;
|
|
14
14
|
default: null;
|
|
15
15
|
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<DividerSize>;
|
|
18
|
+
default: () => any;
|
|
19
|
+
validator(value: string): boolean;
|
|
20
|
+
};
|
|
16
21
|
orientation: {
|
|
17
22
|
type: PropType<"horizontal" | "vertical">;
|
|
18
23
|
default: string;
|
|
@@ -25,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
30
|
};
|
|
26
31
|
class: {
|
|
27
32
|
type: PropType<any>;
|
|
28
|
-
default: () =>
|
|
33
|
+
default: () => "";
|
|
29
34
|
};
|
|
30
35
|
ui: {
|
|
31
36
|
type: PropType<any>;
|
|
@@ -39,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
44
|
wrapperClass: import("vue").ComputedRef<string>;
|
|
40
45
|
containerClass: import("vue").ComputedRef<string>;
|
|
41
46
|
borderClass: import("vue").ComputedRef<string>;
|
|
42
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
47
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
48
|
label: {
|
|
44
49
|
type: StringConstructor;
|
|
45
50
|
default: null;
|
|
@@ -52,6 +57,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
57
|
type: PropType<Avatar>;
|
|
53
58
|
default: null;
|
|
54
59
|
};
|
|
60
|
+
size: {
|
|
61
|
+
type: PropType<DividerSize>;
|
|
62
|
+
default: () => any;
|
|
63
|
+
validator(value: string): boolean;
|
|
64
|
+
};
|
|
55
65
|
orientation: {
|
|
56
66
|
type: PropType<"horizontal" | "vertical">;
|
|
57
67
|
default: string;
|
|
@@ -64,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
74
|
};
|
|
65
75
|
class: {
|
|
66
76
|
type: PropType<any>;
|
|
67
|
-
default: () =>
|
|
77
|
+
default: () => "";
|
|
68
78
|
};
|
|
69
79
|
ui: {
|
|
70
80
|
type: PropType<any>;
|
|
@@ -72,6 +82,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
82
|
};
|
|
73
83
|
}>>, {
|
|
74
84
|
orientation: "horizontal" | "vertical";
|
|
85
|
+
size: DividerSize;
|
|
75
86
|
ui: any;
|
|
76
87
|
icon: string;
|
|
77
88
|
avatar: Avatar;
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
[x: string]: unknown;
|
|
15
15
|
}, string>>;
|
|
16
16
|
skeletonClass: import("vue").ComputedRef<string>;
|
|
17
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
class: {
|
|
19
19
|
type: PropType<any>;
|
|
20
20
|
default: () => string;
|
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
getULinkProps: (props: any) => {};
|
|
27
27
|
twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
28
28
|
twJoin: typeof twJoin;
|
|
29
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
29
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
30
|
links: {
|
|
31
31
|
type: PropType<BreadcrumbLink[]>;
|
|
32
32
|
default: () => never[];
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
<script>
|
|
65
65
|
import { ref, computed, watch, toRef, onMounted, defineComponent } from "vue";
|
|
66
|
-
import { Combobox as HCombobox, ComboboxInput as HComboboxInput, ComboboxOptions as HComboboxOptions } from "@headlessui/vue";
|
|
66
|
+
import { Combobox as HCombobox, ComboboxInput as HComboboxInput, ComboboxOptions as HComboboxOptions, provideUseId } from "@headlessui/vue";
|
|
67
67
|
import { useDebounceFn } from "@vueuse/core";
|
|
68
68
|
import { useFuse } from "@vueuse/integrations/useFuse";
|
|
69
69
|
import { twJoin } from "tailwind-merge";
|
|
@@ -75,6 +75,7 @@ import { useUI } from "../../composables/useUI";
|
|
|
75
75
|
import { mergeConfig } from "../../utils";
|
|
76
76
|
import appConfig from "#build/app.config";
|
|
77
77
|
import { commandPalette } from "#ui/ui.config";
|
|
78
|
+
import { useId } from "#imports";
|
|
78
79
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.commandPalette, commandPalette);
|
|
79
80
|
export default defineComponent({
|
|
80
81
|
components: {
|
|
@@ -316,6 +317,7 @@ export default defineComponent({
|
|
|
316
317
|
comboboxApi,
|
|
317
318
|
results
|
|
318
319
|
});
|
|
320
|
+
provideUseId(() => useId());
|
|
319
321
|
return {
|
|
320
322
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
321
323
|
ui,
|
|
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
110
|
emptyState: ComputedRef<any>;
|
|
111
111
|
onSelect: (option: Command | Command[]) => void;
|
|
112
112
|
onClear: () => void;
|
|
113
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").
|
|
113
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
114
114
|
modelValue: {
|
|
115
115
|
type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
|
|
116
116
|
default: null;
|
|
@@ -200,8 +200,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
200
200
|
default: () => {};
|
|
201
201
|
};
|
|
202
202
|
}>> & {
|
|
203
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
204
203
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
204
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
205
205
|
}, {
|
|
206
206
|
ui: any;
|
|
207
207
|
icon: string;
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
|
|
72
72
|
<script>
|
|
73
73
|
import { computed, defineComponent } from "vue";
|
|
74
|
-
import { ComboboxOption as HComboboxOption } from "@headlessui/vue";
|
|
74
|
+
import { ComboboxOption as HComboboxOption, provideUseId } from "@headlessui/vue";
|
|
75
75
|
import UIcon from "../elements/Icon.vue";
|
|
76
76
|
import UAvatar from "../elements/Avatar.vue";
|
|
77
77
|
import UKbd from "../elements/Kbd.vue";
|
|
78
|
+
import { useId } from "#imports";
|
|
78
79
|
export default defineComponent({
|
|
79
80
|
components: {
|
|
80
81
|
HComboboxOption,
|
|
@@ -137,6 +138,7 @@ export default defineComponent({
|
|
|
137
138
|
}
|
|
138
139
|
return content;
|
|
139
140
|
}
|
|
141
|
+
provideUseId(() => useId());
|
|
140
142
|
return {
|
|
141
143
|
label,
|
|
142
144
|
highlight
|
|
@@ -31,7 +31,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
31
|
indices: number[][];
|
|
32
32
|
value: string;
|
|
33
33
|
}) => string;
|
|
34
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
35
|
group: {
|
|
36
36
|
type: PropType<Group>;
|
|
37
37
|
required: true;
|