@bitrix24/b24ui-nuxt 0.1.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 +52 -0
- package/.nuxt/b24ui/alert.ts +118 -0
- package/.nuxt/b24ui/avatar-group.ts +52 -0
- package/.nuxt/b24ui/avatar.ts +63 -0
- package/.nuxt/b24ui/badge.ts +256 -0
- package/.nuxt/b24ui/button-group.ts +27 -0
- package/.nuxt/b24ui/button.ts +342 -0
- package/.nuxt/b24ui/checkbox.ts +128 -0
- package/.nuxt/b24ui/chip.ts +205 -0
- package/.nuxt/b24ui/container.ts +3 -0
- package/.nuxt/b24ui/content/description-list.ts +62 -0
- package/.nuxt/b24ui/countdown.ts +94 -0
- package/.nuxt/b24ui/form-field.ts +57 -0
- package/.nuxt/b24ui/form.ts +3 -0
- package/.nuxt/b24ui/index.ts +28 -0
- package/.nuxt/b24ui/input.ts +472 -0
- package/.nuxt/b24ui/kbd.ts +31 -0
- package/.nuxt/b24ui/link.ts +20 -0
- package/.nuxt/b24ui/progress.ts +303 -0
- package/.nuxt/b24ui/radio-group.ts +135 -0
- package/.nuxt/b24ui/range.ts +172 -0
- package/.nuxt/b24ui/select.ts +550 -0
- package/.nuxt/b24ui/separator.ts +176 -0
- package/.nuxt/b24ui/skeleton.ts +3 -0
- package/.nuxt/b24ui/switch.ts +134 -0
- package/.nuxt/b24ui/tabs.ts +341 -0
- package/.nuxt/b24ui/textarea.ts +332 -0
- package/.nuxt/b24ui/toast.ts +89 -0
- package/.nuxt/b24ui/toaster.ts +91 -0
- package/.nuxt/b24ui/tooltip.ts +16 -0
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/cli/commands/make/component.mjs +95 -0
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +15 -0
- package/cli/package.json +13 -0
- package/cli/templates.mjs +240 -0
- package/cli/utils.mjs +31 -0
- package/dist/meta.cjs +23610 -0
- package/dist/meta.d.cts +23608 -0
- package/dist/meta.d.mts +23608 -0
- package/dist/meta.d.ts +23608 -0
- package/dist/meta.mjs +23608 -0
- package/dist/module.cjs +54 -0
- package/dist/module.d.cts +14 -0
- package/dist/module.d.mts +14 -0
- package/dist/module.d.ts +14 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +51 -0
- package/dist/runtime/components/Advice.vue +115 -0
- package/dist/runtime/components/Alert.vue +136 -0
- package/dist/runtime/components/App.vue +52 -0
- package/dist/runtime/components/Avatar.vue +118 -0
- package/dist/runtime/components/AvatarGroup.vue +99 -0
- package/dist/runtime/components/Badge.vue +114 -0
- package/dist/runtime/components/Button.vue +177 -0
- package/dist/runtime/components/ButtonGroup.vue +58 -0
- package/dist/runtime/components/Checkbox.vue +110 -0
- package/dist/runtime/components/Chip.vue +81 -0
- package/dist/runtime/components/Container.vue +36 -0
- package/dist/runtime/components/Countdown.vue +498 -0
- package/dist/runtime/components/Form.vue +271 -0
- package/dist/runtime/components/FormField.vue +128 -0
- package/dist/runtime/components/Input.vue +224 -0
- package/dist/runtime/components/Kbd.vue +50 -0
- package/dist/runtime/components/Link.vue +219 -0
- package/dist/runtime/components/LinkBase.vue +63 -0
- package/dist/runtime/components/Progress.vue +182 -0
- package/dist/runtime/components/RadioGroup.vue +178 -0
- package/dist/runtime/components/Range.vue +114 -0
- package/dist/runtime/components/Select.vue +328 -0
- package/dist/runtime/components/Separator.vue +82 -0
- package/dist/runtime/components/Skeleton.vue +31 -0
- package/dist/runtime/components/Switch.vue +133 -0
- package/dist/runtime/components/Tabs.vue +127 -0
- package/dist/runtime/components/Textarea.vue +216 -0
- package/dist/runtime/components/Toast.vue +168 -0
- package/dist/runtime/components/Toaster.vue +143 -0
- package/dist/runtime/components/Tooltip.vue +94 -0
- package/dist/runtime/components/content/DescriptionList.vue +220 -0
- package/dist/runtime/composables/defineLocale.d.ts +9 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +15 -0
- package/dist/runtime/composables/defineShortcuts.js +135 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
- package/dist/runtime/composables/useAvatarGroup.js +10 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +17 -0
- package/dist/runtime/composables/useButtonGroup.js +10 -0
- package/dist/runtime/composables/useComponentIcons.d.ts +20 -0
- package/dist/runtime/composables/useComponentIcons.js +25 -0
- package/dist/runtime/composables/useFormField.d.ts +42 -0
- package/dist/runtime/composables/useFormField.js +65 -0
- package/dist/runtime/composables/useKbd.d.ts +35 -0
- package/dist/runtime/composables/useKbd.js +52 -0
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/composables/useToast.d.ts +12 -0
- package/dist/runtime/composables/useToast.js +62 -0
- package/dist/runtime/dictionary/icons.d.ts +20 -0
- package/dist/runtime/dictionary/icons.js +35 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/keyframes.css +1 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +48 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +48 -0
- package/dist/runtime/locale/index.d.ts +3 -0
- package/dist/runtime/locale/index.js +3 -0
- package/dist/runtime/locale/ru.d.ts +2 -0
- package/dist/runtime/locale/ru.js +48 -0
- package/dist/runtime/plugins/colors.d.ts +2 -0
- package/dist/runtime/plugins/colors.js +40 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/form.d.ts +84 -0
- package/dist/runtime/types/form.js +12 -0
- package/dist/runtime/types/icons.d.ts +3 -0
- package/dist/runtime/types/icons.js +0 -0
- package/dist/runtime/types/index.d.ts +33 -0
- package/dist/runtime/types/index.js +33 -0
- package/dist/runtime/types/locale.d.ts +50 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/utils.d.ts +22 -0
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/utils/form.d.ts +17 -0
- package/dist/runtime/utils/form.js +153 -0
- package/dist/runtime/utils/fuse.d.ts +4 -0
- package/dist/runtime/utils/fuse.js +63 -0
- package/dist/runtime/utils/index.d.ts +6 -0
- package/dist/runtime/utils/index.js +63 -0
- package/dist/runtime/utils/link.d.ts +29 -0
- package/dist/runtime/utils/link.js +4 -0
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/components/Link.vue +203 -0
- package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
- package/dist/runtime/vue/plugins/color-mode.js +6 -0
- package/dist/runtime/vue/plugins/head.d.ts +4 -0
- package/dist/runtime/vue/plugins/head.js +6 -0
- package/dist/runtime/vue/stubs.d.ts +15 -0
- package/dist/runtime/vue/stubs.js +27 -0
- package/dist/shared/b24ui-nuxt.CNGvMe2S.mjs +4074 -0
- package/dist/shared/b24ui-nuxt.D22QQtm8.cjs +4079 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/unplugin.cjs +213 -0
- package/dist/unplugin.d.cts +22 -0
- package/dist/unplugin.d.mts +22 -0
- package/dist/unplugin.d.ts +22 -0
- package/dist/unplugin.mjs +202 -0
- package/dist/vite.cjs +21 -0
- package/dist/vite.d.cts +12 -0
- package/dist/vite.d.mts +12 -0
- package/dist/vite.d.ts +12 -0
- package/dist/vite.mjs +19 -0
- package/package.json +166 -0
- package/vue-plugin.d.ts +5 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
const buttonGroup = [
|
|
2
|
+
"horizontal",
|
|
3
|
+
"vertical"
|
|
4
|
+
] as const
|
|
5
|
+
|
|
6
|
+
const color = [
|
|
7
|
+
"default",
|
|
8
|
+
"danger",
|
|
9
|
+
"success",
|
|
10
|
+
"warning",
|
|
11
|
+
"primary",
|
|
12
|
+
"secondary",
|
|
13
|
+
"collab",
|
|
14
|
+
"ai"
|
|
15
|
+
] as const
|
|
16
|
+
|
|
17
|
+
const tagColor = [
|
|
18
|
+
"default",
|
|
19
|
+
"danger",
|
|
20
|
+
"success",
|
|
21
|
+
"warning",
|
|
22
|
+
"primary",
|
|
23
|
+
"secondary",
|
|
24
|
+
"collab",
|
|
25
|
+
"ai"
|
|
26
|
+
] as const
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
"slots": {
|
|
30
|
+
"root": "relative inline-flex items-center w-full",
|
|
31
|
+
"base": [
|
|
32
|
+
"w-full px-3 py-1.5 border-0 focus:outline-none",
|
|
33
|
+
"disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
|
|
34
|
+
"dark:disabled:bg-base-900/37 dark:disabled:text-base-800",
|
|
35
|
+
"appearance-none transition duration-300 ease-linear",
|
|
36
|
+
"ring ring-inset ring-base-300",
|
|
37
|
+
"dark:ring-base-800",
|
|
38
|
+
"text-base-master bg-white placeholder:text-base-400 hover:text-base-900 focus:text-base-900 active:text-base-900",
|
|
39
|
+
"dark:text-base-150 dark:bg-transparent dark:placeholder:text-base-300 dark:hover:text-base-350 dark:focus:text-base-350 dark:active:text-base-350",
|
|
40
|
+
"font-b24-primary font-regular text-md leading-normal",
|
|
41
|
+
"align-middle"
|
|
42
|
+
],
|
|
43
|
+
"tag": [
|
|
44
|
+
"pointer-events-none select-none",
|
|
45
|
+
"absolute z-10 -top-1.5 right-3 h-sm px-1.5 flex flex-col justify-center items-center",
|
|
46
|
+
"font-b24-primary font-bold text-6xs leading-none uppercase rounded-full"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"variants": {
|
|
50
|
+
"buttonGroup": {
|
|
51
|
+
"horizontal": {
|
|
52
|
+
"root": "group",
|
|
53
|
+
"base": "focus-visible:outline-none ring ring-inset ring-1 focus-visible:ring-2 group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none group-not-only:group-first:border-e-0 group-not-only:group-not-first:border-s-0"
|
|
54
|
+
},
|
|
55
|
+
"vertical": {
|
|
56
|
+
"root": "group",
|
|
57
|
+
"base": "focus-visible:outline-none ring ring-inset ring-1 focus-visible:ring-2 group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"noSplit": {
|
|
61
|
+
"false": "not-only:not-first:after:content-[''] not-only:not-first:after:absolute not-only:not-first:after:top-[7px] not-only:not-first:after:bottom-[6px] not-only:not-first:after:left-0 not-only:not-first:after:w-px not-only:not-first:after:bg-current/30"
|
|
62
|
+
},
|
|
63
|
+
"color": {
|
|
64
|
+
"default": "",
|
|
65
|
+
"danger": "",
|
|
66
|
+
"success": "",
|
|
67
|
+
"warning": "",
|
|
68
|
+
"primary": "",
|
|
69
|
+
"secondary": "",
|
|
70
|
+
"collab": "",
|
|
71
|
+
"ai": ""
|
|
72
|
+
},
|
|
73
|
+
"tagColor": {
|
|
74
|
+
"default": {
|
|
75
|
+
"tag": "text-white bg-base-900 dark:text-base-150 dark:bg-base-900"
|
|
76
|
+
},
|
|
77
|
+
"danger": {
|
|
78
|
+
"tag": "text-white bg-red-500 dark:text-red-250 dark:bg-red-600"
|
|
79
|
+
},
|
|
80
|
+
"success": {
|
|
81
|
+
"tag": "text-white bg-green-500 dark:text-green-250 dark:bg-green-600"
|
|
82
|
+
},
|
|
83
|
+
"warning": {
|
|
84
|
+
"tag": "text-white bg-orange-500 dark:text-orange-250 dark:bg-orange-600"
|
|
85
|
+
},
|
|
86
|
+
"primary": {
|
|
87
|
+
"tag": "text-white bg-blue-500 dark:text-blue-250 dark:bg-blue-600"
|
|
88
|
+
},
|
|
89
|
+
"secondary": {
|
|
90
|
+
"tag": "text-white bg-cyan-350 dark:text-base-150 dark:bg-cyan-500"
|
|
91
|
+
},
|
|
92
|
+
"collab": {
|
|
93
|
+
"tag": "text-white bg-collab-500 dark:text-collab-200 dark:bg-collab-800"
|
|
94
|
+
},
|
|
95
|
+
"ai": {
|
|
96
|
+
"tag": "text-white bg-ai-500 dark:text-ai-200 dark:bg-ai-800"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"rounded": {
|
|
100
|
+
"true": "rounded-3xl",
|
|
101
|
+
"false": "rounded-2xs"
|
|
102
|
+
},
|
|
103
|
+
"noPadding": {
|
|
104
|
+
"true": {
|
|
105
|
+
"base": "px-0"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"noBorder": {
|
|
109
|
+
"true": "ring-0 focus-visible:ring-0"
|
|
110
|
+
},
|
|
111
|
+
"underline": {
|
|
112
|
+
"true": "ring-0 focus-visible:ring-0 border-b border-b-base-300 rounded-none"
|
|
113
|
+
},
|
|
114
|
+
"highlight": {
|
|
115
|
+
"true": ""
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"compoundVariants": [
|
|
119
|
+
{
|
|
120
|
+
"color": "default" as typeof color[number],
|
|
121
|
+
"noBorder": false,
|
|
122
|
+
"underline": false,
|
|
123
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-base-900 dark:focus-visible:ring-base-350"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"color": "default" as typeof color[number],
|
|
127
|
+
"highlight": true,
|
|
128
|
+
"noBorder": false,
|
|
129
|
+
"underline": false,
|
|
130
|
+
"class": "ring ring-inset ring-base-900 dark:ring-base-350"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"color": "default" as typeof color[number],
|
|
134
|
+
"noBorder": false,
|
|
135
|
+
"underline": true,
|
|
136
|
+
"class": "focus-visible:border-base-900 dark:focus-visible:border-b-base-350"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"color": "default" as typeof color[number],
|
|
140
|
+
"highlight": true,
|
|
141
|
+
"noBorder": false,
|
|
142
|
+
"underline": true,
|
|
143
|
+
"class": "border-b-base-900 dark:border-b-base-350"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"color": "danger" as typeof color[number],
|
|
147
|
+
"noBorder": false,
|
|
148
|
+
"underline": false,
|
|
149
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-red-500 dark:focus-visible:ring-red-600"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"color": "danger" as typeof color[number],
|
|
153
|
+
"highlight": true,
|
|
154
|
+
"noBorder": false,
|
|
155
|
+
"underline": false,
|
|
156
|
+
"class": "ring ring-inset ring-red-500 dark:ring-red-600"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"color": "danger" as typeof color[number],
|
|
160
|
+
"noBorder": false,
|
|
161
|
+
"underline": true,
|
|
162
|
+
"class": "focus-visible:border-b-red-500 dark:focus-visible:border-b-red-600"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"color": "danger" as typeof color[number],
|
|
166
|
+
"highlight": true,
|
|
167
|
+
"noBorder": false,
|
|
168
|
+
"underline": true,
|
|
169
|
+
"class": "border-b-red-500 dark:border-b-red-600"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"color": "success" as typeof color[number],
|
|
173
|
+
"noBorder": false,
|
|
174
|
+
"underline": false,
|
|
175
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-green-500 dark:focus-visible:ring-green-600"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"color": "success" as typeof color[number],
|
|
179
|
+
"highlight": true,
|
|
180
|
+
"noBorder": false,
|
|
181
|
+
"underline": false,
|
|
182
|
+
"class": "ring ring-inset ring-green-500 dark:ring-green-600"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"color": "success" as typeof color[number],
|
|
186
|
+
"noBorder": false,
|
|
187
|
+
"underline": true,
|
|
188
|
+
"class": "focus-visible:border-b-green-500 dark:focus-visible:border-b-green-600"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"color": "success" as typeof color[number],
|
|
192
|
+
"highlight": true,
|
|
193
|
+
"noBorder": false,
|
|
194
|
+
"underline": true,
|
|
195
|
+
"class": "border-b-green-500 dark:border-b-green-600"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"color": "warning" as typeof color[number],
|
|
199
|
+
"noBorder": false,
|
|
200
|
+
"underline": false,
|
|
201
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-orange-500 dark:focus-visible:ring-orange-600"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"color": "warning" as typeof color[number],
|
|
205
|
+
"highlight": true,
|
|
206
|
+
"noBorder": false,
|
|
207
|
+
"underline": false,
|
|
208
|
+
"class": "ring ring-inset ring-orange-500 dark:ring-orange-600"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"color": "warning" as typeof color[number],
|
|
212
|
+
"noBorder": false,
|
|
213
|
+
"underline": true,
|
|
214
|
+
"class": "focus-visible:border-b-orange-500 dark:focus-visible:border-b-orange-600"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"color": "warning" as typeof color[number],
|
|
218
|
+
"highlight": true,
|
|
219
|
+
"noBorder": false,
|
|
220
|
+
"underline": true,
|
|
221
|
+
"class": "border-b-orange-500 dark:border-b-orange-600"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"color": "primary" as typeof color[number],
|
|
225
|
+
"noBorder": false,
|
|
226
|
+
"underline": false,
|
|
227
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-blue-500 dark:focus-visible:ring-blue-600"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"color": "primary" as typeof color[number],
|
|
231
|
+
"highlight": true,
|
|
232
|
+
"noBorder": false,
|
|
233
|
+
"underline": false,
|
|
234
|
+
"class": "ring ring-inset ring-blue-500 dark:ring-blue-600"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"color": "primary" as typeof color[number],
|
|
238
|
+
"noBorder": false,
|
|
239
|
+
"underline": true,
|
|
240
|
+
"class": "focus-visible:border-b-blue-500 dark:focus-visible:border-b-blue-600"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"color": "primary" as typeof color[number],
|
|
244
|
+
"highlight": true,
|
|
245
|
+
"noBorder": false,
|
|
246
|
+
"underline": true,
|
|
247
|
+
"class": "border-b-blue-500 dark:border-b-blue-600"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"color": "secondary" as typeof color[number],
|
|
251
|
+
"noBorder": false,
|
|
252
|
+
"underline": false,
|
|
253
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-cyan-350 dark:focus-visible:ring-cyan-500"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"color": "secondary" as typeof color[number],
|
|
257
|
+
"highlight": true,
|
|
258
|
+
"noBorder": false,
|
|
259
|
+
"underline": false,
|
|
260
|
+
"class": "ring ring-inset ring-cyan-350 dark:ring-cyan-500"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"color": "secondary" as typeof color[number],
|
|
264
|
+
"noBorder": false,
|
|
265
|
+
"underline": true,
|
|
266
|
+
"class": "focus-visible:border-b-cyan-350 dark:focus-visible:border-b-cyan-500"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"color": "secondary" as typeof color[number],
|
|
270
|
+
"highlight": true,
|
|
271
|
+
"noBorder": false,
|
|
272
|
+
"underline": true,
|
|
273
|
+
"class": "border-b-cyan-350 dark:border-b-cyan-500"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"color": "collab" as typeof color[number],
|
|
277
|
+
"noBorder": false,
|
|
278
|
+
"underline": false,
|
|
279
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-collab-500 dark:focus-visible:ring-collab-600"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"color": "collab" as typeof color[number],
|
|
283
|
+
"highlight": true,
|
|
284
|
+
"noBorder": false,
|
|
285
|
+
"underline": false,
|
|
286
|
+
"class": "ring ring-inset ring-collab-500 dark:ring-collab-600"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"color": "collab" as typeof color[number],
|
|
290
|
+
"noBorder": false,
|
|
291
|
+
"underline": true,
|
|
292
|
+
"class": "focus-visible:border-b-collab-500 dark:focus-visible:border-b-collab-600"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"color": "collab" as typeof color[number],
|
|
296
|
+
"highlight": true,
|
|
297
|
+
"noBorder": false,
|
|
298
|
+
"underline": true,
|
|
299
|
+
"class": "border-b-collab-500 dark:border-b-collab-600"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"color": "ai" as typeof color[number],
|
|
303
|
+
"noBorder": false,
|
|
304
|
+
"underline": false,
|
|
305
|
+
"class": "focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ai-500 dark:focus-visible:ring-ai-600"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"color": "ai" as typeof color[number],
|
|
309
|
+
"highlight": true,
|
|
310
|
+
"noBorder": false,
|
|
311
|
+
"underline": false,
|
|
312
|
+
"class": "ring ring-inset ring-ai-500 dark:ring-ai-600"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"color": "ai" as typeof color[number],
|
|
316
|
+
"noBorder": false,
|
|
317
|
+
"underline": true,
|
|
318
|
+
"class": "focus-visible:border-b-ai-500 dark:focus-visible:border-b-ai-600"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"color": "ai" as typeof color[number],
|
|
322
|
+
"highlight": true,
|
|
323
|
+
"noBorder": false,
|
|
324
|
+
"underline": true,
|
|
325
|
+
"class": "border-b-ai-500 dark:border-b-ai-600"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"defaultVariants": {
|
|
329
|
+
"color": "primary" as typeof color[number],
|
|
330
|
+
"tagColor": "primary" as typeof tagColor[number]
|
|
331
|
+
}
|
|
332
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const color = [
|
|
2
|
+
"default",
|
|
3
|
+
"danger",
|
|
4
|
+
"success",
|
|
5
|
+
"warning",
|
|
6
|
+
"primary",
|
|
7
|
+
"secondary",
|
|
8
|
+
"collab",
|
|
9
|
+
"ai"
|
|
10
|
+
] as const
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
"slots": {
|
|
14
|
+
"root": [
|
|
15
|
+
"relative group overflow-hidden rounded-[26px] py-3.5 ps-6 pe-4 flex gap-2.5 focus:outline-none",
|
|
16
|
+
"font-b24-primary",
|
|
17
|
+
"dark:ring-2 dark:ring-base-900",
|
|
18
|
+
"bg-base-ebony/80 dark:bg-base-dark",
|
|
19
|
+
"text-sm font-normal",
|
|
20
|
+
"text-white dark:text-base-150"
|
|
21
|
+
],
|
|
22
|
+
"wrapper": "w-0 flex-1 flex flex-col gap-1",
|
|
23
|
+
"title": "font-medium",
|
|
24
|
+
"description": "",
|
|
25
|
+
"icon": "shrink-0 size-6",
|
|
26
|
+
"avatar": "shrink-0",
|
|
27
|
+
"avatarSize": "xl",
|
|
28
|
+
"actions": "flex gap-1.5 shrink-0",
|
|
29
|
+
"progress": "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
30
|
+
"close": "p-0.5 text-base-350 dark:text-base-350 hover:text-base-400 dark:hover:text-base-400"
|
|
31
|
+
},
|
|
32
|
+
"variants": {
|
|
33
|
+
"color": {
|
|
34
|
+
"default": {
|
|
35
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-base-400 dark:focus-visible:ring-base-400",
|
|
36
|
+
"icon": "text-white",
|
|
37
|
+
"progress": "bg-base-350 dark:bg-base-350"
|
|
38
|
+
},
|
|
39
|
+
"danger": {
|
|
40
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-red-400 dark:focus-visible:ring-red-400",
|
|
41
|
+
"icon": "text-red-500",
|
|
42
|
+
"progress": "bg-red-500 dark:bg-red-500"
|
|
43
|
+
},
|
|
44
|
+
"success": {
|
|
45
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-green-400 dark:focus-visible:ring-green-400",
|
|
46
|
+
"icon": "text-green-500",
|
|
47
|
+
"progress": "bg-green-500 dark:bg-green-500"
|
|
48
|
+
},
|
|
49
|
+
"warning": {
|
|
50
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-orange-400 dark:focus-visible:ring-orange-400",
|
|
51
|
+
"icon": "text-orange-500",
|
|
52
|
+
"progress": "bg-orange-500 dark:bg-orange-500"
|
|
53
|
+
},
|
|
54
|
+
"primary": {
|
|
55
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 dark:focus-visible:ring-blue-400",
|
|
56
|
+
"icon": "text-blue-500",
|
|
57
|
+
"progress": "bg-blue-500 dark:bg-blue-500"
|
|
58
|
+
},
|
|
59
|
+
"secondary": {
|
|
60
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-cyan-400 dark:focus-visible:ring-cyan-400",
|
|
61
|
+
"icon": "text-cyan-500",
|
|
62
|
+
"progress": "bg-cyan-500 dark:bg-cyan-500"
|
|
63
|
+
},
|
|
64
|
+
"collab": {
|
|
65
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-collab-400 dark:focus-visible:ring-collab-400",
|
|
66
|
+
"icon": "text-collab-500",
|
|
67
|
+
"progress": "bg-collab-500 dark:bg-collab-500"
|
|
68
|
+
},
|
|
69
|
+
"ai": {
|
|
70
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ai-400 dark:focus-visible:ring-ai-400",
|
|
71
|
+
"icon": "text-ai-500",
|
|
72
|
+
"progress": "bg-ai-500 dark:bg-ai-500"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"multiline": {
|
|
76
|
+
"true": {
|
|
77
|
+
"root": "items-start",
|
|
78
|
+
"actions": "items-start mt-1"
|
|
79
|
+
},
|
|
80
|
+
"false": {
|
|
81
|
+
"root": "items-center",
|
|
82
|
+
"actions": "items-center"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"defaultVariants": {
|
|
87
|
+
"color": "default" as typeof color[number]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const position = [
|
|
2
|
+
"top-left",
|
|
3
|
+
"top-center",
|
|
4
|
+
"top-right",
|
|
5
|
+
"bottom-left",
|
|
6
|
+
"bottom-center",
|
|
7
|
+
"bottom-right"
|
|
8
|
+
] as const
|
|
9
|
+
|
|
10
|
+
const swipeDirection = [
|
|
11
|
+
"up",
|
|
12
|
+
"right",
|
|
13
|
+
"down",
|
|
14
|
+
"left"
|
|
15
|
+
] as const
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
"slots": {
|
|
19
|
+
"viewport": "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
|
|
20
|
+
"base": "pointer-events-auto absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
|
|
21
|
+
},
|
|
22
|
+
"variants": {
|
|
23
|
+
"position": {
|
|
24
|
+
"top-left": {
|
|
25
|
+
"viewport": "left-4"
|
|
26
|
+
},
|
|
27
|
+
"top-center": {
|
|
28
|
+
"viewport": "left-1/2 transform -translate-x-1/2"
|
|
29
|
+
},
|
|
30
|
+
"top-right": {
|
|
31
|
+
"viewport": "right-4"
|
|
32
|
+
},
|
|
33
|
+
"bottom-left": {
|
|
34
|
+
"viewport": "left-4"
|
|
35
|
+
},
|
|
36
|
+
"bottom-center": {
|
|
37
|
+
"viewport": "left-1/2 transform -translate-x-1/2"
|
|
38
|
+
},
|
|
39
|
+
"bottom-right": {
|
|
40
|
+
"viewport": "right-4"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"swipeDirection": {
|
|
44
|
+
"up": "data-[swipe=end]:animate-[toast-slide-up_200ms_ease-out]",
|
|
45
|
+
"right": "data-[swipe=end]:animate-[toast-slide-right_200ms_ease-out]",
|
|
46
|
+
"down": "data-[swipe=end]:animate-[toast-slide-down_200ms_ease-out]",
|
|
47
|
+
"left": "data-[swipe=end]:animate-[toast-slide-left_200ms_ease-out]"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"compoundVariants": [
|
|
51
|
+
{
|
|
52
|
+
"position": [
|
|
53
|
+
"top-left" as typeof position[number],
|
|
54
|
+
"top-center" as typeof position[number],
|
|
55
|
+
"top-right" as typeof position[number]
|
|
56
|
+
],
|
|
57
|
+
"class": {
|
|
58
|
+
"viewport": "top-4",
|
|
59
|
+
"base": "top-0 data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out]"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"position": [
|
|
64
|
+
"bottom-left" as typeof position[number],
|
|
65
|
+
"bottom-center" as typeof position[number],
|
|
66
|
+
"bottom-right" as typeof position[number]
|
|
67
|
+
],
|
|
68
|
+
"class": {
|
|
69
|
+
"viewport": "bottom-4",
|
|
70
|
+
"base": "bottom-0 data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out]"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"swipeDirection": [
|
|
75
|
+
"left" as typeof swipeDirection[number],
|
|
76
|
+
"right" as typeof swipeDirection[number]
|
|
77
|
+
],
|
|
78
|
+
"class": "data-[swipe=move]:translate-x-[var(--reka-toast-swipe-move-x)] data-[swipe=end]:translate-x-[var(--reka-toast-swipe-end-x)] data-[swipe=cancel]:translate-x-0"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"swipeDirection": [
|
|
82
|
+
"up" as typeof swipeDirection[number],
|
|
83
|
+
"down" as typeof swipeDirection[number]
|
|
84
|
+
],
|
|
85
|
+
"class": "data-[swipe=move]:translate-y-[var(--reka-toast-swipe-move-y)] data-[swipe=end]:translate-y-[var(--reka-toast-swipe-end-y)] data-[swipe=cancel]:translate-y-0"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"defaultVariants": {
|
|
89
|
+
"position": "top-right" as typeof position[number]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"slots": {
|
|
3
|
+
"content": [
|
|
4
|
+
"flex items-center gap-1 shadow-sm rounded-2xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
5
|
+
"min-h-6 px-2 py-1 text-xs",
|
|
6
|
+
"bg-base-dark/85 text-white",
|
|
7
|
+
"dark:bg-base-dark dark:text-base-150 dark:ring dark:ring-base-100/20",
|
|
8
|
+
"pointer-events-auto"
|
|
9
|
+
],
|
|
10
|
+
"arrow": "fill-base-dark dark:fill-base-100/20",
|
|
11
|
+
"text": "text-pretty max-w-[200px]",
|
|
12
|
+
"kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-[''] before:me-0.5",
|
|
13
|
+
"kbdsSize": "sm",
|
|
14
|
+
"kbdsDepth": "normal"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Bitrix24
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Bitrix24 UI
|
|
2
|
+
|
|
3
|
+
Bitrix24 UI for developing web applications REST API for NUXT & VUE
|
|
4
|
+
|
|
5
|
+
Find more details in the [documentation](https://bitrix24.github.io/b24ui/)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash [pnpm]
|
|
10
|
+
pnpm add @bitrix24/b24ui-nuxt@next
|
|
11
|
+
pnpm add @bitrix24/b24icons-vue@next
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```bash [yarn]
|
|
15
|
+
yarn add @bitrix24/b24ui-nuxt@next
|
|
16
|
+
yarn add @bitrix24/b24icons-vue@next
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```bash [npm]
|
|
20
|
+
npm install @bitrix24/b24ui-nuxt@next
|
|
21
|
+
npm install @bitrix24/b24icons-vue@next
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```bash [bun]
|
|
25
|
+
yarn add @bitrix24/b24ui-nuxt@next
|
|
26
|
+
yarn add @bitrix24/b24icons-vue@next
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Nuxt
|
|
30
|
+
|
|
31
|
+
1. Add the Bitrix24 UI module in your `nuxt.config.ts`:
|
|
32
|
+
|
|
33
|
+
```ts [nuxt.config.ts]
|
|
34
|
+
export default defineNuxtConfig({
|
|
35
|
+
modules: ['@bitrix24/b24ui-nuxt']
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. Import Tailwind CSS and Bitrix24 UI in your CSS:
|
|
40
|
+
|
|
41
|
+
```css [assets/css/main.css]
|
|
42
|
+
@import "tailwindcss";
|
|
43
|
+
@import "@bitrix24/b24ui-nuxt";
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Learn more in the [installation guide](https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html).
|
|
47
|
+
|
|
48
|
+
### Vue
|
|
49
|
+
|
|
50
|
+
1. Add the Bitrix24 UI Vite plugin in your `vite.config.ts`:
|
|
51
|
+
|
|
52
|
+
```ts [vite.config.ts]
|
|
53
|
+
import { defineConfig } from 'vite'
|
|
54
|
+
import vue from '@vitejs/plugin-vue'
|
|
55
|
+
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'
|
|
56
|
+
|
|
57
|
+
export default defineConfig({
|
|
58
|
+
plugins: [
|
|
59
|
+
vue(),
|
|
60
|
+
bitrix24UIPluginVite()
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. Use the Bitrix24 UI Vue plugin in your `main.ts`:
|
|
66
|
+
|
|
67
|
+
```ts [main.ts]
|
|
68
|
+
import { createApp } from 'vue'
|
|
69
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
70
|
+
import b24UiPlugin from '@bitrix24/b24ui-nuxt/vue-plugin'
|
|
71
|
+
import App from './App.vue'
|
|
72
|
+
|
|
73
|
+
const app = createApp(App)
|
|
74
|
+
const router = createRouter({
|
|
75
|
+
routes: [],
|
|
76
|
+
history: createWebHistory()
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
app.use(router)
|
|
80
|
+
app.use(b24UiPlugin)
|
|
81
|
+
|
|
82
|
+
app.mount('#app')
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
3. Import Tailwind CSS and Bitrix24 UI in your CSS:
|
|
86
|
+
|
|
87
|
+
```css [assets/main.css]
|
|
88
|
+
@import "tailwindcss";
|
|
89
|
+
@import "@bitrix24/b24ui-nuxt";
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Learn more in the [installation guide](https://bitrix24.github.io/b24ui/guide/installation-vue.html).
|
|
93
|
+
|
|
94
|
+
## Credits
|
|
95
|
+
|
|
96
|
+
- [nuxt/nuxt](https://github.com/nuxt/nuxt)
|
|
97
|
+
- [nuxt/ui](https://github.com/nuxt/ui)
|
|
98
|
+
- [nuxt-modules/color-mode](https://github.com/nuxt-modules/color-mode)
|
|
99
|
+
- [unovue/reka-ui](https://github.com/unovue/reka-ui)
|
|
100
|
+
- [tailwindlabs/tailwindcss](https://github.com/tailwindlabs/tailwindcss)
|
|
101
|
+
- [vueuse/vueuse](https://github.com/vueuse/vueuse)
|