sprintify-ui 0.0.189 → 0.0.191
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/sprintify-ui.es.js +3268 -3253
- package/dist/style.css +1 -1
- package/dist/types/src/components/BaseActionItem.vue.d.ts +22 -33
- package/dist/types/src/components/BaseAlert.vue.d.ts +3 -3
- package/dist/types/src/components/BaseAppDialogs.vue.d.ts +1 -1
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +1 -1
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +1 -1
- package/dist/types/src/components/BaseBadge.vue.d.ts +2 -0
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +1 -1
- package/dist/types/src/components/BaseButtonGroup.vue.d.ts +1 -1
- package/dist/types/src/components/BaseColor.vue.d.ts +1 -1
- package/dist/types/src/components/BaseCounter.vue.d.ts +3 -3
- package/dist/types/src/components/BaseDataTable.vue.d.ts +0 -3
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +1 -1
- package/dist/types/src/components/BaseDateSelect.vue.d.ts +1 -1
- package/dist/types/src/components/BaseDialog.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDropdownAutocomplete.vue.d.ts +1 -1
- package/dist/types/src/components/BaseField.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFieldI18n.vue.d.ts +1 -1
- package/dist/types/src/components/BaseInput.vue.d.ts +3 -3
- package/dist/types/src/components/BaseInputPercent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseMenu.vue.d.ts +3 -3
- package/dist/types/src/components/BaseMenuItem.vue.d.ts +3 -3
- package/dist/types/src/components/BaseNavbarItemContent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNavbarSideItemContent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNumber.vue.d.ts +4 -4
- package/dist/types/src/components/BasePassword.vue.d.ts +1 -1
- package/dist/types/src/components/BaseRadioGroup.vue.d.ts +1 -1
- package/dist/types/src/components/BaseRichText.vue.d.ts +4 -4
- package/dist/types/src/components/BaseSelect.vue.d.ts +1 -1
- package/dist/types/src/components/BaseShortcut.vue.d.ts +23 -4
- package/dist/types/src/components/BaseStatistic.vue.d.ts +1 -1
- package/dist/types/src/components/BaseSwitch.vue.d.ts +4 -4
- package/dist/types/src/components/BaseSystemAlert.vue.d.ts +3 -3
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTextarea.vue.d.ts +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/BaseActionItem.vue +21 -28
- package/src/components/BaseBadge.stories.js +26 -0
- package/src/components/BaseBadge.vue +17 -3
- package/src/components/BaseDataIteratorSectionButton.vue +6 -0
- package/src/components/BaseDataTable.vue +1 -3
- package/src/components/BaseNavbarItem.vue +4 -2
- package/src/components/BaseNavbarSideItem.vue +8 -5
- package/src/components/BaseShortcut.stories.js +20 -1
- package/src/components/BaseShortcut.vue +13 -4
- package/src/components/BaseTable.vue +1 -1
- package/src/types/index.ts +1 -0
|
@@ -81,9 +81,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
81
|
}>> & {
|
|
82
82
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
83
83
|
}, {
|
|
84
|
+
name: string;
|
|
84
85
|
label: string;
|
|
85
86
|
required: boolean;
|
|
86
|
-
name: string;
|
|
87
87
|
modelValue: {
|
|
88
88
|
[locale: string]: string | number | boolean;
|
|
89
89
|
} | null;
|
|
@@ -68,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
68
|
type: NumberConstructor;
|
|
69
69
|
};
|
|
70
70
|
mask: {
|
|
71
|
-
type: (
|
|
71
|
+
type: (ArrayConstructor | StringConstructor | FunctionConstructor)[];
|
|
72
72
|
default(): null;
|
|
73
73
|
};
|
|
74
74
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur")[], "update:modelValue" | "focus" | "blur", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -140,7 +140,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
140
|
type: NumberConstructor;
|
|
141
141
|
};
|
|
142
142
|
mask: {
|
|
143
|
-
type: (
|
|
143
|
+
type: (ArrayConstructor | StringConstructor | FunctionConstructor)[];
|
|
144
144
|
default(): null;
|
|
145
145
|
};
|
|
146
146
|
}>> & {
|
|
@@ -148,11 +148,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
148
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
149
149
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
150
150
|
}, {
|
|
151
|
-
required: boolean;
|
|
152
151
|
type: string;
|
|
153
152
|
name: string;
|
|
154
153
|
mask: string | Function | unknown[];
|
|
155
154
|
step: number;
|
|
155
|
+
required: boolean;
|
|
156
156
|
modelValue: string | number | null;
|
|
157
157
|
placeholder: string;
|
|
158
158
|
disabled: boolean;
|
|
@@ -118,9 +118,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
119
119
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
120
120
|
}, {
|
|
121
|
-
required: boolean;
|
|
122
121
|
name: string;
|
|
123
122
|
step: number;
|
|
123
|
+
required: boolean;
|
|
124
124
|
icon: string;
|
|
125
125
|
modelValue: string | number | null;
|
|
126
126
|
placeholder: string;
|
|
@@ -7,7 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
7
7
|
};
|
|
8
8
|
menuClass: {
|
|
9
9
|
default: string;
|
|
10
|
-
type: (ObjectConstructor |
|
|
10
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
|
|
11
11
|
};
|
|
12
12
|
position: {
|
|
13
13
|
default: string;
|
|
@@ -24,7 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
24
24
|
};
|
|
25
25
|
menuClass: {
|
|
26
26
|
default: string;
|
|
27
|
-
type: (ObjectConstructor |
|
|
27
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor)[];
|
|
28
28
|
};
|
|
29
29
|
position: {
|
|
30
30
|
default: string;
|
|
@@ -37,7 +37,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
37
37
|
}>>, {
|
|
38
38
|
size: "xs" | "sm" | "md";
|
|
39
39
|
items: MenuItemInterface[];
|
|
40
|
-
menuClass: string | Record<string, any
|
|
40
|
+
menuClass: string | unknown[] | Record<string, any>;
|
|
41
41
|
position: "custom" | "bottom-left" | "bottom-right";
|
|
42
42
|
}>, {
|
|
43
43
|
button: (_: {
|
|
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
};
|
|
19
19
|
color: {
|
|
20
20
|
default: string;
|
|
21
|
-
type: PropType<"
|
|
21
|
+
type: PropType<"success" | "danger" | "warning" | "dark" | "light">;
|
|
22
22
|
};
|
|
23
23
|
size: {
|
|
24
24
|
default: string;
|
|
@@ -43,7 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
};
|
|
44
44
|
color: {
|
|
45
45
|
default: string;
|
|
46
|
-
type: PropType<"
|
|
46
|
+
type: PropType<"success" | "danger" | "warning" | "dark" | "light">;
|
|
47
47
|
};
|
|
48
48
|
size: {
|
|
49
49
|
default: string;
|
|
@@ -52,7 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
}>>, {
|
|
53
53
|
label: string;
|
|
54
54
|
active: boolean;
|
|
55
|
-
color: "
|
|
55
|
+
color: "success" | "danger" | "warning" | "dark" | "light";
|
|
56
56
|
icon: string;
|
|
57
57
|
count: number;
|
|
58
58
|
size: "xs" | "sm" | "md";
|
|
@@ -45,7 +45,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
};
|
|
46
46
|
rounded: {
|
|
47
47
|
default: string;
|
|
48
|
-
type: PropType<"
|
|
48
|
+
type: PropType<"full" | "left" | "right" | "none">;
|
|
49
49
|
};
|
|
50
50
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "keydown")[], "update:modelValue" | "focus" | "blur" | "keydown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
51
|
modelValue: {
|
|
@@ -93,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
93
|
};
|
|
94
94
|
rounded: {
|
|
95
95
|
default: string;
|
|
96
|
-
type: PropType<"
|
|
96
|
+
type: PropType<"full" | "left" | "right" | "none">;
|
|
97
97
|
};
|
|
98
98
|
}>> & {
|
|
99
99
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -101,9 +101,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
101
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
102
102
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
103
103
|
}, {
|
|
104
|
-
required: boolean;
|
|
105
104
|
name: string;
|
|
106
105
|
step: number;
|
|
106
|
+
required: boolean;
|
|
107
107
|
modelValue: number | null;
|
|
108
108
|
placeholder: string;
|
|
109
109
|
disabled: boolean;
|
|
@@ -111,6 +111,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
111
|
max: number;
|
|
112
112
|
hasError: boolean;
|
|
113
113
|
borderless: boolean;
|
|
114
|
-
rounded: "
|
|
114
|
+
rounded: "full" | "left" | "right" | "none";
|
|
115
115
|
}>;
|
|
116
116
|
export default _default;
|
|
@@ -52,8 +52,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
}>> & {
|
|
53
53
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
54
54
|
}, {
|
|
55
|
-
required: boolean;
|
|
56
55
|
name: string;
|
|
56
|
+
required: boolean;
|
|
57
57
|
modelValue: string | null;
|
|
58
58
|
placeholder: string;
|
|
59
59
|
disabled: boolean;
|
|
@@ -85,8 +85,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
85
85
|
}>> & {
|
|
86
86
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
87
87
|
}, {
|
|
88
|
-
required: boolean;
|
|
89
88
|
name: string;
|
|
89
|
+
required: boolean;
|
|
90
90
|
labelClass: string;
|
|
91
91
|
modelValue: OptionValue | undefined;
|
|
92
92
|
disabled: boolean;
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
default: string;
|
|
13
13
|
};
|
|
14
14
|
toolbar: {
|
|
15
|
-
type: PropType<string | Record<string, any> |
|
|
15
|
+
type: PropType<string | unknown[] | Record<string, any> | undefined>;
|
|
16
16
|
default(): string[];
|
|
17
17
|
};
|
|
18
18
|
placeholder: {
|
|
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
51
|
toolbar: {
|
|
52
|
-
type: PropType<string | Record<string, any> |
|
|
52
|
+
type: PropType<string | unknown[] | Record<string, any> | undefined>;
|
|
53
53
|
default(): string[];
|
|
54
54
|
};
|
|
55
55
|
placeholder: {
|
|
@@ -79,14 +79,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
}>> & {
|
|
80
80
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
81
81
|
}, {
|
|
82
|
-
required: boolean;
|
|
83
82
|
name: string;
|
|
83
|
+
required: boolean;
|
|
84
84
|
modelValue: string | Delta | null | undefined;
|
|
85
85
|
placeholder: string;
|
|
86
86
|
disabled: boolean;
|
|
87
87
|
hasError: boolean;
|
|
88
88
|
enable: boolean;
|
|
89
|
-
toolbar: string | Record<string, any> |
|
|
89
|
+
toolbar: string | unknown[] | Record<string, any> | undefined;
|
|
90
90
|
theme: "" | "snow" | "bubble";
|
|
91
91
|
}>;
|
|
92
92
|
export default _default;
|
|
@@ -77,8 +77,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
77
77
|
}>> & {
|
|
78
78
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
}, {
|
|
80
|
-
required: boolean;
|
|
81
80
|
name: string;
|
|
81
|
+
required: boolean;
|
|
82
82
|
modelValue: (string | number | null) | undefined;
|
|
83
83
|
placeholder: string;
|
|
84
84
|
disabled: boolean;
|
|
@@ -2,8 +2,16 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { RouteLocationRaw } from 'vue-router';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
to: {
|
|
5
|
-
|
|
6
|
-
type: PropType<RouteLocationRaw>;
|
|
5
|
+
default: undefined;
|
|
6
|
+
type: PropType<RouteLocationRaw | undefined>;
|
|
7
|
+
};
|
|
8
|
+
href: {
|
|
9
|
+
default: undefined;
|
|
10
|
+
type: PropType<string | undefined>;
|
|
11
|
+
};
|
|
12
|
+
action: {
|
|
13
|
+
default: undefined;
|
|
14
|
+
type: PropType<() => Promise<void> | undefined>;
|
|
7
15
|
};
|
|
8
16
|
title: {
|
|
9
17
|
required: true;
|
|
@@ -31,8 +39,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
39
|
};
|
|
32
40
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
41
|
to: {
|
|
34
|
-
|
|
35
|
-
type: PropType<RouteLocationRaw>;
|
|
42
|
+
default: undefined;
|
|
43
|
+
type: PropType<RouteLocationRaw | undefined>;
|
|
44
|
+
};
|
|
45
|
+
href: {
|
|
46
|
+
default: undefined;
|
|
47
|
+
type: PropType<string | undefined>;
|
|
48
|
+
};
|
|
49
|
+
action: {
|
|
50
|
+
default: undefined;
|
|
51
|
+
type: PropType<() => Promise<void> | undefined>;
|
|
36
52
|
};
|
|
37
53
|
title: {
|
|
38
54
|
required: true;
|
|
@@ -59,6 +75,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
75
|
type: PropType<"high" | "low">;
|
|
60
76
|
};
|
|
61
77
|
}>>, {
|
|
78
|
+
to: RouteLocationRaw | undefined;
|
|
79
|
+
href: string | undefined;
|
|
80
|
+
action: () => Promise<void> | undefined;
|
|
62
81
|
color: string;
|
|
63
82
|
description: string;
|
|
64
83
|
contrast: "high" | "low";
|
|
@@ -10,7 +10,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
10
10
|
};
|
|
11
11
|
color: {
|
|
12
12
|
default: string;
|
|
13
|
-
type: PropType<"
|
|
13
|
+
type: PropType<"success" | "info" | "danger" | "warning" | "dark" | "light" | "primary">;
|
|
14
14
|
};
|
|
15
15
|
size: {
|
|
16
16
|
default: string;
|
|
@@ -35,7 +35,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
};
|
|
36
36
|
color: {
|
|
37
37
|
default: string;
|
|
38
|
-
type: PropType<"
|
|
38
|
+
type: PropType<"success" | "info" | "danger" | "warning" | "dark" | "light" | "primary">;
|
|
39
39
|
};
|
|
40
40
|
size: {
|
|
41
41
|
default: string;
|
|
@@ -52,9 +52,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
52
52
|
}>> & {
|
|
53
53
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
54
54
|
}, {
|
|
55
|
-
required: boolean;
|
|
56
55
|
name: string;
|
|
57
|
-
color: "
|
|
56
|
+
color: "success" | "info" | "danger" | "warning" | "dark" | "light" | "primary";
|
|
57
|
+
required: boolean;
|
|
58
58
|
modelValue: string | number | boolean | null | undefined;
|
|
59
59
|
hasError: boolean;
|
|
60
60
|
size: "base" | "xs" | "sm" | "lg" | "xl";
|
|
@@ -11,7 +11,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
color: {
|
|
13
13
|
default: string;
|
|
14
|
-
type: PropType<"
|
|
14
|
+
type: PropType<"success" | "info" | "danger" | "warning">;
|
|
15
15
|
};
|
|
16
16
|
closable: {
|
|
17
17
|
default: boolean;
|
|
@@ -28,7 +28,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
28
28
|
};
|
|
29
29
|
color: {
|
|
30
30
|
default: string;
|
|
31
|
-
type: PropType<"
|
|
31
|
+
type: PropType<"success" | "info" | "danger" | "warning">;
|
|
32
32
|
};
|
|
33
33
|
closable: {
|
|
34
34
|
default: boolean;
|
|
@@ -38,8 +38,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
38
38
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
39
39
|
}, {
|
|
40
40
|
to: RouteLocationRaw | undefined;
|
|
41
|
-
color: "danger" | "success" | "warning" | "info";
|
|
42
41
|
action: () => Promise<void> | void;
|
|
42
|
+
color: "success" | "info" | "danger" | "warning";
|
|
43
43
|
closable: boolean;
|
|
44
44
|
}>, {
|
|
45
45
|
default: (_: {}) => any;
|
|
@@ -153,8 +153,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
153
153
|
default: () => {};
|
|
154
154
|
};
|
|
155
155
|
}>>, {
|
|
156
|
+
meta: unknown[] | Record<string, any>;
|
|
156
157
|
label: string;
|
|
157
|
-
meta: Record<string, any> | unknown[];
|
|
158
158
|
toggle: boolean;
|
|
159
159
|
width: number;
|
|
160
160
|
field: string;
|
|
@@ -144,8 +144,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
144
144
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
145
145
|
}, {
|
|
146
146
|
filter: (option: NormalizedOption) => boolean;
|
|
147
|
-
required: boolean;
|
|
148
147
|
name: string;
|
|
148
|
+
required: boolean;
|
|
149
149
|
placeholder: string;
|
|
150
150
|
disabled: boolean;
|
|
151
151
|
max: number;
|
|
@@ -84,9 +84,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
84
|
}>> & {
|
|
85
85
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
86
86
|
}, {
|
|
87
|
-
required: boolean;
|
|
88
87
|
type: string;
|
|
89
88
|
name: string;
|
|
89
|
+
required: boolean;
|
|
90
90
|
modelValue: string | null | undefined;
|
|
91
91
|
placeholder: string;
|
|
92
92
|
disabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<RouterLink
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="to"
|
|
4
4
|
v-slot="{ isActive, href: slotHref, navigate }"
|
|
5
5
|
custom
|
|
6
|
-
:to="
|
|
6
|
+
:to="to"
|
|
7
7
|
>
|
|
8
8
|
<a
|
|
9
9
|
:active="isActive"
|
|
10
10
|
:href="slotHref"
|
|
11
|
-
:class="
|
|
11
|
+
:class="props.class"
|
|
12
12
|
:aria-current="isActive ? 'page' : undefined"
|
|
13
13
|
@click.prevent="onClick(navigate)"
|
|
14
14
|
>
|
|
@@ -16,41 +16,34 @@
|
|
|
16
16
|
</a>
|
|
17
17
|
</RouterLink>
|
|
18
18
|
<button
|
|
19
|
-
v-else-if="
|
|
19
|
+
v-else-if="action"
|
|
20
20
|
type="button"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
class="text-left"
|
|
22
|
+
:class="props.class"
|
|
23
|
+
@click="onClick(action)"
|
|
23
24
|
>
|
|
24
25
|
<slot :active="false"> </slot>
|
|
25
26
|
</button>
|
|
26
|
-
<a
|
|
27
|
-
v-else-if="item.href"
|
|
28
|
-
:href="item.href"
|
|
29
|
-
:class="itemClass"
|
|
30
|
-
@click="onClick()"
|
|
31
|
-
>
|
|
27
|
+
<a v-else-if="href" :href="href" :class="props.class" @click="onClick()">
|
|
32
28
|
<slot :active="false"> </slot>
|
|
33
29
|
</a>
|
|
34
30
|
</template>
|
|
35
31
|
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
export default {
|
|
34
|
+
inheritAttrs: false,
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
36
38
|
<script setup lang="ts">
|
|
37
|
-
import {
|
|
38
|
-
import { ActionItem } from '@/types';
|
|
39
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
39
40
|
|
|
40
|
-
defineProps
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
default: false,
|
|
47
|
-
type: Boolean,
|
|
48
|
-
},
|
|
49
|
-
itemClass: {
|
|
50
|
-
default: '',
|
|
51
|
-
type: [String, Array, Object],
|
|
52
|
-
},
|
|
53
|
-
});
|
|
41
|
+
const props = defineProps<{
|
|
42
|
+
to?: RouteLocationRaw;
|
|
43
|
+
href?: string;
|
|
44
|
+
action?: (() => Promise<void>) | (() => void);
|
|
45
|
+
class?: string | string[] | null;
|
|
46
|
+
}>();
|
|
54
47
|
|
|
55
48
|
const closeMenu = inject('closeMenu', () => {
|
|
56
49
|
return;
|
|
@@ -96,3 +96,29 @@ export const Sizes = (args) => ({
|
|
|
96
96
|
</div>
|
|
97
97
|
`,
|
|
98
98
|
});
|
|
99
|
+
|
|
100
|
+
export const Wrap = (args) => ({
|
|
101
|
+
components: { BaseBadge },
|
|
102
|
+
setup() {
|
|
103
|
+
return { args, colors, sizes };
|
|
104
|
+
},
|
|
105
|
+
template: `
|
|
106
|
+
<div style="width: 200px; background-color: #eee; padding: 10px;">
|
|
107
|
+
|
|
108
|
+
<p class="text-xs text-slate-600 leading-tight mb-1">No Wrap</p>
|
|
109
|
+
|
|
110
|
+
<BaseBadge v-bind="args" :color="color" icon="heroicons:beaker-20-solid">
|
|
111
|
+
Administrator And More And More And More
|
|
112
|
+
</BaseBadge>
|
|
113
|
+
|
|
114
|
+
<br />
|
|
115
|
+
<br />
|
|
116
|
+
|
|
117
|
+
<p class="text-xs text-slate-600 leading-tight mb-1">Wrap</p>
|
|
118
|
+
|
|
119
|
+
<BaseBadge v-bind="args" :color="color" wrap icon="heroicons:beaker-20-solid">
|
|
120
|
+
Administrator And More And More And More
|
|
121
|
+
</BaseBadge>
|
|
122
|
+
</div>
|
|
123
|
+
`,
|
|
124
|
+
});
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span
|
|
3
|
-
class="inline-flex items-center rounded-full font-medium"
|
|
4
|
-
:class="[sizeClasses]"
|
|
3
|
+
class="inline-flex items-center rounded-full font-medium leading-tight"
|
|
4
|
+
:class="[sizeClasses, wrapClasses]"
|
|
5
5
|
:style="colorStyle"
|
|
6
6
|
>
|
|
7
|
-
<BaseIcon
|
|
7
|
+
<BaseIcon
|
|
8
|
+
v-if="icon"
|
|
9
|
+
:icon="icon"
|
|
10
|
+
class="shrink-0"
|
|
11
|
+
:class="iconSizeClasses"
|
|
12
|
+
>
|
|
13
|
+
</BaseIcon>
|
|
8
14
|
<slot />
|
|
9
15
|
</span>
|
|
10
16
|
</template>
|
|
@@ -19,6 +25,7 @@ const props = withDefaults(
|
|
|
19
25
|
color?: string;
|
|
20
26
|
size?: 'sm' | 'base' | 'lg';
|
|
21
27
|
icon?: string;
|
|
28
|
+
wrap?: boolean;
|
|
22
29
|
}>(),
|
|
23
30
|
{
|
|
24
31
|
contrast: 'high',
|
|
@@ -37,6 +44,13 @@ const colorStyle = computed((): Record<string, string> => {
|
|
|
37
44
|
};
|
|
38
45
|
});
|
|
39
46
|
|
|
47
|
+
const wrapClasses = computed(() => {
|
|
48
|
+
if (!props.wrap) {
|
|
49
|
+
return 'whitespace-nowrap';
|
|
50
|
+
}
|
|
51
|
+
return '';
|
|
52
|
+
});
|
|
53
|
+
|
|
40
54
|
const sizeClasses = computed(() => {
|
|
41
55
|
if (props.size == 'sm') {
|
|
42
56
|
return 'px-2 py-px text-[11px]';
|
|
@@ -11,12 +11,18 @@
|
|
|
11
11
|
class="ml-2 whitespace-pre text-sm"
|
|
12
12
|
>{{ section.title }}</span
|
|
13
13
|
>
|
|
14
|
+
<BaseBadge
|
|
15
|
+
v-if="section.count"
|
|
16
|
+
class="ml-2"
|
|
17
|
+
:label="section.count"
|
|
18
|
+
></BaseBadge>
|
|
14
19
|
</button>
|
|
15
20
|
</template>
|
|
16
21
|
|
|
17
22
|
<script lang="ts" setup>
|
|
18
23
|
import { DataIteratorSection } from '@/types';
|
|
19
24
|
import { BaseIcon } from '.';
|
|
25
|
+
import BaseBadge from './BaseBadge.vue';
|
|
20
26
|
|
|
21
27
|
defineProps<{
|
|
22
28
|
section: DataIteratorSection;
|
|
@@ -86,15 +86,13 @@
|
|
|
86
86
|
|
|
87
87
|
<BaseTableColumn
|
|
88
88
|
v-slot="{ row }"
|
|
89
|
-
:visible="
|
|
89
|
+
:visible="rowActionsInternal.length"
|
|
90
90
|
:toggle="false"
|
|
91
91
|
:clickable="false"
|
|
92
92
|
custom-key="actions"
|
|
93
93
|
class="overflow-hidden"
|
|
94
94
|
>
|
|
95
95
|
<div class="flex justify-end gap-1 pr-2 text-right">
|
|
96
|
-
<slot name="rowActions" :row="row" />
|
|
97
|
-
|
|
98
96
|
<div class="btn-group">
|
|
99
97
|
<template
|
|
100
98
|
v-for="rowAction in visibleRowActions"
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<BaseActionItem
|
|
4
|
-
:
|
|
4
|
+
:to="item.to"
|
|
5
|
+
:href="item.href"
|
|
6
|
+
:action="item.action"
|
|
5
7
|
:dark="dark"
|
|
6
|
-
|
|
8
|
+
class="flex w-full"
|
|
7
9
|
@click="onClick"
|
|
8
10
|
>
|
|
9
11
|
<template #default="{ active }">
|
|
@@ -23,9 +25,10 @@
|
|
|
23
25
|
>
|
|
24
26
|
<div v-for="subItem in item.actions" :key="subItem.label" class="mb-1">
|
|
25
27
|
<BaseActionItem
|
|
26
|
-
:
|
|
27
|
-
:
|
|
28
|
-
:
|
|
28
|
+
:to="subItem.to"
|
|
29
|
+
:href="subItem.href"
|
|
30
|
+
:action="subItem.action"
|
|
31
|
+
:class="[
|
|
29
32
|
'flex w-full',
|
|
30
33
|
dark
|
|
31
34
|
? 'text-slate-300 hover:text-white'
|