@bitrix24/b24ui-nuxt 0.1.6 → 0.2.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/alert.ts +18 -8
- package/.nuxt/b24ui/badge.ts +1 -1
- package/.nuxt/b24ui/content/description-list.ts +17 -7
- package/.nuxt/b24ui/index.ts +2 -0
- package/.nuxt/b24ui/input-menu.ts +591 -0
- package/.nuxt/b24ui/input.ts +5 -5
- package/.nuxt/b24ui/select-menu.ts +517 -0
- package/.nuxt/b24ui/select.ts +8 -8
- package/.nuxt/b24ui/toast.ts +18 -8
- package/README.md +8 -8
- package/dist/meta.cjs +13003 -3006
- package/dist/meta.d.cts +13003 -3006
- package/dist/meta.d.mts +13003 -3006
- package/dist/meta.d.ts +13003 -3006
- package/dist/meta.mjs +13003 -3006
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Alert.vue +13 -10
- package/dist/runtime/components/App.vue +2 -3
- package/dist/runtime/components/Button.vue +1 -3
- package/dist/runtime/components/InputMenu.vue +507 -0
- package/dist/runtime/components/SelectMenu.vue +465 -0
- package/dist/runtime/components/Toast.vue +26 -14
- package/dist/runtime/components/Toaster.vue +2 -2
- package/dist/runtime/components/content/DescriptionList.vue +9 -7
- package/dist/runtime/composables/useToast.d.ts +5 -4
- package/dist/runtime/composables/useToast.js +2 -2
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/utils.d.ts +5 -0
- package/dist/shared/{b24ui-nuxt.n3bAiAAD.mjs → b24ui-nuxt.CrjojW8t.mjs} +332 -36
- package/dist/shared/{b24ui-nuxt.BAQG__ma.cjs → b24ui-nuxt.D5cXbZSx.cjs} +331 -35
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +23 -2
|
@@ -13,12 +13,14 @@ export * from '../components/Countdown.vue';
|
|
|
13
13
|
export * from '../components/Form.vue';
|
|
14
14
|
export * from '../components/FormField.vue';
|
|
15
15
|
export * from '../components/Input.vue';
|
|
16
|
+
export * from '../components/InputMenu.vue';
|
|
16
17
|
export * from '../components/Kbd.vue';
|
|
17
18
|
export * from '../components/Link.vue';
|
|
18
19
|
export * from '../components/Progress.vue';
|
|
19
20
|
export * from '../components/RadioGroup.vue';
|
|
20
21
|
export * from '../components/Range.vue';
|
|
21
22
|
export * from '../components/Select.vue';
|
|
23
|
+
export * from '../components/SelectMenu.vue';
|
|
22
24
|
export * from '../components/Separator.vue';
|
|
23
25
|
export * from '../components/Skeleton.vue';
|
|
24
26
|
export * from '../components/Switch.vue';
|
|
@@ -31,3 +33,4 @@ export * from '../components/content/DescriptionList.vue';
|
|
|
31
33
|
export * from './form';
|
|
32
34
|
export * from './locale';
|
|
33
35
|
export * from './icons';
|
|
36
|
+
export * from './utils';
|
|
@@ -13,12 +13,14 @@ export * from "../components/Countdown.vue";
|
|
|
13
13
|
export * from "../components/Form.vue";
|
|
14
14
|
export * from "../components/FormField.vue";
|
|
15
15
|
export * from "../components/Input.vue";
|
|
16
|
+
export * from "../components/InputMenu.vue";
|
|
16
17
|
export * from "../components/Kbd.vue";
|
|
17
18
|
export * from "../components/Link.vue";
|
|
18
19
|
export * from "../components/Progress.vue";
|
|
19
20
|
export * from "../components/RadioGroup.vue";
|
|
20
21
|
export * from "../components/Range.vue";
|
|
21
22
|
export * from "../components/Select.vue";
|
|
23
|
+
export * from "../components/SelectMenu.vue";
|
|
22
24
|
export * from "../components/Separator.vue";
|
|
23
25
|
export * from "../components/Skeleton.vue";
|
|
24
26
|
export * from "../components/Switch.vue";
|
|
@@ -31,3 +33,4 @@ export * from "../components/content/DescriptionList.vue";
|
|
|
31
33
|
export * from "./form.js";
|
|
32
34
|
export * from "./locale.js";
|
|
33
35
|
export * from "./icons.js";
|
|
36
|
+
export * from "./utils.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
1
2
|
export interface TightMap<O = any> {
|
|
2
3
|
[key: string]: TightMap | O;
|
|
3
4
|
}
|
|
@@ -20,3 +21,7 @@ export type SelectItemKey<T> = T extends Record<string, any> ? keyof T : string;
|
|
|
20
21
|
export type SelectModelValueEmits<T, V, M extends boolean = false, DV = T> = {
|
|
21
22
|
'update:modelValue': [payload: SelectModelValue<T, V, M, DV>];
|
|
22
23
|
};
|
|
24
|
+
export type StringOrVNode = string | VNode | (() => VNode);
|
|
25
|
+
export type EmitsToProps<T> = {
|
|
26
|
+
[K in keyof T as `on${Capitalize<string & K>}`]: T[K] extends [...args: infer Args] ? (...args: Args) => void : never;
|
|
27
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'node:url';
|
|
2
2
|
import { kebabCase } from 'scule';
|
|
3
3
|
import { addTypeTemplate, addTemplate } from '@nuxt/kit';
|
|
4
|
-
import { defuFn } from 'defu';
|
|
4
|
+
import { defuFn, defu } from 'defu';
|
|
5
5
|
|
|
6
6
|
const getDefaultUiConfig = () => ({});
|
|
7
7
|
const defaultOptions = {
|
|
@@ -67,14 +67,14 @@ const advice = {
|
|
|
67
67
|
const alert = {
|
|
68
68
|
slots: {
|
|
69
69
|
root: "relative overflow-hidden w-full rounded-3xs flex",
|
|
70
|
-
wrapper: "min-w-0 flex-1 flex flex-col
|
|
70
|
+
wrapper: "min-w-0 flex-1 flex flex-col font-b24-primary font-normal",
|
|
71
71
|
title: "font-bold",
|
|
72
72
|
description: "",
|
|
73
73
|
icon: "shrink-0 size-6",
|
|
74
74
|
avatar: "shrink-0",
|
|
75
75
|
avatarSize: "",
|
|
76
76
|
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
77
|
-
close: "p-0
|
|
77
|
+
close: "p-0"
|
|
78
78
|
},
|
|
79
79
|
variants: {
|
|
80
80
|
color: {
|
|
@@ -149,14 +149,19 @@ const alert = {
|
|
|
149
149
|
avatarSize: "xl"
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
root: "items-start",
|
|
155
|
-
actions: "items-start mt-2"
|
|
156
|
-
},
|
|
157
|
-
false: {
|
|
152
|
+
orientation: {
|
|
153
|
+
horizontal: {
|
|
158
154
|
root: "items-center",
|
|
159
155
|
actions: "items-center"
|
|
156
|
+
},
|
|
157
|
+
vertical: {
|
|
158
|
+
root: "items-start",
|
|
159
|
+
actions: "items-start mt-2"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
title: {
|
|
163
|
+
true: {
|
|
164
|
+
description: "mt-1"
|
|
160
165
|
}
|
|
161
166
|
}
|
|
162
167
|
},
|
|
@@ -341,7 +346,7 @@ const badge = {
|
|
|
341
346
|
leadingIcon: "shrink-0",
|
|
342
347
|
leadingAvatar: "shrink-0",
|
|
343
348
|
leadingAvatarSize: "",
|
|
344
|
-
trailingIcon: "shrink-0 cursor-pointer
|
|
349
|
+
trailingIcon: "shrink-0 cursor-pointer hover:rounded-full hover:bg-current/20 dark:hover:bg-current/35"
|
|
345
350
|
},
|
|
346
351
|
variants: {
|
|
347
352
|
...buttonGroupVariant,
|
|
@@ -1636,6 +1641,7 @@ const input = {
|
|
|
1636
1641
|
slots: {
|
|
1637
1642
|
root: "relative inline-flex items-center w-full",
|
|
1638
1643
|
base: [
|
|
1644
|
+
"px-3",
|
|
1639
1645
|
"w-full py-0 border-0 focus:outline-none",
|
|
1640
1646
|
"disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
|
|
1641
1647
|
"dark:disabled:bg-base-900/37 dark:disabled:text-base-800",
|
|
@@ -1665,7 +1671,7 @@ const input = {
|
|
|
1665
1671
|
...buttonGroupVariantWithRoot,
|
|
1666
1672
|
size: {
|
|
1667
1673
|
xs: {
|
|
1668
|
-
base: "
|
|
1674
|
+
base: "h-xl2 gap-1",
|
|
1669
1675
|
// 26px
|
|
1670
1676
|
leading: "px-1",
|
|
1671
1677
|
trailing: "px-1",
|
|
@@ -1674,7 +1680,7 @@ const input = {
|
|
|
1674
1680
|
trailingIcon: "size-lg2"
|
|
1675
1681
|
},
|
|
1676
1682
|
sm: {
|
|
1677
|
-
base: "
|
|
1683
|
+
base: "h-8 gap-1.5",
|
|
1678
1684
|
// 32px
|
|
1679
1685
|
leading: "px-1.5",
|
|
1680
1686
|
trailing: "px-1.5",
|
|
@@ -1683,7 +1689,7 @@ const input = {
|
|
|
1683
1689
|
trailingIcon: "size-lg2"
|
|
1684
1690
|
},
|
|
1685
1691
|
md: {
|
|
1686
|
-
base: "
|
|
1692
|
+
base: "h-10 gap-1.5",
|
|
1687
1693
|
// 40px
|
|
1688
1694
|
leading: "px-2",
|
|
1689
1695
|
trailing: "px-2",
|
|
@@ -1692,7 +1698,7 @@ const input = {
|
|
|
1692
1698
|
trailingIcon: "size-[24px]"
|
|
1693
1699
|
},
|
|
1694
1700
|
lg: {
|
|
1695
|
-
base: "
|
|
1701
|
+
base: "h-12 gap-2",
|
|
1696
1702
|
// 48px
|
|
1697
1703
|
leading: "px-2",
|
|
1698
1704
|
trailing: "px-2",
|
|
@@ -2086,6 +2092,248 @@ const input = {
|
|
|
2086
2092
|
}
|
|
2087
2093
|
};
|
|
2088
2094
|
|
|
2095
|
+
const defSize$1 = {
|
|
2096
|
+
label: "h-9 ps-2 pe-3 text-sm gap-2",
|
|
2097
|
+
item: "h-9 ps-3 pe-3 text-sm gap-2",
|
|
2098
|
+
itemLeadingIcon: "size-5",
|
|
2099
|
+
itemLeadingAvatarSize: "2xs",
|
|
2100
|
+
itemLeadingChip: "size-3 not-group-data-reka-collection-item:ps-2.5",
|
|
2101
|
+
itemLeadingChipSize: "sm",
|
|
2102
|
+
itemTrailingIcon: "size-3",
|
|
2103
|
+
trailingIcon: "size-lg2"
|
|
2104
|
+
};
|
|
2105
|
+
const inputMenu = () => {
|
|
2106
|
+
return defuFn({
|
|
2107
|
+
slots: {
|
|
2108
|
+
base: [
|
|
2109
|
+
"py-0 w-full border-0 focus:outline-none",
|
|
2110
|
+
"disabled:cursor-not-allowed disabled:bg-base-30/37 disabled:resize-none disabled:text-base-500",
|
|
2111
|
+
"dark:disabled:bg-base-900/37 dark:disabled:text-base-800",
|
|
2112
|
+
"appearance-none transition duration-300 ease-linear",
|
|
2113
|
+
"ring ring-inset ring-base-300",
|
|
2114
|
+
"dark:ring-base-800",
|
|
2115
|
+
"text-base-master bg-white placeholder:text-base-400 hover:text-base-900 focus:text-base-900 active:text-base-900",
|
|
2116
|
+
"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",
|
|
2117
|
+
"font-b24-primary font-regular text-md leading-none",
|
|
2118
|
+
"align-middle",
|
|
2119
|
+
// 'text-ellipsis whitespace-nowrap',
|
|
2120
|
+
"transition-colors"
|
|
2121
|
+
].join(" "),
|
|
2122
|
+
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
2123
|
+
arrow: "fill-base-master/10 dark:fill-base-100/20",
|
|
2124
|
+
content: [
|
|
2125
|
+
"w-[var(--reka-popper-anchor-width)]",
|
|
2126
|
+
// 'max-h-60',
|
|
2127
|
+
// 'h-[var(--reka-popper-available-height)]',
|
|
2128
|
+
"bg-white dark:bg-base-dark",
|
|
2129
|
+
"shadow-md rounded-2xs ring ring-base-300 dark:ring-base-800",
|
|
2130
|
+
"overflow-hidden",
|
|
2131
|
+
"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
2132
|
+
"pointer-events-auto"
|
|
2133
|
+
].join(" "),
|
|
2134
|
+
viewport: "divide-y divide-base-master/10 dark:divide-base-100/20 scroll-py-1",
|
|
2135
|
+
group: "p-1 isolate",
|
|
2136
|
+
empty: "py-2 text-center text-sm text-base-500 dark:text-base-600",
|
|
2137
|
+
label: [
|
|
2138
|
+
"flex items-center",
|
|
2139
|
+
"font-semibold text-base-900 dark:text-base-200"
|
|
2140
|
+
].join(" "),
|
|
2141
|
+
separator: "-mx-1 my-1 h-px bg-base-master/10 dark:bg-base-100/20",
|
|
2142
|
+
item: [
|
|
2143
|
+
"group relative w-full flex items-center select-none outline-none",
|
|
2144
|
+
"before:absolute before:z-[-1] before:inset-px before:rounded-2xs",
|
|
2145
|
+
"cursor-pointer",
|
|
2146
|
+
"data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
2147
|
+
"text-base-master dark:text-base-150",
|
|
2148
|
+
"data-highlighted:text-base-900 dark:data-highlighted:text-base-200 data-highlighted:before:bg-base-100/50 dark:data-highlighted:before:bg-base-900",
|
|
2149
|
+
"data-[state=checked]:text-base-900 dark:data-[state=checked]:text-base-200 data-[state=checked]:before:bg-base-100/50 dark:data-[state=checked]:before:bg-base-900",
|
|
2150
|
+
"transition-colors before:transition-colors"
|
|
2151
|
+
].join(" "),
|
|
2152
|
+
itemLeadingIcon: [
|
|
2153
|
+
"shrink-0 text-base-500 dark:text-base-700",
|
|
2154
|
+
"group-data-highlighted:text-base-master dark:group-data-highlighted:text-base-150",
|
|
2155
|
+
"group-data-[state=checked]:text-base-master dark:group-data-[state=checked]:text-base-150",
|
|
2156
|
+
"transition-colors"
|
|
2157
|
+
].join(" "),
|
|
2158
|
+
itemLeadingAvatar: "shrink-0",
|
|
2159
|
+
itemLeadingAvatarSize: "",
|
|
2160
|
+
itemLeadingChip: "shrink-0",
|
|
2161
|
+
itemLeadingChipSize: "",
|
|
2162
|
+
itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
2163
|
+
itemTrailingIcon: "shrink-0",
|
|
2164
|
+
itemLabel: "truncate",
|
|
2165
|
+
tagsItem: [
|
|
2166
|
+
"px-2 rounded-2xs font-b24-secondary font-normal leading-normal",
|
|
2167
|
+
"inline-flex items-center gap-1",
|
|
2168
|
+
"ring ring-inset data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
2169
|
+
"text-blue-700 bg-blue-250 ring-blue-250",
|
|
2170
|
+
"dark:text-blue-700 dark:bg-blue-300 dark:ring-blue-300"
|
|
2171
|
+
// 'ring-base-200 bg-red-100 text-base-master',
|
|
2172
|
+
// 'dark:ring-base-800 dark:bg-base-900 dark:text-base-150'
|
|
2173
|
+
].join(" "),
|
|
2174
|
+
tagsItemText: "truncate",
|
|
2175
|
+
tagsItemDelete: [
|
|
2176
|
+
"cursor-pointer hover:rounded-full",
|
|
2177
|
+
"inline-flex items-center rounded-md disabled:pointer-events-none",
|
|
2178
|
+
"text-base-500 hover:text-base-master hover:bg-blue-300",
|
|
2179
|
+
"dark:text-base-500 dark:text-base-700 dark:hover:text-base-master dark:hover:bg-blue-400",
|
|
2180
|
+
"transition-colors"
|
|
2181
|
+
].join(" "),
|
|
2182
|
+
tagsItemDeleteIcon: "",
|
|
2183
|
+
tagsInput: ""
|
|
2184
|
+
},
|
|
2185
|
+
variants: {
|
|
2186
|
+
addNew: {
|
|
2187
|
+
true: {
|
|
2188
|
+
group: "p-0 isolate -m-px",
|
|
2189
|
+
item: [
|
|
2190
|
+
"before:rounded-none",
|
|
2191
|
+
"text-base-master dark:text-base-150 before:bg-blue-200 dark:before:bg-blue-800",
|
|
2192
|
+
"data-highlighted:text-base-900 dark:data-highlighted:text-base-200 data-highlighted:before:bg-blue-200 dark:data-highlighted:before:bg-blue-800",
|
|
2193
|
+
"data-[state=checked]:text-base-900 dark:data-[state=checked]:text-base-200 data-[state=checked]:before:bg-blue-200 dark:data-[state=checked]:before:bg-blue-800"
|
|
2194
|
+
].join(" "),
|
|
2195
|
+
itemLabel: "flex flex-row flex-nowrap items-center justify-start gap-2",
|
|
2196
|
+
itemLeadingIcon: [
|
|
2197
|
+
"size-5 rounded-full",
|
|
2198
|
+
"text-white dark:text-base-150 bg-blue-500 dark:bg-blue-600",
|
|
2199
|
+
"group-data-highlighted:text-white dark:group-data-highlighted:text-base-150 group-data-highlighted:bg-blue-500 dark:group-data-highlighted:bg-blue-600",
|
|
2200
|
+
"group-data-[state=checked]:text-white dark:group-data-[state=checked]:text-base-150 group-data-[state=checked]:bg-blue-500 dark:group-data-[state=checked]:bg-blue-600"
|
|
2201
|
+
].join(" ")
|
|
2202
|
+
}
|
|
2203
|
+
},
|
|
2204
|
+
multiple: {
|
|
2205
|
+
true: {
|
|
2206
|
+
root: "flex-wrap",
|
|
2207
|
+
base: [
|
|
2208
|
+
"py-1.5 ps-1.5 pe-[39px]"
|
|
2209
|
+
].join(" "),
|
|
2210
|
+
tagsInput: [
|
|
2211
|
+
"w-2/5 border-0 bg-transparent ps-1.5 pe-3 py-0",
|
|
2212
|
+
"placeholder:text-base-400 dark:placeholder:text-base-300",
|
|
2213
|
+
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-75",
|
|
2214
|
+
"focus:ring-0 focus-visible:ring-0"
|
|
2215
|
+
].join(" ")
|
|
2216
|
+
},
|
|
2217
|
+
false: {
|
|
2218
|
+
base: [
|
|
2219
|
+
"px-3",
|
|
2220
|
+
"placeholder:text-base-400 dark:placeholder:text-base-300",
|
|
2221
|
+
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
2222
|
+
].join(" ")
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
size: {
|
|
2226
|
+
xs: defuFn(
|
|
2227
|
+
defSize$1,
|
|
2228
|
+
{
|
|
2229
|
+
tagsItem: [
|
|
2230
|
+
"text-5xs",
|
|
2231
|
+
"h-[14px] gap-0.5"
|
|
2232
|
+
].join(" "),
|
|
2233
|
+
tagsItemDeleteIcon: "size-sm"
|
|
2234
|
+
}
|
|
2235
|
+
),
|
|
2236
|
+
sm: defuFn(
|
|
2237
|
+
defSize$1,
|
|
2238
|
+
{
|
|
2239
|
+
tagsItem: [
|
|
2240
|
+
"text-5xs",
|
|
2241
|
+
"h-[14px] gap-0.5"
|
|
2242
|
+
].join(" "),
|
|
2243
|
+
tagsItemDeleteIcon: "size-3"
|
|
2244
|
+
}
|
|
2245
|
+
),
|
|
2246
|
+
md: defuFn(
|
|
2247
|
+
defSize$1,
|
|
2248
|
+
{
|
|
2249
|
+
tagsItem: [
|
|
2250
|
+
"text-md",
|
|
2251
|
+
"h-[31px] gap-1"
|
|
2252
|
+
].join(" "),
|
|
2253
|
+
tagsItemDeleteIcon: "size-3.5"
|
|
2254
|
+
}
|
|
2255
|
+
),
|
|
2256
|
+
lg: defuFn(
|
|
2257
|
+
defSize$1,
|
|
2258
|
+
{
|
|
2259
|
+
tagsItem: [
|
|
2260
|
+
"text-md",
|
|
2261
|
+
"h-[31px] gap-1"
|
|
2262
|
+
].join(" "),
|
|
2263
|
+
tagsItemDeleteIcon: "size-3.5"
|
|
2264
|
+
}
|
|
2265
|
+
)
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2268
|
+
compoundVariants: [
|
|
2269
|
+
// region Color ////
|
|
2270
|
+
{
|
|
2271
|
+
color: "default",
|
|
2272
|
+
multiple: true,
|
|
2273
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-base-900 dark:has-focus-visible:ring-base-700"
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
color: "danger",
|
|
2277
|
+
multiple: true,
|
|
2278
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-red-500 dark:has-focus-visible:ring-red-600"
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
color: "success",
|
|
2282
|
+
multiple: true,
|
|
2283
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-green-500 dark:has-focus-visible:ring-green-600"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
color: "warning",
|
|
2287
|
+
multiple: true,
|
|
2288
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-orange-500 dark:has-focus-visible:ring-orange-600"
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
color: "primary",
|
|
2292
|
+
multiple: true,
|
|
2293
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-blue-500 dark:has-focus-visible:ring-blue-600"
|
|
2294
|
+
},
|
|
2295
|
+
{
|
|
2296
|
+
color: "secondary",
|
|
2297
|
+
multiple: true,
|
|
2298
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-cyan-500 dark:has-focus-visible:ring-cyan-600"
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
color: "collab",
|
|
2302
|
+
multiple: true,
|
|
2303
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-collab-500 dark:has-focus-visible:ring-collab-600"
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
color: "ai",
|
|
2307
|
+
multiple: true,
|
|
2308
|
+
class: "has-focus-visible:ring-1 has-focus-visible:ring-ai-500 dark:has-focus-visible:ring-ai-600"
|
|
2309
|
+
},
|
|
2310
|
+
// endregion ////
|
|
2311
|
+
// region Size ////
|
|
2312
|
+
{
|
|
2313
|
+
size: "xs",
|
|
2314
|
+
multiple: true,
|
|
2315
|
+
class: "min-h-xl2 h-auto"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
size: "sm",
|
|
2319
|
+
multiple: true,
|
|
2320
|
+
class: "min-h-8 h-auto"
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
size: "md",
|
|
2324
|
+
multiple: true,
|
|
2325
|
+
class: "min-h-10 h-auto"
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
size: "lg",
|
|
2329
|
+
multiple: true,
|
|
2330
|
+
class: "min-h-12 h-auto"
|
|
2331
|
+
}
|
|
2332
|
+
// endregion ////
|
|
2333
|
+
]
|
|
2334
|
+
}, input);
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2089
2337
|
const kbd = {
|
|
2090
2338
|
base: "inline-flex items-center justify-center px-1 rounded-2xs font-normal font-b24-system-mono",
|
|
2091
2339
|
variants: {
|
|
@@ -2707,6 +2955,7 @@ const select = () => {
|
|
|
2707
2955
|
slots: {
|
|
2708
2956
|
root: () => "relative inline-flex items-center w-full",
|
|
2709
2957
|
base: () => [
|
|
2958
|
+
"px-3",
|
|
2710
2959
|
"relative inline-flex items-center group",
|
|
2711
2960
|
"py-0 border-0 focus:outline-none",
|
|
2712
2961
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
@@ -2718,7 +2967,7 @@ const select = () => {
|
|
|
2718
2967
|
"dark:ring-base-800",
|
|
2719
2968
|
"text-base-master bg-white hover:text-base-900 focus:text-base-900 active:text-base-900",
|
|
2720
2969
|
"dark:text-base-150 dark:bg-transparent dark:hover:text-base-350 dark:focus:text-base-350 dark:active:text-base-350",
|
|
2721
|
-
"font-b24-primary font-regular text-sm leading-
|
|
2970
|
+
"font-b24-primary font-regular text-sm leading-tight",
|
|
2722
2971
|
"align-middle",
|
|
2723
2972
|
"text-ellipsis whitespace-nowrap"
|
|
2724
2973
|
].join(" "),
|
|
@@ -2726,7 +2975,9 @@ const select = () => {
|
|
|
2726
2975
|
placeholder: "truncate text-base-400 dark:text-base-300",
|
|
2727
2976
|
arrow: "fill-base-master/10 dark:fill-base-100/20",
|
|
2728
2977
|
content: [
|
|
2729
|
-
"
|
|
2978
|
+
"w-[var(--reka-popper-anchor-width)]",
|
|
2979
|
+
// 'max-h-60',
|
|
2980
|
+
// 'h-[var(--reka-popper-available-height)]',
|
|
2730
2981
|
"bg-white dark:bg-base-dark",
|
|
2731
2982
|
"shadow-md rounded-2xs ring ring-base-300 dark:ring-base-800",
|
|
2732
2983
|
"overflow-hidden",
|
|
@@ -2752,11 +3003,15 @@ const select = () => {
|
|
|
2752
3003
|
"before:absolute before:z-[-1] before:inset-px before:rounded-2xs",
|
|
2753
3004
|
"cursor-pointer",
|
|
2754
3005
|
"data-disabled:cursor-not-allowed data-disabled:opacity-75",
|
|
2755
|
-
"text-base-master dark:text-base-150
|
|
3006
|
+
"text-base-master dark:text-base-150",
|
|
3007
|
+
"data-highlighted:text-base-900 dark:data-highlighted:text-base-200 data-highlighted:before:bg-base-100/50 dark:data-highlighted:before:bg-base-900",
|
|
3008
|
+
"data-[state=checked]:text-base-900 dark:data-[state=checked]:text-base-200 data-[state=checked]:before:bg-base-100/50 dark:data-[state=checked]:before:bg-base-900",
|
|
2756
3009
|
"transition-colors before:transition-colors"
|
|
2757
3010
|
].join(" "),
|
|
2758
3011
|
itemLeadingIcon: [
|
|
2759
|
-
"shrink-0 text-base-500 dark:text-base-700
|
|
3012
|
+
"shrink-0 text-base-500 dark:text-base-700",
|
|
3013
|
+
"group-data-highlighted:text-base-master dark:group-data-highlighted:text-base-150",
|
|
3014
|
+
"group-data-[state=checked]:text-base-master dark:group-data-[state=checked]:text-base-150",
|
|
2760
3015
|
"transition-colors"
|
|
2761
3016
|
].join(" "),
|
|
2762
3017
|
itemLeadingAvatar: "shrink-0",
|
|
@@ -2781,6 +3036,34 @@ const select = () => {
|
|
|
2781
3036
|
);
|
|
2782
3037
|
};
|
|
2783
3038
|
|
|
3039
|
+
const selectMenu = () => {
|
|
3040
|
+
return defu({
|
|
3041
|
+
slots: {
|
|
3042
|
+
input: "border-b border-base-300 dark:dark:border-base-800"
|
|
3043
|
+
},
|
|
3044
|
+
variants: {
|
|
3045
|
+
addNew: {
|
|
3046
|
+
true: {
|
|
3047
|
+
group: "p-0 isolate -m-px",
|
|
3048
|
+
item: [
|
|
3049
|
+
"before:rounded-none",
|
|
3050
|
+
"text-base-master dark:text-base-150 before:bg-blue-200 dark:before:bg-blue-800",
|
|
3051
|
+
"data-highlighted:text-base-900 dark:data-highlighted:text-base-200 data-highlighted:before:bg-blue-200 dark:data-highlighted:before:bg-blue-800",
|
|
3052
|
+
"data-[state=checked]:text-base-900 dark:data-[state=checked]:text-base-200 data-[state=checked]:before:bg-blue-200 dark:data-[state=checked]:before:bg-blue-800"
|
|
3053
|
+
].join(" "),
|
|
3054
|
+
itemLabel: "flex flex-row flex-nowrap items-center justify-start gap-2",
|
|
3055
|
+
itemLeadingIcon: [
|
|
3056
|
+
"size-5 rounded-full",
|
|
3057
|
+
"text-white dark:text-base-150 bg-blue-500 dark:bg-blue-600",
|
|
3058
|
+
"group-data-highlighted:text-white dark:group-data-highlighted:text-base-150 group-data-highlighted:bg-blue-500 dark:group-data-highlighted:bg-blue-600",
|
|
3059
|
+
"group-data-[state=checked]:text-white dark:group-data-[state=checked]:text-base-150 group-data-[state=checked]:bg-blue-500 dark:group-data-[state=checked]:bg-blue-600"
|
|
3060
|
+
].join(" ")
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
}, select());
|
|
3065
|
+
};
|
|
3066
|
+
|
|
2784
3067
|
const separator = {
|
|
2785
3068
|
slots: {
|
|
2786
3069
|
root: "flex items-center align-center text-center",
|
|
@@ -3681,7 +3964,7 @@ const toast = {
|
|
|
3681
3964
|
"text-sm font-normal",
|
|
3682
3965
|
"text-white dark:text-base-150"
|
|
3683
3966
|
].join(" "),
|
|
3684
|
-
wrapper: "w-0 flex-1 flex flex-col
|
|
3967
|
+
wrapper: "w-0 flex-1 flex flex-col",
|
|
3685
3968
|
title: "font-medium",
|
|
3686
3969
|
description: "",
|
|
3687
3970
|
icon: "shrink-0 size-6",
|
|
@@ -3689,7 +3972,7 @@ const toast = {
|
|
|
3689
3972
|
avatarSize: "xl",
|
|
3690
3973
|
actions: "flex gap-1.5 shrink-0",
|
|
3691
3974
|
progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
3692
|
-
close: "p-0
|
|
3975
|
+
close: "p-0 text-base-350 dark:text-base-350 hover:text-base-400 dark:hover:text-base-400"
|
|
3693
3976
|
},
|
|
3694
3977
|
variants: {
|
|
3695
3978
|
color: {
|
|
@@ -3734,14 +4017,19 @@ const toast = {
|
|
|
3734
4017
|
progress: "bg-ai-500 dark:bg-ai-500"
|
|
3735
4018
|
}
|
|
3736
4019
|
},
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
root: "items-start",
|
|
3740
|
-
actions: "items-start mt-1"
|
|
3741
|
-
},
|
|
3742
|
-
false: {
|
|
4020
|
+
orientation: {
|
|
4021
|
+
horizontal: {
|
|
3743
4022
|
root: "items-center",
|
|
3744
4023
|
actions: "items-center"
|
|
4024
|
+
},
|
|
4025
|
+
vertical: {
|
|
4026
|
+
root: "items-start",
|
|
4027
|
+
actions: "items-start mt-1"
|
|
4028
|
+
}
|
|
4029
|
+
},
|
|
4030
|
+
title: {
|
|
4031
|
+
true: {
|
|
4032
|
+
description: "mt-1"
|
|
3745
4033
|
}
|
|
3746
4034
|
}
|
|
3747
4035
|
},
|
|
@@ -3860,12 +4148,14 @@ const theme = {
|
|
|
3860
4148
|
form: form,
|
|
3861
4149
|
formField: formField,
|
|
3862
4150
|
input: input,
|
|
4151
|
+
inputMenu: inputMenu,
|
|
3863
4152
|
kbd: kbd,
|
|
3864
4153
|
link: link,
|
|
3865
4154
|
progress: progress,
|
|
3866
4155
|
radioGroup: radioGroup,
|
|
3867
4156
|
range: range,
|
|
3868
4157
|
select: select,
|
|
4158
|
+
selectMenu: selectMenu,
|
|
3869
4159
|
separator: separator,
|
|
3870
4160
|
skeleton: skeleton,
|
|
3871
4161
|
switch: _switch,
|
|
@@ -3883,13 +4173,14 @@ const themeProse = {
|
|
|
3883
4173
|
const descriptionList = {
|
|
3884
4174
|
slots: {
|
|
3885
4175
|
root: "w-full shrink-0",
|
|
3886
|
-
// ????
|
|
3887
4176
|
legend: "font-semibold text-black dark:text-base-150",
|
|
3888
4177
|
text: "text-base-500 dark:text-base-400",
|
|
3889
4178
|
container: "grid grid-cols-1 sm:grid-cols-[min(50%,theme(spacing.80))_auto]",
|
|
3890
4179
|
labelWrapper: [
|
|
3891
|
-
"col-start-1 border-t
|
|
3892
|
-
"flex flex-nowrap flex-row items-center justify-start gap-1.5"
|
|
4180
|
+
"col-start-1 border-t first:border-none sm:border-t",
|
|
4181
|
+
"flex flex-nowrap flex-row items-center justify-start gap-1.5",
|
|
4182
|
+
"border-base-950/5 text-base-500 sm:border-base-950/5",
|
|
4183
|
+
"dark:border-white/5 dark:text-base-400 sm:dark:border-white/5"
|
|
3893
4184
|
].join(" "),
|
|
3894
4185
|
icon: "shrink-0 size-6 text-base-500 dark:text-base-400",
|
|
3895
4186
|
avatar: "shrink-0",
|
|
@@ -3925,14 +4216,19 @@ const descriptionList = {
|
|
|
3925
4216
|
footer: "mt-4 p-4"
|
|
3926
4217
|
}
|
|
3927
4218
|
},
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
descriptionWrapper: "",
|
|
3931
|
-
actions: "items-start mt-2.5"
|
|
3932
|
-
},
|
|
3933
|
-
false: {
|
|
4219
|
+
orientation: {
|
|
4220
|
+
horizontal: {
|
|
3934
4221
|
descriptionWrapper: "w-full flex flex-row items-center justify-between gap-4",
|
|
3935
4222
|
actions: "items-center"
|
|
4223
|
+
},
|
|
4224
|
+
vertical: {
|
|
4225
|
+
descriptionWrapper: "",
|
|
4226
|
+
actions: "items-start mt-2.5"
|
|
4227
|
+
}
|
|
4228
|
+
},
|
|
4229
|
+
title: {
|
|
4230
|
+
true: {
|
|
4231
|
+
description: "mt-1"
|
|
3936
4232
|
}
|
|
3937
4233
|
}
|
|
3938
4234
|
},
|
|
@@ -4044,7 +4340,7 @@ function getTemplates(options) {
|
|
|
4044
4340
|
templates.push({
|
|
4045
4341
|
filename: "types/b24ui.d.ts",
|
|
4046
4342
|
getContents: () => replaceBrackets(`import * as b24ui from '#build/b24ui'
|
|
4047
|
-
import type { DeepPartial } from '
|
|
4343
|
+
import type { DeepPartial } from '@bitrix24/b24ui-nuxt'
|
|
4048
4344
|
import type { defaultConfig } from 'tailwind-variants'
|
|
4049
4345
|
|
|
4050
4346
|
type AppConfigUI = {
|