bitboss-ui 3.0.0-beta.75 → 3.0.0-beta.76

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 (169) hide show
  1. package/README.md +5 -5
  2. package/bin/cli.mjs +16 -10
  3. package/dist/ai/BbAlert.md +1 -1
  4. package/dist/ai/BbBreadcrumbs.md +1 -1
  5. package/dist/ai/BbButton.md +2 -2
  6. package/dist/ai/BbColorInput.md +1 -1
  7. package/dist/ai/BbColorPalette.md +1 -1
  8. package/dist/ai/BbConfirm.md +1 -1
  9. package/dist/ai/BbDatePicker.md +1 -1
  10. package/dist/ai/BbDatePickerInput.md +1 -1
  11. package/dist/ai/BbDialog.md +3 -2
  12. package/dist/ai/BbDropdown.md +23 -21
  13. package/dist/ai/BbDropdownButton.md +13 -11
  14. package/dist/ai/BbGallery.md +3 -2
  15. package/dist/ai/BbIcon.md +10 -10
  16. package/dist/ai/BbOffCanvas.md +3 -2
  17. package/dist/ai/BbPopover.md +1 -1
  18. package/dist/ai/BbSelect.md +153 -43
  19. package/dist/ai/BbSelectPopover.md +115 -9
  20. package/dist/ai/BbTable.md +1 -1
  21. package/dist/ai/BbTimePicker.md +1 -1
  22. package/dist/ai/BbTimePickerInput.md +1 -1
  23. package/dist/ai/GroupedListBox.md +2 -2
  24. package/dist/ai/ListBox.md +3 -2
  25. package/dist/ai/changelog.json +153 -7
  26. package/dist/ai/components.json +12 -12
  27. package/dist/ai/guides/agent-contract.md +1 -1
  28. package/dist/ai/guides/calendars-and-digits.md +1 -1
  29. package/dist/ai/guides/eslint-rules.md +1 -1
  30. package/dist/ai/guides/icons-policy.md +32 -11
  31. package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
  32. package/dist/ai/guides/migration/adoption-checklist.md +1 -1
  33. package/dist/ai/guides/migration/components/bb-icon.md +4 -4
  34. package/dist/ai/guides/migration/v2-to-v3.md +48 -19
  35. package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
  36. package/dist/ai/guides/passthrough.md +58 -58
  37. package/dist/ai/helpers/inertia/manifest.json +1 -1
  38. package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
  39. package/dist/ai/manifest/components/BbDropdown.json +19 -17
  40. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
  41. package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
  42. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  43. package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
  44. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  45. package/dist/ai/manifest/components/BbSelect.json +44 -40
  46. package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
  47. package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
  48. package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
  49. package/dist/ai/manifest/components/BbTable.tree.json +5 -1
  50. package/dist/ai/manifest/components/GroupedListBox.json +1 -1
  51. package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
  52. package/dist/ai/manifest/components/ListBox.json +1 -1
  53. package/dist/ai/manifest/components/ListBox.tree.json +1 -1
  54. package/dist/ai/manifest/index.json +2 -2
  55. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  56. package/dist/ai/recipes/inertia/onboarding.md +1 -1
  57. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
  58. package/dist/ai/recipes/nuxt/onboarding.md +1 -1
  59. package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
  60. package/dist/ai/recipes/vue/onboarding.md +2 -2
  61. package/dist/ai/source/BbAccordion.md +4 -5
  62. package/dist/ai/source/BbAvatar.md +9 -2
  63. package/dist/ai/source/BbBadge.md +6 -2
  64. package/dist/ai/source/BbBreadcrumbs.md +5 -2
  65. package/dist/ai/source/BbCalendar.md +8 -6
  66. package/dist/ai/source/BbCarousel.md +10 -6
  67. package/dist/ai/source/BbColorPalette.md +5 -2
  68. package/dist/ai/source/BbDatePickerInput.md +7 -2
  69. package/dist/ai/source/BbDropdown.md +91 -66
  70. package/dist/ai/source/BbDropdownButton.md +36 -19
  71. package/dist/ai/source/BbDropdownGroup.md +91 -66
  72. package/dist/ai/source/BbGallery.md +6 -5
  73. package/dist/ai/source/BbPagination.md +12 -28
  74. package/dist/ai/source/BbRating.md +4 -4
  75. package/dist/ai/source/BbSelect.md +130 -106
  76. package/dist/ai/source/BbSelectPopover.md +128 -21
  77. package/dist/ai/source/BbTable.md +42 -9
  78. package/dist/ai/source/BbTimePickerInput.md +6 -2
  79. package/dist/ai/source/ClearableButton.md +4 -2
  80. package/dist/ai/source/ErrorIcon.md +4 -3
  81. package/dist/ai/source/FlatListBox.md +7 -2
  82. package/dist/ai/source/GroupedListBox.md +22 -3
  83. package/dist/ai/source/ListBox.md +7 -1
  84. package/dist/ai/source/WarningIcon.md +4 -3
  85. package/dist/assets/svgs/close.svg_raw.js +1 -1
  86. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  87. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
  88. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
  89. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
  90. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
  91. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  92. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
  93. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
  94. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
  95. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
  96. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  97. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
  98. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
  99. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
  100. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
  101. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
  102. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
  103. package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
  104. package/dist/components/BbDropdown/types.d.ts +51 -53
  105. package/dist/components/BbDropdown/types.js +2 -0
  106. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
  107. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
  108. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
  109. package/dist/components/BbDropdownButton/types.d.ts +12 -10
  110. package/dist/components/BbDropdownButton/types.js +2 -0
  111. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
  112. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
  113. package/dist/components/BbIcon/iconCache.js +1 -1
  114. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
  115. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  116. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
  117. package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
  118. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
  119. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  120. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
  121. package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
  122. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
  123. package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
  124. package/dist/components/BbSelect/types.d.ts +101 -105
  125. package/dist/components/BbSelect/types.js +1 -27
  126. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
  127. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
  128. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
  129. package/dist/components/BbSelectPopover/types.d.ts +22 -13
  130. package/dist/components/BbSelectPopover/types.js +3 -1
  131. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  132. package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
  133. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
  134. package/dist/components/BbTable/BbTableDataRow.js +97 -90
  135. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
  136. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
  137. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
  138. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
  139. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
  140. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
  141. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  142. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
  143. package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  144. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
  145. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
  146. package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  147. package/dist/composables/useInternalIcon.js +25 -0
  148. package/dist/icon-scan.d.ts +1 -1
  149. package/dist/llms-full.txt +477 -187
  150. package/dist/llms-medium.txt +25 -24
  151. package/dist/llms.txt +1 -1
  152. package/dist/nuxt.js +1 -1
  153. package/dist/styles.css +2 -2
  154. package/dist/types/Config.d.ts +8 -1
  155. package/dist/types/ConfigDefaults.d.ts +10 -2
  156. package/dist/types/internalIcons.d.ts +89 -0
  157. package/dist/types/internalIcons.js +158 -0
  158. package/dist/types/ptComponentMap.d.ts +4 -4
  159. package/dist/utils/configDefaults.js +75 -64
  160. package/dist/utils/iconsOption.js +48 -0
  161. package/dist/utils/versionCheck.js +1 -1
  162. package/dist/vite-plugin.d.ts +10 -16
  163. package/dist/vite.js +319 -306
  164. package/llms.txt +1 -1
  165. package/package.json +1 -1
  166. package/scripts/lib/adoption-checklist.json +1 -1
  167. package/scripts/lib/update-install.mjs +48 -0
  168. package/scripts/lib/validate-bb-markup.mjs +73 -12
  169. package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
@@ -6,12 +6,13 @@ import i from "../BbCollapsible/BbCollapsible.vue.js";
6
6
  import { BB_ACCORDION_PT as a } from "./types.js";
7
7
  import { usePassthrough as o } from "../../composables/usePassthrough.js";
8
8
  import { transitions as s } from "../../utilities/misc/transitions.js";
9
- import { computed as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, h as m, mergeModels as h, mergeProps as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, useAttrs as x, useModel as S, withCtx as C } from "vue";
9
+ import { useInternalIcon as c } from "../../composables/useInternalIcon.js";
10
+ import { computed as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, h, mergeModels as g, mergeProps as _, openBlock as v, renderSlot as y, toDisplayString as b, unref as x, useAttrs as S, useModel as C, withCtx as w } from "vue";
10
11
  // src/components/BbAccordion/BbAccordion.vue?vue&type=script&setup=true&lang.ts
11
- var w = /*@__PURE__*/ p({
12
+ var T = /*@__PURE__*/ m({
12
13
  inheritAttrs: !1,
13
14
  __name: "BbAccordion",
14
- props: /*@__PURE__*/ h({
15
+ props: /*@__PURE__*/ g({
15
16
  "pt:root": {},
16
17
  "pt:root:disabled": {},
17
18
  "pt:root:open": {},
@@ -47,39 +48,39 @@ var w = /*@__PURE__*/ p({
47
48
  }),
48
49
  emits: ["update:modelValue"],
49
50
  setup(s) {
50
- let p = S(s, "modelValue"), h = s, w = o({
51
+ let m = C(s, "modelValue"), g = s, T = c("expandChevron", t), E = o({
51
52
  component: "BbAccordion",
52
- attrs: x(),
53
- props: h,
53
+ attrs: S(),
54
+ props: g,
54
55
  parts: a.parts,
55
56
  states: a.states,
56
57
  active: {
57
- open: () => O.value,
58
- disabled: () => !!h.disabled
58
+ open: () => A.value,
59
+ disabled: () => !!g.disabled
59
60
  }
60
- }), T = e().id.value, E = h.id || `bba_${T}`, D = (e, { slots: t }) => h.headingLevel ? m(`h${h.headingLevel}`, { class: "bb-accordion__heading" }, t.default?.()) : t.default?.(), O = c(() => h.value === void 0 ? !!p.value : p.value === h.value), k = () => {
61
- h.disabled || (h.value === void 0 ? p.value = !p.value : p.value = O.value ? null : h.value);
61
+ }), D = e().id.value, O = g.id || `bba_${D}`, k = (e, { slots: t }) => g.headingLevel ? h(`h${g.headingLevel}`, { class: "bb-accordion__heading" }, t.default?.()) : t.default?.(), A = l(() => g.value === void 0 ? !!m.value : m.value === g.value), j = () => {
62
+ g.disabled || (g.value === void 0 ? m.value = !m.value : m.value = A.value ? null : g.value);
62
63
  };
63
- return (e, a) => (_(), l("div", g({ class: ["bb-accordion", { "bb-accordion--titled": !e.$slots.header }] }, b(w).rootAttrs), [f(D, null, {
64
- default: C(() => [f(n, g({
65
- id: `${b(E)}_header`,
66
- "aria-controls": b(E),
64
+ return (e, t) => (v(), u("div", _({ class: ["bb-accordion", { "bb-accordion--titled": !e.$slots.header }] }, x(E).rootAttrs), [p(k, null, {
65
+ default: w(() => [p(n, _({
66
+ id: `${x(O)}_header`,
67
+ "aria-controls": x(O),
67
68
  "aria-disabled": s.disabled || void 0,
68
- "aria-expanded": O.value,
69
+ "aria-expanded": A.value,
69
70
  class: "bb-accordion__header",
70
- onClick: k
71
- }, b(w).header), {
72
- default: C(() => [v(e.$slots, "header", {
73
- toggle: k,
74
- open: O.value
75
- }, () => [u("span", g({ class: "bb-accordion__title" }, b(w).title), [v(e.$slots, "title", {
76
- open: O.value,
77
- toggle: k
78
- }, () => [d(y(s.title), 1)])], 16), f(r, g({
71
+ onClick: j
72
+ }, x(E).header), {
73
+ default: w(() => [y(e.$slots, "header", {
74
+ toggle: j,
75
+ open: A.value
76
+ }, () => [d("span", _({ class: "bb-accordion__title" }, x(E).title), [y(e.$slots, "title", {
77
+ open: A.value,
78
+ toggle: j
79
+ }, () => [f(b(s.title), 1)])], 16), p(r, _({
79
80
  class: "bb-accordion__icon",
80
- icon: b(t),
81
+ icon: x(T),
81
82
  size: "16"
82
- }, b(w).icon), null, 16, ["icon"])])]),
83
+ }, x(E).icon), null, 16, ["icon"])])]),
83
84
  _: 3
84
85
  }, 16, [
85
86
  "id",
@@ -88,18 +89,18 @@ var w = /*@__PURE__*/ p({
88
89
  "aria-expanded"
89
90
  ])]),
90
91
  _: 3
91
- }), f(i, {
92
- id: b(E),
93
- "aria-labelledby": `${b(E)}_header`,
92
+ }), p(i, {
93
+ id: x(O),
94
+ "aria-labelledby": `${x(O)}_header`,
94
95
  eager: s.eager,
95
- "model-value": O.value,
96
+ "model-value": A.value,
96
97
  role: "region",
97
98
  tag: "div",
98
99
  "transition-duration": s.transitionDuration
99
100
  }, {
100
- default: C(() => [u("div", g({ class: "bb-accordion__panel" }, b(w).panel), [v(e.$slots, "default", {
101
- open: O.value,
102
- toggle: k
101
+ default: w(() => [d("div", _({ class: "bb-accordion__panel" }, x(E).panel), [y(e.$slots, "default", {
102
+ open: A.value,
103
+ toggle: j
103
104
  })], 16)]),
104
105
  _: 3
105
106
  }, 8, [
@@ -111,4 +112,4 @@ var w = /*@__PURE__*/ p({
111
112
  ])], 16));
112
113
  }
113
114
  });
114
- export { w as default };
115
+ export { T as default };
@@ -12,15 +12,16 @@ import { usePassthrough as u } from "../../composables/usePassthrough.js";
12
12
  import { useConfig as d } from "../../composables/useConfig.js";
13
13
  import { LOCALE_TABLE as f, localeKeyOf as p } from "../../i18n/regions.js";
14
14
  import { avatarHue as m, initialsOf as h } from "./avatarIdentity.js";
15
- import { computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, defineComponent as b, mergeProps as x, normalizeClass as S, onMounted as C, openBlock as w, ref as T, renderSlot as E, toDisplayString as D, unref as O, useAttrs as k, watch as A } from "vue";
15
+ import { useInternalIcon as g } from "../../composables/useInternalIcon.js";
16
+ import { computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, defineComponent as x, mergeProps as S, normalizeClass as C, onMounted as w, openBlock as T, ref as E, renderSlot as D, toDisplayString as O, unref as k, useAttrs as A, watch as j } from "vue";
16
17
  // src/components/BbAvatar/BbAvatar.vue?vue&type=script&setup=true&lang.ts
17
- var j = [
18
+ var M = [
18
19
  "alt",
19
20
  "aria-hidden",
20
21
  "sizes",
21
22
  "src",
22
23
  "srcset"
23
- ], M = /*@__PURE__*/ b({
24
+ ], N = /*@__PURE__*/ x({
24
25
  inheritAttrs: !1,
25
26
  __name: "BbAvatar",
26
27
  props: {
@@ -40,70 +41,70 @@ var j = [
40
41
  sizes: {},
41
42
  timeout: { default: 400 }
42
43
  },
43
- setup(b) {
44
- let M = b, N = u({
44
+ setup(x) {
45
+ let N = x, P = g("avatar", c), F = u({
45
46
  component: "BbAvatar",
46
- attrs: k(),
47
- props: M,
47
+ attrs: A(),
48
+ props: N,
48
49
  parts: l.parts,
49
50
  states: l.states,
50
51
  active: {}
51
- }), P = n("BbAvatar", r);
52
+ }), I = n("BbAvatar", r);
52
53
  process.env.NODE_ENV !== "production" && o("BbAvatar", a("BbAvatar"));
53
- let F = i(), I = g(() => {
54
- if (M.size != null) try {
55
- return e(M.size, P.value);
54
+ let L = i(), R = _(() => {
55
+ if (N.size != null) try {
56
+ return e(N.size, I.value);
56
57
  } catch {
57
- return F.warn(`Invalid size: "${M.size}" in BbAvatar. Falling back to "md".`), `${P.value.md}px`;
58
+ return L.warn(`Invalid size: "${N.size}" in BbAvatar. Falling back to "md".`), `${I.value.md}px`;
58
59
  }
59
- }), L = d(), R = g(() => h(M.name, f[p(L.locale) ?? "en"].tag)), z = g(() => M.alt?.trim() || M.name?.trim() || ""), B = g(() => {
60
- if (typeof M.color == "string" && M.color) return "bb-avatar--custom";
61
- let e = M.color === !0 ? m(M.name) : void 0;
60
+ }), z = d(), B = _(() => h(N.name, f[p(z.locale) ?? "en"].tag)), V = _(() => N.alt?.trim() || N.name?.trim() || ""), H = _(() => {
61
+ if (typeof N.color == "string" && N.color) return "bb-avatar--custom";
62
+ let e = N.color === !0 ? m(N.name) : void 0;
62
63
  return e ? ["bb-avatar--colored", `bb-avatar--${e}`] : void 0;
63
- }), V = g(() => {
64
+ }), U = _(() => {
64
65
  let e = {};
65
- return I.value && (e["--size"] = I.value), typeof M.color == "string" && M.color && (e["--bg"] = M.color), e;
66
- }), H = g(() => !!(M.src || M.srcset) && !Y.value), U = g(() => H.value && X.value && !J.value), W = g(() => !H.value || U.value), G = g(() => !W.value || !z.value ? {} : {
66
+ return R.value && (e["--size"] = R.value), typeof N.color == "string" && N.color && (e["--bg"] = N.color), e;
67
+ }), W = _(() => !!(N.src || N.srcset) && !Z.value), G = _(() => W.value && Q.value && !X.value), K = _(() => !W.value || G.value), q = _(() => !K.value || !V.value ? {} : {
67
68
  role: "img",
68
- "aria-label": z.value
69
- }), K = (e) => !(!e || !e.complete || e.naturalWidth === 0), q = T(null), J = T(!1), Y = T(!1), X = T(!1);
70
- C(async () => {
71
- H.value && !Y.value && !J.value && q.value && (await t(M.timeout), X.value = !K(q.value));
69
+ "aria-label": V.value
70
+ }), J = (e) => !(!e || !e.complete || e.naturalWidth === 0), Y = E(null), X = E(!1), Z = E(!1), Q = E(!1);
71
+ w(async () => {
72
+ W.value && !Z.value && !X.value && Y.value && (await t(N.timeout), Q.value = !J(Y.value));
72
73
  });
73
- let Z = () => {
74
- J.value = !0, Y.value = !1, X.value = !1;
75
- }, Q = () => {
76
- Y.value = !0;
74
+ let $ = () => {
75
+ X.value = !0, Z.value = !1, Q.value = !1;
76
+ }, ee = () => {
77
+ Z.value = !0;
77
78
  };
78
- return A(() => [M.src, M.srcset], () => {
79
- J.value = !1, Y.value = !1, X.value = !1;
80
- }), (e, t) => (w(), y("span", x({
81
- class: ["bb-avatar", B.value],
82
- style: V.value
83
- }, O(N).rootAttrs), [H.value ? (w(), y("img", {
79
+ return j(() => [N.src, N.srcset], () => {
80
+ X.value = !1, Z.value = !1, Q.value = !1;
81
+ }), (e, t) => (T(), b("span", S({
82
+ class: ["bb-avatar", H.value],
83
+ style: U.value
84
+ }, k(F).rootAttrs), [W.value ? (T(), b("img", {
84
85
  key: 0,
85
86
  ref_key: "image",
86
- ref: q,
87
- alt: z.value,
88
- "aria-hidden": U.value || void 0,
89
- class: S(["bb-avatar__img", { "bb-avatar__img--hidden": U.value }]),
90
- sizes: b.sizes,
91
- src: b.src,
92
- srcset: b.srcset,
93
- onError: Q,
94
- onLoad: Z
95
- }, null, 42, j)) : v("", !0), W.value ? (w(), y("span", x({
87
+ ref: Y,
88
+ alt: V.value,
89
+ "aria-hidden": G.value || void 0,
90
+ class: C(["bb-avatar__img", { "bb-avatar__img--hidden": G.value }]),
91
+ sizes: x.sizes,
92
+ src: x.src,
93
+ srcset: x.srcset,
94
+ onError: ee,
95
+ onLoad: $
96
+ }, null, 42, M)) : y("", !0), K.value ? (T(), b("span", S({
96
97
  key: 1,
97
98
  class: "bb-avatar__fallback"
98
- }, G.value), [E(e.$slots, "default", {}, () => [R.value ? (w(), y("span", x({
99
+ }, q.value), [D(e.$slots, "default", {}, () => [B.value ? (T(), b("span", S({
99
100
  key: 0,
100
101
  "aria-hidden": "true",
101
102
  class: "bb-avatar__initials"
102
- }, O(N).initials), D(R.value), 17)) : (w(), _(s, x({
103
+ }, k(F).initials), O(B.value), 17)) : (T(), v(s, S({
103
104
  key: 1,
104
105
  class: "bb-avatar__default-icon",
105
- icon: O(c)
106
- }, O(N).icon), null, 16, ["icon"]))])], 16)) : v("", !0)], 16));
106
+ icon: k(P)
107
+ }, k(F).icon), null, 16, ["icon"]))])], 16)) : y("", !0)], 16));
107
108
  }
108
109
  });
109
- export { M as default };
110
+ export { N as default };
@@ -1,19 +1,20 @@
1
1
  import { useConfigDefaults as e } from "../../composables/useConfigDefaults.js";
2
2
  import { useId as t } from "../../composables/useId.js";
3
3
  import { useLocale as n } from "../../composables/useLocale.js";
4
- import { useLogger as ee } from "../../composables/useLogger.js";
5
- import { removedPropsFor as te } from "../../deprecation/removedProps.js";
6
- import { warnRemovedAttrs as ne } from "../../utilities/functions/warnRemovedAttrs.js";
7
- import r from "../BbIcon/BbIcon.vue.js";
8
- import i from "../BbSpinner/BbSpinner.vue.js";
9
- import { SlotNodes as a, slotContent as o } from "../../utilities/functions/slotContent.js";
10
- import s from "./BadgeBodyContent.vue.js";
11
- import c from "./BbBadgeButton.vue.js";
12
- import { provideBadgeHost as l } from "./badgeButtonContext.js";
13
- import re from "../../assets/svgs/clear.svg_raw.js";
14
- import { BB_BADGE_PT as u } from "./types.js";
15
- import { usePassthrough as ie, variantPt as d } from "../../composables/usePassthrough.js";
16
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, isVNode as x, mergeProps as S, openBlock as C, renderSlot as w, shallowRef as ae, toDisplayString as T, unref as E, useAttrs as D, useSlots as O, withCtx as k, withModifiers as A } from "vue";
4
+ import { useLogger as r } from "../../composables/useLogger.js";
5
+ import { removedPropsFor as ee } from "../../deprecation/removedProps.js";
6
+ import { warnRemovedAttrs as te } from "../../utilities/functions/warnRemovedAttrs.js";
7
+ import i from "../BbIcon/BbIcon.vue.js";
8
+ import a from "../BbSpinner/BbSpinner.vue.js";
9
+ import { SlotNodes as o, slotContent as s } from "../../utilities/functions/slotContent.js";
10
+ import c from "./BadgeBodyContent.vue.js";
11
+ import l from "./BbBadgeButton.vue.js";
12
+ import { provideBadgeHost as u } from "./badgeButtonContext.js";
13
+ import ne from "../../assets/svgs/clear.svg_raw.js";
14
+ import { BB_BADGE_PT as d } from "./types.js";
15
+ import { usePassthrough as re, variantPt as f } from "../../composables/usePassthrough.js";
16
+ import { useInternalIcon as p } from "../../composables/useInternalIcon.js";
17
+ import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as ie, createVNode as b, defineComponent as x, isVNode as ae, mergeProps as S, openBlock as C, renderSlot as w, shallowRef as oe, toDisplayString as T, unref as E, useAttrs as D, useSlots as O, withCtx as k, withModifiers as A } from "vue";
17
18
  // src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts
18
19
  var j = ["id"], M = {
19
20
  key: 2,
@@ -25,8 +26,8 @@ var j = ["id"], M = {
25
26
  ], P = {
26
27
  key: 3,
27
28
  class: "bb-sr-only"
28
- }, F = /*@__PURE__*/ b({
29
- mixins: [d(u)],
29
+ }, F = /*@__PURE__*/ x({
30
+ mixins: [f(d)],
30
31
  inheritAttrs: !1,
31
32
  __name: "BbBadge",
32
33
  props: {
@@ -81,64 +82,64 @@ var j = ["id"], M = {
81
82
  variant: { default: void 0 }
82
83
  },
83
84
  emits: ["click:clear"],
84
- setup(d, { emit: b }) {
85
- let F = d, I = b, L = O(), R = e("BbBadge", F, {
85
+ setup(f, { emit: x }) {
86
+ let F = f, I = x, L = O(), R = p("clear", ne), z = e("BbBadge", F, {
86
87
  size: "md",
87
88
  variant: "primary"
88
- }), z = ae(null), B = ie({
89
+ }), B = oe(null), V = re({
89
90
  component: "BbBadge",
90
91
  attrs: D(),
91
92
  props: F,
92
- parts: u.parts,
93
- states: u.states,
93
+ parts: d.parts,
94
+ states: d.states,
94
95
  active: {
95
96
  loading: () => !!F.loading,
96
- activeLink: () => !!z.value?.value.activeLink,
97
- exactActiveLink: () => !!z.value?.value.exactActiveLink
97
+ activeLink: () => !!B.value?.value.activeLink,
98
+ exactActiveLink: () => !!B.value?.value.exactActiveLink
98
99
  },
99
100
  variant: {
100
- ...u.variant,
101
- current: () => R.variant
101
+ ...d.variant,
102
+ current: () => z.variant
102
103
  }
103
104
  });
104
- process.env.NODE_ENV !== "production" && ne("BbBadge", te("BbBadge"));
105
- let V = [
105
+ process.env.NODE_ENV !== "production" && te("BbBadge", ee("BbBadge"));
106
+ let H = [
106
107
  "xs",
107
108
  "sm",
108
109
  "md",
109
110
  "lg",
110
111
  "xl",
111
112
  "2xl"
112
- ], { t: H } = n(), U = ee(), W = p(() => {
113
- let e = R.size, t = typeof e == "object" && e ? {
113
+ ], { t: U } = n(), W = r(), G = h(() => {
114
+ let e = z.size, t = typeof e == "object" && e ? {
114
115
  default: "md",
115
116
  ...e
116
117
  } : { default: e };
117
118
  return Object.entries(t).map(([e, t]) => {
118
119
  let n = t ?? "md";
119
- return V.includes(n) || (U.warn(`Invalid size: "${n}" in BbBadge. Expected one of: ${V.join(", ")}. Falling back to "md".`), n = "md"), e === "default" ? `bb-badge--${n}` : `bb-badge--${e}-${n}`;
120
+ return H.includes(n) || (W.warn(`Invalid size: "${n}" in BbBadge. Expected one of: ${H.join(", ")}. Falling back to "md".`), n = "md"), e === "default" ? `bb-badge--${n}` : `bb-badge--${e}-${n}`;
120
121
  });
121
- }), G = () => F.iconOnly === !0, K = [
122
+ }), K = () => F.iconOnly === !0, q = [
122
123
  "default",
123
124
  "sm",
124
125
  "md",
125
126
  "lg",
126
127
  "xl",
127
128
  "2xl"
128
- ], q = () => {
129
+ ], se = () => {
129
130
  let e = F.iconOnly;
130
131
  if (!e || e === !0) return [];
131
132
  let t = !!e.default;
132
- return K.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-badge--icon-${n}`] : []));
133
- }, J = (e) => o(L[`${e}:icon`], Y()), oe = () => !!F["prepend:icon"] || !!J("prepend"), se = () => !!F["append:icon"] || !!J("append"), Y = () => ({
134
- activeLink: !!z.value?.value.activeLink,
135
- exactActiveLink: !!z.value?.value.exactActiveLink,
133
+ return q.flatMap((n) => (n !== "default" && e[n] !== void 0 && (t = !!e[n]), t ? [`bb-badge--icon-${n}`] : []));
134
+ }, J = (e) => s(L[`${e}:icon`], Y()), ce = () => !!F["prepend:icon"] || !!J("prepend"), le = () => !!F["append:icon"] || !!J("append"), Y = () => ({
135
+ activeLink: !!B.value?.value.activeLink,
136
+ exactActiveLink: !!B.value?.value.exactActiveLink,
136
137
  loading: !!F.loading
137
- }), X = () => se() && !oe(), Z = (e) => Array.isArray(e) && e.some((e) => x(e) && (e.type === c || e.type === f && Z(e.children))), Q = () => Z(L.default?.({}));
138
- l({
139
- passthrough: B,
138
+ }), X = () => le() && !ce(), Z = (e) => Array.isArray(e) && e.some((e) => ae(e) && (e.type === l || e.type === m && Z(e.children))), Q = () => Z(L.default?.({}));
139
+ u({
140
+ passthrough: V,
140
141
  iconOnly: { get value() {
141
- return G();
142
+ return K();
142
143
  } },
143
144
  iconNodes: J,
144
145
  iconScope: { get value() {
@@ -163,50 +164,50 @@ var j = ["id"], M = {
163
164
  return !!F.clearable;
164
165
  } },
165
166
  reportLink: (e) => {
166
- z.value = e;
167
+ B.value = e;
167
168
  }
168
169
  });
169
- let ce = p(() => [
170
+ let ue = h(() => [
170
171
  "bb-badge",
171
- ...W.value,
172
- ...q(),
173
- R.variant && R.variant !== "none" && `bb-badge--${R.variant}`,
172
+ ...G.value,
173
+ ...se(),
174
+ z.variant && z.variant !== "none" && `bb-badge--${z.variant}`,
174
175
  {
175
- "bb-badge--icon": G(),
176
+ "bb-badge--icon": K(),
176
177
  "bb-badge--clearable": F.clearable,
177
178
  "bb-badge--loading": F.loading
178
179
  }
179
- ]), $ = t().id, le = p(() => F.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), ue = (e) => {
180
+ ]), $ = t().id, de = h(() => F.clearableLabel || Q() ? void 0 : `${$.value}__clear ${$.value}__body`), fe = (e) => {
180
181
  I("click:clear", e);
181
182
  };
182
- return (e, t) => (C(), g("span", S({ class: ce.value }, E(B).rootAttrs), [
183
- Q() ? w(e.$slots, "default", {}, void 0, void 0, 0) : (C(), g("span", {
183
+ return (e, t) => (C(), v("span", S({ class: ue.value }, E(V).rootAttrs), [
184
+ Q() ? w(e.$slots, "default", {}, void 0, void 0, 0) : (C(), v("span", {
184
185
  key: 1,
185
186
  id: `${E($)}__body`,
186
187
  class: "bb-badge__body"
187
- }, [y(s, null, {
188
- default: k(() => [w(e.$slots, "default", {}, () => [v(T(F.text), 1)])]),
188
+ }, [b(c, null, {
189
+ default: k(() => [w(e.$slots, "default", {}, () => [ie(T(F.text), 1)])]),
189
190
  _: 3
190
191
  })], 8, j)),
191
- F.clearable ? (C(), g("span", M, [G() ? h("", !0) : (C(), g(f, { key: 0 }, [F.loading && X() ? (C(), m(i, S({
192
+ F.clearable ? (C(), v("span", M, [K() ? _("", !0) : (C(), v(m, { key: 0 }, [F.loading && X() ? (C(), g(a, S({
192
193
  key: 0,
193
194
  class: "bb-badge__spinner bb-badge__append-icon"
194
- }, E(B).spinner), null, 16)) : J("append") ? (C(), g("span", S({
195
+ }, E(V).spinner), null, 16)) : J("append") ? (C(), v("span", S({
195
196
  key: 1,
196
197
  class: "bb-badge__append-icon bb-badge__icon-slot"
197
- }, E(B).icon), [y(E(a), { nodes: J("append") }, null, 8, ["nodes"])], 16)) : F["append:icon"] ? (C(), m(r, S({
198
+ }, E(V).icon), [b(E(o), { nodes: J("append") }, null, 8, ["nodes"])], 16)) : F["append:icon"] ? (C(), g(i, S({
198
199
  key: 2,
199
200
  class: "bb-badge__append-icon",
200
201
  icon: F["append:icon"]
201
- }, E(B).icon), null, 16, ["icon"])) : h("", !0)], 64)), _("button", S({
202
+ }, E(V).icon), null, 16, ["icon"])) : _("", !0)], 64)), y("button", S({
202
203
  id: `${E($)}__clear`,
203
- "aria-label": F.clearableLabel || E(H)("badge.clearLabel").value,
204
- "aria-labelledby": le.value,
204
+ "aria-label": F.clearableLabel || E(U)("badge.clearLabel").value,
205
+ "aria-labelledby": de.value,
205
206
  class: "bb-badge__clear",
206
207
  type: "button",
207
- onClick: A(ue, ["stop"])
208
- }, E(B).clear), [y(r, { icon: E(re) }, null, 8, ["icon"])], 16, N)])) : h("", !0),
209
- F.loading ? (C(), g("span", P, T(E(H)("common.loadingText")), 1)) : h("", !0)
208
+ onClick: A(fe, ["stop"])
209
+ }, E(V).clear), [b(i, { icon: E(R) }, null, 8, ["icon"])], 16, N)])) : _("", !0),
210
+ F.loading ? (C(), v("span", P, T(E(U)("common.loadingText")), 1)) : _("", !0)
210
211
  ], 16));
211
212
  }
212
213
  });