bitboss-ui 2.0.13 → 2.0.15

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 (223) hide show
  1. package/dist/index107.js +5 -5
  2. package/dist/index115.js +1 -1
  3. package/dist/index117.js +5 -5
  4. package/dist/index119.js +1 -1
  5. package/dist/index123.js +1 -1
  6. package/dist/index124.js +1 -1
  7. package/dist/index125.js +1 -1
  8. package/dist/index127.js +1 -1
  9. package/dist/index14.js +1 -1
  10. package/dist/index16.js +3 -3
  11. package/dist/index18.js +2 -2
  12. package/dist/index20.js +12 -12
  13. package/dist/index200.js +2 -2
  14. package/dist/index200.js.map +1 -1
  15. package/dist/index201.js +126 -4
  16. package/dist/index201.js.map +1 -1
  17. package/dist/index202.js +5 -2
  18. package/dist/index202.js.map +1 -1
  19. package/dist/index203.js +123 -2
  20. package/dist/index203.js.map +1 -1
  21. package/dist/index204.js +19 -5
  22. package/dist/index204.js.map +1 -1
  23. package/dist/index205.js +2 -2
  24. package/dist/index206.js +2 -2
  25. package/dist/index207.js +2 -19
  26. package/dist/index207.js.map +1 -1
  27. package/dist/index208.js +2 -19
  28. package/dist/index208.js.map +1 -1
  29. package/dist/index209.js +34 -26
  30. package/dist/index209.js.map +1 -1
  31. package/dist/index210.js +174 -3
  32. package/dist/index210.js.map +1 -1
  33. package/dist/index211.js +6 -2
  34. package/dist/index211.js.map +1 -1
  35. package/dist/index212.js +42 -6
  36. package/dist/index212.js.map +1 -1
  37. package/dist/index214.js +13 -52
  38. package/dist/index214.js.map +1 -1
  39. package/dist/index215.js +5 -44
  40. package/dist/index215.js.map +1 -1
  41. package/dist/index216.js +369 -5
  42. package/dist/index216.js.map +1 -1
  43. package/dist/index217.js +6 -47
  44. package/dist/index217.js.map +1 -1
  45. package/dist/index218.js +3 -3
  46. package/dist/index218.js.map +1 -1
  47. package/dist/index219.js +156 -33
  48. package/dist/index219.js.map +1 -1
  49. package/dist/index22.js +13 -13
  50. package/dist/index220.js +83 -5
  51. package/dist/index220.js.map +1 -1
  52. package/dist/index222.js +3 -44
  53. package/dist/index222.js.map +1 -1
  54. package/dist/{index221.js → index223.js} +1 -1
  55. package/dist/{index221.js.map → index223.js.map} +1 -1
  56. package/dist/index224.js +19 -13
  57. package/dist/index224.js.map +1 -1
  58. package/dist/index225.js +25 -124
  59. package/dist/index225.js.map +1 -1
  60. package/dist/index226.js +3 -123
  61. package/dist/index226.js.map +1 -1
  62. package/dist/index227.js +249 -2
  63. package/dist/index227.js.map +1 -1
  64. package/dist/index228.js +49 -171
  65. package/dist/index228.js.map +1 -1
  66. package/dist/index229.js +44 -5
  67. package/dist/index229.js.map +1 -1
  68. package/dist/index230.js +5 -369
  69. package/dist/index230.js.map +1 -1
  70. package/dist/index231.js +48 -157
  71. package/dist/index231.js.map +1 -1
  72. package/dist/index232.js +2 -84
  73. package/dist/index232.js.map +1 -1
  74. package/dist/index233.js +7 -0
  75. package/dist/index233.js.map +1 -0
  76. package/dist/index234.js +2 -3
  77. package/dist/index234.js.map +1 -1
  78. package/dist/index235.js +2 -106
  79. package/dist/index235.js.map +1 -1
  80. package/dist/{index240.js → index236.js} +1 -1
  81. package/dist/{index240.js.map → index236.js.map} +1 -1
  82. package/dist/index237.js +53 -47
  83. package/dist/index237.js.map +1 -1
  84. package/dist/index239.js +100 -2
  85. package/dist/index239.js.map +1 -1
  86. package/dist/index24.js +5 -5
  87. package/dist/index244.js +281 -4
  88. package/dist/index244.js.map +1 -1
  89. package/dist/index245.js +6 -3
  90. package/dist/index245.js.map +1 -1
  91. package/dist/index246.js +2 -9
  92. package/dist/index246.js.map +1 -1
  93. package/dist/index247.js +2 -23
  94. package/dist/index247.js.map +1 -1
  95. package/dist/index248.js +2 -281
  96. package/dist/index248.js.map +1 -1
  97. package/dist/index249.js +2 -6
  98. package/dist/index249.js.map +1 -1
  99. package/dist/index250.js +2 -2
  100. package/dist/index251.js +126 -2
  101. package/dist/index251.js.map +1 -1
  102. package/dist/index252.js +431 -2
  103. package/dist/index252.js.map +1 -1
  104. package/dist/index253.js +3 -2
  105. package/dist/index253.js.map +1 -1
  106. package/dist/index255.js +7 -2
  107. package/dist/index255.js.map +1 -1
  108. package/dist/index256.js +21 -1
  109. package/dist/index256.js.map +1 -1
  110. package/dist/index258.js +3 -2
  111. package/dist/index258.js.map +1 -1
  112. package/dist/index259.js +9 -2
  113. package/dist/index259.js.map +1 -1
  114. package/dist/index26.js +1 -1
  115. package/dist/index260.js +23 -28
  116. package/dist/index260.js.map +1 -1
  117. package/dist/index261.js +199 -21
  118. package/dist/index261.js.map +1 -1
  119. package/dist/{index283.js → index262.js} +2 -2
  120. package/dist/{index283.js.map → index262.js.map} +1 -1
  121. package/dist/index263.js +126 -6
  122. package/dist/index263.js.map +1 -1
  123. package/dist/index264.js +9 -6
  124. package/dist/index264.js.map +1 -1
  125. package/dist/index265.js +6 -16
  126. package/dist/index265.js.map +1 -1
  127. package/dist/index266.js +16 -9
  128. package/dist/index266.js.map +1 -1
  129. package/dist/index267.js +219 -426
  130. package/dist/index267.js.map +1 -1
  131. package/dist/index268.js +3 -89
  132. package/dist/index268.js.map +1 -1
  133. package/dist/index269.js +11 -199
  134. package/dist/index269.js.map +1 -1
  135. package/dist/index270.js +9 -3
  136. package/dist/index270.js.map +1 -1
  137. package/dist/index271.js +12 -0
  138. package/dist/index271.js.map +1 -0
  139. package/dist/index272.js +17 -2
  140. package/dist/index272.js.map +1 -1
  141. package/dist/index273.js +89 -9
  142. package/dist/index273.js.map +1 -1
  143. package/dist/index274.js +5 -2
  144. package/dist/index274.js.map +1 -1
  145. package/dist/index275.js +2 -126
  146. package/dist/index275.js.map +1 -1
  147. package/dist/index276.js +2 -22
  148. package/dist/index276.js.map +1 -1
  149. package/dist/index277.js +5 -0
  150. package/dist/index277.js.map +1 -0
  151. package/dist/index278.js +2 -3
  152. package/dist/index278.js.map +1 -1
  153. package/dist/index279.js +2 -12
  154. package/dist/index279.js.map +1 -1
  155. package/dist/index28.js +3 -3
  156. package/dist/index280.js +2 -9
  157. package/dist/index280.js.map +1 -1
  158. package/dist/index281.js +25 -14
  159. package/dist/index281.js.map +1 -1
  160. package/dist/index282.js +22 -224
  161. package/dist/index282.js.map +1 -1
  162. package/dist/index284.js +68 -126
  163. package/dist/index284.js.map +1 -1
  164. package/dist/index285.js +2 -69
  165. package/dist/index285.js.map +1 -1
  166. package/dist/index286.js +4 -5
  167. package/dist/index286.js.map +1 -1
  168. package/dist/index287.js +1 -1
  169. package/dist/index288.js +1 -1
  170. package/dist/index289.js +2 -2
  171. package/dist/index291.js +35 -4
  172. package/dist/index291.js.map +1 -1
  173. package/dist/index292.js +79 -4
  174. package/dist/index292.js.map +1 -1
  175. package/dist/index294.js +4 -79
  176. package/dist/index294.js.map +1 -1
  177. package/dist/index295.js +7 -0
  178. package/dist/index295.js.map +1 -0
  179. package/dist/index296.js +58 -6
  180. package/dist/index296.js.map +1 -1
  181. package/dist/index297.js +10 -6
  182. package/dist/index297.js.map +1 -1
  183. package/dist/index298.js +2 -19
  184. package/dist/index298.js.map +1 -1
  185. package/dist/index299.js +6 -34
  186. package/dist/index299.js.map +1 -1
  187. package/dist/index30.js +2 -2
  188. package/dist/index300.js +6 -46
  189. package/dist/index300.js.map +1 -1
  190. package/dist/index301.js +19 -2
  191. package/dist/index301.js.map +1 -1
  192. package/dist/index302.js +46 -10
  193. package/dist/index302.js.map +1 -1
  194. package/dist/index303.js +1 -1
  195. package/dist/index32.js +2 -2
  196. package/dist/index34.js +3 -3
  197. package/dist/index36.js +13 -13
  198. package/dist/index38.js +3 -3
  199. package/dist/index40.js +2 -2
  200. package/dist/index42.js +2 -2
  201. package/dist/index44.js +6 -6
  202. package/dist/index46.js +2 -2
  203. package/dist/index48.js +2 -2
  204. package/dist/index54.js +1 -1
  205. package/dist/index56.js +1 -1
  206. package/dist/index72.js +21 -21
  207. package/dist/index72.js.map +1 -1
  208. package/dist/index76.js +2 -2
  209. package/dist/index78.js +1 -1
  210. package/dist/index81.js +2 -2
  211. package/dist/index83.js +1 -1
  212. package/dist/index85.js +3 -3
  213. package/dist/index87.js +1 -1
  214. package/dist/style.css +1 -1
  215. package/package.json +2 -2
  216. package/dist/index213.js +0 -252
  217. package/dist/index213.js.map +0 -1
  218. package/dist/index254.js +0 -5
  219. package/dist/index254.js.map +0 -1
  220. package/dist/index257.js +0 -5
  221. package/dist/index257.js.map +0 -1
  222. package/dist/index293.js +0 -62
  223. package/dist/index293.js.map +0 -1
package/dist/index72.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as Q, defineAsyncComponent as W, computed as A, ref as g, openBlock as $, createElementBlock as D, mergeProps as B, createElementVNode as O, renderSlot as w, normalizeProps as X, guardReactiveProps as Y, unref as h, createBlock as Z, withCtx as K, normalizeStyle as _, Fragment as P, renderList as x, createVNode as ee, createCommentVNode as te } from "vue";
2
- import { findRightIndex as H } from "./index246.js";
2
+ import { findRightIndex as H } from "./index259.js";
3
3
  import { useId as ne } from "./index9.js";
4
4
  import { wait as oe } from "./index128.js";
5
5
  import { useIntersectionObserver as ae } from "./index129.js";
6
6
  import le from "./index14.js";
7
7
  /* empty css */
8
- import N from "./index247.js";
8
+ import N from "./index260.js";
9
9
  const me = /* @__PURE__ */ Q({
10
10
  __name: "BbDropdown",
11
11
  props: {
@@ -24,7 +24,7 @@ const me = /* @__PURE__ */ Q({
24
24
  },
25
25
  setup(V) {
26
26
  const j = W(
27
- () => import("./index245.js")
27
+ () => import("./index258.js")
28
28
  ), r = V, d = r.id ?? `bb_${ne().id.value}`, m = A(() => {
29
29
  let e = r.items.findIndex((t) => !t.disabled), o = H(
30
30
  r.items,
@@ -183,20 +183,20 @@ const me = /* @__PURE__ */ Q({
183
183
  wrapper: v.value
184
184
  }, {
185
185
  default: K(() => [
186
- w(e.$slots, "prepend", {
187
- closed: p.value,
188
- closing: f.value,
189
- disabled: e.disabled,
190
- open: l.value,
191
- opening: c.value,
192
- placement: e.placement
193
- }),
194
186
  O("span", {
195
187
  ref_key: "content",
196
188
  ref: a,
197
189
  class: "bb-dropdown__items-container",
198
190
  style: _({ width: `${e.width}px` })
199
191
  }, [
192
+ w(e.$slots, "prepend", {
193
+ closed: p.value,
194
+ closing: f.value,
195
+ disabled: e.disabled,
196
+ open: l.value,
197
+ opening: c.value,
198
+ placement: e.placement
199
+ }),
200
200
  ($(!0), D(P, null, x(m.value, (t, n) => ($(), D(P, {
201
201
  key: t.key
202
202
  }, [
@@ -258,16 +258,16 @@ const me = /* @__PURE__ */ Q({
258
258
  placement: e.placement,
259
259
  text: t.text
260
260
  })
261
- ], 64))), 128))
262
- ], 4),
263
- w(e.$slots, "append", {
264
- closed: p.value,
265
- closing: f.value,
266
- disabled: e.disabled,
267
- open: l.value,
268
- opening: c.value,
269
- placement: e.placement
270
- })
261
+ ], 64))), 128)),
262
+ w(e.$slots, "append", {
263
+ closed: p.value,
264
+ closing: f.value,
265
+ disabled: e.disabled,
266
+ open: l.value,
267
+ opening: c.value,
268
+ placement: e.placement
269
+ })
270
+ ], 4)
271
271
  ]),
272
272
  _: 3
273
273
  }, 8, ["arrow-padding", "container-attributes", "eager", "offset", "open", "padding", "placement", "theme", "transition-duration", "wrapper"])) : te("", !0)
@@ -1 +1 @@
1
- {"version":3,"file":"index72.js","sources":["../src/components/BbDropdown/BbDropdown.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-dropdown\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-dropdown__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\t'aria-controls': `menu_${id}`,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tonClick,\n\t\t\t\t\t\tonKeydown,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<CommonFloating\n\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\tbase-class=\"bb-dropdown\"\n\t\t\t:container-attributes=\"{\n\t\t\t\tid: `menu_${id}`,\n\t\t\t\t'aria-labelledby': id,\n\t\t\t\t'aria-role': 'menu',\n\t\t\t}\"\n\t\t\t:eager=\"eager\"\n\t\t\t:offset=\"offset\"\n\t\t\t:open=\"open\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:wrapper=\"wrapper\"\n\t\t>\n\t\t\t<slot\n\t\t\t\t:closed=\"closed\"\n\t\t\t\t:closing=\"closing\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\tname=\"prepend\"\n\t\t\t\t:open=\"open\"\n\t\t\t\t:opening=\"opening\"\n\t\t\t\t:placement=\"placement\"\n\t\t\t></slot>\n\t\t\t<span\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-dropdown__items-container\"\n\t\t\t\t:style=\"{ width: `${width}px` }\"\n\t\t\t>\n\t\t\t\t<template v-for=\"(item, index) in mappedItems\" :key=\"item.key\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:aria-role=\"'menuitem'\"\n\t\t\t\t\t\tclass=\"bb-dropdown__item\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t'bb-dropdown__item--last': index === items.length - 1,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:data-dropdown-item=\"true\"\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t:name=\"item.key\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</template>\n\t\t\t</span>\n\t\t\t<slot\n\t\t\t\t:closed=\"closed\"\n\t\t\t\t:closing=\"closing\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\tname=\"append\"\n\t\t\t\t:open=\"open\"\n\t\t\t\t:opening=\"opening\"\n\t\t\t\t:placement=\"placement\"\n\t\t\t></slot>\n\t\t</CommonFloating>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst CommonFloating = defineAsyncComponent(\n\t() => import('../CommonFloating.vue')\n);\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\ndefineSlots<\n\t{\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\nconst props = withDefaults(defineProps<BbDropdownProps>(), {\n\tarrowPadding: 10,\n\tplacement: 'bottom',\n\ttheme: 'default',\n\ttransitionDuration: 300,\n\twidth: 200,\n\tpadding: 6,\n\toffset: 3,\n});\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<any>();\nconst content = ref<HTMLElement>();\n\nuseIntersectionObserver(\n\twrapper,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1 && open.value) closeDropdown();\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\n\tawait wait(50);\n\topen.value = true;\n\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = async () => {\n\topen.value = false;\n\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdown';\n</style>\n"],"names":["CommonFloating","defineAsyncComponent","props","__props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","useIntersectionObserver","intersectionRatio","open","opening","closing","closed","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8IA,UAAMA,IAAiBC;AAAA,MACtB,MAAM,OAAO,eAAuB;AAAA,IAAA,GAqI/BC,IAAQC,GAURC,IAAKF,EAAM,MAAM,MAAMG,KAAQ,GAAG,KAAK,IAEvCC,IAAcC,EAAuB,MAAM;AAC5C,UAAAC,IAA8BN,EAAM,MAAM,UAAU,CAACO,MAAO,CAACA,EAAG,QAAQ,GACxEC,IAA6BC;AAAA,QAChCT,EAAM;AAAA,QACN,CAACU,MAAS,CAACA,EAAK;AAAA,MAAA;AAGjB,aAAOV,EAAM,MAAM,IAAI,CAACU,GAAMC,MAAU;AACvC,cAAMC,IAAS,GAAGV,CAAE,SAASQ,EAAK,GAAG,IAC/B,EAAE,SAASG,GAAS,GAAGC,MAASJ,GAKhCK,IAAU,YAAY;AAC3B,gBAAMC,EAAc;AACpB,gBAAMC,IAAc,SAAS,cAAc,IAAIf,CAAE,EAAE;AACnD,cAAKe,EAAa,CACTA,aAAuB,eAC/BA,EAAY,MAAM;AAAA,cAFD;AAIlB,UAAIJ,KAAiBA;QAAA,GAWhBK,IAAY,CAACC,MAAyB;AAC3C,cACCA,EAAM,kBAAkB,eACxBA,EAAM,OAAO,QAAQ,cACpB;AACG,gBAAA,CAACC,EAAQ,MAAO;AAChB,gBAAAD,EAAM,QAAQ;AAEb,kBADJA,EAAM,eAAe,GACjBC,EAAQ,SAAST,MAAUH,GAAoB;AAC5C,sBAAAa,IAASD,EAAQ,MAAM;AAAA,kBAC5BE,EAAU,IAAI,CAACC,MAAa,IAAIX,CAAM,MAAMW,CAAQ,EAA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gBhB,EAAI,EAAK,GACzBO,IAAe,YAAY;AAChC,MAAAS,EAAc,QAAQ,IACtB,MAAMC,GAAK,EAAE,GACbd,EAAK,QAAQ,IAEb,SAAS,iBAAiB,SAASM,GAAiB,EAAE,SAAS,IAAM,GACrE,SAAS,iBAAiB,WAAWG,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,WAAWC,GAAO,EAAE,SAAS,IAAM;AAAA,IAAA,GAGxD1B,IAAgB,YAAY;AACjC,MAAAgB,EAAK,QAAQ,IACJ,SAAA,oBAAoB,SAASM,CAAe,GAC5C,SAAA,oBAAoB,WAAWG,CAAe,GAC9C,SAAA,oBAAoB,WAAWC,CAAK;AAAA,IAAA,GAGxCK,IAAa1C,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,sBAAsBL,EAAM;AAAA,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index72.js","sources":["../src/components/BbDropdown/BbDropdown.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-dropdown\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-dropdown__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\t'aria-controls': `menu_${id}`,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tonClick,\n\t\t\t\t\t\tonKeydown,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<CommonFloating\n\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\tbase-class=\"bb-dropdown\"\n\t\t\t:container-attributes=\"{\n\t\t\t\tid: `menu_${id}`,\n\t\t\t\t'aria-labelledby': id,\n\t\t\t\t'aria-role': 'menu',\n\t\t\t}\"\n\t\t\t:eager=\"eager\"\n\t\t\t:offset=\"offset\"\n\t\t\t:open=\"open\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:wrapper=\"wrapper\"\n\t\t>\n\t\t\t<span\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-dropdown__items-container\"\n\t\t\t\t:style=\"{ width: `${width}px` }\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"prepend\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t\t<template v-for=\"(item, index) in mappedItems\" :key=\"item.key\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:aria-role=\"'menuitem'\"\n\t\t\t\t\t\tclass=\"bb-dropdown__item\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t'bb-dropdown__item--last': index === items.length - 1,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:data-dropdown-item=\"true\"\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t:name=\"item.key\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</slot> </BaseButton\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</template>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"append\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t</span>\n\t\t</CommonFloating>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst CommonFloating = defineAsyncComponent(\n\t() => import('../CommonFloating.vue')\n);\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\ndefineSlots<\n\t{\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\nconst props = withDefaults(defineProps<BbDropdownProps>(), {\n\tarrowPadding: 10,\n\tplacement: 'bottom',\n\ttheme: 'default',\n\ttransitionDuration: 300,\n\twidth: 200,\n\tpadding: 6,\n\toffset: 3,\n});\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<any>();\nconst content = ref<HTMLElement>();\n\nuseIntersectionObserver(\n\twrapper,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1 && open.value) closeDropdown();\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\n\tawait wait(50);\n\topen.value = true;\n\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = async () => {\n\topen.value = false;\n\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdown';\n</style>\n"],"names":["CommonFloating","defineAsyncComponent","props","__props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","useIntersectionObserver","intersectionRatio","open","opening","closing","closed","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6IA,UAAMA,IAAiBC;AAAA,MACtB,MAAM,OAAO,eAAuB;AAAA,IAAA,GAqI/BC,IAAQC,GAURC,IAAKF,EAAM,MAAM,MAAMG,KAAQ,GAAG,KAAK,IAEvCC,IAAcC,EAAuB,MAAM;AAC5C,UAAAC,IAA8BN,EAAM,MAAM,UAAU,CAACO,MAAO,CAACA,EAAG,QAAQ,GACxEC,IAA6BC;AAAA,QAChCT,EAAM;AAAA,QACN,CAACU,MAAS,CAACA,EAAK;AAAA,MAAA;AAGjB,aAAOV,EAAM,MAAM,IAAI,CAACU,GAAMC,MAAU;AACvC,cAAMC,IAAS,GAAGV,CAAE,SAASQ,EAAK,GAAG,IAC/B,EAAE,SAASG,GAAS,GAAGC,MAASJ,GAKhCK,IAAU,YAAY;AAC3B,gBAAMC,EAAc;AACpB,gBAAMC,IAAc,SAAS,cAAc,IAAIf,CAAE,EAAE;AACnD,cAAKe,EAAa,CACTA,aAAuB,eAC/BA,EAAY,MAAM;AAAA,cAFD;AAIlB,UAAIJ,KAAiBA;QAAA,GAWhBK,IAAY,CAACC,MAAyB;AAC3C,cACCA,EAAM,kBAAkB,eACxBA,EAAM,OAAO,QAAQ,cACpB;AACG,gBAAA,CAACC,EAAQ,MAAO;AAChB,gBAAAD,EAAM,QAAQ;AAEb,kBADJA,EAAM,eAAe,GACjBC,EAAQ,SAAST,MAAUH,GAAoB;AAC5C,sBAAAa,IAASD,EAAQ,MAAM;AAAA,kBAC5BE,EAAU,IAAI,CAACC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c,QAAA5B;MACf;AAAA,IACD,GAEK6B,IAAgBhB,EAAI,EAAK,GACzBO,IAAe,YAAY;AAChC,MAAAS,EAAc,QAAQ,IACtB,MAAMC,GAAK,EAAE,GACbd,EAAK,QAAQ,IAEb,SAAS,iBAAiB,SAASM,GAAiB,EAAE,SAAS,IAAM,GACrE,SAAS,iBAAiB,WAAWG,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,WAAWC,GAAO,EAAE,SAAS,IAAM;AAAA,IAAA,GAGxD1B,IAAgB,YAAY;AACjC,MAAAgB,EAAK,QAAQ,IACJ,SAAA,oBAAoB,SAASM,CAAe,GAC5C,SAAA,oBAAoB,WAAWG,CAAe,GAC9C,SAAA,oBAAoB,WAAWC,CAAK;AAAA,IAAA,GAGxCK,IAAa1C,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,sBAAsBL,EAAM;AAAA,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index76.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as j, ref as g, watch as x, computed as m, openBlock as V, createBlock as G, 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 "./index265.js";
2
+ import { findInTree as ae } from "./index266.js";
3
3
  import { useId as re } from "./index9.js";
4
4
  import oe from "./index124.js";
5
5
  /* empty css */
@@ -56,7 +56,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
56
56
  const r = t.accept[a];
57
57
  if (r.includes("/")) e.push(r);
58
58
  else {
59
- b || (b = (await import("./index264.js")).default);
59
+ b || (b = (await import("./index265.js")).default);
60
60
  const o = b.getType(r);
61
61
  if (!o)
62
62
  throw new Error(
package/dist/index78.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, openBlock as g, createBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
2
- import { throttle as c } from "./index218.js";
2
+ import { throttle as c } from "./index222.js";
3
3
  const M = /* @__PURE__ */ h({
4
4
  __name: "BbIntersection",
5
5
  props: {
package/dist/index81.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as oe, ref as s, useAttrs as se, getCurrentInstance as ae, computed as v, nextTick as le, onBeforeUnmount as O, onMounted as ne, watch as ie, openBlock as _, createBlock as re, Teleport as ce, createElementVNode as a, mergeProps as S, createElementBlock as V, renderSlot as n, createTextVNode as ue, toDisplayString as z, createCommentVNode as T } from "vue";
2
- import { useFocusTrap as de } from "./index219.js";
2
+ import { useFocusTrap as de } from "./index209.js";
3
3
  import { useId as A } from "./index9.js";
4
4
  import { wait as E } from "./index128.js";
5
- import { useModalsState as p } from "./index221.js";
5
+ import { useModalsState as p } from "./index223.js";
6
6
  const fe = ["inert"], ve = { class: "bb-offcanvas-close" }, pe = { class: "bb-offcanvas-close__content" }, be = { class: "bb-offcanvas-close__label" }, me = /* @__PURE__ */ a("span", { class: "bb-offcanvas-close__icon" }, [
7
7
  /* @__PURE__ */ a("svg", {
8
8
  fill: "none",
package/dist/index83.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as W, computed as y, ref as c, onMounted as w, onBeforeUnmount as R, openBlock as k, createElementBlock as V, normalizeClass as C, createElementVNode as o, createVNode as v, unref as g, withCtx as S, renderSlot as m, Fragment as F, renderList as L, toDisplayString as M, nextTick as N } from "vue";
2
- import { debounce as T } from "./index266.js";
2
+ import { debounce as T } from "./index264.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
package/dist/index85.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as F, defineAsyncComponent as S, ref as n, computed as w, openBlock as v, createElementBlock as H, mergeProps as q, createElementVNode as c, renderSlot as k, normalizeProps as A, guardReactiveProps as I, createBlock as y, unref as V, withCtx as _, createCommentVNode as C, nextTick as W } from "vue";
2
- import { useFocusTrap as z } from "./index219.js";
2
+ import { useFocusTrap as z } from "./index209.js";
3
3
  import { useId as R } from "./index9.js";
4
4
  import { useIntersectionObserver as j } from "./index129.js";
5
- import { waitFor as G } from "./index220.js";
5
+ import { waitFor as G } from "./index211.js";
6
6
  import J from "./index14.js";
7
7
  /* empty css */
8
8
  const K = /* @__PURE__ */ c("span", { class: "bb-popover__close-label sr-only" }, "Chiudi", -1), Q = /* @__PURE__ */ c("svg", {
@@ -35,7 +35,7 @@ const K = /* @__PURE__ */ c("span", { class: "bb-popover__close-label sr-only" }
35
35
  emits: ["shown", "hidden"],
36
36
  setup($, { emit: T }) {
37
37
  const B = S(
38
- () => import("./index245.js")
38
+ () => import("./index258.js")
39
39
  ), t = $, s = T, { id: P } = R(), p = `bbp_${P.value}`, r = n(), i = n(), { activate: N, deactivate: D } = z(i, {
40
40
  /**
41
41
  * This traps all clicks outside so we are pressing
package/dist/index87.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, computed as a, openBlock as l, createElementBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
2
- import { clamp as p } from "./index203.js";
2
+ import { clamp as p } from "./index200.js";
3
3
  import { getAsPercentageBetween as i } from "./index127.js";
4
4
  const _ = /* @__PURE__ */ r({
5
5
  __name: "BbProgress",