bitboss-ui 3.0.0-beta.21 → 3.0.0-beta.22

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 (183) hide show
  1. package/README.md +55 -3
  2. package/bin/bitboss-ui-mcp.mjs +419 -9
  3. package/bin/bitboss-ui.mjs +293 -22
  4. package/dist/ai/BbAccordion.md +21 -23
  5. package/dist/ai/BbAlert.md +6 -12
  6. package/dist/ai/BbAvatar.md +60 -24
  7. package/dist/ai/BbBadge.md +12 -20
  8. package/dist/ai/BbBaseButton.md +14 -16
  9. package/dist/ai/BbBaseCheckboxIcon.md +6 -10
  10. package/dist/ai/BbBaseRadioIcon.md +6 -10
  11. package/dist/ai/BbBaseSwitchIcon.md +5 -9
  12. package/dist/ai/BbBreadcrumbs.md +23 -34
  13. package/dist/ai/BbButton.md +35 -47
  14. package/dist/ai/BbCheckbox.md +21 -37
  15. package/dist/ai/BbCheckboxGroup.md +13 -13
  16. package/dist/ai/BbCollapsible.md +14 -26
  17. package/dist/ai/BbColorInput.md +13 -23
  18. package/dist/ai/BbColorPalette.md +23 -35
  19. package/dist/ai/BbConfirm.md +17 -32
  20. package/dist/ai/BbDatePickerInput.md +15 -21
  21. package/dist/ai/BbDialog.md +159 -62
  22. package/dist/ai/BbDropdown.md +21 -25
  23. package/dist/ai/BbDropdownButton.md +13 -30
  24. package/dist/ai/BbDropzone.md +9 -11
  25. package/dist/ai/BbIcon.md +44 -33
  26. package/dist/ai/BbIndicator.md +2 -2
  27. package/dist/ai/BbNumberInput.md +18 -20
  28. package/dist/ai/BbOffCanvas.md +42 -42
  29. package/dist/ai/BbPagination.md +21 -23
  30. package/dist/ai/BbPopover.md +15 -17
  31. package/dist/ai/BbProgress.md +40 -51
  32. package/dist/ai/BbRadio.md +9 -9
  33. package/dist/ai/BbRadioGroup.md +7 -11
  34. package/dist/ai/BbRating.md +8 -12
  35. package/dist/ai/BbSelect.md +32 -36
  36. package/dist/ai/BbSelectPopover.md +19 -31
  37. package/dist/ai/BbSlider.md +15 -19
  38. package/dist/ai/BbSmoothHeight.md +16 -31
  39. package/dist/ai/BbSpinner.md +118 -74
  40. package/dist/ai/BbSwitch.md +25 -18
  41. package/dist/ai/BbSwitchGroup.md +9 -14
  42. package/dist/ai/BbTable.md +102 -55
  43. package/dist/ai/BbTabs.md +59 -82
  44. package/dist/ai/BbTag.md +12 -23
  45. package/dist/ai/BbTextInput.md +20 -26
  46. package/dist/ai/BbTextarea.md +28 -34
  47. package/dist/ai/BbToast.md +14 -34
  48. package/dist/ai/BbTooltip.md +22 -20
  49. package/dist/ai/BbTree.md +46 -72
  50. package/dist/ai/changelog.json +169 -62
  51. package/dist/ai/components.json +1467 -9
  52. package/dist/ai/composables/useConfirm.md +5 -2
  53. package/dist/ai/composables/useToast.md +4 -2
  54. package/dist/ai/guides/agent-contract.md +7 -4
  55. package/dist/ai/guides/ai-router.md +37 -22
  56. package/dist/ai/guides/component-picker.md +23 -18
  57. package/dist/ai/guides/design-language.md +141 -13
  58. package/dist/ai/guides/design-tokens.md +29 -4
  59. package/dist/ai/guides/icons-policy.md +46 -21
  60. package/dist/ai/guides/installation-and-plugin-setup.md +253 -17
  61. package/dist/ai/guides/migration/components/bb-rating.md +26 -1
  62. package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
  63. package/dist/ai/guides/migration/v2-to-v3.md +50 -23
  64. package/dist/ai/index.md +1 -1
  65. package/dist/ai/recipes/inertia/approvals-inbox.md +3 -3
  66. package/dist/ai/recipes/inertia/inline-edit-workspace.md +2 -2
  67. package/dist/ai/recipes/inertia/onboarding.md +2 -2
  68. package/dist/ai/recipes/inertia/ownership-atlas.md +6 -6
  69. package/dist/ai/recipes/inertia/record-form.md +5 -5
  70. package/dist/ai/recipes/inertia/records-workspace.md +4 -4
  71. package/dist/ai/recipes/inertia/upload-center.md +6 -6
  72. package/dist/ai/recipes/inertia/wizard-form.md +5 -5
  73. package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -3
  74. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +2 -2
  75. package/dist/ai/recipes/nuxt/onboarding.md +2 -2
  76. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  77. package/dist/ai/recipes/nuxt/records-workspace.md +4 -4
  78. package/dist/ai/recipes/nuxt/upload-center.md +6 -6
  79. package/dist/ai/recipes/nuxt/wizard-form.md +5 -5
  80. package/dist/ai/recipes/vue/approvals-inbox.md +3 -3
  81. package/dist/ai/recipes/vue/inline-edit-workspace.md +2 -2
  82. package/dist/ai/recipes/vue/onboarding.md +2 -2
  83. package/dist/ai/recipes/vue/record-form.md +10 -10
  84. package/dist/ai/recipes/vue/records-workspace.md +4 -4
  85. package/dist/ai/recipes/vue/upload-center.md +6 -6
  86. package/dist/ai/recipes/vue/wizard-form.md +5 -5
  87. package/dist/ai/source/BbBadge.md +1 -1
  88. package/dist/ai/source/BbBaseCheckbox.md +1 -1
  89. package/dist/ai/source/BbBaseDatePicker.md +5 -5
  90. package/dist/ai/source/BbBaseDatePickerInput.md +2 -2
  91. package/dist/ai/source/BbBaseRadio.md +1 -1
  92. package/dist/ai/source/BbBaseRating.md +5 -5
  93. package/dist/ai/source/BbBaseSelect.md +1 -1
  94. package/dist/ai/source/BbBaseSlider.md +5 -5
  95. package/dist/ai/source/BbBaseSwitch.md +1 -1
  96. package/dist/ai/source/BbBaseTimePickerInput.md +1 -1
  97. package/dist/ai/source/BbBreadcrumbs.md +20 -1
  98. package/dist/ai/source/BbButton.md +2 -2
  99. package/dist/ai/source/BbDialog.md +39 -8
  100. package/dist/ai/source/BbDropdown.md +1 -1
  101. package/dist/ai/source/BbDropzone.md +5 -5
  102. package/dist/ai/source/BbIcon.md +23 -10
  103. package/dist/ai/source/BbOffCanvas.md +50 -28
  104. package/dist/ai/source/BbPagination.md +2 -2
  105. package/dist/ai/source/BbPopover.md +12 -1
  106. package/dist/ai/source/BbSelectPopover.md +45 -7
  107. package/dist/ai/source/BbSpinner.md +2 -2
  108. package/dist/ai/source/BbTable.md +11 -11
  109. package/dist/ai/source/BbTooltip.md +57 -10
  110. package/dist/ai/source/ChipsBox.md +1 -1
  111. package/dist/ai/source/CommaBox.md +1 -1
  112. package/dist/ai/source/GuidesComponent.md +14 -7
  113. package/dist/ai/source/OptionsContainer.md +1 -1
  114. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +1 -1
  115. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +1 -1
  116. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
  117. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +4 -4
  118. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +1 -1
  119. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
  120. package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +1 -1
  121. package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +3 -3
  123. package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +1 -1
  124. package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +3 -3
  125. package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
  126. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
  127. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +71 -71
  128. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +2 -2
  129. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +102 -97
  130. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +1 -1
  131. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +58 -58
  132. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +2 -2
  133. package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +33 -35
  134. package/dist/components/BbIcon/iconCache.d.ts +30 -0
  135. package/dist/components/BbIcon/iconCache.js +21 -3
  136. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +57 -56
  137. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +2 -2
  138. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +138 -138
  139. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +43 -43
  140. package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +1 -1
  141. package/dist/components/BbSpinner/types.d.ts +1 -1
  142. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +8 -8
  143. package/dist/components/BbTable/BbTableDataRow.js +2 -2
  144. package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +62 -62
  145. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +81 -78
  146. package/dist/components/BbTooltip/types.d.ts +8 -1
  147. package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +1 -1
  148. package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +1 -1
  149. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +1 -1
  150. package/dist/composables/useConfirm.d.ts +22 -0
  151. package/dist/composables/useConfirm.js +43 -40
  152. package/dist/composables/useSafeAreaInternal.js +1 -1
  153. package/dist/composables/useToast.d.ts +16 -0
  154. package/dist/composables/useToast.js +20 -16
  155. package/dist/composables/useViewportWidth.d.ts +20 -6
  156. package/dist/composables/useViewportWidth.js +8 -7
  157. package/dist/icon-scan.d.ts +276 -0
  158. package/dist/icon-scan.js +485 -0
  159. package/dist/icons-whitelist.d.ts +5 -4
  160. package/dist/llms-full.txt +1979 -1527
  161. package/dist/llms-medium.txt +461 -74
  162. package/dist/llms.txt +1 -1
  163. package/dist/nuxt.js +10 -7
  164. package/dist/plugin.js +1 -0
  165. package/dist/runtime/nuxt-plugin.js +2 -1
  166. package/dist/styles.css +1 -1
  167. package/dist/types/Config.d.ts +18 -0
  168. package/dist/utils/cssLayers.d.ts +91 -0
  169. package/dist/utils/cssLayers.js +43 -0
  170. package/dist/utils/injectLibraryStyles.d.ts +3 -1
  171. package/dist/utils/injectLibraryStyles.js +24 -23
  172. package/dist/vite-plugin.d.ts +74 -11
  173. package/dist/vite.js +292 -253
  174. package/llms.txt +1 -1
  175. package/package.json +7 -5
  176. package/scripts/lib/ensure-manifest.mjs +28 -5
  177. package/scripts/lib/eslint-plugin.d.ts +35 -0
  178. package/scripts/lib/eslint-plugin.mjs +299 -3
  179. package/scripts/lib/hand-roll-hints.mjs +50 -6
  180. package/scripts/lib/html-attributes.mjs +42 -0
  181. package/scripts/lib/mcp-config.mjs +38 -34
  182. package/scripts/lib/public-type-exports.mjs +246 -0
  183. package/scripts/lib/validate-bb-markup.mjs +205 -12
@@ -7,7 +7,7 @@ export type Size = IconSize;
7
7
  export type BbSpinnerProps = Pick<BbIconProps, 'size'> & {
8
8
  /**
9
9
  * Accessible loading announcement. When set, the spinner is wrapped in a
10
- * `role="status"` element containing this text rendered `sr-only`, so
10
+ * `role="status"` element containing this text rendered `bb-sr-only`, so
11
11
  * screen readers announce the loading state. When omitted the markup is
12
12
  * unchanged and the spinner is purely decorative.
13
13
  */
@@ -27,18 +27,18 @@ import { defaultRangeExtractor as Ve, elementScroll as He, observeElementOffset
27
27
  //#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
28
28
  var Ye = {
29
29
  key: 0,
30
- class: "sr-only"
30
+ class: "bb-sr-only"
31
31
  }, Xe = ["id"], Ze = ["id"], Qe = {
32
32
  "aria-live": "polite",
33
- class: "bb-table-loading__text sr-only",
33
+ class: "bb-table-loading__text bb-sr-only",
34
34
  role: "status"
35
35
  }, $e = {
36
36
  "aria-live": "polite",
37
- class: "bb-table__reorder-status sr-only",
37
+ class: "bb-table__reorder-status bb-sr-only",
38
38
  role: "status"
39
- }, et = ["aria-labelledby", "aria-rowcount"], tt = ["inert"], nt = ["aria-rowindex"], rt = { class: "bb-table-header__content" }, it = { class: "bb-table-check__label-text sr-only" }, at = {
39
+ }, et = ["aria-labelledby", "aria-rowcount"], tt = ["inert"], nt = ["aria-rowindex"], rt = { class: "bb-table-header__content" }, it = { class: "bb-table-check__label-text bb-sr-only" }, at = {
40
40
  key: 1,
41
- class: "bb-table-radio__label-text sr-only"
41
+ class: "bb-table-radio__label-text bb-sr-only"
42
42
  }, ot = [
43
43
  "aria-describedby",
44
44
  "aria-sort",
@@ -50,7 +50,7 @@ var Ye = {
50
50
  ], st = { class: "bb-table-header__content" }, ct = {
51
51
  key: 1,
52
52
  class: "bb-table-header__content"
53
- }, lt = ["onDblclick", "onPointerdown"], ut = { class: "bb-table-header__content sr-only" }, dt = ["aria-rowindex"], ft = {
53
+ }, lt = ["onDblclick", "onPointerdown"], ut = { class: "bb-table-header__content bb-sr-only" }, dt = ["aria-rowindex"], ft = {
54
54
  key: 0,
55
55
  class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
56
56
  role: "cell"
@@ -1478,12 +1478,12 @@ var Ye = {
1478
1478
  e.caption ? (S(), _("div", {
1479
1479
  key: 1,
1480
1480
  id: nn.value,
1481
- class: b(["bb-table-caption", { "sr-only": !e.displayCaption }])
1481
+ class: b(["bb-table-caption", { "bb-sr-only": !e.displayCaption }])
1482
1482
  }, T(e.caption), 11, Xe)) : g("", !0),
1483
1483
  e.reorderable || e.resizable ? (S(), _("div", {
1484
1484
  key: 2,
1485
1485
  id: rn.value,
1486
- class: "sr-only"
1486
+ class: "bb-sr-only"
1487
1487
  }, [e.reorderable ? (S(), _(m, { key: 0 }, [Ce(T(E(L)("table.reorderInstructions").value), 1)], 64)) : g("", !0), e.resizable && !J.value ? (S(), _(m, { key: 1 }, [Ce(T(E(L)("table.resizeInstructions").value), 1)], 64)) : g("", !0)], 8, Ze)) : g("", !0),
1488
1488
  v("span", Qe, T(Di.value ? e.loadingText || E(L)("common.loadingText").value : ""), 1),
1489
1489
  e.reorderable ? (S(), _(m, { key: 3 }, [v("span", $e, T(fn.value), 1), v("div", {
@@ -54,7 +54,7 @@ var s = r({
54
54
  disabled: o.disabled,
55
55
  readonly: n.readonly,
56
56
  onChange: l
57
- }), i("span", { class: "bb-table-check__label-text sr-only" }, o.accessibleLabel)]) : i("label", { class: ["bb-table-radio__label", { "bb-table-radio__label--disabled": o.disabled }] }, [i(t, {
57
+ }), i("span", { class: "bb-table-check__label-text bb-sr-only" }, o.accessibleLabel)]) : i("label", { class: ["bb-table-radio__label", { "bb-table-radio__label--disabled": o.disabled }] }, [i(t, {
58
58
  checked: o.selected,
59
59
  class: "bb-table-radio",
60
60
  disabled: o.disabled,
@@ -62,7 +62,7 @@ var s = r({
62
62
  readonly: n.readonly,
63
63
  value: o.value,
64
64
  onChange: l
65
- }), i("span", { class: "bb-table-radio__label-text sr-only" }, o.accessibleLabel)])]));
65
+ }), i("span", { class: "bb-table-radio__label-text bb-sr-only" }, o.accessibleLabel)])]));
66
66
  }, d = () => {
67
67
  let { context: e, item: t } = r, s = t.cols.length - 1;
68
68
  return t.cols.map((c, l) => i("div", {
@@ -1,92 +1,92 @@
1
1
  import { overlaySurfaceIsolation as e } from "../../utils/overlaySurfaceIsolation.js";
2
- import { viewportHeight as t, viewportWidth as n } from "../../composables/useViewportWidth.js";
3
- import { topLayerHost as r } from "../../composables/useTopLayer.js";
4
- import { useSafeAreaInternal as i } from "../../composables/useSafeAreaInternal.js";
5
- import { dismissToast as a } from "../../composables/useToast.js";
6
- import o from "./BbToastMessage.vue.js";
7
- import { Fragment as s, computed as c, createBlock as l, createElementBlock as u, defineComponent as d, mergeProps as f, onBeforeUnmount as p, onMounted as m, openBlock as h, reactive as g, ref as _, renderList as v, toHandlers as y, unref as b, watch as x, watchEffect as S } from "vue";
2
+ import { viewportClientHeight as t, viewportClientWidth as n, viewportWidth as r } from "../../composables/useViewportWidth.js";
3
+ import { topLayerHost as i } from "../../composables/useTopLayer.js";
4
+ import { useSafeAreaInternal as a } from "../../composables/useSafeAreaInternal.js";
5
+ import { dismissToast as o } from "../../composables/useToast.js";
6
+ import s from "./BbToastMessage.vue.js";
7
+ import { Fragment as c, computed as l, createBlock as u, createElementBlock as d, defineComponent as f, mergeProps as p, onBeforeUnmount as m, onMounted as h, openBlock as g, reactive as _, ref as v, renderList as y, toHandlers as b, unref as x, watch as S, watchEffect as C } from "vue";
8
8
  //#region src/components/BbToast/BbToastRegion.vue?vue&type=script&setup=true&lang.ts
9
- var C = /*@__PURE__*/ d({
9
+ var w = /*@__PURE__*/ f({
10
10
  __name: "BbToastRegion",
11
11
  props: {
12
12
  position: {},
13
13
  toasts: {}
14
14
  },
15
- setup(d) {
16
- let C = d, w = _(), T = _(!1), E = _(!1), D = g({}), O = c(() => T.value), k = c(() => T.value || E.value), A = _(0), j = _(0), M = g({});
17
- S(() => {
18
- let e = C.toasts.filter((e) => !e.removed), t = e.length - 1;
15
+ setup(f) {
16
+ let w = f, T = v(), E = v(!1), D = v(!1), O = _({}), k = l(() => E.value), A = l(() => E.value || D.value), j = v(0), M = v(0), N = _({});
17
+ C(() => {
18
+ let e = w.toasts.filter((e) => !e.removed), t = e.length - 1;
19
19
  e.forEach((n, r) => {
20
20
  let i = 0;
21
- for (let n = r + 1; n <= t; n++) i += D[e[n].id] ?? 0;
22
- M[n.id] = {
21
+ for (let n = r + 1; n <= t; n++) i += O[e[n].id] ?? 0;
22
+ N[n.id] = {
23
23
  frontIndex: t - r,
24
24
  heightBefore: i
25
25
  };
26
- }), A.value = e.length, j.value = t >= 0 ? D[e[t].id] ?? 0 : 0;
27
- let n = new Set(C.toasts.map((e) => e.id));
28
- for (let e of Object.keys(M)) n.has(e) || delete M[e];
29
- for (let e of Object.keys(D)) n.has(e) || delete D[e];
26
+ }), j.value = e.length, M.value = t >= 0 ? O[e[t].id] ?? 0 : 0;
27
+ let n = new Set(w.toasts.map((e) => e.id));
28
+ for (let e of Object.keys(N)) n.has(e) || delete N[e];
29
+ for (let e of Object.keys(O)) n.has(e) || delete O[e];
30
30
  });
31
- let { occupied: N } = i(), P = c(() => n.value < 640 ? 14 : 20), F = c(() => {
32
- let e = C.toasts.filter((e) => !e.removed);
33
- return O.value && e.length ? e.reduce((e, t) => e + (D[t.id] ?? 0), 0) : j.value;
34
- }), I = c(() => {
35
- let e = P.value * 2, r = C.position.startsWith("top") ? N.top.value : N.bottom.value, i = r + F.value + e <= t.value, a = C.position.endsWith("right") ? N.right.value : C.position.endsWith("left") ? N.left.value : 0, o = a + (w.value?.offsetWidth ?? 356) + e <= n.value;
31
+ let { occupied: P } = a(), F = l(() => r.value < 640 ? 14 : 20), I = l(() => {
32
+ let e = w.toasts.filter((e) => !e.removed);
33
+ return k.value && e.length ? e.reduce((e, t) => e + (O[t.id] ?? 0), 0) : M.value;
34
+ }), L = l(() => {
35
+ let e = F.value * 2, r = w.position.startsWith("top") ? P.top.value : P.bottom.value, i = r + I.value + e <= t.value, a = w.position.endsWith("right") ? P.right.value : w.position.endsWith("left") ? P.left.value : 0, o = a + (T.value?.offsetWidth ?? 356) + e <= n.value;
36
36
  return {
37
37
  "--safe-v": `${i ? r : 0}px`,
38
38
  "--safe-h": `${o ? a : 0}px`
39
39
  };
40
- }), L = c(() => ({
41
- height: `${F.value}px`,
42
- ...I.value
43
- })), R = () => {
44
- let e = w.value;
40
+ }), R = l(() => ({
41
+ height: `${I.value}px`,
42
+ ...L.value
43
+ })), z = () => {
44
+ let e = T.value;
45
45
  !e || !e.isConnected || (e.matches(":popover-open") && e.hidePopover(), e.showPopover());
46
46
  };
47
- x([
48
- c(() => C.toasts.filter((e) => !e.removed).length),
49
- c(() => N.top.value + N.right.value + N.bottom.value + N.left.value),
50
- r
47
+ S([
48
+ l(() => w.toasts.filter((e) => !e.removed).length),
49
+ l(() => P.top.value + P.right.value + P.bottom.value + P.left.value),
50
+ i
51
51
  ], ([e, t, n], [r, i, a]) => {
52
- e !== 0 && (e > r || t !== i || n !== a) && R();
52
+ e !== 0 && (e > r || t !== i || n !== a) && z();
53
53
  }, { flush: "post" });
54
- let z = (e, t) => {
55
- D[e] = t;
56
- }, B = (e, t) => {
57
- a(e, t);
58
- }, V = (e) => {
59
- w.value?.contains(e.relatedTarget) || (T.value = !1);
60
- }, H = () => {
61
- E.value = document.hidden;
54
+ let B = (e, t) => {
55
+ O[e] = t;
56
+ }, V = (e, t) => {
57
+ o(e, t);
58
+ }, H = (e) => {
59
+ T.value?.contains(e.relatedTarget) || (E.value = !1);
60
+ }, U = () => {
61
+ D.value = document.hidden;
62
62
  };
63
- return m(() => {
64
- w.value?.showPopover(), document.addEventListener("visibilitychange", H);
65
- }), p(() => {
66
- w.value?.hidePopover(), document.removeEventListener("visibilitychange", H);
67
- }), (t, n) => (h(), u("ol", f({
63
+ return h(() => {
64
+ T.value?.showPopover(), document.addEventListener("visibilitychange", U);
65
+ }), m(() => {
66
+ T.value?.hidePopover(), document.removeEventListener("visibilitychange", U);
67
+ }), (t, n) => (g(), d("ol", p({
68
68
  ref_key: "regionEl",
69
- ref: w,
70
- class: ["bb-toast", [`bb-toast--${t.position}`, { "bb-toast--expanded": O.value }]],
69
+ ref: T,
70
+ class: ["bb-toast", [`bb-toast--${t.position}`, { "bb-toast--expanded": k.value }]],
71
71
  popover: "manual",
72
- style: L.value,
72
+ style: R.value,
73
73
  tabindex: "-1"
74
- }, y(b(e), !0), {
75
- onFocusin: n[0] ||= (e) => T.value = !0,
76
- onFocusout: V,
77
- onPointerenter: n[1] ||= (e) => T.value = !0,
78
- onPointerleave: n[2] ||= (e) => T.value = !1
79
- }), [(h(!0), u(s, null, v(t.toasts, (e) => (h(), l(o, {
74
+ }, b(x(e), !0), {
75
+ onFocusin: n[0] ||= (e) => E.value = !0,
76
+ onFocusout: H,
77
+ onPointerenter: n[1] ||= (e) => E.value = !0,
78
+ onPointerleave: n[2] ||= (e) => E.value = !1
79
+ }), [(g(!0), d(c, null, y(t.toasts, (e) => (g(), u(s, {
80
80
  key: e.id,
81
- "front-height": j.value,
82
- "front-index": M[e.id]?.frontIndex ?? 0,
83
- "height-before": M[e.id]?.heightBefore ?? 0,
84
- paused: k.value,
81
+ "front-height": M.value,
82
+ "front-index": N[e.id]?.frontIndex ?? 0,
83
+ "height-before": N[e.id]?.heightBefore ?? 0,
84
+ paused: A.value,
85
85
  position: t.position,
86
86
  toast: e,
87
- total: A.value,
88
- onDismiss: B,
89
- onHeight: z
87
+ total: j.value,
88
+ onDismiss: V,
89
+ onHeight: B
90
90
  }, null, 8, [
91
91
  "front-height",
92
92
  "front-index",
@@ -99,4 +99,4 @@ var C = /*@__PURE__*/ d({
99
99
  }
100
100
  });
101
101
  //#endregion
102
- export { C as default };
102
+ export { w as default };
@@ -1,18 +1,17 @@
1
1
  import { useId as e } from "../../composables/useId.js";
2
2
  import { useUntil as t } from "../../composables/useUntil.js";
3
3
  import { removedPropsFor as n } from "../../deprecation/removedProps.js";
4
- import { warnRemovedAttrs as ee } from "../../utilities/functions/warnRemovedAttrs.js";
5
- import { extractDomContainer as r } from "../../utilities/functions/extractDomContainer.js";
6
- import { transitions as i } from "../../utilities/misc/transitions.js";
7
- import te from "../CommonPopover/CommonPopover.vue.js";
8
- import { parseWidthString as a } from "../../utilities/functions/parseWidthString.js";
9
- import { Comment as o, Fragment as s, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as ne, createVNode as f, defineComponent as p, mergeModels as m, mergeProps as h, normalizeProps as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, ref as x, renderSlot as S, toDisplayString as C, useModel as w, useSlots as T, useTemplateRef as E, watch as D, withCtx as re } from "vue";
10
- import { useElementSize as O } from "@vueuse/core";
4
+ import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
5
+ import { extractDomContainer as i } from "../../utilities/functions/extractDomContainer.js";
6
+ import { transitions as a } from "../../utilities/misc/transitions.js";
7
+ import o from "../CommonPopover/CommonPopover.vue.js";
8
+ import { Comment as s, Fragment as ee, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as g, normalizeProps as te, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, ref as x, renderSlot as S, toDisplayString as C, useModel as w, useSlots as T, useTemplateRef as E, watch as D, withCtx as O } from "vue";
9
+ import { useElementSize as k } from "@vueuse/core";
11
10
  //#region src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts
12
- var k = /*@__PURE__*/ p({
11
+ var A = /*@__PURE__*/ m({
13
12
  inheritAttrs: !1,
14
13
  __name: "BbTooltip",
15
- props: /*@__PURE__*/ m({
14
+ props: /*@__PURE__*/ h({
16
15
  arrowPadding: { default: 10 },
17
16
  disabled: { type: Boolean },
18
17
  eager: { type: Boolean },
@@ -21,7 +20,7 @@ var k = /*@__PURE__*/ p({
21
20
  padding: { default: 10 },
22
21
  placement: { default: "top" },
23
22
  text: {},
24
- transitionDuration: { default: i.medium },
23
+ transitionDuration: { default: a.medium },
25
24
  activator: {},
26
25
  boundary: {},
27
26
  variant: { default: "default" },
@@ -35,98 +34,102 @@ var k = /*@__PURE__*/ p({
35
34
  modelModifiers: {}
36
35
  }),
37
36
  emits: ["update:modelValue"],
38
- setup(i) {
39
- let p = w(i, "modelValue"), m = i, k = T();
40
- process.env.NODE_ENV !== "production" && ee("BbTooltip", n("BbTooltip"));
41
- let A = `bb_${m.id ?? e().id.value}`, j = `${A}_desc`, M = (e) => {
37
+ setup(a) {
38
+ let m = w(a, "modelValue"), h = a, A = T();
39
+ process.env.NODE_ENV !== "production" && r("BbTooltip", n("BbTooltip"));
40
+ let j = `bb_${h.id ?? e().id.value}`, M = `${j}_desc`, N = (e) => {
42
41
  if (!e) return "";
43
42
  let t = "";
44
43
  for (let n of e) {
45
- if (n.type === o) continue;
44
+ if (n.type === s) continue;
46
45
  let e = n.children;
47
- typeof e == "string" ? t += e : Array.isArray(e) && (t += M(e));
46
+ typeof e == "string" ? t += e : Array.isArray(e) && (t += N(e));
48
47
  }
49
48
  return t;
50
- }, N = x(!1), P = c(() => (m.text ?? (N.value ? M(k.default?.({})) : "")).replace(/\s+/g, " ").trim()), F = x(), ie = c(() => m.activator != null), I = E("popover"), L = c(() => r(I.value)), R = t(p), z = (e) => {
51
- let t = r(e);
52
- t && (F.value = t);
53
- }, B, V, H = () => {
54
- clearTimeout(V);
49
+ }, P = x(!1), F = c(() => (h.text ?? (P.value ? N(A.default?.({})) : "")).replace(/\s+/g, " ").trim()), I = x(), ne = c(() => h.activator != null), re = E("popover"), ie = c(() => i(re.value)), L = t(m), R = (e) => {
50
+ let t = i(e);
51
+ t && (I.value = t);
52
+ }, z, B, V = () => {
53
+ clearTimeout(B);
54
+ }, H = () => {
55
+ clearTimeout(z), clearTimeout(B), m.value = !1;
55
56
  }, U = () => {
56
- clearTimeout(B), clearTimeout(V), p.value = !1;
57
+ clearTimeout(z), clearTimeout(B), B = setTimeout(H, 50);
57
58
  }, W = () => {
58
- clearTimeout(B), clearTimeout(V), V = setTimeout(U, 50);
59
- }, G = () => {
60
- H(), !(p.value || m.disabled) && (B = setTimeout(() => {
61
- p.value = !0;
62
- }, m.delay));
59
+ V(), !(m.value || h.disabled) && (z = setTimeout(() => {
60
+ m.value = !0;
61
+ }, h.delay));
62
+ }, G = (e) => {
63
+ e.key === "Escape" && H();
63
64
  }, K = (e) => {
64
- e.key === "Escape" && U();
65
- }, q = (e) => {
66
- e.currentTarget?.matches(":focus-visible") && G();
65
+ e.currentTarget?.matches(":focus-visible") && W();
67
66
  };
68
- D(p, (e) => {
69
- e ? document.addEventListener("keydown", K) : document.removeEventListener("keydown", K);
70
- }), D(() => m.disabled, (e) => {
71
- e && U();
72
- }), D(() => m.activator, (e) => {
73
- e && z(e);
67
+ D(m, (e) => {
68
+ e ? document.addEventListener("keydown", G) : document.removeEventListener("keydown", G);
69
+ }), D(() => h.disabled, (e) => {
70
+ e && H();
71
+ }), D(() => h.activator, (e) => {
72
+ e && R(e);
74
73
  }, { immediate: !0 });
75
- let J = null;
76
- D(F, (e) => {
77
- J &&= (J(), null), e && (e.addEventListener("mouseenter", G, { passive: !0 }), e.addEventListener("mouseleave", W, { passive: !0 }), e.addEventListener("focus", q, { passive: !0 }), e.addEventListener("blur", U, { passive: !0 }), J = () => {
78
- e.removeEventListener("mouseenter", G), e.removeEventListener("mouseleave", W), e.removeEventListener("focus", q), e.removeEventListener("blur", U);
74
+ let q = null;
75
+ D(I, (e) => {
76
+ q &&= (q(), null), e && (e.addEventListener("mouseenter", W, { passive: !0 }), e.addEventListener("mouseleave", U, { passive: !0 }), e.addEventListener("focus", K, { passive: !0 }), e.addEventListener("blur", H, { passive: !0 }), q = () => {
77
+ e.removeEventListener("mouseenter", W), e.removeEventListener("mouseleave", U), e.removeEventListener("focus", K), e.removeEventListener("blur", H);
79
78
  });
80
79
  }, { immediate: !0 });
81
- let Y = null;
82
- D(L, (e) => {
83
- Y &&= (Y(), null), e && (e.addEventListener("mouseenter", H, { passive: !0 }), e.addEventListener("mouseleave", W, { passive: !0 }), Y = () => {
84
- e.removeEventListener("mouseenter", H), e.removeEventListener("mouseleave", W);
80
+ let J = null;
81
+ D(ie, (e) => {
82
+ J &&= (J(), null), e && (e.addEventListener("mouseenter", V, { passive: !0 }), e.addEventListener("mouseleave", U, { passive: !0 }), J = () => {
83
+ e.removeEventListener("mouseenter", V), e.removeEventListener("mouseleave", U);
85
84
  });
86
85
  }, { immediate: !0 });
87
- let ae = /* @__PURE__ */ new Set([A, j]), X = null, Z = (e, t) => {
86
+ let ae = /* @__PURE__ */ new Set([j, M]), Y = null, X = (e, t) => {
88
87
  let n = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((e) => e && !ae.has(e));
89
88
  t && n.push(t), n.length ? e.setAttribute("aria-describedby", n.join(" ")) : e.removeAttribute("aria-describedby");
90
- }, Q = () => {
91
- let e = F.value ?? null;
92
- X && X !== e && Z(X, null), X = e, e && (P.value ? Z(e, j) : Z(e, R.value ? A : null));
89
+ }, Z = () => {
90
+ let e = I.value ?? null;
91
+ Y && Y !== e && X(Y, null), Y = e, e && (F.value ? X(e, M) : X(e, L.value ? j : null));
93
92
  };
94
93
  y(() => {
95
- Q(), N.value = !0;
94
+ Z(), P.value = !0;
96
95
  }), D([
97
- F,
98
- R,
99
- P
100
- ], Q, { flush: "post" }), v(() => {
101
- J?.(), Y?.(), X &&= (Z(X, null), null), U(), document.removeEventListener("keydown", K);
96
+ I,
97
+ L,
98
+ F
99
+ ], Z, { flush: "post" }), v(() => {
100
+ q?.(), J?.(), Y &&= (X(Y, null), null), H(), document.removeEventListener("keydown", G);
102
101
  });
103
- let $ = c(() => {
104
- if (!m.width) return;
105
- let { value: e, unit: t } = a(m.width);
106
- return t === "%" ? e : void 0;
107
- }), { width: oe } = O(c(() => $.value == null ? void 0 : F.value), {
102
+ let oe = /^-?\d*\.?\d+$/, se = /^(-?\d*\.?\d+)%$/, Q = c(() => {
103
+ if (typeof h.width != "string") return;
104
+ let e = h.width.trim().match(se);
105
+ return e ? parseFloat(e[1]) : void 0;
106
+ }), { width: $ } = k(c(() => Q.value == null ? void 0 : I.value), {
108
107
  width: 0,
109
108
  height: 0
110
- }, { box: "border-box" }), se = c(() => {
111
- if (m.width) return $.value == null ? `${a(m.width).value}px` : F.value ? `${oe.value * ($.value / 100)}px` : "0px";
109
+ }, { box: "border-box" }), ce = c(() => {
110
+ if (h.width == null || h.width === "") return;
111
+ if (Q.value != null) return $.value ? `${$.value * (Q.value / 100)}px` : void 0;
112
+ if (typeof h.width == "number") return Number.isFinite(h.width) ? `${h.width}px` : void 0;
113
+ let e = h.width.trim();
114
+ return oe.test(e) ? `${e}px` : e;
112
115
  });
113
- return (e, t) => (b(), u(s, null, [
114
- P.value ? (b(), u("span", {
116
+ return (e, t) => (b(), u(ee, null, [
117
+ F.value ? (b(), u("span", {
115
118
  key: 0,
116
- id: j,
117
- class: "sr-only"
118
- }, C(P.value), 1)) : l("", !0),
119
- ie.value ? l("", !0) : S(e.$slots, "activator", g(h({ key: 1 }, {
120
- props: { ref: z },
119
+ id: M,
120
+ class: "bb-sr-only"
121
+ }, C(F.value), 1)) : l("", !0),
122
+ ne.value ? l("", !0) : S(e.$slots, "activator", te(g({ key: 1 }, {
123
+ props: { ref: R },
121
124
  disabled: e.disabled,
122
- open: p.value,
125
+ open: m.value,
123
126
  placement: e.placement
124
127
  }))),
125
- f(te, h({
128
+ p(o, g({
126
129
  ref: "popover",
127
- modelValue: p.value,
128
- "onUpdate:modelValue": t[0] ||= (e) => p.value = e,
129
- anchor: F.value,
130
+ modelValue: m.value,
131
+ "onUpdate:modelValue": t[0] ||= (e) => m.value = e,
132
+ anchor: I.value,
130
133
  "arrow-padding": e.arrowPadding,
131
134
  boundary: e.boundary,
132
135
  class: ["bb-tooltip", { [`bb-tooltip--${e.variant}`]: !0 }],
@@ -137,12 +140,12 @@ var k = /*@__PURE__*/ p({
137
140
  tag: "span",
138
141
  "transition-duration": e.transitionDuration
139
142
  }, e.$attrs), {
140
- default: re(() => [d("span", {
141
- id: A,
143
+ default: O(() => [d("span", {
144
+ id: j,
142
145
  class: "bb-tooltip__content",
143
146
  role: "tooltip",
144
- style: _({ width: se.value })
145
- }, [S(e.$slots, "default", {}, () => [ne(C(e.text), 1)])], 4)]),
147
+ style: _({ "--max-w": ce.value })
148
+ }, [S(e.$slots, "default", {}, () => [f(C(e.text), 1)])], 4)]),
146
149
  _: 3
147
150
  }, 16, [
148
151
  "modelValue",
@@ -160,4 +163,4 @@ var k = /*@__PURE__*/ p({
160
163
  }
161
164
  });
162
165
  //#endregion
163
- export { k as default };
166
+ export { A as default };
@@ -88,7 +88,14 @@ export type BbTooltipProps = {
88
88
  */
89
89
  delay?: number;
90
90
  /**
91
- * Width of the tooltip bubble in pixels, or as a percentage of the activator.
91
+ * Caps the width of the tooltip bubble: it wraps at this measure but still
92
+ * shrinks to its text, so a short hint never sits in an oversized bubble.
93
+ * A bare number is read as pixels, a percentage is measured against the
94
+ * activator, and any other CSS length (`'20rem'`, `'min(320px, 90vw)'`)
95
+ * is passed through.
96
+ *
97
+ * Replaces the default cap of `40ch`, which is also reachable in CSS as
98
+ * `--max-w` on the tooltip root.
92
99
  */
93
100
  width?: number | string;
94
101
  };
@@ -4,7 +4,7 @@ import { hash as n } from "../../utilities/functions/hash.js";
4
4
  import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, watch as h, withCtx as g, withModifiers as _ } from "vue";
5
5
  //#region src/components/ChipsBox/ChipsBox.vue?vue&type=script&setup=true&lang.ts
6
6
  var v = {
7
- class: "sr-only",
7
+ class: "bb-sr-only",
8
8
  role: "status"
9
9
  }, y = /*@__PURE__*/ l({
10
10
  __name: "ChipsBox",
@@ -3,7 +3,7 @@ import { hash as t } from "../../utilities/functions/hash.js";
3
3
  import { Fragment as n, computed as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, renderList as u, toDisplayString as d, watch as f } from "vue";
4
4
  //#region src/components/CommaBox/CommaBox.vue?vue&type=script&setup=true&lang.ts
5
5
  var p = {
6
- class: "sr-only",
6
+ class: "bb-sr-only",
7
7
  role: "status"
8
8
  }, m = /*@__PURE__*/ o({
9
9
  __name: "CommaBox",
@@ -38,7 +38,7 @@ var m = /*@__PURE__*/ s({
38
38
  option: t
39
39
  }), a("span", { class: c({
40
40
  [`${e.classPrefix}-option__text`]: !0,
41
- "sr-only": e.hideLabel
41
+ "bb-sr-only": e.hideLabel
42
42
  }) }, [d(e.$slots, "label", {
43
43
  checked: !!t.selected,
44
44
  item: t.item,
@@ -205,6 +205,28 @@ export declare const namedPortalRegistry: import('vue').Reactive<Map<string, ()
205
205
  export declare const registerNamedPortal: (name: string, fn: () => VNode[] | undefined) => () => boolean;
206
206
  /** Duration to wait before clearing state, matching BaseDialog transition. */
207
207
  export declare const TRANSITION_DURATION: number;
208
+ /**
209
+ * Grace period before the zero-host warning fires.
210
+ *
211
+ * The check cannot be synchronous. A host mounted anywhere but the app root —
212
+ * a layout, say — unmounts and remounts across a route change, and a
213
+ * `confirm()` landing inside that gap is NOT broken: a late-mounting host
214
+ * renders the pending dialog and the promise settles normally (verified). So
215
+ * "no host right now" does not mean "no host is coming", and warning on it
216
+ * would be a false positive on every route transition.
217
+ *
218
+ * Waiting also removes the need to guess. At fire time we re-read the real
219
+ * state — a host mounted, or the promise settled — and stay quiet if either is
220
+ * true, so the delay only ever has to be long enough for a slow async layout
221
+ * chunk to arrive. That makes a generous value strictly safer than a tight
222
+ * one; there is no false-positive risk left to trade against.
223
+ *
224
+ * This supersedes the 2026-07-30 `hostEverMounted` latch, which suppressed the
225
+ * warning for the whole process once ANY host had ever mounted. That silenced
226
+ * exactly the case a non-root host produces: mounted once, gone now, promise
227
+ * hangs with no diagnostic.
228
+ */
229
+ export declare const NO_HOST_WARNING_DELAY = 1000;
208
230
  /**
209
231
  * Called by `<BbConfirm>` on mount. Internal — not re-exported from
210
232
  * `src/index.ts`. Returns the host count including this one (for the