@bitrix24/b24ui-nuxt 0.5.11 → 0.6.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/.nuxt/b24ui/input-menu.ts +2 -2
- package/.nuxt/b24ui/select-menu.ts +4 -4
- package/.nuxt/b24ui/select.ts +2 -2
- package/dist/meta.d.mts +5208 -5061
- package/dist/meta.mjs +5208 -5061
- package/dist/module.json +3 -3
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Advice.vue +27 -54
- package/dist/runtime/components/Advice.vue.d.ts +170 -0
- package/dist/runtime/components/Alert.vue +35 -96
- package/dist/runtime/components/Alert.vue.d.ts +464 -0
- package/dist/runtime/components/App.vue +24 -34
- package/dist/runtime/components/App.vue.d.ts +23 -0
- package/dist/runtime/components/Avatar.vue +43 -81
- package/dist/runtime/components/Avatar.vue.d.ts +281 -0
- package/dist/runtime/components/AvatarGroup.vue +40 -76
- package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
- package/dist/runtime/components/Badge.vue +40 -83
- package/dist/runtime/components/Badge.vue.d.ts +517 -0
- package/dist/runtime/components/Button.vue +96 -155
- package/dist/runtime/components/Button.vue.d.ts +640 -0
- package/dist/runtime/components/ButtonGroup.vue +19 -51
- package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
- package/dist/runtime/components/Calendar.vue +73 -152
- package/dist/runtime/components/Calendar.vue.d.ts +437 -0
- package/dist/runtime/components/Checkbox.vue +42 -73
- package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
- package/dist/runtime/components/Chip.vue +26 -74
- package/dist/runtime/components/Chip.vue.d.ts +271 -0
- package/dist/runtime/components/Collapsible.vue +22 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
- package/dist/runtime/components/Container.vue +13 -27
- package/dist/runtime/components/Container.vue.d.ts +27 -0
- package/dist/runtime/components/Countdown.vue +153 -378
- package/dist/runtime/components/Countdown.vue.d.ts +356 -0
- package/dist/runtime/components/DescriptionList.vue +78 -149
- package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
- package/dist/runtime/components/DropdownMenu.vue +38 -139
- package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
- package/dist/runtime/components/DropdownMenuContent.vue +68 -80
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
- package/dist/runtime/components/Form.vue +130 -217
- package/dist/runtime/components/Form.vue.d.ts +55 -0
- package/dist/runtime/components/FormField.vue +36 -80
- package/dist/runtime/components/FormField.vue.d.ts +282 -0
- package/dist/runtime/components/Input.vue +79 -179
- package/dist/runtime/components/Input.vue.d.ts +755 -0
- package/dist/runtime/components/InputMenu.vue +185 -381
- package/dist/runtime/components/InputMenu.vue.d.ts +1523 -0
- package/dist/runtime/components/InputNumber.vue +77 -175
- package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
- package/dist/runtime/components/Kbd.vue +18 -45
- package/dist/runtime/components/Kbd.vue.d.ts +109 -0
- package/dist/runtime/components/Link.vue +92 -173
- package/dist/runtime/components/Link.vue.d.ts +129 -0
- package/dist/runtime/components/LinkBase.vue +33 -42
- package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
- package/dist/runtime/components/Modal.vue +48 -127
- package/dist/runtime/components/Modal.vue.d.ts +327 -0
- package/dist/runtime/components/ModalDialogClose.vue +5 -8
- package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
- package/dist/runtime/components/Navbar.vue +15 -33
- package/dist/runtime/components/Navbar.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarDivider.vue +15 -33
- package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSection.vue +15 -33
- package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSpacer.vue +15 -33
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/NavigationMenu.vue +74 -208
- package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
- package/dist/runtime/components/OverlayProvider.vue +14 -18
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Popover.vue +40 -81
- package/dist/runtime/components/Popover.vue.d.ts +147 -0
- package/dist/runtime/components/Progress.vue +70 -136
- package/dist/runtime/components/Progress.vue.d.ts +592 -0
- package/dist/runtime/components/RadioGroup.vue +59 -134
- package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
- package/dist/runtime/components/Range.vue +46 -85
- package/dist/runtime/components/Range.vue.d.ts +417 -0
- package/dist/runtime/components/Select.vue +110 -260
- package/dist/runtime/components/Select.vue.d.ts +1201 -0
- package/dist/runtime/components/SelectMenu.vue +161 -347
- package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
- package/dist/runtime/components/Separator.vue +28 -71
- package/dist/runtime/components/Separator.vue.d.ts +400 -0
- package/dist/runtime/components/Sidebar.vue +15 -33
- package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarBody.vue +17 -38
- package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
- package/dist/runtime/components/SidebarFooter.vue +15 -33
- package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeader.vue +15 -33
- package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeading.vue +15 -33
- package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarLayout.vue +34 -70
- package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
- package/dist/runtime/components/SidebarSection.vue +15 -33
- package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarSpacer.vue +15 -33
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/Skeleton.vue +12 -22
- package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
- package/dist/runtime/components/Slideover.vue +50 -131
- package/dist/runtime/components/Slideover.vue.d.ts +360 -0
- package/dist/runtime/components/StackedLayout.vue +34 -73
- package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
- package/dist/runtime/components/Switch.vue +46 -95
- package/dist/runtime/components/Switch.vue.d.ts +587 -0
- package/dist/runtime/components/Tabs.vue +37 -105
- package/dist/runtime/components/Tabs.vue.d.ts +453 -0
- package/dist/runtime/components/Textarea.vue +92 -201
- package/dist/runtime/components/Textarea.vue.d.ts +601 -0
- package/dist/runtime/components/Toast.vue +47 -105
- package/dist/runtime/components/Toast.vue.d.ts +438 -0
- package/dist/runtime/components/Toaster.vue +70 -115
- package/dist/runtime/components/Toaster.vue.d.ts +219 -0
- package/dist/runtime/components/Tooltip.vue +36 -64
- package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
- package/dist/runtime/components/content/TableWrapper.vue +24 -70
- package/dist/runtime/components/content/TableWrapper.vue.d.ts +237 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +3 -3
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/useOverlay.d.ts +14 -7
- package/dist/runtime/composables/useOverlay.js +14 -6
- package/dist/runtime/prose/A.vue +12 -23
- package/dist/runtime/prose/A.vue.d.ts +84 -0
- package/dist/runtime/prose/Blockquote.vue +12 -23
- package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
- package/dist/runtime/prose/Code.vue +14 -31
- package/dist/runtime/prose/Code.vue.d.ts +97 -0
- package/dist/runtime/prose/Em.vue +12 -23
- package/dist/runtime/prose/Em.vue.d.ts +84 -0
- package/dist/runtime/prose/H1.vue +12 -23
- package/dist/runtime/prose/H1.vue.d.ts +97 -0
- package/dist/runtime/prose/H2.vue +12 -23
- package/dist/runtime/prose/H2.vue.d.ts +123 -0
- package/dist/runtime/prose/H3.vue +12 -23
- package/dist/runtime/prose/H3.vue.d.ts +123 -0
- package/dist/runtime/prose/H4.vue +12 -23
- package/dist/runtime/prose/H4.vue.d.ts +123 -0
- package/dist/runtime/prose/H5.vue +12 -23
- package/dist/runtime/prose/H5.vue.d.ts +123 -0
- package/dist/runtime/prose/H6.vue +12 -23
- package/dist/runtime/prose/H6.vue.d.ts +123 -0
- package/dist/runtime/prose/Hr.vue +12 -19
- package/dist/runtime/prose/Hr.vue.d.ts +74 -0
- package/dist/runtime/prose/Img.vue +12 -23
- package/dist/runtime/prose/Img.vue.d.ts +77 -0
- package/dist/runtime/prose/Li.vue +12 -23
- package/dist/runtime/prose/Li.vue.d.ts +84 -0
- package/dist/runtime/prose/Ol.vue +12 -23
- package/dist/runtime/prose/Ol.vue.d.ts +84 -0
- package/dist/runtime/prose/P.vue +12 -23
- package/dist/runtime/prose/P.vue.d.ts +84 -0
- package/dist/runtime/prose/Pre.vue +16 -33
- package/dist/runtime/prose/Pre.vue.d.ts +117 -0
- package/dist/runtime/prose/Strong.vue +12 -23
- package/dist/runtime/prose/Strong.vue.d.ts +84 -0
- package/dist/runtime/prose/Table.vue +19 -54
- package/dist/runtime/prose/Table.vue.d.ts +144 -0
- package/dist/runtime/prose/Tbody.vue +12 -23
- package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
- package/dist/runtime/prose/Td.vue +12 -23
- package/dist/runtime/prose/Td.vue.d.ts +84 -0
- package/dist/runtime/prose/Th.vue +12 -23
- package/dist/runtime/prose/Th.vue.d.ts +84 -0
- package/dist/runtime/prose/Thead.vue +12 -23
- package/dist/runtime/prose/Thead.vue.d.ts +84 -0
- package/dist/runtime/prose/Tr.vue +12 -23
- package/dist/runtime/prose/Tr.vue.d.ts +84 -0
- package/dist/runtime/prose/Ul.vue +12 -23
- package/dist/runtime/prose/Ul.vue.d.ts +84 -0
- package/dist/runtime/utils/link.d.ts +3 -3
- package/dist/runtime/vue/components/Link.vue +115 -202
- package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
- package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
- package/dist/types.d.mts +3 -5
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +14 -22
- package/dist/meta.cjs +0 -72112
- package/dist/meta.d.cts +0 -72110
- package/dist/meta.d.ts +0 -72110
- package/dist/module.cjs +0 -63
- package/dist/module.d.cts +0 -15
- package/dist/module.d.ts +0 -15
- package/dist/shared/b24ui-nuxt.DrKwIWoc.cjs +0 -7721
- package/dist/types.d.ts +0 -7
- package/dist/unplugin.cjs +0 -236
- package/dist/unplugin.d.cts +0 -33
- package/dist/unplugin.d.ts +0 -33
- package/dist/vite.cjs +0 -21
- package/dist/vite.d.cts +0 -14
- package/dist/vite.d.ts +0 -14
|
@@ -1,88 +1,45 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { tv } from '../utils/tv'
|
|
8
|
-
import type { AvatarProps } from '../types'
|
|
9
|
-
|
|
10
|
-
const appConfigBadge = _appConfig as AppConfig & { b24ui: { badge: Partial<typeof theme> } }
|
|
11
|
-
|
|
12
|
-
const badge = tv({ extend: tv(theme), ...(appConfigBadge.b24ui?.badge || {}) })
|
|
13
|
-
|
|
14
|
-
type BadgeVariants = VariantProps<typeof badge>
|
|
15
|
-
|
|
16
|
-
export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
|
|
17
|
-
/**
|
|
18
|
-
* The element or component this component should render as.
|
|
19
|
-
* @defaultValue 'span'
|
|
20
|
-
*/
|
|
21
|
-
as?: any
|
|
22
|
-
label?: string | number
|
|
23
|
-
/**
|
|
24
|
-
* @defaultValue 'default'
|
|
25
|
-
*/
|
|
26
|
-
color?: BadgeVariants['color']
|
|
27
|
-
/**
|
|
28
|
-
* @defaultValue 'normal'
|
|
29
|
-
*/
|
|
30
|
-
depth?: BadgeVariants['depth']
|
|
31
|
-
/**
|
|
32
|
-
* @defaultValue 'md'
|
|
33
|
-
*/
|
|
34
|
-
size?: BadgeVariants['size']
|
|
35
|
-
/**
|
|
36
|
-
* Shows 'underline' on hover
|
|
37
|
-
* @defaultValue false
|
|
38
|
-
*/
|
|
39
|
-
useLink?: boolean
|
|
40
|
-
/**
|
|
41
|
-
* Shows icons.close on the right side
|
|
42
|
-
* @defaultValue false
|
|
43
|
-
*/
|
|
44
|
-
useClose?: boolean
|
|
45
|
-
onCloseClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>
|
|
46
|
-
/**
|
|
47
|
-
* Fills the background
|
|
48
|
-
* @defaultValue false
|
|
49
|
-
*/
|
|
50
|
-
useFill?: boolean
|
|
51
|
-
class?: any
|
|
52
|
-
b24ui?: Partial<typeof badge.slots>
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface BadgeSlots {
|
|
56
|
-
leading(props?: {}): any
|
|
57
|
-
default(props?: {}): any
|
|
58
|
-
trailing(props?: {}): any
|
|
59
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import _appConfig from "#build/app.config";
|
|
3
|
+
import theme from "#build/b24ui/badge";
|
|
4
|
+
import { tv } from "../utils/tv";
|
|
5
|
+
const appConfigBadge = _appConfig;
|
|
6
|
+
const badge = tv({ extend: tv(theme), ...appConfigBadge.b24ui?.badge || {} });
|
|
60
7
|
</script>
|
|
61
8
|
|
|
62
|
-
<script setup
|
|
63
|
-
import { computed } from
|
|
64
|
-
import { Primitive } from
|
|
65
|
-
import { useButtonGroup } from
|
|
66
|
-
import { useComponentIcons } from
|
|
67
|
-
import Cross20Icon from
|
|
68
|
-
import B24Avatar from
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
9
|
+
<script setup>
|
|
10
|
+
import { computed } from "vue";
|
|
11
|
+
import { Primitive } from "reka-ui";
|
|
12
|
+
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
13
|
+
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
14
|
+
import Cross20Icon from "@bitrix24/b24icons-vue/actions/Cross20Icon";
|
|
15
|
+
import B24Avatar from "./Avatar.vue";
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
as: { type: null, required: false, default: "span" },
|
|
18
|
+
label: { type: [String, Number], required: false },
|
|
19
|
+
color: { type: null, required: false },
|
|
20
|
+
depth: { type: null, required: false },
|
|
21
|
+
size: { type: null, required: false },
|
|
22
|
+
useLink: { type: Boolean, required: false },
|
|
23
|
+
useClose: { type: Boolean, required: false },
|
|
24
|
+
onCloseClick: { type: [Function, Array], required: false },
|
|
25
|
+
useFill: { type: Boolean, required: false },
|
|
26
|
+
class: { type: null, required: false },
|
|
27
|
+
b24ui: { type: Object, required: false },
|
|
28
|
+
icon: { type: [Function, Object], required: false },
|
|
29
|
+
avatar: { type: Object, required: false },
|
|
30
|
+
trailing: { type: Boolean, required: false },
|
|
31
|
+
trailingIcon: { type: [Function, Object], required: false }
|
|
32
|
+
});
|
|
33
|
+
defineSlots();
|
|
34
|
+
async function onCloseClickWrapper(event) {
|
|
35
|
+
const callbacks = Array.isArray(props.onCloseClick) ? props.onCloseClick : [props.onCloseClick];
|
|
78
36
|
try {
|
|
79
|
-
await Promise.all(callbacks.map(fn => fn?.(event)))
|
|
80
|
-
} finally {
|
|
37
|
+
await Promise.all(callbacks.map((fn) => fn?.(event)));
|
|
38
|
+
} finally {
|
|
39
|
+
}
|
|
81
40
|
}
|
|
82
|
-
|
|
83
|
-
const {
|
|
84
|
-
const { isLeading, leadingIconName } = useComponentIcons(props)
|
|
85
|
-
|
|
41
|
+
const { orientation, size: buttonGroupSize } = useButtonGroup(props);
|
|
42
|
+
const { isLeading, leadingIconName } = useComponentIcons(props);
|
|
86
43
|
const b24ui = computed(() => badge({
|
|
87
44
|
color: props.color,
|
|
88
45
|
depth: props.depth,
|
|
@@ -92,7 +49,7 @@ const b24ui = computed(() => badge({
|
|
|
92
49
|
useClose: Boolean(props.useClose),
|
|
93
50
|
useFill: Boolean(props.useFill),
|
|
94
51
|
leading: Boolean(isLeading.value)
|
|
95
|
-
}))
|
|
52
|
+
}));
|
|
96
53
|
</script>
|
|
97
54
|
|
|
98
55
|
<template>
|
|
@@ -112,7 +69,7 @@ const b24ui = computed(() => badge({
|
|
|
112
69
|
/>
|
|
113
70
|
<B24Avatar
|
|
114
71
|
v-else-if="!!avatar"
|
|
115
|
-
:size="
|
|
72
|
+
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
116
73
|
v-bind="avatar"
|
|
117
74
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
118
75
|
/>
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
3
|
+
declare const badge: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
buttonGroup: {
|
|
5
|
+
horizontal: string;
|
|
6
|
+
vertical: string;
|
|
7
|
+
};
|
|
8
|
+
noSplit: {
|
|
9
|
+
false: string;
|
|
10
|
+
};
|
|
11
|
+
useLink: {
|
|
12
|
+
true: {
|
|
13
|
+
base: string;
|
|
14
|
+
wrapper: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
useClose: {
|
|
19
|
+
true: string;
|
|
20
|
+
};
|
|
21
|
+
useFill: {
|
|
22
|
+
true: string;
|
|
23
|
+
false: string;
|
|
24
|
+
};
|
|
25
|
+
leading: {
|
|
26
|
+
true: string;
|
|
27
|
+
};
|
|
28
|
+
color: {
|
|
29
|
+
default: string;
|
|
30
|
+
danger: string;
|
|
31
|
+
success: string;
|
|
32
|
+
warning: string;
|
|
33
|
+
primary: string;
|
|
34
|
+
secondary: string;
|
|
35
|
+
collab: string;
|
|
36
|
+
ai: string;
|
|
37
|
+
};
|
|
38
|
+
depth: {
|
|
39
|
+
light: string;
|
|
40
|
+
normal: string;
|
|
41
|
+
dark: string;
|
|
42
|
+
};
|
|
43
|
+
size: {
|
|
44
|
+
xs: {
|
|
45
|
+
base: string;
|
|
46
|
+
wrapper: string;
|
|
47
|
+
label: string;
|
|
48
|
+
leadingIcon: string;
|
|
49
|
+
leadingAvatarSize: string;
|
|
50
|
+
trailingIcon: string;
|
|
51
|
+
};
|
|
52
|
+
sm: {
|
|
53
|
+
base: string;
|
|
54
|
+
wrapper: string;
|
|
55
|
+
label: string;
|
|
56
|
+
leadingIcon: string;
|
|
57
|
+
leadingAvatarSize: string;
|
|
58
|
+
trailingIcon: string;
|
|
59
|
+
};
|
|
60
|
+
md: {
|
|
61
|
+
base: string;
|
|
62
|
+
wrapper: string;
|
|
63
|
+
label: string;
|
|
64
|
+
leadingIcon: string;
|
|
65
|
+
leadingAvatarSize: string;
|
|
66
|
+
trailingIcon: string;
|
|
67
|
+
};
|
|
68
|
+
lg: {
|
|
69
|
+
base: string;
|
|
70
|
+
wrapper: string;
|
|
71
|
+
leadingIcon: string;
|
|
72
|
+
leadingAvatarSize: string;
|
|
73
|
+
trailingIcon: string;
|
|
74
|
+
};
|
|
75
|
+
xl: {
|
|
76
|
+
base: string;
|
|
77
|
+
wrapper: string;
|
|
78
|
+
leadingIcon: string;
|
|
79
|
+
leadingAvatarSize: string;
|
|
80
|
+
trailingIcon: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
base: string;
|
|
85
|
+
wrapper: string;
|
|
86
|
+
label: string;
|
|
87
|
+
leadingIcon: string;
|
|
88
|
+
leadingAvatar: string;
|
|
89
|
+
leadingAvatarSize: string;
|
|
90
|
+
trailingIcon: string;
|
|
91
|
+
}, undefined, {
|
|
92
|
+
buttonGroup: {
|
|
93
|
+
horizontal: string;
|
|
94
|
+
vertical: string;
|
|
95
|
+
};
|
|
96
|
+
noSplit: {
|
|
97
|
+
false: string;
|
|
98
|
+
};
|
|
99
|
+
useLink: {
|
|
100
|
+
true: {
|
|
101
|
+
base: string;
|
|
102
|
+
wrapper: string;
|
|
103
|
+
label: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
useClose: {
|
|
107
|
+
true: string;
|
|
108
|
+
};
|
|
109
|
+
useFill: {
|
|
110
|
+
true: string;
|
|
111
|
+
false: string;
|
|
112
|
+
};
|
|
113
|
+
leading: {
|
|
114
|
+
true: string;
|
|
115
|
+
};
|
|
116
|
+
color: {
|
|
117
|
+
default: string;
|
|
118
|
+
danger: string;
|
|
119
|
+
success: string;
|
|
120
|
+
warning: string;
|
|
121
|
+
primary: string;
|
|
122
|
+
secondary: string;
|
|
123
|
+
collab: string;
|
|
124
|
+
ai: string;
|
|
125
|
+
};
|
|
126
|
+
depth: {
|
|
127
|
+
light: string;
|
|
128
|
+
normal: string;
|
|
129
|
+
dark: string;
|
|
130
|
+
};
|
|
131
|
+
size: {
|
|
132
|
+
xs: {
|
|
133
|
+
base: string;
|
|
134
|
+
wrapper: string;
|
|
135
|
+
label: string;
|
|
136
|
+
leadingIcon: string;
|
|
137
|
+
leadingAvatarSize: string;
|
|
138
|
+
trailingIcon: string;
|
|
139
|
+
};
|
|
140
|
+
sm: {
|
|
141
|
+
base: string;
|
|
142
|
+
wrapper: string;
|
|
143
|
+
label: string;
|
|
144
|
+
leadingIcon: string;
|
|
145
|
+
leadingAvatarSize: string;
|
|
146
|
+
trailingIcon: string;
|
|
147
|
+
};
|
|
148
|
+
md: {
|
|
149
|
+
base: string;
|
|
150
|
+
wrapper: string;
|
|
151
|
+
label: string;
|
|
152
|
+
leadingIcon: string;
|
|
153
|
+
leadingAvatarSize: string;
|
|
154
|
+
trailingIcon: string;
|
|
155
|
+
};
|
|
156
|
+
lg: {
|
|
157
|
+
base: string;
|
|
158
|
+
wrapper: string;
|
|
159
|
+
leadingIcon: string;
|
|
160
|
+
leadingAvatarSize: string;
|
|
161
|
+
trailingIcon: string;
|
|
162
|
+
};
|
|
163
|
+
xl: {
|
|
164
|
+
base: string;
|
|
165
|
+
wrapper: string;
|
|
166
|
+
leadingIcon: string;
|
|
167
|
+
leadingAvatarSize: string;
|
|
168
|
+
trailingIcon: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
}, {
|
|
172
|
+
base: string;
|
|
173
|
+
wrapper: string;
|
|
174
|
+
label: string;
|
|
175
|
+
leadingIcon: string;
|
|
176
|
+
leadingAvatar: string;
|
|
177
|
+
leadingAvatarSize: string;
|
|
178
|
+
trailingIcon: string;
|
|
179
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
180
|
+
buttonGroup: {
|
|
181
|
+
horizontal: string;
|
|
182
|
+
vertical: string;
|
|
183
|
+
};
|
|
184
|
+
noSplit: {
|
|
185
|
+
false: string;
|
|
186
|
+
};
|
|
187
|
+
useLink: {
|
|
188
|
+
true: {
|
|
189
|
+
base: string;
|
|
190
|
+
wrapper: string;
|
|
191
|
+
label: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
useClose: {
|
|
195
|
+
true: string;
|
|
196
|
+
};
|
|
197
|
+
useFill: {
|
|
198
|
+
true: string;
|
|
199
|
+
false: string;
|
|
200
|
+
};
|
|
201
|
+
leading: {
|
|
202
|
+
true: string;
|
|
203
|
+
};
|
|
204
|
+
color: {
|
|
205
|
+
default: string;
|
|
206
|
+
danger: string;
|
|
207
|
+
success: string;
|
|
208
|
+
warning: string;
|
|
209
|
+
primary: string;
|
|
210
|
+
secondary: string;
|
|
211
|
+
collab: string;
|
|
212
|
+
ai: string;
|
|
213
|
+
};
|
|
214
|
+
depth: {
|
|
215
|
+
light: string;
|
|
216
|
+
normal: string;
|
|
217
|
+
dark: string;
|
|
218
|
+
};
|
|
219
|
+
size: {
|
|
220
|
+
xs: {
|
|
221
|
+
base: string;
|
|
222
|
+
wrapper: string;
|
|
223
|
+
label: string;
|
|
224
|
+
leadingIcon: string;
|
|
225
|
+
leadingAvatarSize: string;
|
|
226
|
+
trailingIcon: string;
|
|
227
|
+
};
|
|
228
|
+
sm: {
|
|
229
|
+
base: string;
|
|
230
|
+
wrapper: string;
|
|
231
|
+
label: string;
|
|
232
|
+
leadingIcon: string;
|
|
233
|
+
leadingAvatarSize: string;
|
|
234
|
+
trailingIcon: string;
|
|
235
|
+
};
|
|
236
|
+
md: {
|
|
237
|
+
base: string;
|
|
238
|
+
wrapper: string;
|
|
239
|
+
label: string;
|
|
240
|
+
leadingIcon: string;
|
|
241
|
+
leadingAvatarSize: string;
|
|
242
|
+
trailingIcon: string;
|
|
243
|
+
};
|
|
244
|
+
lg: {
|
|
245
|
+
base: string;
|
|
246
|
+
wrapper: string;
|
|
247
|
+
leadingIcon: string;
|
|
248
|
+
leadingAvatarSize: string;
|
|
249
|
+
trailingIcon: string;
|
|
250
|
+
};
|
|
251
|
+
xl: {
|
|
252
|
+
base: string;
|
|
253
|
+
wrapper: string;
|
|
254
|
+
leadingIcon: string;
|
|
255
|
+
leadingAvatarSize: string;
|
|
256
|
+
trailingIcon: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
}, {
|
|
260
|
+
base: string;
|
|
261
|
+
wrapper: string;
|
|
262
|
+
label: string;
|
|
263
|
+
leadingIcon: string;
|
|
264
|
+
leadingAvatar: string;
|
|
265
|
+
leadingAvatarSize: string;
|
|
266
|
+
trailingIcon: string;
|
|
267
|
+
}, undefined, {
|
|
268
|
+
buttonGroup: {
|
|
269
|
+
horizontal: string;
|
|
270
|
+
vertical: string;
|
|
271
|
+
};
|
|
272
|
+
noSplit: {
|
|
273
|
+
false: string;
|
|
274
|
+
};
|
|
275
|
+
useLink: {
|
|
276
|
+
true: {
|
|
277
|
+
base: string;
|
|
278
|
+
wrapper: string;
|
|
279
|
+
label: string;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
useClose: {
|
|
283
|
+
true: string;
|
|
284
|
+
};
|
|
285
|
+
useFill: {
|
|
286
|
+
true: string;
|
|
287
|
+
false: string;
|
|
288
|
+
};
|
|
289
|
+
leading: {
|
|
290
|
+
true: string;
|
|
291
|
+
};
|
|
292
|
+
color: {
|
|
293
|
+
default: string;
|
|
294
|
+
danger: string;
|
|
295
|
+
success: string;
|
|
296
|
+
warning: string;
|
|
297
|
+
primary: string;
|
|
298
|
+
secondary: string;
|
|
299
|
+
collab: string;
|
|
300
|
+
ai: string;
|
|
301
|
+
};
|
|
302
|
+
depth: {
|
|
303
|
+
light: string;
|
|
304
|
+
normal: string;
|
|
305
|
+
dark: string;
|
|
306
|
+
};
|
|
307
|
+
size: {
|
|
308
|
+
xs: {
|
|
309
|
+
base: string;
|
|
310
|
+
wrapper: string;
|
|
311
|
+
label: string;
|
|
312
|
+
leadingIcon: string;
|
|
313
|
+
leadingAvatarSize: string;
|
|
314
|
+
trailingIcon: string;
|
|
315
|
+
};
|
|
316
|
+
sm: {
|
|
317
|
+
base: string;
|
|
318
|
+
wrapper: string;
|
|
319
|
+
label: string;
|
|
320
|
+
leadingIcon: string;
|
|
321
|
+
leadingAvatarSize: string;
|
|
322
|
+
trailingIcon: string;
|
|
323
|
+
};
|
|
324
|
+
md: {
|
|
325
|
+
base: string;
|
|
326
|
+
wrapper: string;
|
|
327
|
+
label: string;
|
|
328
|
+
leadingIcon: string;
|
|
329
|
+
leadingAvatarSize: string;
|
|
330
|
+
trailingIcon: string;
|
|
331
|
+
};
|
|
332
|
+
lg: {
|
|
333
|
+
base: string;
|
|
334
|
+
wrapper: string;
|
|
335
|
+
leadingIcon: string;
|
|
336
|
+
leadingAvatarSize: string;
|
|
337
|
+
trailingIcon: string;
|
|
338
|
+
};
|
|
339
|
+
xl: {
|
|
340
|
+
base: string;
|
|
341
|
+
wrapper: string;
|
|
342
|
+
leadingIcon: string;
|
|
343
|
+
leadingAvatarSize: string;
|
|
344
|
+
trailingIcon: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
}, {
|
|
348
|
+
base: string;
|
|
349
|
+
wrapper: string;
|
|
350
|
+
label: string;
|
|
351
|
+
leadingIcon: string;
|
|
352
|
+
leadingAvatar: string;
|
|
353
|
+
leadingAvatarSize: string;
|
|
354
|
+
trailingIcon: string;
|
|
355
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
356
|
+
buttonGroup: {
|
|
357
|
+
horizontal: string;
|
|
358
|
+
vertical: string;
|
|
359
|
+
};
|
|
360
|
+
noSplit: {
|
|
361
|
+
false: string;
|
|
362
|
+
};
|
|
363
|
+
useLink: {
|
|
364
|
+
true: {
|
|
365
|
+
base: string;
|
|
366
|
+
wrapper: string;
|
|
367
|
+
label: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
useClose: {
|
|
371
|
+
true: string;
|
|
372
|
+
};
|
|
373
|
+
useFill: {
|
|
374
|
+
true: string;
|
|
375
|
+
false: string;
|
|
376
|
+
};
|
|
377
|
+
leading: {
|
|
378
|
+
true: string;
|
|
379
|
+
};
|
|
380
|
+
color: {
|
|
381
|
+
default: string;
|
|
382
|
+
danger: string;
|
|
383
|
+
success: string;
|
|
384
|
+
warning: string;
|
|
385
|
+
primary: string;
|
|
386
|
+
secondary: string;
|
|
387
|
+
collab: string;
|
|
388
|
+
ai: string;
|
|
389
|
+
};
|
|
390
|
+
depth: {
|
|
391
|
+
light: string;
|
|
392
|
+
normal: string;
|
|
393
|
+
dark: string;
|
|
394
|
+
};
|
|
395
|
+
size: {
|
|
396
|
+
xs: {
|
|
397
|
+
base: string;
|
|
398
|
+
wrapper: string;
|
|
399
|
+
label: string;
|
|
400
|
+
leadingIcon: string;
|
|
401
|
+
leadingAvatarSize: string;
|
|
402
|
+
trailingIcon: string;
|
|
403
|
+
};
|
|
404
|
+
sm: {
|
|
405
|
+
base: string;
|
|
406
|
+
wrapper: string;
|
|
407
|
+
label: string;
|
|
408
|
+
leadingIcon: string;
|
|
409
|
+
leadingAvatarSize: string;
|
|
410
|
+
trailingIcon: string;
|
|
411
|
+
};
|
|
412
|
+
md: {
|
|
413
|
+
base: string;
|
|
414
|
+
wrapper: string;
|
|
415
|
+
label: string;
|
|
416
|
+
leadingIcon: string;
|
|
417
|
+
leadingAvatarSize: string;
|
|
418
|
+
trailingIcon: string;
|
|
419
|
+
};
|
|
420
|
+
lg: {
|
|
421
|
+
base: string;
|
|
422
|
+
wrapper: string;
|
|
423
|
+
leadingIcon: string;
|
|
424
|
+
leadingAvatarSize: string;
|
|
425
|
+
trailingIcon: string;
|
|
426
|
+
};
|
|
427
|
+
xl: {
|
|
428
|
+
base: string;
|
|
429
|
+
wrapper: string;
|
|
430
|
+
leadingIcon: string;
|
|
431
|
+
leadingAvatarSize: string;
|
|
432
|
+
trailingIcon: string;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
}, {
|
|
436
|
+
base: string;
|
|
437
|
+
wrapper: string;
|
|
438
|
+
label: string;
|
|
439
|
+
leadingIcon: string;
|
|
440
|
+
leadingAvatar: string;
|
|
441
|
+
leadingAvatarSize: string;
|
|
442
|
+
trailingIcon: string;
|
|
443
|
+
}, undefined, unknown, unknown, undefined>>>;
|
|
444
|
+
type BadgeVariants = VariantProps<typeof badge>;
|
|
445
|
+
export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
|
|
446
|
+
/**
|
|
447
|
+
* The element or component this component should render as.
|
|
448
|
+
* @defaultValue 'span'
|
|
449
|
+
*/
|
|
450
|
+
as?: any;
|
|
451
|
+
label?: string | number;
|
|
452
|
+
/**
|
|
453
|
+
* @defaultValue 'default'
|
|
454
|
+
*/
|
|
455
|
+
color?: BadgeVariants['color'];
|
|
456
|
+
/**
|
|
457
|
+
* @defaultValue 'normal'
|
|
458
|
+
*/
|
|
459
|
+
depth?: BadgeVariants['depth'];
|
|
460
|
+
/**
|
|
461
|
+
* @defaultValue 'md'
|
|
462
|
+
*/
|
|
463
|
+
size?: BadgeVariants['size'];
|
|
464
|
+
/**
|
|
465
|
+
* Shows 'underline' on hover
|
|
466
|
+
* @defaultValue false
|
|
467
|
+
*/
|
|
468
|
+
useLink?: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Shows icons.close on the right side
|
|
471
|
+
* @defaultValue false
|
|
472
|
+
*/
|
|
473
|
+
useClose?: boolean;
|
|
474
|
+
onCloseClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>;
|
|
475
|
+
/**
|
|
476
|
+
* Fills the background
|
|
477
|
+
* @defaultValue false
|
|
478
|
+
*/
|
|
479
|
+
useFill?: boolean;
|
|
480
|
+
class?: any;
|
|
481
|
+
b24ui?: Partial<typeof badge.slots>;
|
|
482
|
+
}
|
|
483
|
+
export interface BadgeSlots {
|
|
484
|
+
leading(props?: {}): any;
|
|
485
|
+
default(props?: {}): any;
|
|
486
|
+
trailing(props?: {}): any;
|
|
487
|
+
}
|
|
488
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BadgeProps>, {
|
|
489
|
+
as: string;
|
|
490
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BadgeProps>, {
|
|
491
|
+
as: string;
|
|
492
|
+
}>>> & Readonly<{}>, {
|
|
493
|
+
as: any;
|
|
494
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<BadgeSlots> & BadgeSlots>;
|
|
495
|
+
export default _default;
|
|
496
|
+
type __VLS_WithDefaults<P, D> = {
|
|
497
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
498
|
+
default: D[K];
|
|
499
|
+
}> : P[K];
|
|
500
|
+
};
|
|
501
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
502
|
+
type __VLS_TypePropsToOption<T> = {
|
|
503
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
504
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
505
|
+
} : {
|
|
506
|
+
type: import('vue').PropType<T[K]>;
|
|
507
|
+
required: true;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
511
|
+
new (): {
|
|
512
|
+
$slots: S;
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
type __VLS_PrettifyLocal<T> = {
|
|
516
|
+
[K in keyof T]: T[K];
|
|
517
|
+
} & {};
|