@nuxt/ui 2.19.1 → 2.20.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 +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/data/Table.vue +75 -34
- package/dist/runtime/components/data/Table.vue.d.ts +74 -61
- package/dist/runtime/components/elements/Accordion.vue +3 -1
- package/dist/runtime/components/elements/Accordion.vue.d.ts +25 -24
- package/dist/runtime/components/elements/Alert.vue.d.ts +39 -39
- package/dist/runtime/components/elements/Avatar.vue.d.ts +3 -3
- package/dist/runtime/components/elements/AvatarGroup.d.ts +11 -9
- package/dist/runtime/components/elements/Badge.vue +69 -2
- package/dist/runtime/components/elements/Badge.vue.d.ts +131 -4
- package/dist/runtime/components/elements/Button.vue.d.ts +20 -20
- package/dist/runtime/components/elements/ButtonGroup.d.ts +15 -13
- package/dist/runtime/components/elements/Carousel.vue.d.ts +43 -41
- package/dist/runtime/components/elements/Chip.vue.d.ts +5 -5
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Link.vue +15 -4
- package/dist/runtime/components/elements/Link.vue.d.ts +30 -29
- package/dist/runtime/components/elements/Meter.vue.d.ts +3 -3
- package/dist/runtime/components/elements/MeterGroup.d.ts +20 -18
- package/dist/runtime/components/elements/Progress.vue.d.ts +2 -2
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/forms/Form.vue +6 -5
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
- package/dist/runtime/components/forms/Input.vue.d.ts +3 -3
- package/dist/runtime/components/forms/InputMenu.vue +35 -5
- package/dist/runtime/components/forms/InputMenu.vue.d.ts +13 -12
- package/dist/runtime/components/forms/Radio.vue.d.ts +2 -2
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +4 -4
- package/dist/runtime/components/forms/Range.vue.d.ts +2 -2
- package/dist/runtime/components/forms/Select.vue.d.ts +3 -3
- package/dist/runtime/components/forms/SelectMenu.vue +46 -23
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +12 -11
- package/dist/runtime/components/forms/Textarea.vue.d.ts +3 -3
- package/dist/runtime/components/forms/Toggle.vue.d.ts +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.d.ts +19 -19
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +3 -3
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +26 -26
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +3 -3
- package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +164 -22
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +38 -38
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +2 -2
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +186 -44
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/Notification.vue +6 -2
- package/dist/runtime/components/overlays/Notification.vue.d.ts +50 -41
- package/dist/runtime/components/overlays/Notifications.vue +2 -2
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +55 -46
- package/dist/runtime/components/overlays/Popover.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/types/button.d.ts +1 -0
- package/dist/runtime/types/checkbox.d.ts +3 -0
- package/dist/runtime/types/divider.d.ts +1 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/link.d.ts +1 -1
- package/dist/runtime/types/utils.d.ts +1 -1
- package/dist/runtime/ui.config/data/table.d.ts +9 -8
- package/dist/runtime/ui.config/elements/accordion.d.ts +1 -1
- package/dist/runtime/ui.config/elements/alert.d.ts +5 -4
- package/dist/runtime/ui.config/elements/badge.d.ts +15 -0
- package/dist/runtime/ui.config/elements/badge.js +15 -0
- package/dist/runtime/ui.config/elements/carousel.d.ts +3 -2
- package/dist/runtime/ui.config/elements/dropdown.d.ts +2 -1
- package/dist/runtime/ui.config/forms/inputMenu.d.ts +2 -1
- package/dist/runtime/ui.config/forms/selectMenu.d.ts +1 -1
- package/dist/runtime/ui.config/layout/divider.d.ts +4 -3
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +2 -1
- package/dist/runtime/ui.config/navigation/horizontalNavigation.d.ts +5 -4
- package/dist/runtime/ui.config/navigation/pagination.d.ts +7 -6
- package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +5 -4
- package/dist/runtime/ui.config/overlays/notification.d.ts +6 -5
- package/package.json +20 -17
|
@@ -18,7 +18,7 @@ declare const config: {
|
|
|
18
18
|
openIcon: string;
|
|
19
19
|
closeIcon: string;
|
|
20
20
|
class: string;
|
|
21
|
-
variant:
|
|
21
|
+
variant: string;
|
|
22
22
|
truncate: boolean;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
@@ -76,7 +76,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
76
76
|
openIcon: string;
|
|
77
77
|
closeIcon: string;
|
|
78
78
|
class: string;
|
|
79
|
-
variant:
|
|
79
|
+
variant: string;
|
|
80
80
|
truncate: boolean;
|
|
81
81
|
};
|
|
82
82
|
}>;
|
|
@@ -179,7 +179,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
179
179
|
onBeforeLeave: (_el: Element) => void;
|
|
180
180
|
onAfterEnter: (_el: Element) => void;
|
|
181
181
|
onLeave: (_el: Element, done: () => void) => void;
|
|
182
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "open"[], "open", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
182
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "open")[], "close" | "open", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
183
183
|
items: {
|
|
184
184
|
type: PropType<AccordionItem[]>;
|
|
185
185
|
default: () => any[];
|
|
@@ -215,6 +215,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
215
215
|
default: () => {};
|
|
216
216
|
};
|
|
217
217
|
}>> & Readonly<{
|
|
218
|
+
onClose?: (...args: any[]) => any;
|
|
218
219
|
onOpen?: (...args: any[]) => any;
|
|
219
220
|
}>, {
|
|
220
221
|
class: any;
|
|
@@ -236,7 +237,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
236
237
|
openIcon: string;
|
|
237
238
|
closeIcon: string;
|
|
238
239
|
class: string;
|
|
239
|
-
variant:
|
|
240
|
+
variant: string;
|
|
240
241
|
truncate: boolean;
|
|
241
242
|
}, any>;
|
|
242
243
|
} & {
|
|
@@ -952,23 +953,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
952
953
|
class: any;
|
|
953
954
|
to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
954
955
|
disabled: boolean;
|
|
955
|
-
truncate: boolean;
|
|
956
|
-
target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
|
|
957
|
-
activeClass: string;
|
|
958
|
-
exactActiveClass: string;
|
|
959
|
-
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
960
|
-
replace: boolean;
|
|
961
|
-
noRel: boolean;
|
|
962
|
-
prefetch: boolean;
|
|
963
|
-
noPrefetch: boolean;
|
|
964
|
-
prefetchedClass: string;
|
|
965
|
-
external: boolean;
|
|
966
|
-
leading: boolean;
|
|
967
|
-
color: import("../../types/button").ButtonColor;
|
|
968
|
-
variant: import("../../types/button").ButtonVariant;
|
|
969
|
-
href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
970
|
-
rel: any;
|
|
971
|
-
label: string;
|
|
972
956
|
ui: {
|
|
973
957
|
base?: string;
|
|
974
958
|
font?: string;
|
|
@@ -1053,6 +1037,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1053
1037
|
} & {
|
|
1054
1038
|
strategy?: Strategy;
|
|
1055
1039
|
};
|
|
1040
|
+
color: import("../../types/button").ButtonColor;
|
|
1041
|
+
variant: import("../../types/button").ButtonVariant;
|
|
1042
|
+
truncate: boolean;
|
|
1043
|
+
target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
|
|
1044
|
+
activeClass: string;
|
|
1045
|
+
exactActiveClass: string;
|
|
1046
|
+
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
1047
|
+
replace: boolean;
|
|
1048
|
+
noRel: boolean;
|
|
1049
|
+
prefetch: boolean;
|
|
1050
|
+
noPrefetch: boolean;
|
|
1051
|
+
prefetchedClass: string;
|
|
1052
|
+
external: boolean;
|
|
1053
|
+
leading: boolean;
|
|
1054
|
+
href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
1055
|
+
rel: any;
|
|
1056
|
+
label: string;
|
|
1056
1057
|
icon: string;
|
|
1057
1058
|
block: boolean;
|
|
1058
1059
|
square: boolean;
|
|
@@ -1130,7 +1131,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1130
1131
|
default: boolean;
|
|
1131
1132
|
};
|
|
1132
1133
|
exactQuery: {
|
|
1133
|
-
type:
|
|
1134
|
+
type: PropType<boolean | "partial">;
|
|
1134
1135
|
default: boolean;
|
|
1135
1136
|
};
|
|
1136
1137
|
exactHash: {
|
|
@@ -1233,7 +1234,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1233
1234
|
default: boolean;
|
|
1234
1235
|
};
|
|
1235
1236
|
exactQuery: {
|
|
1236
|
-
type:
|
|
1237
|
+
type: PropType<boolean | "partial">;
|
|
1237
1238
|
default: boolean;
|
|
1238
1239
|
};
|
|
1239
1240
|
exactHash: {
|
|
@@ -1326,7 +1327,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1326
1327
|
as: string;
|
|
1327
1328
|
active: boolean;
|
|
1328
1329
|
exact: boolean;
|
|
1329
|
-
exactQuery: boolean;
|
|
1330
|
+
exactQuery: boolean | "partial";
|
|
1330
1331
|
exactHash: boolean;
|
|
1331
1332
|
inactiveClass: string;
|
|
1332
1333
|
href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
@@ -15,7 +15,7 @@ declare const config: {
|
|
|
15
15
|
};
|
|
16
16
|
avatar: {
|
|
17
17
|
base: string;
|
|
18
|
-
size: "
|
|
18
|
+
size: import("../../types/avatar").AvatarSize;
|
|
19
19
|
};
|
|
20
20
|
color: {
|
|
21
21
|
white: {
|
|
@@ -34,9 +34,9 @@ declare const config: {
|
|
|
34
34
|
icon: any;
|
|
35
35
|
closeButton: any;
|
|
36
36
|
actionButton: {
|
|
37
|
-
size: "
|
|
38
|
-
color: "
|
|
39
|
-
variant: "
|
|
37
|
+
size: import("../../types/button").ButtonSize;
|
|
38
|
+
color: import("../../types/button").ButtonColor;
|
|
39
|
+
variant: import("../../types/button").ButtonVariant;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -101,7 +101,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
101
101
|
};
|
|
102
102
|
avatar: {
|
|
103
103
|
base: string;
|
|
104
|
-
size: "
|
|
104
|
+
size: import("../../types/avatar").AvatarSize;
|
|
105
105
|
};
|
|
106
106
|
color: {
|
|
107
107
|
white: {
|
|
@@ -120,9 +120,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
120
120
|
icon: any;
|
|
121
121
|
closeButton: any;
|
|
122
122
|
actionButton: {
|
|
123
|
-
size: "
|
|
124
|
-
color: "
|
|
125
|
-
variant: "
|
|
123
|
+
size: import("../../types/button").ButtonSize;
|
|
124
|
+
color: import("../../types/button").ButtonColor;
|
|
125
|
+
variant: import("../../types/button").ButtonVariant;
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
}>;
|
|
@@ -181,10 +181,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
181
181
|
onClose?: (...args: any[]) => any;
|
|
182
182
|
}>, {
|
|
183
183
|
class: any;
|
|
184
|
-
title: string;
|
|
185
|
-
avatar: Avatar;
|
|
186
|
-
color: AlertColor;
|
|
187
|
-
variant: AlertVariant;
|
|
188
184
|
ui: {
|
|
189
185
|
wrapper?: string;
|
|
190
186
|
inner?: string;
|
|
@@ -200,7 +196,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
200
196
|
}, any>;
|
|
201
197
|
avatar?: DeepPartial<{
|
|
202
198
|
base: string;
|
|
203
|
-
size: "
|
|
199
|
+
size: import("../../types/avatar").AvatarSize;
|
|
204
200
|
}, any>;
|
|
205
201
|
color?: DeepPartial<{
|
|
206
202
|
white: {
|
|
@@ -219,9 +215,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
219
215
|
icon: any;
|
|
220
216
|
closeButton: any;
|
|
221
217
|
actionButton: {
|
|
222
|
-
size: "
|
|
223
|
-
color: "
|
|
224
|
-
variant: "
|
|
218
|
+
size: import("../../types/button").ButtonSize;
|
|
219
|
+
color: import("../../types/button").ButtonColor;
|
|
220
|
+
variant: import("../../types/button").ButtonVariant;
|
|
225
221
|
};
|
|
226
222
|
}, any>;
|
|
227
223
|
} & {
|
|
@@ -229,6 +225,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
229
225
|
} & {
|
|
230
226
|
strategy?: Strategy;
|
|
231
227
|
};
|
|
228
|
+
color: AlertColor;
|
|
229
|
+
variant: AlertVariant;
|
|
230
|
+
avatar: Avatar;
|
|
231
|
+
title: string;
|
|
232
232
|
description: string;
|
|
233
233
|
icon: string;
|
|
234
234
|
closeButton: Button;
|
|
@@ -577,9 +577,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
577
577
|
}>> & Readonly<{}>, {
|
|
578
578
|
size: import("../../types/avatar").AvatarSize;
|
|
579
579
|
class: any;
|
|
580
|
-
as: string | Record<string, any>;
|
|
581
|
-
text: string;
|
|
582
|
-
alt: string;
|
|
583
580
|
ui: {
|
|
584
581
|
wrapper?: string;
|
|
585
582
|
background?: string;
|
|
@@ -643,6 +640,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
643
640
|
} & {
|
|
644
641
|
strategy?: Strategy;
|
|
645
642
|
};
|
|
643
|
+
as: string | Record<string, any>;
|
|
644
|
+
text: string;
|
|
645
|
+
alt: string;
|
|
646
646
|
icon: string;
|
|
647
647
|
src: string | boolean;
|
|
648
648
|
chipColor: import("../../types/avatar").AvatarChipColor;
|
|
@@ -1247,23 +1247,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1247
1247
|
class: any;
|
|
1248
1248
|
to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
1249
1249
|
disabled: boolean;
|
|
1250
|
-
truncate: boolean;
|
|
1251
|
-
target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
|
|
1252
|
-
activeClass: string;
|
|
1253
|
-
exactActiveClass: string;
|
|
1254
|
-
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
1255
|
-
replace: boolean;
|
|
1256
|
-
noRel: boolean;
|
|
1257
|
-
prefetch: boolean;
|
|
1258
|
-
noPrefetch: boolean;
|
|
1259
|
-
prefetchedClass: string;
|
|
1260
|
-
external: boolean;
|
|
1261
|
-
leading: boolean;
|
|
1262
|
-
color: import("../../types/button").ButtonColor;
|
|
1263
|
-
variant: import("../../types/button").ButtonVariant;
|
|
1264
|
-
href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
1265
|
-
rel: any;
|
|
1266
|
-
label: string;
|
|
1267
1250
|
ui: {
|
|
1268
1251
|
base?: string;
|
|
1269
1252
|
font?: string;
|
|
@@ -1348,6 +1331,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1348
1331
|
} & {
|
|
1349
1332
|
strategy?: Strategy;
|
|
1350
1333
|
};
|
|
1334
|
+
color: import("../../types/button").ButtonColor;
|
|
1335
|
+
variant: import("../../types/button").ButtonVariant;
|
|
1336
|
+
truncate: boolean;
|
|
1337
|
+
target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
|
|
1338
|
+
activeClass: string;
|
|
1339
|
+
exactActiveClass: string;
|
|
1340
|
+
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
1341
|
+
replace: boolean;
|
|
1342
|
+
noRel: boolean;
|
|
1343
|
+
prefetch: boolean;
|
|
1344
|
+
noPrefetch: boolean;
|
|
1345
|
+
prefetchedClass: string;
|
|
1346
|
+
external: boolean;
|
|
1347
|
+
leading: boolean;
|
|
1348
|
+
href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
1349
|
+
rel: any;
|
|
1350
|
+
label: string;
|
|
1351
1351
|
icon: string;
|
|
1352
1352
|
block: boolean;
|
|
1353
1353
|
square: boolean;
|
|
@@ -1425,7 +1425,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1425
1425
|
default: boolean;
|
|
1426
1426
|
};
|
|
1427
1427
|
exactQuery: {
|
|
1428
|
-
type:
|
|
1428
|
+
type: PropType<boolean | "partial">;
|
|
1429
1429
|
default: boolean;
|
|
1430
1430
|
};
|
|
1431
1431
|
exactHash: {
|
|
@@ -1528,7 +1528,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1528
1528
|
default: boolean;
|
|
1529
1529
|
};
|
|
1530
1530
|
exactQuery: {
|
|
1531
|
-
type:
|
|
1531
|
+
type: PropType<boolean | "partial">;
|
|
1532
1532
|
default: boolean;
|
|
1533
1533
|
};
|
|
1534
1534
|
exactHash: {
|
|
@@ -1621,7 +1621,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1621
1621
|
as: string;
|
|
1622
1622
|
active: boolean;
|
|
1623
1623
|
exact: boolean;
|
|
1624
|
-
exactQuery: boolean;
|
|
1624
|
+
exactQuery: boolean | "partial";
|
|
1625
1625
|
exactHash: boolean;
|
|
1626
1626
|
inactiveClass: string;
|
|
1627
1627
|
href: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
|
|
@@ -241,9 +241,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
241
241
|
}>> & Readonly<{}>, {
|
|
242
242
|
size: AvatarSize;
|
|
243
243
|
class: any;
|
|
244
|
-
as: string | Record<string, any>;
|
|
245
|
-
text: string;
|
|
246
|
-
alt: string;
|
|
247
244
|
ui: {
|
|
248
245
|
wrapper?: string;
|
|
249
246
|
background?: string;
|
|
@@ -307,6 +304,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
307
304
|
} & {
|
|
308
305
|
strategy?: Strategy;
|
|
309
306
|
};
|
|
307
|
+
as: string | Record<string, any>;
|
|
308
|
+
text: string;
|
|
309
|
+
alt: string;
|
|
310
310
|
icon: string;
|
|
311
311
|
src: string | boolean;
|
|
312
312
|
chipColor: AvatarChipColor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { AvatarSize, Strategy } from '../../types/index.js';
|
|
2
|
+
import type { AvatarSize, DeepPartial, Strategy } from '../../types/index.js';
|
|
3
3
|
declare const avatarGroupConfig: {
|
|
4
4
|
wrapper: string;
|
|
5
5
|
ring: string;
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
20
20
|
default: () => "";
|
|
21
21
|
};
|
|
22
22
|
ui: {
|
|
23
|
-
type: PropType<
|
|
23
|
+
type: PropType<DeepPartial<typeof avatarGroupConfig> & {
|
|
24
24
|
strategy?: Strategy;
|
|
25
25
|
}>;
|
|
26
26
|
default: () => {};
|
|
@@ -42,20 +42,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
default: () => "";
|
|
43
43
|
};
|
|
44
44
|
ui: {
|
|
45
|
-
type: PropType<
|
|
45
|
+
type: PropType<DeepPartial<typeof avatarGroupConfig> & {
|
|
46
46
|
strategy?: Strategy;
|
|
47
47
|
}>;
|
|
48
48
|
default: () => {};
|
|
49
49
|
};
|
|
50
50
|
}>> & Readonly<{}>, {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
ui: {
|
|
52
|
+
wrapper?: string;
|
|
53
|
+
ring?: string;
|
|
54
|
+
margin?: string;
|
|
55
|
+
} & {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
} & {
|
|
57
58
|
strategy?: Strategy;
|
|
58
59
|
};
|
|
60
|
+
size: AvatarSize;
|
|
59
61
|
class: any;
|
|
60
62
|
max: number;
|
|
61
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span :class="badgeClass" v-bind="attrs">
|
|
3
|
-
<slot
|
|
3
|
+
<slot name="leading">
|
|
4
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="leadingIconClass" aria-hidden="true" />
|
|
5
|
+
</slot>
|
|
6
|
+
|
|
7
|
+
<slot>
|
|
8
|
+
<span v-if="label">
|
|
9
|
+
{{ label }}
|
|
10
|
+
</span>
|
|
11
|
+
</slot>
|
|
12
|
+
|
|
13
|
+
<slot name="trailing">
|
|
14
|
+
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="trailingIconClass" aria-hidden="true" />
|
|
15
|
+
</slot>
|
|
4
16
|
</span>
|
|
5
17
|
</template>
|
|
6
18
|
|
|
7
19
|
<script>
|
|
8
20
|
import { computed, toRef, defineComponent } from "vue";
|
|
9
21
|
import { twMerge, twJoin } from "tailwind-merge";
|
|
22
|
+
import UIcon from "../elements/Icon.vue";
|
|
10
23
|
import { useUI } from "../../composables/useUI";
|
|
11
24
|
import { mergeConfig } from "../../utils";
|
|
12
25
|
import { useInjectButtonGroup } from "../../composables/useButtonGroup";
|
|
@@ -14,6 +27,9 @@ import appConfig from "#build/app.config";
|
|
|
14
27
|
import { badge } from "#ui/ui.config";
|
|
15
28
|
const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.badge, badge);
|
|
16
29
|
export default defineComponent({
|
|
30
|
+
components: {
|
|
31
|
+
UIcon
|
|
32
|
+
},
|
|
17
33
|
inheritAttrs: false,
|
|
18
34
|
props: {
|
|
19
35
|
size: {
|
|
@@ -44,6 +60,26 @@ export default defineComponent({
|
|
|
44
60
|
type: [String, Number],
|
|
45
61
|
default: null
|
|
46
62
|
},
|
|
63
|
+
icon: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
67
|
+
leadingIcon: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
trailingIcon: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: null
|
|
74
|
+
},
|
|
75
|
+
trailing: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
leading: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
47
83
|
class: {
|
|
48
84
|
type: [String, Object, Array],
|
|
49
85
|
default: () => ""
|
|
@@ -56,6 +92,12 @@ export default defineComponent({
|
|
|
56
92
|
setup(props) {
|
|
57
93
|
const { ui, attrs } = useUI("badge", toRef(props, "ui"), config);
|
|
58
94
|
const { size, rounded } = useInjectButtonGroup({ ui, props });
|
|
95
|
+
const isLeading = computed(() => {
|
|
96
|
+
return props.icon && props.leading || props.icon && !props.trailing || !props.trailing || props.leadingIcon;
|
|
97
|
+
});
|
|
98
|
+
const isTrailing = computed(() => {
|
|
99
|
+
return props.icon && props.trailing || props.trailing || props.trailingIcon;
|
|
100
|
+
});
|
|
59
101
|
const badgeClass = computed(() => {
|
|
60
102
|
const variant = ui.value.color?.[props.color]?.[props.variant] || ui.value.variant[props.variant];
|
|
61
103
|
return twMerge(twJoin(
|
|
@@ -63,12 +105,37 @@ export default defineComponent({
|
|
|
63
105
|
ui.value.font,
|
|
64
106
|
rounded.value,
|
|
65
107
|
ui.value.size[size.value],
|
|
108
|
+
ui.value.gap[size.value],
|
|
66
109
|
variant?.replaceAll("{color}", props.color)
|
|
67
110
|
), props.class);
|
|
68
111
|
});
|
|
112
|
+
const leadingIconName = computed(() => {
|
|
113
|
+
return props.leadingIcon || props.icon;
|
|
114
|
+
});
|
|
115
|
+
const trailingIconName = computed(() => {
|
|
116
|
+
return props.trailingIcon || props.icon;
|
|
117
|
+
});
|
|
118
|
+
const leadingIconClass = computed(() => {
|
|
119
|
+
return twJoin(
|
|
120
|
+
ui.value.icon.base,
|
|
121
|
+
ui.value.icon.size[size.value]
|
|
122
|
+
);
|
|
123
|
+
});
|
|
124
|
+
const trailingIconClass = computed(() => {
|
|
125
|
+
return twJoin(
|
|
126
|
+
ui.value.icon.base,
|
|
127
|
+
ui.value.icon.size[size.value]
|
|
128
|
+
);
|
|
129
|
+
});
|
|
69
130
|
return {
|
|
70
131
|
attrs,
|
|
71
|
-
|
|
132
|
+
isLeading,
|
|
133
|
+
isTrailing,
|
|
134
|
+
badgeClass,
|
|
135
|
+
leadingIconName,
|
|
136
|
+
trailingIconName,
|
|
137
|
+
leadingIconClass,
|
|
138
|
+
trailingIconClass
|
|
72
139
|
};
|
|
73
140
|
}
|
|
74
141
|
});
|
|
@@ -10,6 +10,12 @@ declare const config: {
|
|
|
10
10
|
md: string;
|
|
11
11
|
lg: string;
|
|
12
12
|
};
|
|
13
|
+
gap: {
|
|
14
|
+
xs: string;
|
|
15
|
+
sm: string;
|
|
16
|
+
md: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
};
|
|
13
19
|
color: {
|
|
14
20
|
white: {
|
|
15
21
|
solid: string;
|
|
@@ -27,6 +33,15 @@ declare const config: {
|
|
|
27
33
|
soft: string;
|
|
28
34
|
subtle: string;
|
|
29
35
|
};
|
|
36
|
+
icon: {
|
|
37
|
+
base: string;
|
|
38
|
+
size: {
|
|
39
|
+
xs: string;
|
|
40
|
+
sm: string;
|
|
41
|
+
md: string;
|
|
42
|
+
lg: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
30
45
|
default: {
|
|
31
46
|
size: string;
|
|
32
47
|
variant: string;
|
|
@@ -53,6 +68,26 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
53
68
|
type: (StringConstructor | NumberConstructor)[];
|
|
54
69
|
default: any;
|
|
55
70
|
};
|
|
71
|
+
icon: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: any;
|
|
74
|
+
};
|
|
75
|
+
leadingIcon: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: any;
|
|
78
|
+
};
|
|
79
|
+
trailingIcon: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
default: any;
|
|
82
|
+
};
|
|
83
|
+
trailing: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
leading: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
56
91
|
class: {
|
|
57
92
|
type: PropType<any>;
|
|
58
93
|
default: () => "";
|
|
@@ -67,7 +102,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
67
102
|
attrs: import("vue").ComputedRef<Pick<{
|
|
68
103
|
[x: string]: unknown;
|
|
69
104
|
}, string>>;
|
|
105
|
+
isLeading: import("vue").ComputedRef<string | true>;
|
|
106
|
+
isTrailing: import("vue").ComputedRef<string | true>;
|
|
70
107
|
badgeClass: import("vue").ComputedRef<string>;
|
|
108
|
+
leadingIconName: import("vue").ComputedRef<string>;
|
|
109
|
+
trailingIconName: import("vue").ComputedRef<string>;
|
|
110
|
+
leadingIconClass: import("vue").ComputedRef<string>;
|
|
111
|
+
trailingIconClass: import("vue").ComputedRef<string>;
|
|
71
112
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
72
113
|
size: {
|
|
73
114
|
type: PropType<BadgeSize>;
|
|
@@ -88,6 +129,26 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
88
129
|
type: (StringConstructor | NumberConstructor)[];
|
|
89
130
|
default: any;
|
|
90
131
|
};
|
|
132
|
+
icon: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: any;
|
|
135
|
+
};
|
|
136
|
+
leadingIcon: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
default: any;
|
|
139
|
+
};
|
|
140
|
+
trailingIcon: {
|
|
141
|
+
type: StringConstructor;
|
|
142
|
+
default: any;
|
|
143
|
+
};
|
|
144
|
+
trailing: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
148
|
+
leading: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
91
152
|
class: {
|
|
92
153
|
type: PropType<any>;
|
|
93
154
|
default: () => "";
|
|
@@ -101,9 +162,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
101
162
|
}>> & Readonly<{}>, {
|
|
102
163
|
size: BadgeSize;
|
|
103
164
|
class: any;
|
|
104
|
-
color: BadgeColor;
|
|
105
|
-
variant: BadgeVariant;
|
|
106
|
-
label: string | number;
|
|
107
165
|
ui: {
|
|
108
166
|
base?: string;
|
|
109
167
|
rounded?: string;
|
|
@@ -114,6 +172,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
114
172
|
md: string;
|
|
115
173
|
lg: string;
|
|
116
174
|
}, any>;
|
|
175
|
+
gap?: DeepPartial<{
|
|
176
|
+
xs: string;
|
|
177
|
+
sm: string;
|
|
178
|
+
md: string;
|
|
179
|
+
lg: string;
|
|
180
|
+
}, any>;
|
|
117
181
|
color?: DeepPartial<{
|
|
118
182
|
white: {
|
|
119
183
|
solid: string;
|
|
@@ -131,6 +195,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
131
195
|
soft: string;
|
|
132
196
|
subtle: string;
|
|
133
197
|
}, any>;
|
|
198
|
+
icon?: DeepPartial<{
|
|
199
|
+
base: string;
|
|
200
|
+
size: {
|
|
201
|
+
xs: string;
|
|
202
|
+
sm: string;
|
|
203
|
+
md: string;
|
|
204
|
+
lg: string;
|
|
205
|
+
};
|
|
206
|
+
}, any>;
|
|
134
207
|
default?: DeepPartial<{
|
|
135
208
|
size: string;
|
|
136
209
|
variant: string;
|
|
@@ -141,5 +214,59 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
141
214
|
} & {
|
|
142
215
|
strategy?: Strategy;
|
|
143
216
|
};
|
|
144
|
-
|
|
217
|
+
color: BadgeColor;
|
|
218
|
+
variant: BadgeVariant;
|
|
219
|
+
leading: boolean;
|
|
220
|
+
label: string | number;
|
|
221
|
+
icon: string;
|
|
222
|
+
leadingIcon: string;
|
|
223
|
+
trailingIcon: string;
|
|
224
|
+
trailing: boolean;
|
|
225
|
+
}, {}, {
|
|
226
|
+
UIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
227
|
+
name: {
|
|
228
|
+
type: StringConstructor;
|
|
229
|
+
required: true;
|
|
230
|
+
};
|
|
231
|
+
mode: {
|
|
232
|
+
type: PropType<"svg" | "css">;
|
|
233
|
+
required: false;
|
|
234
|
+
default: any;
|
|
235
|
+
};
|
|
236
|
+
size: {
|
|
237
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
238
|
+
required: false;
|
|
239
|
+
default: any;
|
|
240
|
+
};
|
|
241
|
+
customize: {
|
|
242
|
+
type: FunctionConstructor;
|
|
243
|
+
required: false;
|
|
244
|
+
default: any;
|
|
245
|
+
};
|
|
246
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
247
|
+
name: {
|
|
248
|
+
type: StringConstructor;
|
|
249
|
+
required: true;
|
|
250
|
+
};
|
|
251
|
+
mode: {
|
|
252
|
+
type: PropType<"svg" | "css">;
|
|
253
|
+
required: false;
|
|
254
|
+
default: any;
|
|
255
|
+
};
|
|
256
|
+
size: {
|
|
257
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
258
|
+
required: false;
|
|
259
|
+
default: any;
|
|
260
|
+
};
|
|
261
|
+
customize: {
|
|
262
|
+
type: FunctionConstructor;
|
|
263
|
+
required: false;
|
|
264
|
+
default: any;
|
|
265
|
+
};
|
|
266
|
+
}>> & Readonly<{}>, {
|
|
267
|
+
mode: "svg" | "css";
|
|
268
|
+
size: string | number;
|
|
269
|
+
customize: Function;
|
|
270
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
271
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
145
272
|
export default _default;
|