@bitrix24/b24ui-nuxt 0.1.7 → 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.
Files changed (36) hide show
  1. package/.nuxt/b24ui/alert.ts +18 -8
  2. package/.nuxt/b24ui/badge.ts +1 -1
  3. package/.nuxt/b24ui/content/description-list.ts +17 -7
  4. package/.nuxt/b24ui/index.ts +1 -0
  5. package/.nuxt/b24ui/input-menu.ts +591 -0
  6. package/.nuxt/b24ui/input.ts +5 -5
  7. package/.nuxt/b24ui/select-menu.ts +6 -6
  8. package/.nuxt/b24ui/select.ts +6 -6
  9. package/.nuxt/b24ui/toast.ts +18 -8
  10. package/README.md +8 -8
  11. package/dist/meta.cjs +5409 -331
  12. package/dist/meta.d.cts +5409 -331
  13. package/dist/meta.d.mts +5409 -331
  14. package/dist/meta.d.ts +5409 -331
  15. package/dist/meta.mjs +5409 -331
  16. package/dist/module.cjs +1 -1
  17. package/dist/module.json +1 -1
  18. package/dist/module.mjs +1 -1
  19. package/dist/runtime/components/Alert.vue +13 -10
  20. package/dist/runtime/components/InputMenu.vue +507 -0
  21. package/dist/runtime/components/Toast.vue +26 -14
  22. package/dist/runtime/components/Toaster.vue +2 -2
  23. package/dist/runtime/components/content/DescriptionList.vue +9 -7
  24. package/dist/runtime/composables/useComponentIcons.d.ts +2 -2
  25. package/dist/runtime/composables/useToast.d.ts +5 -4
  26. package/dist/runtime/composables/useToast.js +2 -2
  27. package/dist/runtime/types/index.d.ts +1 -0
  28. package/dist/runtime/types/index.js +1 -0
  29. package/dist/runtime/types/utils.d.ts +5 -0
  30. package/dist/shared/{b24ui-nuxt.vQRZieQw.mjs → b24ui-nuxt.CrjojW8t.mjs} +292 -31
  31. package/dist/shared/{b24ui-nuxt.ZUYaG6CJ.cjs → b24ui-nuxt.D5cXbZSx.cjs} +292 -31
  32. package/dist/unplugin.cjs +1 -1
  33. package/dist/unplugin.mjs +1 -1
  34. package/dist/vite.cjs +1 -1
  35. package/dist/vite.mjs +1 -1
  36. package/package.json +18 -1
@@ -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 gap-1 font-b24-primary font-normal",
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.5"
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
- multiline: {
153
- true: {
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 hover:rounded-full hover:bg-current/20 dark:hover:bg-current/35"
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: "px-3 h-xl2 gap-1",
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: "px-3 h-8 gap-1.5",
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: "px-3 h-10 gap-1.5",
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: "px-3 h-12 gap-2",
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",
@@ -2727,7 +2976,7 @@ const select = () => {
2727
2976
  arrow: "fill-base-master/10 dark:fill-base-100/20",
2728
2977
  content: [
2729
2978
  "w-[var(--reka-popper-anchor-width)]",
2730
- "max-h-60",
2979
+ // 'max-h-60',
2731
2980
  // 'h-[var(--reka-popper-available-height)]',
2732
2981
  "bg-white dark:bg-base-dark",
2733
2982
  "shadow-md rounded-2xs ring ring-base-300 dark:ring-base-800",
@@ -3715,7 +3964,7 @@ const toast = {
3715
3964
  "text-sm font-normal",
3716
3965
  "text-white dark:text-base-150"
3717
3966
  ].join(" "),
3718
- wrapper: "w-0 flex-1 flex flex-col gap-1",
3967
+ wrapper: "w-0 flex-1 flex flex-col",
3719
3968
  title: "font-medium",
3720
3969
  description: "",
3721
3970
  icon: "shrink-0 size-6",
@@ -3723,7 +3972,7 @@ const toast = {
3723
3972
  avatarSize: "xl",
3724
3973
  actions: "flex gap-1.5 shrink-0",
3725
3974
  progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
3726
- close: "p-0.5 text-base-350 dark:text-base-350 hover:text-base-400 dark:hover:text-base-400"
3975
+ close: "p-0 text-base-350 dark:text-base-350 hover:text-base-400 dark:hover:text-base-400"
3727
3976
  },
3728
3977
  variants: {
3729
3978
  color: {
@@ -3768,14 +4017,19 @@ const toast = {
3768
4017
  progress: "bg-ai-500 dark:bg-ai-500"
3769
4018
  }
3770
4019
  },
3771
- multiline: {
3772
- true: {
3773
- root: "items-start",
3774
- actions: "items-start mt-1"
3775
- },
3776
- false: {
4020
+ orientation: {
4021
+ horizontal: {
3777
4022
  root: "items-center",
3778
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"
3779
4033
  }
3780
4034
  }
3781
4035
  },
@@ -3894,6 +4148,7 @@ const theme = {
3894
4148
  form: form,
3895
4149
  formField: formField,
3896
4150
  input: input,
4151
+ inputMenu: inputMenu,
3897
4152
  kbd: kbd,
3898
4153
  link: link,
3899
4154
  progress: progress,
@@ -3918,13 +4173,14 @@ const themeProse = {
3918
4173
  const descriptionList = {
3919
4174
  slots: {
3920
4175
  root: "w-full shrink-0",
3921
- // ????
3922
4176
  legend: "font-semibold text-black dark:text-base-150",
3923
4177
  text: "text-base-500 dark:text-base-400",
3924
4178
  container: "grid grid-cols-1 sm:grid-cols-[min(50%,theme(spacing.80))_auto]",
3925
4179
  labelWrapper: [
3926
- "col-start-1 border-t border-base-950/5 text-base-500 first:border-none sm:border-t sm:border-base-950/5 dark:border-white/5 dark:text-base-400 sm:dark:border-white/5",
3927
- "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"
3928
4184
  ].join(" "),
3929
4185
  icon: "shrink-0 size-6 text-base-500 dark:text-base-400",
3930
4186
  avatar: "shrink-0",
@@ -3960,14 +4216,19 @@ const descriptionList = {
3960
4216
  footer: "mt-4 p-4"
3961
4217
  }
3962
4218
  },
3963
- multiline: {
3964
- true: {
3965
- descriptionWrapper: "",
3966
- actions: "items-start mt-2.5"
3967
- },
3968
- false: {
4219
+ orientation: {
4220
+ horizontal: {
3969
4221
  descriptionWrapper: "w-full flex flex-row items-center justify-between gap-4",
3970
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"
3971
4232
  }
3972
4233
  }
3973
4234
  },