@bitrix24/b24ui-nuxt 0.7.2 → 1.0.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 (260) hide show
  1. package/.nuxt/b24ui/accordion.ts +3 -3
  2. package/.nuxt/b24ui/advice.ts +6 -5
  3. package/.nuxt/b24ui/alert.ts +102 -49
  4. package/.nuxt/b24ui/avatar-group.ts +10 -10
  5. package/.nuxt/b24ui/avatar.ts +18 -18
  6. package/.nuxt/b24ui/badge.ts +167 -176
  7. package/.nuxt/b24ui/button-group.ts +3 -1
  8. package/.nuxt/b24ui/button.ts +179 -170
  9. package/.nuxt/b24ui/calendar.ts +48 -28
  10. package/.nuxt/b24ui/checkbox.ts +82 -85
  11. package/.nuxt/b24ui/chip.ts +121 -32
  12. package/.nuxt/b24ui/container.ts +1 -1
  13. package/.nuxt/b24ui/content/table-wrapper.ts +11 -11
  14. package/.nuxt/b24ui/countdown.ts +11 -11
  15. package/.nuxt/b24ui/description-list.ts +6 -6
  16. package/.nuxt/b24ui/dropdown-menu.ts +111 -183
  17. package/.nuxt/b24ui/form-field.ts +19 -19
  18. package/.nuxt/b24ui/index.ts +0 -1
  19. package/.nuxt/b24ui/input-menu.ts +294 -357
  20. package/.nuxt/b24ui/input-number.ts +111 -259
  21. package/.nuxt/b24ui/input.ts +136 -259
  22. package/.nuxt/b24ui/kbd.ts +15 -13
  23. package/.nuxt/b24ui/link.ts +5 -5
  24. package/.nuxt/b24ui/modal.ts +14 -12
  25. package/.nuxt/b24ui/navbar-divider.ts +1 -1
  26. package/.nuxt/b24ui/navbar-section.ts +1 -1
  27. package/.nuxt/b24ui/navbar.ts +1 -1
  28. package/.nuxt/b24ui/navigation-menu.ts +70 -754
  29. package/.nuxt/b24ui/popover.ts +2 -2
  30. package/.nuxt/b24ui/progress.ts +58 -68
  31. package/.nuxt/b24ui/prose/a.ts +1 -1
  32. package/.nuxt/b24ui/prose/blockquote.ts +1 -1
  33. package/.nuxt/b24ui/prose/code.ts +45 -9
  34. package/.nuxt/b24ui/prose/h1.ts +21 -2
  35. package/.nuxt/b24ui/prose/h2.ts +21 -12
  36. package/.nuxt/b24ui/prose/h3.ts +21 -12
  37. package/.nuxt/b24ui/prose/h4.ts +21 -12
  38. package/.nuxt/b24ui/prose/h5.ts +21 -12
  39. package/.nuxt/b24ui/prose/h6.ts +21 -12
  40. package/.nuxt/b24ui/prose/hr.ts +1 -1
  41. package/.nuxt/b24ui/prose/ol.ts +1 -1
  42. package/.nuxt/b24ui/prose/p.ts +26 -1
  43. package/.nuxt/b24ui/prose/thead.ts +1 -1
  44. package/.nuxt/b24ui/prose/ul.ts +1 -1
  45. package/.nuxt/b24ui/radio-group.ts +115 -155
  46. package/.nuxt/b24ui/range.ts +38 -26
  47. package/.nuxt/b24ui/select-menu.ts +251 -306
  48. package/.nuxt/b24ui/select.ts +246 -301
  49. package/.nuxt/b24ui/separator.ts +40 -85
  50. package/.nuxt/b24ui/sidebar-header.ts +1 -1
  51. package/.nuxt/b24ui/sidebar-heading.ts +1 -1
  52. package/.nuxt/b24ui/sidebar-layout.ts +130 -19
  53. package/.nuxt/b24ui/sidebar-section.ts +1 -1
  54. package/.nuxt/b24ui/skeleton.ts +19 -1
  55. package/.nuxt/b24ui/slideover.ts +35 -34
  56. package/.nuxt/b24ui/switch.ts +59 -48
  57. package/.nuxt/b24ui/tabs.ts +26 -239
  58. package/.nuxt/b24ui/textarea.ts +50 -236
  59. package/.nuxt/b24ui/toast.ts +38 -30
  60. package/.nuxt/b24ui/toaster.ts +1 -1
  61. package/.nuxt/b24ui/tooltip.ts +5 -5
  62. package/cli/templates.mjs +2 -1
  63. package/dist/meta.d.mts +18759 -5002
  64. package/dist/meta.mjs +18759 -5002
  65. package/dist/module.d.mts +1 -0
  66. package/dist/module.json +2 -2
  67. package/dist/module.mjs +3 -5
  68. package/dist/runtime/air-design-tokens/001_b24_global.css +1 -0
  69. package/dist/runtime/air-design-tokens/002_b24_context_utility.css +0 -0
  70. package/dist/runtime/air-design-tokens/003_b24_context_light.css +1 -0
  71. package/dist/runtime/air-design-tokens/004_b24_context_dark.css +1 -0
  72. package/dist/runtime/air-design-tokens/005_b24_context_edge-light.css +1 -0
  73. package/dist/runtime/air-design-tokens/006_b24_context_edge-dark.css +1 -0
  74. package/dist/runtime/air-design-tokens/007_b24_global.css +1 -0
  75. package/dist/runtime/air-design-tokens/008_ui_global.css +1 -0
  76. package/dist/runtime/air-design-tokens/009_b24_tools.css +1 -0
  77. package/dist/runtime/air-design-tokens/components/badge-counter.css +1 -0
  78. package/dist/runtime/air-design-tokens/components/button.css +1 -0
  79. package/dist/runtime/air-design-tokens/components/navigation-menu.css +1 -0
  80. package/dist/runtime/air-design-tokens/components/popup.css +1 -0
  81. package/dist/runtime/air-design-tokens/components/scrollbar.css +2 -0
  82. package/dist/runtime/air-design-tokens/index.css +1 -0
  83. package/dist/runtime/components/Accordion.vue.d.ts +1 -1
  84. package/dist/runtime/components/Advice.vue +1 -13
  85. package/dist/runtime/components/Advice.vue.d.ts +1 -1
  86. package/dist/runtime/components/Alert.vue +6 -4
  87. package/dist/runtime/components/Alert.vue.d.ts +11 -4
  88. package/dist/runtime/components/App.vue.d.ts +1 -1
  89. package/dist/runtime/components/Avatar.vue.d.ts +1 -1
  90. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  91. package/dist/runtime/components/Badge.vue +7 -11
  92. package/dist/runtime/components/Badge.vue.d.ts +6 -8
  93. package/dist/runtime/components/Button.vue +18 -15
  94. package/dist/runtime/components/Button.vue.d.ts +5 -7
  95. package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
  96. package/dist/runtime/components/Calendar.vue +8 -8
  97. package/dist/runtime/components/Calendar.vue.d.ts +14 -8
  98. package/dist/runtime/components/Checkbox.vue.d.ts +2 -2
  99. package/dist/runtime/components/Chip.vue +28 -7
  100. package/dist/runtime/components/Chip.vue.d.ts +22 -2
  101. package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
  102. package/dist/runtime/components/Container.vue.d.ts +1 -1
  103. package/dist/runtime/components/Countdown.vue.d.ts +5 -3
  104. package/dist/runtime/components/DescriptionList.vue.d.ts +1 -1
  105. package/dist/runtime/components/DropdownMenu.vue +20 -9
  106. package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -5
  107. package/dist/runtime/components/DropdownMenuContent.vue +29 -7
  108. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +14 -6
  109. package/dist/runtime/components/Form.vue +3 -3
  110. package/dist/runtime/components/Form.vue.d.ts +6 -5
  111. package/dist/runtime/components/FormField.vue +2 -2
  112. package/dist/runtime/components/FormField.vue.d.ts +4 -4
  113. package/dist/runtime/components/Input.vue +8 -4
  114. package/dist/runtime/components/Input.vue.d.ts +9 -8
  115. package/dist/runtime/components/InputMenu.vue +44 -18
  116. package/dist/runtime/components/InputMenu.vue.d.ts +17 -223
  117. package/dist/runtime/components/InputNumber.vue +14 -11
  118. package/dist/runtime/components/InputNumber.vue.d.ts +13 -87
  119. package/dist/runtime/components/Kbd.vue +6 -3
  120. package/dist/runtime/components/Kbd.vue.d.ts +7 -3
  121. package/dist/runtime/components/Link.vue +6 -5
  122. package/dist/runtime/components/Link.vue.d.ts +1 -3
  123. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  124. package/dist/runtime/components/Modal.vue +37 -33
  125. package/dist/runtime/components/Modal.vue.d.ts +2 -2
  126. package/dist/runtime/components/ModalDialogClose.vue.d.ts +1 -1
  127. package/dist/runtime/components/Navbar.vue.d.ts +1 -1
  128. package/dist/runtime/components/NavbarDivider.vue.d.ts +1 -1
  129. package/dist/runtime/components/NavbarSection.vue.d.ts +1 -1
  130. package/dist/runtime/components/NavbarSpacer.vue.d.ts +1 -1
  131. package/dist/runtime/components/NavigationMenu.vue +95 -84
  132. package/dist/runtime/components/NavigationMenu.vue.d.ts +31 -33
  133. package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
  134. package/dist/runtime/components/Popover.vue +8 -2
  135. package/dist/runtime/components/Popover.vue.d.ts +9 -3
  136. package/dist/runtime/components/Progress.vue.d.ts +3 -3
  137. package/dist/runtime/components/RadioGroup.vue +1 -1
  138. package/dist/runtime/components/RadioGroup.vue.d.ts +6 -5
  139. package/dist/runtime/components/Range.vue.d.ts +6 -6
  140. package/dist/runtime/components/Select.vue +25 -11
  141. package/dist/runtime/components/Select.vue.d.ts +7 -7
  142. package/dist/runtime/components/SelectMenu.vue +38 -19
  143. package/dist/runtime/components/SelectMenu.vue.d.ts +11 -10
  144. package/dist/runtime/components/Separator.vue +4 -4
  145. package/dist/runtime/components/Separator.vue.d.ts +6 -3
  146. package/dist/runtime/components/Sidebar.vue.d.ts +4 -1
  147. package/dist/runtime/components/SidebarBody.vue.d.ts +4 -1
  148. package/dist/runtime/components/SidebarFooter.vue.d.ts +4 -1
  149. package/dist/runtime/components/SidebarHeader.vue.d.ts +4 -1
  150. package/dist/runtime/components/SidebarHeading.vue.d.ts +4 -1
  151. package/dist/runtime/components/SidebarLayout.vue +148 -63
  152. package/dist/runtime/components/SidebarLayout.vue.d.ts +61 -8
  153. package/dist/runtime/components/SidebarSection.vue.d.ts +4 -1
  154. package/dist/runtime/components/SidebarSpacer.vue.d.ts +4 -1
  155. package/dist/runtime/components/Skeleton.vue +7 -3
  156. package/dist/runtime/components/Skeleton.vue.d.ts +12 -1
  157. package/dist/runtime/components/Slideover.vue +120 -43
  158. package/dist/runtime/components/Slideover.vue.d.ts +22 -9
  159. package/dist/runtime/components/Switch.vue.d.ts +2 -2
  160. package/dist/runtime/components/Tabs.vue +11 -3
  161. package/dist/runtime/components/Tabs.vue.d.ts +8 -7
  162. package/dist/runtime/components/Textarea.vue +8 -4
  163. package/dist/runtime/components/Textarea.vue.d.ts +8 -7
  164. package/dist/runtime/components/Toast.vue +16 -8
  165. package/dist/runtime/components/Toast.vue.d.ts +16 -15
  166. package/dist/runtime/components/Toaster.vue.d.ts +2 -2
  167. package/dist/runtime/components/Tooltip.vue +9 -5
  168. package/dist/runtime/components/Tooltip.vue.d.ts +7 -1
  169. package/dist/runtime/components/content/TableWrapper.vue.d.ts +1 -1
  170. package/dist/runtime/composables/defineShortcuts.js +5 -3
  171. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  172. package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
  173. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  174. package/dist/runtime/composables/useFormField.d.ts +4 -7
  175. package/dist/runtime/composables/useFormField.js +6 -3
  176. package/dist/runtime/composables/useKbd.d.ts +1 -1
  177. package/dist/runtime/composables/useLocale.js +2 -2
  178. package/dist/runtime/composables/useOverlay.d.ts +29 -2
  179. package/dist/runtime/composables/useOverlay.js +8 -7
  180. package/dist/runtime/composables/usePortal.d.ts +1 -1
  181. package/dist/runtime/composables/useSidebarLayout.d.ts +20 -0
  182. package/dist/runtime/composables/useSidebarLayout.js +16 -0
  183. package/dist/runtime/dictionary/icons.js +7 -7
  184. package/dist/runtime/index.css +1 -1
  185. package/dist/runtime/inertia/components/Link.vue +3 -0
  186. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  187. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
  188. package/dist/runtime/inertia/stubs.d.ts +1 -0
  189. package/dist/runtime/inertia/stubs.js +4 -2
  190. package/dist/runtime/locale/ar.js +6 -0
  191. package/dist/runtime/locale/br.js +6 -0
  192. package/dist/runtime/locale/de.js +6 -0
  193. package/dist/runtime/locale/en.js +6 -0
  194. package/dist/runtime/locale/fr.js +6 -0
  195. package/dist/runtime/locale/id.js +6 -0
  196. package/dist/runtime/locale/it.js +6 -0
  197. package/dist/runtime/locale/ja.js +6 -0
  198. package/dist/runtime/locale/kz.js +6 -0
  199. package/dist/runtime/locale/la.js +6 -0
  200. package/dist/runtime/locale/ms.js +6 -0
  201. package/dist/runtime/locale/pl.js +6 -0
  202. package/dist/runtime/locale/ru.js +6 -0
  203. package/dist/runtime/locale/sc.js +6 -0
  204. package/dist/runtime/locale/tc.js +6 -0
  205. package/dist/runtime/locale/th.js +6 -0
  206. package/dist/runtime/locale/tr.js +6 -0
  207. package/dist/runtime/locale/ua.js +6 -0
  208. package/dist/runtime/locale/vn.js +6 -0
  209. package/dist/runtime/plugins/ui-version.d.ts +5 -0
  210. package/dist/runtime/plugins/ui-version.js +8 -0
  211. package/dist/runtime/prose/A.vue.d.ts +4 -1
  212. package/dist/runtime/prose/Blockquote.vue.d.ts +4 -1
  213. package/dist/runtime/prose/Code.vue.d.ts +4 -1
  214. package/dist/runtime/prose/Em.vue.d.ts +4 -1
  215. package/dist/runtime/prose/H1.vue +4 -1
  216. package/dist/runtime/prose/H1.vue.d.ts +7 -1
  217. package/dist/runtime/prose/H2.vue +4 -1
  218. package/dist/runtime/prose/H2.vue.d.ts +7 -1
  219. package/dist/runtime/prose/H3.vue +4 -1
  220. package/dist/runtime/prose/H3.vue.d.ts +7 -1
  221. package/dist/runtime/prose/H4.vue +4 -1
  222. package/dist/runtime/prose/H4.vue.d.ts +7 -1
  223. package/dist/runtime/prose/H5.vue +4 -1
  224. package/dist/runtime/prose/H5.vue.d.ts +7 -1
  225. package/dist/runtime/prose/H6.vue +4 -1
  226. package/dist/runtime/prose/H6.vue.d.ts +7 -1
  227. package/dist/runtime/prose/Hr.vue.d.ts +1 -1
  228. package/dist/runtime/prose/Img.vue.d.ts +1 -1
  229. package/dist/runtime/prose/Li.vue.d.ts +4 -1
  230. package/dist/runtime/prose/Ol.vue.d.ts +4 -1
  231. package/dist/runtime/prose/P.vue +6 -1
  232. package/dist/runtime/prose/P.vue.d.ts +12 -1
  233. package/dist/runtime/prose/Pre.vue.d.ts +4 -1
  234. package/dist/runtime/prose/Strong.vue.d.ts +4 -1
  235. package/dist/runtime/prose/Table.vue.d.ts +5 -2
  236. package/dist/runtime/prose/Tbody.vue.d.ts +4 -1
  237. package/dist/runtime/prose/Td.vue.d.ts +4 -1
  238. package/dist/runtime/prose/Th.vue.d.ts +4 -1
  239. package/dist/runtime/prose/Thead.vue.d.ts +4 -1
  240. package/dist/runtime/prose/Tr.vue.d.ts +4 -1
  241. package/dist/runtime/prose/Ul.vue.d.ts +4 -1
  242. package/dist/runtime/types/index.d.ts +0 -1
  243. package/dist/runtime/types/index.js +0 -1
  244. package/dist/runtime/types/locale.d.ts +6 -0
  245. package/dist/runtime/utils/index.d.ts +6 -0
  246. package/dist/runtime/utils/index.js +27 -0
  247. package/dist/runtime/utils/tv.js +66 -1
  248. package/dist/runtime/vue/components/Link.vue +3 -0
  249. package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
  250. package/dist/runtime/vue/stubs.d.ts +1 -0
  251. package/dist/runtime/vue/stubs.js +3 -1
  252. package/dist/shared/b24ui-nuxt.dLc5H7ID.mjs +6100 -0
  253. package/dist/unplugin.mjs +1 -1
  254. package/dist/vite.mjs +1 -1
  255. package/package.json +40 -28
  256. package/.nuxt/b24ui/stacked-layout.ts +0 -34
  257. package/dist/runtime/air-design-tokens.css +0 -1
  258. package/dist/runtime/components/StackedLayout.vue +0 -117
  259. package/dist/runtime/components/StackedLayout.vue.d.ts +0 -44
  260. package/dist/shared/b24ui-nuxt.CxsFEY3M.mjs +0 -7895
@@ -14,9 +14,10 @@ import { useComponentIcons } from "../composables/useComponentIcons";
14
14
  import { useFormField } from "../composables/useFormField";
15
15
  import { useLocale } from "../composables/useLocale";
16
16
  import { usePortal } from "../composables/usePortal";
17
- import { compare, get, isArrayOfArray } from "../utils";
17
+ import { compare, get, getDisplayValue, isArrayOfArray } from "../utils";
18
18
  import { tv } from "../utils/tv";
19
19
  import icons from "../dictionary/icons";
20
+ import B24Badge from "./Badge.vue";
20
21
  import B24Avatar from "./Avatar.vue";
21
22
  import B24Chip from "./Chip.vue";
22
23
  defineOptions({ inheritAttrs: false });
@@ -61,21 +62,23 @@ const props = defineProps({
61
62
  resetSearchTermOnBlur: { type: Boolean, required: false, default: true },
62
63
  resetSearchTermOnSelect: { type: Boolean, required: false, default: true },
63
64
  highlightOnHover: { type: Boolean, required: false },
65
+ openOnClick: { type: Boolean, required: false },
66
+ openOnFocus: { type: Boolean, required: false },
64
67
  icon: { type: [Function, Object], required: false },
65
68
  avatar: { type: Object, required: false },
66
69
  loading: { type: Boolean, required: false },
67
70
  trailing: { type: Boolean, required: false }
68
71
  });
69
- const emits = defineEmits(["update:open", "change", "blur", "focus", "create", "highlight", "update:modelValue"]);
72
+ const emits = defineEmits(["update:open", "change", "blur", "focus", "create", "highlight", "remove-tag", "update:modelValue"]);
70
73
  const slots = defineSlots();
71
74
  const searchTerm = defineModel("searchTerm", { type: String, ...{ default: "" } });
72
75
  const { t } = useLocale();
73
76
  const appConfig = useAppConfig();
74
77
  const { contains } = useFilter({ sensitivity: "base" });
75
- const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "open", "defaultOpen", "required", "multiple", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "highlightOnHover", "ignoreFilter"), emits);
78
+ const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "open", "defaultOpen", "required", "multiple", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "highlightOnHover", "openOnClick", "openOnFocus"), emits);
76
79
  const portalProps = usePortal(toRef(() => props.portal));
77
80
  const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8, position: "popper" }));
78
- const arrowProps = toRef(() => props.arrow);
81
+ const arrowProps = toRef(() => defu(typeof props.arrow === "boolean" ? {} : props.arrow, { width: 20, height: 10 }));
79
82
  const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, size: formGroupSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
80
83
  const { orientation, size: buttonGroupSize } = useButtonGroup(props);
81
84
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(toRef(() => defu(props, { trailingIcon: icons.chevronDown })));
@@ -88,7 +91,6 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.inputMe
88
91
  color: color.value,
89
92
  size: inputSize?.value,
90
93
  loading: props.loading,
91
- tagColor: props.tagColor,
92
94
  highlight: highlight.value,
93
95
  rounded: Boolean(props.rounded),
94
96
  noPadding: Boolean(props.noPadding),
@@ -100,11 +102,10 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.inputMe
100
102
  buttonGroup: orientation.value
101
103
  }));
102
104
  function displayValue(value) {
103
- if (!props.valueKey) {
104
- return value && (typeof value === "object" ? get(value, props.labelKey) : value);
105
- }
106
- const item = items.value.find((item2) => compare(typeof item2 === "object" ? get(item2, props.valueKey) : item2, value));
107
- return item && (typeof item === "object" ? get(item, props.labelKey) : item);
105
+ return getDisplayValue(items.value, value, {
106
+ labelKey: props.labelKey,
107
+ valueKey: props.valueKey
108
+ }) ?? "";
108
109
  }
109
110
  const groups = computed(
110
111
  () => props.items?.length ? isArrayOfArray(props.items) ? props.items : [props.items] : []
@@ -115,14 +116,20 @@ const filteredGroups = computed(() => {
115
116
  return groups.value;
116
117
  }
117
118
  const fields = Array.isArray(props.filterFields) ? props.filterFields : [props.labelKey];
118
- return groups.value.map((group) => group.filter((item) => {
119
- if (typeof item !== "object" || item === null) {
119
+ return groups.value.map((items2) => items2.filter((item) => {
120
+ if (item === void 0 || item === null) {
121
+ return false;
122
+ }
123
+ if (typeof item !== "object") {
120
124
  return contains(String(item), searchTerm.value);
121
125
  }
122
126
  if (item.type && ["label", "separator"].includes(item.type)) {
123
127
  return true;
124
128
  }
125
- return fields.some((field) => contains(get(item, field), searchTerm.value));
129
+ return fields.some((field) => {
130
+ const value = get(item, field);
131
+ return value !== void 0 && value !== null && contains(String(value), searchTerm.value);
132
+ });
126
133
  })).filter((group) => group.filter(
127
134
  (item) => !isInputItem(item) || isInputItem(item) && (!item.type || !["label", "separator"].includes(item.type))
128
135
  ).length > 0);
@@ -194,6 +201,7 @@ function onRemoveTag(event) {
194
201
  const modelValue = props.modelValue;
195
202
  const filteredValue = modelValue.filter((value) => !isEqual(value, event));
196
203
  emits("update:modelValue", filteredValue);
204
+ emits("remove-tag", event);
197
205
  onUpdate(filteredValue);
198
206
  }
199
207
  }
@@ -237,7 +245,6 @@ defineExpose({
237
245
  </DefineCreateItemTemplate>
238
246
 
239
247
  <ComboboxRoot
240
- :id="id"
241
248
  v-slot="{ modelValue, open }"
242
249
  v-bind="rootProps"
243
250
  :name="name"
@@ -249,9 +256,13 @@ defineExpose({
249
256
  @update:open="onUpdateOpen"
250
257
  @keydown.enter="$event.preventDefault()"
251
258
  >
252
- <div v-if="isTag" :class="b24ui.tag({ class: props.b24ui?.tag })">
253
- {{ props.tag }}
254
- </div>
259
+ <B24Badge
260
+ v-if="!multiple && isTag"
261
+ :class="b24ui.tag({ class: props.b24ui?.tag })"
262
+ :color="props.tagColor"
263
+ :label="props.tag"
264
+ size="xs"
265
+ />
255
266
  <ComboboxAnchor :as-child="!multiple" :class="b24ui.base({ class: props.b24ui?.base })">
256
267
  <TagsInputRoot
257
268
  v-if="multiple"
@@ -265,6 +276,14 @@ defineExpose({
265
276
  @focus="onFocus"
266
277
  @remove-tag="onRemoveTag"
267
278
  >
279
+ <B24Badge
280
+ v-if="!!multiple && isTag"
281
+ :class="b24ui.tag({ class: props.b24ui?.tag })"
282
+ :color="props.tagColor"
283
+ :label="props.tag"
284
+ size="xs"
285
+ />
286
+
268
287
  <TagsInputItem v-for="(item, index) in tags" :key="index" :value="item" :class="b24ui.tagsItem({ class: [props.b24ui?.tagsItem, isInputItem(item) && item.b24ui?.tagsItem] })">
269
288
  <TagsInputItemText :class="b24ui.tagsItemText({ class: [props.b24ui?.tagsItemText, isInputItem(item) && item.b24ui?.tagsItemText] })">
270
289
  <slot name="tags-item-text" :item="item" :index="index">
@@ -284,6 +303,7 @@ defineExpose({
284
303
 
285
304
  <ComboboxInput v-model="searchTerm" as-child>
286
305
  <TagsInputInput
306
+ :id="id"
287
307
  ref="inputRef"
288
308
  v-bind="{ ...$attrs, ...ariaAttrs }"
289
309
  :placeholder="placeholder"
@@ -295,6 +315,7 @@ defineExpose({
295
315
 
296
316
  <ComboboxInput
297
317
  v-else
318
+ :id="id"
298
319
  ref="inputRef"
299
320
  :display-value="displayValue"
300
321
  v-bind="{ ...$attrs, ...ariaAttrs }"
@@ -313,7 +334,12 @@ defineExpose({
313
334
  v-if="isLeading && leadingIconName"
314
335
  :class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
315
336
  />
316
- <B24Avatar v-else-if="!!avatar" :size="props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()" v-bind="avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })" />
337
+ <B24Avatar
338
+ v-else-if="!!avatar"
339
+ :size="props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()"
340
+ v-bind="avatar"
341
+ :class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
342
+ />
317
343
  </slot>
318
344
  </span>
319
345
 
@@ -3,7 +3,7 @@ import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, Combob
3
3
  import type { AppConfig } from '@nuxt/schema';
4
4
  import theme from '#build/b24ui/input-menu';
5
5
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
6
- import type { AvatarProps, ChipProps, IconComponent } from '../types';
6
+ import type { AvatarProps, ChipProps, BadgeProps, IconComponent } from '../types';
7
7
  import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
8
8
  type InputMenu = ComponentConfig<typeof theme, AppConfig, 'inputMenu'>;
9
9
  interface _InputMenuItem {
@@ -28,7 +28,7 @@ interface _InputMenuItem {
28
28
  [key: string]: any;
29
29
  }
30
30
  export type InputMenuItem = _InputMenuItem | AcceptableValue | boolean;
31
- export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'highlightOnHover'>, UseComponentIconsProps {
31
+ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'highlightOnHover' | 'openOnClick' | 'openOnFocus'>, UseComponentIconsProps {
32
32
  /**
33
33
  * The element or component this component should render as.
34
34
  * @defaultValue 'div'
@@ -44,7 +44,7 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
44
44
  */
45
45
  placeholder?: string;
46
46
  /**
47
- * @defaultValue 'primary'
47
+ * @defaultValue 'air-primary'
48
48
  */
49
49
  color?: InputMenu['variants']['color'];
50
50
  /**
@@ -143,9 +143,9 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
143
143
  multiple?: M & boolean;
144
144
  tag?: string;
145
145
  /**
146
- * @defaultValue 'primary'
146
+ * @defaultValue 'air-primary'
147
147
  */
148
- tagColor?: InputMenu['variants']['tagColor'];
148
+ tagColor?: BadgeProps['color'];
149
149
  /**
150
150
  * Highlight the ring color like a focus state
151
151
  * @defaultValue false
@@ -173,17 +173,18 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
173
173
  b24ui?: InputMenu['slots'];
174
174
  }
175
175
  export type InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Pick<ComboboxRootEmits, 'update:open'> & {
176
- change: [payload: Event];
177
- blur: [payload: FocusEvent];
178
- focus: [payload: FocusEvent];
179
- create: [item: string];
176
+ 'change': [payload: Event];
177
+ 'blur': [payload: FocusEvent];
178
+ 'focus': [payload: FocusEvent];
179
+ 'create': [item: string];
180
180
  /** Event handler when highlighted element changes. */
181
- highlight: [
181
+ 'highlight': [
182
182
  payload: {
183
183
  ref: HTMLElement;
184
184
  value: GetModelValue<A, VK, M>;
185
185
  } | undefined
186
186
  ];
187
+ 'remove-tag': [item: GetModelValue<A, VK, M>];
187
188
  } & GetModelValueEmits<A, VK, M>;
188
189
  type SlotProps<T extends InputMenuItem> = (props: {
189
190
  item: T;
@@ -232,7 +233,8 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
232
233
  value: GetModelValue<T, VK, M>;
233
234
  } | undefined) => any) | undefined;
234
235
  readonly "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
235
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onCreate" | "onHighlight" | "onUpdate:searchTerm"> & (InputMenuProps<T, VK, M> & {
236
+ readonly "onRemove-tag"?: ((item: GetModelValue<T, VK, M>) => any) | undefined;
237
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onCreate" | "onHighlight" | "onUpdate:searchTerm" | "onRemove-tag"> & (InputMenuProps<T, VK, M> & {
236
238
  searchTerm?: string;
237
239
  }) & Partial<{}>> & import("vue").PublicProps;
238
240
  expose(exposed: import("vue").ShallowUnwrapRef<{
@@ -253,110 +255,6 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
253
255
  };
254
256
  $refs: {
255
257
  [x: string]: unknown;
256
- } & {
257
- primitiveElement: ({
258
- $: import("vue").ComponentInternalInstance;
259
- $data: {};
260
- $props: {
261
- readonly modelValue?: string | undefined;
262
- readonly autoFocus?: boolean | undefined;
263
- readonly disabled?: boolean | undefined;
264
- readonly asChild?: boolean | undefined;
265
- readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
266
- readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
267
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
268
- $attrs: {
269
- [x: string]: unknown;
270
- };
271
- $refs: {
272
- [x: string]: unknown;
273
- } & {
274
- primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
275
- asChild: {
276
- type: BooleanConstructor;
277
- default: boolean;
278
- };
279
- as: {
280
- type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
281
- default: string;
282
- };
283
- }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
284
- [key: string]: any;
285
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
286
- asChild: boolean;
287
- as: import("reka-ui").AsTag | import("vue").Component;
288
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
289
- P: {};
290
- B: {};
291
- D: {};
292
- C: {};
293
- M: {};
294
- Defaults: {};
295
- }, Readonly<import("vue").ExtractPropTypes<{
296
- asChild: {
297
- type: BooleanConstructor;
298
- default: boolean;
299
- };
300
- as: {
301
- type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
302
- default: string;
303
- };
304
- }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
305
- [key: string]: any;
306
- }>, {}, {}, {}, {
307
- asChild: boolean;
308
- as: import("reka-ui").AsTag | import("vue").Component;
309
- }> | null;
310
- };
311
- $slots: Readonly<{
312
- [name: string]: import("vue").Slot<any> | undefined;
313
- }>;
314
- $root: import("vue").ComponentPublicInstance | null;
315
- $parent: import("vue").ComponentPublicInstance | null;
316
- $host: Element | null;
317
- $emit: (event: "update:modelValue", args_0: string) => void;
318
- $el: any;
319
- $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
320
- "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
321
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
322
- "update:modelValue": (args_0: string) => any;
323
- }, string, {
324
- as: import("reka-ui").AsTag | import("vue").Component;
325
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
326
- beforeCreate?: (() => void) | (() => void)[];
327
- created?: (() => void) | (() => void)[];
328
- beforeMount?: (() => void) | (() => void)[];
329
- mounted?: (() => void) | (() => void)[];
330
- beforeUpdate?: (() => void) | (() => void)[];
331
- updated?: (() => void) | (() => void)[];
332
- activated?: (() => void) | (() => void)[];
333
- deactivated?: (() => void) | (() => void)[];
334
- beforeDestroy?: (() => void) | (() => void)[];
335
- beforeUnmount?: (() => void) | (() => void)[];
336
- destroyed?: (() => void) | (() => void)[];
337
- unmounted?: (() => void) | (() => void)[];
338
- renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
339
- renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
340
- errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
341
- };
342
- $forceUpdate: () => void;
343
- $nextTick: typeof import("vue").nextTick;
344
- $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
345
- } & Readonly<{
346
- as: import("reka-ui").AsTag | import("vue").Component;
347
- }> & Omit<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
348
- "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
349
- }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
350
- $slots: Readonly<{
351
- default?: (props: {
352
- modelValue: string | undefined;
353
- }) => any;
354
- }> & {
355
- default?: (props: {
356
- modelValue: string | undefined;
357
- }) => any;
358
- };
359
- }) | null;
360
258
  };
361
259
  $slots: Readonly<{
362
260
  [name: string]: import("vue").Slot<any> | undefined;
@@ -398,7 +296,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
398
296
  "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
399
297
  }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
400
298
  $slots: {
401
- default?(_: {}): any;
299
+ default?: (props: {}) => any;
402
300
  };
403
301
  }) | null, ({
404
302
  $: import("vue").ComponentInternalInstance;
@@ -417,110 +315,6 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
417
315
  };
418
316
  $refs: {
419
317
  [x: string]: unknown;
420
- } & {
421
- primitiveElement: ({
422
- $: import("vue").ComponentInternalInstance;
423
- $data: {};
424
- $props: {
425
- readonly modelValue?: string | undefined;
426
- readonly autoFocus?: boolean | undefined;
427
- readonly disabled?: boolean | undefined;
428
- readonly asChild?: boolean | undefined;
429
- readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
430
- readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
431
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
432
- $attrs: {
433
- [x: string]: unknown;
434
- };
435
- $refs: {
436
- [x: string]: unknown;
437
- } & {
438
- primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
439
- asChild: {
440
- type: BooleanConstructor;
441
- default: boolean;
442
- };
443
- as: {
444
- type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
445
- default: string;
446
- };
447
- }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
448
- [key: string]: any;
449
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
450
- asChild: boolean;
451
- as: import("reka-ui").AsTag | import("vue").Component;
452
- }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
453
- P: {};
454
- B: {};
455
- D: {};
456
- C: {};
457
- M: {};
458
- Defaults: {};
459
- }, Readonly<import("vue").ExtractPropTypes<{
460
- asChild: {
461
- type: BooleanConstructor;
462
- default: boolean;
463
- };
464
- as: {
465
- type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
466
- default: string;
467
- };
468
- }>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
469
- [key: string]: any;
470
- }>, {}, {}, {}, {
471
- asChild: boolean;
472
- as: import("reka-ui").AsTag | import("vue").Component;
473
- }> | null;
474
- };
475
- $slots: Readonly<{
476
- [name: string]: import("vue").Slot<any> | undefined;
477
- }>;
478
- $root: import("vue").ComponentPublicInstance | null;
479
- $parent: import("vue").ComponentPublicInstance | null;
480
- $host: Element | null;
481
- $emit: (event: "update:modelValue", args_0: string) => void;
482
- $el: any;
483
- $options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
484
- "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
485
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
486
- "update:modelValue": (args_0: string) => any;
487
- }, string, {
488
- as: import("reka-ui").AsTag | import("vue").Component;
489
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
490
- beforeCreate?: (() => void) | (() => void)[];
491
- created?: (() => void) | (() => void)[];
492
- beforeMount?: (() => void) | (() => void)[];
493
- mounted?: (() => void) | (() => void)[];
494
- beforeUpdate?: (() => void) | (() => void)[];
495
- updated?: (() => void) | (() => void)[];
496
- activated?: (() => void) | (() => void)[];
497
- deactivated?: (() => void) | (() => void)[];
498
- beforeDestroy?: (() => void) | (() => void)[];
499
- beforeUnmount?: (() => void) | (() => void)[];
500
- destroyed?: (() => void) | (() => void)[];
501
- unmounted?: (() => void) | (() => void)[];
502
- renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
503
- renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
504
- errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
505
- };
506
- $forceUpdate: () => void;
507
- $nextTick: typeof import("vue").nextTick;
508
- $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
509
- } & Readonly<{
510
- as: import("reka-ui").AsTag | import("vue").Component;
511
- }> & Omit<Readonly<import("reka-ui").ListboxFilterProps> & Readonly<{
512
- "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
513
- }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
514
- $slots: Readonly<{
515
- default?: (props: {
516
- modelValue: string | undefined;
517
- }) => any;
518
- }> & {
519
- default?: (props: {
520
- modelValue: string | undefined;
521
- }) => any;
522
- };
523
- }) | null;
524
318
  };
525
319
  $slots: Readonly<{
526
320
  [name: string]: import("vue").Slot<any> | undefined;
@@ -562,7 +356,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
562
356
  "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
563
357
  }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
564
358
  $slots: {
565
- default?(_: {}): any;
359
+ default?: (props: {}) => any;
566
360
  };
567
361
  }) | null>;
568
362
  }>): void;
@@ -571,11 +365,11 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
571
365
  emit: (((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void) & ((evt: "highlight", payload: {
572
366
  ref: HTMLElement;
573
367
  value: GetModelValue<T, VK, M>;
574
- } | undefined) => void)) & ((evt: "update:searchTerm", value: string) => void);
368
+ } | undefined) => void) & ((evt: "remove-tag", item: GetModelValue<T, VK, M>) => void)) & ((evt: "update:searchTerm", value: string) => void);
575
369
  }>) => import("vue").VNode & {
576
370
  __ctx?: Awaited<typeof __VLS_setup>;
577
371
  };
578
372
  export default _default;
579
373
  type __VLS_PrettifyLocal<T> = {
580
- [K in keyof T]: T[K];
374
+ [K in keyof T as K]: T[K];
581
375
  } & {};
@@ -12,12 +12,13 @@ import { useFormField } from "../composables/useFormField";
12
12
  import { useLocale } from "../composables/useLocale";
13
13
  import { tv } from "../utils/tv";
14
14
  import icons from "../dictionary/icons";
15
+ import B24Badge from "./Badge.vue";
15
16
  import B24Button from "./Button.vue";
16
17
  defineOptions({ inheritAttrs: false });
17
18
  const props = defineProps({
18
19
  as: { type: null, required: false },
19
20
  placeholder: { type: String, required: false },
20
- color: { type: null, required: false, default: "primary" },
21
+ color: { type: null, required: false, default: "air-primary" },
21
22
  size: { type: null, required: false },
22
23
  noPadding: { type: Boolean, required: false },
23
24
  noBorder: { type: Boolean, required: false },
@@ -50,13 +51,14 @@ const props = defineProps({
50
51
  name: { type: String, required: false },
51
52
  formatOptions: { type: null, required: false },
52
53
  disableWheelChange: { type: Boolean, required: false },
53
- invertWheelChange: { type: Boolean, required: false }
54
+ invertWheelChange: { type: Boolean, required: false },
55
+ readonly: { type: Boolean, required: false }
54
56
  });
55
57
  const emits = defineEmits(["update:modelValue", "blur", "change"]);
56
58
  defineSlots();
57
59
  const { t, code: codeLocale } = useLocale();
58
60
  const appConfig = useAppConfig();
59
- const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "min", "max", "step", "stepSnapping", "formatOptions", "disableWheelChange", "invertWheelChange"), emits);
61
+ const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "min", "max", "step", "stepSnapping", "formatOptions", "disableWheelChange", "invertWheelChange", "readonly"), emits);
60
62
  const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formGroupSize, name, highlight, disabled, ariaAttrs } = useFormField(props);
61
63
  const { orientation, size: buttonGroupSize } = useButtonGroup(props);
62
64
  const locale = computed(() => props.locale || codeLocale.value);
@@ -67,7 +69,6 @@ const isTag = computed(() => {
67
69
  const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.inputNumber || {} })({
68
70
  color: color.value,
69
71
  size: inputSize?.value,
70
- tagColor: props.tagColor,
71
72
  highlight: highlight.value,
72
73
  rounded: Boolean(props.rounded),
73
74
  noPadding: Boolean(props.noPadding),
@@ -114,9 +115,13 @@ defineExpose({
114
115
  :locale="locale"
115
116
  @update:model-value="onUpdate"
116
117
  >
117
- <div v-if="isTag" :class="b24ui.tag({ class: props.b24ui?.tag })">
118
- {{ props.tag }}
119
- </div>
118
+ <B24Badge
119
+ v-if="isTag"
120
+ :class="b24ui.tag({ class: props.b24ui?.tag })"
121
+ :color="props.tagColor"
122
+ :label="props.tag"
123
+ size="xs"
124
+ />
120
125
 
121
126
  <NumberFieldInput
122
127
  v-bind="{ ...$attrs, ...ariaAttrs }"
@@ -134,8 +139,7 @@ defineExpose({
134
139
  <B24Button
135
140
  :icon="incrementIcon"
136
141
  :size="size"
137
- color="link"
138
- depth="light"
142
+ color="air-tertiary-no-accent"
139
143
  :aria-label="t('inputNumber.increment')"
140
144
  v-bind="typeof increment === 'object' ? increment : void 0"
141
145
  />
@@ -149,8 +153,7 @@ defineExpose({
149
153
  <B24Button
150
154
  :icon="decrementIcon"
151
155
  :size="size"
152
- color="link"
153
- depth="light"
156
+ color="air-tertiary-no-accent"
154
157
  :aria-label="t('inputNumber.decrement')"
155
158
  v-bind="typeof decrement === 'object' ? decrement : void 0"
156
159
  />