@nuxt/ui 2.8.1 → 2.10.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 +1 -0
- package/dist/module.d.mts +1411 -1092
- package/dist/module.d.ts +1411 -1092
- package/dist/module.json +1 -1
- package/dist/module.mjs +55 -11
- package/dist/runtime/components/data/Table.vue +47 -32
- package/dist/runtime/components/data/Table.vue.d.ts +22 -14
- package/dist/runtime/components/elements/Accordion.vue +33 -28
- package/dist/runtime/components/elements/Accordion.vue.d.ts +25 -18
- package/dist/runtime/components/elements/Alert.vue +22 -18
- package/dist/runtime/components/elements/Alert.vue.d.ts +26 -19
- package/dist/runtime/components/elements/Avatar.vue +22 -16
- package/dist/runtime/components/elements/Avatar.vue.d.ts +28 -19
- package/dist/runtime/components/elements/AvatarGroup.d.ts +17 -8
- package/dist/runtime/components/elements/AvatarGroup.mjs +18 -13
- package/dist/runtime/components/elements/Badge.vue +21 -17
- package/dist/runtime/components/elements/Badge.vue.d.ts +28 -19
- package/dist/runtime/components/elements/Button.vue +22 -18
- package/dist/runtime/components/elements/Button.vue.d.ts +28 -19
- package/dist/runtime/components/elements/ButtonGroup.d.ts +17 -8
- package/dist/runtime/components/elements/ButtonGroup.mjs +22 -15
- package/dist/runtime/components/elements/Dropdown.vue +45 -37
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +22 -17
- package/dist/runtime/components/elements/Kbd.vue +16 -12
- package/dist/runtime/components/elements/Kbd.vue.d.ts +20 -12
- package/dist/runtime/components/elements/Link.vue +18 -5
- package/dist/runtime/components/elements/Meter.vue +166 -0
- package/dist/runtime/components/elements/Meter.vue.d.ts +123 -0
- package/dist/runtime/components/elements/MeterGroup.d.ts +78 -0
- package/dist/runtime/components/elements/MeterGroup.mjs +172 -0
- package/dist/runtime/components/elements/Progress.vue +284 -0
- package/dist/runtime/components/elements/Progress.vue.d.ts +2 -0
- package/dist/runtime/components/forms/Checkbox.vue +27 -17
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +33 -15
- package/dist/runtime/components/forms/Form.vue +34 -9
- package/dist/runtime/components/forms/Form.vue.d.ts +2 -1
- package/dist/runtime/components/forms/FormGroup.vue +51 -27
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +23 -15
- package/dist/runtime/components/forms/Input.vue +41 -29
- package/dist/runtime/components/forms/Input.vue.d.ts +51 -24
- package/dist/runtime/components/forms/Radio.vue +32 -21
- package/dist/runtime/components/forms/Radio.vue.d.ts +36 -18
- package/dist/runtime/components/forms/RadioGroup.vue +136 -0
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +118 -0
- package/dist/runtime/components/forms/Range.vue +26 -16
- package/dist/runtime/components/forms/Range.vue.d.ts +37 -18
- package/dist/runtime/components/forms/Select.vue +34 -26
- package/dist/runtime/components/forms/Select.vue.d.ts +42 -24
- package/dist/runtime/components/forms/SelectMenu.vue +104 -89
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +53 -33
- package/dist/runtime/components/forms/Textarea.vue +43 -31
- package/dist/runtime/components/forms/Textarea.vue.d.ts +50 -23
- package/dist/runtime/components/forms/Toggle.vue +26 -15
- package/dist/runtime/components/forms/Toggle.vue.d.ts +31 -12
- package/dist/runtime/components/layout/Card.vue +15 -10
- package/dist/runtime/components/layout/Card.vue.d.ts +17 -9
- package/dist/runtime/components/layout/Container.vue +15 -10
- package/dist/runtime/components/layout/Container.vue.d.ts +17 -9
- package/dist/runtime/components/layout/Divider.vue +107 -0
- package/dist/runtime/components/layout/Divider.vue.d.ts +82 -0
- package/dist/runtime/components/layout/Skeleton.vue +15 -10
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +17 -9
- package/dist/runtime/components/navigation/CommandPalette.vue +57 -38
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +24 -23
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -1
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +3 -4
- package/dist/runtime/components/navigation/Pagination.vue +129 -64
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +70 -25
- package/dist/runtime/components/navigation/Tabs.vue +17 -14
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +18 -11
- package/dist/runtime/components/navigation/VerticalNavigation.vue +15 -13
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +20 -16
- package/dist/runtime/components/overlays/ContextMenu.vue +21 -11
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +20 -11
- package/dist/runtime/components/overlays/Modal.vue +16 -14
- package/dist/runtime/components/overlays/Modal.vue.d.ts +18 -11
- package/dist/runtime/components/overlays/Notification.vue +25 -15
- package/dist/runtime/components/overlays/Notification.vue.d.ts +25 -19
- package/dist/runtime/components/overlays/Notifications.vue +19 -13
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +22 -14
- package/dist/runtime/components/overlays/Popover.vue +39 -22
- package/dist/runtime/components/overlays/Popover.vue.d.ts +32 -11
- package/dist/runtime/components/overlays/Slideover.vue +15 -13
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +18 -11
- package/dist/runtime/components/overlays/Tooltip.vue +31 -23
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +19 -11
- package/dist/runtime/composables/useFormGroup.d.ts +12 -2
- package/dist/runtime/composables/useFormGroup.mjs +21 -4
- package/dist/runtime/composables/usePopper.d.ts +3 -3
- package/dist/runtime/composables/usePopper.mjs +47 -31
- package/dist/runtime/composables/useToast.d.ts +3 -3
- package/dist/runtime/composables/useUI.d.ts +10 -0
- package/dist/runtime/composables/useUI.mjs +24 -0
- package/dist/runtime/types/avatar.d.ts +10 -4
- package/dist/runtime/types/badge.d.ts +14 -0
- package/dist/runtime/types/button.d.ts +10 -3
- package/dist/runtime/types/command-palette.d.ts +3 -1
- package/dist/runtime/types/form.d.ts +18 -4
- package/dist/runtime/types/index.d.ts +4 -0
- package/dist/runtime/types/link.d.ts +1 -0
- package/dist/runtime/types/meter.d.ts +5 -0
- package/dist/runtime/types/notification.d.ts +5 -3
- package/dist/runtime/types/popper.d.ts +1 -0
- package/dist/runtime/types/progress.d.ts +4 -0
- package/dist/runtime/types/tabs.d.ts +1 -0
- package/dist/runtime/types/utils.d.ts +11 -0
- package/dist/runtime/ui.config.d.ts +1470 -0
- package/dist/runtime/{app.config.mjs → ui.config.mjs} +313 -97
- package/dist/runtime/utils/index.d.ts +5 -11
- package/dist/runtime/utils/index.mjs +21 -9
- package/dist/runtime/utils/lodash.d.ts +2 -0
- package/dist/runtime/utils/lodash.mjs +23 -0
- package/dist/runtime/utils/uid.d.ts +1 -0
- package/dist/runtime/utils/uid.mjs +4 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +27 -29
- package/dist/runtime/app.config.d.ts +0 -1203
- package/dist/runtime/utils/StateEmitter.d.ts +0 -17
- package/dist/runtime/utils/StateEmitter.mjs +0 -21
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
|
-
import { defineComponent, computed } from "vue";
|
|
9
|
-
import { omit } from "lodash-es";
|
|
8
|
+
import { toRef, defineComponent, computed } from "vue";
|
|
10
9
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { useUI } from "../../composables/useUI";
|
|
11
|
+
import { mergeConfig } from "../../utils";
|
|
13
12
|
import appConfig from "#build/app.config";
|
|
13
|
+
import { kbd } from "#ui/ui.config";
|
|
14
|
+
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.kbd, kbd);
|
|
14
15
|
export default defineComponent({
|
|
15
16
|
inheritAttrs: false,
|
|
16
17
|
props: {
|
|
@@ -20,19 +21,22 @@ export default defineComponent({
|
|
|
20
21
|
},
|
|
21
22
|
size: {
|
|
22
23
|
type: String,
|
|
23
|
-
default: () =>
|
|
24
|
+
default: () => config.default.size,
|
|
24
25
|
validator(value) {
|
|
25
|
-
return Object.keys(
|
|
26
|
+
return Object.keys(config.size).includes(value);
|
|
26
27
|
}
|
|
27
28
|
},
|
|
29
|
+
class: {
|
|
30
|
+
type: [String, Object, Array],
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
28
33
|
ui: {
|
|
29
34
|
type: Object,
|
|
30
|
-
default:
|
|
35
|
+
default: void 0
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
|
-
setup(props
|
|
34
|
-
const
|
|
35
|
-
const ui = computed(() => defuTwMerge({}, props.ui, appConfig2.ui.kbd));
|
|
38
|
+
setup(props) {
|
|
39
|
+
const { ui, attrs } = useUI("kbd", toRef(props, "ui"), config);
|
|
36
40
|
const kbdClass = computed(() => {
|
|
37
41
|
return twMerge(twJoin(
|
|
38
42
|
ui.value.base,
|
|
@@ -42,12 +46,12 @@ export default defineComponent({
|
|
|
42
46
|
ui.value.font,
|
|
43
47
|
ui.value.background,
|
|
44
48
|
ui.value.ring
|
|
45
|
-
),
|
|
49
|
+
), props.class);
|
|
46
50
|
});
|
|
47
51
|
return {
|
|
48
|
-
attrs: omit(attrs, ["class"]),
|
|
49
52
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
50
53
|
ui,
|
|
54
|
+
attrs,
|
|
51
55
|
kbdClass
|
|
52
56
|
};
|
|
53
57
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import type { PropType } from 'vue';
|
|
3
2
|
declare const _default: import("vue").DefineComponent<{
|
|
4
3
|
value: {
|
|
@@ -6,19 +5,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
5
|
default: null;
|
|
7
6
|
};
|
|
8
7
|
size: {
|
|
9
|
-
type:
|
|
8
|
+
type: PropType<string | number | symbol>;
|
|
10
9
|
default: () => any;
|
|
11
10
|
validator(value: string): boolean;
|
|
12
11
|
};
|
|
13
|
-
|
|
12
|
+
class: {
|
|
14
13
|
type: PropType<any>;
|
|
15
|
-
default:
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
ui: {
|
|
17
|
+
type: PropType<Partial<any>>;
|
|
18
|
+
default: undefined;
|
|
16
19
|
};
|
|
17
20
|
}, {
|
|
18
|
-
attrs: import("lodash").Omit<{
|
|
19
|
-
[x: string]: unknown;
|
|
20
|
-
}, "class">;
|
|
21
21
|
ui: import("vue").ComputedRef<any>;
|
|
22
|
+
attrs: import("vue").ComputedRef<Pick<{
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
}, string>>;
|
|
22
25
|
kbdClass: import("vue").ComputedRef<string>;
|
|
23
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
27
|
value: {
|
|
@@ -26,17 +29,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
29
|
default: null;
|
|
27
30
|
};
|
|
28
31
|
size: {
|
|
29
|
-
type:
|
|
32
|
+
type: PropType<string | number | symbol>;
|
|
30
33
|
default: () => any;
|
|
31
34
|
validator(value: string): boolean;
|
|
32
35
|
};
|
|
33
|
-
|
|
36
|
+
class: {
|
|
34
37
|
type: PropType<any>;
|
|
35
|
-
default:
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
ui: {
|
|
41
|
+
type: PropType<Partial<any>>;
|
|
42
|
+
default: undefined;
|
|
36
43
|
};
|
|
37
44
|
}>>, {
|
|
38
|
-
ui: any
|
|
45
|
+
ui: Partial<any>;
|
|
46
|
+
class: any;
|
|
39
47
|
value: string;
|
|
40
|
-
size: string;
|
|
48
|
+
size: string | number | symbol;
|
|
41
49
|
}, {}>;
|
|
42
50
|
export default _default;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="as"
|
|
4
|
+
v-if="!to"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
:class="inactiveClass"
|
|
8
|
+
>
|
|
3
9
|
<slot />
|
|
4
|
-
</
|
|
10
|
+
</component>
|
|
5
11
|
<NuxtLink
|
|
6
12
|
v-else
|
|
7
13
|
v-slot="{ route, href, target, rel, navigate, isActive, isExactActive, isExternal }"
|
|
@@ -24,21 +30,25 @@
|
|
|
24
30
|
</template>
|
|
25
31
|
|
|
26
32
|
<script>
|
|
27
|
-
import { isEqual } from "
|
|
33
|
+
import { isEqual } from "ohash";
|
|
28
34
|
import { defineComponent } from "vue";
|
|
29
35
|
import { NuxtLink } from "#components";
|
|
30
36
|
export default defineComponent({
|
|
31
37
|
inheritAttrs: false,
|
|
32
38
|
props: {
|
|
33
39
|
...NuxtLink.props,
|
|
34
|
-
|
|
40
|
+
as: {
|
|
35
41
|
type: String,
|
|
36
|
-
default:
|
|
42
|
+
default: "button"
|
|
37
43
|
},
|
|
38
44
|
disabled: {
|
|
39
45
|
type: Boolean,
|
|
40
46
|
default: null
|
|
41
47
|
},
|
|
48
|
+
active: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
42
52
|
exact: {
|
|
43
53
|
type: Boolean,
|
|
44
54
|
default: false
|
|
@@ -58,6 +68,9 @@ export default defineComponent({
|
|
|
58
68
|
},
|
|
59
69
|
setup(props) {
|
|
60
70
|
function resolveLinkClass(route, $route, { isActive, isExactActive }) {
|
|
71
|
+
if (props.active) {
|
|
72
|
+
return props.activeClass;
|
|
73
|
+
}
|
|
61
74
|
if (props.exactQuery && !isEqual(route.query, $route.query)) {
|
|
62
75
|
return props.inactiveClass;
|
|
63
76
|
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="ui.wrapper" v-bind="attrs">
|
|
3
|
+
<template v-if="indicator || $slots.indicator">
|
|
4
|
+
<slot name="indicator" v-bind="{ percent, value }">
|
|
5
|
+
<div :class="indicatorContainerClass" :style="{ width: `${percent}%` }">
|
|
6
|
+
<div :class="indicatorClass">
|
|
7
|
+
{{ Math.round(percent) }}%
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</slot>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<meter
|
|
14
|
+
:value="value"
|
|
15
|
+
:min="normalizedMin"
|
|
16
|
+
:max="normalizedMax"
|
|
17
|
+
:class="[meterClass, meterAppearanceClass, meterBarClass]"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<template v-if="label || $slots.label">
|
|
21
|
+
<slot name="label" v-bind="{ percent, value }">
|
|
22
|
+
<div :class="labelClass">
|
|
23
|
+
<UIcon v-if="icon" :name="icon" /> {{ label }}
|
|
24
|
+
</div>
|
|
25
|
+
</slot>
|
|
26
|
+
</template>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import { computed, defineComponent, toRef } from "vue";
|
|
32
|
+
import { twJoin } from "tailwind-merge";
|
|
33
|
+
import { useUI } from "../../composables/useUI";
|
|
34
|
+
import { mergeConfig } from "../../utils";
|
|
35
|
+
import appConfig from "#build/app.config";
|
|
36
|
+
import { meter } from "#ui/ui.config";
|
|
37
|
+
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.meter, meter);
|
|
38
|
+
export default defineComponent({
|
|
39
|
+
inheritAttrs: false,
|
|
40
|
+
slots: Object,
|
|
41
|
+
props: {
|
|
42
|
+
value: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: 0
|
|
45
|
+
},
|
|
46
|
+
min: {
|
|
47
|
+
type: Number,
|
|
48
|
+
default: 0
|
|
49
|
+
},
|
|
50
|
+
max: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 100
|
|
53
|
+
},
|
|
54
|
+
indicator: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
58
|
+
label: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: null
|
|
61
|
+
},
|
|
62
|
+
size: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: () => config.default.size,
|
|
65
|
+
validator(value) {
|
|
66
|
+
return Object.keys(config.meter.size).includes(value);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
color: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: () => config.default.color,
|
|
72
|
+
validator(value) {
|
|
73
|
+
return [...appConfig.ui.colors, ...Object.keys(config.color)].includes(value);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
icon: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: null
|
|
79
|
+
},
|
|
80
|
+
class: {
|
|
81
|
+
type: [String, Object, Array],
|
|
82
|
+
default: void 0
|
|
83
|
+
},
|
|
84
|
+
ui: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: void 0
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
setup(props) {
|
|
90
|
+
const { ui, attrs } = useUI("meter", toRef(props, "ui"), config, toRef(props, "class"));
|
|
91
|
+
function clampPercent(value, min, max) {
|
|
92
|
+
if (min == max) {
|
|
93
|
+
return value < min ? 0 : 100;
|
|
94
|
+
}
|
|
95
|
+
if (min > max) {
|
|
96
|
+
max = [min, min = max][0];
|
|
97
|
+
}
|
|
98
|
+
const percent2 = (value - min) / (max - min) * 100;
|
|
99
|
+
return Math.max(0, Math.min(100, percent2));
|
|
100
|
+
}
|
|
101
|
+
const indicatorContainerClass = computed(() => {
|
|
102
|
+
return twJoin(
|
|
103
|
+
ui.value.indicator.container
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
const indicatorClass = computed(() => {
|
|
107
|
+
return twJoin(
|
|
108
|
+
ui.value.indicator.text,
|
|
109
|
+
ui.value.indicator.size[props.size]
|
|
110
|
+
);
|
|
111
|
+
});
|
|
112
|
+
const meterClass = computed(() => {
|
|
113
|
+
return twJoin(
|
|
114
|
+
ui.value.meter.base,
|
|
115
|
+
ui.value.meter.background,
|
|
116
|
+
ui.value.meter.ring,
|
|
117
|
+
ui.value.meter.rounded,
|
|
118
|
+
ui.value.meter.shadow,
|
|
119
|
+
ui.value.color[props.color] ?? ui.value.meter.color.replaceAll("{color}", props.color),
|
|
120
|
+
ui.value.meter.size[props.size]
|
|
121
|
+
);
|
|
122
|
+
});
|
|
123
|
+
const meterAppearanceClass = computed(() => {
|
|
124
|
+
return twJoin(
|
|
125
|
+
ui.value.meter.appearance.inner,
|
|
126
|
+
ui.value.meter.appearance.meter,
|
|
127
|
+
ui.value.meter.appearance.bar,
|
|
128
|
+
ui.value.meter.appearance.value
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
const meterBarClass = computed(() => {
|
|
132
|
+
return twJoin(
|
|
133
|
+
ui.value.meter.bar.transition,
|
|
134
|
+
ui.value.meter.bar.ring,
|
|
135
|
+
ui.value.meter.bar.rounded,
|
|
136
|
+
ui.value.meter.bar.size[props.size]
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
const labelClass = computed(() => {
|
|
140
|
+
return twJoin(
|
|
141
|
+
ui.value.label.base,
|
|
142
|
+
ui.value.label.text,
|
|
143
|
+
ui.value.color[props.color] ?? ui.value.label.color.replaceAll("{color}", props.color),
|
|
144
|
+
ui.value.label.size[props.size]
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
const normalizedMin = computed(() => props.min > props.max ? props.max : props.min);
|
|
148
|
+
const normalizedMax = computed(() => props.max < props.min ? props.min : props.max);
|
|
149
|
+
const percent = computed(() => clampPercent(Number(props.value), normalizedMin.value, normalizedMax.value));
|
|
150
|
+
return {
|
|
151
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
152
|
+
ui,
|
|
153
|
+
attrs,
|
|
154
|
+
indicatorContainerClass,
|
|
155
|
+
indicatorClass,
|
|
156
|
+
meterClass,
|
|
157
|
+
meterAppearanceClass,
|
|
158
|
+
meterBarClass,
|
|
159
|
+
labelClass,
|
|
160
|
+
normalizedMin,
|
|
161
|
+
normalizedMax,
|
|
162
|
+
percent
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
</script>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { SlotsType, PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
value: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
min: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
max: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
indicator: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
label: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
type: PropType<"sm" | "md" | "xs" | "2xs" | "lg" | "xl" | "2xl">;
|
|
25
|
+
default: () => any;
|
|
26
|
+
validator(value: string): boolean;
|
|
27
|
+
};
|
|
28
|
+
color: {
|
|
29
|
+
type: PropType<any>;
|
|
30
|
+
default: () => any;
|
|
31
|
+
validator(value: string): boolean;
|
|
32
|
+
};
|
|
33
|
+
icon: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: null;
|
|
36
|
+
};
|
|
37
|
+
class: {
|
|
38
|
+
type: PropType<any>;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
ui: {
|
|
42
|
+
type: PropType<Partial<any>>;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
ui: import("vue").ComputedRef<any>;
|
|
47
|
+
attrs: import("vue").ComputedRef<Pick<{
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
}, string>>;
|
|
50
|
+
indicatorContainerClass: import("vue").ComputedRef<string>;
|
|
51
|
+
indicatorClass: import("vue").ComputedRef<string>;
|
|
52
|
+
meterClass: import("vue").ComputedRef<string>;
|
|
53
|
+
meterAppearanceClass: import("vue").ComputedRef<string>;
|
|
54
|
+
meterBarClass: import("vue").ComputedRef<string>;
|
|
55
|
+
labelClass: import("vue").ComputedRef<string>;
|
|
56
|
+
normalizedMin: import("vue").ComputedRef<number>;
|
|
57
|
+
normalizedMax: import("vue").ComputedRef<number>;
|
|
58
|
+
percent: import("vue").ComputedRef<number>;
|
|
59
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
60
|
+
value: {
|
|
61
|
+
type: NumberConstructor;
|
|
62
|
+
default: number;
|
|
63
|
+
};
|
|
64
|
+
min: {
|
|
65
|
+
type: NumberConstructor;
|
|
66
|
+
default: number;
|
|
67
|
+
};
|
|
68
|
+
max: {
|
|
69
|
+
type: NumberConstructor;
|
|
70
|
+
default: number;
|
|
71
|
+
};
|
|
72
|
+
indicator: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
label: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: null;
|
|
79
|
+
};
|
|
80
|
+
size: {
|
|
81
|
+
type: PropType<"sm" | "md" | "xs" | "2xs" | "lg" | "xl" | "2xl">;
|
|
82
|
+
default: () => any;
|
|
83
|
+
validator(value: string): boolean;
|
|
84
|
+
};
|
|
85
|
+
color: {
|
|
86
|
+
type: PropType<any>;
|
|
87
|
+
default: () => any;
|
|
88
|
+
validator(value: string): boolean;
|
|
89
|
+
};
|
|
90
|
+
icon: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: null;
|
|
93
|
+
};
|
|
94
|
+
class: {
|
|
95
|
+
type: PropType<any>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
98
|
+
ui: {
|
|
99
|
+
type: PropType<Partial<any>>;
|
|
100
|
+
default: undefined;
|
|
101
|
+
};
|
|
102
|
+
}>>, {
|
|
103
|
+
icon: string;
|
|
104
|
+
color: any;
|
|
105
|
+
ui: Partial<any>;
|
|
106
|
+
class: any;
|
|
107
|
+
value: number;
|
|
108
|
+
label: string;
|
|
109
|
+
size: "sm" | "md" | "xs" | "2xs" | "lg" | "xl" | "2xl";
|
|
110
|
+
max: number;
|
|
111
|
+
min: number;
|
|
112
|
+
indicator: boolean;
|
|
113
|
+
}, SlotsType<{
|
|
114
|
+
indicator?: {
|
|
115
|
+
percent: number;
|
|
116
|
+
value: number;
|
|
117
|
+
} | undefined;
|
|
118
|
+
label?: {
|
|
119
|
+
percent: number;
|
|
120
|
+
value: number;
|
|
121
|
+
} | undefined;
|
|
122
|
+
}>>;
|
|
123
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { VNode, SlotsType, PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
min: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
max: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
size: {
|
|
12
|
+
type: PropType<"sm" | "md" | "xs" | "2xs" | "lg" | "xl" | "2xl">;
|
|
13
|
+
default: () => any;
|
|
14
|
+
validator(value: string): boolean;
|
|
15
|
+
};
|
|
16
|
+
indicator: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
icon: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
class: {
|
|
25
|
+
type: PropType<any>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
ui: {
|
|
29
|
+
type: PropType<Partial<any>>;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
min: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
max: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
default: number;
|
|
42
|
+
};
|
|
43
|
+
size: {
|
|
44
|
+
type: PropType<"sm" | "md" | "xs" | "2xs" | "lg" | "xl" | "2xl">;
|
|
45
|
+
default: () => any;
|
|
46
|
+
validator(value: string): boolean;
|
|
47
|
+
};
|
|
48
|
+
indicator: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
icon: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
class: {
|
|
57
|
+
type: PropType<any>;
|
|
58
|
+
default: undefined;
|
|
59
|
+
};
|
|
60
|
+
ui: {
|
|
61
|
+
type: PropType<Partial<any>>;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
}>>, {
|
|
65
|
+
icon: string;
|
|
66
|
+
ui: Partial<any>;
|
|
67
|
+
class: any;
|
|
68
|
+
size: "sm" | "md" | "xs" | "2xs" | "lg" | "xl" | "2xl";
|
|
69
|
+
max: number;
|
|
70
|
+
min: number;
|
|
71
|
+
indicator: boolean;
|
|
72
|
+
}, SlotsType<{
|
|
73
|
+
default?: any[] | undefined;
|
|
74
|
+
indicator?: {
|
|
75
|
+
percent: number;
|
|
76
|
+
} | undefined;
|
|
77
|
+
}>>;
|
|
78
|
+
export default _default;
|