bitboss-ui 0.2.31 → 0.2.32

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 (326) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +6 -6
  2. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +16 -16
  3. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +36 -36
  4. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +20 -20
  5. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +21 -21
  6. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +8 -8
  7. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +6 -6
  8. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +20 -20
  9. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +20 -20
  10. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +36 -36
  11. package/dist/components/BaseRating/BaseRating.vue.d.ts +17 -17
  12. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +23 -23
  13. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +15 -15
  14. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +1 -1
  15. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +20 -20
  16. package/dist/components/BaseTag/BaseTag.vue.d.ts +20 -20
  17. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +19 -19
  18. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +18 -18
  19. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +3 -3
  20. package/dist/components/BbAlert/BbAlert.vue.d.ts +3 -3
  21. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +8 -8
  22. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  23. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +6 -6
  24. package/dist/components/BbButton/BbButton.vue.d.ts +1 -1
  25. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +11 -11
  26. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +27 -27
  27. package/dist/components/BbChip/BbChip.vue.d.ts +2 -2
  28. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +4 -4
  29. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -24
  30. package/dist/components/BbDialog/BbDialog.vue.d.ts +2 -2
  31. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +11 -11
  32. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +14 -14
  33. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +4 -4
  34. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +3 -3
  35. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +10 -10
  36. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +9 -9
  37. package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
  38. package/dist/components/BbPopover/BbPopover.vue.d.ts +8 -8
  39. package/dist/components/BbRadio/BbRadio.vue.d.ts +10 -10
  40. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +27 -27
  41. package/dist/components/BbRating/BbRating.vue.d.ts +10 -10
  42. package/dist/components/BbSelect/BbSelect.vue.d.ts +19 -19
  43. package/dist/components/BbSlider/BbSlider.vue.d.ts +8 -8
  44. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  45. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +2 -2
  46. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
  47. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +20 -20
  48. package/dist/components/BbTab/BbTab.vue.d.ts +5 -5
  49. package/dist/components/BbTable/BbTable.vue.d.ts +11 -11
  50. package/dist/components/BbTable/types.d.ts +107 -107
  51. package/dist/components/BbTag/BbTag.vue.d.ts +13 -13
  52. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +11 -11
  53. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +10 -10
  54. package/dist/components/BbToast/BbToast.vue.d.ts +1 -1
  55. package/dist/components/BbToast/BbToastMessage.vue.d.ts +1 -1
  56. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
  57. package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
  58. package/dist/composables/useConfirm.d.ts +10 -10
  59. package/dist/composables/useOptions.d.ts +2 -2
  60. package/dist/composables/useRoute.d.ts +2 -2
  61. package/dist/composables/useRouter.d.ts +1 -1
  62. package/dist/composables/useToast.d.ts +5 -5
  63. package/dist/composables/useWizard.d.ts +1 -1
  64. package/dist/index.d.ts +126 -126
  65. package/dist/index101.js +32 -37
  66. package/dist/index101.js.map +1 -1
  67. package/dist/index103.js +19 -19
  68. package/dist/index103.js.map +1 -1
  69. package/dist/index105.js +16 -16
  70. package/dist/index105.js.map +1 -1
  71. package/dist/index107.js +15 -15
  72. package/dist/index107.js.map +1 -1
  73. package/dist/index109.js.map +1 -1
  74. package/dist/index11.js +7 -7
  75. package/dist/index11.js.map +1 -1
  76. package/dist/index111.js +16 -16
  77. package/dist/index111.js.map +1 -1
  78. package/dist/index113.js +3 -3
  79. package/dist/index113.js.map +1 -1
  80. package/dist/index115.js +6 -6
  81. package/dist/index115.js.map +1 -1
  82. package/dist/index116.js +1 -1
  83. package/dist/index116.js.map +1 -1
  84. package/dist/index117.js +1 -1
  85. package/dist/index117.js.map +1 -1
  86. package/dist/index118.js +4 -4
  87. package/dist/index118.js.map +1 -1
  88. package/dist/index119.js +5 -5
  89. package/dist/index119.js.map +1 -1
  90. package/dist/index120.js.map +1 -1
  91. package/dist/index121.js.map +1 -1
  92. package/dist/index122.js.map +1 -1
  93. package/dist/index124.js.map +1 -1
  94. package/dist/index125.js +4 -4
  95. package/dist/index125.js.map +1 -1
  96. package/dist/index126.js +1 -1
  97. package/dist/index126.js.map +1 -1
  98. package/dist/index127.js +1 -1
  99. package/dist/index128.js +4 -1
  100. package/dist/index128.js.map +1 -1
  101. package/dist/index129.js.map +1 -1
  102. package/dist/index13.js +11 -11
  103. package/dist/index13.js.map +1 -1
  104. package/dist/index130.js.map +1 -1
  105. package/dist/index131.js +2 -2
  106. package/dist/index15.js +226 -224
  107. package/dist/index15.js.map +1 -1
  108. package/dist/index17.js +61 -62
  109. package/dist/index17.js.map +1 -1
  110. package/dist/index19.js +22 -22
  111. package/dist/index19.js.map +1 -1
  112. package/dist/index196.js.map +1 -1
  113. package/dist/index197.js +2 -5
  114. package/dist/index197.js.map +1 -1
  115. package/dist/index198.js +4 -16
  116. package/dist/index198.js.map +1 -1
  117. package/dist/index199.js +293 -14
  118. package/dist/index199.js.map +1 -1
  119. package/dist/index2.js +23 -23
  120. package/dist/index2.js.map +1 -1
  121. package/dist/index200.js +15 -18
  122. package/dist/index200.js.map +1 -1
  123. package/dist/index201.js +13 -17
  124. package/dist/index201.js.map +1 -1
  125. package/dist/index202.js +18 -28
  126. package/dist/index202.js.map +1 -1
  127. package/dist/index203.js +20 -8
  128. package/dist/index203.js.map +1 -1
  129. package/dist/index204.js +29 -2
  130. package/dist/index204.js.map +1 -1
  131. package/dist/index205.js +8 -378
  132. package/dist/index205.js.map +1 -1
  133. package/dist/index206.js +2 -134
  134. package/dist/index206.js.map +1 -1
  135. package/dist/index207.js +235 -2
  136. package/dist/index207.js.map +1 -1
  137. package/dist/index208.js +3 -174
  138. package/dist/index208.js.map +1 -1
  139. package/dist/index209.js +35 -23
  140. package/dist/index209.js.map +1 -1
  141. package/dist/index21.js +4 -4
  142. package/dist/index21.js.map +1 -1
  143. package/dist/index210.js +6 -373
  144. package/dist/index210.js.map +1 -1
  145. package/dist/index211.js +10 -2
  146. package/dist/index211.js.map +1 -1
  147. package/dist/index212.js +378 -4
  148. package/dist/index212.js.map +1 -1
  149. package/dist/index213.js +134 -3
  150. package/dist/index213.js.map +1 -1
  151. package/dist/index214.js +2 -3
  152. package/dist/index214.js.map +1 -1
  153. package/dist/index215.js +172 -8
  154. package/dist/index215.js.map +1 -1
  155. package/dist/index216.js +23 -3
  156. package/dist/index216.js.map +1 -1
  157. package/dist/index217.js +369 -31
  158. package/dist/index217.js.map +1 -1
  159. package/dist/index218.js +3 -6
  160. package/dist/index218.js.map +1 -1
  161. package/dist/index219.js +3 -2
  162. package/dist/index219.js.map +1 -1
  163. package/dist/index220.js.map +1 -1
  164. package/dist/index221.js +26 -233
  165. package/dist/index221.js.map +1 -1
  166. package/dist/index222.js +16 -8
  167. package/dist/index222.js.map +1 -1
  168. package/dist/index223.js +2 -121
  169. package/dist/index223.js.map +1 -1
  170. package/dist/index224.js +8 -27
  171. package/dist/index224.js.map +1 -1
  172. package/dist/index225.js +120 -12
  173. package/dist/index225.js.map +1 -1
  174. package/dist/index226.js +1 -1
  175. package/dist/index227.js +4 -295
  176. package/dist/index227.js.map +1 -1
  177. package/dist/index228.js +2 -6
  178. package/dist/index228.js.map +1 -1
  179. package/dist/index229.js +6 -2
  180. package/dist/index229.js.map +1 -1
  181. package/dist/index23.js +14 -16
  182. package/dist/index23.js.map +1 -1
  183. package/dist/index230.js +2 -2
  184. package/dist/index235.js +2 -2
  185. package/dist/index236.js +428 -110
  186. package/dist/index236.js.map +1 -1
  187. package/dist/index237.js +88 -105
  188. package/dist/index237.js.map +1 -1
  189. package/dist/index238.js +199 -3
  190. package/dist/index238.js.map +1 -1
  191. package/dist/index239.js +1 -1
  192. package/dist/index240.js +1 -1
  193. package/dist/index241.js +2 -435
  194. package/dist/index241.js.map +1 -1
  195. package/dist/index242.js +115 -87
  196. package/dist/index242.js.map +1 -1
  197. package/dist/index243.js +104 -198
  198. package/dist/index243.js.map +1 -1
  199. package/dist/index244.js +160 -2
  200. package/dist/index244.js.map +1 -1
  201. package/dist/index245.js +2 -2
  202. package/dist/index245.js.map +1 -1
  203. package/dist/index246.js +9 -9
  204. package/dist/index246.js.map +1 -1
  205. package/dist/index247.js +5 -162
  206. package/dist/index247.js.map +1 -1
  207. package/dist/index248.js +1 -1
  208. package/dist/index249.js +37 -14
  209. package/dist/index249.js.map +1 -1
  210. package/dist/index25.js +4 -4
  211. package/dist/index25.js.map +1 -1
  212. package/dist/index250.js +2 -38
  213. package/dist/index250.js.map +1 -1
  214. package/dist/index251.js +2 -2
  215. package/dist/index251.js.map +1 -1
  216. package/dist/index252.js +15 -2
  217. package/dist/index252.js.map +1 -1
  218. package/dist/index253.js +3 -2
  219. package/dist/index253.js.map +1 -1
  220. package/dist/index255.js +2 -3
  221. package/dist/index255.js.map +1 -1
  222. package/dist/index27.js +7 -7
  223. package/dist/index27.js.map +1 -1
  224. package/dist/index29.js +15 -15
  225. package/dist/index29.js.map +1 -1
  226. package/dist/index3.js +2 -1
  227. package/dist/index3.js.map +1 -1
  228. package/dist/index31.js +28 -28
  229. package/dist/index31.js.map +1 -1
  230. package/dist/index33.js +10 -11
  231. package/dist/index33.js.map +1 -1
  232. package/dist/index35.js +2 -2
  233. package/dist/index35.js.map +1 -1
  234. package/dist/index37.js +12 -12
  235. package/dist/index37.js.map +1 -1
  236. package/dist/index39.js +5 -7
  237. package/dist/index39.js.map +1 -1
  238. package/dist/index4.js.map +1 -1
  239. package/dist/index41.js +5 -5
  240. package/dist/index41.js.map +1 -1
  241. package/dist/index43.js +19 -16
  242. package/dist/index43.js.map +1 -1
  243. package/dist/index45.js +9 -9
  244. package/dist/index45.js.map +1 -1
  245. package/dist/index47.js +4 -4
  246. package/dist/index47.js.map +1 -1
  247. package/dist/index49.js +1 -1
  248. package/dist/index49.js.map +1 -1
  249. package/dist/index5.js +7 -6
  250. package/dist/index5.js.map +1 -1
  251. package/dist/index51.js +6 -6
  252. package/dist/index51.js.map +1 -1
  253. package/dist/index53.js.map +1 -1
  254. package/dist/index55.js +20 -20
  255. package/dist/index55.js.map +1 -1
  256. package/dist/index57.js +35 -35
  257. package/dist/index57.js.map +1 -1
  258. package/dist/index59.js +8 -8
  259. package/dist/index59.js.map +1 -1
  260. package/dist/index6.js +38 -38
  261. package/dist/index6.js.map +1 -1
  262. package/dist/index61.js +27 -27
  263. package/dist/index61.js.map +1 -1
  264. package/dist/index63.js +4 -4
  265. package/dist/index63.js.map +1 -1
  266. package/dist/index65.js +20 -20
  267. package/dist/index65.js.map +1 -1
  268. package/dist/index67.js +26 -26
  269. package/dist/index67.js.map +1 -1
  270. package/dist/index69.js +21 -19
  271. package/dist/index69.js.map +1 -1
  272. package/dist/index7.js.map +1 -1
  273. package/dist/index71.js +2 -2
  274. package/dist/index71.js.map +1 -1
  275. package/dist/index72.js +3 -3
  276. package/dist/index72.js.map +1 -1
  277. package/dist/index73.js +14 -14
  278. package/dist/index73.js.map +1 -1
  279. package/dist/index75.js +18 -18
  280. package/dist/index75.js.map +1 -1
  281. package/dist/index77.js +11 -11
  282. package/dist/index77.js.map +1 -1
  283. package/dist/index79.js +15 -15
  284. package/dist/index79.js.map +1 -1
  285. package/dist/index8.js +10 -7
  286. package/dist/index8.js.map +1 -1
  287. package/dist/index81.js.map +1 -1
  288. package/dist/index83.js +20 -20
  289. package/dist/index83.js.map +1 -1
  290. package/dist/index85.js +34 -34
  291. package/dist/index85.js.map +1 -1
  292. package/dist/index87.js +18 -18
  293. package/dist/index87.js.map +1 -1
  294. package/dist/index89.js.map +1 -1
  295. package/dist/index9.js.map +1 -1
  296. package/dist/index91.js +53 -53
  297. package/dist/index91.js.map +1 -1
  298. package/dist/index93.js +16 -16
  299. package/dist/index93.js.map +1 -1
  300. package/dist/index95.js +21 -21
  301. package/dist/index95.js.map +1 -1
  302. package/dist/index97.js +37 -37
  303. package/dist/index97.js.map +1 -1
  304. package/dist/index99.js +18 -18
  305. package/dist/index99.js.map +1 -1
  306. package/dist/style.css +1 -1
  307. package/dist/types/CommonProps.d.ts +18 -18
  308. package/dist/types/ExtractGenericFromComputedRef.d.ts +1 -1
  309. package/dist/types/ExtractGenericFromRef.d.ts +1 -1
  310. package/dist/types/VoidHtmlElements.d.ts +1 -1
  311. package/dist/utilities/functions/cloneDeep.d.ts +1 -1
  312. package/dist/utilities/functions/debounce.d.ts +1 -1
  313. package/dist/utilities/functions/flow.d.ts +1 -1
  314. package/dist/utilities/functions/get.d.ts +1 -1
  315. package/dist/utilities/functions/isNotNil.d.ts +1 -1
  316. package/dist/utilities/functions/mapValues.d.ts +1 -1
  317. package/dist/utilities/functions/merge.d.ts +1 -1
  318. package/dist/utilities/functions/millisecondsTo.d.ts +1 -1
  319. package/dist/utilities/functions/overEvery.d.ts +1 -1
  320. package/dist/utilities/functions/percentage.d.ts +4 -4
  321. package/dist/utilities/functions/pick.d.ts +1 -1
  322. package/dist/utilities/functions/pickBy.d.ts +1 -1
  323. package/dist/utilities/functions/roundToTheNearest.d.ts +1 -1
  324. package/package.json +93 -77
  325. package/dist/index256.js +0 -5
  326. package/dist/index256.js.map +0 -1
package/dist/index61.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as b, openBlock as f, createBlock as h, withCtx as r, renderSlot as i, normalizeProps as n, guardReactiveProps as s, createVNode as c, mergeProps as y, createSlots as V, renderList as g } from "vue";
2
- import v from "./index17.js";
1
+ import { defineComponent as b, openBlock as f, createBlock as h, withCtx as a, renderSlot as i, normalizeProps as s, guardReactiveProps as n, createVNode as c, mergeProps as y, createSlots as v, renderList as w } from "vue";
2
+ import g from "./index17.js";
3
3
  import "./index18.js";
4
- import w from "./index21.js";
4
+ import B from "./index21.js";
5
5
  import "./index22.js";
6
- const O = /* @__PURE__ */ b({
6
+ const C = /* @__PURE__ */ b({
7
7
  __name: "BbDatePickerInput",
8
8
  props: {
9
9
  allowWriting: { type: Boolean, default: !0 },
@@ -30,60 +30,60 @@ const O = /* @__PURE__ */ b({
30
30
  width: {}
31
31
  },
32
32
  emits: ["update:modelValue", "inactive", "error"],
33
- setup(B, { emit: t }) {
33
+ setup(k, { emit: t }) {
34
34
  const o = t, d = {
35
35
  onInactive: () => o("inactive"),
36
36
  onError: (e) => o("error", e),
37
37
  "onUpdate:modelValue": (e) => o("update:modelValue", e)
38
38
  };
39
- return (e, k) => (f(), h(w, {
39
+ return (e, V) => (f(), h(B, {
40
+ id: e.id,
40
41
  class: "bb-date-picker-input",
41
42
  direction: e.direction,
42
43
  errors: e.errors,
43
- hasErrors: e.hasErrors,
44
- hideLabel: e.hideLabel,
45
- id: e.id,
44
+ "has-errors": e.hasErrors,
45
+ "hide-label": e.hideLabel,
46
46
  label: e.label,
47
- labelPosition: e.labelPosition,
48
- modelValue: e.modelValue,
47
+ "label-position": e.labelPosition,
48
+ "model-value": e.modelValue,
49
49
  name: e.name,
50
50
  reverse: e.reverse
51
51
  }, {
52
- label: r((a) => [
53
- i(e.$slots, "label", n(s(a)))
52
+ label: a((r) => [
53
+ i(e.$slots, "label", s(n(r)))
54
54
  ]),
55
- input: r(({ id: a, name: m, hasErrors: p }) => [
56
- c(v, y({
57
- allowWriting: e.allowWriting,
55
+ input: a(({ id: r, name: m, hasErrors: p }) => [
56
+ c(g, y({
57
+ id: r,
58
+ "allow-writing": e.allowWriting,
58
59
  autocomplete: e.autocomplete,
59
60
  autofocus: e.autofocus,
60
61
  disabled: e.disabled,
61
- firstDayOfWeek: e.firstDayOfWeek,
62
- hasErrors: p,
63
- id: a,
64
- modelValue: e.modelValue,
62
+ "first-day-of-week": e.firstDayOfWeek,
63
+ "has-errors": p,
65
64
  max: e.max,
66
65
  min: e.min,
66
+ "model-value": e.modelValue,
67
67
  name: m,
68
68
  placeholder: e.placeholder,
69
69
  range: e.range,
70
70
  readonly: e.readonly,
71
71
  selectable: e.selectable,
72
72
  width: e.width
73
- }, d), V({ _: 2 }, [
74
- g(e.$slots, (P, l) => ({
73
+ }, d), v({ _: 2 }, [
74
+ w(e.$slots, (P, l) => ({
75
75
  name: l,
76
- fn: r((u) => [
77
- i(e.$slots, l, n(s(u)))
76
+ fn: a((u) => [
77
+ i(e.$slots, l, s(n(u)))
78
78
  ])
79
79
  }))
80
- ]), 1040, ["allowWriting", "autocomplete", "autofocus", "disabled", "firstDayOfWeek", "hasErrors", "id", "modelValue", "max", "min", "name", "placeholder", "range", "readonly", "selectable", "width"])
80
+ ]), 1040, ["id", "allow-writing", "autocomplete", "autofocus", "disabled", "first-day-of-week", "has-errors", "max", "min", "model-value", "name", "placeholder", "range", "readonly", "selectable", "width"])
81
81
  ]),
82
82
  _: 3
83
- }, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "label", "labelPosition", "modelValue", "name", "reverse"]));
83
+ }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "label", "label-position", "model-value", "name", "reverse"]));
84
84
  }
85
85
  });
86
86
  export {
87
- O as default
87
+ C as default
88
88
  };
89
89
  //# sourceMappingURL=index61.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index61.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseDatePickerInput from \"../BaseDatePickerInput/BaseDatePickerInput.vue\";\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport type { BaseDatePickerInputEvents } from \"../BaseDatePickerInput/BaseDatePickerInput.vue\";\nimport type { BaseDatePickerSlots } from \"../BaseDatePicker/BaseDatePicker.vue\";\nimport type { HTMLAttributes, InputHTMLAttributes } from \"vue\";\nimport type { Locale } from \"dayjs/locale/it\";\n\nexport type BbDatePickerInputProps = {\n /**\n * Allows typing into the input.\n */\n allowWriting?: boolean;\n\n /**\n * Guides to the browser as to the type of information expected in the field.\n */\n autocomplete?: InputHTMLAttributes[\"autocomplete\"];\n\n /**\n * Sets autofocus on page load.\n */\n autofocus?: InputHTMLAttributes[\"autofocus\"];\n\n /**\n * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n */\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * Can be a string or an array of string containing the messages to display.\n */\n errors?: string | string[];\n\n /**\n * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n */\n firstDayOfWeek?: Locale[\"weekStart\"];\n\n /**\n * Define if the component should be in an error state.\n * It usually attaches a CSS class for styling purposes.\n */\n hasErrors?: boolean;\n\n /**\n * Visually hides the label of the input while maintaining accessibility.\n */\n hideLabel?: boolean;\n\n /**\n * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Text content of the label of the element.\n */\n label: string;\n\n /**\n * Sets the text alignment of the label.\n */\n labelPosition?: \"left\" | \"center\" | \"right\";\n\n /**\n * Maximum selectable date\n */\n max?: Date | string | number;\n\n /**\n * Minimum selectable date\n */\n min?: Date | string | number;\n\n /**\n * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n */\n modelValue: string | string[] | null;\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * String displayed when there's no data.\n */\n placeholder?: InputHTMLAttributes[\"placeholder\"];\n\n /**\n * Selects a range of dates between two dates. It selects all of the days between start and end\n */\n range?: boolean;\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n\n /**\n * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n */\n reverse?: boolean;\n\n /**\n * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n * @param date\n */\n selectable?: (date: Date) => boolean;\n\n /**\n * Width of the calendar\n */\n width?: number | string;\n};\n\nexport type BbDatePickerInputEvents = BaseDatePickerInputEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDatePickerInput',\n props: {\n allowWriting: { type: Boolean, default: true },\n autocomplete: {},\n autofocus: {},\n direction: {},\n disabled: { type: Boolean },\n errors: {},\n firstDayOfWeek: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n label: {},\n labelPosition: {},\n max: {},\n min: {},\n modelValue: {},\n name: {},\n placeholder: {},\n range: { type: Boolean },\n readonly: {},\n reverse: { type: Boolean },\n selectable: {},\n width: {}\n },\n emits: [\"update:modelValue\", \"inactive\", \"error\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onInactive: () => emit(\"inactive\"),\n onError: (message: string) => emit(\"error\", message),\n \"onUpdate:modelValue\": (value: BbDatePickerInputProps[\"modelValue\"]) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-date-picker-input\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseDatePickerInput, _mergeProps({\n allowWriting: _ctx.allowWriting,\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n firstDayOfWeek: _ctx.firstDayOfWeek,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n max: _ctx.max,\n min: _ctx.min,\n name: name,\n placeholder: _ctx.placeholder,\n range: _ctx.range,\n readonly: _ctx.readonly,\n selectable: _ctx.selectable,\n width: _ctx.width\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"allowWriting\", \"autocomplete\", \"autofocus\", \"disabled\", \"firstDayOfWeek\", \"hasErrors\", \"id\", \"modelValue\", \"max\", \"min\", \"name\", \"placeholder\", \"range\", \"readonly\", \"selectable\", \"width\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","message","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseDatePickerInput","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA+HA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC7C,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,gBAAgB,CAAC;AAAA,IACjB,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,CAAC;AAAA,IACX,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,YAAY,CAAC;AAAA,IACb,OAAO,CAAC;AAAA,EACV;AAAA,EACA,OAAO,CAAC,qBAAqB,YAAY,OA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B,EAAa,EAAE,GAAG,KAAK;AAAA,UACzCC,EAAYjB,EAAK,QAAQ,CAACkB,GAAGP,OACpB;AAAA,YACL,MAAMA;AAAAA,YACN,IAAIN,EAAS,CAACC,MAAS;AAAA,cACrBC,EAAYP,EAAK,QAAQW,GAAMH,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,YAAA,CAC1E;AAAA,UAAA,EAEJ;AAAA,QAAA,CACF,GAAG,MAAM,CAAC,gBAAgB,gBAAgB,aAAa,YAAY,kBAAkB,aAAa,MAAM,cAAc,OAAO,OAAO,QAAQ,eAAe,SAAS,YAAY,cAAc,OAAO,CAAC;AAAA,MAAA,CACxM;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE1H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index61.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseDatePickerInput from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type { BaseDatePickerInputEvents } from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { Locale } from 'dayjs/locale/it';\n\nexport type BbDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: Locale['weekStart'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nexport type BbDatePickerInputEvents = BaseDatePickerInputEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDatePickerInput',\n props: {\n allowWriting: { type: Boolean, default: true },\n autocomplete: {},\n autofocus: {},\n direction: {},\n disabled: { type: Boolean },\n errors: {},\n firstDayOfWeek: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n label: {},\n labelPosition: {},\n max: {},\n min: {},\n modelValue: {},\n name: {},\n placeholder: {},\n range: { type: Boolean },\n readonly: {},\n reverse: { type: Boolean },\n selectable: {},\n width: {}\n },\n emits: [\"update:modelValue\", \"inactive\", \"error\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInactive: () => emit('inactive'),\n\tonError: (message: string) => emit('error', message),\n\t'onUpdate:modelValue': (value: BbDatePickerInputProps['modelValue']) =>\n\t\temit('update:modelValue', value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n id: _ctx.id,\n class: \"bb-date-picker-input\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLabel,\n label: _ctx.label,\n \"label-position\": _ctx.labelPosition,\n \"model-value\": _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseDatePickerInput, _mergeProps({\n id: id,\n \"allow-writing\": _ctx.allowWriting,\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n \"first-day-of-week\": _ctx.firstDayOfWeek,\n \"has-errors\": hasErrors,\n max: _ctx.max,\n min: _ctx.min,\n \"model-value\": _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n range: _ctx.range,\n readonly: _ctx.readonly,\n selectable: _ctx.selectable,\n width: _ctx.width\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"id\", \"allow-writing\", \"autocomplete\", \"autofocus\", \"disabled\", \"first-day-of-week\", \"has-errors\", \"max\", \"min\", \"model-value\", \"name\", \"placeholder\", \"range\", \"readonly\", \"selectable\", \"width\"])\n ]),\n _: 3\n }, 8, [\"id\", \"direction\", \"errors\", \"has-errors\", \"hide-label\", \"label\", \"label-position\", \"model-value\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","message","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseDatePickerInput","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA+HA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC7C,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,gBAAgB,CAAC;AAAA,IACjB,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,OAAO,CAAC;AAAA,IACR,eAAe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AWA,EAAK;AAAA,UAChB,UAAUA,EAAK;AAAA,UACf,qBAAqBA,EAAK;AAAA,UAC1B,cAAcY;AAAA,UACd,KAAKZ,EAAK;AAAA,UACV,KAAKA,EAAK;AAAA,UACV,eAAeA,EAAK;AAAA,UACpB,MAAAW;AAAA,UACA,aAAaX,EAAK;AAAA,UAClB,OAAOA,EAAK;AAAA,UACZ,UAAUA,EAAK;AAAA,UACf,YAAYA,EAAK;AAAA,UACjB,OAAOA,EAAK;AAAA,WACXH,CAAc,GAAGmB,EAAa,EAAE,GAAG,KAAK;AAAA,UACzCC,EAAYjB,EAAK,QAAQ,CAACkB,GAAGP,OACpB;AAAA,YACL,MAAMA;AAAAA,YACN,IAAIN,EAAS,CAACC,MAAS;AAAA,cACrBC,EAAYP,EAAK,QAAQW,GAAMH,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,YAAA,CAC1E;AAAA,UAAA,EAEJ;AAAA,QAAA,CACF,GAAG,MAAM,CAAC,MAAM,iBAAiB,gBAAgB,aAAa,YAAY,qBAAqB,cAAc,OAAO,OAAO,eAAe,QAAQ,eAAe,SAAS,YAAY,cAAc,OAAO,CAAC;AAAA,MAAA,CAC9M;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,MAAM,aAAa,UAAU,cAAc,cAAc,SAAS,kBAAkB,eAAe,QAAQ,SAAS,CAAC;AAAA,EAE9H;AAEA,CAAC;"}
package/dist/index63.js CHANGED
@@ -27,9 +27,9 @@ const b = /* @__PURE__ */ d({
27
27
  return r.overlayClasses && (e = e.concat(r.overlayClasses)), e;
28
28
  });
29
29
  return (e, s) => (u(), f($, y(e.$props, {
30
- overlayClasses: p.value,
31
- onShown: s[0] || (s[0] = () => e.$emit("shown")),
32
- onHidden: s[1] || (s[1] = () => e.$emit("hidden")),
30
+ "overlay-classes": p.value,
31
+ onHidden: s[0] || (s[0] = () => e.$emit("hidden")),
32
+ onShown: s[1] || (s[1] = () => e.$emit("shown")),
33
33
  "onUpdate:modelValue": s[2] || (s[2] = (o) => e.$emit("update:modelValue", o))
34
34
  }), {
35
35
  close: l((o) => [
@@ -51,7 +51,7 @@ const b = /* @__PURE__ */ d({
51
51
  t(e.$slots, "title", a(n(o)))
52
52
  ]),
53
53
  _: 3
54
- }, 16, ["overlayClasses"]));
54
+ }, 16, ["overlay-classes"]));
55
55
  }
56
56
  });
57
57
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index63.js","sources":["../src/components/BbDialog/BbDialog.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { computed } from \"vue\";\nimport BaseDialog from \"../BaseDialog/BaseDialog.vue\";\nimport type { Classes } from \"@/types/Classes\";\nimport type {\n BaseDialogProps,\n BaseDialogEvents,\n BaseDialogSlots,\n} from \"../BaseDialog/BaseDialog.vue\";\nexport type {\n BaseDialogProps as BbDialogProps,\n BaseDialogEvents as BbDialogEvents,\n Sizes,\n} from \"../BaseDialog/BaseDialog.vue\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDialog',\n props: {\n closeLabel: {},\n compact: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n panelClasses: {},\n overlayClasses: {},\n persistent: { type: Boolean },\n showClose: { type: Boolean, default: true },\n title: {},\n transition: {},\n transitionDuration: {},\n size: {},\n description: {},\n fullscreen: { type: Boolean },\n modelValue: { type: [Boolean, null] }\n },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n\n\nconst overlayClasses = computed<Classes>(() => {\n let base: Classes = [\"bb-dialog\"];\n if (props.overlayClasses) {\n base = base.concat(props.overlayClasses);\n }\n return base;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseDialog, _mergeProps(_ctx.$props, {\n overlayClasses: overlayClasses.value,\n onShown: _cache[0] || (_cache[0] = () => _ctx.$emit('shown')),\n onHidden: _cache[1] || (_cache[1] = () => _ctx.$emit('hidden')),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = (value) => _ctx.$emit('update:modelValue', value))\n }), {\n close: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"close\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n default: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"default\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n description: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"description\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n footer: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"footer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n header: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"header\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n title: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"title\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n _: 3\n }, 16, [\"overlayClasses\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","overlayClasses","computed","base","_ctx","_cache","_openBlock","_createBlock","BaseDialog","_mergeProps","value","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;AAkBA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,CAAC;AAAA,IACb,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,cAAc,CAAC;AAAA,IACf,gBAAgB,CAAC;AAAA,IACjB,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,OAAO,CAAC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MACD,QAAQD,EAAS,CAACC,MAAS;AAAA,QACzBC,EAAYT,EAAK,QAAQ,UAAUU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC9E;AAAA,MACD,QAAQD,EAAS,CAACC,MAAS;AAAA,QACzBC,EAAYT,EAAK,QAAQ,UAAUU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC9E;AAAA,MACD,OAAOD,EAAS,CAACC,MAAS;AAAA,QACxBC,EAAYT,EAAK,QAAQ,SAASU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC7E;AAAA,MACD,GAAG;AAAA,IAAA,GACF,IAAI,CAAC,gBAAgB,CAAC;AAAA,EAE3B;AAEA,CAAC;"}
1
+ {"version":3,"file":"index63.js","sources":["../src/components/BbDialog/BbDialog.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { computed } from 'vue';\nimport BaseDialog from '../BaseDialog/BaseDialog.vue';\nimport type { Classes } from '@/types/Classes';\nimport type {\n\tBaseDialogProps,\n\tBaseDialogEvents,\n\tBaseDialogSlots,\n} from '../BaseDialog/BaseDialog.vue';\nexport type {\n\tBaseDialogProps as BbDialogProps,\n\tBaseDialogEvents as BbDialogEvents,\n\tSizes,\n} from '../BaseDialog/BaseDialog.vue';\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDialog',\n props: {\n closeLabel: {},\n compact: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n panelClasses: {},\n overlayClasses: {},\n persistent: { type: Boolean },\n showClose: { type: Boolean, default: true },\n title: {},\n transition: {},\n transitionDuration: {},\n size: {},\n description: {},\n fullscreen: { type: Boolean },\n modelValue: { type: [Boolean, null] }\n },\n emits: [\"shown\", \"hidden\", \"update:modelValue\"],\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n\n\nconst overlayClasses = computed<Classes>(() => {\n\tlet base: Classes = ['bb-dialog'];\n\tif (props.overlayClasses) {\n\t\tbase = base.concat(props.overlayClasses);\n\t}\n\treturn base;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseDialog, _mergeProps(_ctx.$props, {\n \"overlay-classes\": overlayClasses.value,\n onHidden: _cache[0] || (_cache[0] = () => _ctx.$emit('hidden')),\n onShown: _cache[1] || (_cache[1] = () => _ctx.$emit('shown')),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = (value) => _ctx.$emit('update:modelValue', value))\n }), {\n close: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"close\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n default: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"default\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n description: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"description\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n footer: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"footer\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n header: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"header\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n title: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"title\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n _: 3\n }, 16, [\"overlay-classes\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","overlayClasses","computed","base","_ctx","_cache","_openBlock","_createBlock","BaseDialog","_mergeProps","value","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps"],"mappings":";;;AAkBA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,CAAC;AAAA,IACb,SAAS,EAAE,MAAM,QA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C,MAAS;AAAA,QAC1BC,EAAYT,EAAK,QAAQ,WAAWU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC/E;AAAA,MACD,aAAaD,EAAS,CAACC,MAAS;AAAA,QAC9BC,EAAYT,EAAK,QAAQ,eAAeU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CACnF;AAAA,MACD,QAAQD,EAAS,CAACC,MAAS;AAAA,QACzBC,EAAYT,EAAK,QAAQ,UAAUU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC9E;AAAA,MACD,QAAQD,EAAS,CAACC,MAAS;AAAA,QACzBC,EAAYT,EAAK,QAAQ,UAAUU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC9E;AAAA,MACD,OAAOD,EAAS,CAACC,MAAS;AAAA,QACxBC,EAAYT,EAAK,QAAQ,SAASU,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC7E;AAAA,MACD,GAAG;AAAA,IAAA,GACF,IAAI,CAAC,iBAAiB,CAAC;AAAA,EAE5B;AAEA,CAAC;"}
package/dist/index65.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as Y, computed as M, ref as v, openBlock as D, createElementBlock as H, mergeProps as S, createElementVNode as h, renderSlot as y, normalizeProps as Z, guardReactiveProps as ee, unref as c, createBlock as te, Teleport as oe, normalizeClass as ne, normalizeStyle as z, Fragment as N, renderList as ae, createVNode as le, withCtx as se, createCommentVNode as ie } from "vue";
2
- import { findRightIndex as I } from "./index222.js";
3
- import { useFloating as re, arrow as ue } from "./index223.js";
2
+ import { findRightIndex as I } from "./index224.js";
3
+ import { useFloating as re, arrow as ue } from "./index225.js";
4
4
  import { useId as de } from "./index7.js";
5
5
  import { wait as U } from "./index122.js";
6
6
  import ce from "./index9.js";
7
7
  import "./index10.js";
8
- import V from "./index209.js";
9
- import { autoUpdate as fe, flip as pe, shift as be } from "./index205.js";
10
- import { offset as me } from "./index210.js";
11
- const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-container" }, Me = /* @__PURE__ */ Y({
8
+ import V from "./index216.js";
9
+ import { autoUpdate as fe, flip as pe, shift as be } from "./index212.js";
10
+ import { offset as me } from "./index217.js";
11
+ const ve = ["id", "aria-labelledby"], we = { class: "bb-dropdown__items-container" }, Me = /* @__PURE__ */ Y({
12
12
  __name: "BbDropdown",
13
13
  props: {
14
14
  arrowPadding: { default: 10 },
@@ -170,9 +170,9 @@ const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-containe
170
170
  }));
171
171
  return (e, n) => (D(), H("span", S({ class: "bb-dropdown" }, Q.value), [
172
172
  h("span", {
173
- class: "bb-dropdown__wrapper",
174
173
  ref_key: "wrapper",
175
- ref: g
174
+ ref: g,
175
+ class: "bb-dropdown__wrapper"
176
176
  }, [
177
177
  y(e.$slots, "activator", Z(ee({
178
178
  props: {
@@ -196,6 +196,11 @@ const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-containe
196
196
  to: "body"
197
197
  }, [
198
198
  h("span", {
199
+ id: `menu_${c(b)}`,
200
+ ref_key: "content",
201
+ ref: l,
202
+ "aria-labelledby": c(b),
203
+ "aria-role": "menu",
199
204
  class: ne(["bb-dropdown__bubble-container", {
200
205
  [`bb-dropdown__bubble-container--${c(m)}`]: !0,
201
206
  [`bb-dropdown__bubble-container--${e.theme}`]: e.theme,
@@ -204,20 +209,15 @@ const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-containe
204
209
  "bb-dropdown__bubble-container--opening": i.value,
205
210
  "bb-dropdown__bubble-container--open": r.value
206
211
  }]),
207
- ref_key: "content",
208
- ref: l,
209
212
  style: z({
210
213
  ...c(R),
211
214
  transitionDuration: `${a.transitionDuration}ms`
212
- }),
213
- "aria-labelledby": c(b),
214
- "aria-role": "menu",
215
- id: `menu_${c(b)}`
215
+ })
216
216
  }, [
217
217
  h("span", S({
218
- class: "bb-dropdown__arrow",
219
218
  ref_key: "bubblearrow",
220
- ref: F
219
+ ref: F,
220
+ class: "bb-dropdown__arrow"
221
221
  }, x.value), null, 16),
222
222
  h("span", {
223
223
  class: "bb-dropdown__bubble",
@@ -247,11 +247,11 @@ const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-containe
247
247
  text: t.text
248
248
  }),
249
249
  le(ce, S({
250
+ "aria-role": "menuitem",
250
251
  class: ["bb-dropdown__item", {
251
252
  "bb-dropdown__item--first": o === 0,
252
253
  "bb-dropdown__item--last": o === e.items.length - 1
253
254
  }],
254
- "aria-role": "menuitem",
255
255
  "data-dropdown-item": !0
256
256
  }, t), {
257
257
  default: se(() => [
@@ -295,12 +295,12 @@ const ve = ["aria-labelledby", "id"], we = { class: "bb-dropdown__items-containe
295
295
  ], 64))), 128))
296
296
  ]),
297
297
  y(e.$slots, "append", {
298
+ closed: f.value,
299
+ closing: u.value,
298
300
  disabled: e.disabled,
299
- placement: c(m),
300
301
  open: r.value,
301
302
  opening: i.value,
302
- closing: u.value,
303
- closed: f.value
303
+ placement: c(m)
304
304
  })
305
305
  ], 4)
306
306
  ], 14, ve)
@@ -1 +1 @@
1
- {"version":3,"file":"index65.js","sources":["../src/components/BbDropdown/BbDropdown.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createVNode as _createVNode, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, Teleport as _Teleport, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"aria-labelledby\", \"id\"]\nconst _hoisted_2 = { class: \"bb-dropdown__items-container\" }\n\nimport { computed, ref } from \"vue\";\nimport { findRightIndex } from \"@/utilities/functions/findRightIndex\";\nimport {\n useFloating,\n autoUpdate,\n flip,\n shift,\n arrow,\n offset,\n} from \"@floating-ui/vue\";\nimport { useId } from \"@/composables/useId\";\nimport { wait } from \"@/utilities/functions/wait\";\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\nexport type BbDropdownProps = Pick<\n CommonProps,\n | \"arrowPadding\"\n | \"block\"\n | \"disabled\"\n | \"eager\"\n | \"id\"\n | \"offset\"\n | \"padding\"\n | \"placement\"\n | \"theme\"\n | \"transitionDuration\"\n> & {\n /**\n * Array used to render each dropdown button.\n * They can act as `button`, as `a`, or as `router-link`\n * as they are based on the functionality provided by\n * `BaseButton`\n */\n items: Item[];\n /**\n * Width of the dropdown in pixels.\n */\n width?: number;\n};\n\nexport type Item = Omit<BaseButtonProps, \"block\" | \"tag\" | \"type\"> & {\n /**\n * Click handler of the item.\n */\n onClick?: (...args: any[]) => any;\n /**\n * Key used to identify the element.\n */\n key: string;\n};\n\nexport type MappedItem = Item & {\n /**\n * Identifier of the element among it's siblings.\n */\n id: string;\n /**\n * Keydown event used to handle accessibility.\n */\n onKeydown: (event: KeyboardEvent) => void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDropdown',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n id: {},\n offset: { default: 3 },\n padding: { default: 6 },\n placement: { default: \"bottom\" },\n theme: { default: \"default\" },\n transitionDuration: { default: 150 },\n items: {},\n width: { default: 200 }\n },\n setup(__props: any) {\n\n\n\nconst props = __props;\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n let firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n let lastFocusableIndex: number = findRightIndex(\n props.items,\n (item) => !item.disabled\n );\n\n return props.items.map((item, index) => {\n const itemid = `${id}-item-${item.key}`;\n const { onClick: handler, ...rest } = item;\n\n /* Id a click handler has been passed close the dropdown\n * return focus and run the handler\n */\n const onClick = async () => {\n await closeDropdown();\n const nextElement = document.querySelector(`#${id}`);\n if (!nextElement) return;\n else if (nextElement instanceof HTMLElement) {\n nextElement.focus();\n }\n if (handler) handler();\n };\n\n /**\n * On keydown\n * arrow down move to the next focusable element if it's not the last\n * arrow up move to the previous focusable element if it's not the first\n * on tab search the next focusable element after the button that opens the dropdown\n * if an element is found focus on that\n * (the menu is attached to body so it's not in order)\n */\n const onKeydown = (event: KeyboardEvent) => {\n if (\n event.target instanceof HTMLElement &&\n event.target.dataset[\"dropdownItem\"]\n ) {\n if (!content.value) return;\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n if (content.value && index !== lastFocusableIndex) {\n const option = content.value.querySelector(\n selectors.map((selector) => `#${itemid} ~ ${selector}`).join(\",\")\n );\n if (option && option instanceof HTMLElement) {\n option.focus();\n }\n }\n } else if (event.key === \"ArrowUp\") {\n event.preventDefault();\n if (content.value && index !== firstFocusableIndex) {\n const indexOfPrevious = findRightIndex(props.items, (item, i) => {\n return i < index && !item.disabled;\n });\n\n const options = Array.from(\n content.value.querySelectorAll(`.bb-dropdown__item`)\n );\n\n const option = options[indexOfPrevious];\n\n if (option && option instanceof HTMLElement) {\n option.focus();\n }\n }\n } else if (event.key === \"Tab\") {\n if (index === lastFocusableIndex && !event.shiftKey) {\n const selector = selectors.join(\",\");\n const focusableElements = Array.from(\n document.querySelectorAll(selector)\n );\n const indexOfButton = focusableElements.findIndex(\n (el) => el.id === id\n );\n const nextElement = focusableElements[indexOfButton + 1];\n if (!nextElement) return;\n else if (nextElement instanceof HTMLElement) {\n event.preventDefault();\n closeDropdown();\n nextElement.focus();\n }\n } else if (index === firstFocusableIndex && event.shiftKey) {\n const nextElement = document.querySelector(`#${id}`);\n if (!nextElement) return;\n else if (nextElement instanceof HTMLElement) {\n event.preventDefault();\n nextElement.focus();\n }\n }\n }\n }\n };\n\n return {\n ...rest,\n disabled: rest.disabled || props.disabled,\n id: itemid,\n onClick,\n onKeydown,\n };\n });\n});\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n wrapper,\n content,\n {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [\n flip(),\n offset(props.offset),\n shift({ padding: props.padding }),\n arrow({\n element: bubblearrow,\n padding: props.arrowPadding,\n }),\n ],\n }\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n if (middlewareData.value.arrow) {\n const { x, y } = middlewareData.value.arrow;\n return {\n style: {\n left: `${x}px`,\n top: `${y}px`,\n },\n };\n }\n});\n\n/* On click of the trigger attach elements */\nconst onClick = () => {\n if (opening.value || closing.value) return;\n if (open.value) {\n closeDropdown();\n } else {\n openDropdown();\n }\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n let firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n let lastFocusableIndex: number = findRightIndex(\n props.items,\n (item) => !item.disabled\n );\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n if (closing.value || opening.value) return;\n if (closed.value) {\n await openDropdown();\n }\n if (\n content.value &&\n mappedItems.value.length &&\n firstFocusableIndex !== -1\n ) {\n const idToFocus = mappedItems.value[firstFocusableIndex].id;\n const option = content.value.querySelector(`#${idToFocus}`);\n if (option && option instanceof HTMLElement) {\n option.focus();\n }\n }\n } else if (event.key === \"ArrowUp\") {\n event.preventDefault();\n if (closing.value || opening.value) return;\n if (closed.value) {\n await openDropdown();\n }\n if (\n content.value &&\n mappedItems.value.length &&\n lastFocusableIndex !== -1\n ) {\n const idToFocus = mappedItems.value[lastFocusableIndex].id;\n const option = content.value.querySelector(`#${idToFocus}`);\n if (option && option instanceof HTMLElement) {\n option.focus();\n }\n }\n } else if (event.key === \"Tab\") {\n if (open.value && !event.shiftKey) {\n event.preventDefault();\n if (\n content.value &&\n mappedItems.value.length &&\n firstFocusableIndex !== -1\n ) {\n const idToFocus = mappedItems.value[firstFocusableIndex].id;\n const option = content.value.querySelector(`#${idToFocus}`);\n if (option && option instanceof HTMLElement) {\n option.focus();\n }\n }\n }\n }\n};\n\nconst onClickDocument = (event: Event) => {\n const target = event.target;\n if (!target) return;\n if (target instanceof HTMLElement) {\n let isOutside = true;\n\n if (wrapper.value) {\n if (wrapper.value.contains(target)) {\n isOutside = false;\n }\n }\n if (content.value) {\n if (content.value.contains(target)) {\n isOutside = false;\n }\n }\n\n if (isOutside) {\n closeDropdown();\n }\n }\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n const target = event.target;\n if (!target) return;\n if (target instanceof HTMLElement) {\n let isOutside = true;\n\n if (wrapper.value) {\n if (wrapper.value.contains(target)) {\n isOutside = false;\n }\n }\n if (content.value) {\n if (content.value.contains(target)) {\n isOutside = false;\n }\n }\n\n if (isOutside) {\n closeDropdown();\n }\n }\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n if (open.value) {\n if (event.key === \"Escape\") {\n if (document.activeElement?.id !== id) {\n const button = document.querySelector(`#${id}`);\n if (button instanceof HTMLElement) {\n button.focus();\n }\n }\n closeDropdown();\n }\n }\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n hasOpenedOnce.value = true;\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n /* Attach listeners to document so we don't have to track them one by one */\n document.addEventListener(\"click\", onClickDocument, { passive: true });\n document.addEventListener(\"focusin\", onDocumentFocus, { passive: true });\n document.addEventListener(\"keydown\", onEsc, { passive: true });\n};\n\nconst closeDropdown = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n document.removeEventListener(\"click\", onClickDocument);\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"keydown\", onEsc);\n};\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-dropdown--block\": props.block,\n [`bb-dropdown--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-dropdown\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-dropdown__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-expanded': open.value,\n 'aria-controls': `menu_${_unref(id)}`,\n id: _unref(id),\n onClick: onClick,\n onKeydown: onKeydown,\n disabled: _ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createBlock(_Teleport, {\n key: 0,\n to: \"body\"\n }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bb-dropdown__bubble-container\", {\n [`bb-dropdown__bubble-container--${_unref(placement)}`]: true,\n [`bb-dropdown__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-dropdown__bubble-container--hidden': closed.value,\n 'bb-dropdown__bubble-container--closing': closing.value,\n 'bb-dropdown__bubble-container--opening': opening.value,\n 'bb-dropdown__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle({\n ..._unref(floatingStyles),\n transitionDuration: `${props.transitionDuration}ms`,\n }),\n \"aria-labelledby\": _unref(id),\n \"aria-role\": \"menu\",\n id: `menu_${_unref(id)}`\n }, [\n _createElementVNode(\"span\", _mergeProps({\n class: \"bb-dropdown__arrow\",\n ref_key: \"bubblearrow\",\n ref: bubblearrow\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", {\n class: \"bb-dropdown__bubble\",\n style: _normalizeStyle({ width: `${_ctx.width}px` })\n }, [\n _renderSlot(_ctx.$slots, \"prepend\", {\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement)\n }),\n _createElementVNode(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(mappedItems.value, (item, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.key\n }, [\n _renderSlot(_ctx.$slots, `item:prepend`, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: _ctx.items[index],\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n }),\n _createVNode(BaseButton, _mergeProps({\n class: [\"bb-dropdown__item\", {\n 'bb-dropdown__item--first': index === 0,\n 'bb-dropdown__item--last': index === _ctx.items.length - 1,\n }],\n \"aria-role\": 'menuitem',\n \"data-dropdown-item\": true\n }, item), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, item.key, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: item,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n }, () => [\n _renderSlot(_ctx.$slots, \"item\", {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: item,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n })\n ])\n ]),\n _: 2\n }, 1040, [\"class\"]),\n _renderSlot(_ctx.$slots, `item:append`, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: _ctx.items[index],\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n })\n ], 64))\n }), 128))\n ]),\n _renderSlot(_ctx.$slots, \"append\", {\n disabled: _ctx.disabled,\n placement: _unref(placement),\n open: open.value,\n opening: opening.value,\n closing: closing.value,\n closed: closed.value\n })\n ], 4)\n ], 14, _hoisted_1)\n ]))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__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","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","opening","open","closing","closed","arrowAttributes","x","y","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","_Fragment","_renderList","_createVNode","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;;AAGA,MAAMA,KAAa,CAAC,mBAAmB,IAAI,GACrCC,KAAa,EAAE,OAAO,kCAoEAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,SAAS,GAAG;AAAA,IAC5B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,IAAI,CAAC;AAAA,IACL,QAAQ,EAAE,SAAS,EAAE;AAAA,IACrB,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,WAAW,EAAE,SAAS,SAAS;AAAA,IAC/B,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,OAAO,CAAC;AAAA,IACR,OAAO,EAAE,SAAS,IAAI;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAItB,UAAMC,IAAQD,GAERE,IAAKD,EAAM,MAAM,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AAI/C,EAAU;AAAA,MAAA,CAClB,KACDkF,GAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index65.js","sources":["../src/components/BbDropdown/BbDropdown.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createVNode as _createVNode, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, Teleport as _Teleport, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"aria-labelledby\"]\nconst _hoisted_2 = { class: \"bb-dropdown__items-container\" }\n\nimport { computed, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\tarrow,\n\toffset,\n} from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\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\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\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\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDropdown',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n id: {},\n offset: { default: 3 },\n padding: { default: 6 },\n placement: { default: 'bottom' },\n theme: { default: 'default' },\n transitionDuration: { default: 150 },\n items: {},\n width: { default: 200 }\n },\n setup(__props: any) {\n\n\n\nconst props = __props;\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<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t],\n\t}\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n});\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\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\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\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\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\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-dropdown\" }, attributes.value), [\n _createElementVNode(\"span\", {\n ref_key: \"wrapper\",\n ref: wrapper,\n class: \"bb-dropdown__wrapper\"\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open.value,\n\t\t\t\t\t\t'aria-controls': `menu_${_unref(id)}`,\n\t\t\t\t\t\tid: _unref(id),\n\t\t\t\t\t\tonClick: onClick,\n\t\t\t\t\t\tonKeydown: onKeydown,\n\t\t\t\t\t\tdisabled: _ctx.disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed.value,\n\t\t\t\t\tclosing: closing.value,\n\t\t\t\t\tdisabled: _ctx.disabled,\n\t\t\t\t\topen: open.value,\n\t\t\t\t\topening: opening.value,\n\t\t\t\t\tplacement: _unref(placement),\n\t\t\t\t})))\n ], 512),\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createBlock(_Teleport, {\n key: 0,\n to: \"body\"\n }, [\n _createElementVNode(\"span\", {\n id: `menu_${_unref(id)}`,\n ref_key: \"content\",\n ref: content,\n \"aria-labelledby\": _unref(id),\n \"aria-role\": \"menu\",\n class: _normalizeClass([\"bb-dropdown__bubble-container\", {\n\t\t\t\t\t[`bb-dropdown__bubble-container--${_unref(placement)}`]: true,\n\t\t\t\t\t[`bb-dropdown__bubble-container--${_ctx.theme}`]: _ctx.theme,\n\t\t\t\t\t'bb-dropdown__bubble-container--hidden': closed.value,\n\t\t\t\t\t'bb-dropdown__bubble-container--closing': closing.value,\n\t\t\t\t\t'bb-dropdown__bubble-container--opening': opening.value,\n\t\t\t\t\t'bb-dropdown__bubble-container--open': open.value,\n\t\t\t\t}]),\n style: _normalizeStyle({\n\t\t\t\t\t..._unref(floatingStyles),\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t})\n }, [\n _createElementVNode(\"span\", _mergeProps({\n ref_key: \"bubblearrow\",\n ref: bubblearrow,\n class: \"bb-dropdown__arrow\"\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", {\n class: \"bb-dropdown__bubble\",\n style: _normalizeStyle({ width: `${_ctx.width}px` })\n }, [\n _renderSlot(_ctx.$slots, \"prepend\", {\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement)\n }),\n _createElementVNode(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(mappedItems.value, (item, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.key\n }, [\n _renderSlot(_ctx.$slots, `item:prepend`, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: _ctx.items[index],\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n }),\n _createVNode(BaseButton, _mergeProps({\n \"aria-role\": 'menuitem',\n class: [\"bb-dropdown__item\", {\n\t\t\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t\t\t'bb-dropdown__item--last': index === _ctx.items.length - 1,\n\t\t\t\t\t\t\t\t}],\n \"data-dropdown-item\": true\n }, item), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, item.key, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: item,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n }, () => [\n _renderSlot(_ctx.$slots, \"item\", {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: item,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n })\n ])\n ]),\n _: 2\n }, 1040, [\"class\"]),\n _renderSlot(_ctx.$slots, `item:append`, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: _ctx.items[index],\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n })\n ], 64))\n }), 128))\n ]),\n _renderSlot(_ctx.$slots, \"append\", {\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement)\n })\n ], 4)\n ], 14, _hoisted_1)\n ]))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__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","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","opening","open","closing","closed","arrowAttributes","x","y","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","_Fragment","_renderList","_createVNode","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;;AAGA,MAAMA,KAAa,CAAC,MAAM,iBAAiB,GACrCC,KAAa,EAAE,OAAO,kCAoEAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,SAAS,GAAG;AAAA,IAC5B,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ACtB,MAAM8B,EAAK;AAAA,kBACX,SAASD,EAAQ;AAAA,kBACjB,WAAW4B,EAAOpC,CAAS;AAAA,kBAC3B,MAAMtB,EAAK;AAAA,gBAAA,CACZ;AAAA,iBACA,EAAE,EACN,GAAG,GAAG;AAAA,YAAA,CACR;AAAA,YACDuD,EAAYN,EAAK,QAAQ,UAAU;AAAA,cACjC,QAAQhB,EAAO;AAAA,cACf,SAASD,EAAQ;AAAA,cACjB,UAAUiB,EAAK;AAAA,cACf,MAAMlB,EAAK;AAAA,cACX,SAASD,EAAQ;AAAA,cACjB,WAAW4B,EAAOpC,CAAS;AAAA,YAAA,CAC5B;AAAA,aACA,CAAC;AAAA,QAAA,GACH,IAAIpC,EAAU;AAAA,MAAA,CAClB,KACDkF,GAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index67.js CHANGED
@@ -1,16 +1,16 @@
1
- import { defineComponent as c, computed as v, openBlock as B, createElementBlock as k, normalizeClass as y, createVNode as l, mergeProps as h, withCtx as o, renderSlot as n, createSlots as D, createElementVNode as m, toDisplayString as C, normalizeProps as d, guardReactiveProps as a, renderList as P } from "vue";
1
+ import { defineComponent as c, computed as v, openBlock as B, createElementBlock as k, normalizeClass as y, createVNode as l, mergeProps as h, withCtx as o, renderSlot as d, createSlots as C, createElementVNode as m, toDisplayString as P, normalizeProps as n, guardReactiveProps as a, renderList as D } from "vue";
2
2
  import g from "./index9.js";
3
3
  import "./index10.js";
4
4
  import L from "./index65.js";
5
5
  import "./index66.js";
6
6
  const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m("svg", {
7
7
  class: "bb-dropdown-button__dropdown-chevron",
8
- xmlns: "http://www.w3.org/2000/svg",
9
- viewBox: "0 0 24 24"
8
+ viewBox: "0 0 24 24",
9
+ xmlns: "http://www.w3.org/2000/svg"
10
10
  }, [
11
11
  /* @__PURE__ */ m("path", {
12
- fill: "currentColor",
13
- d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41Z"
12
+ d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41Z",
13
+ fill: "currentColor"
14
14
  })
15
15
  ], -1), R = /* @__PURE__ */ c({
16
16
  __name: "BbDropdownButton",
@@ -41,7 +41,7 @@ const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m
41
41
  }, [
42
42
  l(g, h(i.value, { class: "bb-dropdown-button__main-btn" }), {
43
43
  default: o(() => [
44
- n(e.$slots, "left-btn", {
44
+ d(e.$slots, "left-btn", {
45
45
  disabled: i.value.disabled,
46
46
  text: i.value.text
47
47
  })
@@ -49,18 +49,18 @@ const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m
49
49
  _: 3
50
50
  }, 16),
51
51
  l(L, {
52
+ id: e.id,
52
53
  "arrow-padding": e.arrowPadding,
53
54
  disabled: e.disabled,
54
55
  eager: e.eager,
55
- id: e.id,
56
56
  items: e.items,
57
57
  offset: e.offset,
58
58
  padding: e.padding,
59
59
  placement: e.placement,
60
60
  theme: e.theme,
61
- transitionDuration: e.transitionDuration,
61
+ "transition-duration": e.transitionDuration,
62
62
  width: e.width
63
- }, D({
63
+ }, C({
64
64
  activator: o(({
65
65
  props: t,
66
66
  opening: r,
@@ -70,24 +70,24 @@ const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m
70
70
  disabled: w,
71
71
  placement: f
72
72
  }) => [
73
- n(e.$slots, "activator", {
74
- props: t,
75
- opening: r,
76
- open: p,
73
+ d(e.$slots, "activator", {
77
74
  closed: b,
78
75
  closing: u,
79
76
  disabled: w,
80
- placement: f
77
+ open: p,
78
+ opening: r,
79
+ placement: f,
80
+ props: t
81
81
  }, () => [
82
82
  l(g, h(t, { class: "bb-dropdown-button__dropdown-btn" }), {
83
83
  default: o(() => [
84
- m("span", S, C(p || r ? "Chiudi" : "Apri") + " il menu", 1),
85
- n(e.$slots, "right-btn", {
86
- opening: r,
87
- open: p,
84
+ m("span", S, P(p || r ? "Chiudi" : "Apri") + " il menu", 1),
85
+ d(e.$slots, "right-btn", {
88
86
  closed: b,
89
87
  closing: u,
90
88
  disabled: w,
89
+ open: p,
90
+ opening: r,
91
91
  placement: f
92
92
  }, () => [
93
93
  _
@@ -98,29 +98,29 @@ const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m
98
98
  ])
99
99
  ]),
100
100
  prepend: o((t) => [
101
- n(e.$slots, "prepend", d(a(t)))
101
+ d(e.$slots, "prepend", n(a(t)))
102
102
  ]),
103
103
  "item:prepend": o((t) => [
104
- n(e.$slots, "item:prepend", d(a(t)))
104
+ d(e.$slots, "item:prepend", n(a(t)))
105
105
  ]),
106
106
  item: o((t) => [
107
- n(e.$slots, "item", d(a(t)))
107
+ d(e.$slots, "item", n(a(t)))
108
108
  ]),
109
109
  "item:append": o((t) => [
110
- n(e.$slots, "item:append", d(a(t)))
110
+ d(e.$slots, "item:append", n(a(t)))
111
111
  ]),
112
112
  append: o((t) => [
113
- n(e.$slots, "append", d(a(t)))
113
+ d(e.$slots, "append", n(a(t)))
114
114
  ]),
115
115
  _: 2
116
116
  }, [
117
- P(e.items, (t) => ({
117
+ D(e.items, (t) => ({
118
118
  name: t.key,
119
119
  fn: o((r) => [
120
- n(e.$slots, t.key, d(a(r)))
120
+ d(e.$slots, t.key, n(a(r)))
121
121
  ])
122
122
  }))
123
- ]), 1032, ["arrow-padding", "disabled", "eager", "id", "items", "offset", "padding", "placement", "theme", "transitionDuration", "width"])
123
+ ]), 1032, ["id", "arrow-padding", "disabled", "eager", "items", "offset", "padding", "placement", "theme", "transition-duration", "width"])
124
124
  ], 2));
125
125
  }
126
126
  });