bitboss-ui 2.1.32 → 2.1.33

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 (188) hide show
  1. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +6 -6
  2. package/dist/components/BaseColorInput/ColorPallette.vue.d.ts +2 -2
  3. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +4 -0
  4. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +27 -36
  5. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +5 -1
  6. package/dist/components/BbPopover/BbPopover.vue.d.ts +25 -32
  7. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +26 -31
  8. package/dist/components/{CommonPopover.vue.d.ts → CommonPopover2.vue.d.ts} +2 -7
  9. package/dist/composables/useCancelableFunction.d.ts +17 -0
  10. package/dist/index.css +1 -1
  11. package/dist/index106.js +9 -9
  12. package/dist/index111.js +1 -1
  13. package/dist/index113.js +1 -1
  14. package/dist/index121.js +11 -11
  15. package/dist/index129.js +1 -1
  16. package/dist/index13.js +1 -1
  17. package/dist/index131.js +111 -93
  18. package/dist/index133.js +1 -1
  19. package/dist/index135.js +2 -2
  20. package/dist/index139.js +1 -1
  21. package/dist/index140.js +292 -250
  22. package/dist/index141.js +1 -1
  23. package/dist/index142.js +2 -2
  24. package/dist/index15.js +72 -74
  25. package/dist/index17.js +3 -3
  26. package/dist/index19.js +8 -8
  27. package/dist/index21.js +15 -15
  28. package/dist/index212.js +3 -3
  29. package/dist/index213.js +2 -2
  30. package/dist/index214.js +2 -2
  31. package/dist/index215.js +13 -4
  32. package/dist/index216.js +2 -2
  33. package/dist/index217.js +7 -5
  34. package/dist/index218.js +3 -20
  35. package/dist/index219.js +80 -191
  36. package/dist/index221.js +28 -116
  37. package/dist/index222.js +19 -0
  38. package/dist/index223.js +49 -32
  39. package/dist/index224.js +15 -86
  40. package/dist/index225.js +5 -0
  41. package/dist/index226.js +11 -28
  42. package/dist/index227.js +14 -15
  43. package/dist/index228.js +2 -51
  44. package/dist/index229.js +2 -15
  45. package/dist/index23.js +153 -153
  46. package/dist/index230.js +6 -3
  47. package/dist/index231.js +16 -12
  48. package/dist/index232.js +9 -15
  49. package/dist/index233.js +3 -2
  50. package/dist/index234.js +9 -2
  51. package/dist/index235.js +121 -2
  52. package/dist/index237.js +23 -5
  53. package/dist/index238.js +4 -5
  54. package/dist/index239.js +23 -5
  55. package/dist/index240.js +5 -5
  56. package/dist/index241.js +5 -5
  57. package/dist/index242.js +5 -5
  58. package/dist/index243.js +5 -2
  59. package/dist/index244.js +5 -8
  60. package/dist/index245.js +5 -250
  61. package/dist/index246.js +5 -52
  62. package/dist/index247.js +2 -44
  63. package/dist/index248.js +8 -5
  64. package/dist/index249.js +243 -53
  65. package/dist/index25.js +1 -1
  66. package/dist/index250.js +52 -4
  67. package/dist/index251.js +44 -3
  68. package/dist/index252.js +5 -13
  69. package/dist/index253.js +54 -100
  70. package/dist/index254.js +108 -0
  71. package/dist/{index255.js → index256.js} +2 -2
  72. package/dist/index258.js +2 -183
  73. package/dist/index259.js +4 -7
  74. package/dist/index260.js +5 -2
  75. package/dist/index261.js +2 -2
  76. package/dist/index262.js +19 -6
  77. package/dist/index263.js +2 -7
  78. package/dist/index264.js +6 -17
  79. package/dist/index265.js +7 -12
  80. package/dist/index266.js +33 -5
  81. package/dist/index267.js +2 -229
  82. package/dist/index268.js +18 -5
  83. package/dist/index269.js +11 -9
  84. package/dist/index27.js +1 -1
  85. package/dist/index270.js +229 -3
  86. package/dist/index271.js +3 -9
  87. package/dist/index272.js +4 -23
  88. package/dist/index273.js +197 -3
  89. package/dist/index275.js +183 -6
  90. package/dist/index276.js +7 -16
  91. package/dist/index277.js +9 -9
  92. package/dist/index278.js +9 -8
  93. package/dist/index279.js +8 -33
  94. package/dist/index280.js +33 -28
  95. package/dist/index281.js +30 -0
  96. package/dist/index283.js +2 -5
  97. package/dist/index284.js +5 -8
  98. package/dist/index285.js +67 -2
  99. package/dist/index286.js +7 -5
  100. package/dist/index287.js +11 -3
  101. package/dist/index288.js +5 -3
  102. package/dist/index289.js +3 -7
  103. package/dist/index29.js +3 -3
  104. package/dist/index290.js +17 -11
  105. package/dist/index291.js +28 -2
  106. package/dist/index292.js +718 -4
  107. package/dist/index293.js +366 -3
  108. package/dist/index294.js +55 -14
  109. package/dist/index295.js +3 -28
  110. package/dist/index296.js +280 -4
  111. package/dist/index297.js +2 -5
  112. package/dist/index298.js +13 -277
  113. package/dist/index299.js +2 -2
  114. package/dist/index300.js +9 -9
  115. package/dist/index302.js +17 -14
  116. package/dist/index304.js +12 -16
  117. package/dist/index306.js +15 -11
  118. package/dist/index308.js +23 -15
  119. package/dist/index31.js +2 -2
  120. package/dist/index310.js +2 -27
  121. package/dist/index311.js +2 -2
  122. package/dist/index312.js +1 -1
  123. package/dist/index313.js +1 -1
  124. package/dist/index314.js +21 -1
  125. package/dist/index316.js +3 -22
  126. package/dist/index317.js +5 -0
  127. package/dist/index318.js +6 -3
  128. package/dist/index319.js +4 -3
  129. package/dist/index320.js +124 -5
  130. package/dist/index321.js +2 -2
  131. package/dist/index322.js +2 -125
  132. package/dist/index324.js +3 -5
  133. package/dist/index325.js +5 -718
  134. package/dist/index326.js +8 -366
  135. package/dist/index327.js +2 -58
  136. package/dist/index328.js +7 -0
  137. package/dist/index329.js +1 -1
  138. package/dist/index33.js +8 -8
  139. package/dist/index330.js +4 -2
  140. package/dist/index331.js +92 -7
  141. package/dist/index332.js +34 -5
  142. package/dist/index333.js +6 -8
  143. package/dist/index334.js +128 -57
  144. package/dist/index335.js +367 -56
  145. package/dist/index336.js +56 -6
  146. package/dist/index337.js +57 -128
  147. package/dist/index338.js +2 -369
  148. package/dist/index339.js +6 -6
  149. package/dist/index340.js +6 -18
  150. package/dist/index341.js +17 -226
  151. package/dist/index342.js +46 -6
  152. package/dist/index343.js +7 -46
  153. package/dist/index344.js +5 -92
  154. package/dist/index345.js +7 -128
  155. package/dist/index346.js +223 -431
  156. package/dist/index347.js +123 -121
  157. package/dist/index348.js +421 -473
  158. package/dist/index349.js +125 -48
  159. package/dist/index35.js +3 -3
  160. package/dist/index350.js +490 -0
  161. package/dist/index351.js +52 -0
  162. package/dist/index37.js +263 -271
  163. package/dist/index39.js +7 -7
  164. package/dist/index41.js +2 -2
  165. package/dist/index43.js +8 -8
  166. package/dist/index45.js +6 -6
  167. package/dist/index49.js +1 -1
  168. package/dist/index55.js +1 -1
  169. package/dist/index57.js +2 -2
  170. package/dist/index61.js +2 -2
  171. package/dist/index79.js +206 -182
  172. package/dist/index81.js +1 -1
  173. package/dist/index83.js +2 -2
  174. package/dist/index85.js +1 -1
  175. package/dist/index87.js +1 -1
  176. package/dist/index90.js +1 -1
  177. package/dist/index92.js +1 -1
  178. package/dist/index94.js +121 -117
  179. package/dist/index96.js +1 -1
  180. package/dist/utilities/functions/extractDomContainer.d.ts +1 -0
  181. package/dist/utilities/functions/parseWidthString.d.ts +6 -0
  182. package/package.json +2 -2
  183. package/dist/index236.js +0 -7
  184. package/dist/index257.js +0 -4
  185. package/dist/index274.js +0 -11
  186. package/dist/index282.js +0 -69
  187. package/dist/index315.js +0 -4
  188. package/dist/index323.js +0 -4
package/dist/index39.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as re, ref as d, computed as p, onMounted as te, watch as le, createElementBlock as y, openBlock as g, mergeProps as N, renderSlot as v, createElementVNode as m, createCommentVNode as H, Fragment as oe, renderList as ne, normalizeProps as se, guardReactiveProps as ie, unref as c, normalizeStyle as G, normalizeClass as O } from "vue";
2
- import { head as ue } from "./index261.js";
3
- import { isCssColor as Y } from "./index235.js";
4
- import { isNil as S } from "./index260.js";
2
+ import { head as ue } from "./index263.js";
3
+ import { isCssColor as Y } from "./index228.js";
4
+ import { isNil as S } from "./index229.js";
5
5
  import { getAsPercentageBetween as x, getAsPercentage as de, getValueFromPercentageInInterval as T } from "./index139.js";
6
- import { snapToStep as me } from "./index262.js";
7
- import { last as ce } from "./index243.js";
8
- import { transpose as j } from "./index263.js";
9
- import { clamp as f } from "./index214.js";
6
+ import { snapToStep as me } from "./index264.js";
7
+ import { last as ce } from "./index247.js";
8
+ import { transpose as j } from "./index265.js";
9
+ import { clamp as f } from "./index213.js";
10
10
  const be = { class: "bb-base-slider__slider-container" }, ve = {
11
11
  key: 0,
12
12
  class: "bb-base-slider__ticks-container"
package/dist/index41.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as I, ref as f, computed as n, watch as S, createElementBlock as h, openBlock as y, normalizeProps as r, guardReactiveProps as d, createCommentVNode as A, createElementVNode as l, mergeProps as V, renderSlot as F } from "vue";
2
- import { isCssColor as b } from "./index235.js";
3
- import { when as N } from "./index250.js";
2
+ import { isCssColor as b } from "./index228.js";
3
+ import { when as N } from "./index259.js";
4
4
  const x = { class: "bb-base-switch-container" }, $ = /* @__PURE__ */ I({
5
5
  __name: "BaseSwitch",
6
6
  props: {
package/dist/index43.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as j, ref as k, toRef as d, createBlock as z, openBlock as G, unref as B, withCtx as s, renderSlot as l, normalizeProps as v, guardReactiveProps as b, createVNode as R, mergeProps as w, createSlots as W } from "vue";
2
2
  import K from "./index41.js";
3
3
  /* empty css */
4
- import N from "./index224.js";
4
+ import N from "./index219.js";
5
5
  /* empty css */
6
- import { useItemsGetter as U } from "./index226.js";
7
- import { useIndexById as T } from "./index227.js";
8
- import { useBaseOptions as q } from "./index228.js";
9
- import { useCoherence as J } from "./index229.js";
10
- import { hash as Q } from "./index230.js";
11
- import { useHashedWatcher as $ } from "./index231.js";
12
- import { usePrefill as X } from "./index232.js";
6
+ import { useItemsGetter as U } from "./index221.js";
7
+ import { useIndexById as T } from "./index222.js";
8
+ import { useBaseOptions as q } from "./index223.js";
9
+ import { useCoherence as J } from "./index224.js";
10
+ import { hash as Q } from "./index225.js";
11
+ import { useHashedWatcher as $ } from "./index226.js";
12
+ import { usePrefill as X } from "./index227.js";
13
13
  const ue = /* @__PURE__ */ j({
14
14
  __name: "BaseSwitchGroup",
15
15
  props: {
package/dist/index45.js CHANGED
@@ -6,14 +6,14 @@ import ae from "./index111.js";
6
6
  import le from "./index135.js";
7
7
  /* empty css */
8
8
  import ne from "./index137.js";
9
- import { last as re } from "./index243.js";
10
- import { useBaseOptions as ie } from "./index228.js";
11
- import { useIndexById as ue } from "./index227.js";
12
- import se from "./index253.js";
9
+ import { last as re } from "./index247.js";
10
+ import { useBaseOptions as ie } from "./index223.js";
11
+ import { useIndexById as ue } from "./index222.js";
12
+ import se from "./index254.js";
13
13
  /* empty css */
14
- import de from "./index255.js";
14
+ import de from "./index256.js";
15
15
  /* empty css */
16
- import { isEmpty as pe } from "./index257.js";
16
+ import { isEmpty as pe } from "./index258.js";
17
17
  const ce = { class: "bb-base-tag__input-container" }, me = ["id", "aria-describedby", "autocomplete", "autofocus", "disabled", "placeholder", "readonly", "required", "onKeydown"], De = /* @__PURE__ */ Q({
18
18
  __name: "BaseTag",
19
19
  props: {
package/dist/index49.js CHANGED
@@ -3,7 +3,7 @@ import E from "./index135.js";
3
3
  /* empty css */
4
4
  import I from "./index137.js";
5
5
  import { isNotNil as N } from "./index143.js";
6
- import { MaskInput as z } from "./index258.js";
6
+ import { MaskInput as z } from "./index275.js";
7
7
  const D = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type"], F = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "type", "value"], U = /* @__PURE__ */ V({
8
8
  __name: "BaseTextInput",
9
9
  props: {
package/dist/index55.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as b, computed as z, ref as o, onMounted as g, createElementBlock as l, openBlock as i, normalizeProps as _, guardReactiveProps as h, renderSlot as k } from "vue";
2
- import { isCssColor as y } from "./index235.js";
2
+ import { isCssColor as y } from "./index228.js";
3
3
  import { wait as C } from "./index138.js";
4
4
  const w = ["alt", "sizes", "src", "srcset"], B = {
5
5
  key: 1,
package/dist/index57.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as p, useSlots as d, computed as s, createElementBlock as m, openBlock as u, normalizeClass as g, createElementVNode as n, renderSlot as r, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
2
- import { isCssColor as l } from "./index235.js";
3
- import { isNil as B } from "./index260.js";
2
+ import { isCssColor as l } from "./index228.js";
3
+ import { isNil as B } from "./index229.js";
4
4
  const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, N = /* @__PURE__ */ p({
5
5
  __name: "BbBadge",
6
6
  props: {
package/dist/index61.js CHANGED
@@ -7,8 +7,8 @@ import p from "./index85.js";
7
7
  /* empty css */
8
8
  import T from "./index113.js";
9
9
  /* empty css */
10
- import { pickBy as W } from "./index269.js";
11
- import { noop as w } from "./index270.js";
10
+ import { pickBy as W } from "./index232.js";
11
+ import { noop as w } from "./index233.js";
12
12
  import { useLocale as D } from "./index216.js";
13
13
  const E = {
14
14
  key: 2,
package/dist/index79.js CHANGED
@@ -1,248 +1,272 @@
1
- import { defineComponent as N, computed as R, ref as E, watch as W, createBlock as h, openBlock as k, unref as f, normalizeClass as G, withCtx as D, createElementVNode as I, normalizeStyle as J, renderSlot as m, createElementBlock as q, Fragment as F, renderList as Q, createVNode as X, mergeProps as Y, createCommentVNode as A, toDisplayString as Z, normalizeProps as x, guardReactiveProps as ee } from "vue";
2
- import { findRightIndex as T } from "./index271.js";
3
- import { useId as te } from "./index8.js";
4
- import { useUntil as ne } from "./index217.js";
5
- import { wait as oe } from "./index138.js";
6
- import ae from "./index13.js";
1
+ import { defineComponent as ee, ref as q, computed as g, useTemplateRef as te, watch as oe, createElementBlock as D, openBlock as w, Fragment as L, renderSlot as p, createVNode as F, normalizeProps as ne, guardReactiveProps as ae, unref as m, mergeProps as B, withCtx as O, createElementVNode as V, normalizeStyle as ie, renderList as se, createBlock as K, createCommentVNode as P, toDisplayString as re } from "vue";
2
+ import { findRightIndex as T } from "./index234.js";
3
+ import { useId as le } from "./index8.js";
4
+ import { useUntil as de } from "./index217.js";
5
+ import { wait as ue } from "./index138.js";
6
+ import ce from "./index13.js";
7
7
  /* empty css */
8
- import B from "./index85.js";
8
+ import R from "./index85.js";
9
9
  /* empty css */
10
- import le from "./index221.js";
10
+ import fe from "./index235.js";
11
11
  /* empty css */
12
- import K from "./index272.js";
13
- const se = ["id", "aria-labelledby", "inert"], ie = { class: "item__content" }, Ee = /* @__PURE__ */ N({
12
+ import U from "./index237.js";
13
+ import { extractDomContainer as S } from "./index238.js";
14
+ import { useIntersectionObserver as pe, useElementSize as me } from "./index140.js";
15
+ import { parseWidthString as ve } from "./index239.js";
16
+ const be = ["id", "aria-labelledby", "inert"], ye = { class: "item__content" }, _e = /* @__PURE__ */ ee({
17
+ inheritAttrs: !1,
14
18
  __name: "BbDropdown",
15
19
  props: {
16
20
  arrowPadding: { default: 10 },
17
- block: { type: Boolean },
18
21
  disabled: { type: Boolean },
19
22
  eager: { type: Boolean },
20
23
  id: {},
21
24
  offset: { default: 3 },
22
25
  padding: { default: 6 },
23
26
  placement: { default: "bottom" },
24
- theme: { default: "default" },
25
27
  transitionDuration: { default: 300 },
26
28
  items: {},
29
+ theme: { default: "default" },
27
30
  width: { default: 200 }
28
31
  },
29
- setup(O) {
30
- const u = O, d = u.id ?? `bb_${te().id.value}`, c = R(() => {
31
- let e = u.items.findIndex((n) => !n.disabled), o = T(
32
- u.items,
32
+ setup(W) {
33
+ const l = W, u = l.id ?? `bb_${le().id.value}`, h = q(), k = g(() => S(h.value)), j = te("popover"), s = g(() => S(j.value)), i = q(!1), I = de(i, { initialValue: l.eager }), z = (e) => {
34
+ const o = S(e);
35
+ o && (h.value = o);
36
+ }, { resume: N, pause: G } = pe(
37
+ k,
38
+ async ([{ intersectionRatio: e }]) => {
39
+ e !== 1 && i.value && await f();
40
+ },
41
+ { threshold: [0, 1], immediate: !1 }
42
+ ), c = g(() => {
43
+ let e = l.items.findIndex((n) => !n.disabled), o = T(
44
+ l.items,
33
45
  (n) => !n.disabled
34
46
  );
35
- return u.items.map((n, t) => {
36
- const a = `${d}-item-${n.key}`, { onClick: _, ...C } = n, j = async () => {
37
- await p();
38
- const s = document.querySelector(`#${d}`);
39
- if (s) s instanceof HTMLElement && s.focus();
47
+ return l.items.map((n, t) => {
48
+ const a = `${u}-item-${n.key}`, { onClick: C, ..._ } = n, Z = async () => {
49
+ await f();
50
+ const r = document.querySelector(`#${u}`);
51
+ if (r) r instanceof HTMLElement && r.focus();
40
52
  else return;
41
- _ && _();
42
- }, z = (s) => {
43
- if (s.target instanceof HTMLElement && s.target.dataset.dropdownItem) {
44
- if (!i.value) return;
45
- if (s.key === "ArrowDown") {
46
- if (s.preventDefault(), i.value && t !== o) {
47
- const r = i.value.querySelector(
48
- K.map((v) => `#${a} ~ ${v}`).join(",")
53
+ C && C();
54
+ }, x = (r) => {
55
+ if (r.target instanceof HTMLElement && r.target.dataset.dropdownItem) {
56
+ if (!s.value) return;
57
+ if (r.key === "ArrowDown") {
58
+ if (r.preventDefault(), s.value && t !== o) {
59
+ const d = s.value.querySelector(
60
+ U.map((v) => `#${a} ~ ${v}`).join(",")
49
61
  );
50
- r && r instanceof HTMLElement && r.focus();
62
+ d && d instanceof HTMLElement && d.focus();
51
63
  }
52
- } else if (s.key === "ArrowUp") {
53
- if (s.preventDefault(), i.value && t !== e) {
54
- const r = T(u.items, (w, L) => L < t && !w.disabled), y = Array.from(
55
- i.value.querySelectorAll(".bb-dropdown__item")
56
- )[r];
57
- y && y instanceof HTMLElement && y.focus();
64
+ } else if (r.key === "ArrowUp") {
65
+ if (r.preventDefault(), s.value && t !== e) {
66
+ const d = T(l.items, (y, $) => $ < t && !y.disabled), b = Array.from(
67
+ s.value.querySelectorAll(".bb-dropdown__item")
68
+ )[d];
69
+ b && b instanceof HTMLElement && b.focus();
58
70
  }
59
- } else if (s.key === "Tab") {
60
- if (t === o && !s.shiftKey) {
61
- const r = K.join(","), v = Array.from(
62
- document.querySelectorAll(r)
63
- ), y = v.findIndex(
64
- (L) => L.id === d
65
- ), w = v[y + 1];
66
- if (w) w instanceof HTMLElement && (s.preventDefault(), p(), w.focus());
71
+ } else if (r.key === "Tab") {
72
+ if (t === o && !r.shiftKey) {
73
+ const d = U.join(","), v = Array.from(
74
+ document.querySelectorAll(d)
75
+ ), b = v.findIndex(
76
+ ($) => $.id === u
77
+ ), y = v[b + 1];
78
+ if (y) y instanceof HTMLElement && (r.preventDefault(), f(), y.focus());
67
79
  else return;
68
- } else if (t === e && s.shiftKey) {
69
- const r = document.querySelector(`#${d}`);
70
- if (r) r instanceof HTMLElement && (s.preventDefault(), r.focus());
80
+ } else if (t === e && r.shiftKey) {
81
+ const d = document.querySelector(`#${u}`);
82
+ if (d) d instanceof HTMLElement && (r.preventDefault(), d.focus());
71
83
  else return;
72
84
  }
73
85
  }
74
86
  }
75
87
  };
76
88
  return {
77
- ...C,
89
+ ..._,
78
90
  original: n,
79
91
  key: n.key.split(/\W+/g).join("_").toLowerCase(),
80
- disabled: C.disabled || u.disabled,
92
+ disabled: _.disabled || l.disabled,
81
93
  id: a,
82
- onClick: j,
83
- onKeydown: z
94
+ onClick: Z,
95
+ onKeydown: x
84
96
  };
85
97
  });
86
- }), b = E(), i = E(), l = E(!1), g = ne(l), P = () => {
87
- l.value ? p() : $();
88
- }, V = async (e) => {
89
- let o = u.items.findIndex((t) => !t.disabled), n = T(
90
- u.items,
98
+ }), J = () => {
99
+ i.value ? f() : E();
100
+ }, Q = async (e) => {
101
+ let o = l.items.findIndex((t) => !t.disabled), n = T(
102
+ l.items,
91
103
  (t) => !t.disabled
92
104
  );
93
105
  if (e.key === "ArrowDown") {
94
- if (e.preventDefault(), l.value || await $(), i.value && c.value.length && o !== -1) {
95
- const t = c.value[o].id, a = i.value.querySelector(`#${t}`);
106
+ if (e.preventDefault(), i.value || await E(), s.value && c.value.length && o !== -1) {
107
+ const t = c.value[o].id, a = s.value.querySelector(`#${t}`);
96
108
  a && a instanceof HTMLElement && a.focus();
97
109
  }
98
110
  } else if (e.key === "ArrowUp") {
99
- if (e.preventDefault(), l.value || await $(), i.value && c.value.length && n !== -1) {
100
- const t = c.value[n].id, a = i.value.querySelector(`#${t}`);
111
+ if (e.preventDefault(), i.value || await E(), s.value && c.value.length && n !== -1) {
112
+ const t = c.value[n].id, a = s.value.querySelector(`#${t}`);
101
113
  a && a instanceof HTMLElement && a.focus();
102
114
  }
103
- } else if (e.key === "Tab" && l.value && !e.shiftKey && (e.preventDefault(), i.value && c.value.length && o !== -1)) {
104
- const t = c.value[o].id, a = i.value.querySelector(`#${t}`);
115
+ } else if (e.key === "Tab" && i.value && !e.shiftKey && (e.preventDefault(), s.value && c.value.length && o !== -1)) {
116
+ const t = c.value[o].id, a = s.value.querySelector(`#${t}`);
105
117
  a && a instanceof HTMLElement && a.focus();
106
118
  }
107
119
  }, H = (e) => {
108
120
  const o = e.target;
109
121
  if (o && o instanceof HTMLElement) {
110
122
  let n = !0;
111
- b.value && b.value.$el.contains(o) && (n = !1), i.value && i.value.contains(o) && (n = !1), n && p();
123
+ s.value && s.value.contains(o) && (n = !1), n && f();
112
124
  }
113
125
  }, M = (e) => {
114
126
  const o = e.target;
115
127
  if (o && o instanceof HTMLElement) {
116
128
  let n = !0;
117
- b.value && b.value.$el.contains(o) && (n = !1), n && p();
129
+ s.value && s.value.contains(o) && (n = !1), n && f();
118
130
  }
119
- }, S = (e) => {
131
+ }, A = (e) => {
120
132
  var o;
121
- if (l.value && e.key === "Escape") {
122
- if (((o = document.activeElement) == null ? void 0 : o.id) !== d) {
123
- const n = document.querySelector(`#${d}`);
124
- n instanceof HTMLElement && n.focus();
133
+ if (i.value && e.key === "Escape") {
134
+ if (((o = document.activeElement) == null ? void 0 : o.id) !== u) {
135
+ const n = document.querySelector(`#${u}`);
136
+ n && n.focus();
125
137
  }
126
- p();
138
+ f();
127
139
  }
128
- }, U = E(!1), $ = async () => {
129
- U.value = !0, await oe(50), l.value = !0, document.addEventListener("click", H, { passive: !0 }), document.addEventListener("focusin", M, { passive: !0 }), document.addEventListener("keydown", S, { passive: !0 });
130
- }, p = async () => {
131
- l.value = !1;
140
+ }, E = async () => {
141
+ N(), await ue(50), i.value = !0, document.addEventListener("click", H, { passive: !0 }), document.addEventListener("focusin", M, { passive: !0 }), document.addEventListener("keydown", A, { passive: !0 });
142
+ }, f = async () => {
143
+ i.value = !1, G();
132
144
  };
133
- return W(l, (e) => {
134
- e || (document.removeEventListener("click", H), document.removeEventListener("focusin", M), document.removeEventListener("keydown", S));
135
- }), (e, o) => (k(), h(le, {
136
- ref_key: "wrapper",
137
- ref: b,
138
- modelValue: l.value,
139
- "onUpdate:modelValue": o[0] || (o[0] = (n) => l.value = n),
140
- "arrow-padding": e.arrowPadding,
141
- block: e.block,
142
- class: G(["bb-dropdown", {
143
- [`bb-dropdown--${e.theme}`]: !0
144
- }]),
145
- offset: e.offset,
146
- padding: e.padding,
147
- placement: e.placement,
148
- "render-content": f(g),
149
- "transition-duration": e.transitionDuration
150
- }, {
151
- activator: D(() => [
152
- m(e.$slots, "activator", x(ee({
153
- props: {
154
- "aria-expanded": f(g) ? l.value : !1,
155
- "aria-controls": f(g) ? `menu_${f(d)}` : void 0,
156
- id: f(d),
157
- onClick: P,
158
- onKeydown: V,
159
- disabled: e.disabled
160
- },
145
+ oe(i, (e) => {
146
+ e || (document.removeEventListener("click", H), document.removeEventListener("focusin", M), document.removeEventListener("keydown", A));
147
+ });
148
+ const { width: X } = me(
149
+ k,
150
+ { width: 0, height: 0 },
151
+ {
152
+ box: "border-box"
153
+ }
154
+ ), Y = g(() => {
155
+ if (l.width) {
156
+ const { value: e, unit: o } = ve(l.width);
157
+ return o === "%" ? k.value ? `${X.value * (e / 100)}px` : "0px" : `${e}px`;
158
+ }
159
+ return "0px";
160
+ });
161
+ return (e, o) => (w(), D(L, null, [
162
+ p(e.$slots, "activator", ne(ae({
163
+ props: {
164
+ "aria-expanded": m(I) ? i.value : !1,
165
+ "aria-controls": m(I) ? `menu_${m(u)}` : void 0,
166
+ id: m(u),
167
+ onClick: J,
168
+ onKeydown: Q,
161
169
  disabled: e.disabled,
162
- open: l.value,
163
- placement: e.placement
164
- })))
165
- ]),
166
- default: D(() => [
167
- I("span", {
168
- id: `menu_${f(d)}`,
169
- ref_key: "content",
170
- ref: i,
171
- "aria-labelledby": f(d),
172
- "aria-role": "menu",
173
- class: "bb-dropdown__items-container",
174
- inert: !l.value,
175
- style: J({ width: `${e.width}px` })
176
- }, [
177
- m(e.$slots, "prepend", {
178
- disabled: e.disabled,
179
- open: l.value,
180
- placement: e.placement
181
- }),
182
- (k(!0), q(F, null, Q(c.value, ({ original: n, ...t }, a) => (k(), q(F, {
183
- key: t.key
170
+ ref: z
171
+ },
172
+ disabled: e.disabled,
173
+ open: i.value,
174
+ placement: e.placement
175
+ }))),
176
+ F(fe, B({
177
+ ref: "popover",
178
+ modelValue: i.value,
179
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => i.value = n),
180
+ anchor: h.value,
181
+ "arrow-padding": e.arrowPadding,
182
+ class: ["bb-dropdown", {
183
+ [`bb-dropdown--${e.theme}`]: !0
184
+ }],
185
+ eager: e.eager,
186
+ offset: e.offset,
187
+ padding: e.padding,
188
+ placement: e.placement,
189
+ "transition-duration": e.transitionDuration
190
+ }, e.$attrs), {
191
+ default: O(() => [
192
+ V("span", {
193
+ id: `menu_${m(u)}`,
194
+ "aria-labelledby": m(u),
195
+ "aria-role": "menu",
196
+ class: "bb-dropdown__items-container",
197
+ inert: !i.value,
198
+ style: ie({ width: Y.value })
184
199
  }, [
185
- m(e.$slots, "item:prepend", {
186
- disabled: t.disabled,
187
- index: a,
188
- item: e.items[a],
189
- open: l.value,
190
- placement: e.placement,
191
- text: t.text
200
+ p(e.$slots, "prepend", {
201
+ disabled: e.disabled,
202
+ open: i.value,
203
+ placement: e.placement
192
204
  }),
193
- X(ae, Y({
194
- "aria-role": "menuitem",
195
- class: ["bb-dropdown__item", {
196
- "bb-dropdown__item--first": a === 0,
197
- "bb-dropdown__item--last": a === e.items.length - 1
198
- }],
199
- "data-dropdown-item": !0,
200
- ref_for: !0
201
- }, t), {
202
- default: D(() => [
203
- m(e.$slots, t.key, {
204
- disabled: t.disabled,
205
- index: a,
206
- item: n,
207
- open: l.value,
208
- placement: e.placement,
209
- text: t.text
210
- }, () => [
211
- t["prepend:icon"] ? (k(), h(B, {
212
- key: 0,
213
- class: "item__prepend-icon",
214
- type: t["prepend:icon"]
215
- }, null, 8, ["type"])) : A("", !0),
216
- I("span", ie, Z(t.text), 1),
217
- t["append:icon"] ? (k(), h(B, {
218
- key: 1,
219
- class: "item__append-icon",
220
- type: t["append:icon"]
221
- }, null, 8, ["type"])) : A("", !0)
222
- ])
223
- ]),
224
- _: 2
225
- }, 1040, ["class"]),
226
- m(e.$slots, "item:append", {
227
- disabled: t.disabled,
228
- index: a,
229
- item: e.items[a],
230
- open: l.value,
231
- placement: e.placement,
232
- text: t.text
205
+ (w(!0), D(L, null, se(c.value, ({ original: n, ...t }, a) => (w(), D(L, {
206
+ key: t.key
207
+ }, [
208
+ p(e.$slots, "item:prepend", {
209
+ disabled: t.disabled,
210
+ index: a,
211
+ item: e.items[a],
212
+ open: i.value,
213
+ placement: e.placement,
214
+ text: t.text
215
+ }),
216
+ F(ce, B({
217
+ "aria-role": "menuitem",
218
+ class: ["bb-dropdown__item", {
219
+ "bb-dropdown__item--first": a === 0,
220
+ "bb-dropdown__item--last": a === e.items.length - 1
221
+ }],
222
+ "data-dropdown-item": !0,
223
+ ref_for: !0
224
+ }, t), {
225
+ default: O(() => [
226
+ p(e.$slots, t.key, {
227
+ disabled: t.disabled,
228
+ index: a,
229
+ item: n,
230
+ open: i.value,
231
+ placement: e.placement,
232
+ text: t.text
233
+ }, () => [
234
+ t["prepend:icon"] ? (w(), K(R, {
235
+ key: 0,
236
+ class: "item__prepend-icon",
237
+ type: t["prepend:icon"]
238
+ }, null, 8, ["type"])) : P("", !0),
239
+ V("span", ye, re(t.text), 1),
240
+ t["append:icon"] ? (w(), K(R, {
241
+ key: 1,
242
+ class: "item__append-icon",
243
+ type: t["append:icon"]
244
+ }, null, 8, ["type"])) : P("", !0)
245
+ ])
246
+ ]),
247
+ _: 2
248
+ }, 1040, ["class"]),
249
+ p(e.$slots, "item:append", {
250
+ disabled: t.disabled,
251
+ index: a,
252
+ item: e.items[a],
253
+ open: i.value,
254
+ placement: e.placement,
255
+ text: t.text
256
+ })
257
+ ], 64))), 128)),
258
+ p(e.$slots, "append", {
259
+ disabled: e.disabled,
260
+ open: i.value,
261
+ placement: e.placement
233
262
  })
234
- ], 64))), 128)),
235
- m(e.$slots, "append", {
236
- disabled: e.disabled,
237
- open: l.value,
238
- placement: e.placement
239
- })
240
- ], 12, se)
241
- ]),
242
- _: 3
243
- }, 8, ["modelValue", "arrow-padding", "block", "class", "offset", "padding", "placement", "render-content", "transition-duration"]));
263
+ ], 12, be)
264
+ ]),
265
+ _: 3
266
+ }, 16, ["modelValue", "anchor", "arrow-padding", "class", "eager", "offset", "padding", "placement", "transition-duration"])
267
+ ], 64));
244
268
  }
245
269
  });
246
270
  export {
247
- Ee as default
271
+ _e as default
248
272
  };
package/dist/index81.js CHANGED
@@ -17,7 +17,6 @@ const O = { class: "bb-dropdown-button__content" }, R = {
17
17
  __name: "BbDropdownButton",
18
18
  props: {
19
19
  arrowPadding: {},
20
- block: { type: Boolean },
21
20
  disabled: { type: Boolean },
22
21
  eager: { type: Boolean },
23
22
  id: {},
@@ -30,6 +29,7 @@ const O = { class: "bb-dropdown-button__content" }, R = {
30
29
  width: {},
31
30
  autoLoading: { type: Boolean, default: !0 },
32
31
  "append:icon": {},
32
+ block: { type: Boolean },
33
33
  disabledWhileLoading: { type: Boolean, default: !0 },
34
34
  loading: { type: Boolean },
35
35
  "prepend:icon": {},
package/dist/index83.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as j, ref as g, watch as x, computed as m, createBlock as G, openBlock as V, resolveDynamicComponent as K, normalizeClass as O, withCtx as M, createElementVNode as c, withModifiers as y, renderSlot as U, normalizeProps as Y, guardReactiveProps as Z, createTextVNode as J, unref as Q, createVNode as W, createElementBlock as F, Fragment as X, renderList as ee, toDisplayString as te } from "vue";
2
- import { findInTree as ae } from "./index276.js";
2
+ import { findInTree as ae } from "./index231.js";
3
3
  import { useId as re } from "./index8.js";
4
4
  import oe from "./index111.js";
5
5
  /* empty css */
@@ -53,7 +53,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = { class: "bb-dr
53
53
  const r = a.accept[t];
54
54
  if (r.includes("/")) e.push(r);
55
55
  else {
56
- b || (b = (await import("./index275.js")).default);
56
+ b || (b = (await import("./index230.js")).default);
57
57
  const o = b.getType(r);
58
58
  if (!o)
59
59
  throw new Error(
package/dist/index85.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, ref as p, getCurrentInstance as c, onServerPrefetch as w, onBeforeMount as z, inject as _, watch as b, computed as f, createElementBlock as h, openBlock as $, mergeProps as g } from "vue";
2
- import { isCssColor as I } from "./index235.js";
2
+ import { isCssColor as I } from "./index228.js";
3
3
  const B = ["innerHTML"], k = /* @__PURE__ */ v({
4
4
  __name: "BbIcon",
5
5
  props: {
package/dist/index87.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, createBlock as g, openBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
2
- import { throttle as c } from "./index273.js";
2
+ import { throttle as c } from "./index218.js";
3
3
  const M = /* @__PURE__ */ h({
4
4
  __name: "BbIntersection",
5
5
  props: {