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

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 (252) 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/BbBaseColorInput.md +1 -0
  11. package/dist/ai/BbBaseDatePickerInput.md +1 -0
  12. package/dist/ai/BbBaseNumberInput.md +1 -0
  13. package/dist/ai/BbBaseRadioIcon.md +6 -10
  14. package/dist/ai/BbBaseSelect.md +1 -0
  15. package/dist/ai/BbBaseSwitchIcon.md +5 -9
  16. package/dist/ai/BbBaseTag.md +1 -0
  17. package/dist/ai/BbBaseTextInput.md +2 -1
  18. package/dist/ai/BbBaseTextarea.md +1 -0
  19. package/dist/ai/BbBaseTimePickerInput.md +1 -0
  20. package/dist/ai/BbBreadcrumbs.md +23 -34
  21. package/dist/ai/BbButton.md +35 -47
  22. package/dist/ai/BbCheckbox.md +21 -37
  23. package/dist/ai/BbCheckboxGroup.md +13 -13
  24. package/dist/ai/BbCollapsible.md +14 -26
  25. package/dist/ai/BbColorInput.md +27 -23
  26. package/dist/ai/BbColorPalette.md +23 -35
  27. package/dist/ai/BbConfirm.md +17 -32
  28. package/dist/ai/BbDatePickerInput.md +29 -21
  29. package/dist/ai/BbDialog.md +159 -62
  30. package/dist/ai/BbDropdown.md +21 -25
  31. package/dist/ai/BbDropdownButton.md +13 -30
  32. package/dist/ai/BbDropzone.md +9 -11
  33. package/dist/ai/BbIcon.md +44 -33
  34. package/dist/ai/BbIndicator.md +2 -2
  35. package/dist/ai/BbNumberInput.md +32 -20
  36. package/dist/ai/BbOffCanvas.md +42 -42
  37. package/dist/ai/BbPagination.md +21 -23
  38. package/dist/ai/BbPopover.md +15 -17
  39. package/dist/ai/BbProgress.md +40 -51
  40. package/dist/ai/BbRadio.md +9 -9
  41. package/dist/ai/BbRadioGroup.md +7 -11
  42. package/dist/ai/BbRating.md +8 -12
  43. package/dist/ai/BbSelect.md +46 -36
  44. package/dist/ai/BbSelectPopover.md +19 -31
  45. package/dist/ai/BbSlider.md +15 -19
  46. package/dist/ai/BbSmoothHeight.md +16 -31
  47. package/dist/ai/BbSpinner.md +118 -74
  48. package/dist/ai/BbSwitch.md +25 -18
  49. package/dist/ai/BbSwitchGroup.md +9 -14
  50. package/dist/ai/BbTable.md +102 -55
  51. package/dist/ai/BbTabs.md +59 -82
  52. package/dist/ai/BbTag.md +26 -23
  53. package/dist/ai/BbTextInput.md +63 -27
  54. package/dist/ai/BbTextarea.md +42 -34
  55. package/dist/ai/BbTimePickerInput.md +14 -0
  56. package/dist/ai/BbToast.md +14 -34
  57. package/dist/ai/BbTooltip.md +22 -20
  58. package/dist/ai/BbTree.md +46 -72
  59. package/dist/ai/CommonInputWrapper.md +1 -0
  60. package/dist/ai/changelog.json +170 -62
  61. package/dist/ai/components.json +1678 -11
  62. package/dist/ai/composables/useConfirm.md +5 -2
  63. package/dist/ai/composables/useToast.md +4 -2
  64. package/dist/ai/guides/agent-contract.md +7 -4
  65. package/dist/ai/guides/ai-router.md +37 -22
  66. package/dist/ai/guides/component-picker.md +23 -18
  67. package/dist/ai/guides/design-language.md +151 -21
  68. package/dist/ai/guides/design-tokens.md +29 -4
  69. package/dist/ai/guides/icons-policy.md +46 -21
  70. package/dist/ai/guides/installation-and-plugin-setup.md +286 -17
  71. package/dist/ai/guides/migration/components/bb-rating.md +26 -1
  72. package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
  73. package/dist/ai/guides/migration/v2-to-v3.md +50 -23
  74. package/dist/ai/index.md +1 -1
  75. package/dist/ai/recipes/inertia/approvals-inbox.md +3 -3
  76. package/dist/ai/recipes/inertia/inline-edit-workspace.md +2 -2
  77. package/dist/ai/recipes/inertia/onboarding.md +2 -2
  78. package/dist/ai/recipes/inertia/ownership-atlas.md +6 -6
  79. package/dist/ai/recipes/inertia/record-form.md +5 -5
  80. package/dist/ai/recipes/inertia/records-workspace.md +4 -4
  81. package/dist/ai/recipes/inertia/upload-center.md +6 -6
  82. package/dist/ai/recipes/inertia/wizard-form.md +5 -5
  83. package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -3
  84. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +2 -2
  85. package/dist/ai/recipes/nuxt/onboarding.md +2 -2
  86. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  87. package/dist/ai/recipes/nuxt/records-workspace.md +4 -4
  88. package/dist/ai/recipes/nuxt/upload-center.md +6 -6
  89. package/dist/ai/recipes/nuxt/wizard-form.md +5 -5
  90. package/dist/ai/recipes/vue/approvals-inbox.md +3 -3
  91. package/dist/ai/recipes/vue/inline-edit-workspace.md +2 -2
  92. package/dist/ai/recipes/vue/onboarding.md +2 -2
  93. package/dist/ai/recipes/vue/record-form.md +10 -10
  94. package/dist/ai/recipes/vue/records-workspace.md +4 -4
  95. package/dist/ai/recipes/vue/upload-center.md +6 -6
  96. package/dist/ai/recipes/vue/wizard-form.md +5 -5
  97. package/dist/ai/source/BbBadge.md +1 -1
  98. package/dist/ai/source/BbBaseCheckbox.md +1 -1
  99. package/dist/ai/source/BbBaseColorInput.md +7 -0
  100. package/dist/ai/source/BbBaseDatePicker.md +5 -5
  101. package/dist/ai/source/BbBaseDatePickerInput.md +9 -2
  102. package/dist/ai/source/BbBaseNumberInput.md +7 -0
  103. package/dist/ai/source/BbBaseRadio.md +1 -1
  104. package/dist/ai/source/BbBaseRating.md +5 -5
  105. package/dist/ai/source/BbBaseSelect.md +8 -1
  106. package/dist/ai/source/BbBaseSlider.md +5 -5
  107. package/dist/ai/source/BbBaseSwitch.md +1 -1
  108. package/dist/ai/source/BbBaseTag.md +7 -0
  109. package/dist/ai/source/BbBaseTextInput.md +7 -0
  110. package/dist/ai/source/BbBaseTextarea.md +7 -0
  111. package/dist/ai/source/BbBaseTimePickerInput.md +8 -1
  112. package/dist/ai/source/BbBreadcrumbs.md +20 -1
  113. package/dist/ai/source/BbButton.md +2 -2
  114. package/dist/ai/source/BbColorInput.md +14 -0
  115. package/dist/ai/source/BbDatePickerInput.md +14 -0
  116. package/dist/ai/source/BbDialog.md +39 -8
  117. package/dist/ai/source/BbDropdown.md +1 -1
  118. package/dist/ai/source/BbDropzone.md +5 -5
  119. package/dist/ai/source/BbIcon.md +23 -10
  120. package/dist/ai/source/BbNumberInput.md +14 -0
  121. package/dist/ai/source/BbOffCanvas.md +50 -28
  122. package/dist/ai/source/BbPagination.md +2 -2
  123. package/dist/ai/source/BbPopover.md +12 -1
  124. package/dist/ai/source/BbSelect.md +14 -0
  125. package/dist/ai/source/BbSelectPopover.md +45 -7
  126. package/dist/ai/source/BbSpinner.md +2 -2
  127. package/dist/ai/source/BbTable.md +11 -11
  128. package/dist/ai/source/BbTag.md +14 -0
  129. package/dist/ai/source/BbTextInput.md +14 -0
  130. package/dist/ai/source/BbTextarea.md +14 -0
  131. package/dist/ai/source/BbTimePickerInput.md +14 -0
  132. package/dist/ai/source/BbTooltip.md +57 -10
  133. package/dist/ai/source/ChipsBox.md +1 -1
  134. package/dist/ai/source/CommaBox.md +1 -1
  135. package/dist/ai/source/CommonInputWrapper.md +128 -33
  136. package/dist/ai/source/GuidesComponent.md +14 -7
  137. package/dist/ai/source/OptionsContainer.md +1 -1
  138. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +1 -1
  139. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +1 -1
  140. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
  141. package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +4 -1
  142. package/dist/components/BbBaseColorInput/types.d.ts +5 -0
  143. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +4 -4
  144. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +1 -1
  145. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +5 -2
  146. package/dist/components/BbBaseDatePickerInput/types.d.ts +5 -0
  147. package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +1 -1
  148. package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +4 -1
  149. package/dist/components/BbBaseNumberInput/types.d.ts +5 -0
  150. package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +1 -1
  151. package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +3 -3
  152. package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +4 -1
  153. package/dist/components/BbBaseSelect/types.d.ts +5 -0
  154. package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +3 -3
  155. package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
  156. package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +4 -1
  157. package/dist/components/BbBaseTag/types.d.ts +5 -0
  158. package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +4 -1
  159. package/dist/components/BbBaseTextInput/types.d.ts +5 -0
  160. package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +4 -1
  161. package/dist/components/BbBaseTextarea/types.d.ts +5 -0
  162. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +5 -2
  163. package/dist/components/BbBaseTimePickerInput/types.d.ts +5 -0
  164. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +71 -71
  165. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +2 -2
  166. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +5 -2
  167. package/dist/components/BbColorInput/types.d.ts +12 -0
  168. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +4 -2
  169. package/dist/components/BbDatePickerInput/types.d.ts +12 -0
  170. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +102 -97
  171. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +1 -1
  172. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +58 -58
  173. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +2 -2
  174. package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +33 -35
  175. package/dist/components/BbIcon/iconCache.d.ts +30 -0
  176. package/dist/components/BbIcon/iconCache.js +21 -3
  177. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +5 -2
  178. package/dist/components/BbNumberInput/types.d.ts +12 -0
  179. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +57 -56
  180. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +2 -2
  181. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +138 -138
  182. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +4 -2
  183. package/dist/components/BbSelect/types.d.ts +12 -0
  184. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +43 -43
  185. package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +1 -1
  186. package/dist/components/BbSpinner/types.d.ts +1 -1
  187. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +8 -8
  188. package/dist/components/BbTable/BbTableDataRow.js +2 -2
  189. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +5 -2
  190. package/dist/components/BbTag/types.d.ts +12 -0
  191. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +5 -2
  192. package/dist/components/BbTextInput/types.d.ts +12 -0
  193. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +5 -2
  194. package/dist/components/BbTextarea/types.d.ts +12 -0
  195. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +4 -2
  196. package/dist/components/BbTimePickerInput/types.d.ts +12 -0
  197. package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +62 -62
  198. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +81 -78
  199. package/dist/components/BbTooltip/types.d.ts +8 -1
  200. package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +1 -1
  201. package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +1 -1
  202. package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.d.ts +1 -0
  203. package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +4 -2
  204. package/dist/components/CommonInputWrapper/types.d.ts +10 -0
  205. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +1 -1
  206. package/dist/composables/useConfirm.d.ts +22 -0
  207. package/dist/composables/useConfirm.js +43 -40
  208. package/dist/composables/useSafeAreaInternal.js +1 -1
  209. package/dist/composables/useToast.d.ts +16 -0
  210. package/dist/composables/useToast.js +20 -16
  211. package/dist/composables/useViewportWidth.d.ts +20 -6
  212. package/dist/composables/useViewportWidth.js +8 -7
  213. package/dist/icon-scan.d.ts +276 -0
  214. package/dist/icon-scan.js +485 -0
  215. package/dist/icons-whitelist.d.ts +5 -4
  216. package/dist/index.d.ts +2 -0
  217. package/dist/input-variants.d.ts +18 -0
  218. package/dist/llms-full.txt +2173 -1537
  219. package/dist/llms-medium.txt +504 -82
  220. package/dist/llms.txt +1 -1
  221. package/dist/nuxt-module.d.ts +1 -0
  222. package/dist/nuxt.js +10 -7
  223. package/dist/plugin.js +1 -0
  224. package/dist/runtime/nuxt-plugin.js +2 -1
  225. package/dist/styles.css +1 -1
  226. package/dist/types/Config.d.ts +18 -0
  227. package/dist/types/InputVariant.d.ts +22 -0
  228. package/dist/utils/cssLayers.d.ts +91 -0
  229. package/dist/utils/cssLayers.js +43 -0
  230. package/dist/utils/injectLibraryStyles.d.ts +3 -1
  231. package/dist/utils/injectLibraryStyles.js +24 -23
  232. package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +1 -0
  233. package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1 -0
  234. package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -0
  235. package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
  236. package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +1 -0
  237. package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +1 -0
  238. package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +1 -0
  239. package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +1 -0
  240. package/dist/validated/index.d.ts +1 -0
  241. package/dist/vite-plugin.d.ts +89 -12
  242. package/dist/vite.js +331 -281
  243. package/llms.txt +1 -1
  244. package/package.json +7 -5
  245. package/scripts/lib/ensure-manifest.mjs +28 -5
  246. package/scripts/lib/eslint-plugin.d.ts +35 -0
  247. package/scripts/lib/eslint-plugin.mjs +299 -3
  248. package/scripts/lib/hand-roll-hints.mjs +50 -6
  249. package/scripts/lib/html-attributes.mjs +42 -0
  250. package/scripts/lib/mcp-config.mjs +38 -34
  251. package/scripts/lib/public-type-exports.mjs +246 -0
  252. package/scripts/lib/validate-bb-markup.mjs +205 -12
@@ -6,24 +6,24 @@ import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttr
6
6
  import { extractDomContainer as a } from "../../utilities/functions/extractDomContainer.js";
7
7
  import { transitions as o } from "../../utilities/misc/transitions.js";
8
8
  import ee from "../CommonPopover/CommonPopover.vue.js";
9
- import { parseWidthString as te } from "../../utilities/functions/parseWidthString.js";
10
- import { isTopEscapeEntry as ne, pushEscapeEntry as re, removeEscapeEntry as ie } from "../../utils/overlayEscapeStack.js";
11
- import { useMobile as ae } from "../../composables/useMobile.js";
12
- import { useClosingInert as oe } from "../../composables/useClosingInert.js";
13
- import se from "../BbOffCanvas/BbOffCanvas.vue.js";
14
- import { Fragment as ce, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as le, createSlots as ue, defineComponent as d, mergeModels as f, mergeProps as p, nextTick as de, normalizeClass as fe, normalizeProps as pe, normalizeStyle as me, onBeforeUnmount as he, onMounted as ge, openBlock as m, ref as h, renderSlot as g, unref as _, useModel as _e, useTemplateRef as ve, watch as v, withCtx as y } from "vue";
15
- import { useElementSize as ye, useIntersectionObserver as be } from "@vueuse/core";
9
+ import { isTopEscapeEntry as te, pushEscapeEntry as ne, removeEscapeEntry as re } from "../../utils/overlayEscapeStack.js";
10
+ import { useMobile as ie } from "../../composables/useMobile.js";
11
+ import { useClosingInert as ae } from "../../composables/useClosingInert.js";
12
+ import oe from "../BbOffCanvas/BbOffCanvas.vue.js";
13
+ import { parseWidthString as s } from "../../utilities/functions/parseWidthString.js";
14
+ import { Fragment as se, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as ce, createSlots as le, defineComponent as f, mergeModels as p, mergeProps as m, nextTick as ue, normalizeClass as de, normalizeProps as fe, normalizeStyle as pe, onBeforeUnmount as me, onMounted as he, openBlock as h, ref as g, renderSlot as _, unref as v, useModel as ge, useTemplateRef as _e, watch as y, withCtx as b } from "vue";
15
+ import { useElementSize as ve, useIntersectionObserver as ye } from "@vueuse/core";
16
16
  //#region src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts
17
- var xe = ["inert"], Se = {
17
+ var be = ["inert"], xe = {
18
18
  key: 0,
19
19
  class: "bb-popover__header"
20
- }, Ce = { class: "bb-popover__content scrollbar-border" }, we = {
20
+ }, Se = { class: "bb-popover__content scrollbar-border" }, Ce = {
21
21
  key: 1,
22
22
  class: "bb-popover__footer"
23
- }, Te = 500, Ee = 10, b = /*@__PURE__*/ d({
23
+ }, we = 500, Te = 10, x = /*@__PURE__*/ f({
24
24
  inheritAttrs: !1,
25
25
  __name: "BbPopover",
26
- props: /*@__PURE__*/ f({
26
+ props: /*@__PURE__*/ p({
27
27
  activator: {},
28
28
  adaptive: {
29
29
  type: Boolean,
@@ -52,39 +52,39 @@ var xe = ["inert"], Se = {
52
52
  },
53
53
  modelModifiers: {}
54
54
  }),
55
- emits: /*@__PURE__*/ f([
55
+ emits: /*@__PURE__*/ p([
56
56
  "show",
57
57
  "hide",
58
58
  "shown",
59
59
  "hidden"
60
60
  ], ["update:modelValue"]),
61
- setup(o, { emit: d }) {
62
- let f = _e(o, "modelValue"), b = o, x = d, De = e();
61
+ setup(o, { emit: f }) {
62
+ let p = ge(o, "modelValue"), x = o, S = f, Ee = e();
63
63
  process.env.NODE_ENV !== "production" && i("BbPopover", r("BbPopover"));
64
- let { id: Oe } = t(), S = b.id ?? Oe.value, C = `bbp_${S}`, w = h(), T = ve("popoverRef"), E = s(() => a(T.value)), D = n(f), O = s(() => b.activator != null), { isMobile: k } = ae(), A = () => (b.adaptive ?? De.adaptive) && k.value ? "canvas" : "popover", j = h(A()), M = s(() => j.value === "canvas");
65
- v([
66
- () => b.adaptive,
67
- k,
68
- f
64
+ let { id: De } = t(), C = x.id ?? De.value, w = `bbp_${C}`, T = g(), E = _e("popoverRef"), D = c(() => a(E.value)), O = n(p), k = c(() => x.activator != null), { isMobile: A } = ie(), j = () => (x.adaptive ?? Ee.adaptive) && A.value ? "canvas" : "popover", M = g(j()), N = c(() => M.value === "canvas");
65
+ y([
66
+ () => x.adaptive,
67
+ A,
68
+ p
69
69
  ], () => {
70
- f.value || (j.value = A());
70
+ p.value || (M.value = j());
71
71
  });
72
- let ke = s(() => ({
72
+ let Oe = c(() => ({
73
73
  side: "bottom",
74
74
  size: "auto",
75
75
  draggable: !0,
76
- eager: b.eager,
77
- disabled: b.disabled,
78
- focusTarget: b.focusTarget,
79
- transitionDuration: b.transitionDuration,
80
- ...b.offCanvasProps,
81
- ...D.value && !b.offCanvasProps?.title ? { "aria-labelledby": S } : {}
82
- })), Ae = () => {
83
- w.value?.focus(), x("hidden");
84
- }, N = s(() => {
85
- let e = b.trigger;
76
+ eager: x.eager,
77
+ disabled: x.disabled,
78
+ focusTarget: x.focusTarget,
79
+ transitionDuration: x.transitionDuration,
80
+ ...x.offCanvasProps,
81
+ ...O.value && !x.offCanvasProps?.title ? { "aria-labelledby": C } : {}
82
+ })), ke = () => {
83
+ T.value?.focus(), S("hidden");
84
+ }, P = c(() => {
85
+ let e = x.trigger;
86
86
  return new Set(Array.isArray(e) ? e : [e]);
87
- }), P = (e, t) => ({ getBoundingClientRect: () => ({
87
+ }), F = (e, t) => ({ getBoundingClientRect: () => ({
88
88
  x: e,
89
89
  y: t,
90
90
  width: 0,
@@ -96,19 +96,19 @@ var xe = ["inert"], Se = {
96
96
  toJSON() {
97
97
  return this;
98
98
  }
99
- }) }), F = h(null), je = s(() => b.placement === "cursor" && F.value ? F.value : w.value), I, L = null, R = !1, z = () => {
100
- clearTimeout(I), L = null;
101
- }, B = (e) => {
102
- w.value = a(e) ?? void 0;
103
- }, Me = s(() => {
104
- let e = N.value;
99
+ }) }), I = g(null), Ae = c(() => x.placement === "cursor" && I.value ? I.value : T.value), L, R = null, z = !1, B = () => {
100
+ clearTimeout(L), R = null;
101
+ }, V = (e) => {
102
+ T.value = a(e) ?? void 0;
103
+ }, je = c(() => {
104
+ let e = P.value;
105
105
  return {
106
- "aria-expanded": D.value ? f.value : void 0,
107
- "aria-controls": D.value ? C : void 0,
106
+ "aria-expanded": O.value ? p.value : void 0,
107
+ "aria-controls": O.value ? w : void 0,
108
108
  "aria-haspopup": "dialog",
109
- id: S,
110
- disabled: !!b.disabled,
111
- ref: B,
109
+ id: C,
110
+ disabled: !!x.disabled,
111
+ ref: V,
112
112
  ...e.has("click") ? { onClick: J } : {},
113
113
  ...e.has("contextMenu") ? {
114
114
  onContextmenu: Y,
@@ -119,146 +119,146 @@ var xe = ["inert"], Se = {
119
119
  } : {}
120
120
  };
121
121
  });
122
- v(() => b.activator, (e) => {
123
- e && B(e);
124
- }, { immediate: !0 }), v([w, N], ([e, t], n, r) => {
125
- if (!e || !O.value) return;
122
+ y(() => x.activator, (e) => {
123
+ e && V(e);
124
+ }, { immediate: !0 }), y([T, P], ([e, t], n, r) => {
125
+ if (!e || !k.value) return;
126
126
  let i = [];
127
127
  t.has("click") && (e.addEventListener("click", J), i.push(() => e.removeEventListener("click", J))), t.has("contextMenu") && (e.addEventListener("contextmenu", Y), e.addEventListener("pointerdown", X), e.addEventListener("pointermove", Z), e.addEventListener("pointerup", Q), e.addEventListener("pointercancel", Q), i.push(() => {
128
- e.removeEventListener("contextmenu", Y), e.removeEventListener("pointerdown", X), e.removeEventListener("pointermove", Z), e.removeEventListener("pointerup", Q), e.removeEventListener("pointercancel", Q), z();
128
+ e.removeEventListener("contextmenu", Y), e.removeEventListener("pointerdown", X), e.removeEventListener("pointermove", Z), e.removeEventListener("pointerup", Q), e.removeEventListener("pointercancel", Q), B();
129
129
  })), e.setAttribute("aria-haspopup", "dialog"), r(() => {
130
130
  i.forEach((e) => e()), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-haspopup");
131
131
  });
132
- }, { immediate: !0 }), v([
133
- w,
134
- f,
135
- D
132
+ }, { immediate: !0 }), y([
133
+ T,
134
+ p,
135
+ O
136
136
  ], ([e, t, n]) => {
137
- !e || !O.value || !n || (e.setAttribute("id", S), e.setAttribute("aria-expanded", String(t)), e.setAttribute("aria-controls", C));
138
- }, { immediate: !0 }), be(w, ([{ intersectionRatio: e }]) => {
139
- e !== 1 && f.value && !M.value && $();
137
+ !e || !k.value || !n || (e.setAttribute("id", C), e.setAttribute("aria-expanded", String(t)), e.setAttribute("aria-controls", w));
138
+ }, { immediate: !0 }), ye(T, ([{ intersectionRatio: e }]) => {
139
+ !(e >= .99) && p.value && !N.value && $();
140
140
  }, { threshold: [0, 1] });
141
- let V = (e) => {
141
+ let H = (e) => {
142
142
  let t = e.target;
143
143
  if (!(t instanceof Node)) return;
144
- let n = E.value?.contains(t), r = w.value?.contains(t);
144
+ let n = D.value?.contains(t), r = T.value?.contains(t);
145
145
  !n && !r && $();
146
- }, H = Symbol("bb-popover"), U = (e) => {
147
- e.key === "Escape" && ne(H) && (e.preventDefault(), e.stopImmediatePropagation(), $());
148
- }, Ne = () => {
149
- re(H), document.addEventListener("click", V, { passive: !0 }), document.addEventListener("contextmenu", V, { passive: !0 }), document.addEventListener("keydown", U, { capture: !0 });
150
- }, W = () => {
151
- ie(H), document.removeEventListener("click", V), document.removeEventListener("contextmenu", V), document.removeEventListener("keydown", U, { capture: !0 });
152
- }, G = !1, K = async () => {
153
- if (M.value) return;
154
- G = !0, x("show"), Ne(), await de();
155
- let e = b.focusTarget ?? "[tabindex]:not([tabindex=\"-1\"]), button, a, input, select, textarea", t = E.value?.querySelector(e);
156
- t instanceof HTMLElement && t.focus(), x("shown");
146
+ }, U = Symbol("bb-popover"), W = (e) => {
147
+ e.key === "Escape" && te(U) && (e.preventDefault(), e.stopImmediatePropagation(), $());
148
+ }, Me = () => {
149
+ ne(U), document.addEventListener("click", H, { passive: !0 }), document.addEventListener("contextmenu", H, { passive: !0 }), document.addEventListener("keydown", W, { capture: !0 });
150
+ }, G = () => {
151
+ re(U), document.removeEventListener("click", H), document.removeEventListener("contextmenu", H), document.removeEventListener("keydown", W, { capture: !0 });
152
+ }, K = !1, Ne = async () => {
153
+ if (N.value) return;
154
+ K = !0, S("show"), Me(), await ue();
155
+ let e = x.focusTarget ?? "[tabindex]:not([tabindex=\"-1\"]), button, a, input, select, textarea", t = D.value?.querySelector(e);
156
+ t instanceof HTMLElement && t.focus(), S("shown");
157
157
  }, Pe = () => {
158
- G && (G = !1, x("hide"), W(), w.value && w.value.focus(), x("hidden"));
159
- }, Fe = oe(f, () => b.transitionDuration);
160
- v(f, (e) => {
161
- e ? (j.value = A(), K()) : Pe();
162
- }), ge(() => {
163
- f.value && K();
158
+ K && (K = !1, S("hide"), G(), T.value && T.value.focus(), S("hidden"));
159
+ }, Fe = ae(p, () => x.transitionDuration);
160
+ y(p, (e) => {
161
+ e ? (M.value = j(), Ne()) : Pe();
164
162
  }), he(() => {
165
- z(), W();
163
+ p.value && Ne();
164
+ }), me(() => {
165
+ B(), G();
166
166
  });
167
167
  let q = () => {
168
- b.disabled || (f.value = !0);
168
+ x.disabled || (p.value = !0);
169
169
  }, J = (e) => {
170
- if (f.value) {
170
+ if (p.value) {
171
171
  $();
172
172
  return;
173
173
  }
174
- if (R) {
175
- R = !1, e.preventDefault(), e.stopPropagation();
174
+ if (z) {
175
+ z = !1, e.preventDefault(), e.stopPropagation();
176
176
  return;
177
177
  }
178
- e.stopImmediatePropagation(), b.placement === "cursor" && (F.value = P(e.clientX, e.clientY)), q();
178
+ e.stopImmediatePropagation(), x.placement === "cursor" && (I.value = F(e.clientX, e.clientY)), q();
179
179
  }, Y = (e) => {
180
- b.disabled || (e.preventDefault(), e.stopPropagation(), !(b.placement === "cursor" && (F.value = P(e.clientX, e.clientY), f.value)) && (f.value ? $() : q()));
180
+ x.disabled || (e.preventDefault(), e.stopPropagation(), !(x.placement === "cursor" && (I.value = F(e.clientX, e.clientY), p.value)) && (p.value ? $() : q()));
181
181
  }, X = (e) => {
182
- b.disabled || e.pointerType === "mouse" || (R = !1, L = {
182
+ x.disabled || e.pointerType === "mouse" || (z = !1, R = {
183
183
  x: e.clientX,
184
184
  y: e.clientY
185
- }, I = setTimeout(() => {
186
- R = !0, b.placement === "cursor" && L && (F.value = P(L.x, L.y)), L = null, q();
187
- }, Te));
185
+ }, L = setTimeout(() => {
186
+ z = !0, x.placement === "cursor" && R && (I.value = F(R.x, R.y)), R = null, q();
187
+ }, we));
188
188
  }, Z = (e) => {
189
- if (!L) return;
190
- let t = e.clientX - L.x, n = e.clientY - L.y;
191
- Math.sqrt(t * t + n * n) > Ee && z();
189
+ if (!R) return;
190
+ let t = e.clientX - R.x, n = e.clientY - R.y;
191
+ Math.sqrt(t * t + n * n) > Te && B();
192
192
  }, Q = () => {
193
- z();
193
+ B();
194
194
  }, $ = () => {
195
- f.value = !1;
196
- }, Ie = s(() => {
197
- if (!b.width) return !1;
198
- let { unit: e } = te(b.width);
195
+ p.value = !1;
196
+ }, Ie = c(() => {
197
+ if (!x.width) return !1;
198
+ let { unit: e } = s(x.width);
199
199
  return e === "%";
200
- }), { width: Le } = ye(s(() => Ie.value ? w.value : void 0), {
200
+ }), { width: Le } = ve(c(() => Ie.value ? T.value : void 0), {
201
201
  width: 0,
202
202
  height: 0
203
- }, { box: "border-box" }), Re = s(() => {
204
- if (!b.width) return;
205
- let { value: e, unit: t } = te(b.width);
206
- return t === "%" && w.value ? `${Le.value * (e / 100)}px` : `${e}px`;
203
+ }, { box: "border-box" }), Re = c(() => {
204
+ if (!x.width) return;
205
+ let { value: e, unit: t } = s(x.width);
206
+ return t === "%" && T.value ? `${Le.value * (e / 100)}px` : `${e}px`;
207
207
  });
208
- return (e, t) => (m(), u(ce, null, [O.value ? l("", !0) : g(e.$slots, "activator", pe(p({ key: 0 }, {
209
- props: Me.value,
208
+ return (e, t) => (h(), d(se, null, [k.value ? u("", !0) : _(e.$slots, "activator", fe(m({ key: 0 }, {
209
+ props: je.value,
210
210
  disabled: !!e.disabled,
211
- isOpen: f.value,
211
+ isOpen: p.value,
212
212
  placement: e.placement
213
- }))), M.value ? (m(), c(se, p({
213
+ }))), N.value ? (h(), l(oe, m({
214
214
  key: 1,
215
- id: C,
216
- modelValue: f.value,
217
- "onUpdate:modelValue": t[0] ||= (e) => f.value = e,
215
+ id: w,
216
+ modelValue: p.value,
217
+ "onUpdate:modelValue": t[0] ||= (e) => p.value = e,
218
218
  class: "bb-popover-offcanvas"
219
219
  }, {
220
220
  ...e.$attrs,
221
- ...ke.value
221
+ ...Oe.value
222
222
  }, {
223
- onHidden: Ae,
224
- onHide: t[1] ||= (e) => x("hide"),
225
- onShow: t[2] ||= (e) => x("show"),
226
- onShown: t[3] ||= (e) => x("shown")
227
- }), ue({
228
- default: y(() => [g(e.$slots, "default", {
223
+ onHidden: ke,
224
+ onHide: t[1] ||= (e) => S("hide"),
225
+ onShow: t[2] ||= (e) => S("show"),
226
+ onShown: t[3] ||= (e) => S("shown")
227
+ }), le({
228
+ default: b(() => [_(e.$slots, "default", {
229
229
  close: $,
230
230
  disabled: !!e.disabled,
231
- open: f.value,
231
+ open: p.value,
232
232
  placement: e.placement
233
233
  })]),
234
234
  _: 2
235
235
  }, [e.$slots.header ? {
236
236
  name: "header",
237
- fn: y(() => [g(e.$slots, "header", {
237
+ fn: b(() => [_(e.$slots, "header", {
238
238
  close: $,
239
239
  disabled: !!e.disabled,
240
- open: f.value,
240
+ open: p.value,
241
241
  placement: e.placement
242
242
  })]),
243
243
  key: "0"
244
244
  } : void 0, e.$slots.footer ? {
245
245
  name: "footer",
246
- fn: y(() => [g(e.$slots, "footer", {
246
+ fn: b(() => [_(e.$slots, "footer", {
247
247
  close: $,
248
248
  disabled: !!e.disabled,
249
- open: f.value,
249
+ open: p.value,
250
250
  placement: e.placement
251
251
  })]),
252
252
  key: "1"
253
- } : void 0]), 1040, ["modelValue"])) : (m(), c(ee, p({
253
+ } : void 0]), 1040, ["modelValue"])) : (h(), l(ee, m({
254
254
  key: 2,
255
- id: C,
255
+ id: w,
256
256
  ref_key: "popoverRef",
257
- ref: T,
258
- modelValue: f.value,
259
- "onUpdate:modelValue": t[4] ||= (e) => f.value = e,
260
- anchor: je.value,
261
- "aria-labelledby": _(D) ? _(S) : void 0,
257
+ ref: E,
258
+ modelValue: p.value,
259
+ "onUpdate:modelValue": t[4] ||= (e) => p.value = e,
260
+ anchor: Ae.value,
261
+ "aria-labelledby": v(O) ? v(C) : void 0,
262
262
  boundary: e.boundary,
263
263
  class: "bb-popover",
264
264
  dialog: "",
@@ -270,30 +270,30 @@ var xe = ["inert"], Se = {
270
270
  style: { width: Re.value },
271
271
  "transition-duration": e.transitionDuration
272
272
  }, e.$attrs), {
273
- default: y(({ availableHeight: t }) => [le("div", {
274
- class: fe(["bb-popover__panel", { "bb-popover__panel--scrollable": e.scrollable }]),
275
- inert: _(Fe),
276
- style: me({ "--max-h": e.scrollable && t != null ? `${t}px` : void 0 })
273
+ default: b(({ availableHeight: t }) => [ce("div", {
274
+ class: de(["bb-popover__panel", { "bb-popover__panel--scrollable": e.scrollable }]),
275
+ inert: v(Fe),
276
+ style: pe({ "--max-h": e.scrollable && t != null ? `${t}px` : void 0 })
277
277
  }, [
278
- e.$slots.header ? (m(), u("div", Se, [g(e.$slots, "header", {
278
+ e.$slots.header ? (h(), d("div", xe, [_(e.$slots, "header", {
279
279
  close: $,
280
280
  disabled: !!e.disabled,
281
- open: f.value,
281
+ open: p.value,
282
282
  placement: e.placement
283
- })])) : l("", !0),
284
- le("div", Ce, [g(e.$slots, "default", {
283
+ })])) : u("", !0),
284
+ ce("div", Se, [_(e.$slots, "default", {
285
285
  close: $,
286
286
  disabled: !!e.disabled,
287
- open: f.value,
287
+ open: p.value,
288
288
  placement: e.placement
289
289
  })]),
290
- e.$slots.footer ? (m(), u("div", we, [g(e.$slots, "footer", {
290
+ e.$slots.footer ? (h(), d("div", Ce, [_(e.$slots, "footer", {
291
291
  close: $,
292
292
  disabled: !!e.disabled,
293
- open: f.value,
293
+ open: p.value,
294
294
  placement: e.placement
295
- })])) : l("", !0)
296
- ], 14, xe)]),
295
+ })])) : u("", !0)
296
+ ], 14, be)]),
297
297
  _: 3
298
298
  }, 16, [
299
299
  "modelValue",
@@ -310,4 +310,4 @@ var xe = ["inert"], Se = {
310
310
  }
311
311
  });
312
312
  //#endregion
313
- export { b as default };
313
+ export { x as default };
@@ -23,6 +23,7 @@ var b = /*@__PURE__*/ d({
23
23
  clearable: { type: Boolean },
24
24
  comma: { type: Boolean },
25
25
  compact: { type: Boolean },
26
+ variant: {},
26
27
  dependencies: {},
27
28
  depsDebounceTime: {},
28
29
  direction: {},
@@ -179,7 +180,8 @@ var b = /*@__PURE__*/ d({
179
180
  selectable: e.selectable,
180
181
  "selected-labels-fn": e.selectedLabelsFn,
181
182
  stash: e.stash,
182
- "transition-duration": e.transitionDuration
183
+ "transition-duration": e.transitionDuration,
184
+ variant: e.variant
183
185
  }, j), l({
184
186
  "append-outer": y((t) => [_(e.$slots, "append-outer", m(f(t)))]),
185
187
  append: y((t) => [_(e.$slots, "append", m(f(t)))]),
@@ -212,7 +214,7 @@ var b = /*@__PURE__*/ d({
212
214
  fn: y(() => [_(e.$slots, "suffix")]),
213
215
  key: "3"
214
216
  } : void 0
215
- ]), 1040, /* @__PURE__ */ "id.adaptive.append:icon.aria-describedby.autocomplete.autofocus.clearable.comma.compact.dependencies.deps-debounce-time.disable-writing.disabled.enforce-coherence.filter-by.group-by.has-errors.has-warning.header-height.item-height.item-text.item-value.items.loading.loading-text.max.max-selected-labels.model-value.model-value-debounce-time.multiple.name.no-data-text.off-canvas-props.placeholder.prefill.prepend:icon.query-debounce-time.readonly.required.selectable.selected-labels-fn.stash.transition-duration".split("."))]),
217
+ ]), 1040, /* @__PURE__ */ "id.adaptive.append:icon.aria-describedby.autocomplete.autofocus.clearable.comma.compact.dependencies.deps-debounce-time.disable-writing.disabled.enforce-coherence.filter-by.group-by.has-errors.has-warning.header-height.item-height.item-text.item-value.items.loading.loading-text.max.max-selected-labels.model-value.model-value-debounce-time.multiple.name.no-data-text.off-canvas-props.placeholder.prefill.prepend:icon.query-debounce-time.readonly.required.selectable.selected-labels-fn.stash.transition-duration.variant".split("."))]),
216
218
  _: 3
217
219
  }, 8, [
218
220
  "id",
@@ -1,3 +1,4 @@
1
+ import { InputVariantType } from '../../types/InputVariant';
1
2
  import { HTMLAttributes, InputHTMLAttributes } from 'vue';
2
3
  import { InputDirection } from '../../types/InputDirection';
3
4
  import { ItemAccessor } from '../../types/ItemAccessor';
@@ -55,6 +56,17 @@ export type BbSelectProps<T> = {
55
56
  * Sets the component in a compact mode.
56
57
  */
57
58
  compact?: boolean;
59
+ /**
60
+ * Visual variant of the field box — the same names and tokens as the
61
+ * `BbButton` variants. Colours only: height, padding and border width are
62
+ * identical across variants, so a form never reflows when one changes.
63
+ * `'ghost'` has no border in any state (errors and warnings show through
64
+ * the icon and the messages); every variant keeps the focus ring.
65
+ * Register extra names with the plugin's `inputVariants` option.
66
+ *
67
+ * @defaultValue `'outline'`
68
+ */
69
+ variant?: InputVariantType;
58
70
  /**
59
71
  * Defines an array of dependencies that will trigger actions in the component upon change.
60
72
  */