@bitrix24/b24ui-nuxt 0.6.0 → 0.6.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/advice.ts +10 -2
- package/.nuxt/b24ui/alert.ts +10 -2
- package/.nuxt/b24ui/avatar-group.ts +10 -2
- package/.nuxt/b24ui/avatar.ts +10 -2
- package/.nuxt/b24ui/badge.ts +10 -2
- package/.nuxt/b24ui/button-group.ts +10 -2
- package/.nuxt/b24ui/button.ts +16 -6
- package/.nuxt/b24ui/calendar.ts +10 -2
- package/.nuxt/b24ui/checkbox.ts +10 -2
- package/.nuxt/b24ui/chip.ts +10 -2
- package/.nuxt/b24ui/collapsible.ts +10 -2
- package/.nuxt/b24ui/container.ts +10 -2
- package/.nuxt/b24ui/countdown.ts +10 -2
- package/.nuxt/b24ui/description-list.ts +10 -2
- package/.nuxt/b24ui/dropdown-menu.ts +10 -2
- package/.nuxt/b24ui/form-field.ts +10 -2
- package/.nuxt/b24ui/form.ts +10 -2
- package/.nuxt/b24ui/input-menu.ts +10 -2
- package/.nuxt/b24ui/input-number.ts +10 -2
- package/.nuxt/b24ui/input.ts +10 -2
- package/.nuxt/b24ui/kbd.ts +10 -2
- package/.nuxt/b24ui/link.ts +10 -2
- package/.nuxt/b24ui/modal.ts +10 -2
- package/.nuxt/b24ui/navbar-divider.ts +10 -2
- package/.nuxt/b24ui/navbar-section.ts +10 -2
- package/.nuxt/b24ui/navbar-spacer.ts +10 -2
- package/.nuxt/b24ui/navbar.ts +10 -2
- package/.nuxt/b24ui/navigation-menu.ts +10 -2
- package/.nuxt/b24ui/popover.ts +10 -2
- package/.nuxt/b24ui/progress.ts +10 -2
- package/.nuxt/b24ui/radio-group.ts +10 -2
- package/.nuxt/b24ui/range.ts +10 -2
- package/.nuxt/b24ui/select-menu.ts +10 -2
- package/.nuxt/b24ui/select.ts +10 -2
- package/.nuxt/b24ui/separator.ts +10 -2
- package/.nuxt/b24ui/sidebar-body.ts +10 -2
- package/.nuxt/b24ui/sidebar-footer.ts +10 -2
- package/.nuxt/b24ui/sidebar-header.ts +10 -2
- package/.nuxt/b24ui/sidebar-heading.ts +10 -2
- package/.nuxt/b24ui/sidebar-layout.ts +10 -2
- package/.nuxt/b24ui/sidebar-section.ts +10 -2
- package/.nuxt/b24ui/sidebar-spacer.ts +10 -2
- package/.nuxt/b24ui/sidebar.ts +10 -2
- package/.nuxt/b24ui/skeleton.ts +10 -2
- package/.nuxt/b24ui/slideover.ts +10 -2
- package/.nuxt/b24ui/stacked-layout.ts +10 -2
- package/.nuxt/b24ui/switch.ts +10 -2
- package/.nuxt/b24ui/tabs.ts +10 -2
- package/.nuxt/b24ui/textarea.ts +10 -2
- package/.nuxt/b24ui/toast.ts +10 -2
- package/.nuxt/b24ui/toaster.ts +10 -2
- package/.nuxt/b24ui/tooltip.ts +10 -2
- package/cli/templates.mjs +19 -15
- package/dist/meta.d.mts +1388 -3373
- package/dist/meta.mjs +1388 -3373
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Advice.vue +5 -6
- package/dist/runtime/components/Advice.vue.d.ts +7 -121
- package/dist/runtime/components/Alert.vue +5 -6
- package/dist/runtime/components/Alert.vue.d.ts +12 -379
- package/dist/runtime/components/Avatar.vue +5 -6
- package/dist/runtime/components/Avatar.vue.d.ts +6 -225
- package/dist/runtime/components/AvatarGroup.vue +5 -6
- package/dist/runtime/components/AvatarGroup.vue.d.ts +6 -170
- package/dist/runtime/components/Badge.vue +5 -6
- package/dist/runtime/components/Badge.vue.d.ts +8 -447
- package/dist/runtime/components/Button.vue +16 -14
- package/dist/runtime/components/Button.vue.d.ts +10 -535
- package/dist/runtime/components/ButtonGroup.vue +11 -6
- package/dist/runtime/components/ButtonGroup.vue.d.ts +8 -61
- package/dist/runtime/components/Calendar.vue +4 -5
- package/dist/runtime/components/Calendar.vue.d.ts +7 -337
- package/dist/runtime/components/Checkbox.vue +5 -6
- package/dist/runtime/components/Checkbox.vue.d.ts +7 -306
- package/dist/runtime/components/Chip.vue +5 -6
- package/dist/runtime/components/Chip.vue.d.ts +8 -202
- package/dist/runtime/components/Collapsible.vue +6 -6
- package/dist/runtime/components/Collapsible.vue.d.ts +5 -73
- package/dist/runtime/components/Container.vue +6 -5
- package/dist/runtime/components/Countdown.vue +6 -7
- package/dist/runtime/components/Countdown.vue.d.ts +7 -241
- package/dist/runtime/components/DescriptionList.vue +5 -6
- package/dist/runtime/components/DescriptionList.vue.d.ts +8 -278
- package/dist/runtime/components/DropdownMenu.vue +4 -5
- package/dist/runtime/components/DropdownMenu.vue.d.ts +9 -409
- package/dist/runtime/components/DropdownMenuContent.vue +1 -3
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +9 -186
- package/dist/runtime/components/Form.vue +6 -5
- package/dist/runtime/components/FormField.vue +5 -6
- package/dist/runtime/components/FormField.vue.d.ts +6 -215
- package/dist/runtime/components/Input.vue +4 -5
- package/dist/runtime/components/Input.vue.d.ts +8 -628
- package/dist/runtime/components/InputMenu.vue +4 -5
- package/dist/runtime/components/InputMenu.vue.d.ts +19 -1185
- package/dist/runtime/components/InputNumber.vue +4 -5
- package/dist/runtime/components/InputNumber.vue.d.ts +10 -430
- package/dist/runtime/components/Kbd.vue +6 -5
- package/dist/runtime/components/Kbd.vue.d.ts +6 -60
- package/dist/runtime/components/Link.vue +12 -11
- package/dist/runtime/components/Modal.vue +5 -6
- package/dist/runtime/components/Modal.vue.d.ts +13 -216
- package/dist/runtime/components/Navbar.vue +6 -6
- package/dist/runtime/components/Navbar.vue.d.ts +5 -60
- package/dist/runtime/components/NavbarDivider.vue +6 -6
- package/dist/runtime/components/NavbarDivider.vue.d.ts +5 -60
- package/dist/runtime/components/NavbarSection.vue +6 -6
- package/dist/runtime/components/NavbarSection.vue.d.ts +5 -60
- package/dist/runtime/components/NavbarSpacer.vue +6 -6
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +5 -60
- package/dist/runtime/components/NavigationMenu.vue +4 -5
- package/dist/runtime/components/NavigationMenu.vue.d.ts +11 -676
- package/dist/runtime/components/Popover.vue +5 -6
- package/dist/runtime/components/Popover.vue.d.ts +7 -75
- package/dist/runtime/components/Progress.vue +5 -6
- package/dist/runtime/components/Progress.vue.d.ts +11 -500
- package/dist/runtime/components/RadioGroup.vue +5 -6
- package/dist/runtime/components/RadioGroup.vue.d.ts +9 -644
- package/dist/runtime/components/Range.vue +5 -6
- package/dist/runtime/components/Range.vue.d.ts +7 -351
- package/dist/runtime/components/Select.vue +4 -5
- package/dist/runtime/components/Select.vue.d.ts +15 -1046
- package/dist/runtime/components/SelectMenu.vue +4 -5
- package/dist/runtime/components/SelectMenu.vue.d.ts +17 -1098
- package/dist/runtime/components/Separator.vue +5 -6
- package/dist/runtime/components/Separator.vue.d.ts +9 -332
- package/dist/runtime/components/Sidebar.vue +6 -6
- package/dist/runtime/components/Sidebar.vue.d.ts +5 -60
- package/dist/runtime/components/SidebarBody.vue +5 -6
- package/dist/runtime/components/SidebarBody.vue.d.ts +5 -42
- package/dist/runtime/components/SidebarFooter.vue +6 -6
- package/dist/runtime/components/SidebarFooter.vue.d.ts +5 -60
- package/dist/runtime/components/SidebarHeader.vue +6 -6
- package/dist/runtime/components/SidebarHeader.vue.d.ts +5 -60
- package/dist/runtime/components/SidebarHeading.vue +6 -6
- package/dist/runtime/components/SidebarHeading.vue.d.ts +5 -60
- package/dist/runtime/components/SidebarLayout.vue +6 -7
- package/dist/runtime/components/SidebarLayout.vue.d.ts +5 -162
- package/dist/runtime/components/SidebarSection.vue +6 -6
- package/dist/runtime/components/SidebarSection.vue.d.ts +5 -60
- package/dist/runtime/components/SidebarSpacer.vue +6 -6
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +5 -60
- package/dist/runtime/components/Skeleton.vue +6 -5
- package/dist/runtime/components/Slideover.vue +5 -6
- package/dist/runtime/components/Slideover.vue.d.ts +15 -248
- package/dist/runtime/components/StackedLayout.vue +6 -7
- package/dist/runtime/components/StackedLayout.vue.d.ts +5 -132
- package/dist/runtime/components/Switch.vue +4 -5
- package/dist/runtime/components/Switch.vue.d.ts +7 -517
- package/dist/runtime/components/Tabs.vue +8 -5
- package/dist/runtime/components/Tabs.vue.d.ts +18 -367
- package/dist/runtime/components/Textarea.vue +4 -5
- package/dist/runtime/components/Textarea.vue.d.ts +7 -467
- package/dist/runtime/components/Toast.vue +5 -6
- package/dist/runtime/components/Toast.vue.d.ts +11 -354
- package/dist/runtime/components/Toaster.vue +6 -7
- package/dist/runtime/components/Toaster.vue.d.ts +7 -156
- package/dist/runtime/components/Tooltip.vue +5 -6
- package/dist/runtime/components/Tooltip.vue.d.ts +5 -126
- package/dist/runtime/components/content/TableWrapper.vue +5 -6
- package/dist/runtime/components/content/TableWrapper.vue.d.ts +6 -160
- package/dist/runtime/prose/A.vue +10 -9
- package/dist/runtime/prose/A.vue.d.ts +8 -65
- package/dist/runtime/prose/Blockquote.vue +8 -9
- package/dist/runtime/prose/Blockquote.vue.d.ts +8 -65
- package/dist/runtime/prose/Code.vue +6 -6
- package/dist/runtime/prose/Code.vue.d.ts +9 -75
- package/dist/runtime/prose/Em.vue +10 -9
- package/dist/runtime/prose/Em.vue.d.ts +8 -65
- package/dist/runtime/prose/H1.vue +8 -9
- package/dist/runtime/prose/H1.vue.d.ts +8 -78
- package/dist/runtime/prose/H2.vue +8 -9
- package/dist/runtime/prose/H2.vue.d.ts +8 -104
- package/dist/runtime/prose/H3.vue +8 -9
- package/dist/runtime/prose/H3.vue.d.ts +8 -104
- package/dist/runtime/prose/H4.vue +8 -9
- package/dist/runtime/prose/H4.vue.d.ts +8 -104
- package/dist/runtime/prose/H5.vue +8 -9
- package/dist/runtime/prose/H5.vue.d.ts +8 -104
- package/dist/runtime/prose/H6.vue +8 -9
- package/dist/runtime/prose/H6.vue.d.ts +8 -104
- package/dist/runtime/prose/Hr.vue +7 -9
- package/dist/runtime/prose/Hr.vue.d.ts +7 -62
- package/dist/runtime/prose/Img.vue +7 -9
- package/dist/runtime/prose/Img.vue.d.ts +7 -65
- package/dist/runtime/prose/Li.vue +8 -9
- package/dist/runtime/prose/Li.vue.d.ts +8 -65
- package/dist/runtime/prose/Ol.vue +8 -9
- package/dist/runtime/prose/Ol.vue.d.ts +8 -65
- package/dist/runtime/prose/P.vue +8 -9
- package/dist/runtime/prose/P.vue.d.ts +8 -65
- package/dist/runtime/prose/Pre.vue +7 -6
- package/dist/runtime/prose/Pre.vue.d.ts +10 -80
- package/dist/runtime/prose/Strong.vue +8 -9
- package/dist/runtime/prose/Strong.vue.d.ts +8 -65
- package/dist/runtime/prose/Table.vue +8 -9
- package/dist/runtime/prose/Table.vue.d.ts +10 -80
- package/dist/runtime/prose/Tbody.vue +8 -9
- package/dist/runtime/prose/Tbody.vue.d.ts +8 -65
- package/dist/runtime/prose/Td.vue +8 -9
- package/dist/runtime/prose/Td.vue.d.ts +8 -65
- package/dist/runtime/prose/Th.vue +8 -9
- package/dist/runtime/prose/Th.vue.d.ts +8 -65
- package/dist/runtime/prose/Thead.vue +8 -9
- package/dist/runtime/prose/Thead.vue.d.ts +8 -65
- package/dist/runtime/prose/Tr.vue +8 -9
- package/dist/runtime/prose/Tr.vue.d.ts +8 -65
- package/dist/runtime/prose/Ul.vue +8 -9
- package/dist/runtime/prose/Ul.vue.d.ts +8 -65
- package/dist/runtime/types/form.d.ts +1 -0
- package/dist/runtime/types/utils.d.ts +42 -3
- package/dist/runtime/utils/tv.js +2 -2
- package/dist/runtime/vue/components/Link.vue +12 -11
- package/dist/shared/{b24ui-nuxt.BA6Y2FnC.mjs → b24ui-nuxt.wBs9vEU5.mjs} +27 -2
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +6 -6
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import _appConfig from "#build/app.config";
|
|
3
2
|
import theme from "#build/b24ui/calendar";
|
|
4
|
-
import { tv } from "../utils/tv";
|
|
5
|
-
const appConfigCalendar = _appConfig;
|
|
6
|
-
const calendar = tv({ extend: tv(theme), ...appConfigCalendar.b24ui?.calendar || {} });
|
|
7
3
|
</script>
|
|
8
4
|
|
|
9
5
|
<script setup>
|
|
@@ -11,7 +7,9 @@ import { computed } from "vue";
|
|
|
11
7
|
import { useForwardPropsEmits } from "reka-ui";
|
|
12
8
|
import { Calendar as SingleCalendar, RangeCalendar } from "reka-ui/namespaced";
|
|
13
9
|
import { reactiveOmit } from "@vueuse/core";
|
|
10
|
+
import { useAppConfig } from "#imports";
|
|
14
11
|
import { useLocale } from "../composables/useLocale";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
15
13
|
import icons from "../dictionary/icons";
|
|
16
14
|
import B24Button from "./Button.vue";
|
|
17
15
|
const props = defineProps({
|
|
@@ -56,12 +54,13 @@ const props = defineProps({
|
|
|
56
54
|
const emits = defineEmits(["update:modelValue", "update:placeholder", "update:startValue"]);
|
|
57
55
|
defineSlots();
|
|
58
56
|
const { code: locale, dir, t } = useLocale();
|
|
57
|
+
const appConfig = useAppConfig();
|
|
59
58
|
const rootProps = useForwardPropsEmits(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "size", "monthControls", "yearControls", "class", "b24ui"), emits);
|
|
60
59
|
const nextYearIcon = computed(() => props.nextYearIcon || (dir.value === "rtl" ? icons.chevronDoubleLeft : icons.chevronDoubleRight));
|
|
61
60
|
const nextMonthIcon = computed(() => props.nextMonthIcon || (dir.value === "rtl" ? icons.chevronLeft : icons.chevronRight));
|
|
62
61
|
const prevYearIcon = computed(() => props.prevYearIcon || (dir.value === "rtl" ? icons.chevronDoubleRight : icons.chevronDoubleLeft));
|
|
63
62
|
const prevMonthIcon = computed(() => props.prevMonthIcon || (dir.value === "rtl" ? icons.chevronRight : icons.chevronLeft));
|
|
64
|
-
const b24ui = computed(() => calendar({
|
|
63
|
+
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.calendar || {} })({
|
|
65
64
|
color: props.color,
|
|
66
65
|
size: props.size
|
|
67
66
|
}));
|
|
@@ -1,340 +1,10 @@
|
|
|
1
|
-
import type { VariantProps } from 'tailwind-variants';
|
|
2
1
|
import type { CalendarRootProps, CalendarRootEmits, RangeCalendarRootProps, RangeCalendarRootEmits, DateRange, CalendarCellTriggerProps } from 'reka-ui';
|
|
3
2
|
import type { DateValue } from '@internationalized/date';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/b24ui/calendar';
|
|
4
5
|
import type { IconComponent, ButtonProps } from '../types';
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
color: {
|
|
8
|
-
default: {
|
|
9
|
-
cellTrigger: string;
|
|
10
|
-
};
|
|
11
|
-
danger: {
|
|
12
|
-
cellTrigger: string;
|
|
13
|
-
};
|
|
14
|
-
success: {
|
|
15
|
-
cellTrigger: string;
|
|
16
|
-
};
|
|
17
|
-
warning: {
|
|
18
|
-
cellTrigger: string;
|
|
19
|
-
};
|
|
20
|
-
primary: {
|
|
21
|
-
cellTrigger: string;
|
|
22
|
-
};
|
|
23
|
-
secondary: {
|
|
24
|
-
cellTrigger: string;
|
|
25
|
-
};
|
|
26
|
-
collab: {
|
|
27
|
-
cellTrigger: string;
|
|
28
|
-
};
|
|
29
|
-
ai: {
|
|
30
|
-
cellTrigger: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
size: {
|
|
34
|
-
xs: {
|
|
35
|
-
heading: string;
|
|
36
|
-
cell: string;
|
|
37
|
-
headCell: string;
|
|
38
|
-
cellTrigger: string;
|
|
39
|
-
body: string;
|
|
40
|
-
};
|
|
41
|
-
sm: {
|
|
42
|
-
heading: string;
|
|
43
|
-
headCell: string;
|
|
44
|
-
cell: string;
|
|
45
|
-
cellTrigger: string;
|
|
46
|
-
};
|
|
47
|
-
md: {
|
|
48
|
-
heading: string;
|
|
49
|
-
headCell: string;
|
|
50
|
-
cell: string;
|
|
51
|
-
cellTrigger: string;
|
|
52
|
-
};
|
|
53
|
-
lg: {
|
|
54
|
-
heading: string;
|
|
55
|
-
headCell: string;
|
|
56
|
-
cell: string;
|
|
57
|
-
cellTrigger: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
}, {
|
|
61
|
-
root: string;
|
|
62
|
-
header: string;
|
|
63
|
-
body: string;
|
|
64
|
-
heading: string;
|
|
65
|
-
grid: string;
|
|
66
|
-
gridRow: string;
|
|
67
|
-
gridWeekDaysRow: string;
|
|
68
|
-
gridBody: string;
|
|
69
|
-
headCell: string;
|
|
70
|
-
cell: string;
|
|
71
|
-
cellTrigger: string;
|
|
72
|
-
}, undefined, {
|
|
73
|
-
color: {
|
|
74
|
-
default: {
|
|
75
|
-
cellTrigger: string;
|
|
76
|
-
};
|
|
77
|
-
danger: {
|
|
78
|
-
cellTrigger: string;
|
|
79
|
-
};
|
|
80
|
-
success: {
|
|
81
|
-
cellTrigger: string;
|
|
82
|
-
};
|
|
83
|
-
warning: {
|
|
84
|
-
cellTrigger: string;
|
|
85
|
-
};
|
|
86
|
-
primary: {
|
|
87
|
-
cellTrigger: string;
|
|
88
|
-
};
|
|
89
|
-
secondary: {
|
|
90
|
-
cellTrigger: string;
|
|
91
|
-
};
|
|
92
|
-
collab: {
|
|
93
|
-
cellTrigger: string;
|
|
94
|
-
};
|
|
95
|
-
ai: {
|
|
96
|
-
cellTrigger: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
size: {
|
|
100
|
-
xs: {
|
|
101
|
-
heading: string;
|
|
102
|
-
cell: string;
|
|
103
|
-
headCell: string;
|
|
104
|
-
cellTrigger: string;
|
|
105
|
-
body: string;
|
|
106
|
-
};
|
|
107
|
-
sm: {
|
|
108
|
-
heading: string;
|
|
109
|
-
headCell: string;
|
|
110
|
-
cell: string;
|
|
111
|
-
cellTrigger: string;
|
|
112
|
-
};
|
|
113
|
-
md: {
|
|
114
|
-
heading: string;
|
|
115
|
-
headCell: string;
|
|
116
|
-
cell: string;
|
|
117
|
-
cellTrigger: string;
|
|
118
|
-
};
|
|
119
|
-
lg: {
|
|
120
|
-
heading: string;
|
|
121
|
-
headCell: string;
|
|
122
|
-
cell: string;
|
|
123
|
-
cellTrigger: string;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
}, {
|
|
127
|
-
root: string;
|
|
128
|
-
header: string;
|
|
129
|
-
body: string;
|
|
130
|
-
heading: string;
|
|
131
|
-
grid: string;
|
|
132
|
-
gridRow: string;
|
|
133
|
-
gridWeekDaysRow: string;
|
|
134
|
-
gridBody: string;
|
|
135
|
-
headCell: string;
|
|
136
|
-
cell: string;
|
|
137
|
-
cellTrigger: string;
|
|
138
|
-
}, import("tailwind-variants").TVReturnType<{
|
|
139
|
-
color: {
|
|
140
|
-
default: {
|
|
141
|
-
cellTrigger: string;
|
|
142
|
-
};
|
|
143
|
-
danger: {
|
|
144
|
-
cellTrigger: string;
|
|
145
|
-
};
|
|
146
|
-
success: {
|
|
147
|
-
cellTrigger: string;
|
|
148
|
-
};
|
|
149
|
-
warning: {
|
|
150
|
-
cellTrigger: string;
|
|
151
|
-
};
|
|
152
|
-
primary: {
|
|
153
|
-
cellTrigger: string;
|
|
154
|
-
};
|
|
155
|
-
secondary: {
|
|
156
|
-
cellTrigger: string;
|
|
157
|
-
};
|
|
158
|
-
collab: {
|
|
159
|
-
cellTrigger: string;
|
|
160
|
-
};
|
|
161
|
-
ai: {
|
|
162
|
-
cellTrigger: string;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
size: {
|
|
166
|
-
xs: {
|
|
167
|
-
heading: string;
|
|
168
|
-
cell: string;
|
|
169
|
-
headCell: string;
|
|
170
|
-
cellTrigger: string;
|
|
171
|
-
body: string;
|
|
172
|
-
};
|
|
173
|
-
sm: {
|
|
174
|
-
heading: string;
|
|
175
|
-
headCell: string;
|
|
176
|
-
cell: string;
|
|
177
|
-
cellTrigger: string;
|
|
178
|
-
};
|
|
179
|
-
md: {
|
|
180
|
-
heading: string;
|
|
181
|
-
headCell: string;
|
|
182
|
-
cell: string;
|
|
183
|
-
cellTrigger: string;
|
|
184
|
-
};
|
|
185
|
-
lg: {
|
|
186
|
-
heading: string;
|
|
187
|
-
headCell: string;
|
|
188
|
-
cell: string;
|
|
189
|
-
cellTrigger: string;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
}, {
|
|
193
|
-
root: string;
|
|
194
|
-
header: string;
|
|
195
|
-
body: string;
|
|
196
|
-
heading: string;
|
|
197
|
-
grid: string;
|
|
198
|
-
gridRow: string;
|
|
199
|
-
gridWeekDaysRow: string;
|
|
200
|
-
gridBody: string;
|
|
201
|
-
headCell: string;
|
|
202
|
-
cell: string;
|
|
203
|
-
cellTrigger: string;
|
|
204
|
-
}, undefined, {
|
|
205
|
-
color: {
|
|
206
|
-
default: {
|
|
207
|
-
cellTrigger: string;
|
|
208
|
-
};
|
|
209
|
-
danger: {
|
|
210
|
-
cellTrigger: string;
|
|
211
|
-
};
|
|
212
|
-
success: {
|
|
213
|
-
cellTrigger: string;
|
|
214
|
-
};
|
|
215
|
-
warning: {
|
|
216
|
-
cellTrigger: string;
|
|
217
|
-
};
|
|
218
|
-
primary: {
|
|
219
|
-
cellTrigger: string;
|
|
220
|
-
};
|
|
221
|
-
secondary: {
|
|
222
|
-
cellTrigger: string;
|
|
223
|
-
};
|
|
224
|
-
collab: {
|
|
225
|
-
cellTrigger: string;
|
|
226
|
-
};
|
|
227
|
-
ai: {
|
|
228
|
-
cellTrigger: string;
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
size: {
|
|
232
|
-
xs: {
|
|
233
|
-
heading: string;
|
|
234
|
-
cell: string;
|
|
235
|
-
headCell: string;
|
|
236
|
-
cellTrigger: string;
|
|
237
|
-
body: string;
|
|
238
|
-
};
|
|
239
|
-
sm: {
|
|
240
|
-
heading: string;
|
|
241
|
-
headCell: string;
|
|
242
|
-
cell: string;
|
|
243
|
-
cellTrigger: string;
|
|
244
|
-
};
|
|
245
|
-
md: {
|
|
246
|
-
heading: string;
|
|
247
|
-
headCell: string;
|
|
248
|
-
cell: string;
|
|
249
|
-
cellTrigger: string;
|
|
250
|
-
};
|
|
251
|
-
lg: {
|
|
252
|
-
heading: string;
|
|
253
|
-
headCell: string;
|
|
254
|
-
cell: string;
|
|
255
|
-
cellTrigger: string;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
}, {
|
|
259
|
-
root: string;
|
|
260
|
-
header: string;
|
|
261
|
-
body: string;
|
|
262
|
-
heading: string;
|
|
263
|
-
grid: string;
|
|
264
|
-
gridRow: string;
|
|
265
|
-
gridWeekDaysRow: string;
|
|
266
|
-
gridBody: string;
|
|
267
|
-
headCell: string;
|
|
268
|
-
cell: string;
|
|
269
|
-
cellTrigger: string;
|
|
270
|
-
}, import("tailwind-variants").TVReturnType<{
|
|
271
|
-
color: {
|
|
272
|
-
default: {
|
|
273
|
-
cellTrigger: string;
|
|
274
|
-
};
|
|
275
|
-
danger: {
|
|
276
|
-
cellTrigger: string;
|
|
277
|
-
};
|
|
278
|
-
success: {
|
|
279
|
-
cellTrigger: string;
|
|
280
|
-
};
|
|
281
|
-
warning: {
|
|
282
|
-
cellTrigger: string;
|
|
283
|
-
};
|
|
284
|
-
primary: {
|
|
285
|
-
cellTrigger: string;
|
|
286
|
-
};
|
|
287
|
-
secondary: {
|
|
288
|
-
cellTrigger: string;
|
|
289
|
-
};
|
|
290
|
-
collab: {
|
|
291
|
-
cellTrigger: string;
|
|
292
|
-
};
|
|
293
|
-
ai: {
|
|
294
|
-
cellTrigger: string;
|
|
295
|
-
};
|
|
296
|
-
};
|
|
297
|
-
size: {
|
|
298
|
-
xs: {
|
|
299
|
-
heading: string;
|
|
300
|
-
cell: string;
|
|
301
|
-
headCell: string;
|
|
302
|
-
cellTrigger: string;
|
|
303
|
-
body: string;
|
|
304
|
-
};
|
|
305
|
-
sm: {
|
|
306
|
-
heading: string;
|
|
307
|
-
headCell: string;
|
|
308
|
-
cell: string;
|
|
309
|
-
cellTrigger: string;
|
|
310
|
-
};
|
|
311
|
-
md: {
|
|
312
|
-
heading: string;
|
|
313
|
-
headCell: string;
|
|
314
|
-
cell: string;
|
|
315
|
-
cellTrigger: string;
|
|
316
|
-
};
|
|
317
|
-
lg: {
|
|
318
|
-
heading: string;
|
|
319
|
-
headCell: string;
|
|
320
|
-
cell: string;
|
|
321
|
-
cellTrigger: string;
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
}, {
|
|
325
|
-
root: string;
|
|
326
|
-
header: string;
|
|
327
|
-
body: string;
|
|
328
|
-
heading: string;
|
|
329
|
-
grid: string;
|
|
330
|
-
gridRow: string;
|
|
331
|
-
gridWeekDaysRow: string;
|
|
332
|
-
gridBody: string;
|
|
333
|
-
headCell: string;
|
|
334
|
-
cell: string;
|
|
335
|
-
cellTrigger: string;
|
|
336
|
-
}, undefined, unknown, unknown, undefined>>>;
|
|
337
|
-
type CalendarVariants = VariantProps<typeof calendar>;
|
|
6
|
+
import type { ComponentConfig } from '../types/utils';
|
|
7
|
+
type Calendar = ComponentConfig<typeof theme, AppConfig, 'calendar'>;
|
|
338
8
|
type CalendarDefaultValue<R extends boolean = false, M extends boolean = false> = R extends true ? DateRange : M extends true ? DateValue[] : DateValue;
|
|
339
9
|
type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true ? (DateRange | null) : M extends true ? (DateValue[] | undefined) : (DateValue | undefined);
|
|
340
10
|
type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
|
|
@@ -392,11 +62,11 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
392
62
|
/**
|
|
393
63
|
* @defaultValue 'primary'
|
|
394
64
|
*/
|
|
395
|
-
color?:
|
|
65
|
+
color?: Calendar['variants']['color'];
|
|
396
66
|
/**
|
|
397
67
|
* @defaultValue 'md'
|
|
398
68
|
*/
|
|
399
|
-
size?:
|
|
69
|
+
size?: Calendar['variants']['size'];
|
|
400
70
|
/** Whether a range of dates can be selected */
|
|
401
71
|
range?: R & boolean;
|
|
402
72
|
/** Whether multiple dates can be selected */
|
|
@@ -408,7 +78,7 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
408
78
|
defaultValue?: CalendarDefaultValue<R, M>;
|
|
409
79
|
modelValue?: CalendarModelValue<R, M>;
|
|
410
80
|
class?: any;
|
|
411
|
-
b24ui?:
|
|
81
|
+
b24ui?: Calendar['slots'];
|
|
412
82
|
}
|
|
413
83
|
export interface CalendarEmits<R extends boolean, M extends boolean> extends Omit<CalendarRootEmits & RangeCalendarRootEmits, 'update:modelValue'> {
|
|
414
84
|
'update:modelValue': [date: CalendarModelValue<R, M>];
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import _appConfig from "#build/app.config";
|
|
3
2
|
import theme from "#build/b24ui/checkbox";
|
|
4
|
-
import { tv } from "../utils/tv";
|
|
5
|
-
const appConfigCheckbox = _appConfig;
|
|
6
|
-
const checkbox = tv({ extend: tv(theme), ...appConfigCheckbox.b24ui?.checkbox || {} });
|
|
7
3
|
</script>
|
|
8
4
|
|
|
9
5
|
<script setup>
|
|
10
6
|
import { computed, useId } from "vue";
|
|
11
7
|
import { Primitive, CheckboxRoot, CheckboxIndicator, Label, useForwardProps } from "reka-ui";
|
|
12
8
|
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
13
10
|
import { useFormField } from "../composables/useFormField";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
14
12
|
import Minus20Icon from "@bitrix24/b24icons-vue/actions/Minus20Icon";
|
|
15
13
|
import CheckIcon from "@bitrix24/b24icons-vue/main/CheckIcon";
|
|
16
14
|
defineOptions({ inheritAttrs: false });
|
|
@@ -21,7 +19,7 @@ const props = defineProps({
|
|
|
21
19
|
color: { type: null, required: false },
|
|
22
20
|
size: { type: null, required: false },
|
|
23
21
|
class: { type: null, required: false },
|
|
24
|
-
b24ui: { type:
|
|
22
|
+
b24ui: { type: null, required: false },
|
|
25
23
|
disabled: { type: Boolean, required: false },
|
|
26
24
|
required: { type: Boolean, required: false },
|
|
27
25
|
name: { type: String, required: false },
|
|
@@ -32,10 +30,11 @@ const props = defineProps({
|
|
|
32
30
|
const slots = defineSlots();
|
|
33
31
|
const emits = defineEmits(["change"]);
|
|
34
32
|
const modelValue = defineModel({ type: [Boolean, String], ...{ default: void 0 } });
|
|
33
|
+
const appConfig = useAppConfig();
|
|
35
34
|
const rootProps = useForwardProps(reactivePick(props, "required", "value", "defaultValue"));
|
|
36
35
|
const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
|
|
37
36
|
const id = _id.value ?? useId();
|
|
38
|
-
const b24ui = computed(() => checkbox({
|
|
37
|
+
const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.checkbox || {} })({
|
|
39
38
|
size: size.value,
|
|
40
39
|
color: color.value,
|
|
41
40
|
required: props.required,
|