@bitrix24/b24ui-nuxt 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/.nuxt/b24ui/advice.ts +10 -2
  2. package/.nuxt/b24ui/alert.ts +10 -2
  3. package/.nuxt/b24ui/avatar-group.ts +10 -2
  4. package/.nuxt/b24ui/avatar.ts +10 -2
  5. package/.nuxt/b24ui/badge.ts +10 -2
  6. package/.nuxt/b24ui/button-group.ts +10 -2
  7. package/.nuxt/b24ui/button.ts +16 -6
  8. package/.nuxt/b24ui/calendar.ts +10 -2
  9. package/.nuxt/b24ui/checkbox.ts +10 -2
  10. package/.nuxt/b24ui/chip.ts +10 -2
  11. package/.nuxt/b24ui/collapsible.ts +10 -2
  12. package/.nuxt/b24ui/container.ts +10 -2
  13. package/.nuxt/b24ui/countdown.ts +10 -2
  14. package/.nuxt/b24ui/description-list.ts +10 -2
  15. package/.nuxt/b24ui/dropdown-menu.ts +10 -2
  16. package/.nuxt/b24ui/form-field.ts +10 -2
  17. package/.nuxt/b24ui/form.ts +10 -2
  18. package/.nuxt/b24ui/input-menu.ts +10 -2
  19. package/.nuxt/b24ui/input-number.ts +10 -2
  20. package/.nuxt/b24ui/input.ts +10 -2
  21. package/.nuxt/b24ui/kbd.ts +10 -2
  22. package/.nuxt/b24ui/link.ts +10 -2
  23. package/.nuxt/b24ui/modal.ts +10 -2
  24. package/.nuxt/b24ui/navbar-divider.ts +10 -2
  25. package/.nuxt/b24ui/navbar-section.ts +10 -2
  26. package/.nuxt/b24ui/navbar-spacer.ts +10 -2
  27. package/.nuxt/b24ui/navbar.ts +10 -2
  28. package/.nuxt/b24ui/navigation-menu.ts +10 -2
  29. package/.nuxt/b24ui/popover.ts +10 -2
  30. package/.nuxt/b24ui/progress.ts +10 -2
  31. package/.nuxt/b24ui/radio-group.ts +10 -2
  32. package/.nuxt/b24ui/range.ts +10 -2
  33. package/.nuxt/b24ui/select-menu.ts +10 -2
  34. package/.nuxt/b24ui/select.ts +10 -2
  35. package/.nuxt/b24ui/separator.ts +10 -2
  36. package/.nuxt/b24ui/sidebar-body.ts +10 -2
  37. package/.nuxt/b24ui/sidebar-footer.ts +10 -2
  38. package/.nuxt/b24ui/sidebar-header.ts +10 -2
  39. package/.nuxt/b24ui/sidebar-heading.ts +10 -2
  40. package/.nuxt/b24ui/sidebar-layout.ts +10 -2
  41. package/.nuxt/b24ui/sidebar-section.ts +10 -2
  42. package/.nuxt/b24ui/sidebar-spacer.ts +10 -2
  43. package/.nuxt/b24ui/sidebar.ts +10 -2
  44. package/.nuxt/b24ui/skeleton.ts +10 -2
  45. package/.nuxt/b24ui/slideover.ts +10 -2
  46. package/.nuxt/b24ui/stacked-layout.ts +10 -2
  47. package/.nuxt/b24ui/switch.ts +10 -2
  48. package/.nuxt/b24ui/tabs.ts +10 -2
  49. package/.nuxt/b24ui/textarea.ts +10 -2
  50. package/.nuxt/b24ui/toast.ts +10 -2
  51. package/.nuxt/b24ui/toaster.ts +10 -2
  52. package/.nuxt/b24ui/tooltip.ts +10 -2
  53. package/cli/templates.mjs +19 -15
  54. package/dist/meta.d.mts +1388 -3373
  55. package/dist/meta.mjs +1388 -3373
  56. package/dist/module.json +1 -1
  57. package/dist/module.mjs +2 -2
  58. package/dist/runtime/components/Advice.vue +5 -6
  59. package/dist/runtime/components/Advice.vue.d.ts +7 -121
  60. package/dist/runtime/components/Alert.vue +5 -6
  61. package/dist/runtime/components/Alert.vue.d.ts +12 -379
  62. package/dist/runtime/components/Avatar.vue +5 -6
  63. package/dist/runtime/components/Avatar.vue.d.ts +6 -225
  64. package/dist/runtime/components/AvatarGroup.vue +5 -6
  65. package/dist/runtime/components/AvatarGroup.vue.d.ts +6 -170
  66. package/dist/runtime/components/Badge.vue +5 -6
  67. package/dist/runtime/components/Badge.vue.d.ts +8 -447
  68. package/dist/runtime/components/Button.vue +16 -14
  69. package/dist/runtime/components/Button.vue.d.ts +10 -535
  70. package/dist/runtime/components/ButtonGroup.vue +11 -6
  71. package/dist/runtime/components/ButtonGroup.vue.d.ts +8 -61
  72. package/dist/runtime/components/Calendar.vue +4 -5
  73. package/dist/runtime/components/Calendar.vue.d.ts +7 -337
  74. package/dist/runtime/components/Checkbox.vue +5 -6
  75. package/dist/runtime/components/Checkbox.vue.d.ts +7 -306
  76. package/dist/runtime/components/Chip.vue +5 -6
  77. package/dist/runtime/components/Chip.vue.d.ts +8 -202
  78. package/dist/runtime/components/Collapsible.vue +6 -6
  79. package/dist/runtime/components/Collapsible.vue.d.ts +5 -73
  80. package/dist/runtime/components/Container.vue +6 -5
  81. package/dist/runtime/components/Countdown.vue +6 -7
  82. package/dist/runtime/components/Countdown.vue.d.ts +7 -241
  83. package/dist/runtime/components/DescriptionList.vue +5 -6
  84. package/dist/runtime/components/DescriptionList.vue.d.ts +8 -278
  85. package/dist/runtime/components/DropdownMenu.vue +4 -5
  86. package/dist/runtime/components/DropdownMenu.vue.d.ts +9 -409
  87. package/dist/runtime/components/DropdownMenuContent.vue +1 -3
  88. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +9 -186
  89. package/dist/runtime/components/Form.vue +6 -5
  90. package/dist/runtime/components/FormField.vue +5 -6
  91. package/dist/runtime/components/FormField.vue.d.ts +6 -215
  92. package/dist/runtime/components/Input.vue +4 -5
  93. package/dist/runtime/components/Input.vue.d.ts +8 -628
  94. package/dist/runtime/components/InputMenu.vue +4 -5
  95. package/dist/runtime/components/InputMenu.vue.d.ts +19 -1185
  96. package/dist/runtime/components/InputNumber.vue +4 -5
  97. package/dist/runtime/components/InputNumber.vue.d.ts +10 -430
  98. package/dist/runtime/components/Kbd.vue +6 -5
  99. package/dist/runtime/components/Kbd.vue.d.ts +6 -60
  100. package/dist/runtime/components/Link.vue +12 -11
  101. package/dist/runtime/components/Modal.vue +5 -6
  102. package/dist/runtime/components/Modal.vue.d.ts +13 -216
  103. package/dist/runtime/components/Navbar.vue +6 -6
  104. package/dist/runtime/components/Navbar.vue.d.ts +5 -60
  105. package/dist/runtime/components/NavbarDivider.vue +6 -6
  106. package/dist/runtime/components/NavbarDivider.vue.d.ts +5 -60
  107. package/dist/runtime/components/NavbarSection.vue +6 -6
  108. package/dist/runtime/components/NavbarSection.vue.d.ts +5 -60
  109. package/dist/runtime/components/NavbarSpacer.vue +6 -6
  110. package/dist/runtime/components/NavbarSpacer.vue.d.ts +5 -60
  111. package/dist/runtime/components/NavigationMenu.vue +4 -5
  112. package/dist/runtime/components/NavigationMenu.vue.d.ts +11 -676
  113. package/dist/runtime/components/Popover.vue +5 -6
  114. package/dist/runtime/components/Popover.vue.d.ts +7 -75
  115. package/dist/runtime/components/Progress.vue +5 -6
  116. package/dist/runtime/components/Progress.vue.d.ts +11 -500
  117. package/dist/runtime/components/RadioGroup.vue +5 -6
  118. package/dist/runtime/components/RadioGroup.vue.d.ts +9 -644
  119. package/dist/runtime/components/Range.vue +5 -6
  120. package/dist/runtime/components/Range.vue.d.ts +7 -351
  121. package/dist/runtime/components/Select.vue +4 -5
  122. package/dist/runtime/components/Select.vue.d.ts +15 -1046
  123. package/dist/runtime/components/SelectMenu.vue +4 -5
  124. package/dist/runtime/components/SelectMenu.vue.d.ts +17 -1098
  125. package/dist/runtime/components/Separator.vue +5 -6
  126. package/dist/runtime/components/Separator.vue.d.ts +9 -332
  127. package/dist/runtime/components/Sidebar.vue +6 -6
  128. package/dist/runtime/components/Sidebar.vue.d.ts +5 -60
  129. package/dist/runtime/components/SidebarBody.vue +5 -6
  130. package/dist/runtime/components/SidebarBody.vue.d.ts +5 -42
  131. package/dist/runtime/components/SidebarFooter.vue +6 -6
  132. package/dist/runtime/components/SidebarFooter.vue.d.ts +5 -60
  133. package/dist/runtime/components/SidebarHeader.vue +6 -6
  134. package/dist/runtime/components/SidebarHeader.vue.d.ts +5 -60
  135. package/dist/runtime/components/SidebarHeading.vue +6 -6
  136. package/dist/runtime/components/SidebarHeading.vue.d.ts +5 -60
  137. package/dist/runtime/components/SidebarLayout.vue +6 -7
  138. package/dist/runtime/components/SidebarLayout.vue.d.ts +5 -162
  139. package/dist/runtime/components/SidebarSection.vue +6 -6
  140. package/dist/runtime/components/SidebarSection.vue.d.ts +5 -60
  141. package/dist/runtime/components/SidebarSpacer.vue +6 -6
  142. package/dist/runtime/components/SidebarSpacer.vue.d.ts +5 -60
  143. package/dist/runtime/components/Skeleton.vue +6 -5
  144. package/dist/runtime/components/Slideover.vue +5 -6
  145. package/dist/runtime/components/Slideover.vue.d.ts +15 -248
  146. package/dist/runtime/components/StackedLayout.vue +6 -7
  147. package/dist/runtime/components/StackedLayout.vue.d.ts +5 -132
  148. package/dist/runtime/components/Switch.vue +4 -5
  149. package/dist/runtime/components/Switch.vue.d.ts +7 -517
  150. package/dist/runtime/components/Tabs.vue +8 -5
  151. package/dist/runtime/components/Tabs.vue.d.ts +18 -367
  152. package/dist/runtime/components/Textarea.vue +4 -5
  153. package/dist/runtime/components/Textarea.vue.d.ts +7 -467
  154. package/dist/runtime/components/Toast.vue +5 -6
  155. package/dist/runtime/components/Toast.vue.d.ts +11 -354
  156. package/dist/runtime/components/Toaster.vue +6 -7
  157. package/dist/runtime/components/Toaster.vue.d.ts +7 -156
  158. package/dist/runtime/components/Tooltip.vue +5 -6
  159. package/dist/runtime/components/Tooltip.vue.d.ts +5 -126
  160. package/dist/runtime/components/content/TableWrapper.vue +5 -6
  161. package/dist/runtime/components/content/TableWrapper.vue.d.ts +6 -160
  162. package/dist/runtime/prose/A.vue +10 -9
  163. package/dist/runtime/prose/A.vue.d.ts +8 -65
  164. package/dist/runtime/prose/Blockquote.vue +8 -9
  165. package/dist/runtime/prose/Blockquote.vue.d.ts +8 -65
  166. package/dist/runtime/prose/Code.vue +6 -6
  167. package/dist/runtime/prose/Code.vue.d.ts +9 -75
  168. package/dist/runtime/prose/Em.vue +10 -9
  169. package/dist/runtime/prose/Em.vue.d.ts +8 -65
  170. package/dist/runtime/prose/H1.vue +8 -9
  171. package/dist/runtime/prose/H1.vue.d.ts +8 -78
  172. package/dist/runtime/prose/H2.vue +8 -9
  173. package/dist/runtime/prose/H2.vue.d.ts +8 -104
  174. package/dist/runtime/prose/H3.vue +8 -9
  175. package/dist/runtime/prose/H3.vue.d.ts +8 -104
  176. package/dist/runtime/prose/H4.vue +8 -9
  177. package/dist/runtime/prose/H4.vue.d.ts +8 -104
  178. package/dist/runtime/prose/H5.vue +8 -9
  179. package/dist/runtime/prose/H5.vue.d.ts +8 -104
  180. package/dist/runtime/prose/H6.vue +8 -9
  181. package/dist/runtime/prose/H6.vue.d.ts +8 -104
  182. package/dist/runtime/prose/Hr.vue +7 -9
  183. package/dist/runtime/prose/Hr.vue.d.ts +7 -62
  184. package/dist/runtime/prose/Img.vue +7 -9
  185. package/dist/runtime/prose/Img.vue.d.ts +7 -65
  186. package/dist/runtime/prose/Li.vue +8 -9
  187. package/dist/runtime/prose/Li.vue.d.ts +8 -65
  188. package/dist/runtime/prose/Ol.vue +8 -9
  189. package/dist/runtime/prose/Ol.vue.d.ts +8 -65
  190. package/dist/runtime/prose/P.vue +8 -9
  191. package/dist/runtime/prose/P.vue.d.ts +8 -65
  192. package/dist/runtime/prose/Pre.vue +7 -6
  193. package/dist/runtime/prose/Pre.vue.d.ts +10 -80
  194. package/dist/runtime/prose/Strong.vue +8 -9
  195. package/dist/runtime/prose/Strong.vue.d.ts +8 -65
  196. package/dist/runtime/prose/Table.vue +8 -9
  197. package/dist/runtime/prose/Table.vue.d.ts +10 -80
  198. package/dist/runtime/prose/Tbody.vue +8 -9
  199. package/dist/runtime/prose/Tbody.vue.d.ts +8 -65
  200. package/dist/runtime/prose/Td.vue +8 -9
  201. package/dist/runtime/prose/Td.vue.d.ts +8 -65
  202. package/dist/runtime/prose/Th.vue +8 -9
  203. package/dist/runtime/prose/Th.vue.d.ts +8 -65
  204. package/dist/runtime/prose/Thead.vue +8 -9
  205. package/dist/runtime/prose/Thead.vue.d.ts +8 -65
  206. package/dist/runtime/prose/Tr.vue +8 -9
  207. package/dist/runtime/prose/Tr.vue.d.ts +8 -65
  208. package/dist/runtime/prose/Ul.vue +8 -9
  209. package/dist/runtime/prose/Ul.vue.d.ts +8 -65
  210. package/dist/runtime/types/form.d.ts +1 -0
  211. package/dist/runtime/types/utils.d.ts +42 -3
  212. package/dist/runtime/utils/tv.js +2 -2
  213. package/dist/runtime/vue/components/Link.vue +12 -11
  214. package/dist/shared/{b24ui-nuxt.BA6Y2FnC.mjs → b24ui-nuxt.wBs9vEU5.mjs} +27 -2
  215. package/dist/unplugin.mjs +1 -1
  216. package/dist/vite.mjs +1 -1
  217. package/package.json +6 -6
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitrix24/b24ui-nuxt",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
5
5
  "configKey": "b24ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.BA6Y2FnC.mjs';
3
+ import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.wBs9vEU5.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
6
 
7
7
  const name = "@bitrix24/b24ui-nuxt";
8
- const version = "0.6.0";
8
+ const version = "0.6.1";
9
9
 
10
10
  const module = defineNuxtModule({
11
11
  meta: {
@@ -1,15 +1,13 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/advice";
4
- import { tv } from "../utils/tv";
5
- const appConfigAdvice = _appConfig;
6
- const advice = tv({ extend: tv(theme), ...appConfigAdvice.b24ui?.advice || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
10
6
  import { computed } from "vue";
11
7
  import { Primitive } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
12
9
  import { useComponentIcons } from "../composables/useComponentIcons";
10
+ import { tv } from "../utils/tv";
13
11
  import B24Avatar from "./Avatar.vue";
14
12
  import PersonIcon from "@bitrix24/b24icons-vue/main/PersonIcon";
15
13
  defineOptions({ inheritAttrs: false });
@@ -18,15 +16,16 @@ const props = defineProps({
18
16
  description: { type: String, required: false },
19
17
  angle: { type: null, required: false, default: "bottom" },
20
18
  class: { type: null, required: false },
21
- b24ui: { type: Object, required: false },
19
+ b24ui: { type: null, required: false },
22
20
  icon: { type: [Function, Object], required: false },
23
21
  avatar: { type: Object, required: false }
24
22
  });
25
23
  const slots = defineSlots();
24
+ const appConfig = useAppConfig();
26
25
  const { isLeading, leadingIconName } = useComponentIcons(
27
26
  computed(() => ({ ...props, loading: false }))
28
27
  );
29
- const b24ui = computed(() => advice({
28
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.advice || {} })({
30
29
  angle: props.angle
31
30
  }));
32
31
  </script>
@@ -1,122 +1,8 @@
1
- import type { VariantProps } from 'tailwind-variants';
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/b24ui/advice';
2
3
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
3
- declare const advice: import("tailwind-variants").TVReturnType<{
4
- angle: {
5
- top: {
6
- root: string;
7
- leading: string;
8
- descriptionAngle: string;
9
- };
10
- bottom: {
11
- root: string;
12
- descriptionAngle: string;
13
- };
14
- };
15
- }, {
16
- root: string;
17
- descriptionWrapper: string;
18
- descriptionBorder: string;
19
- descriptionBg: string;
20
- descriptionAngle: string;
21
- description: string;
22
- leading: string;
23
- leadingIcon: string;
24
- leadingAvatar: string;
25
- leadingAvatarSize: string;
26
- }, undefined, {
27
- angle: {
28
- top: {
29
- root: string;
30
- leading: string;
31
- descriptionAngle: string;
32
- };
33
- bottom: {
34
- root: string;
35
- descriptionAngle: string;
36
- };
37
- };
38
- }, {
39
- root: string;
40
- descriptionWrapper: string;
41
- descriptionBorder: string;
42
- descriptionBg: string;
43
- descriptionAngle: string;
44
- description: string;
45
- leading: string;
46
- leadingIcon: string;
47
- leadingAvatar: string;
48
- leadingAvatarSize: string;
49
- }, import("tailwind-variants").TVReturnType<{
50
- angle: {
51
- top: {
52
- root: string;
53
- leading: string;
54
- descriptionAngle: string;
55
- };
56
- bottom: {
57
- root: string;
58
- descriptionAngle: string;
59
- };
60
- };
61
- }, {
62
- root: string;
63
- descriptionWrapper: string;
64
- descriptionBorder: string;
65
- descriptionBg: string;
66
- descriptionAngle: string;
67
- description: string;
68
- leading: string;
69
- leadingIcon: string;
70
- leadingAvatar: string;
71
- leadingAvatarSize: string;
72
- }, undefined, {
73
- angle: {
74
- top: {
75
- root: string;
76
- leading: string;
77
- descriptionAngle: string;
78
- };
79
- bottom: {
80
- root: string;
81
- descriptionAngle: string;
82
- };
83
- };
84
- }, {
85
- root: string;
86
- descriptionWrapper: string;
87
- descriptionBorder: string;
88
- descriptionBg: string;
89
- descriptionAngle: string;
90
- description: string;
91
- leading: string;
92
- leadingIcon: string;
93
- leadingAvatar: string;
94
- leadingAvatarSize: string;
95
- }, import("tailwind-variants").TVReturnType<{
96
- angle: {
97
- top: {
98
- root: string;
99
- leading: string;
100
- descriptionAngle: string;
101
- };
102
- bottom: {
103
- root: string;
104
- descriptionAngle: string;
105
- };
106
- };
107
- }, {
108
- root: string;
109
- descriptionWrapper: string;
110
- descriptionBorder: string;
111
- descriptionBg: string;
112
- descriptionAngle: string;
113
- description: string;
114
- leading: string;
115
- leadingIcon: string;
116
- leadingAvatar: string;
117
- leadingAvatarSize: string;
118
- }, undefined, unknown, unknown, undefined>>>;
119
- type AdviceVariants = VariantProps<typeof advice>;
4
+ import type { ComponentConfig } from '../types/utils';
5
+ type Advice = ComponentConfig<typeof theme, AppConfig, 'advice'>;
120
6
  export interface AdviceProps extends Omit<UseComponentIconsProps, 'loading' | 'trailing' | 'trailingIcon'> {
121
7
  /**
122
8
  * The element or component this component should render as.
@@ -127,9 +13,9 @@ export interface AdviceProps extends Omit<UseComponentIconsProps, 'loading' | 't
127
13
  /**
128
14
  * @defaultValue 'bottom'
129
15
  */
130
- angle?: AdviceVariants['angle'];
16
+ angle?: Advice['variants']['angle'];
131
17
  class?: any;
132
- b24ui?: Partial<typeof advice.slots>;
18
+ b24ui?: Advice['slots'];
133
19
  }
134
20
  export interface AdviceSlots {
135
21
  leading(props?: {}): any;
@@ -143,7 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
143
29
  angle: string;
144
30
  }>>> & Readonly<{}>, {
145
31
  as: any;
146
- angle: "top" | "bottom";
32
+ angle: Advice["variants"]["angle"];
147
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<AdviceSlots> & AdviceSlots>;
148
34
  export default _default;
149
35
  type __VLS_WithDefaults<P, D> = {
@@ -1,15 +1,13 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/alert";
4
- import { tv } from "../utils/tv";
5
- const appConfigAlert = _appConfig;
6
- const alert = tv({ extend: tv(theme), ...appConfigAlert.b24ui?.alert || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
10
6
  import { computed } from "vue";
11
7
  import { Primitive } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
12
9
  import { useLocale } from "../composables/useLocale";
10
+ import { tv } from "../utils/tv";
13
11
  import icons from "../dictionary/icons";
14
12
  import B24Avatar from "./Avatar.vue";
15
13
  import B24Button from "./Button.vue";
@@ -26,12 +24,13 @@ const props = defineProps({
26
24
  close: { type: [Boolean, Object], required: false },
27
25
  closeIcon: { type: [Function, Object], required: false },
28
26
  class: { type: null, required: false },
29
- b24ui: { type: Object, required: false }
27
+ b24ui: { type: null, required: false }
30
28
  });
31
29
  const emits = defineEmits(["update:open"]);
32
30
  const slots = defineSlots();
33
31
  const { t } = useLocale();
34
- const b24ui = computed(() => alert({
32
+ const appConfig = useAppConfig();
33
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.alert || {} })({
35
34
  color: props.color,
36
35
  size: props.size,
37
36
  orientation: props.orientation,
@@ -1,377 +1,8 @@
1
- import type { VariantProps } from 'tailwind-variants';
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/b24ui/alert';
2
3
  import type { AvatarProps, ButtonProps, IconComponent } from '../types';
3
- declare const alert: import("tailwind-variants").TVReturnType<{
4
- color: {
5
- default: {
6
- root: string[];
7
- close: string;
8
- };
9
- danger: {
10
- root: string[];
11
- close: string;
12
- };
13
- success: {
14
- root: string[];
15
- close: string;
16
- };
17
- warning: {
18
- root: string[];
19
- close: string;
20
- };
21
- primary: {
22
- root: string[];
23
- close: string;
24
- };
25
- secondary: {
26
- root: string[];
27
- close: string;
28
- };
29
- collab: {
30
- root: string[];
31
- close: string;
32
- };
33
- ai: {
34
- root: string[];
35
- close: string;
36
- };
37
- };
38
- size: {
39
- sm: {
40
- root: string;
41
- title: string;
42
- description: string;
43
- avatarSize: string;
44
- };
45
- md: {
46
- root: string;
47
- title: string;
48
- description: string;
49
- avatarSize: string;
50
- };
51
- };
52
- orientation: {
53
- horizontal: {
54
- root: string;
55
- actions: string;
56
- };
57
- vertical: {
58
- root: string;
59
- actions: string;
60
- };
61
- };
62
- title: {
63
- true: {
64
- description: string;
65
- };
66
- };
67
- }, {
68
- root: string;
69
- wrapper: string;
70
- title: string;
71
- description: string;
72
- icon: string;
73
- avatar: string;
74
- avatarSize: string;
75
- actions: string;
76
- close: string;
77
- }, undefined, {
78
- color: {
79
- default: {
80
- root: string[];
81
- close: string;
82
- };
83
- danger: {
84
- root: string[];
85
- close: string;
86
- };
87
- success: {
88
- root: string[];
89
- close: string;
90
- };
91
- warning: {
92
- root: string[];
93
- close: string;
94
- };
95
- primary: {
96
- root: string[];
97
- close: string;
98
- };
99
- secondary: {
100
- root: string[];
101
- close: string;
102
- };
103
- collab: {
104
- root: string[];
105
- close: string;
106
- };
107
- ai: {
108
- root: string[];
109
- close: string;
110
- };
111
- };
112
- size: {
113
- sm: {
114
- root: string;
115
- title: string;
116
- description: string;
117
- avatarSize: string;
118
- };
119
- md: {
120
- root: string;
121
- title: string;
122
- description: string;
123
- avatarSize: string;
124
- };
125
- };
126
- orientation: {
127
- horizontal: {
128
- root: string;
129
- actions: string;
130
- };
131
- vertical: {
132
- root: string;
133
- actions: string;
134
- };
135
- };
136
- title: {
137
- true: {
138
- description: string;
139
- };
140
- };
141
- }, {
142
- root: string;
143
- wrapper: string;
144
- title: string;
145
- description: string;
146
- icon: string;
147
- avatar: string;
148
- avatarSize: string;
149
- actions: string;
150
- close: string;
151
- }, import("tailwind-variants").TVReturnType<{
152
- color: {
153
- default: {
154
- root: string[];
155
- close: string;
156
- };
157
- danger: {
158
- root: string[];
159
- close: string;
160
- };
161
- success: {
162
- root: string[];
163
- close: string;
164
- };
165
- warning: {
166
- root: string[];
167
- close: string;
168
- };
169
- primary: {
170
- root: string[];
171
- close: string;
172
- };
173
- secondary: {
174
- root: string[];
175
- close: string;
176
- };
177
- collab: {
178
- root: string[];
179
- close: string;
180
- };
181
- ai: {
182
- root: string[];
183
- close: string;
184
- };
185
- };
186
- size: {
187
- sm: {
188
- root: string;
189
- title: string;
190
- description: string;
191
- avatarSize: string;
192
- };
193
- md: {
194
- root: string;
195
- title: string;
196
- description: string;
197
- avatarSize: string;
198
- };
199
- };
200
- orientation: {
201
- horizontal: {
202
- root: string;
203
- actions: string;
204
- };
205
- vertical: {
206
- root: string;
207
- actions: string;
208
- };
209
- };
210
- title: {
211
- true: {
212
- description: string;
213
- };
214
- };
215
- }, {
216
- root: string;
217
- wrapper: string;
218
- title: string;
219
- description: string;
220
- icon: string;
221
- avatar: string;
222
- avatarSize: string;
223
- actions: string;
224
- close: string;
225
- }, undefined, {
226
- color: {
227
- default: {
228
- root: string[];
229
- close: string;
230
- };
231
- danger: {
232
- root: string[];
233
- close: string;
234
- };
235
- success: {
236
- root: string[];
237
- close: string;
238
- };
239
- warning: {
240
- root: string[];
241
- close: string;
242
- };
243
- primary: {
244
- root: string[];
245
- close: string;
246
- };
247
- secondary: {
248
- root: string[];
249
- close: string;
250
- };
251
- collab: {
252
- root: string[];
253
- close: string;
254
- };
255
- ai: {
256
- root: string[];
257
- close: string;
258
- };
259
- };
260
- size: {
261
- sm: {
262
- root: string;
263
- title: string;
264
- description: string;
265
- avatarSize: string;
266
- };
267
- md: {
268
- root: string;
269
- title: string;
270
- description: string;
271
- avatarSize: string;
272
- };
273
- };
274
- orientation: {
275
- horizontal: {
276
- root: string;
277
- actions: string;
278
- };
279
- vertical: {
280
- root: string;
281
- actions: string;
282
- };
283
- };
284
- title: {
285
- true: {
286
- description: string;
287
- };
288
- };
289
- }, {
290
- root: string;
291
- wrapper: string;
292
- title: string;
293
- description: string;
294
- icon: string;
295
- avatar: string;
296
- avatarSize: string;
297
- actions: string;
298
- close: string;
299
- }, import("tailwind-variants").TVReturnType<{
300
- color: {
301
- default: {
302
- root: string[];
303
- close: string;
304
- };
305
- danger: {
306
- root: string[];
307
- close: string;
308
- };
309
- success: {
310
- root: string[];
311
- close: string;
312
- };
313
- warning: {
314
- root: string[];
315
- close: string;
316
- };
317
- primary: {
318
- root: string[];
319
- close: string;
320
- };
321
- secondary: {
322
- root: string[];
323
- close: string;
324
- };
325
- collab: {
326
- root: string[];
327
- close: string;
328
- };
329
- ai: {
330
- root: string[];
331
- close: string;
332
- };
333
- };
334
- size: {
335
- sm: {
336
- root: string;
337
- title: string;
338
- description: string;
339
- avatarSize: string;
340
- };
341
- md: {
342
- root: string;
343
- title: string;
344
- description: string;
345
- avatarSize: string;
346
- };
347
- };
348
- orientation: {
349
- horizontal: {
350
- root: string;
351
- actions: string;
352
- };
353
- vertical: {
354
- root: string;
355
- actions: string;
356
- };
357
- };
358
- title: {
359
- true: {
360
- description: string;
361
- };
362
- };
363
- }, {
364
- root: string;
365
- wrapper: string;
366
- title: string;
367
- description: string;
368
- icon: string;
369
- avatar: string;
370
- avatarSize: string;
371
- actions: string;
372
- close: string;
373
- }, undefined, unknown, unknown, undefined>>>;
374
- type AlertVariants = VariantProps<typeof alert>;
4
+ import type { ComponentConfig } from '../types/utils';
5
+ type Alert = ComponentConfig<typeof theme, AppConfig, 'alert'>;
375
6
  export interface AlertProps {
376
7
  /**
377
8
  * The element or component this component should render as.
@@ -389,16 +20,16 @@ export interface AlertProps {
389
20
  /**
390
21
  * @defaultValue 'default'
391
22
  */
392
- color?: AlertVariants['color'];
23
+ color?: Alert['variants']['color'];
393
24
  /**
394
25
  * The orientation between the content and the actions.
395
26
  * @defaultValue 'vertical'
396
27
  */
397
- orientation?: AlertVariants['orientation'];
28
+ orientation?: Alert['variants']['orientation'];
398
29
  /**
399
30
  * @defaultValue 'md'
400
31
  */
401
- size?: AlertVariants['size'];
32
+ size?: Alert['variants']['size'];
402
33
  /**
403
34
  * Display a list of actions:
404
35
  * - under the title and description when orientation is `vertical`
@@ -420,7 +51,7 @@ export interface AlertProps {
420
51
  */
421
52
  closeIcon?: IconComponent;
422
53
  class?: any;
423
- b24ui?: Partial<typeof alert.slots>;
54
+ b24ui?: Alert['slots'];
424
55
  }
425
56
  export interface AlertEmits {
426
57
  (e: 'update:open', value: boolean): void;
@@ -431,13 +62,15 @@ export interface AlertSlots {
431
62
  description(props?: {}): any;
432
63
  actions(props?: {}): any;
433
64
  close(props: {
434
- b24ui: ReturnType<typeof alert>;
65
+ b24ui: {
66
+ [K in keyof Required<Alert['slots']>]: (props?: Record<string, any>) => string;
67
+ };
435
68
  }): any;
436
69
  }
437
70
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AlertProps>, {
438
71
  orientation: string;
439
72
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
440
- orientation: "horizontal" | "vertical";
73
+ orientation: Alert["variants"]["orientation"];
441
74
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<AlertSlots> & AlertSlots>;
442
75
  export default _default;
443
76
  type __VLS_WithDefaults<P, D> = {
@@ -1,16 +1,14 @@
1
1
  <script>
2
- import _appConfig from "#build/app.config";
3
2
  import theme from "#build/b24ui/avatar";
4
- import { tv } from "../utils/tv";
5
- const appConfigAvatar = _appConfig;
6
- const avatar = tv({ extend: tv(theme), ...appConfigAvatar.b24ui?.avatar || {} });
7
3
  </script>
8
4
 
9
5
  <script setup>
10
6
  import { ref, computed, watch } from "vue";
11
7
  import { Primitive, Slot } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
12
9
  import ImageComponent from "#build/b24ui-image-component";
13
10
  import { useAvatarGroup } from "../composables/useAvatarGroup";
11
+ import { tv } from "../utils/tv";
14
12
  defineOptions({ inheritAttrs: false });
15
13
  const props = defineProps({
16
14
  as: { type: null, required: false, default: "span" },
@@ -21,13 +19,14 @@ const props = defineProps({
21
19
  size: { type: null, required: false },
22
20
  class: { type: null, required: false },
23
21
  style: { type: null, required: false },
24
- b24ui: { type: Object, required: false }
22
+ b24ui: { type: null, required: false }
25
23
  });
26
24
  const fallback = computed(
27
25
  () => props.text || (props.alt || "").replace(/[+\-*)(}\][{]/g, "").split(" ").map((word) => word.charAt(0)).join("").substring(0, 2)
28
26
  );
27
+ const appConfig = useAppConfig();
29
28
  const { size } = useAvatarGroup(props);
30
- const b24ui = computed(() => avatar({
29
+ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.avatar || {} })({
31
30
  size: size.value
32
31
  }));
33
32
  const sizePx = computed(() => ({