@bitrix24/b24ui-nuxt 0.5.9 → 0.5.10
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/navigation-menu.ts +0 -2
- package/.nuxt/b24ui/popover.ts +1 -1
- package/dist/meta.d.mts +4789 -4897
- package/dist/meta.mjs +4789 -4897
- package/dist/module.json +5 -5
- package/dist/module.mjs +11 -7
- package/dist/runtime/components/Advice.vue +47 -54
- package/dist/runtime/components/Advice.vue.d.ts +170 -0
- package/dist/runtime/components/Alert.vue +71 -96
- package/dist/runtime/components/Alert.vue.d.ts +464 -0
- package/dist/runtime/components/App.vue +37 -34
- package/dist/runtime/components/App.vue.d.ts +23 -0
- package/dist/runtime/components/Avatar.vue +69 -81
- package/dist/runtime/components/Avatar.vue.d.ts +281 -0
- package/dist/runtime/components/AvatarGroup.vue +53 -76
- package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
- package/dist/runtime/components/Badge.vue +83 -83
- package/dist/runtime/components/Badge.vue.d.ts +517 -0
- package/dist/runtime/components/Button.vue +219 -149
- package/dist/runtime/components/Button.vue.d.ts +640 -0
- package/dist/runtime/components/ButtonGroup.vue +35 -51
- package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
- package/dist/runtime/components/Calendar.vue +186 -152
- package/dist/runtime/components/Calendar.vue.d.ts +437 -0
- package/dist/runtime/components/Checkbox.vue +84 -73
- package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
- package/dist/runtime/components/Chip.vue +59 -74
- package/dist/runtime/components/Chip.vue.d.ts +271 -0
- package/dist/runtime/components/Collapsible.vue +44 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
- package/dist/runtime/components/Container.vue +18 -27
- package/dist/runtime/components/Container.vue.d.ts +27 -0
- package/dist/runtime/components/Countdown.vue +198 -378
- package/dist/runtime/components/Countdown.vue.d.ts +356 -0
- package/dist/runtime/components/DescriptionList.vue +102 -149
- package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
- package/dist/runtime/components/DropdownMenu.vue +83 -139
- package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
- package/dist/runtime/components/DropdownMenuContent.vue +137 -81
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
- package/dist/runtime/components/Form.vue +162 -216
- package/dist/runtime/components/Form.vue.d.ts +55 -0
- package/dist/runtime/components/FormField.vue +76 -80
- package/dist/runtime/components/FormField.vue.d.ts +282 -0
- package/dist/runtime/components/Input.vue +160 -179
- package/dist/runtime/components/Input.vue.d.ts +755 -0
- package/dist/runtime/components/InputMenu.vue +300 -381
- package/dist/runtime/components/InputMenu.vue.d.ts +1504 -0
- package/dist/runtime/components/InputNumber.vue +178 -175
- package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
- package/dist/runtime/components/Kbd.vue +33 -45
- package/dist/runtime/components/Kbd.vue.d.ts +109 -0
- package/dist/runtime/components/Link.vue +179 -173
- package/dist/runtime/components/Link.vue.d.ts +129 -0
- package/dist/runtime/components/LinkBase.vue +64 -42
- package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
- package/dist/runtime/components/Modal.vue +105 -127
- package/dist/runtime/components/Modal.vue.d.ts +327 -0
- package/dist/runtime/components/ModalDialogClose.vue +4 -8
- package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
- package/dist/runtime/components/Navbar.vue +24 -33
- package/dist/runtime/components/Navbar.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarDivider.vue +24 -33
- package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSection.vue +24 -33
- package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSpacer.vue +24 -33
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/NavigationMenu.vue +152 -216
- package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
- package/dist/runtime/components/OverlayProvider.vue +13 -17
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Popover.vue +81 -81
- package/dist/runtime/components/Popover.vue.d.ts +147 -0
- package/dist/runtime/components/Progress.vue +109 -136
- package/dist/runtime/components/Progress.vue.d.ts +592 -0
- package/dist/runtime/components/RadioGroup.vue +120 -134
- package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
- package/dist/runtime/components/Range.vue +94 -85
- package/dist/runtime/components/Range.vue.d.ts +417 -0
- package/dist/runtime/components/Select.vue +212 -260
- package/dist/runtime/components/Select.vue.d.ts +1200 -0
- package/dist/runtime/components/SelectMenu.vue +272 -366
- package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
- package/dist/runtime/components/Separator.vue +61 -71
- package/dist/runtime/components/Separator.vue.d.ts +400 -0
- package/dist/runtime/components/Sidebar.vue +24 -33
- package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarBody.vue +30 -38
- package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
- package/dist/runtime/components/SidebarFooter.vue +24 -33
- package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeader.vue +24 -33
- package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeading.vue +24 -33
- package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarLayout.vue +40 -70
- package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
- package/dist/runtime/components/SidebarSection.vue +24 -33
- package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarSpacer.vue +24 -33
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/Skeleton.vue +17 -22
- package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
- package/dist/runtime/components/Slideover.vue +108 -131
- package/dist/runtime/components/Slideover.vue.d.ts +360 -0
- package/dist/runtime/components/StackedLayout.vue +40 -73
- package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
- package/dist/runtime/components/Switch.vue +100 -95
- package/dist/runtime/components/Switch.vue.d.ts +587 -0
- package/dist/runtime/components/Tabs.vue +83 -105
- package/dist/runtime/components/Tabs.vue.d.ts +453 -0
- package/dist/runtime/components/Textarea.vue +177 -201
- package/dist/runtime/components/Textarea.vue.d.ts +601 -0
- package/dist/runtime/components/Toast.vue +94 -105
- package/dist/runtime/components/Toast.vue.d.ts +438 -0
- package/dist/runtime/components/Toaster.vue +94 -111
- package/dist/runtime/components/Toaster.vue.d.ts +219 -0
- package/dist/runtime/components/Tooltip.vue +78 -64
- package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
- package/dist/runtime/components/content/TableWrapper.vue +58 -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 +1 -1
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/prose/A.vue +18 -23
- package/dist/runtime/prose/A.vue.d.ts +84 -0
- package/dist/runtime/prose/Blockquote.vue +18 -23
- package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
- package/dist/runtime/prose/Code.vue +23 -31
- package/dist/runtime/prose/Code.vue.d.ts +97 -0
- package/dist/runtime/prose/Em.vue +18 -23
- package/dist/runtime/prose/Em.vue.d.ts +84 -0
- package/dist/runtime/prose/H1.vue +18 -23
- package/dist/runtime/prose/H1.vue.d.ts +97 -0
- package/dist/runtime/prose/H2.vue +18 -23
- package/dist/runtime/prose/H2.vue.d.ts +123 -0
- package/dist/runtime/prose/H3.vue +18 -23
- package/dist/runtime/prose/H3.vue.d.ts +123 -0
- package/dist/runtime/prose/H4.vue +18 -23
- package/dist/runtime/prose/H4.vue.d.ts +123 -0
- package/dist/runtime/prose/H5.vue +18 -23
- package/dist/runtime/prose/H5.vue.d.ts +123 -0
- package/dist/runtime/prose/H6.vue +18 -23
- package/dist/runtime/prose/H6.vue.d.ts +123 -0
- package/dist/runtime/prose/Hr.vue +18 -19
- package/dist/runtime/prose/Hr.vue.d.ts +74 -0
- package/dist/runtime/prose/Img.vue +18 -23
- package/dist/runtime/prose/Img.vue.d.ts +77 -0
- package/dist/runtime/prose/Li.vue +18 -23
- package/dist/runtime/prose/Li.vue.d.ts +84 -0
- package/dist/runtime/prose/Ol.vue +18 -23
- package/dist/runtime/prose/Ol.vue.d.ts +84 -0
- package/dist/runtime/prose/P.vue +18 -23
- package/dist/runtime/prose/P.vue.d.ts +84 -0
- package/dist/runtime/prose/Pre.vue +28 -33
- package/dist/runtime/prose/Pre.vue.d.ts +117 -0
- package/dist/runtime/prose/Strong.vue +18 -23
- package/dist/runtime/prose/Strong.vue.d.ts +84 -0
- package/dist/runtime/prose/Table.vue +44 -54
- package/dist/runtime/prose/Table.vue.d.ts +144 -0
- package/dist/runtime/prose/Tbody.vue +18 -23
- package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
- package/dist/runtime/prose/Td.vue +18 -23
- package/dist/runtime/prose/Td.vue.d.ts +84 -0
- package/dist/runtime/prose/Th.vue +18 -23
- package/dist/runtime/prose/Th.vue.d.ts +84 -0
- package/dist/runtime/prose/Thead.vue +18 -23
- package/dist/runtime/prose/Thead.vue.d.ts +84 -0
- package/dist/runtime/prose/Tr.vue +18 -23
- package/dist/runtime/prose/Tr.vue.d.ts +84 -0
- package/dist/runtime/prose/Ul.vue +18 -23
- package/dist/runtime/prose/Ul.vue.d.ts +84 -0
- package/dist/runtime/vue/components/Link.vue +201 -202
- package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
- package/dist/runtime/vue/stubs.d.ts +3 -3
- package/dist/shared/{b24ui-nuxt.C1lGF53R.mjs → b24ui-nuxt.CS9Lf0os.mjs} +4 -3
- package/dist/types.d.mts +3 -5
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +59 -32
- package/dist/meta.cjs +0 -72220
- package/dist/meta.d.cts +0 -72218
- package/dist/meta.d.ts +0 -72218
- package/dist/module.cjs +0 -59
- package/dist/module.d.cts +0 -15
- package/dist/module.d.ts +0 -15
- package/dist/shared/b24ui-nuxt.BVg3rkkG.cjs +0 -7720
- 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
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
3
|
+
declare const countdown: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
size: {
|
|
5
|
+
xs: {
|
|
6
|
+
base: string;
|
|
7
|
+
leadingIcon: string;
|
|
8
|
+
leadingAvatarSize: string;
|
|
9
|
+
};
|
|
10
|
+
sm: {
|
|
11
|
+
base: string;
|
|
12
|
+
leadingIcon: string;
|
|
13
|
+
leadingAvatarSize: string;
|
|
14
|
+
};
|
|
15
|
+
md: {
|
|
16
|
+
base: string;
|
|
17
|
+
leadingIcon: string;
|
|
18
|
+
leadingAvatarSize: string;
|
|
19
|
+
};
|
|
20
|
+
lg: {
|
|
21
|
+
base: string;
|
|
22
|
+
leadingIcon: string;
|
|
23
|
+
leadingAvatarSize: string;
|
|
24
|
+
};
|
|
25
|
+
xl: {
|
|
26
|
+
base: string;
|
|
27
|
+
leadingIcon: string;
|
|
28
|
+
leadingAvatarSize: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
leading: {
|
|
32
|
+
true: string;
|
|
33
|
+
};
|
|
34
|
+
useCircle: {
|
|
35
|
+
true: {
|
|
36
|
+
base: string;
|
|
37
|
+
circleBase: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
base: string;
|
|
42
|
+
label: string;
|
|
43
|
+
leadingIcon: string;
|
|
44
|
+
leadingAvatar: string;
|
|
45
|
+
leadingAvatarSize: string;
|
|
46
|
+
circleBase: string;
|
|
47
|
+
circleGroup: string;
|
|
48
|
+
circleElement: string;
|
|
49
|
+
circlePath: string;
|
|
50
|
+
}, undefined, {
|
|
51
|
+
size: {
|
|
52
|
+
xs: {
|
|
53
|
+
base: string;
|
|
54
|
+
leadingIcon: string;
|
|
55
|
+
leadingAvatarSize: string;
|
|
56
|
+
};
|
|
57
|
+
sm: {
|
|
58
|
+
base: string;
|
|
59
|
+
leadingIcon: string;
|
|
60
|
+
leadingAvatarSize: string;
|
|
61
|
+
};
|
|
62
|
+
md: {
|
|
63
|
+
base: string;
|
|
64
|
+
leadingIcon: string;
|
|
65
|
+
leadingAvatarSize: string;
|
|
66
|
+
};
|
|
67
|
+
lg: {
|
|
68
|
+
base: string;
|
|
69
|
+
leadingIcon: string;
|
|
70
|
+
leadingAvatarSize: string;
|
|
71
|
+
};
|
|
72
|
+
xl: {
|
|
73
|
+
base: string;
|
|
74
|
+
leadingIcon: string;
|
|
75
|
+
leadingAvatarSize: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
leading: {
|
|
79
|
+
true: string;
|
|
80
|
+
};
|
|
81
|
+
useCircle: {
|
|
82
|
+
true: {
|
|
83
|
+
base: string;
|
|
84
|
+
circleBase: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
}, {
|
|
88
|
+
base: string;
|
|
89
|
+
label: string;
|
|
90
|
+
leadingIcon: string;
|
|
91
|
+
leadingAvatar: string;
|
|
92
|
+
leadingAvatarSize: string;
|
|
93
|
+
circleBase: string;
|
|
94
|
+
circleGroup: string;
|
|
95
|
+
circleElement: string;
|
|
96
|
+
circlePath: string;
|
|
97
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
98
|
+
size: {
|
|
99
|
+
xs: {
|
|
100
|
+
base: string;
|
|
101
|
+
leadingIcon: string;
|
|
102
|
+
leadingAvatarSize: string;
|
|
103
|
+
};
|
|
104
|
+
sm: {
|
|
105
|
+
base: string;
|
|
106
|
+
leadingIcon: string;
|
|
107
|
+
leadingAvatarSize: string;
|
|
108
|
+
};
|
|
109
|
+
md: {
|
|
110
|
+
base: string;
|
|
111
|
+
leadingIcon: string;
|
|
112
|
+
leadingAvatarSize: string;
|
|
113
|
+
};
|
|
114
|
+
lg: {
|
|
115
|
+
base: string;
|
|
116
|
+
leadingIcon: string;
|
|
117
|
+
leadingAvatarSize: string;
|
|
118
|
+
};
|
|
119
|
+
xl: {
|
|
120
|
+
base: string;
|
|
121
|
+
leadingIcon: string;
|
|
122
|
+
leadingAvatarSize: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
leading: {
|
|
126
|
+
true: string;
|
|
127
|
+
};
|
|
128
|
+
useCircle: {
|
|
129
|
+
true: {
|
|
130
|
+
base: string;
|
|
131
|
+
circleBase: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}, {
|
|
135
|
+
base: string;
|
|
136
|
+
label: string;
|
|
137
|
+
leadingIcon: string;
|
|
138
|
+
leadingAvatar: string;
|
|
139
|
+
leadingAvatarSize: string;
|
|
140
|
+
circleBase: string;
|
|
141
|
+
circleGroup: string;
|
|
142
|
+
circleElement: string;
|
|
143
|
+
circlePath: string;
|
|
144
|
+
}, undefined, {
|
|
145
|
+
size: {
|
|
146
|
+
xs: {
|
|
147
|
+
base: string;
|
|
148
|
+
leadingIcon: string;
|
|
149
|
+
leadingAvatarSize: string;
|
|
150
|
+
};
|
|
151
|
+
sm: {
|
|
152
|
+
base: string;
|
|
153
|
+
leadingIcon: string;
|
|
154
|
+
leadingAvatarSize: string;
|
|
155
|
+
};
|
|
156
|
+
md: {
|
|
157
|
+
base: string;
|
|
158
|
+
leadingIcon: string;
|
|
159
|
+
leadingAvatarSize: string;
|
|
160
|
+
};
|
|
161
|
+
lg: {
|
|
162
|
+
base: string;
|
|
163
|
+
leadingIcon: string;
|
|
164
|
+
leadingAvatarSize: string;
|
|
165
|
+
};
|
|
166
|
+
xl: {
|
|
167
|
+
base: string;
|
|
168
|
+
leadingIcon: string;
|
|
169
|
+
leadingAvatarSize: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
leading: {
|
|
173
|
+
true: string;
|
|
174
|
+
};
|
|
175
|
+
useCircle: {
|
|
176
|
+
true: {
|
|
177
|
+
base: string;
|
|
178
|
+
circleBase: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
base: string;
|
|
183
|
+
label: string;
|
|
184
|
+
leadingIcon: string;
|
|
185
|
+
leadingAvatar: string;
|
|
186
|
+
leadingAvatarSize: string;
|
|
187
|
+
circleBase: string;
|
|
188
|
+
circleGroup: string;
|
|
189
|
+
circleElement: string;
|
|
190
|
+
circlePath: string;
|
|
191
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
192
|
+
size: {
|
|
193
|
+
xs: {
|
|
194
|
+
base: string;
|
|
195
|
+
leadingIcon: string;
|
|
196
|
+
leadingAvatarSize: string;
|
|
197
|
+
};
|
|
198
|
+
sm: {
|
|
199
|
+
base: string;
|
|
200
|
+
leadingIcon: string;
|
|
201
|
+
leadingAvatarSize: string;
|
|
202
|
+
};
|
|
203
|
+
md: {
|
|
204
|
+
base: string;
|
|
205
|
+
leadingIcon: string;
|
|
206
|
+
leadingAvatarSize: string;
|
|
207
|
+
};
|
|
208
|
+
lg: {
|
|
209
|
+
base: string;
|
|
210
|
+
leadingIcon: string;
|
|
211
|
+
leadingAvatarSize: string;
|
|
212
|
+
};
|
|
213
|
+
xl: {
|
|
214
|
+
base: string;
|
|
215
|
+
leadingIcon: string;
|
|
216
|
+
leadingAvatarSize: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
leading: {
|
|
220
|
+
true: string;
|
|
221
|
+
};
|
|
222
|
+
useCircle: {
|
|
223
|
+
true: {
|
|
224
|
+
base: string;
|
|
225
|
+
circleBase: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
}, {
|
|
229
|
+
base: string;
|
|
230
|
+
label: string;
|
|
231
|
+
leadingIcon: string;
|
|
232
|
+
leadingAvatar: string;
|
|
233
|
+
leadingAvatarSize: string;
|
|
234
|
+
circleBase: string;
|
|
235
|
+
circleGroup: string;
|
|
236
|
+
circleElement: string;
|
|
237
|
+
circlePath: string;
|
|
238
|
+
}, undefined, unknown, unknown, undefined>>>;
|
|
239
|
+
type CountdownVariants = VariantProps<typeof countdown>;
|
|
240
|
+
export interface CountdownData {
|
|
241
|
+
days: number;
|
|
242
|
+
hours: number;
|
|
243
|
+
minutes: number;
|
|
244
|
+
seconds: number;
|
|
245
|
+
milliseconds: number;
|
|
246
|
+
totalDays: number;
|
|
247
|
+
totalHours: number;
|
|
248
|
+
totalMinutes: number;
|
|
249
|
+
totalSeconds: number;
|
|
250
|
+
totalMilliseconds: number;
|
|
251
|
+
}
|
|
252
|
+
export interface CountdownProps extends Omit<UseComponentIconsProps, 'loading' | 'trailing' | 'trailingIcon'> {
|
|
253
|
+
/**
|
|
254
|
+
* The element or component this component should render as
|
|
255
|
+
* @defaultValue 'span'
|
|
256
|
+
*/
|
|
257
|
+
as?: any;
|
|
258
|
+
/**
|
|
259
|
+
* @defaultValue 'md'
|
|
260
|
+
*/
|
|
261
|
+
size?: CountdownVariants['size'];
|
|
262
|
+
/**
|
|
263
|
+
* Emits the countdown events
|
|
264
|
+
* @defaultValue true
|
|
265
|
+
*/
|
|
266
|
+
emitEvents?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Number of seconds to countdown
|
|
269
|
+
* @defaultValue 0
|
|
270
|
+
*/
|
|
271
|
+
seconds?: number | string;
|
|
272
|
+
/**
|
|
273
|
+
* Should seconds be divided into minutes?
|
|
274
|
+
* @defaultValue true
|
|
275
|
+
*/
|
|
276
|
+
showMinutes?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Shows a `Circle` around the countdown
|
|
279
|
+
* @defaultValue false
|
|
280
|
+
*/
|
|
281
|
+
useCircle?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* The interval time (in milliseconds) of the countdown progress
|
|
284
|
+
* @defaultValue 1000
|
|
285
|
+
*/
|
|
286
|
+
interval?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Starts the countdown automatically when initialized
|
|
289
|
+
* @defaultValue true
|
|
290
|
+
*/
|
|
291
|
+
needStartImmediately?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Generate the current time of a specific time zone
|
|
294
|
+
* @defaultValue Date.now()
|
|
295
|
+
*/
|
|
296
|
+
now?: () => number;
|
|
297
|
+
class?: any;
|
|
298
|
+
b24ui?: Partial<typeof countdown.slots>;
|
|
299
|
+
}
|
|
300
|
+
export interface CountdownEmits {
|
|
301
|
+
(e: 'start' | 'end' | 'abort'): void;
|
|
302
|
+
(e: 'progress', payload: CountdownData): void;
|
|
303
|
+
}
|
|
304
|
+
export interface CountdownSlots {
|
|
305
|
+
leading(props?: {}): any;
|
|
306
|
+
default(props: CountdownData & {
|
|
307
|
+
formatTime: string;
|
|
308
|
+
}): any;
|
|
309
|
+
}
|
|
310
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<CountdownProps>, {
|
|
311
|
+
as: string;
|
|
312
|
+
needStartImmediately: boolean;
|
|
313
|
+
emitEvents: boolean;
|
|
314
|
+
interval: number;
|
|
315
|
+
now: () => number;
|
|
316
|
+
seconds: number;
|
|
317
|
+
showMinutes: boolean;
|
|
318
|
+
useCircle: boolean;
|
|
319
|
+
}>>, {
|
|
320
|
+
start: () => void;
|
|
321
|
+
abort: () => void;
|
|
322
|
+
stop: () => void;
|
|
323
|
+
restart: () => void;
|
|
324
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
325
|
+
as: any;
|
|
326
|
+
useCircle: boolean;
|
|
327
|
+
emitEvents: boolean;
|
|
328
|
+
seconds: number | string;
|
|
329
|
+
showMinutes: boolean;
|
|
330
|
+
interval: number;
|
|
331
|
+
needStartImmediately: boolean;
|
|
332
|
+
now: () => number;
|
|
333
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<CountdownSlots> & CountdownSlots>;
|
|
334
|
+
export default _default;
|
|
335
|
+
type __VLS_WithDefaults<P, D> = {
|
|
336
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
337
|
+
default: D[K];
|
|
338
|
+
}> : P[K];
|
|
339
|
+
};
|
|
340
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
341
|
+
type __VLS_TypePropsToOption<T> = {
|
|
342
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
343
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
344
|
+
} : {
|
|
345
|
+
type: import('vue').PropType<T[K]>;
|
|
346
|
+
required: true;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
350
|
+
new (): {
|
|
351
|
+
$slots: S;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
type __VLS_PrettifyLocal<T> = {
|
|
355
|
+
[K in keyof T]: T[K];
|
|
356
|
+
} & {};
|
|
@@ -1,125 +1,78 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import type { AvatarProps, ButtonProps, IconComponent } from '../types'
|
|
8
|
-
import type { DynamicSlots } from '../types/utils'
|
|
9
|
-
|
|
10
|
-
const appConfigDescriptionList = _appConfig as AppConfig & { b24ui: { descriptionList: Partial<typeof theme> } }
|
|
11
|
-
|
|
12
|
-
const descriptionList = tv({ extend: tv(theme), ...(appConfigDescriptionList.b24ui?.descriptionList || {}) })
|
|
13
|
-
|
|
14
|
-
type DescriptionListVariants = VariantProps<typeof descriptionList>
|
|
15
|
-
|
|
16
|
-
export interface DescriptionListItem {
|
|
17
|
-
label?: string
|
|
18
|
-
/**
|
|
19
|
-
* Display an icon on the left side.
|
|
20
|
-
* @IconComponent
|
|
21
|
-
*/
|
|
22
|
-
icon?: IconComponent
|
|
23
|
-
avatar?: AvatarProps
|
|
24
|
-
slot?: string
|
|
25
|
-
description?: string
|
|
26
|
-
/**
|
|
27
|
-
* The orientation between the content and the actions.
|
|
28
|
-
* @defaultValue 'vertical'
|
|
29
|
-
*/
|
|
30
|
-
orientation?: DescriptionListVariants['orientation']
|
|
31
|
-
/**
|
|
32
|
-
* Display a list of actions:
|
|
33
|
-
* - under the description when orientation is `vertical`
|
|
34
|
-
* - next to the description when orientation is `horizontal`
|
|
35
|
-
* `{ size: 'xs' }`{lang="ts"}
|
|
36
|
-
*/
|
|
37
|
-
actions?: ButtonProps[]
|
|
38
|
-
class?: any
|
|
39
|
-
b24ui?: Partial<typeof descriptionList.slots>
|
|
40
|
-
[key: string]: any
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface DescriptionListProps<T extends DescriptionListItem = DescriptionListItem> {
|
|
44
|
-
legend?: string
|
|
45
|
-
text?: string
|
|
46
|
-
/**
|
|
47
|
-
* The key used to get the label from the item.
|
|
48
|
-
* @defaultValue 'label'
|
|
49
|
-
*/
|
|
50
|
-
labelKey?: string
|
|
51
|
-
/**
|
|
52
|
-
* The key used to get the description from the item.
|
|
53
|
-
* @defaultValue 'description'
|
|
54
|
-
*/
|
|
55
|
-
descriptionKey?: string
|
|
56
|
-
items?: T[]
|
|
57
|
-
/**
|
|
58
|
-
* @defaultValue 'md'
|
|
59
|
-
*/
|
|
60
|
-
size?: DescriptionListVariants['size']
|
|
61
|
-
class?: any
|
|
62
|
-
b24ui?: Partial<typeof descriptionList.slots>
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type SlotProps<T extends DescriptionListItem> = (props: { item: T, index: number }) => any
|
|
66
|
-
|
|
67
|
-
export type DescriptionListSlots<T extends DescriptionListItem = DescriptionListItem> = {
|
|
68
|
-
legend(props?: {}): any
|
|
69
|
-
text(props?: {}): any
|
|
70
|
-
leading: SlotProps<T>
|
|
71
|
-
label: SlotProps<T>
|
|
72
|
-
description: SlotProps<T>
|
|
73
|
-
actions: SlotProps<T>
|
|
74
|
-
content: SlotProps<T>
|
|
75
|
-
footer(props?: { b24ui: any }): any
|
|
76
|
-
} & DynamicSlots<T, undefined, { index: number }>
|
|
1
|
+
<script>
|
|
2
|
+
import _appConfig from "#build/app.config";
|
|
3
|
+
import theme from "#build/b24ui/description-list";
|
|
4
|
+
import { tv } from "../utils/tv";
|
|
5
|
+
const appConfigDescriptionList = _appConfig;
|
|
6
|
+
const descriptionList = tv({ extend: tv(theme), ...appConfigDescriptionList.b24ui?.descriptionList || {} });
|
|
77
7
|
</script>
|
|
78
8
|
|
|
79
|
-
<script setup
|
|
80
|
-
import { computed } from
|
|
81
|
-
import { get } from
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
9
|
+
<script setup>
|
|
10
|
+
import { computed } from "vue";
|
|
11
|
+
import { get } from "../utils";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
legend: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: false
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: false
|
|
20
|
+
},
|
|
21
|
+
labelKey: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: false,
|
|
24
|
+
default: "label"
|
|
25
|
+
},
|
|
26
|
+
descriptionKey: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: false,
|
|
29
|
+
default: "description"
|
|
30
|
+
},
|
|
31
|
+
items: {
|
|
32
|
+
type: Array,
|
|
33
|
+
required: false
|
|
34
|
+
},
|
|
35
|
+
size: {
|
|
36
|
+
type: null,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
class: {
|
|
40
|
+
type: null,
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
b24ui: {
|
|
44
|
+
type: Object,
|
|
45
|
+
required: false
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const slots = defineSlots();
|
|
91
49
|
const b24ui = computed(() => descriptionList({
|
|
92
50
|
size: props.size
|
|
93
|
-
}))
|
|
94
|
-
|
|
95
|
-
function normalizeItem(item: any) {
|
|
51
|
+
}));
|
|
52
|
+
function normalizeItem(item) {
|
|
96
53
|
if (item === null) {
|
|
97
54
|
return {
|
|
98
|
-
label:
|
|
99
|
-
description:
|
|
100
|
-
orientation:
|
|
101
|
-
}
|
|
55
|
+
label: void 0,
|
|
56
|
+
description: void 0,
|
|
57
|
+
orientation: void 0
|
|
58
|
+
};
|
|
102
59
|
}
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const orientation = item?.orientation || 'vertical'
|
|
107
|
-
|
|
60
|
+
const label = get(item, props.labelKey);
|
|
61
|
+
const description = get(item, props.descriptionKey);
|
|
62
|
+
const orientation = item?.orientation || "vertical";
|
|
108
63
|
return {
|
|
109
64
|
...item,
|
|
110
65
|
label,
|
|
111
66
|
description,
|
|
112
67
|
orientation
|
|
113
|
-
}
|
|
68
|
+
};
|
|
114
69
|
}
|
|
115
|
-
|
|
116
70
|
const normalizedItems = computed(() => {
|
|
117
71
|
if (!props.items) {
|
|
118
|
-
return []
|
|
72
|
+
return [];
|
|
119
73
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
})
|
|
74
|
+
return props.items.map(normalizeItem);
|
|
75
|
+
});
|
|
123
76
|
</script>
|
|
124
77
|
|
|
125
78
|
<template>
|
|
@@ -141,49 +94,49 @@ const normalizedItems = computed(() => {
|
|
|
141
94
|
:key="index"
|
|
142
95
|
>
|
|
143
96
|
<slot
|
|
144
|
-
:name="
|
|
145
|
-
:item="
|
|
97
|
+
:name="item.slot || 'content'"
|
|
98
|
+
:item="item"
|
|
146
99
|
:index="index"
|
|
147
100
|
>
|
|
148
101
|
<dt
|
|
149
102
|
:class="b24ui.labelWrapper({
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
103
|
+
class: [
|
|
104
|
+
props.b24ui?.labelWrapper,
|
|
105
|
+
item?.b24ui?.labelWrapper
|
|
106
|
+
]
|
|
107
|
+
})"
|
|
155
108
|
>
|
|
156
109
|
<slot name="leading" :item="item" :index="index">
|
|
157
110
|
<Component
|
|
158
111
|
:is="item.icon"
|
|
159
112
|
v-if="item.icon"
|
|
160
113
|
:class="b24ui.icon({
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
114
|
+
class: [
|
|
115
|
+
props.b24ui?.icon,
|
|
116
|
+
item?.b24ui?.icon
|
|
117
|
+
]
|
|
118
|
+
})"
|
|
166
119
|
/>
|
|
167
120
|
<B24Avatar
|
|
168
121
|
v-else-if="item.avatar"
|
|
169
|
-
:size="
|
|
122
|
+
:size="props.b24ui?.avatarSize || b24ui.avatarSize()"
|
|
170
123
|
v-bind="item.avatar"
|
|
171
124
|
:class="b24ui.avatar({
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
125
|
+
class: [
|
|
126
|
+
props.b24ui?.avatar,
|
|
127
|
+
item?.b24ui?.avatar
|
|
128
|
+
]
|
|
129
|
+
})"
|
|
177
130
|
/>
|
|
178
131
|
</slot>
|
|
179
132
|
<span
|
|
180
133
|
:class="b24ui.label({
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
134
|
+
class: [
|
|
135
|
+
item?.class,
|
|
136
|
+
props.b24ui?.label,
|
|
137
|
+
item?.b24ui?.label
|
|
138
|
+
]
|
|
139
|
+
})"
|
|
187
140
|
>
|
|
188
141
|
<slot name="label" :item="item" :index="index">
|
|
189
142
|
{{ item.label }}
|
|
@@ -193,22 +146,22 @@ const normalizedItems = computed(() => {
|
|
|
193
146
|
<dd
|
|
194
147
|
:data-orientation="item.orientation"
|
|
195
148
|
:class="b24ui.descriptionWrapper({
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
149
|
+
class: [
|
|
150
|
+
props.b24ui?.descriptionWrapper,
|
|
151
|
+
item?.b24ui?.descriptionWrapper
|
|
152
|
+
],
|
|
153
|
+
orientation: item.orientation
|
|
154
|
+
})"
|
|
202
155
|
>
|
|
203
156
|
<span
|
|
204
157
|
:class="b24ui.description({
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
158
|
+
class: [
|
|
159
|
+
item?.class,
|
|
160
|
+
props.b24ui?.description,
|
|
161
|
+
item?.b24ui?.description
|
|
162
|
+
],
|
|
163
|
+
orientation: item.orientation
|
|
164
|
+
})"
|
|
212
165
|
>
|
|
213
166
|
<slot name="description" :item="item" :index="index">
|
|
214
167
|
{{ item.description }}
|
|
@@ -217,12 +170,12 @@ const normalizedItems = computed(() => {
|
|
|
217
170
|
<span
|
|
218
171
|
v-if="item.actions?.length || !!slots.actions"
|
|
219
172
|
:class="b24ui.actions({
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
173
|
+
class: [
|
|
174
|
+
props.b24ui?.actions,
|
|
175
|
+
item?.b24ui?.actions
|
|
176
|
+
],
|
|
177
|
+
orientation: item.orientation
|
|
178
|
+
})"
|
|
226
179
|
>
|
|
227
180
|
<slot name="actions" :item="item" :index="index">
|
|
228
181
|
<B24Button
|