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
@@ -9,7 +9,8 @@ import l from "../BbIcon/BbIcon.vue.js";
9
9
  import u from "../ErrorIcon/ErrorIcon.vue.js";
10
10
  import d from "../../assets/svgs/check_stroke.svg_raw.js";
11
11
  import { transitions as f } from "../../utilities/misc/transitions.js";
12
- import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as ee, defineComponent as b, mergeProps as x, nextTick as te, normalizeClass as S, normalizeStyle as C, openBlock as w, ref as ne, renderList as re, renderSlot as T, toDisplayString as E, unref as D, useId as ie, useSlots as ae, useTemplateRef as O, watch as k, withModifiers as A } from "vue";
12
+ import { useInternalIcon as ee } from "../../composables/useInternalIcon.js";
13
+ import { Fragment as te, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, mergeProps as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, openBlock as w, ref as re, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useId as ie, useSlots as ae, useTemplateRef as k, watch as A, withModifiers as j } from "vue";
13
14
  import { useVirtualizer as oe } from "@tanstack/vue-virtual";
14
15
  // src/components/GroupedListBox/GroupedListBox.vue?vue&type=script&setup=true&lang.ts
15
16
  var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
@@ -50,7 +51,7 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
50
51
  }, be = ["id"], xe = ["id"], Se = {
51
52
  key: 1,
52
53
  class: "bb-listbox__loading bb-listbox__loading--below"
53
- }, Ce = ["id"], j = /*@__PURE__*/ b({
54
+ }, Ce = ["id"], M = /*@__PURE__*/ b({
54
55
  __name: "GroupedListBox",
55
56
  props: {
56
57
  passthrough: {},
@@ -77,11 +78,11 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
77
78
  "option:unselected",
78
79
  "focused:change"
79
80
  ],
80
- setup(f, { expose: b, emit: j }) {
81
- let M = f, N = j, we = ae(), { t: P } = n(), F = O("inner"), Te = O("listbox"), { touch: I } = i(), L = m(() => M.optionHeight ? M.optionHeight : s(I.value, !!M.compact, !!M.described)), R = m(() => M.headerHeight ? M.headerHeight : a(I.value, !!M.compact)), Ee = m(() => o(I.value)), z = (t) => e(M.groups[t].data) ? 0 : R.value, De = m(() => {
81
+ setup(f, { expose: b, emit: M }) {
82
+ let N = f, P = M, we = ae(), F = ee("check", d), { t: I } = n(), L = k("inner"), Te = k("listbox"), { touch: R } = i(), z = p(() => N.optionHeight ? N.optionHeight : s(R.value, !!N.compact, !!N.described)), B = p(() => N.headerHeight ? N.headerHeight : a(R.value, !!N.compact)), Ee = p(() => o(R.value)), V = (t) => e(N.groups[t].data) ? 0 : B.value, De = p(() => {
82
83
  let t = 0;
83
- return M.groups.map((n, r) => {
84
- let i = n.id, a = t, o = n.options.length, s = Y(r), c = e(n.data) ? void 0 : `${U}-group-header-${n.id}`, l = typeof n.data == "string" ? n.data : e(n.data) ? "" : JSON.stringify(n.data), u = n.options.every((e) => e.disabled), d = n.data, f = n.options;
84
+ return N.groups.map((n, r) => {
85
+ let i = n.id, a = t, o = n.options.length, s = ke(r), c = e(n.data) ? void 0 : `${G}-group-header-${n.id}`, l = typeof n.data == "string" ? n.data : e(n.data) ? "" : JSON.stringify(n.data), u = n.options.every((e) => e.disabled), d = n.data, f = n.options;
85
86
  return t += o, {
86
87
  offset: a,
87
88
  length: o,
@@ -95,15 +96,15 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
95
96
  options: f
96
97
  };
97
98
  });
98
- }), B = m(() => c(De.value, "index")), V = m(() => {
99
+ }), H = p(() => c(De.value, "index")), U = p(() => {
99
100
  let e = /* @__PURE__ */ new Map();
100
- return M.groups.flatMap((t, n) => t.options.map((r, i) => {
101
+ return N.groups.flatMap((t, n) => t.options.map((r, i) => {
101
102
  let a = r.valueHash, o = Oe(`${t.id}-${r.valueHash}`), s = (e.get(o) ?? 0) + 1;
102
103
  e.set(o, s);
103
104
  let c = s === 1 ? o : `${o}-${s}`;
104
105
  return {
105
106
  id: a,
106
- globalIndex: B.value[n].offset + i,
107
+ globalIndex: H.value[n].offset + i,
107
108
  groupIndex: n,
108
109
  groupId: t.id,
109
110
  indexInGroup: i,
@@ -120,61 +121,61 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
120
121
  create: r.create
121
122
  };
122
123
  }));
123
- }), H = m(() => {
124
- let e = M.groups.map(() => []);
125
- for (let t of V.value) e[t.groupIndex].push(t);
124
+ }), W = p(() => {
125
+ let e = N.groups.map(() => []);
126
+ for (let t of U.value) e[t.groupIndex].push(t);
126
127
  return e;
127
- }), U = ie(), Oe = (e) => `${U}-listbox-option-${e}`, W = (e) => `${e}__label`, G = (e) => `${e}__description`, K = (e) => !!e && !we.option, q = m(() => {
128
- if (e(Z.value)) return;
129
- let t = V.value[Z.value];
128
+ }), G = ie(), Oe = (e) => `${G}-listbox-option-${e}`, K = (e) => `${e}__label`, q = (e) => `${e}__description`, J = (e) => !!e && !we.option, Y = p(() => {
129
+ if (e(Q.value)) return;
130
+ let t = U.value[Q.value];
130
131
  if (t) return t.domId;
131
- }), J = m(() => V.value.length > 0);
132
- function Y(e) {
133
- return z(e) + M.groups[e].options.length * L.value;
132
+ }), X = p(() => U.value.length > 0);
133
+ function ke(e) {
134
+ return V(e) + N.groups[e].options.length * z.value;
134
135
  }
135
- let X = oe({
136
+ let Z = oe({
136
137
  get count() {
137
- return M.groups.length;
138
+ return N.groups.length;
138
139
  },
139
- getScrollElement: () => F.value ?? null,
140
- estimateSize: (e) => Y(e),
140
+ getScrollElement: () => L.value ?? null,
141
+ estimateSize: (e) => ke(e),
141
142
  overscan: 2
142
- }), ke = m(() => X.value.getVirtualItems()), Ae = m(() => X.value.getTotalSize()), { focusedIndex: Z, focusNext: je, focusPrevious: Me, focusFirst: Ne, focusLast: Pe, focusFirstSelected: Fe, focusLastSelected: Ie, focusByHash: Le, focusByPointer: Re, blurPointerFocus: ze, blur: Q, getHighlighted: Be } = r(m(() => V.value), { disabled: () => !M.open }), $ = ne(!1), Ve = async () => {
143
- if (!F.value || e(Z.value)) return;
144
- let n = () => F.value?.querySelector(`[data-index="${Z.value}"]`), r = V.value[Z.value]?.groupIndex;
145
- !n() && t(r) && (X.value.scrollToIndex(r, { align: "auto" }), await te());
143
+ }), Ae = p(() => Z.value.getVirtualItems()), je = p(() => Z.value.getTotalSize()), { focusedIndex: Q, focusNext: Me, focusPrevious: Ne, focusFirst: Pe, focusLast: Fe, focusFirstSelected: Ie, focusLastSelected: Le, focusByHash: Re, focusByPointer: ze, blurPointerFocus: Be, blur: Ve, getHighlighted: He } = r(p(() => U.value), { disabled: () => !N.open }), $ = re(!1), Ue = async () => {
144
+ if (!L.value || e(Q.value)) return;
145
+ let n = () => L.value?.querySelector(`[data-index="${Q.value}"]`), r = U.value[Q.value]?.groupIndex;
146
+ !n() && t(r) && (Z.value.scrollToIndex(r, { align: "auto" }), await ne());
146
147
  let i = n();
147
- i && (i.scrollIntoView({ block: "nearest" }), He(i));
148
- }, He = (e) => {
148
+ i && (i.scrollIntoView({ block: "nearest" }), We(i));
149
+ }, We = (e) => {
149
150
  let t = e.closest(".bb-listbox__group")?.querySelector(".bb-listbox__group-header");
150
- if (t && F.value) for (let n = 0; n < 3; n++) {
151
+ if (t && L.value) for (let n = 0; n < 3; n++) {
151
152
  let n = t.getBoundingClientRect().bottom - e.getBoundingClientRect().top;
152
153
  if (n <= 0) return;
153
- F.value.scrollTop -= n;
154
+ L.value.scrollTop -= n;
154
155
  }
155
156
  };
156
- k(Z, () => {
157
- $.value || Ve(), $.value = !1, N("focused:change", q.value);
157
+ A(Q, () => {
158
+ $.value || Ue(), $.value = !1, P("focused:change", Y.value);
158
159
  });
159
- let Ue = () => X.value.scrollToOffset(0), We = () => {
160
- let e = V.value.find((e) => e.selected);
161
- if (!e) return Ue();
162
- X.value.getTotalSize();
163
- let t = X.value.measurementsCache[e.groupIndex];
160
+ let Ge = () => Z.value.scrollToOffset(0), Ke = () => {
161
+ let e = U.value.find((e) => e.selected);
162
+ if (!e) return Ge();
163
+ Z.value.getTotalSize();
164
+ let t = Z.value.measurementsCache[e.groupIndex];
164
165
  if (!t) return;
165
- let n = z(e.groupIndex), r = (F.value?.clientHeight ?? 0) >= n + L.value;
166
- X.value.scrollToOffset(t.start + (r ? 0 : n) + e.indexInGroup * L.value);
166
+ let n = V(e.groupIndex), r = (L.value?.clientHeight ?? 0) >= n + z.value;
167
+ Z.value.scrollToOffset(t.start + (r ? 0 : n) + e.indexInGroup * z.value);
167
168
  };
168
- k(() => M.open && !!F.value, (e) => {
169
- e && We();
169
+ A(() => N.open && !!L.value, (e) => {
170
+ e && Ke();
170
171
  }, { flush: "post" });
171
- let Ge = (e) => {
172
- M.open && ($.value = !0, Re(e));
173
- }, Ke = () => {
174
- ze();
175
- }, qe = () => {
176
- if (e(Z.value) || !M.open) return;
177
- let t = V.value[Z.value];
172
+ let qe = (e) => {
173
+ N.open && ($.value = !0, ze(e));
174
+ }, Je = () => {
175
+ Be();
176
+ }, Ye = () => {
177
+ if (e(Q.value) || !N.open) return;
178
+ let t = U.value[Q.value];
178
179
  if (!t || t.disabled) return;
179
180
  let n = {
180
181
  text: t.text,
@@ -184,185 +185,185 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
184
185
  selected: t.selected,
185
186
  disabled: t.disabled
186
187
  };
187
- t.selected ? N("option:unselected", n) : N("option:selected", n);
188
- }, Je = (t) => {
189
- if (t.preventDefault(), F.value && t.target instanceof HTMLElement && Te.value) {
188
+ t.selected ? P("option:unselected", n) : P("option:selected", n);
189
+ }, Xe = (t) => {
190
+ if (t.preventDefault(), L.value && t.target instanceof HTMLElement && Te.value) {
190
191
  let n = t.target, r = n.dataset.index;
191
192
  for (; e(r) && n.parentElement;) n = n.parentElement, r = n.dataset.index;
192
193
  if (r) {
193
- let e = V.value[+r];
194
- e && !e.disabled && (Z.value = +r, qe());
194
+ let e = U.value[+r];
195
+ e && !e.disabled && (Q.value = +r, Ye());
195
196
  }
196
197
  }
197
198
  };
198
- return k(() => M.groups, (e, t) => {
199
- e.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") !== t.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") && (X.value.measure(), Q());
200
- }, { flush: "post" }), k([L, R], () => {
201
- X.value.measure();
199
+ return A(() => N.groups, (e, t) => {
200
+ e.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") !== t.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") && (Z.value.measure(), Ve());
201
+ }, { flush: "post" }), A([z, B], () => {
202
+ Z.value.measure();
202
203
  }, { flush: "post" }), b({
203
- focusNext: je,
204
- focusPrevious: Me,
205
- focusFirst: Ne,
206
- focusFirstSelected: Fe,
207
- focusLast: Pe,
208
- focusLastSelected: Ie,
209
- blur: Q,
210
- confirmOption: qe,
211
- focusByHash: Le,
212
- getHighlighted: Be,
213
- getActiveDescendantId: () => q.value,
214
- scrollToTop: Ue,
215
- scrollToSelected: We
216
- }), (e, t) => (w(), _("span", {
204
+ focusNext: Me,
205
+ focusPrevious: Ne,
206
+ focusFirst: Pe,
207
+ focusFirstSelected: Ie,
208
+ focusLast: Fe,
209
+ focusLastSelected: Le,
210
+ blur: Ve,
211
+ confirmOption: Ye,
212
+ focusByHash: Re,
213
+ getHighlighted: He,
214
+ getActiveDescendantId: () => Y.value,
215
+ scrollToTop: Ge,
216
+ scrollToSelected: Ke
217
+ }), (e, t) => (w(), g("span", {
217
218
  class: S(["bb-listbox bb-listbox--grouped", {
218
219
  "bb-listbox--compact": f.compact,
219
220
  "bb-listbox--described": f.described,
220
221
  "bb-listbox--loading": f.loading,
221
222
  "bb-listbox--multiple": f.multiple,
222
- "bb-listbox--empty": !J.value,
223
+ "bb-listbox--empty": !X.value,
223
224
  "bb-listbox--open": f.open
224
225
  }]),
225
226
  style: C({
226
227
  "--transition-duration": `${f.transitionDuration}ms`,
227
- "--option-height": `${L.value}px`,
228
- "--group-header-height": `${R.value}px`,
228
+ "--option-height": `${z.value}px`,
229
+ "--group-header-height": `${B.value}px`,
229
230
  "--option-font-size": Ee.value
230
231
  }),
231
- onClickCapture: Je,
232
- onClick: t[1] ||= A(() => {}, ["stop"]),
233
- onMousedown: t[2] ||= A(() => {}, ["prevent"])
234
- }, [v("span", se, [v("span", ce, [
235
- T(e.$slots, "options:prepend"),
236
- v("span", le, [f.loading && !J.value ? (w(), _("span", ue, [T(e.$slots, "loading", {}, () => [y(E(f.loadingText || D(P)("common.loadingText").value), 1)])])) : !J.value && !f.failedText ? (w(), _("span", de, [T(e.$slots, "empty", {}, () => [y(E(f.emptyText || D(P)("common.emptyText").value), 1)])])) : g("", !0)]),
237
- J.value ? (w(), _("span", x({
232
+ onClickCapture: Xe,
233
+ onClick: t[1] ||= j(() => {}, ["stop"]),
234
+ onMousedown: t[2] ||= j(() => {}, ["prevent"])
235
+ }, [_("span", se, [_("span", ce, [
236
+ E(e.$slots, "options:prepend"),
237
+ _("span", le, [f.loading && !X.value ? (w(), g("span", ue, [E(e.$slots, "loading", {}, () => [v(D(f.loadingText || O(I)("common.loadingText").value), 1)])])) : !X.value && !f.failedText ? (w(), g("span", de, [E(e.$slots, "empty", {}, () => [v(D(f.emptyText || O(I)("common.emptyText").value), 1)])])) : h("", !0)]),
238
+ X.value ? (w(), g("span", x({
238
239
  key: 0,
239
240
  id: f.id,
240
241
  ref: "listbox",
241
- "aria-activedescendant": q.value,
242
+ "aria-activedescendant": Y.value,
242
243
  "aria-label": f.listLabelledby ? void 0 : f.listLabel,
243
244
  "aria-labelledby": f.listLabelledby,
244
245
  "aria-multiselectable": f.multiple ? !0 : void 0,
245
246
  class: "bb-listbox__list",
246
247
  role: "listbox",
247
- style: { height: `${Ae.value}px` },
248
+ style: { height: `${je.value}px` },
248
249
  tabindex: "-1",
249
- onMouseleave: Ke
250
- }, f.passthrough?.list), [(w(!0), _(p, null, re(ke.value, (t) => (w(), _("span", {
251
- key: B.value[t.index].id,
252
- "aria-disabled": B.value[t.index].allOptionsAreDisabled,
253
- "aria-labelledby": B.value[t.index].headerId,
250
+ onMouseleave: Je
251
+ }, f.passthrough?.list), [(w(!0), g(te, null, T(Ae.value, (t) => (w(), g("span", {
252
+ key: H.value[t.index].id,
253
+ "aria-disabled": H.value[t.index].allOptionsAreDisabled,
254
+ "aria-labelledby": H.value[t.index].headerId,
254
255
  class: "bb-listbox__group",
255
256
  role: "group",
256
257
  style: C({ top: `${t.start}px` })
257
- }, [B.value[t.index].headerId ? (w(), _("span", {
258
+ }, [H.value[t.index].headerId ? (w(), g("span", x({
258
259
  key: 0,
259
- id: B.value[t.index].headerId,
260
+ id: H.value[t.index].headerId,
260
261
  class: "bb-listbox__group-header",
261
262
  role: "presentation"
262
- }, [T(e.$slots, "group", {
263
- disabled: B.value[t.index].allOptionsAreDisabled,
263
+ }, { ref_for: !0 }, f.passthrough?.part?.("groupHeader", { disabled: H.value[t.index].allOptionsAreDisabled || void 0 })), [E(e.$slots, "group", {
264
+ disabled: H.value[t.index].allOptionsAreDisabled,
264
265
  index: t.index,
265
- item: B.value[t.index].data,
266
- length: B.value[t.index].length,
267
- text: B.value[t.index].label
268
- }, () => [v("span", he, E(B.value[t.index].label), 1)])], 8, me)) : g("", !0), (w(!0), _(p, null, re(B.value[t.index].options, (n, r) => (w(), _("span", x({
269
- id: H.value[t.index][r].domId,
266
+ item: H.value[t.index].data,
267
+ length: H.value[t.index].length,
268
+ text: H.value[t.index].label
269
+ }, () => [_("span", he, D(H.value[t.index].label), 1)])], 16, me)) : h("", !0), (w(!0), g(te, null, T(H.value[t.index].options, (n, r) => (w(), g("span", x({
270
+ id: W.value[t.index][r].domId,
270
271
  key: n.valueHash,
271
- "aria-describedby": K(H.value[t.index][r].description) ? G(H.value[t.index][r].domId) : void 0,
272
- "aria-disabled": H.value[t.index][r].disabled ? !0 : void 0,
273
- "aria-labelledby": K(H.value[t.index][r].description) ? W(H.value[t.index][r].domId) : void 0,
274
- "aria-posinset": H.value[t.index][r].indexInGroup + 1,
275
- "aria-selected": H.value[t.index][r].selected,
276
- "aria-setsize": B.value[t.index].length,
272
+ "aria-describedby": J(W.value[t.index][r].description) ? q(W.value[t.index][r].domId) : void 0,
273
+ "aria-disabled": W.value[t.index][r].disabled ? !0 : void 0,
274
+ "aria-labelledby": J(W.value[t.index][r].description) ? K(W.value[t.index][r].domId) : void 0,
275
+ "aria-posinset": W.value[t.index][r].indexInGroup + 1,
276
+ "aria-selected": W.value[t.index][r].selected,
277
+ "aria-setsize": H.value[t.index].length,
277
278
  class: ["bb-listbox__option", {
278
- "bb-listbox__option--focused": D(Z) === H.value[t.index][r].globalIndex,
279
- "bb-listbox__option--selected": H.value[t.index][r].selected,
280
- "bb-listbox__option--disabled": H.value[t.index][r].disabled
279
+ "bb-listbox__option--focused": O(Q) === W.value[t.index][r].globalIndex,
280
+ "bb-listbox__option--selected": W.value[t.index][r].selected,
281
+ "bb-listbox__option--disabled": W.value[t.index][r].disabled
281
282
  }],
282
- "data-index": H.value[t.index][r].globalIndex,
283
+ "data-index": W.value[t.index][r].globalIndex,
283
284
  role: "option",
284
- onMouseenter: A((e) => Ge(H.value[t.index][r].globalIndex), ["stop"])
285
+ onMouseenter: j((e) => qe(W.value[t.index][r].globalIndex), ["stop"])
285
286
  }, { ref_for: !0 }, f.passthrough?.part?.("option", {
286
- selected: H.value[t.index][r].selected,
287
- disabled: H.value[t.index][r].disabled || void 0
288
- }, H.value[t.index][r].item)), [
289
- H.value[t.index][r]["prepend:icon"] ? (w(), h(l, x({
287
+ selected: W.value[t.index][r].selected,
288
+ disabled: W.value[t.index][r].disabled || void 0
289
+ }, W.value[t.index][r].item)), [
290
+ W.value[t.index][r]["prepend:icon"] ? (w(), m(l, x({
290
291
  key: 0,
291
292
  "aria-hidden": "true",
292
293
  class: "bb-listbox__item-icon bb-listbox__option-prepend-icon",
293
- icon: H.value[t.index][r]["prepend:icon"]
294
+ icon: W.value[t.index][r]["prepend:icon"]
294
295
  }, { ref_for: !0 }, f.passthrough?.part?.("itemIcon", {
295
- selected: H.value[t.index][r].selected,
296
- disabled: H.value[t.index][r].disabled || void 0
297
- }, H.value[t.index][r].item)), null, 16, ["icon"])) : g("", !0),
298
- H.value[t.index][r].create ? (w(), _("span", _e, [
299
- y(E(H.value[t.index][r].create.before), 1),
300
- v("strong", ve, E(H.value[t.index][r].create.query), 1),
301
- y(E(H.value[t.index][r].create.after), 1)
302
- ])) : T(e.$slots, "option", {
303
- description: H.value[t.index][r].description,
304
- disabled: !!H.value[t.index][r].disabled,
305
- focused: D(Z) === H.value[t.index][r].globalIndex,
306
- index: H.value[t.index][r].globalIndex,
307
- item: H.value[t.index][r].item,
308
- selected: !!H.value[t.index][r].selected,
309
- text: H.value[t.index][r].text,
310
- value: H.value[t.index][r].value
311
- }, () => [H.value[t.index][r].description ? (w(), _("span", ye, [v("span", x({
312
- id: W(H.value[t.index][r].domId),
296
+ selected: W.value[t.index][r].selected,
297
+ disabled: W.value[t.index][r].disabled || void 0
298
+ }, W.value[t.index][r].item)), null, 16, ["icon"])) : h("", !0),
299
+ W.value[t.index][r].create ? (w(), g("span", _e, [
300
+ v(D(W.value[t.index][r].create.before), 1),
301
+ _("strong", ve, D(W.value[t.index][r].create.query), 1),
302
+ v(D(W.value[t.index][r].create.after), 1)
303
+ ])) : E(e.$slots, "option", {
304
+ description: W.value[t.index][r].description,
305
+ disabled: !!W.value[t.index][r].disabled,
306
+ focused: O(Q) === W.value[t.index][r].globalIndex,
307
+ index: W.value[t.index][r].globalIndex,
308
+ item: W.value[t.index][r].item,
309
+ selected: !!W.value[t.index][r].selected,
310
+ text: W.value[t.index][r].text,
311
+ value: W.value[t.index][r].value
312
+ }, () => [W.value[t.index][r].description ? (w(), g("span", ye, [_("span", x({
313
+ id: K(W.value[t.index][r].domId),
313
314
  class: "bb-listbox__item-text"
314
315
  }, { ref_for: !0 }, f.passthrough?.part?.("itemText", {
315
- selected: H.value[t.index][r].selected,
316
- disabled: H.value[t.index][r].disabled || void 0
317
- }, H.value[t.index][r].item)), E(H.value[t.index][r].text), 17, be), v("span", x({
318
- id: G(H.value[t.index][r].domId),
316
+ selected: W.value[t.index][r].selected,
317
+ disabled: W.value[t.index][r].disabled || void 0
318
+ }, W.value[t.index][r].item)), D(W.value[t.index][r].text), 17, be), _("span", x({
319
+ id: q(W.value[t.index][r].domId),
319
320
  class: "bb-listbox__item-description"
320
321
  }, { ref_for: !0 }, f.passthrough?.part?.("itemDescription", {
321
- selected: H.value[t.index][r].selected,
322
- disabled: H.value[t.index][r].disabled || void 0
323
- }, H.value[t.index][r].item)), E(H.value[t.index][r].description), 17, xe)])) : (w(), _("span", x({
322
+ selected: W.value[t.index][r].selected,
323
+ disabled: W.value[t.index][r].disabled || void 0
324
+ }, W.value[t.index][r].item)), D(W.value[t.index][r].description), 17, xe)])) : (w(), g("span", x({
324
325
  key: 1,
325
326
  class: "bb-listbox__item-text"
326
327
  }, { ref_for: !0 }, f.passthrough?.part?.("itemText", {
327
- selected: H.value[t.index][r].selected,
328
- disabled: H.value[t.index][r].disabled || void 0
329
- }, H.value[t.index][r].item)), E(H.value[t.index][r].text), 17))], void 0, 2),
330
- H.value[t.index][r]["append:icon"] && !H.value[t.index][r].selected ? (w(), h(l, x({
328
+ selected: W.value[t.index][r].selected,
329
+ disabled: W.value[t.index][r].disabled || void 0
330
+ }, W.value[t.index][r].item)), D(W.value[t.index][r].text), 17))], void 0, 2),
331
+ W.value[t.index][r]["append:icon"] && !W.value[t.index][r].selected ? (w(), m(l, x({
331
332
  key: 3,
332
333
  "aria-hidden": "true",
333
334
  class: "bb-listbox__item-icon bb-listbox__option-append-icon",
334
- icon: H.value[t.index][r]["append:icon"]
335
+ icon: W.value[t.index][r]["append:icon"]
335
336
  }, { ref_for: !0 }, f.passthrough?.part?.("itemIcon", {
336
- selected: H.value[t.index][r].selected,
337
- disabled: H.value[t.index][r].disabled || void 0
338
- }, H.value[t.index][r].item)), null, 16, ["icon"])) : g("", !0),
339
- ee(l, x({
337
+ selected: W.value[t.index][r].selected,
338
+ disabled: W.value[t.index][r].disabled || void 0
339
+ }, W.value[t.index][r].item)), null, 16, ["icon"])) : h("", !0),
340
+ y(l, x({
340
341
  "aria-hidden": "true",
341
- class: "bb-listbox__option-check",
342
- icon: D(d)
342
+ class: ["bb-listbox__option-check", { "bb-listbox__option-check--own": O(F) !== O(d) }],
343
+ icon: O(F)
343
344
  }, { ref_for: !0 }, f.passthrough?.part?.("check", {
344
- selected: H.value[t.index][r].selected,
345
- disabled: H.value[t.index][r].disabled || void 0
346
- }, H.value[t.index][r].item)), null, 16, ["icon"])
347
- ], 16, ge))), 128))], 12, pe))), 128))], 16, fe)) : g("", !0),
348
- f.loading && f.loadingBelow && J.value ? (w(), _("span", Se, [T(e.$slots, "loading", {}, () => [y(E(f.loadingText || D(P)("common.loadingText").value), 1)])])) : g("", !0),
349
- T(e.$slots, "options:append")
350
- ], 512)]), f.failedText && !f.loading ? (w(), _("span", {
345
+ selected: W.value[t.index][r].selected,
346
+ disabled: W.value[t.index][r].disabled || void 0
347
+ }, W.value[t.index][r].item)), null, 16, ["class", "icon"])
348
+ ], 16, ge))), 128))], 12, pe))), 128))], 16, fe)) : h("", !0),
349
+ f.loading && f.loadingBelow && X.value ? (w(), g("span", Se, [E(e.$slots, "loading", {}, () => [v(D(f.loadingText || O(I)("common.loadingText").value), 1)])])) : h("", !0),
350
+ E(e.$slots, "options:append")
351
+ ], 512)]), f.failedText && !f.loading ? (w(), g("span", {
351
352
  key: 0,
352
- class: S(["bb-listbox__failed", { "bb-listbox__failed--divided": J.value }]),
353
+ class: S(["bb-listbox__failed", { "bb-listbox__failed--divided": X.value }]),
353
354
  role: "status"
354
355
  }, [
355
- ee(u, { class: "bb-listbox__failed-icon" }),
356
- v("span", {
356
+ y(u, { class: "bb-listbox__failed-icon" }),
357
+ _("span", {
357
358
  id: `${f.id}_failed`,
358
359
  class: "bb-listbox__failed-text"
359
- }, E(f.failedText), 9, Ce),
360
- v("button", {
360
+ }, D(f.failedText), 9, Ce),
361
+ _("button", {
361
362
  class: "bb-load-retry",
362
363
  type: "button",
363
- onClick: t[0] ||= (e) => N("retry", e)
364
- }, E(D(P)("common.retryLabel").value), 1)
365
- ], 2)) : g("", !0)], 38));
364
+ onClick: t[0] ||= (e) => P("retry", e)
365
+ }, D(O(I)("common.retryLabel").value), 1)
366
+ ], 2)) : h("", !0)], 38));
366
367
  }
367
368
  });
368
- export { j as default };
369
+ export { M as default };
@@ -1,15 +1,17 @@
1
1
  import e from "../BbIcon/BbIcon.vue.js";
2
2
  import t from "../../assets/svgs/alert.svg_raw.js";
3
- import { createBlock as n, defineComponent as r, openBlock as i, unref as a } from "vue";
3
+ import { useInternalIcon as n } from "../../composables/useInternalIcon.js";
4
+ import { createBlock as r, defineComponent as i, openBlock as a, unref as o } from "vue";
4
5
  // src/components/WarningIcon/WarningIcon.vue?vue&type=script&setup=true&lang.ts
5
- var o = /*@__PURE__*/ r({
6
+ var s = /*@__PURE__*/ i({
6
7
  __name: "WarningIcon",
7
- setup(r) {
8
- return (r, o) => (i(), n(e, {
8
+ setup(i) {
9
+ let s = n("warning", t);
10
+ return (t, n) => (a(), r(e, {
9
11
  "aria-hidden": "true",
10
12
  class: "bb-warning-icon",
11
- icon: a(t)
13
+ icon: o(s)
12
14
  }, null, 8, ["icon"]));
13
15
  }
14
16
  });
15
- export { o as default };
17
+ export { s as default };
@@ -0,0 +1,25 @@
1
+ import { useConfig as e } from "./useConfig.js";
2
+ import { appComponents as t } from "../utils/configScope.js";
3
+ import { LIBRARY_COMPONENT_NAMES as n } from "../types/internalIcons.js";
4
+ import { computed as r, getCurrentInstance as i, shallowRef as a } from "vue";
5
+ // src/composables/useInternalIcon.ts
6
+ var o = a(null), s = (e) => {
7
+ let t = [], r = e;
8
+ for (; r;) {
9
+ let e = r.type, i = e.__name ?? e.name;
10
+ if (!i || !n.has(i)) break;
11
+ t.push(i), r = r.vnode.ctx ?? null;
12
+ }
13
+ return t;
14
+ }, c = (n, a) => {
15
+ let c = s(i()), l = e();
16
+ return r(() => {
17
+ let e = t.value;
18
+ for (let t = c.length - 1; t >= 0; t--) {
19
+ let r = e[c[t]]?.icons?.[n];
20
+ if (r) return r;
21
+ }
22
+ return (o.value ?? l.iconDefaults)?.[n] ?? a;
23
+ });
24
+ };
25
+ export { c as useInternalIcon };
@@ -95,7 +95,7 @@ export declare function looksBinary(bytes: Buffer): boolean;
95
95
  export declare const hasGlobMagic: (pattern: string) => boolean;
96
96
  /**
97
97
  * A small glob → RegExp for the two places the plugin matches globs against
98
- * NAMES rather than gitignore paths: `iconWhitelist` entries
98
+ * NAMES rather than gitignore paths: `icons.whitelist` entries
99
99
  * (`tabler:calendar-*`) and the pattern half of an `include` entry. Supports
100
100
  * `*` (no slash), `**` (anything), `?`, `[…]` classes and `{a,b}` alternation.
101
101
  */