windly-ui 1.0.2 → 1.0.3
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/{ui-library/dist → dist}/module.json +2 -2
- package/dist/module.mjs +26 -0
- package/dist/runtime/components/Accordion.d.vue.ts +39 -0
- package/dist/runtime/components/Accordion.vue +92 -0
- package/dist/runtime/components/Accordion.vue.d.ts +39 -0
- package/dist/runtime/components/Avatar.d.vue.ts +141 -0
- package/dist/runtime/components/Avatar.vue +72 -0
- package/dist/runtime/components/Avatar.vue.d.ts +141 -0
- package/dist/runtime/components/Badge.d.vue.ts +133 -0
- package/dist/runtime/components/Badge.vue +99 -0
- package/dist/runtime/components/Badge.vue.d.ts +133 -0
- package/dist/runtime/components/Breadcrumbs.d.vue.ts +83 -0
- package/dist/runtime/components/Breadcrumbs.vue +116 -0
- package/dist/runtime/components/Breadcrumbs.vue.d.ts +83 -0
- package/dist/runtime/components/Button.d.vue.ts +199 -0
- package/dist/runtime/components/Button.vue +125 -0
- package/dist/runtime/components/Button.vue.d.ts +199 -0
- package/dist/runtime/components/Card.d.vue.ts +83 -0
- package/dist/runtime/components/Card.vue +71 -0
- package/dist/runtime/components/Card.vue.d.ts +83 -0
- package/dist/runtime/components/Checkbox.d.vue.ts +190 -0
- package/dist/runtime/components/Checkbox.vue +125 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +190 -0
- package/dist/runtime/components/CodeBlock.d.vue.ts +16 -0
- package/dist/runtime/components/CodeBlock.vue +75 -0
- package/dist/runtime/components/CodeBlock.vue.d.ts +16 -0
- package/dist/runtime/components/ColorPicker.d.vue.ts +91 -0
- package/dist/runtime/components/ColorPicker.vue +244 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +91 -0
- package/dist/runtime/components/Date.d.vue.ts +137 -0
- package/dist/runtime/components/Date.vue +201 -0
- package/dist/runtime/components/Date.vue.d.ts +137 -0
- package/dist/runtime/components/Dialog.d.vue.ts +103 -0
- package/dist/runtime/components/Dialog.vue +152 -0
- package/dist/runtime/components/Dialog.vue.d.ts +103 -0
- package/dist/runtime/components/Divider.d.vue.ts +51 -0
- package/dist/runtime/components/Divider.vue +52 -0
- package/dist/runtime/components/Divider.vue.d.ts +51 -0
- package/dist/runtime/components/Drawer.d.vue.ts +30 -0
- package/dist/runtime/components/Drawer.vue +43 -0
- package/dist/runtime/components/Drawer.vue.d.ts +30 -0
- package/dist/runtime/components/Dropdown.d.vue.ts +34 -0
- package/dist/runtime/components/Dropdown.vue +127 -0
- package/dist/runtime/components/Dropdown.vue.d.ts +34 -0
- package/dist/runtime/components/FileUploader.d.vue.ts +58 -0
- package/dist/runtime/components/FileUploader.vue +202 -0
- package/dist/runtime/components/FileUploader.vue.d.ts +58 -0
- package/dist/runtime/components/Icon.d.vue.ts +41 -0
- package/dist/runtime/components/Icon.vue +66 -0
- package/dist/runtime/components/Icon.vue.d.ts +41 -0
- package/dist/runtime/components/Image.d.vue.ts +77 -0
- package/dist/runtime/components/Image.vue +61 -0
- package/dist/runtime/components/Image.vue.d.ts +77 -0
- package/dist/runtime/components/Input.d.vue.ts +66 -0
- package/dist/runtime/components/Input.vue +233 -0
- package/dist/runtime/components/Input.vue.d.ts +66 -0
- package/dist/runtime/components/Radio.d.vue.ts +41 -0
- package/dist/runtime/components/Radio.vue +222 -0
- package/dist/runtime/components/Radio.vue.d.ts +41 -0
- package/dist/runtime/components/ScrollArea.d.vue.ts +79 -0
- package/dist/runtime/components/ScrollArea.vue +36 -0
- package/dist/runtime/components/ScrollArea.vue.d.ts +79 -0
- package/dist/runtime/components/Select.d.vue.ts +43 -0
- package/dist/runtime/components/Select.vue +200 -0
- package/dist/runtime/components/Select.vue.d.ts +43 -0
- package/dist/runtime/components/Stepper.d.vue.ts +46 -0
- package/dist/runtime/components/Stepper.vue +218 -0
- package/dist/runtime/components/Stepper.vue.d.ts +46 -0
- package/dist/runtime/components/TabPanel.d.vue.ts +17 -0
- package/dist/runtime/components/TabPanel.vue +21 -0
- package/dist/runtime/components/TabPanel.vue.d.ts +17 -0
- package/dist/runtime/components/Table.d.vue.ts +40 -0
- package/dist/runtime/components/Table.vue +92 -0
- package/dist/runtime/components/Table.vue.d.ts +40 -0
- package/dist/runtime/components/Tabs.d.vue.ts +20 -0
- package/dist/runtime/components/Tabs.vue +62 -0
- package/dist/runtime/components/Tabs.vue.d.ts +20 -0
- package/dist/runtime/components/Textarea.d.vue.ts +208 -0
- package/dist/runtime/components/Textarea.vue +185 -0
- package/dist/runtime/components/Textarea.vue.d.ts +208 -0
- package/dist/runtime/components/Toggle.d.vue.ts +36 -0
- package/dist/runtime/components/Toggle.vue +173 -0
- package/dist/runtime/components/Toggle.vue.d.ts +36 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +63 -0
- package/dist/runtime/components/Tooltip.vue +144 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +63 -0
- package/dist/runtime/components/uiProps.d.ts +38 -0
- package/dist/runtime/components/uiProps.js +11 -0
- package/dist/runtime/components/useUiClasses.d.ts +43 -0
- package/dist/runtime/components/useUiClasses.js +124 -0
- package/dist/runtime/composables/plugin.d.ts +2 -0
- package/dist/runtime/composables/plugin.js +3 -0
- package/dist/runtime/tailwind-color.d.ts +2 -0
- package/dist/runtime/tailwind-color.js +5859 -0
- package/package.json +12 -46
- package/LICENSE +0 -21
- package/README.md +0 -232
- package/ui-library/dist/module.mjs +0 -22
- /package/{ui-library/dist → dist}/module.d.mts +0 -0
- /package/{ui-library/dist → dist}/types.d.mts +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineOptions({
|
|
3
|
+
inheritAttrs: false
|
|
4
|
+
});
|
|
5
|
+
import { useSlots, computed } from "vue";
|
|
6
|
+
import { useUiClasses } from "./useUiClasses";
|
|
7
|
+
import { uiProps } from "./uiProps";
|
|
8
|
+
const slots = useSlots();
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
content: { type: String, default: "" },
|
|
11
|
+
icon: { type: String, default: "" },
|
|
12
|
+
position: { type: String, default: "superscript" },
|
|
13
|
+
show: { type: Boolean, default: true },
|
|
14
|
+
...uiProps
|
|
15
|
+
});
|
|
16
|
+
const {
|
|
17
|
+
// props
|
|
18
|
+
contentClass,
|
|
19
|
+
contentStyle,
|
|
20
|
+
color,
|
|
21
|
+
size,
|
|
22
|
+
rounded,
|
|
23
|
+
// computed
|
|
24
|
+
colorClass,
|
|
25
|
+
computedContentClass,
|
|
26
|
+
isColorDark,
|
|
27
|
+
isHex,
|
|
28
|
+
isTailwindColor
|
|
29
|
+
} = useUiClasses(props);
|
|
30
|
+
const hasSlots = computed(() => {
|
|
31
|
+
return !!slots.default?.();
|
|
32
|
+
});
|
|
33
|
+
const sizeClass = computed(() => {
|
|
34
|
+
const map = {
|
|
35
|
+
xs: "w-auto min-w-2 h-2.5 text-[7px]",
|
|
36
|
+
sm: "w-auto min-w-3 h-3 text-[10px]",
|
|
37
|
+
md: "w-auto min-w-4 h-4 text-xs",
|
|
38
|
+
lg: "w-auto min-w-6 h-6 text-sm"
|
|
39
|
+
};
|
|
40
|
+
return map[size.value];
|
|
41
|
+
});
|
|
42
|
+
const roundedClass = computed(() => {
|
|
43
|
+
const map = {
|
|
44
|
+
xs: "rounded-xs",
|
|
45
|
+
sm: "rounded-sm",
|
|
46
|
+
md: "rounded",
|
|
47
|
+
lg: "rounded-lg",
|
|
48
|
+
full: "rounded-full"
|
|
49
|
+
};
|
|
50
|
+
return map[rounded.value];
|
|
51
|
+
});
|
|
52
|
+
const positionClasses = computed(
|
|
53
|
+
() => props.position === "superscript" && hasSlots.value ? "absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2" : ""
|
|
54
|
+
);
|
|
55
|
+
const badgeClass = computed(() => {
|
|
56
|
+
return [
|
|
57
|
+
"inline-flex items-center justify-center font-bold",
|
|
58
|
+
computedContentClass.value,
|
|
59
|
+
sizeClass.value,
|
|
60
|
+
roundedClass.value,
|
|
61
|
+
positionClasses.value,
|
|
62
|
+
isColorDark(color.value) ? "text-white" : "text-gray-700",
|
|
63
|
+
isTailwindColor(color.value) ? `bg-${color.value}` : ""
|
|
64
|
+
].filter((c) => !["", "!"].includes(c));
|
|
65
|
+
});
|
|
66
|
+
const badgeStyle = computed(() => {
|
|
67
|
+
const style = contentStyle.value;
|
|
68
|
+
return {
|
|
69
|
+
backgroundColor: isHex(color.value) ? color.value : void 0,
|
|
70
|
+
...typeof style === "object" && style ? style : {}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<template>
|
|
76
|
+
<div class="flex">
|
|
77
|
+
<div v-if="hasSlots" class="relative">
|
|
78
|
+
<slot />
|
|
79
|
+
<span v-if="show" :class="[
|
|
80
|
+
badgeClass
|
|
81
|
+
]" :style="[badgeStyle]">
|
|
82
|
+
<span v-if="icon" class="p-1 material-icons">{{ icon }}</span>
|
|
83
|
+
<span v-if="content" class="p-1">{{ content }}</span>
|
|
84
|
+
</span>
|
|
85
|
+
</div>
|
|
86
|
+
<div v-else>
|
|
87
|
+
<span v-if="show" :class="[
|
|
88
|
+
badgeClass
|
|
89
|
+
]" :style="[badgeStyle]">
|
|
90
|
+
<span v-if="icon" class="p-1 material-icons">{{ icon }}</span>
|
|
91
|
+
<span v-if="content" class="p-1">{{ content }}</span>
|
|
92
|
+
</span>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<style scoped>
|
|
98
|
+
.material-icons{font-size:1em}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
contentClass: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
contentStyle: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
textColor: {
|
|
15
|
+
readonly type: StringConstructor;
|
|
16
|
+
readonly default: "";
|
|
17
|
+
};
|
|
18
|
+
disable: {
|
|
19
|
+
readonly type: BooleanConstructor;
|
|
20
|
+
readonly default: false;
|
|
21
|
+
};
|
|
22
|
+
loading: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: false;
|
|
25
|
+
};
|
|
26
|
+
color: {
|
|
27
|
+
readonly type: StringConstructor;
|
|
28
|
+
readonly default: "blue-900";
|
|
29
|
+
};
|
|
30
|
+
rounded: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "md";
|
|
33
|
+
};
|
|
34
|
+
size: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: "md";
|
|
37
|
+
};
|
|
38
|
+
iconSize: {
|
|
39
|
+
readonly type: StringConstructor;
|
|
40
|
+
readonly default: "lg";
|
|
41
|
+
};
|
|
42
|
+
content: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
icon: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
position: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
show: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
contentClass: {
|
|
60
|
+
readonly type: StringConstructor;
|
|
61
|
+
readonly default: "";
|
|
62
|
+
};
|
|
63
|
+
contentStyle: {
|
|
64
|
+
readonly type: StringConstructor;
|
|
65
|
+
readonly default: "";
|
|
66
|
+
};
|
|
67
|
+
textColor: {
|
|
68
|
+
readonly type: StringConstructor;
|
|
69
|
+
readonly default: "";
|
|
70
|
+
};
|
|
71
|
+
disable: {
|
|
72
|
+
readonly type: BooleanConstructor;
|
|
73
|
+
readonly default: false;
|
|
74
|
+
};
|
|
75
|
+
loading: {
|
|
76
|
+
readonly type: BooleanConstructor;
|
|
77
|
+
readonly default: false;
|
|
78
|
+
};
|
|
79
|
+
color: {
|
|
80
|
+
readonly type: StringConstructor;
|
|
81
|
+
readonly default: "blue-900";
|
|
82
|
+
};
|
|
83
|
+
rounded: {
|
|
84
|
+
readonly type: StringConstructor;
|
|
85
|
+
readonly default: "md";
|
|
86
|
+
};
|
|
87
|
+
size: {
|
|
88
|
+
readonly type: StringConstructor;
|
|
89
|
+
readonly default: "md";
|
|
90
|
+
};
|
|
91
|
+
iconSize: {
|
|
92
|
+
readonly type: StringConstructor;
|
|
93
|
+
readonly default: "lg";
|
|
94
|
+
};
|
|
95
|
+
content: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
icon: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
103
|
+
position: {
|
|
104
|
+
type: StringConstructor;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
show: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
}>> & Readonly<{}>, {
|
|
112
|
+
contentClass: string;
|
|
113
|
+
contentStyle: string;
|
|
114
|
+
textColor: string;
|
|
115
|
+
disable: boolean;
|
|
116
|
+
loading: boolean;
|
|
117
|
+
color: string;
|
|
118
|
+
rounded: string;
|
|
119
|
+
size: string;
|
|
120
|
+
iconSize: string;
|
|
121
|
+
content: string;
|
|
122
|
+
icon: string;
|
|
123
|
+
position: string;
|
|
124
|
+
show: boolean;
|
|
125
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
126
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
127
|
+
declare const _default: typeof __VLS_export;
|
|
128
|
+
export default _default;
|
|
129
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
130
|
+
new (): {
|
|
131
|
+
$slots: S;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
type BreadcrumbItem = {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
caption?: string;
|
|
5
|
+
to?: string | object;
|
|
6
|
+
href?: string;
|
|
7
|
+
target?: string;
|
|
8
|
+
tag?: string;
|
|
9
|
+
exact?: boolean;
|
|
10
|
+
replace?: boolean;
|
|
11
|
+
activeClass?: string;
|
|
12
|
+
exactActiveClass?: string;
|
|
13
|
+
disable?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_7: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
separator?: (props: typeof __VLS_7) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
|
+
items: {
|
|
21
|
+
type: () => BreadcrumbItem[];
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
separator: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
gutter: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
align: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
activeColor: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
separatorColor: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
items: {
|
|
46
|
+
type: () => BreadcrumbItem[];
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
separator: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
gutter: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
align: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
activeColor: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
separatorColor: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{}>, {
|
|
70
|
+
separator: string;
|
|
71
|
+
gutter: string;
|
|
72
|
+
align: string;
|
|
73
|
+
activeColor: string;
|
|
74
|
+
separatorColor: string;
|
|
75
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
76
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
77
|
+
declare const _default: typeof __VLS_export;
|
|
78
|
+
export default _default;
|
|
79
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
80
|
+
new (): {
|
|
81
|
+
$slots: S;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { RouterLink, useRoute } from "vue-router";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
items: {
|
|
6
|
+
type: Array,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
separator: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "/"
|
|
12
|
+
},
|
|
13
|
+
gutter: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "0.5rem"
|
|
16
|
+
},
|
|
17
|
+
align: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "start"
|
|
20
|
+
// start | center | end
|
|
21
|
+
},
|
|
22
|
+
activeColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "primary"
|
|
25
|
+
},
|
|
26
|
+
separatorColor: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "grey-6"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const route = useRoute();
|
|
32
|
+
const alignmentClass = computed(() => {
|
|
33
|
+
switch (props.align) {
|
|
34
|
+
case "center":
|
|
35
|
+
return "justify-center";
|
|
36
|
+
case "end":
|
|
37
|
+
return "justify-end";
|
|
38
|
+
default:
|
|
39
|
+
return "justify-start";
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
function resolveTag(item) {
|
|
43
|
+
if (item.disable) return item.tag || "span";
|
|
44
|
+
if (item.href) return "a";
|
|
45
|
+
if (item.to) return RouterLink;
|
|
46
|
+
return item.tag || "span";
|
|
47
|
+
}
|
|
48
|
+
function resolveProps(item) {
|
|
49
|
+
if (item.href) {
|
|
50
|
+
return {
|
|
51
|
+
href: item.href,
|
|
52
|
+
target: item.target
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (item.to) {
|
|
56
|
+
return {
|
|
57
|
+
to: item.to,
|
|
58
|
+
exact: item.exact,
|
|
59
|
+
replace: item.replace,
|
|
60
|
+
activeClass: item.activeClass,
|
|
61
|
+
exactActiveClass: item.exactActiveClass
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return {};
|
|
65
|
+
}
|
|
66
|
+
function isActive(item) {
|
|
67
|
+
if (!item.to) return false;
|
|
68
|
+
return route.path === item.to;
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<nav
|
|
74
|
+
class="flex items-center"
|
|
75
|
+
:class="alignmentClass"
|
|
76
|
+
aria-label="Breadcrumbs"
|
|
77
|
+
>
|
|
78
|
+
<template v-for="(item, index) in items" :key="index">
|
|
79
|
+
<!-- Item -->
|
|
80
|
+
<component
|
|
81
|
+
:is="resolveTag(item)"
|
|
82
|
+
v-bind="resolveProps(item)"
|
|
83
|
+
class="flex items-center gap-1"
|
|
84
|
+
:class="[
|
|
85
|
+
item.disable && 'opacity-50 pointer-events-none',
|
|
86
|
+
isActive(item) && `text-${activeColor}`
|
|
87
|
+
]"
|
|
88
|
+
>
|
|
89
|
+
<span v-if="item.icon && item.icon !== 'none'" class="material-icons">
|
|
90
|
+
{{ item.icon }}
|
|
91
|
+
</span>
|
|
92
|
+
|
|
93
|
+
<span>{{ item.label }}</span>
|
|
94
|
+
|
|
95
|
+
<small
|
|
96
|
+
v-if="item.caption"
|
|
97
|
+
class="block text-xs opacity-70"
|
|
98
|
+
>
|
|
99
|
+
{{ item.caption }}
|
|
100
|
+
</small>
|
|
101
|
+
</component>
|
|
102
|
+
|
|
103
|
+
<!-- Separator -->
|
|
104
|
+
<span
|
|
105
|
+
v-if="index < items.length - 1"
|
|
106
|
+
class="select-none"
|
|
107
|
+
:style="{ marginInline: gutter }"
|
|
108
|
+
:class="`text-${separatorColor}`"
|
|
109
|
+
>
|
|
110
|
+
<slot name="separator">
|
|
111
|
+
{{ separator }}
|
|
112
|
+
</slot>
|
|
113
|
+
</span>
|
|
114
|
+
</template>
|
|
115
|
+
</nav>
|
|
116
|
+
</template>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
type BreadcrumbItem = {
|
|
2
|
+
label: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
caption?: string;
|
|
5
|
+
to?: string | object;
|
|
6
|
+
href?: string;
|
|
7
|
+
target?: string;
|
|
8
|
+
tag?: string;
|
|
9
|
+
exact?: boolean;
|
|
10
|
+
replace?: boolean;
|
|
11
|
+
activeClass?: string;
|
|
12
|
+
exactActiveClass?: string;
|
|
13
|
+
disable?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare var __VLS_7: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
separator?: (props: typeof __VLS_7) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
|
+
items: {
|
|
21
|
+
type: () => BreadcrumbItem[];
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
separator: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
gutter: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
align: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
activeColor: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
separatorColor: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
items: {
|
|
46
|
+
type: () => BreadcrumbItem[];
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
separator: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
gutter: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
align: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
activeColor: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
separatorColor: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{}>, {
|
|
70
|
+
separator: string;
|
|
71
|
+
gutter: string;
|
|
72
|
+
align: string;
|
|
73
|
+
activeColor: string;
|
|
74
|
+
separatorColor: string;
|
|
75
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
76
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
77
|
+
declare const _default: typeof __VLS_export;
|
|
78
|
+
export default _default;
|
|
79
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
80
|
+
new (): {
|
|
81
|
+
$slots: S;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
contentClass: {
|
|
3
|
+
readonly type: StringConstructor;
|
|
4
|
+
readonly default: "";
|
|
5
|
+
};
|
|
6
|
+
contentStyle: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
textColor: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: "";
|
|
13
|
+
};
|
|
14
|
+
disable: {
|
|
15
|
+
readonly type: BooleanConstructor;
|
|
16
|
+
readonly default: false;
|
|
17
|
+
};
|
|
18
|
+
loading: {
|
|
19
|
+
readonly type: BooleanConstructor;
|
|
20
|
+
readonly default: false;
|
|
21
|
+
};
|
|
22
|
+
color: {
|
|
23
|
+
readonly type: StringConstructor;
|
|
24
|
+
readonly default: "blue-900";
|
|
25
|
+
};
|
|
26
|
+
rounded: {
|
|
27
|
+
readonly type: StringConstructor;
|
|
28
|
+
readonly default: "md";
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "md";
|
|
33
|
+
};
|
|
34
|
+
iconSize: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: "lg";
|
|
37
|
+
};
|
|
38
|
+
label: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: null;
|
|
41
|
+
};
|
|
42
|
+
to: {
|
|
43
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
44
|
+
default: null;
|
|
45
|
+
};
|
|
46
|
+
outline: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
flat: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
unelevated: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
dense: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
stacked: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
gradient: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
color2: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
icon: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: null;
|
|
77
|
+
};
|
|
78
|
+
iconColor: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: null;
|
|
81
|
+
};
|
|
82
|
+
iconPosition: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
87
|
+
click: (...args: any[]) => void;
|
|
88
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
+
contentClass: {
|
|
90
|
+
readonly type: StringConstructor;
|
|
91
|
+
readonly default: "";
|
|
92
|
+
};
|
|
93
|
+
contentStyle: {
|
|
94
|
+
readonly type: StringConstructor;
|
|
95
|
+
readonly default: "";
|
|
96
|
+
};
|
|
97
|
+
textColor: {
|
|
98
|
+
readonly type: StringConstructor;
|
|
99
|
+
readonly default: "";
|
|
100
|
+
};
|
|
101
|
+
disable: {
|
|
102
|
+
readonly type: BooleanConstructor;
|
|
103
|
+
readonly default: false;
|
|
104
|
+
};
|
|
105
|
+
loading: {
|
|
106
|
+
readonly type: BooleanConstructor;
|
|
107
|
+
readonly default: false;
|
|
108
|
+
};
|
|
109
|
+
color: {
|
|
110
|
+
readonly type: StringConstructor;
|
|
111
|
+
readonly default: "blue-900";
|
|
112
|
+
};
|
|
113
|
+
rounded: {
|
|
114
|
+
readonly type: StringConstructor;
|
|
115
|
+
readonly default: "md";
|
|
116
|
+
};
|
|
117
|
+
size: {
|
|
118
|
+
readonly type: StringConstructor;
|
|
119
|
+
readonly default: "md";
|
|
120
|
+
};
|
|
121
|
+
iconSize: {
|
|
122
|
+
readonly type: StringConstructor;
|
|
123
|
+
readonly default: "lg";
|
|
124
|
+
};
|
|
125
|
+
label: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
default: null;
|
|
128
|
+
};
|
|
129
|
+
to: {
|
|
130
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
131
|
+
default: null;
|
|
132
|
+
};
|
|
133
|
+
outline: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: boolean;
|
|
136
|
+
};
|
|
137
|
+
flat: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
default: boolean;
|
|
140
|
+
};
|
|
141
|
+
unelevated: {
|
|
142
|
+
type: BooleanConstructor;
|
|
143
|
+
default: boolean;
|
|
144
|
+
};
|
|
145
|
+
dense: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
default: boolean;
|
|
148
|
+
};
|
|
149
|
+
stacked: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
gradient: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: boolean;
|
|
156
|
+
};
|
|
157
|
+
color2: {
|
|
158
|
+
type: StringConstructor;
|
|
159
|
+
default: string;
|
|
160
|
+
};
|
|
161
|
+
icon: {
|
|
162
|
+
type: StringConstructor;
|
|
163
|
+
default: null;
|
|
164
|
+
};
|
|
165
|
+
iconColor: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
default: null;
|
|
168
|
+
};
|
|
169
|
+
iconPosition: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
default: string;
|
|
172
|
+
};
|
|
173
|
+
}>> & Readonly<{
|
|
174
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
175
|
+
}>, {
|
|
176
|
+
dense: boolean;
|
|
177
|
+
label: string;
|
|
178
|
+
contentClass: string;
|
|
179
|
+
contentStyle: string;
|
|
180
|
+
textColor: string;
|
|
181
|
+
disable: boolean;
|
|
182
|
+
loading: boolean;
|
|
183
|
+
color: string;
|
|
184
|
+
rounded: string;
|
|
185
|
+
size: string;
|
|
186
|
+
iconSize: string;
|
|
187
|
+
icon: string;
|
|
188
|
+
to: string | Record<string, any>;
|
|
189
|
+
outline: boolean;
|
|
190
|
+
flat: boolean;
|
|
191
|
+
unelevated: boolean;
|
|
192
|
+
stacked: boolean;
|
|
193
|
+
gradient: boolean;
|
|
194
|
+
color2: string;
|
|
195
|
+
iconColor: string;
|
|
196
|
+
iconPosition: string;
|
|
197
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
198
|
+
declare const _default: typeof __VLS_export;
|
|
199
|
+
export default _default;
|