@bitrix24/b24ui-nuxt 0.7.1 → 1.0.1
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/accordion.ts +3 -3
- package/.nuxt/b24ui/advice.ts +6 -5
- package/.nuxt/b24ui/alert.ts +102 -49
- package/.nuxt/b24ui/avatar-group.ts +10 -10
- package/.nuxt/b24ui/avatar.ts +18 -18
- package/.nuxt/b24ui/badge.ts +167 -176
- package/.nuxt/b24ui/button-group.ts +3 -1
- package/.nuxt/b24ui/button.ts +179 -170
- package/.nuxt/b24ui/calendar.ts +48 -28
- package/.nuxt/b24ui/checkbox.ts +82 -85
- package/.nuxt/b24ui/chip.ts +121 -32
- package/.nuxt/b24ui/container.ts +1 -1
- package/.nuxt/b24ui/content/table-wrapper.ts +11 -11
- package/.nuxt/b24ui/countdown.ts +11 -11
- package/.nuxt/b24ui/description-list.ts +6 -6
- package/.nuxt/b24ui/dropdown-menu.ts +111 -183
- package/.nuxt/b24ui/form-field.ts +19 -19
- package/.nuxt/b24ui/index.ts +0 -1
- package/.nuxt/b24ui/input-menu.ts +294 -357
- package/.nuxt/b24ui/input-number.ts +111 -259
- package/.nuxt/b24ui/input.ts +136 -259
- package/.nuxt/b24ui/kbd.ts +15 -13
- package/.nuxt/b24ui/link.ts +5 -5
- package/.nuxt/b24ui/modal.ts +14 -12
- package/.nuxt/b24ui/navbar-divider.ts +1 -1
- package/.nuxt/b24ui/navbar-section.ts +1 -1
- package/.nuxt/b24ui/navbar.ts +1 -1
- package/.nuxt/b24ui/navigation-menu.ts +70 -754
- package/.nuxt/b24ui/popover.ts +2 -2
- package/.nuxt/b24ui/progress.ts +58 -68
- package/.nuxt/b24ui/prose/a.ts +1 -1
- package/.nuxt/b24ui/prose/blockquote.ts +1 -1
- package/.nuxt/b24ui/prose/code.ts +45 -9
- package/.nuxt/b24ui/prose/h1.ts +21 -2
- package/.nuxt/b24ui/prose/h2.ts +21 -12
- package/.nuxt/b24ui/prose/h3.ts +21 -12
- package/.nuxt/b24ui/prose/h4.ts +21 -12
- package/.nuxt/b24ui/prose/h5.ts +21 -12
- package/.nuxt/b24ui/prose/h6.ts +21 -12
- package/.nuxt/b24ui/prose/hr.ts +1 -1
- package/.nuxt/b24ui/prose/ol.ts +1 -1
- package/.nuxt/b24ui/prose/p.ts +26 -1
- package/.nuxt/b24ui/prose/thead.ts +1 -1
- package/.nuxt/b24ui/prose/ul.ts +1 -1
- package/.nuxt/b24ui/radio-group.ts +115 -155
- package/.nuxt/b24ui/range.ts +38 -26
- package/.nuxt/b24ui/select-menu.ts +251 -306
- package/.nuxt/b24ui/select.ts +246 -301
- package/.nuxt/b24ui/separator.ts +40 -85
- package/.nuxt/b24ui/sidebar-header.ts +1 -1
- package/.nuxt/b24ui/sidebar-heading.ts +1 -1
- package/.nuxt/b24ui/sidebar-layout.ts +130 -19
- package/.nuxt/b24ui/sidebar-section.ts +1 -1
- package/.nuxt/b24ui/skeleton.ts +19 -1
- package/.nuxt/b24ui/slideover.ts +35 -34
- package/.nuxt/b24ui/switch.ts +59 -48
- package/.nuxt/b24ui/tabs.ts +26 -239
- package/.nuxt/b24ui/textarea.ts +50 -236
- package/.nuxt/b24ui/toast.ts +38 -30
- package/.nuxt/b24ui/toaster.ts +1 -1
- package/.nuxt/b24ui/tooltip.ts +5 -5
- package/cli/templates.mjs +2 -1
- package/dist/meta.d.mts +18759 -5002
- package/dist/meta.mjs +18759 -5002
- package/dist/module.d.mts +1 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +3 -5
- package/dist/runtime/air-design-tokens/001_b24_global.css +1 -0
- package/dist/runtime/air-design-tokens/002_b24_context_utility.css +0 -0
- package/dist/runtime/air-design-tokens/003_b24_context_light.css +1 -0
- package/dist/runtime/air-design-tokens/004_b24_context_dark.css +1 -0
- package/dist/runtime/air-design-tokens/005_b24_context_edge-light.css +1 -0
- package/dist/runtime/air-design-tokens/006_b24_context_edge-dark.css +1 -0
- package/dist/runtime/air-design-tokens/007_b24_global.css +1 -0
- package/dist/runtime/air-design-tokens/008_ui_global.css +1 -0
- package/dist/runtime/air-design-tokens/009_b24_tools.css +1 -0
- package/dist/runtime/air-design-tokens/components/badge-counter.css +1 -0
- package/dist/runtime/air-design-tokens/components/button.css +1 -0
- package/dist/runtime/air-design-tokens/components/navigation-menu.css +1 -0
- package/dist/runtime/air-design-tokens/components/popup.css +1 -0
- package/dist/runtime/air-design-tokens/components/scrollbar.css +2 -0
- package/dist/runtime/air-design-tokens/index.css +1 -0
- package/dist/runtime/components/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/Advice.vue +1 -13
- package/dist/runtime/components/Advice.vue.d.ts +1 -1
- package/dist/runtime/components/Alert.vue +6 -4
- package/dist/runtime/components/Alert.vue.d.ts +11 -4
- package/dist/runtime/components/App.vue.d.ts +1 -1
- package/dist/runtime/components/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue +7 -11
- package/dist/runtime/components/Badge.vue.d.ts +6 -8
- package/dist/runtime/components/Button.vue +18 -15
- package/dist/runtime/components/Button.vue.d.ts +5 -7
- package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue +8 -8
- package/dist/runtime/components/Calendar.vue.d.ts +14 -8
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/Chip.vue +28 -7
- package/dist/runtime/components/Chip.vue.d.ts +22 -2
- package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
- package/dist/runtime/components/Container.vue.d.ts +1 -1
- package/dist/runtime/components/Countdown.vue.d.ts +5 -3
- package/dist/runtime/components/DescriptionList.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue +20 -9
- package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -5
- package/dist/runtime/components/DropdownMenuContent.vue +29 -7
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +14 -6
- package/dist/runtime/components/Form.vue +3 -3
- package/dist/runtime/components/Form.vue.d.ts +6 -5
- package/dist/runtime/components/FormField.vue +2 -2
- package/dist/runtime/components/FormField.vue.d.ts +4 -4
- package/dist/runtime/components/Input.vue +8 -4
- package/dist/runtime/components/Input.vue.d.ts +9 -8
- package/dist/runtime/components/InputMenu.vue +44 -18
- package/dist/runtime/components/InputMenu.vue.d.ts +17 -223
- package/dist/runtime/components/InputNumber.vue +14 -11
- package/dist/runtime/components/InputNumber.vue.d.ts +13 -87
- package/dist/runtime/components/Kbd.vue +6 -3
- package/dist/runtime/components/Kbd.vue.d.ts +7 -3
- package/dist/runtime/components/Link.vue +6 -5
- package/dist/runtime/components/Link.vue.d.ts +1 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/components/Modal.vue +37 -33
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/ModalDialogClose.vue.d.ts +1 -1
- package/dist/runtime/components/Navbar.vue.d.ts +1 -1
- package/dist/runtime/components/NavbarDivider.vue.d.ts +1 -1
- package/dist/runtime/components/NavbarSection.vue.d.ts +1 -1
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +1 -1
- package/dist/runtime/components/NavigationMenu.vue +95 -84
- package/dist/runtime/components/NavigationMenu.vue.d.ts +31 -33
- package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Popover.vue +8 -2
- package/dist/runtime/components/Popover.vue.d.ts +9 -3
- package/dist/runtime/components/Progress.vue.d.ts +3 -3
- package/dist/runtime/components/RadioGroup.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue.d.ts +6 -5
- package/dist/runtime/components/Range.vue.d.ts +6 -6
- package/dist/runtime/components/Select.vue +25 -11
- package/dist/runtime/components/Select.vue.d.ts +7 -7
- package/dist/runtime/components/SelectMenu.vue +38 -19
- package/dist/runtime/components/SelectMenu.vue.d.ts +11 -10
- package/dist/runtime/components/Separator.vue +4 -4
- package/dist/runtime/components/Separator.vue.d.ts +6 -3
- package/dist/runtime/components/Sidebar.vue.d.ts +4 -1
- package/dist/runtime/components/SidebarBody.vue.d.ts +4 -1
- package/dist/runtime/components/SidebarFooter.vue.d.ts +4 -1
- package/dist/runtime/components/SidebarHeader.vue.d.ts +4 -1
- package/dist/runtime/components/SidebarHeading.vue.d.ts +4 -1
- package/dist/runtime/components/SidebarLayout.vue +148 -63
- package/dist/runtime/components/SidebarLayout.vue.d.ts +61 -8
- package/dist/runtime/components/SidebarSection.vue.d.ts +4 -1
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +4 -1
- package/dist/runtime/components/Skeleton.vue +7 -3
- package/dist/runtime/components/Skeleton.vue.d.ts +12 -1
- package/dist/runtime/components/Slideover.vue +120 -43
- package/dist/runtime/components/Slideover.vue.d.ts +22 -9
- package/dist/runtime/components/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/Tabs.vue +11 -3
- package/dist/runtime/components/Tabs.vue.d.ts +8 -7
- package/dist/runtime/components/Textarea.vue +8 -4
- package/dist/runtime/components/Textarea.vue.d.ts +8 -7
- package/dist/runtime/components/Toast.vue +16 -8
- package/dist/runtime/components/Toast.vue.d.ts +16 -15
- package/dist/runtime/components/Toaster.vue.d.ts +2 -2
- package/dist/runtime/components/Tooltip.vue +9 -5
- package/dist/runtime/components/Tooltip.vue.d.ts +7 -1
- package/dist/runtime/components/content/TableWrapper.vue.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +5 -3
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +4 -7
- package/dist/runtime/composables/useFormField.js +6 -3
- package/dist/runtime/composables/useKbd.d.ts +1 -1
- package/dist/runtime/composables/useLocale.js +2 -2
- package/dist/runtime/composables/useOverlay.d.ts +29 -2
- package/dist/runtime/composables/useOverlay.js +8 -7
- package/dist/runtime/composables/usePortal.d.ts +1 -1
- package/dist/runtime/composables/useSidebarLayout.d.ts +20 -0
- package/dist/runtime/composables/useSidebarLayout.js +16 -0
- package/dist/runtime/dictionary/icons.js +7 -7
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.vue +3 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/inertia/stubs.d.ts +1 -0
- package/dist/runtime/inertia/stubs.js +4 -2
- package/dist/runtime/locale/ar.js +6 -0
- package/dist/runtime/locale/br.js +6 -0
- package/dist/runtime/locale/de.js +6 -0
- package/dist/runtime/locale/en.js +6 -0
- package/dist/runtime/locale/fr.js +6 -0
- package/dist/runtime/locale/id.js +6 -0
- package/dist/runtime/locale/it.js +6 -0
- package/dist/runtime/locale/ja.js +6 -0
- package/dist/runtime/locale/kz.js +6 -0
- package/dist/runtime/locale/la.js +6 -0
- package/dist/runtime/locale/ms.js +6 -0
- package/dist/runtime/locale/pl.js +6 -0
- package/dist/runtime/locale/ru.js +6 -0
- package/dist/runtime/locale/sc.js +6 -0
- package/dist/runtime/locale/tc.js +6 -0
- package/dist/runtime/locale/th.js +6 -0
- package/dist/runtime/locale/tr.js +6 -0
- package/dist/runtime/locale/ua.js +6 -0
- package/dist/runtime/locale/vn.js +6 -0
- package/dist/runtime/plugins/ui-version.d.ts +5 -0
- package/dist/runtime/plugins/ui-version.js +8 -0
- package/dist/runtime/prose/A.vue.d.ts +4 -1
- package/dist/runtime/prose/Blockquote.vue.d.ts +4 -1
- package/dist/runtime/prose/Code.vue.d.ts +4 -1
- package/dist/runtime/prose/Em.vue.d.ts +4 -1
- package/dist/runtime/prose/H1.vue +4 -1
- package/dist/runtime/prose/H1.vue.d.ts +7 -1
- package/dist/runtime/prose/H2.vue +4 -1
- package/dist/runtime/prose/H2.vue.d.ts +7 -1
- package/dist/runtime/prose/H3.vue +4 -1
- package/dist/runtime/prose/H3.vue.d.ts +7 -1
- package/dist/runtime/prose/H4.vue +4 -1
- package/dist/runtime/prose/H4.vue.d.ts +7 -1
- package/dist/runtime/prose/H5.vue +4 -1
- package/dist/runtime/prose/H5.vue.d.ts +7 -1
- package/dist/runtime/prose/H6.vue +4 -1
- package/dist/runtime/prose/H6.vue.d.ts +7 -1
- package/dist/runtime/prose/Hr.vue.d.ts +1 -1
- package/dist/runtime/prose/Img.vue.d.ts +1 -1
- package/dist/runtime/prose/Li.vue.d.ts +4 -1
- package/dist/runtime/prose/Ol.vue.d.ts +4 -1
- package/dist/runtime/prose/P.vue +6 -1
- package/dist/runtime/prose/P.vue.d.ts +12 -1
- package/dist/runtime/prose/Pre.vue.d.ts +4 -1
- package/dist/runtime/prose/Strong.vue.d.ts +4 -1
- package/dist/runtime/prose/Table.vue.d.ts +5 -2
- package/dist/runtime/prose/Tbody.vue.d.ts +4 -1
- package/dist/runtime/prose/Td.vue.d.ts +4 -1
- package/dist/runtime/prose/Th.vue.d.ts +4 -1
- package/dist/runtime/prose/Thead.vue.d.ts +4 -1
- package/dist/runtime/prose/Tr.vue.d.ts +4 -1
- package/dist/runtime/prose/Ul.vue.d.ts +4 -1
- package/dist/runtime/types/index.d.ts +1 -2
- package/dist/runtime/types/index.js +1 -2
- package/dist/runtime/types/locale.d.ts +6 -0
- package/dist/runtime/utils/index.d.ts +6 -0
- package/dist/runtime/utils/index.js +27 -0
- package/dist/runtime/utils/tv.js +66 -1
- package/dist/runtime/vue/components/Link.vue +3 -0
- package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/stubs.d.ts +1 -0
- package/dist/runtime/vue/stubs.js +3 -1
- package/dist/shared/b24ui-nuxt.dLc5H7ID.mjs +6100 -0
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +40 -28
- package/.nuxt/b24ui/stacked-layout.ts +0 -34
- package/dist/runtime/air-design-tokens.css +0 -1
- package/dist/runtime/components/StackedLayout.vue +0 -117
- package/dist/runtime/components/StackedLayout.vue.d.ts +0 -44
- package/dist/shared/b24ui-nuxt.CxsFEY3M.mjs +0 -7895
|
@@ -9,7 +9,6 @@ import { useAppConfig } from "#imports";
|
|
|
9
9
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
10
10
|
import { tv } from "../utils/tv";
|
|
11
11
|
import B24Avatar from "./Avatar.vue";
|
|
12
|
-
import PersonIcon from "@bitrix24/b24icons-vue/main/PersonIcon";
|
|
13
12
|
defineOptions({ inheritAttrs: false });
|
|
14
13
|
const props = defineProps({
|
|
15
14
|
as: { type: null, required: false, default: "div" },
|
|
@@ -44,21 +43,10 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.advice
|
|
|
44
43
|
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
45
44
|
v-bind="avatar"
|
|
46
45
|
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
46
|
+
:b24ui="{ icon: props.b24ui?.leadingAvatarIcon || b24ui.leadingAvatarIcon() }"
|
|
47
47
|
/>
|
|
48
48
|
</slot>
|
|
49
49
|
</div>
|
|
50
|
-
<div
|
|
51
|
-
v-else
|
|
52
|
-
:class="b24ui.leading({ class: props.b24ui?.leading })"
|
|
53
|
-
>
|
|
54
|
-
<B24Avatar
|
|
55
|
-
:size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
|
|
56
|
-
:icon="PersonIcon"
|
|
57
|
-
alt="Person"
|
|
58
|
-
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
59
|
-
:b24ui="{ icon: 'text-white bg-base-800 dark:text-200' }"
|
|
60
|
-
/>
|
|
61
|
-
</div>
|
|
62
50
|
<div :class="b24ui.descriptionWrapper({ class: props.b24ui?.descriptionWrapper })">
|
|
63
51
|
<div :class="b24ui.descriptionAngle({ class: props.b24ui?.descriptionAngle })">
|
|
64
52
|
<svg
|
|
@@ -21,7 +21,7 @@ export interface AdviceSlots {
|
|
|
21
21
|
leading(props?: {}): any;
|
|
22
22
|
default(props?: {}): any;
|
|
23
23
|
}
|
|
24
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AdviceProps,
|
|
24
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AdviceProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AdviceProps> & Readonly<{}>, {
|
|
25
25
|
as: any;
|
|
26
26
|
angle: Advice["variants"]["angle"];
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AdviceSlots>;
|
|
@@ -18,6 +18,7 @@ const props = defineProps({
|
|
|
18
18
|
icon: { type: [Function, Object], required: false },
|
|
19
19
|
avatar: { type: Object, required: false },
|
|
20
20
|
color: { type: null, required: false },
|
|
21
|
+
inverted: { type: Boolean, required: false, default: false },
|
|
21
22
|
orientation: { type: null, required: false, default: "vertical" },
|
|
22
23
|
size: { type: null, required: false },
|
|
23
24
|
actions: { type: Array, required: false },
|
|
@@ -32,6 +33,7 @@ const { t } = useLocale();
|
|
|
32
33
|
const appConfig = useAppConfig();
|
|
33
34
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert || {} })({
|
|
34
35
|
color: props.color,
|
|
36
|
+
inverted: Boolean(props.inverted),
|
|
35
37
|
size: props.size,
|
|
36
38
|
orientation: props.orientation,
|
|
37
39
|
title: !!props.title || !!slots.title
|
|
@@ -63,7 +65,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
|
|
|
63
65
|
|
|
64
66
|
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="b24ui.actions({ class: props.b24ui?.actions })">
|
|
65
67
|
<slot name="actions">
|
|
66
|
-
<B24Button v-for="(action, index) in actions" :key="index" size="
|
|
68
|
+
<B24Button v-for="(action, index) in actions" :key="index" size="sm" v-bind="action" />
|
|
67
69
|
</slot>
|
|
68
70
|
</div>
|
|
69
71
|
</div>
|
|
@@ -71,7 +73,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
|
|
|
71
73
|
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="b24ui.actions({ class: props.b24ui?.actions, orientation: 'horizontal' })">
|
|
72
74
|
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
73
75
|
<slot name="actions">
|
|
74
|
-
<B24Button v-for="(action, index) in actions" :key="index" size="
|
|
76
|
+
<B24Button v-for="(action, index) in actions" :key="index" size="sm" v-bind="action" />
|
|
75
77
|
</slot>
|
|
76
78
|
</template>
|
|
77
79
|
|
|
@@ -79,8 +81,8 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert |
|
|
|
79
81
|
<B24Button
|
|
80
82
|
v-if="close"
|
|
81
83
|
:icon="closeIcon || icons.close"
|
|
82
|
-
size="
|
|
83
|
-
color="
|
|
84
|
+
size="sm"
|
|
85
|
+
color="air-tertiary"
|
|
84
86
|
:aria-label="t('alert.close')"
|
|
85
87
|
v-bind="typeof close === 'object' ? close : {}"
|
|
86
88
|
:class="b24ui.close({ class: props.b24ui?.close })"
|
|
@@ -21,6 +21,12 @@ export interface AlertProps {
|
|
|
21
21
|
* @defaultValue 'default'
|
|
22
22
|
*/
|
|
23
23
|
color?: Alert['variants']['color'];
|
|
24
|
+
/**
|
|
25
|
+
* If set to `true` the color is inverted.
|
|
26
|
+
* Used for 'air-primary', 'air-primary-success', 'air-primary-alert', 'air-primary-copilot' and 'air-primary-warning' colors.
|
|
27
|
+
* @defaultValue false
|
|
28
|
+
*/
|
|
29
|
+
inverted?: boolean;
|
|
24
30
|
/**
|
|
25
31
|
* The orientation between the content and the actions.
|
|
26
32
|
* @defaultValue 'vertical'
|
|
@@ -34,12 +40,12 @@ export interface AlertProps {
|
|
|
34
40
|
* Display a list of actions:
|
|
35
41
|
* - under the title and description when orientation is `vertical`
|
|
36
42
|
* - next to the close button when orientation is `horizontal`
|
|
37
|
-
* `{ size: '
|
|
43
|
+
* `{ size: 'sm' }`{lang="ts"}
|
|
38
44
|
*/
|
|
39
45
|
actions?: ButtonProps[];
|
|
40
46
|
/**
|
|
41
47
|
* Display a close button to dismiss the alert.
|
|
42
|
-
* `{ size: '
|
|
48
|
+
* `{ size: 'sm', color: 'air-tertiary-no-accent' }`{lang="ts"}
|
|
43
49
|
* @emits 'update:open'
|
|
44
50
|
* @defaultValue false
|
|
45
51
|
*/
|
|
@@ -54,7 +60,7 @@ export interface AlertProps {
|
|
|
54
60
|
b24ui?: Alert['slots'];
|
|
55
61
|
}
|
|
56
62
|
export interface AlertEmits {
|
|
57
|
-
|
|
63
|
+
'update:open': [value: boolean];
|
|
58
64
|
}
|
|
59
65
|
export interface AlertSlots {
|
|
60
66
|
leading(props?: {}): any;
|
|
@@ -67,11 +73,12 @@ export interface AlertSlots {
|
|
|
67
73
|
};
|
|
68
74
|
}): any;
|
|
69
75
|
}
|
|
70
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps,
|
|
76
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
77
|
"update:open": (value: boolean) => any;
|
|
72
78
|
}, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
|
|
73
79
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
74
80
|
}>, {
|
|
81
|
+
inverted: boolean;
|
|
75
82
|
orientation: Alert["variants"]["orientation"];
|
|
76
83
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AlertSlots>;
|
|
77
84
|
export default _default;
|
|
@@ -29,7 +29,7 @@ export interface AvatarProps {
|
|
|
29
29
|
export interface AvatarSlots {
|
|
30
30
|
default(props?: {}): any;
|
|
31
31
|
}
|
|
32
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps,
|
|
32
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
33
33
|
as: any;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
35
35
|
default?: (props: {}) => any;
|
|
@@ -22,7 +22,7 @@ export interface AvatarGroupProps {
|
|
|
22
22
|
export interface AvatarGroupSlots {
|
|
23
23
|
default(props?: {}): any;
|
|
24
24
|
}
|
|
25
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps,
|
|
25
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
|
|
26
26
|
export default _default;
|
|
27
27
|
type __VLS_WithSlots<T, S> = T & {
|
|
28
28
|
new (): {
|
|
@@ -15,13 +15,12 @@ const props = defineProps({
|
|
|
15
15
|
as: { type: null, required: false, default: "span" },
|
|
16
16
|
label: { type: [String, Number], required: false },
|
|
17
17
|
color: { type: null, required: false },
|
|
18
|
-
|
|
18
|
+
inverted: { type: Boolean, required: false, default: false },
|
|
19
19
|
size: { type: null, required: false },
|
|
20
20
|
square: { type: Boolean, required: false },
|
|
21
21
|
useLink: { type: Boolean, required: false },
|
|
22
22
|
useClose: { type: Boolean, required: false },
|
|
23
23
|
onCloseClick: { type: [Function, Array], required: false },
|
|
24
|
-
useFill: { type: Boolean, required: false },
|
|
25
24
|
class: { type: null, required: false },
|
|
26
25
|
b24ui: { type: null, required: false },
|
|
27
26
|
icon: { type: [Function, Object], required: false },
|
|
@@ -42,13 +41,12 @@ const { orientation, size: buttonGroupSize } = useButtonGroup(props);
|
|
|
42
41
|
const { isLeading, leadingIconName } = useComponentIcons(props);
|
|
43
42
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge || {} })({
|
|
44
43
|
color: props.color,
|
|
45
|
-
|
|
44
|
+
inverted: Boolean(props.inverted),
|
|
46
45
|
size: buttonGroupSize.value || props.size,
|
|
47
46
|
square: props.square || !slots.default && !props.label,
|
|
48
47
|
buttonGroup: orientation.value,
|
|
49
48
|
useLink: Boolean(props.useLink),
|
|
50
49
|
useClose: Boolean(props.useClose),
|
|
51
|
-
useFill: Boolean(props.useFill),
|
|
52
50
|
leading: Boolean(isLeading.value)
|
|
53
51
|
}));
|
|
54
52
|
</script>
|
|
@@ -76,13 +74,11 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.badge |
|
|
|
76
74
|
/>
|
|
77
75
|
</slot>
|
|
78
76
|
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</slot>
|
|
85
|
-
</span>
|
|
77
|
+
<slot>
|
|
78
|
+
<span v-if="label !== void 0 && label !== null" :class="b24ui.label({ class: props.b24ui?.label })">
|
|
79
|
+
{{ label }}
|
|
80
|
+
</span>
|
|
81
|
+
</slot>
|
|
86
82
|
</Primitive>
|
|
87
83
|
<slot name="trailing">
|
|
88
84
|
<Cross20Icon
|
|
@@ -15,9 +15,11 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
|
|
|
15
15
|
*/
|
|
16
16
|
color?: Badge['variants']['color'];
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* If set to `true` the color is inverted.
|
|
19
|
+
* Used for 'air-primary', 'air-primary-success', 'air-primary-alert', 'air-primary-copilot' and 'air-primary-warning' colors.
|
|
20
|
+
* @defaultValue false
|
|
19
21
|
*/
|
|
20
|
-
|
|
22
|
+
inverted?: boolean;
|
|
21
23
|
/**
|
|
22
24
|
* @defaultValue 'md'
|
|
23
25
|
*/
|
|
@@ -35,11 +37,6 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
|
|
|
35
37
|
*/
|
|
36
38
|
useClose?: boolean;
|
|
37
39
|
onCloseClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>;
|
|
38
|
-
/**
|
|
39
|
-
* Fills the background
|
|
40
|
-
* @defaultValue false
|
|
41
|
-
*/
|
|
42
|
-
useFill?: boolean;
|
|
43
40
|
class?: any;
|
|
44
41
|
b24ui?: Badge['slots'];
|
|
45
42
|
}
|
|
@@ -48,7 +45,8 @@ export interface BadgeSlots {
|
|
|
48
45
|
default(props?: {}): any;
|
|
49
46
|
trailing(props?: {}): any;
|
|
50
47
|
}
|
|
51
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps,
|
|
48
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
49
|
+
inverted: boolean;
|
|
52
50
|
as: any;
|
|
53
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BadgeSlots>;
|
|
54
52
|
export default _default;
|
|
@@ -10,13 +10,13 @@ import { useAppConfig } from "#imports";
|
|
|
10
10
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
11
11
|
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
12
12
|
import { formLoadingInjectionKey } from "../composables/useFormField";
|
|
13
|
-
import { omit } from "../utils";
|
|
13
|
+
import { omit, mergeClasses } from "../utils";
|
|
14
14
|
import { tv } from "../utils/tv";
|
|
15
15
|
import { pickLinkProps } from "../utils/link";
|
|
16
16
|
import B24Avatar from "./Avatar.vue";
|
|
17
17
|
import B24Link from "./Link.vue";
|
|
18
18
|
import B24LinkBase from "./LinkBase.vue";
|
|
19
|
-
import
|
|
19
|
+
import ChevronDownSIcon from "@bitrix24/b24icons-vue/outline/ChevronDownSIcon";
|
|
20
20
|
import LoaderWaitIcon from "@bitrix24/b24icons-vue/animated/LoaderWaitIcon";
|
|
21
21
|
import LoaderClockIcon from "@bitrix24/b24icons-vue/animated/LoaderClockIcon";
|
|
22
22
|
import SpinnerIcon from "@bitrix24/b24icons-vue/specialized/SpinnerIcon";
|
|
@@ -30,14 +30,14 @@ const props = defineProps({
|
|
|
30
30
|
rounded: { type: Boolean, required: false },
|
|
31
31
|
block: { type: Boolean, required: false },
|
|
32
32
|
loadingAuto: { type: Boolean, required: false },
|
|
33
|
-
normalCase: { type: Boolean, required: false },
|
|
33
|
+
normalCase: { type: Boolean, required: false, default: true },
|
|
34
34
|
useWait: { type: Boolean, required: false },
|
|
35
35
|
useClock: { type: Boolean, required: false },
|
|
36
36
|
useDropdown: { type: Boolean, required: false },
|
|
37
37
|
onClick: { type: [Function, Array], required: false },
|
|
38
38
|
class: { type: null, required: false },
|
|
39
|
-
activeClass: { type: String, required: false
|
|
40
|
-
inactiveClass: { type: String, required: false
|
|
39
|
+
activeClass: { type: String, required: false },
|
|
40
|
+
inactiveClass: { type: String, required: false },
|
|
41
41
|
b24ui: { type: null, required: false },
|
|
42
42
|
icon: { type: [Function, Object], required: false },
|
|
43
43
|
avatar: { type: Object, required: false },
|
|
@@ -45,7 +45,7 @@ const props = defineProps({
|
|
|
45
45
|
as: { type: null, required: false },
|
|
46
46
|
type: { type: null, required: false, default: "button" },
|
|
47
47
|
disabled: { type: Boolean, required: false },
|
|
48
|
-
active: { type: Boolean, required: false
|
|
48
|
+
active: { type: Boolean, required: false },
|
|
49
49
|
exact: { type: Boolean, required: false },
|
|
50
50
|
exactQuery: { type: [Boolean, String], required: false },
|
|
51
51
|
exactHash: { type: Boolean, required: false },
|
|
@@ -102,10 +102,10 @@ const b24ui = computed(() => tv({
|
|
|
102
102
|
variants: {
|
|
103
103
|
active: {
|
|
104
104
|
true: {
|
|
105
|
-
base: props.activeClass
|
|
105
|
+
base: mergeClasses(appConfig.b24ui?.button?.variants?.active?.true?.base, props.activeClass)
|
|
106
106
|
},
|
|
107
107
|
false: {
|
|
108
|
-
base: props.inactiveClass
|
|
108
|
+
base: mergeClasses(appConfig.b24ui?.button?.variants?.active?.false?.base, props.inactiveClass)
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -124,7 +124,8 @@ const b24ui = computed(() => tv({
|
|
|
124
124
|
useWait: Boolean(props.useWait),
|
|
125
125
|
useClock: Boolean(props.useClock),
|
|
126
126
|
leading: Boolean(isLeading.value),
|
|
127
|
-
buttonGroup: orientation.value
|
|
127
|
+
buttonGroup: orientation.value,
|
|
128
|
+
isAir: true
|
|
128
129
|
}));
|
|
129
130
|
</script>
|
|
130
131
|
|
|
@@ -148,11 +149,11 @@ const b24ui = computed(() => tv({
|
|
|
148
149
|
>
|
|
149
150
|
<div
|
|
150
151
|
v-if="isLoading"
|
|
151
|
-
class="
|
|
152
|
+
:class="b24ui.baseLoading({ class: props.b24ui?.baseLoading, active })"
|
|
152
153
|
>
|
|
153
|
-
<LoaderWaitIcon v-if="useWait" class="
|
|
154
|
-
<LoaderClockIcon v-else-if="useClock" class="
|
|
155
|
-
<SpinnerIcon v-else class="
|
|
154
|
+
<LoaderWaitIcon v-if="useWait" :class="b24ui.baseLoadingWaitIcon({ class: props.b24ui?.baseLoadingWaitIcon })" aria-hidden="true" />
|
|
155
|
+
<LoaderClockIcon v-else-if="useClock" :class="b24ui.baseLoadingClockIcon({ class: props.b24ui?.baseLoadingClockIcon })" aria-hidden="true" />
|
|
156
|
+
<SpinnerIcon v-else :class="b24ui.baseLoadingSpinnerIcon({ class: props.b24ui?.baseLoadingSpinnerIcon })" aria-hidden="true" />
|
|
156
157
|
</div>
|
|
157
158
|
<div
|
|
158
159
|
:class="[
|
|
@@ -176,12 +177,14 @@ const b24ui = computed(() => tv({
|
|
|
176
177
|
|
|
177
178
|
<slot>
|
|
178
179
|
<span v-if="label !== void 0 && label !== null" :class="b24ui.label({ class: props.b24ui?.label, active })">
|
|
179
|
-
{
|
|
180
|
+
<span :class="b24ui.labelInner({ class: props.b24ui?.labelInner, active })">
|
|
181
|
+
{{ label }}
|
|
182
|
+
</span>
|
|
180
183
|
</span>
|
|
181
184
|
</slot>
|
|
182
185
|
|
|
183
186
|
<slot name="trailing">
|
|
184
|
-
<
|
|
187
|
+
<ChevronDownSIcon
|
|
185
188
|
v-if="useDropdown"
|
|
186
189
|
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
187
190
|
aria-hidden="true"
|
|
@@ -7,7 +7,7 @@ type Button = ComponentConfig<typeof theme, AppConfig, 'button'>;
|
|
|
7
7
|
export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | 'trailingIcon'>, Omit<LinkProps, 'raw' | 'custom'> {
|
|
8
8
|
label?: string;
|
|
9
9
|
/**
|
|
10
|
-
* @defaultValue '
|
|
10
|
+
* @defaultValue 'air-secondary-no-accent'
|
|
11
11
|
*/
|
|
12
12
|
color?: Button['variants']['color'];
|
|
13
13
|
activeColor?: Button['variants']['color'];
|
|
@@ -37,7 +37,7 @@ export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | '
|
|
|
37
37
|
loadingAuto?: boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Disable uppercase label
|
|
40
|
-
* @defaultValue
|
|
40
|
+
* @defaultValue true
|
|
41
41
|
*/
|
|
42
42
|
normalCase?: boolean;
|
|
43
43
|
/**
|
|
@@ -51,7 +51,7 @@ export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | '
|
|
|
51
51
|
*/
|
|
52
52
|
useClock?: boolean;
|
|
53
53
|
/**
|
|
54
|
-
* Shows icons.
|
|
54
|
+
* Shows icons.ChevronDownSIcon on the right side
|
|
55
55
|
* @defaultValue false
|
|
56
56
|
*/
|
|
57
57
|
useDropdown?: boolean;
|
|
@@ -74,11 +74,9 @@ export interface ButtonSlots {
|
|
|
74
74
|
default(props?: {}): any;
|
|
75
75
|
trailing(props?: {}): any;
|
|
76
76
|
}
|
|
77
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps,
|
|
77
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
78
78
|
type: "reset" | "submit" | "button";
|
|
79
|
-
|
|
80
|
-
active: boolean;
|
|
81
|
-
inactiveClass: string;
|
|
79
|
+
normalCase: boolean;
|
|
82
80
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
|
|
83
81
|
export default _default;
|
|
84
82
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -28,7 +28,7 @@ export interface ButtonGroupProps {
|
|
|
28
28
|
export interface ButtonGroupSlots {
|
|
29
29
|
default(props?: {}): any;
|
|
30
30
|
}
|
|
31
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps,
|
|
31
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
32
32
|
orientation: ButtonGroup["variants"]["orientation"];
|
|
33
33
|
noSplit: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonGroupSlots>;
|
|
@@ -27,7 +27,7 @@ const props = defineProps({
|
|
|
27
27
|
range: { type: Boolean, required: false },
|
|
28
28
|
multiple: { type: Boolean, required: false },
|
|
29
29
|
monthControls: { type: Boolean, required: false, default: true },
|
|
30
|
-
yearControls: { type: Boolean, required: false, default:
|
|
30
|
+
yearControls: { type: Boolean, required: false, default: false },
|
|
31
31
|
defaultValue: { type: null, required: false },
|
|
32
32
|
modelValue: { type: null, required: false },
|
|
33
33
|
class: { type: null, required: false },
|
|
@@ -77,10 +77,10 @@ function paginateYear(date, sign) {
|
|
|
77
77
|
const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
78
78
|
const btnSize = computed(() => {
|
|
79
79
|
switch (props.size) {
|
|
80
|
-
case "
|
|
81
|
-
return "sm";
|
|
82
|
-
default:
|
|
80
|
+
case "xs":
|
|
83
81
|
return "xs";
|
|
82
|
+
default:
|
|
83
|
+
return "sm";
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
</script>
|
|
@@ -97,10 +97,10 @@ const btnSize = computed(() => {
|
|
|
97
97
|
>
|
|
98
98
|
<Calendar.Header :class="b24ui.header({ class: props.b24ui?.header })">
|
|
99
99
|
<Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
|
|
100
|
-
<B24Button :icon="prevYearIcon" :size="btnSize" color="
|
|
100
|
+
<B24Button :icon="prevYearIcon" :size="btnSize" color="air-tertiary" v-bind="props.prevYear" />
|
|
101
101
|
</Calendar.Prev>
|
|
102
102
|
<Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
|
|
103
|
-
<B24Button :icon="prevMonthIcon" :size="btnSize" color="
|
|
103
|
+
<B24Button :icon="prevMonthIcon" :size="btnSize" color="air-tertiary" v-bind="props.prevMonth" />
|
|
104
104
|
</Calendar.Prev>
|
|
105
105
|
<Calendar.Heading v-slot="{ headingValue }" :class="b24ui.heading({ class: props.b24ui?.heading })">
|
|
106
106
|
<slot name="heading" :value="headingValue">
|
|
@@ -108,10 +108,10 @@ const btnSize = computed(() => {
|
|
|
108
108
|
</slot>
|
|
109
109
|
</Calendar.Heading>
|
|
110
110
|
<Calendar.Next v-if="props.monthControls" :aria-label="t('calendar.nextMonth')" as-child>
|
|
111
|
-
<B24Button :icon="nextMonthIcon" :size="btnSize" color="
|
|
111
|
+
<B24Button :icon="nextMonthIcon" :size="btnSize" color="air-tertiary" v-bind="props.nextMonth" />
|
|
112
112
|
</Calendar.Next>
|
|
113
113
|
<Calendar.Next v-if="props.yearControls" :next-page="(date) => paginateYear(date, 1)" :aria-label="t('calendar.nextYear')" as-child>
|
|
114
|
-
<B24Button :icon="nextYearIcon" :size="btnSize" color="
|
|
114
|
+
<B24Button :icon="nextYearIcon" :size="btnSize" color="air-tertiary" v-bind="props.nextYear" />
|
|
115
115
|
</Calendar.Next>
|
|
116
116
|
</Calendar.Header>
|
|
117
117
|
<div :class="b24ui.body({ class: props.b24ui?.body })">
|
|
@@ -23,7 +23,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
23
23
|
nextYearIcon?: IconComponent;
|
|
24
24
|
/**
|
|
25
25
|
* Configure the next year button.
|
|
26
|
-
* `{ color: '
|
|
26
|
+
* `{ color: 'air-tertiary' }`{lang="ts"}
|
|
27
27
|
*/
|
|
28
28
|
nextYear?: ButtonProps;
|
|
29
29
|
/**
|
|
@@ -34,7 +34,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
34
34
|
nextMonthIcon?: IconComponent;
|
|
35
35
|
/**
|
|
36
36
|
* Configure the next month button.
|
|
37
|
-
* `{ color: '
|
|
37
|
+
* `{ color: 'air-tertiary' }`{lang="ts"}
|
|
38
38
|
*/
|
|
39
39
|
nextMonth?: ButtonProps;
|
|
40
40
|
/**
|
|
@@ -45,7 +45,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
45
45
|
prevYearIcon?: IconComponent;
|
|
46
46
|
/**
|
|
47
47
|
* Configure the prev year button.
|
|
48
|
-
* `{ color: '
|
|
48
|
+
* `{ color: 'air-tertiary' }`{lang="ts"}
|
|
49
49
|
*/
|
|
50
50
|
prevYear?: ButtonProps;
|
|
51
51
|
/**
|
|
@@ -56,11 +56,11 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
56
56
|
prevMonthIcon?: IconComponent;
|
|
57
57
|
/**
|
|
58
58
|
* Configure the prev month button.
|
|
59
|
-
* `{ color: '
|
|
59
|
+
* `{ color: 'air-tertiary' }`{lang="ts"}
|
|
60
60
|
*/
|
|
61
61
|
prevMonth?: ButtonProps;
|
|
62
62
|
/**
|
|
63
|
-
* @defaultValue 'primary'
|
|
63
|
+
* @defaultValue 'air-primary'
|
|
64
64
|
*/
|
|
65
65
|
color?: Calendar['variants']['color'];
|
|
66
66
|
/**
|
|
@@ -71,9 +71,15 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
71
71
|
range?: R & boolean;
|
|
72
72
|
/** Whether multiple dates can be selected */
|
|
73
73
|
multiple?: M & boolean;
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Show month controls
|
|
76
|
+
* @defaultValue 'true'
|
|
77
|
+
*/
|
|
75
78
|
monthControls?: boolean;
|
|
76
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Show year controls
|
|
81
|
+
* @defaultValue 'false'
|
|
82
|
+
*/
|
|
77
83
|
yearControls?: boolean;
|
|
78
84
|
defaultValue?: CalendarDefaultValue<R, M>;
|
|
79
85
|
modelValue?: CalendarModelValue<R, M>;
|
|
@@ -107,5 +113,5 @@ declare const _default: <R extends boolean, M extends boolean>(__VLS_props: NonN
|
|
|
107
113
|
};
|
|
108
114
|
export default _default;
|
|
109
115
|
type __VLS_PrettifyLocal<T> = {
|
|
110
|
-
[K in keyof T]: T[K];
|
|
116
|
+
[K in keyof T as K]: T[K];
|
|
111
117
|
} & {};
|
|
@@ -12,7 +12,7 @@ export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'req
|
|
|
12
12
|
label?: string;
|
|
13
13
|
description?: string;
|
|
14
14
|
/**
|
|
15
|
-
* @defaultValue 'primary'
|
|
15
|
+
* @defaultValue 'air-primary'
|
|
16
16
|
*/
|
|
17
17
|
color?: Checkbox['variants']['color'];
|
|
18
18
|
/**
|
|
@@ -44,7 +44,7 @@ export interface CheckboxSlots {
|
|
|
44
44
|
}
|
|
45
45
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CheckboxProps & {
|
|
46
46
|
modelValue?: boolean | "indeterminate";
|
|
47
|
-
},
|
|
47
|
+
}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
48
|
change: (payload: Event) => any;
|
|
49
49
|
"update:modelValue": (value: boolean | "indeterminate") => any;
|
|
50
50
|
}, string, import("vue").PublicProps, Readonly<CheckboxProps & {
|
|
@@ -6,42 +6,63 @@ import theme from "#build/b24ui/chip";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive, Slot } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import { useAvatarGroup } from "../composables/useAvatarGroup";
|
|
10
9
|
import { tv } from "../utils/tv";
|
|
11
10
|
defineOptions({ inheritAttrs: false });
|
|
12
11
|
const props = defineProps({
|
|
13
12
|
as: { type: null, required: false },
|
|
14
13
|
text: { type: [String, Number], required: false },
|
|
14
|
+
trailingIcon: { type: [Function, Object], required: false },
|
|
15
15
|
color: { type: null, required: false },
|
|
16
|
+
inverted: { type: Boolean, required: false, default: false },
|
|
16
17
|
size: { type: null, required: false },
|
|
17
18
|
position: { type: null, required: false },
|
|
18
19
|
inset: { type: Boolean, required: false, default: false },
|
|
19
20
|
standalone: { type: Boolean, required: false, default: false },
|
|
21
|
+
hideZero: { type: Boolean, required: false, default: false },
|
|
20
22
|
class: { type: null, required: false },
|
|
21
23
|
b24ui: { type: null, required: false }
|
|
22
24
|
});
|
|
23
25
|
defineSlots();
|
|
24
26
|
const show = defineModel("show", { type: Boolean, ...{ default: true } });
|
|
25
|
-
const { size } = useAvatarGroup(props);
|
|
26
27
|
const appConfig = useAppConfig();
|
|
27
28
|
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.chip || {} })({
|
|
28
29
|
color: props.color,
|
|
29
|
-
|
|
30
|
+
inverted: Boolean(props.inverted),
|
|
31
|
+
size: props.size,
|
|
32
|
+
// size.value
|
|
30
33
|
position: props.position,
|
|
31
34
|
inset: Boolean(props.inset),
|
|
32
|
-
standalone: Boolean(props.standalone)
|
|
35
|
+
standalone: Boolean(props.standalone),
|
|
36
|
+
hideZero: Boolean(props.hideZero),
|
|
37
|
+
oneDigit: !props.trailingIcon && props.text?.toString().length === 1
|
|
33
38
|
}));
|
|
39
|
+
const value = computed(() => {
|
|
40
|
+
return props.text;
|
|
41
|
+
});
|
|
34
42
|
</script>
|
|
35
43
|
|
|
36
44
|
<template>
|
|
37
|
-
<Primitive
|
|
45
|
+
<Primitive
|
|
46
|
+
:as="as"
|
|
47
|
+
:class="b24ui.root({ class: [props.b24ui?.root, props.class] })"
|
|
48
|
+
>
|
|
38
49
|
<Slot v-bind="$attrs">
|
|
39
50
|
<slot />
|
|
40
51
|
</Slot>
|
|
41
52
|
|
|
42
|
-
<span
|
|
53
|
+
<span
|
|
54
|
+
v-if="show"
|
|
55
|
+
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
56
|
+
:data-value="value"
|
|
57
|
+
>
|
|
43
58
|
<slot name="content">
|
|
44
|
-
{{ text }}
|
|
59
|
+
<span>{{ text }}</span>
|
|
60
|
+
</slot>
|
|
61
|
+
<slot name="trailing">
|
|
62
|
+
<Component
|
|
63
|
+
:is="trailingIcon"
|
|
64
|
+
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
65
|
+
/>
|
|
45
66
|
</slot>
|
|
46
67
|
</span>
|
|
47
68
|
</Primitive>
|