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/index43.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, ref as _, watch as b, openBlock as v, createElementBlock as V, createVNode as n, unref as i, normalizeClass as d, withModifiers as h, withCtx as s, renderSlot as u } from "vue";
1
+ import { defineComponent as f, ref as _, watch as v, openBlock as b, createElementBlock as h, createVNode as n, unref as i, normalizeClass as d, withModifiers as V, withCtx as s, renderSlot as u } from "vue";
2
2
  import { useId as g } from "./index7.js";
3
3
  import $ from "./index9.js";
4
4
  import "./index10.js";
@@ -15,45 +15,48 @@ const y = { class: "bb-accordion" }, A = /* @__PURE__ */ f({
15
15
  emits: ["update:modelValue"],
16
16
  setup(m, { emit: c }) {
17
17
  const p = c, o = m, l = o.id || `bba_${g().id.value}`, e = _(o.modelValue);
18
- b(() => o.modelValue, (a, r) => {
19
- a !== r && a !== e.value && (e.value = a);
20
- });
18
+ v(
19
+ () => o.modelValue,
20
+ (a, r) => {
21
+ a !== r && a !== e.value && (e.value = a);
22
+ }
23
+ );
21
24
  const t = () => {
22
25
  e.value = !e.value, p("update:modelValue", !o.modelValue);
23
26
  };
24
- return (a, r) => (v(), V("div", y, [
27
+ return (a, r) => (b(), h("div", y, [
25
28
  n($, {
29
+ id: `${i(l)}_header`,
26
30
  "aria-controls": i(l),
27
31
  "aria-expanded": e.value,
28
32
  class: d("bb-accordion__header"),
29
- id: `${i(l)}_header`,
30
- onClick: h(t, ["self"])
33
+ onClick: V(t, ["self"])
31
34
  }, {
32
35
  default: s(() => [
33
36
  u(a.$slots, "header", {
34
- value: e.value,
35
- toggle: t
37
+ toggle: t,
38
+ value: e.value
36
39
  })
37
40
  ]),
38
41
  _: 3
39
- }, 8, ["aria-controls", "aria-expanded", "id"]),
42
+ }, 8, ["id", "aria-controls", "aria-expanded"]),
40
43
  n(B, {
44
+ id: i(l),
41
45
  "aria-labelledby": `${i(l)}_header`,
42
46
  class: d("bb-accordion__content"),
43
47
  eager: a.eager,
44
- id: i(l),
45
- modelValue: e.value,
48
+ "model-value": e.value,
46
49
  role: "region",
47
- transitionDuration: a.transitionDuration
50
+ "transition-duration": a.transitionDuration
48
51
  }, {
49
52
  default: s(() => [
50
53
  u(a.$slots, "default", {
51
- value: e.value,
52
- toggle: t
54
+ toggle: t,
55
+ value: e.value
53
56
  })
54
57
  ]),
55
58
  _: 3
56
- }, 8, ["aria-labelledby", "eager", "id", "modelValue", "transitionDuration"])
59
+ }, 8, ["id", "aria-labelledby", "eager", "model-value", "transition-duration"])
57
60
  ]));
58
61
  }
59
62
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index43.js","sources":["../src/components/BbAccordion/BbAccordion.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-accordion\" }\n\nimport { ref, watch } from \"vue\";\nimport { useId } from \"@/composables/useId\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport BbCollapsible from \"../BbCollapsible/BbCollapsible.vue\";\nimport type { BbCollapsibleProps } from \"../BbCollapsible/BbCollapsible.vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbAccordionProps = Partial<BbCollapsibleProps> & Pick<CommonProps, \"id\">;\n\nexport type BbAccordionEvents = {\n (e: \"update:modelValue\", value: boolean): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAccordion',\n props: {\n eager: { type: Boolean },\n transitionDuration: { default: 250 },\n modelValue: { type: Boolean },\n id: {}\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst emit = __emit;\n\nconst props = __props;\n\nconst id = props.id || `bba_${useId().id.value}`;\n\nconst internalValue = ref(props.modelValue);\n/**\n * Watch external changes and align internal value\n */\nwatch(() => props.modelValue, (current, previous) => {\n if(current !== previous && current !== internalValue.value) {\n internalValue.value = current;\n }\n})\n\nconst toggle = () => {\n internalValue.value = !internalValue.value\n emit(\"update:modelValue\", !props.modelValue)\n};\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(BaseButton, {\n \"aria-controls\": _unref(id),\n \"aria-expanded\": internalValue.value,\n class: _normalizeClass('bb-accordion__header'),\n id: `${_unref(id)}_header`,\n onClick: _withModifiers(toggle, [\"self\"])\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"header\", {\n value: internalValue.value,\n toggle: toggle\n })\n ]),\n _: 3\n }, 8, [\"aria-controls\", \"aria-expanded\", \"id\"]),\n _createVNode(BbCollapsible, {\n \"aria-labelledby\": `${_unref(id)}_header`,\n class: _normalizeClass('bb-accordion__content'),\n eager: _ctx.eager,\n id: _unref(id),\n modelValue: internalValue.value,\n role: 'region',\n transitionDuration: _ctx.transitionDuration\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\", {\n value: internalValue.value,\n toggle: toggle\n })\n ]),\n _: 3\n }, 8, [\"aria-labelledby\", \"eager\", \"id\", \"modelValue\", \"transitionDuration\"])\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__emit","emit","props","id","useId","internalValue","ref","watch","current","previous","toggle","_ctx","_cache","_openBlock","_createElementBlock","_createVNode","BaseButton","_unref","_normalizeClass","_withModifiers","_withCtx","_renderSlot","BbCollapsible"],"mappings":";;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,kBAeAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,IAAI,CAAC;AAAA,EACP;AAAA,EACA,OAAO,CAAC,mBAAmB;AAAA,EAC3B,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,UAAMC,IAAOD,GAEPE,IAAQH,GAERI,IAAKD,EAAM,MAAM,OAAOE,IAAQ,GAAG,KAAK,IAExCC,IAAgBC,EAAIJ,EAAM,UAAU;AAI1C,IAAAK,EAAM,MAAML,EAAM,YAAY,CAACM,GAASC,MAAa;AACnD,MAAGD,MAAYC,KAAYD,MAAYH,EAAc,UACnDA,EAAc,QAAQG;AAAA,IACxB,CACD;AAED,UAAME,IAAS,MAAM;AACL,MAAAL,EAAA,QAAQ,CAACA,EAAc,OAChCJ,EAAA,qBAAqB,CAACC,EAAM,UAAU;AAAA,IAAA;AAKtC,WAAA,CAACS,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOlB,GAAY;AAAA,MAC3DmB,EAAaC,GAAY;AAAA,QACvB,iBAAiBC,EAAOd,CAAE;AAAA,QAC1B,iBAAiBE,EAAc;AAAA,QAC/B,OAAOa,EAAgB,sBAAsB;AAAA,QAC7C,IAAI,GAAGD,EAAOd,CAAE,CAAC;AAAA,QACjB,SAASgB,EAAeT,GAAQ,CAAC,MAAM,CAAC;AAAA,MAAA,GACvC;AAAA,QACD,SAASU,EAAS,MAAM;AAAA,UACtBC,EAAYV,EAAK,QAAQ,UAAU;AAAA,YACjC,OAAON,EAAc;AAAA,YACrB,QAAAK;AAAA,UAAA,CACD;AAAA,QAAA,CACF;AAAA,QACD,GAAG;AAAA,SACF,GAAG,CAAC,iBAAiB,iBAAiB,IAAI,CAAC;AAAA,MAC9CK,EAAaO,GAAe;AAAA,QAC1B,mBAAmB,GAAGL,EAAOd,CAAE,CAAC;AAAA,QAChC,OAAOe,EAAgB,uBAAuB;AAAA,QAC9C,OAAOP,EAAK;AAAA,QACZ,IAAIM,EAAOd,CAAE;AAAA,QACb,YAAYE,EAAc;AAAA,QAC1B,MAAM;AAAA,QACN,oBAAoBM,EAAK;AAAA,MAAA,GACxB;AAAA,QACD,SAASS,EAAS,MAAM;AAAA,UACtBC,EAAYV,EAAK,QAAQ,WAAW;AAAA,YAClC,OAAON,EAAc;AAAA,YACrB,QAAAK;AAAA,UAAA,CACD;AAAA,QAAA,CACF;AAAA,QACD,GAAG;AAAA,MAAA,GACF,GAAG,CAAC,mBAAmB,SAAS,MAAM,cAAc,oBAAoB,CAAC;AAAA,IAAA,CAC7E;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index43.js","sources":["../src/components/BbAccordion/BbAccordion.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, withModifiers as _withModifiers, normalizeClass as _normalizeClass, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-accordion\" }\n\nimport { ref, watch } from 'vue';\nimport { useId } from '@/composables/useId';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport type { BbCollapsibleProps } from '../BbCollapsible/BbCollapsible.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbAccordionProps = Partial<BbCollapsibleProps> &\n\tPick<CommonProps, 'id'>;\n\nexport type BbAccordionEvents = {\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAccordion',\n props: {\n eager: { type: Boolean },\n transitionDuration: { default: 250 },\n modelValue: { type: Boolean },\n id: {}\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst emit = __emit;\n\nconst props = __props;\n\nconst id = props.id || `bba_${useId().id.value}`;\n\nconst internalValue = ref(props.modelValue);\n/**\n * Watch external changes and align internal value\n */\nwatch(\n\t() => props.modelValue,\n\t(current, previous) => {\n\t\tif (current !== previous && current !== internalValue.value) {\n\t\t\tinternalValue.value = current;\n\t\t}\n\t}\n);\n\nconst toggle = () => {\n\tinternalValue.value = !internalValue.value;\n\temit('update:modelValue', !props.modelValue);\n};\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(BaseButton, {\n id: `${_unref(id)}_header`,\n \"aria-controls\": _unref(id),\n \"aria-expanded\": internalValue.value,\n class: _normalizeClass('bb-accordion__header'),\n onClick: _withModifiers(toggle, [\"self\"])\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"header\", {\n toggle: toggle,\n value: internalValue.value\n })\n ]),\n _: 3\n }, 8, [\"id\", \"aria-controls\", \"aria-expanded\"]),\n _createVNode(BbCollapsible, {\n id: _unref(id),\n \"aria-labelledby\": `${_unref(id)}_header`,\n class: _normalizeClass('bb-accordion__content'),\n eager: _ctx.eager,\n \"model-value\": internalValue.value,\n role: 'region',\n \"transition-duration\": _ctx.transitionDuration\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\", {\n toggle: toggle,\n value: internalValue.value\n })\n ]),\n _: 3\n }, 8, [\"id\", \"aria-labelledby\", \"eager\", \"model-value\", \"transition-duration\"])\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__emit","emit","props","id","useId","internalValue","ref","watch","current","previous","toggle","_ctx","_cache","_openBlock","_createElementBlock","_createVNode","BaseButton","_unref","_normalizeClass","_withModifiers","_withCtx","_renderSlot","BbCollapsible"],"mappings":";;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,kBAgBAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,IAAI,CAAC;AAAA,EACP;AAAA,EACA,OAAO,CAAC,mBAAmB;AAAA,EAC3B,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,UAAMC,IAAOD,GAEPE,IAAQH,GAERI,IAAKD,EAAM,MAAM,OAAOE,IAAQ,GAAG,KAAK,IAExCC,IAAgBC,EAAIJ,EAAM,UAAU;AAI1C,IAAAK;AAAA,MACC,MAAML,EAAM;AAAA,MACZ,CAACM,GAASC,MAAa;AACtB,QAAID,MAAYC,KAAYD,MAAYH,EAAc,UACrDA,EAAc,QAAQG;AAAA,MAExB;AAAA,IAAA;AAGD,UAAME,IAAS,MAAM;AACN,MAAAL,EAAA,QAAQ,CAACA,EAAc,OAChCJ,EAAA,qBAAqB,CAACC,EAAM,UAAU;AAAA,IAAA;AAKrC,WAAA,CAACS,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOlB,GAAY;AAAA,MAC3DmB,EAAaC,GAAY;AAAA,QACvB,IAAI,GAAGC,EAAOd,CAAE,CAAC;AAAA,QACjB,iBAAiBc,EAAOd,CAAE;AAAA,QAC1B,iBAAiBE,EAAc;AAAA,QAC/B,OAAOa,EAAgB,sBAAsB;AAAA,QAC7C,SAASC,EAAeT,GAAQ,CAAC,MAAM,CAAC;AAAA,MAAA,GACvC;AAAA,QACD,SAASU,EAAS,MAAM;AAAA,UACtBC,EAAYV,EAAK,QAAQ,UAAU;AAAA,YACjC,QAAAD;AAAA,YACA,OAAOL,EAAc;AAAA,UAAA,CACtB;AAAA,QAAA,CACF;AAAA,QACD,GAAG;AAAA,SACF,GAAG,CAAC,MAAM,iBAAiB,eAAe,CAAC;AAAA,MAC9CU,EAAaO,GAAe;AAAA,QAC1B,IAAIL,EAAOd,CAAE;AAAA,QACb,mBAAmB,GAAGc,EAAOd,CAAE,CAAC;AAAA,QAChC,OAAOe,EAAgB,uBAAuB;AAAA,QAC9C,OAAOP,EAAK;AAAA,QACZ,eAAeN,EAAc;AAAA,QAC7B,MAAM;AAAA,QACN,uBAAuBM,EAAK;AAAA,MAAA,GAC3B;AAAA,QACD,SAASS,EAAS,MAAM;AAAA,UACtBC,EAAYV,EAAK,QAAQ,WAAW;AAAA,YAClC,QAAAD;AAAA,YACA,OAAOL,EAAc;AAAA,UAAA,CACtB;AAAA,QAAA,CACF;AAAA,QACD,GAAG;AAAA,MAAA,GACF,GAAG,CAAC,MAAM,mBAAmB,SAAS,eAAe,qBAAqB,CAAC;AAAA,IAAA,CAC/E;AAAA,EAEH;AAEA,CAAC;"}
package/dist/index45.js CHANGED
@@ -9,15 +9,15 @@ const z = {
9
9
  class: "bb-alert__inner-container",
10
10
  role: "alert"
11
11
  }, $ = { class: "bb-alert__icon-container" }, g = { class: "bb-alert__content" }, B = { class: "bb-alert__title" }, L = { class: "bb-alert__text" }, S = { class: "bb-alert__close" }, N = /* @__PURE__ */ t("svg", {
12
- viewBox: "0 0 24 24",
13
12
  fill: "none",
13
+ viewBox: "0 0 24 24",
14
14
  xmlns: "http://www.w3.org/2000/svg"
15
15
  }, [
16
16
  /* @__PURE__ */ t("path", {
17
17
  d: "M23 23L1 1M23 1L1 23",
18
18
  stroke: "currentColor",
19
- "stroke-width": "2",
20
- "stroke-linecap": "round"
19
+ "stroke-linecap": "round",
20
+ "stroke-width": "2"
21
21
  })
22
22
  ], -1), q = /* @__PURE__ */ h({
23
23
  __name: "BbAlert",
@@ -55,9 +55,9 @@ const z = {
55
55
  e.icon ? (s(), a(y, {
56
56
  key: 0,
57
57
  class: "bb-alert__icon",
58
- type: e.icon,
59
- size: e.iconSize
60
- }, null, 8, ["type", "size"])) : r("", !0)
58
+ size: e.iconSize,
59
+ type: e.icon
60
+ }, null, 8, ["size", "type"])) : r("", !0)
61
61
  ]),
62
62
  t("div", g, [
63
63
  t("p", B, [
@@ -74,10 +74,10 @@ const z = {
74
74
  t("div", S, [
75
75
  e.showClose ? (s(), a(w, {
76
76
  key: 0,
77
- class: "bb-alert__close-btn",
78
- onClick: f,
77
+ "aria-label": e.closeLabel,
79
78
  block: "",
80
- "aria-label": e.closeLabel
79
+ class: "bb-alert__close-btn",
80
+ onClick: f
81
81
  }, {
82
82
  default: i(() => [
83
83
  N
@@ -1 +1 @@
1
- {"version":3,"file":"index45.js","sources":["../src/components/BbAlert/BbAlert.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n class: \"bb-alert__inner-container\",\n role: \"alert\"\n}\nconst _hoisted_2 = { class: \"bb-alert__icon-container\" }\nconst _hoisted_3 = { class: \"bb-alert__content\" }\nconst _hoisted_4 = { class: \"bb-alert__title\" }\nconst _hoisted_5 = { class: \"bb-alert__text\" }\nconst _hoisted_6 = { class: \"bb-alert__close\" }\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { ref, watch } from \"vue\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport BbCollapsible from \"../BbCollapsible/BbCollapsible.vue\";\nimport BbIcon from \"../BbIcon/BbIcon.vue\";\nimport type { BbIconProps } from \"../BbIcon/BbIcon.vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbAlertProps = Pick<CommonProps, 'closeLabel' | 'showClose' | 'text' | 'theme' | 'title'> &\n {\n /**\n * Name of the icon to use\n */\n icon?: BbIconProps['type'];\n /**\n * Size of the icon to use\n */\n iconSize?: BbIconProps[\"size\"];\n /**\n * Used by v-model, set type to any to avoid Vue casting it as false\n */\n modelValue?: any;\n};\n\nexport type BbAlertEvents = {\n (e: \"update:modelValue\", value: boolean): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAlert',\n props: {\n closeLabel: { default: \"Chiudi\" },\n showClose: { type: Boolean },\n text: {},\n theme: { default: \"default\" },\n title: {},\n icon: {},\n iconSize: {},\n modelValue: {}\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst innerValue = ref(\n props.modelValue === undefined ? true : !!props.modelValue\n);\n\nwatch(\n () => props.modelValue,\n (value) => {\n if (innerValue.value !== !!value) {\n innerValue.value = !!value;\n }\n }\n);\n\nconst onClickClose = () => {\n innerValue.value = false;\n emit(\"update:modelValue\", false);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BbCollapsible, {\n class: _normalizeClass([\"bb-alert\", { [`bb-alert--${_ctx.theme}`]: _ctx.theme }]),\n \"model-value\": innerValue.value\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.icon)\n ? (_openBlock(), _createBlock(BbIcon, {\n key: 0,\n class: \"bb-alert__icon\",\n type: _ctx.icon,\n size: _ctx.iconSize\n }, null, 8, [\"type\", \"size\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"p\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"title\", _normalizeProps(_guardReactiveProps({ text: _ctx.title })), () => [\n _createTextVNode(_toDisplayString(_ctx.title), 1)\n ])\n ]),\n _createElementVNode(\"p\", _hoisted_5, [\n _renderSlot(_ctx.$slots, \"text\", _normalizeProps(_guardReactiveProps({ text: _ctx.text })), () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-alert__close-btn\",\n onClick: onClickClose,\n block: \"\",\n \"aria-label\": _ctx.closeLabel\n }, {\n default: _withCtx(() => [\n _hoisted_7\n ]),\n _: 1\n }, 8, [\"aria-label\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _: 3\n }, 8, [\"class\", \"model-value\"]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","__emit","props","emit","innerValue","ref","watch","value","onClickClose","_ctx","_cache","_openBlock","_createBlock","BbCollapsible","_normalizeClass","_withCtx","_createElementVNode","BbIcon","_createCommentVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_createTextVNode","_toDisplayString","BaseButton"],"mappings":";;;;;;;AAGA,MAAMA,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AACR,GACMC,IAAa,EAAE,OAAO,8BACtBC,IAAa,EAAE,OAAO,uBACtBC,IAAa,EAAE,OAAO,qBACtBC,IAAa,EAAE,OAAO,oBACtBC,IAAa,EAAE,OAAO,qBACtBC,sBAA8C,OAAO;AAAA,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,CAAC;"}
1
+ {"version":3,"file":"index45.js","sources":["../src/components/BbAlert/BbAlert.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n class: \"bb-alert__inner-container\",\n role: \"alert\"\n}\nconst _hoisted_2 = { class: \"bb-alert__icon-container\" }\nconst _hoisted_3 = { class: \"bb-alert__content\" }\nconst _hoisted_4 = { class: \"bb-alert__title\" }\nconst _hoisted_5 = { class: \"bb-alert__text\" }\nconst _hoisted_6 = { class: \"bb-alert__close\" }\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-width\": \"2\"\n })\n], -1)\n\nimport { ref, watch } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\nimport type { BbIconProps } from '../BbIcon/BbIcon.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbAlertProps = Pick<\n\tCommonProps,\n\t'closeLabel' | 'showClose' | 'text' | 'theme' | 'title'\n> & {\n\t/**\n\t * Name of the icon to use\n\t */\n\ticon?: BbIconProps['type'];\n\t/**\n\t * Size of the icon to use\n\t */\n\ticonSize?: BbIconProps['size'];\n\t/**\n\t * Used by v-model, set type to any to avoid Vue casting it as false\n\t */\n\tmodelValue?: any;\n};\n\nexport type BbAlertEvents = {\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAlert',\n props: {\n closeLabel: { default: 'Chiudi' },\n showClose: { type: Boolean },\n text: {},\n theme: { default: 'default' },\n title: {},\n icon: {},\n iconSize: {},\n modelValue: {}\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst innerValue = ref(\n\tprops.modelValue === undefined ? true : !!props.modelValue\n);\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (innerValue.value !== !!value) {\n\t\t\tinnerValue.value = !!value;\n\t\t}\n\t}\n);\n\nconst onClickClose = () => {\n\tinnerValue.value = false;\n\temit('update:modelValue', false);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BbCollapsible, {\n class: _normalizeClass([\"bb-alert\", { [`bb-alert--${_ctx.theme}`]: _ctx.theme }]),\n \"model-value\": innerValue.value\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.icon)\n ? (_openBlock(), _createBlock(BbIcon, {\n key: 0,\n class: \"bb-alert__icon\",\n size: _ctx.iconSize,\n type: _ctx.icon\n }, null, 8, [\"size\", \"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"p\", _hoisted_4, [\n _renderSlot(_ctx.$slots, \"title\", _normalizeProps(_guardReactiveProps({ text: _ctx.title })), () => [\n _createTextVNode(_toDisplayString(_ctx.title), 1)\n ])\n ]),\n _createElementVNode(\"p\", _hoisted_5, [\n _renderSlot(_ctx.$slots, \"text\", _normalizeProps(_guardReactiveProps({ text: _ctx.text })), () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n \"aria-label\": _ctx.closeLabel,\n block: \"\",\n class: \"bb-alert__close-btn\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_7\n ]),\n _: 1\n }, 8, [\"aria-label\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _: 3\n }, 8, [\"class\", \"model-value\"]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_sfc_main","_defineComponent","__props","__emit","props","emit","innerValue","ref","watch","value","onClickClose","_ctx","_cache","_openBlock","_createBlock","BbCollapsible","_normalizeClass","_withCtx","_createElementVNode","BbIcon","_createCommentVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_createTextVNode","_toDisplayString","BaseButton"],"mappings":";;;;;;;AAGA,MAAMA,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AACR,GACMC,IAAa,EAAE,OAAO,8BACtBC,IAAa,EAAE,OAAO,uBACtBC,IAAa,EAAE,OAAO,qBACtBC,IAAa,EAAE,OAAO,oBACtBC,IAAa,EAAE,OAAO,qBACtBC,sBAA8C,OAAO;AAAA,EACzD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAAA,CACjB;AACH,GAAG,EAAE,GA+BuBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,SAAS;AAAA,IAChC,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,MAAM,CAAC;AAAA,IACP,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,OAAO,CAAC;AAAA,IACR,MAAM,CAAC;AAAA,IACP,UAAU,CAAC;AAAA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GAAG,CAAC;AAAA,cAAA,CACjD;AAAA,YAAA,CACF;AAAA,YACDO,EAAoB,KAAKrB,GAAY;AAAA,cACnCwB,EAAYV,EAAK,QAAQ,QAAQW,EAAgBC,EAAoB,EAAE,MAAMZ,EAAK,KAAM,CAAA,CAAC,GAAG,MAAM;AAAA,gBAChGa,EAAiBC,EAAiBd,EAAK,IAAI,GAAG,CAAC;AAAA,cAAA,CAChD;AAAA,YAAA,CACF;AAAA,UAAA,CACF;AAAA,UACDO,EAAoB,OAAOpB,GAAY;AAAA,YACpCa,EAAK,aACDE,KAAcC,EAAaY,GAAY;AAAA,cACtC,KAAK;AAAA,cACL,cAAcf,EAAK;AAAA,cACnB,OAAO;AAAA,cACP,OAAO;AAAA,cACP,SAASD;AAAA,YAAA,GACR;AAAA,cACD,SAASO,EAAS,MAAM;AAAA,gBACtBlB;AAAA,cAAA,CACD;AAAA,cACD,GAAG;AAAA,YAAA,GACF,GAAG,CAAC,YAAY,CAAC,KACpBqB,EAAoB,IAAI,EAAI;AAAA,UAAA,CACjC;AAAA,QAAA,CACF;AAAA,MAAA,CACF;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,SAAS,aAAa,CAAC;AAAA,EAEhC;AAEA,CAAC;"}
package/dist/index47.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as p, computed as u, ref as d, watch as f, openBlock as a, createElementBlock as l, normalizeProps as b, guardReactiveProps as z, createElementVNode as v, renderSlot as g, createCommentVNode as h } from "vue";
2
- import { isCssColor as _ } from "./index211.js";
3
- const k = { class: "bb-avatar__fallback" }, C = ["alt", "src", "srcset", "sizes"], B = /* @__PURE__ */ p({
2
+ import { isCssColor as _ } from "./index197.js";
3
+ const k = { class: "bb-avatar__fallback" }, C = ["alt", "sizes", "src", "srcset"], B = /* @__PURE__ */ p({
4
4
  __name: "BbAvatar",
5
5
  props: {
6
6
  color: {},
@@ -47,10 +47,10 @@ const k = { class: "bb-avatar__fallback" }, C = ["alt", "src", "srcset", "sizes"
47
47
  (s.src || s.srcset) && !t.value ? (a(), l("img", {
48
48
  key: 0,
49
49
  alt: s.alt,
50
+ class: "bb-avatar__img",
51
+ sizes: s.sizes,
50
52
  src: s.src,
51
53
  srcset: s.srcset,
52
- sizes: s.sizes,
53
- class: "bb-avatar__img",
54
54
  onError: m
55
55
  }, null, 40, C)) : h("", !0)
56
56
  ], 16));
@@ -1 +1 @@
1
- {"version":3,"file":"index47.js","sources":["../src/components/BbAvatar/BbAvatar.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-avatar__fallback\" }\nconst _hoisted_2 = [\"alt\", \"src\", \"srcset\", \"sizes\"]\n\nimport { computed, ref, watch } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport type { Classes } from \"@/types/Classes\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { BbIconProps, Size } from \"../BbIcon/BbIcon.vue\";\n\nexport type BbAvatarProps = Pick<CommonProps, \"color\"> &\n Pick<BbIconProps, \"size\"> & {\n /**\n * Attribute `sizes` for the `img` tag\n */\n sizes?: HTMLImageElement[\"sizes\"];\n /**\n * Attribute `alt` for the `img` tag\n */\n alt: HTMLImageElement[\"alt\"];\n } & (\n | {\n /**\n * Attribute `src` for the `img` tag\n */\n src: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset?: HTMLImageElement[\"srcset\"];\n }\n | {\n /**\n * Attribute `src` for the `img` tag\n */\n src?: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset: HTMLImageElement[\"srcset\"];\n }\n );\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAvatar',\n props: {\n color: {},\n size: {},\n sizes: {},\n alt: {},\n src: {},\n srcset: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst sizeMap: Size = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 56,\n xl: 80,\n xxl: 104,\n};\n\nconst attributes = computed(() => {\n const classes: Classes = {\n \"bb-avatar\": true,\n };\n let dimension: any;\n if (props.size) {\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n } else {\n dimension = props.size;\n }\n dimension += `px`;\n }\n\n let style: { [key: string]: any } = {\n width: dimension,\n height: dimension,\n };\n if (props.color) {\n if (isCssColor(props.color)) {\n style.backgroundColor = props.color;\n } else {\n classes[`bb-avatar--${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nconst imageHasErrored = ref(false);\nconst onImageError = () => {\n imageHasErrored.value = true;\n};\nwatch(\n () => [props.src, props.srcset],\n () => {\n imageHasErrored.value = false;\n }\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(attributes.value)), [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n (!!(_ctx.src || _ctx.srcset) && !imageHasErrored.value)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n alt: _ctx.alt,\n src: _ctx.src,\n srcset: _ctx.srcset,\n sizes: _ctx.sizes,\n class: \"bb-avatar__img\",\n onError: onImageError\n }, null, 40, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","attributes","computed","classes","dimension","style","isCssColor","imageHasErrored","ref","onImageError","watch","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;AAGA,MAAMA,IA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,EAAgBC,EAAoBf,EAAW,KAAK,CAAC,GAAG;AAAA,MACxGgB,EAAoB,QAAQvB,GAAY;AAAA,QACtCwB,EAAYP,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACGA,EAAK,OAAOA,EAAK,WAAW,CAACJ,EAAgB,SAC5CM,KAAcC,EAAoB,OAAO;AAAA,QACxC,KAAK;AAAA,QACL,KAAKH,EAAK;AAAA,QACV,KAAKA,EAAK;AAAA,QACV,QAAQA,EAAK;AAAA,QACb,OAAOA,EAAK;AAAA,QACZ,OAAO;AAAA,QACP,SAASF;AAAA,MAAA,GACR,MAAM,IAAId,CAAU,KACvBwB,EAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index47.js","sources":["../src/components/BbAvatar/BbAvatar.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-avatar__fallback\" }\nconst _hoisted_2 = [\"alt\", \"sizes\", \"src\", \"srcset\"]\n\nimport { computed, ref, watch } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Classes } from '@/types/Classes';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { BbIconProps, Size } from '../BbIcon/BbIcon.vue';\n\nexport type BbAvatarProps = Pick<CommonProps, 'color'> &\n\tPick<BbIconProps, 'size'> & {\n\t\t/**\n\t\t * Attribute `sizes` for the `img` tag\n\t\t */\n\t\tsizes?: HTMLImageElement['sizes'];\n\t\t/**\n\t\t * Attribute `alt` for the `img` tag\n\t\t */\n\t\talt: HTMLImageElement['alt'];\n\t} & (\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * Attribute `src` for the `img` tag\n\t\t\t\t */\n\t\t\t\tsrc: HTMLImageElement['src'];\n\t\t\t\t/**\n\t\t\t\t * Attribute `srcset` for the `img` tag\n\t\t\t\t */\n\t\t\t\tsrcset?: HTMLImageElement['srcset'];\n\t\t }\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * Attribute `src` for the `img` tag\n\t\t\t\t */\n\t\t\t\tsrc?: HTMLImageElement['src'];\n\t\t\t\t/**\n\t\t\t\t * Attribute `srcset` for the `img` tag\n\t\t\t\t */\n\t\t\t\tsrcset: HTMLImageElement['srcset'];\n\t\t }\n\t);\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAvatar',\n props: {\n color: {},\n size: {},\n sizes: {},\n alt: {},\n src: {},\n srcset: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst sizeMap: Size = {\n\txs: 24,\n\tsm: 32,\n\tmd: 40,\n\tlg: 56,\n\txl: 80,\n\txxl: 104,\n};\n\nconst attributes = computed(() => {\n\tconst classes: Classes = {\n\t\t'bb-avatar': true,\n\t};\n\tlet dimension: any;\n\tif (props.size) {\n\t\tif (typeof props.size === 'string') {\n\t\t\tdimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n\t\t} else {\n\t\t\tdimension = props.size;\n\t\t}\n\t\tdimension += `px`;\n\t}\n\n\tlet style: { [key: string]: any } = {\n\t\twidth: dimension,\n\t\theight: dimension,\n\t};\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.backgroundColor = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-avatar--${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\nconst imageHasErrored = ref(false);\nconst onImageError = () => {\n\timageHasErrored.value = true;\n};\nwatch(\n\t() => [props.src, props.srcset],\n\t() => {\n\t\timageHasErrored.value = false;\n\t}\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(attributes.value)), [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n (!!(_ctx.src || _ctx.srcset) && !imageHasErrored.value)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n alt: _ctx.alt,\n class: \"bb-avatar__img\",\n sizes: _ctx.sizes,\n src: _ctx.src,\n srcset: _ctx.srcset,\n onError: onImageError\n }, null, 40, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","attributes","computed","classes","dimension","style","isCssColor","imageHasErrored","ref","onImageError","watch","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,yBACtBC,IAAa,CAAC,OAAO,SAAS,OAAO,QAAQ,GA0CvBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,CAAC;AAAA,IACP,OAAO,CAAC;AAAA,IACR,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAgB;AAAA,MACrB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGAC,IAAaC,EAAS,MAAM;AACjC,YAAMC,IAAmB;AAAA,QACxB,aAAa;AAAA,MAAA;AAEV,UAAAC;AACJ,MAAIL,EAAM,SACL,OAAOA,EAAM,QAAS,WACzBK,IAAYJ,EAAQD,EAAM,IAAkB,KAAK,SAASA,EAAM,MAAM,EAAE,IAExEK,IAAYL,EAAM,MAENK,KAAA;AAGd,UAAIC,IAAgC;AAAA,QACnC,OAAOD;AAAA,QACP,QAAQA;AAAA,MAAA;AAET,aAAIL,EAAM,UACLO,EAAWP,EAAM,KAAK,IACzBM,EAAM,kBAAkBN,EAAM,QAE9BI,EAAQ,cAAcJ,EAAM,KAAK,EAAE,IAAI,KAGlC;AAAA,QACN,OAAOI;AAAA,QACP,OAAAE;AAAA,MAAA;AAAA,IACD,CACA,GAEKE,IAAkBC,EAAI,EAAK,GAC3BC,IAAe,MAAM;AAC1B,MAAAF,EAAgB,QAAQ;AAAA,IAAA;AAEzB,WAAAG;AAAA,MACC,MAAM,CAACX,EAAM,KAAKA,EAAM,MAAM;AAAA,MAC9B,MAAM;AACL,QAAAQ,EAAgB,QAAQ;AAAA,MACzB;AAAA,IAAA,GAGM,CAACI,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQC,EAAgBC,EAAoBf,EAAW,KAAK,CAAC,GAAG;AAAA,MACxGgB,EAAoB,QAAQvB,GAAY;AAAA,QACtCwB,EAAYP,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACGA,EAAK,OAAOA,EAAK,WAAW,CAACJ,EAAgB,SAC5CM,KAAcC,EAAoB,OAAO;AAAA,QACxC,KAAK;AAAA,QACL,KAAKH,EAAK;AAAA,QACV,OAAO;AAAA,QACP,OAAOA,EAAK;AAAA,QACZ,KAAKA,EAAK;AAAA,QACV,QAAQA,EAAK;AAAA,QACb,SAASF;AAAA,MAAA,GACR,MAAM,IAAId,CAAU,KACvBwB,EAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index49.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, useSlots as d, computed as n, openBlock as m, createElementBlock as u, normalizeClass as g, createElementVNode as s, renderSlot as l, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
2
- import { isCssColor as r } from "./index211.js";
2
+ import { isCssColor as r } from "./index197.js";
3
3
  import { isNil as B } from "./index120.js";
4
4
  const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, S = /* @__PURE__ */ p({
5
5
  __name: "BbBadge",
@@ -1 +1 @@
1
- {"version":3,"file":"index49.js","sources":["../src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-badge__wrapper\" }\nconst _hoisted_2 = { class: \"bb-badge__content-inner\" }\n\nimport { computed, useSlots } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbBadgeProps = Pick<CommonProps, \"color\"> & {\n /**\n * Displays the badge on the bottom of the wrapped component.\n */\n bottom?: boolean;\n /**\n * Text content of the badge\n */\n content?: string | number | null;\n /**\n * Renders the badge i little firther from the wrapped\n * component making it look like it's floating\n * and not stacked.\n */\n floating?: boolean;\n /**\n * Displays the badge on the left of the wrapped component.\n */\n left?: boolean;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbBadge',\n props: {\n color: {},\n bottom: { type: Boolean },\n content: {},\n floating: { type: Boolean },\n left: { type: Boolean }\n },\n setup(__props: any) {\n\nconst slots = useSlots();\n\nconst props = __props;\n\n\n\nconst classes = computed(() => {\n return {\n \"bb-badge\": true,\n \"bb-badge--bottom\": props.bottom,\n \"bb-badge--left\": props.left,\n \"bb-badge--positioned\": slots.default,\n \"bb-badge--floating\": props.floating,\n \"bb-badge--empty\": isNil(props.content),\n [`bb-badge--${props.color}`]: props.color && !isCssColor(props.color),\n };\n});\n\nconst contentAttributes = computed(() => {\n let style: Record<string, string> = {};\n if (props.color && isCssColor(props.color)) {\n style.backgroundColor = props.color;\n }\n\n let accessibilityAttributes: Record<string, string | boolean> = {};\n if (slots.wrap) {\n accessibilityAttributes[\"aria-atomic\"] = true;\n accessibilityAttributes[\"aria-live\"] = \"polite\";\n accessibilityAttributes[\"role\"] = \"status\";\n }\n return {\n style,\n ...accessibilityAttributes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass(classes.value)\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"span\", _mergeProps({ class: \"bb-badge__content-container\" }, contentAttributes.value), [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"content\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.content), 1)\n ])\n ])\n ], 16)\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","slots","useSlots","props","classes","computed","isNil","isCssColor","contentAttributes","style","accessibilityAttributes","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,uBACtBC,IAAa,EAAE,OAAO,6BA6BAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,QAAQ,EAAE,MAAM,QAAQ;AAAA,IACxB,SAAS,CAAC;AAAA,IACV,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,EAAE,MAAM,QAAQ;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQC,KAERC,IAAQH,GAIRI,IAAUC,EAAS,OAChB;AAAA,MACL,YAAY;AAAA,MACZ,oBAAoBF,EAAM;AAAA,MAC1B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBF,EAAM;AAAA,MAC9B,sBAAsBE,EAAM;AAAA,MAC5B,mBAAmBG,EAAMH,EAAM,OAAO;AAAA,MACtC,CAAC,aAAaA,EAAM,KAAK,EAAE,GAAGA,EAAM,SAAS,CAACI,EAAWJ,EAAM,KAAK;AAAA,IAAA,EAEvE,GAEKK,IAAoBH,EAAS,MAAM;AACvC,UAAII,IAAgC,CAAA;AACpC,MAAIN,EAAM,SAASI,EAAWJ,EAAM,KAAK,MACvCM,EAAM,kBAAkBN,EAAM;AAGhC,UAAIO,IAA4D,CAAA;AAChE,aAAIT,EAAM,SACRS,EAAwB,aAAa,IAAI,IACzCA,EAAwB,WAAW,IAAI,UACvCA,EAAwB,OAAU,WAE7B;AAAA,QACL,OAAAD;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACL,CACD;AAEM,WAAA,CAACC,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQ;AAAA,MAChD,OAAOC,EAAgBX,EAAQ,KAAK;AAAA,IAAA,GACnC;AAAA,MACDY,EAAoB,QAAQpB,GAAY;AAAA,QACtCqB,EAAYN,EAAK,QAAQ,SAAS;AAAA,QAClCK,EAAoB,QAAQE,EAAY,EAAE,OAAO,iCAAiCV,EAAkB,KAAK,GAAG;AAAA,UAC1GQ,EAAoB,QAAQnB,GAAY;AAAA,YACtCoB,EAAYN,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,cAC5CQ,EAAiBC,EAAiBT,EAAK,OAAO,GAAG,CAAC;AAAA,YAAA,CACnD;AAAA,UAAA,CACF;AAAA,WACA,EAAE;AAAA,MAAA,CACN;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index49.js","sources":["../src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-badge__wrapper\" }\nconst _hoisted_2 = { class: \"bb-badge__content-inner\" }\n\nimport { computed, useSlots } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { isNil } from '@/utilities/functions/isNil';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbBadgeProps = Pick<CommonProps, 'color'> & {\n\t/**\n\t * Displays the badge on the bottom of the wrapped component.\n\t */\n\tbottom?: boolean;\n\t/**\n\t * Text content of the badge\n\t */\n\tcontent?: string | number | null;\n\t/**\n\t * Renders the badge i little firther from the wrapped\n\t * component making it look like it's floating\n\t * and not stacked.\n\t */\n\tfloating?: boolean;\n\t/**\n\t * Displays the badge on the left of the wrapped component.\n\t */\n\tleft?: boolean;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbBadge',\n props: {\n color: {},\n bottom: { type: Boolean },\n content: {},\n floating: { type: Boolean },\n left: { type: Boolean }\n },\n setup(__props: any) {\n\nconst slots = useSlots();\n\nconst props = __props;\n\n\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-badge': true,\n\t\t'bb-badge--bottom': props.bottom,\n\t\t'bb-badge--left': props.left,\n\t\t'bb-badge--positioned': slots.default,\n\t\t'bb-badge--floating': props.floating,\n\t\t'bb-badge--empty': isNil(props.content),\n\t\t[`bb-badge--${props.color}`]: props.color && !isCssColor(props.color),\n\t};\n});\n\nconst contentAttributes = computed(() => {\n\tlet style: Record<string, string> = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.backgroundColor = props.color;\n\t}\n\n\tlet accessibilityAttributes: Record<string, string | boolean> = {};\n\tif (slots.wrap) {\n\t\taccessibilityAttributes['aria-atomic'] = true;\n\t\taccessibilityAttributes['aria-live'] = 'polite';\n\t\taccessibilityAttributes['role'] = 'status';\n\t}\n\treturn {\n\t\tstyle,\n\t\t...accessibilityAttributes,\n\t};\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass(classes.value)\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"span\", _mergeProps({ class: \"bb-badge__content-container\" }, contentAttributes.value), [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"content\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.content), 1)\n ])\n ])\n ], 16)\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","slots","useSlots","props","classes","computed","isNil","isCssColor","contentAttributes","style","accessibilityAttributes","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,uBACtBC,IAAa,EAAE,OAAO,6BA6BAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,QAAQ,EAAE,MAAM,QAAQ;AAAA,IACxB,SAAS,CAAC;AAAA,IACV,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,EAAE,MAAM,QAAQ;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQC,KAERC,IAAQH,GAIRI,IAAUC,EAAS,OACjB;AAAA,MACN,YAAY;AAAA,MACZ,oBAAoBF,EAAM;AAAA,MAC1B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBF,EAAM;AAAA,MAC9B,sBAAsBE,EAAM;AAAA,MAC5B,mBAAmBG,EAAMH,EAAM,OAAO;AAAA,MACtC,CAAC,aAAaA,EAAM,KAAK,EAAE,GAAGA,EAAM,SAAS,CAACI,EAAWJ,EAAM,KAAK;AAAA,IAAA,EAErE,GAEKK,IAAoBH,EAAS,MAAM;AACxC,UAAII,IAAgC,CAAA;AACpC,MAAIN,EAAM,SAASI,EAAWJ,EAAM,KAAK,MACxCM,EAAM,kBAAkBN,EAAM;AAG/B,UAAIO,IAA4D,CAAA;AAChE,aAAIT,EAAM,SACTS,EAAwB,aAAa,IAAI,IACzCA,EAAwB,WAAW,IAAI,UACvCA,EAAwB,OAAU,WAE5B;AAAA,QACN,OAAAD;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACJ,CACA;AAEM,WAAA,CAACC,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQ;AAAA,MAChD,OAAOC,EAAgBX,EAAQ,KAAK;AAAA,IAAA,GACnC;AAAA,MACDY,EAAoB,QAAQpB,GAAY;AAAA,QACtCqB,EAAYN,EAAK,QAAQ,SAAS;AAAA,QAClCK,EAAoB,QAAQE,EAAY,EAAE,OAAO,iCAAiCV,EAAkB,KAAK,GAAG;AAAA,UAC1GQ,EAAoB,QAAQnB,GAAY;AAAA,YACtCoB,EAAYN,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,cAC5CQ,EAAiBC,EAAiBT,EAAK,OAAO,GAAG,CAAC;AAAA,YAAA,CACnD;AAAA,UAAA,CACF;AAAA,WACA,EAAE;AAAA,MAAA,CACN;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
package/dist/index5.js CHANGED
@@ -4,17 +4,18 @@ import { useId as h } from "./index7.js";
4
4
  const i = d({
5
5
  stack: []
6
6
  }), b = () => {
7
- const l = (t) => i.stack = i.stack.filter((o) => o.id !== t);
7
+ const c = (t) => i.stack = i.stack.filter((o) => o.id !== t);
8
8
  return {
9
9
  toast: (t) => {
10
10
  const o = h().id.value;
11
- let c, e, n, s, f, u = 6e3;
11
+ let l, e, n, s, f;
12
+ const u = 6e3;
12
13
  if (typeof t == "string")
13
14
  e = t;
14
15
  else {
15
16
  if (typeof t.timeout == "number" && t.timeout <= 0)
16
17
  throw new Error("Toast messages cannot have a zero or less timeout");
17
- n = t.icon, f = t.showClose, e = t.text, s = t.theme, c = t.title;
18
+ n = t.icon, f = t.showClose, e = t.text, s = t.theme, l = t.title;
18
19
  }
19
20
  if (i.stack = i.stack.concat({
20
21
  icon: n,
@@ -22,16 +23,16 @@ const i = d({
22
23
  showClose: f,
23
24
  text: e,
24
25
  theme: s,
25
- title: c
26
+ title: l
26
27
  }), typeof t == "object" && !t.persistent || typeof t == "string") {
27
28
  let r;
28
29
  typeof t == "object" && t.timeout ? r = t.timeout : r = u, p(r).then(() => {
29
- l(o);
30
+ c(o);
30
31
  });
31
32
  }
32
33
  return o;
33
34
  },
34
- dismiss: l,
35
+ dismiss: c,
35
36
  dismissAll: () => i.stack = []
36
37
  };
37
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index5.js","sources":["../src/composables/useToast.ts"],"sourcesContent":["import { wait } from \"@/utilities/functions/wait\";\nimport { reactive } from \"vue\";\nimport { useId } from \"./useId\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type Message = {\n /**\n * Title of the message. Displayed in a more prominant fashion.\n */\n title?: string;\n /**\n * Text content of the toast message.\n */\n text: string;\n /**\n * Name of the icon to display.\n */\n icon?: string;\n /**\n * Theme of the toast message. By default the theme is `default`.\n */\n theme?: string;\n /**\n * Identifier of the message\n */\n id: string;\n} & Pick<CommonProps, \"showClose\">;\n\ntype MessageParameter =\n | string\n | (Pick<Message, \"title\" | \"text\" | \"icon\" | \"theme\"> &\n /* These props are mutually exclusive */\n (| {\n /**\n * Time in milliseconds before the message disappears\n */\n timeout?: undefined;\n /**\n * Setting the message as persistent will prevent the message from being dismissed automatically\n */\n persistent?: undefined | false;\n /**\n * Whether to show the closing action to dismiss the message.\n * Show close is optional if the message is not persistent\n */\n showClose?: Message[\"showClose\"];\n }\n | {\n /**\n * Time in milliseconds before the message disappears\n */\n timeout: number;\n /**\n * Setting the message as persistent will prevent the message from being dismissed automatically\n */\n persistent?: undefined | false;\n /**\n * Whether to show the closing action to dismiss the message.\n * Show close is optional if the message is not persistent\n */\n showClose?: Message[\"showClose\"];\n }\n | {\n /**\n * Time in milliseconds before the message disappears\n */\n timeout?: undefined;\n /**\n * Setting the message as persistent will prevent the message from being dismissed automatically\n */\n persistent: true;\n /**\n * Whether to show the closing action to dismiss the message.\n * Show close is mandatory if the message is persistent\n */\n showClose: true;\n }\n ));\n\nexport const state = reactive({\n stack: [] as Message[],\n});\n\nexport const useToast = () => {\n /**\n * Dismisses a specific message\n */\n const dismiss = (id: Message[\"id\"]) =>\n (state.stack = state.stack.filter((el) => el.id !== id));\n const dismissAll = () => (state.stack = []);\n const toast = (message: MessageParameter) => {\n const id = useId().id.value;\n let title: Message[\"title\"];\n let text: Message[\"text\"];\n let icon: Message[\"icon\"];\n let theme: Message[\"theme\"];\n let showClose: Message[\"showClose\"];\n let defaultTimeout = 6000;\n\n if (typeof message === \"string\") {\n text = message;\n } else {\n if (typeof message.timeout === \"number\" && message.timeout <= 0) {\n throw new Error(`Toast messages cannot have a zero or less timeout`);\n }\n icon = message.icon;\n showClose = message.showClose;\n text = message.text;\n theme = message.theme;\n title = message.title;\n }\n state.stack = state.stack.concat({\n icon,\n id,\n showClose,\n text,\n theme,\n title,\n });\n if (\n (typeof message === \"object\" && !message.persistent) ||\n typeof message === \"string\"\n ) {\n let timeout: number;\n\n if (typeof message === \"object\" && message.timeout) {\n timeout = message.timeout;\n } else timeout = defaultTimeout;\n\n wait(timeout).then(() => {\n dismiss(id);\n });\n }\n return id;\n };\n return {\n toast,\n dismiss,\n dismissAll,\n };\n};\n"],"names":["state","reactive","useToast","dismiss","id","el","message","useId","title","text","icon","theme","showClose","defaultTimeout","timeout","wait"],"mappings":";;;AA+EO,MAAMA,IAAQC,EAAS;AAAA,EAC5B,OAAO,CAAC;AACV,CAAC,GAEYC,IAAW,MAAM;AAI5B,QAAMC,IAAU,CAACC,MACdJ,EAAM,QAAQA,EAAM,MAAM,OAAO,CAACK,MAAOA,EAAG,OAAOD,CAAE;AA+CjD,SAAA;AAAA,IACL,OA9CY,CAACE,MAA8B;AACrC,YAAAF,IAAKG,IAAQ,GAAG;AAClB,UAAAC,GACAC,GACAC,GACAC,GACAC,GACAC,IAAiB;AAEjB,UAAA,OAAOP,KAAY;AACd,QAAAG,IAAAH;AAAA,WACF;AACL,YAAI,OAAOA,EAAQ,WAAY,YAAYA,EAAQ,WAAW;AACtD,gBAAA,IAAI,MAAM,mDAAmD;AAErE,QAAAI,IAAOJ,EAAQ,MACfM,IAAYN,EAAQ,WACpBG,IAAOH,EAAQ,MACfK,IAAQL,EAAQ,OAChBE,IAAQF,EAAQ;AAAA,MAClB;AAUG,UATGN,EAAA,QAAQA,EAAM,MAAM,OAAO;AAAA,QAC/B,MAAAU;AAAA,QACA,IAAAN;AAAA,QACA,WAAAQ;AAAA,QACA,MAAAH;AAAA,QACA,OAAAE;AAAA,QACA,OAAAH;AAAA,MAAA,CACD,GAEE,OAAOF,KAAY,YAAY,CAACA,EAAQ,cACzC,OAAOA,KAAY,UACnB;AACI,YAAAQ;AAEJ,QAAI,OAAOR,KAAY,YAAYA,EAAQ,UACzCQ,IAAUR,EAAQ,UACHQ,IAAAD,GAEZE,EAAAD,CAAO,EAAE,KAAK,MAAM;AACvB,UAAAX,EAAQC,CAAE;AAAA,QAAA,CACX;AAAA,MACH;AACO,aAAAA;AAAA,IAAA;AAAA,IAIP,SAAAD;AAAA,IACA,YAjDiB,MAAOH,EAAM,QAAQ,CAAA;AAAA,EAiDtC;AAEJ;"}
1
+ {"version":3,"file":"index5.js","sources":["../src/composables/useToast.ts"],"sourcesContent":["import { wait } from '@/utilities/functions/wait';\nimport { reactive } from 'vue';\nimport { useId } from './useId';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type Message = {\n\t/**\n\t * Title of the message. Displayed in a more prominant fashion.\n\t */\n\ttitle?: string;\n\t/**\n\t * Text content of the toast message.\n\t */\n\ttext: string;\n\t/**\n\t * Name of the icon to display.\n\t */\n\ticon?: string;\n\t/**\n\t * Theme of the toast message. By default the theme is `default`.\n\t */\n\ttheme?: string;\n\t/**\n\t * Identifier of the message\n\t */\n\tid: string;\n} & Pick<CommonProps, 'showClose'>;\n\ntype MessageParameter =\n\t| string\n\t| (Pick<Message, 'title' | 'text' | 'icon' | 'theme'> &\n\t\t\t/* These props are mutually exclusive */\n\t\t\t(| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout?: undefined;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent?: undefined | false;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is optional if the message is not persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose?: Message['showClose'];\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout: number;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent?: undefined | false;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is optional if the message is not persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose?: Message['showClose'];\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout?: undefined;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent: true;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is mandatory if the message is persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose: true;\n\t\t\t\t }\n\t\t\t));\n\nexport const state = reactive({\n\tstack: [] as Message[],\n});\n\nexport const useToast = () => {\n\t/**\n\t * Dismisses a specific message\n\t */\n\tconst dismiss = (id: Message['id']) =>\n\t\t(state.stack = state.stack.filter((el) => el.id !== id));\n\tconst dismissAll = () => (state.stack = []);\n\tconst toast = (message: MessageParameter) => {\n\t\tconst id = useId().id.value;\n\t\tlet title: Message['title'];\n\t\tlet text: Message['text'];\n\t\tlet icon: Message['icon'];\n\t\tlet theme: Message['theme'];\n\t\tlet showClose: Message['showClose'];\n\t\tconst defaultTimeout = 6000;\n\n\t\tif (typeof message === 'string') {\n\t\t\ttext = message;\n\t\t} else {\n\t\t\tif (typeof message.timeout === 'number' && message.timeout <= 0) {\n\t\t\t\tthrow new Error(`Toast messages cannot have a zero or less timeout`);\n\t\t\t}\n\t\t\ticon = message.icon;\n\t\t\tshowClose = message.showClose;\n\t\t\ttext = message.text;\n\t\t\ttheme = message.theme;\n\t\t\ttitle = message.title;\n\t\t}\n\t\tstate.stack = state.stack.concat({\n\t\t\ticon,\n\t\t\tid,\n\t\t\tshowClose,\n\t\t\ttext,\n\t\t\ttheme,\n\t\t\ttitle,\n\t\t});\n\t\tif (\n\t\t\t(typeof message === 'object' && !message.persistent) ||\n\t\t\ttypeof message === 'string'\n\t\t) {\n\t\t\tlet timeout: number;\n\n\t\t\tif (typeof message === 'object' && message.timeout) {\n\t\t\t\ttimeout = message.timeout;\n\t\t\t} else timeout = defaultTimeout;\n\n\t\t\twait(timeout).then(() => {\n\t\t\t\tdismiss(id);\n\t\t\t});\n\t\t}\n\t\treturn id;\n\t};\n\treturn {\n\t\ttoast,\n\t\tdismiss,\n\t\tdismissAll,\n\t};\n};\n"],"names":["state","reactive","useToast","dismiss","id","el","message","useId","title","text","icon","theme","showClose","defaultTimeout","timeout","wait"],"mappings":";;;AA+EO,MAAMA,IAAQC,EAAS;AAAA,EAC7B,OAAO,CAAC;AACT,CAAC,GAEYC,IAAW,MAAM;AAI7B,QAAMC,IAAU,CAACC,MACfJ,EAAM,QAAQA,EAAM,MAAM,OAAO,CAACK,MAAOA,EAAG,OAAOD,CAAE;AA+ChD,SAAA;AAAA,IACN,OA9Ca,CAACE,MAA8B;AACtC,YAAAF,IAAKG,IAAQ,GAAG;AAClB,UAAAC,GACAC,GACAC,GACAC,GACAC;AACJ,YAAMC,IAAiB;AAEnB,UAAA,OAAOP,KAAY;AACf,QAAAG,IAAAH;AAAA,WACD;AACN,YAAI,OAAOA,EAAQ,WAAY,YAAYA,EAAQ,WAAW;AACvD,gBAAA,IAAI,MAAM,mDAAmD;AAEpE,QAAAI,IAAOJ,EAAQ,MACfM,IAAYN,EAAQ,WACpBG,IAAOH,EAAQ,MACfK,IAAQL,EAAQ,OAChBE,IAAQF,EAAQ;AAAA,MACjB;AAUE,UATIN,EAAA,QAAQA,EAAM,MAAM,OAAO;AAAA,QAChC,MAAAU;AAAA,QACA,IAAAN;AAAA,QACA,WAAAQ;AAAA,QACA,MAAAH;AAAA,QACA,OAAAE;AAAA,QACA,OAAAH;AAAA,MAAA,CACA,GAEC,OAAOF,KAAY,YAAY,CAACA,EAAQ,cACzC,OAAOA,KAAY,UAClB;AACG,YAAAQ;AAEJ,QAAI,OAAOR,KAAY,YAAYA,EAAQ,UAC1CQ,IAAUR,EAAQ,UACFQ,IAAAD,GAEZE,EAAAD,CAAO,EAAE,KAAK,MAAM;AACxB,UAAAX,EAAQC,CAAE;AAAA,QAAA,CACV;AAAA,MACF;AACO,aAAAA;AAAA,IAAA;AAAA,IAIP,SAAAD;AAAA,IACA,YAjDkB,MAAOH,EAAM,QAAQ,CAAA;AAAA,EAiDvC;AAEF;"}
package/dist/index51.js CHANGED
@@ -2,11 +2,11 @@ import { defineComponent as n, openBlock as a, createElementBlock as t, Fragment
2
2
  import h from "./index9.js";
3
3
  import "./index10.js";
4
4
  const B = {
5
- class: "bb-breadcrumbs",
6
- "aria-label": "Breadcrumbs"
5
+ "aria-label": "Breadcrumbs",
6
+ class: "bb-breadcrumbs"
7
7
  }, $ = { class: "bb-breadcrumbs__breadcrumb-container" }, k = {
8
- class: "bb-breadcrumbs__divider",
9
- "aria-hidden": "true"
8
+ "aria-hidden": "true",
9
+ class: "bb-breadcrumbs__divider"
10
10
  }, V = /* @__PURE__ */ n({
11
11
  __name: "BbBreadcrumbs",
12
12
  props: {
@@ -28,8 +28,8 @@ const B = {
28
28
  text: s.text
29
29
  }),
30
30
  p(h, u(s, {
31
- disabled: s.disabled || e.disabled,
32
- class: "bb-breadcrumbs__breadcrumb"
31
+ class: "bb-breadcrumbs__breadcrumb",
32
+ disabled: s.disabled || e.disabled
33
33
  }), {
34
34
  default: c(() => [
35
35
  r(e.$slots, `${s.key}`, {
@@ -1 +1 @@
1
- {"version":3,"file":"index51.js","sources":["../src/components/BbBreadcrumbs/BbBreadcrumbs.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = {\n class: \"bb-breadcrumbs\",\n \"aria-label\": \"Breadcrumbs\"\n}\nconst _hoisted_2 = { class: \"bb-breadcrumbs__breadcrumb-container\" }\nconst _hoisted_3 = {\n class: \"bb-breadcrumbs__divider\",\n \"aria-hidden\": \"true\"\n}\n\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\nimport type { BaseButtonProps } from \"../BaseButton/BaseButton.vue\";\n\nexport type Item = Omit<BaseButtonProps, \"block\" | \"tag\" | \"type\"> & {\n /**\n * Click handler of the button\n */\n onClick?: (...args: any[]) => any;\n /**\n * Key that uniquely identifies the breadcrumb\n */\n key: string | number;\n};\n\nexport type BbBreadcrumbsProps = Pick<CommonProps, 'disabled'> & {\n /**\n * Array of items that describe how the breadcrumbs \n * should behave. It is compatible with navigating \n * through `a` or `router-link`.\n */\n items: Item[];\n /**\n * Text content of the divider\n */\n divider?: string;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbBreadcrumbs',\n props: {\n disabled: { type: Boolean },\n items: {},\n divider: { default: \"/\" }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"nav\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.items, (item, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.key\n }, [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, `item:prepend`, {\n disabled: !!(item.disabled || _ctx.disabled),\n index: index,\n item: _ctx.items[index],\n text: item.text\n }),\n _createVNode(BaseButton, _mergeProps(item, {\n disabled: item.disabled || _ctx.disabled,\n class: \"bb-breadcrumbs__breadcrumb\"\n }), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, `${item.key}`, {\n disabled: !!(item.disabled || _ctx.disabled),\n index: index,\n item: _ctx.items[index],\n text: item.text\n })\n ]),\n _: 2\n }, 1040, [\"disabled\"]),\n _renderSlot(_ctx.$slots, `item:append`, {\n disabled: !!(item.disabled || _ctx.disabled),\n index: index,\n item: _ctx.items[index],\n text: item.text\n })\n ]),\n _createElementVNode(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"divider\", {}, () => [\n _createTextVNode(_toDisplayString(props.divider), 1)\n ])\n ])\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","props","_ctx","_cache","_openBlock","_createElementBlock","_Fragment","_renderList","item","index","_createElementVNode","_renderSlot","_createVNode","BaseButton","_mergeProps","_withCtx","_createTextVNode","_toDisplayString"],"mappings":";;;AAGA,MAAMA,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,cAAc;AAChB,GACMC,IAAa,EAAE,OAAO,0CACtBC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,eAAe;AACjB,GA+B4BC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,CAAC;AAAA,IACR,SAAS,EAAE,SAAS,IAAI;AAAA,EAC1B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD;AAIP,WAAA,CAACE,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOV,GAAY;AAAA,OAC1DS,EAAW,EAAI,GAAGC,EAAoBC,GAAW,MAAMC,EAAYL,EAAK,OAAO,CAACM,GAAMC,OAC7EL,EAAA,GAAcC,EAAoBC,GAAW;AAAA,QACnD,KAAKE,EAAK;AAAA,MAAA,GACT;AAAA,QACDE,EAAoB,QAAQd,GAAY;AAAA,UACtCe,EAAYT,EAAK,QAAQ,gBAAgB;AAAA,YACvC,UAAU,CAAC,EAAEM,EAAK,YAAYN,EAAK;AAAA,YACnC,OAAAO;AAAA,YACA,MAAMP,EAAK,MAAMO,CAAK;AAAA,YACtB,MAAMD,EAAK;AAAA,UAAA,CACZ;AAAA,UACDI,EAAaC,GAAYC,EAAYN,GAAM;AAAA,YACzC,UAAUA,EAAK,YAAYN,EAAK;AAAA,YAChC,OAAO;AAAA,UAAA,CACR,GAAG;AAAA,YACF,SAASa,EAAS,MAAM;AAAA,cACtBJ,EAAYT,EAAK,QAAQ,GAAGM,EAAK,GAAG,IAAI;AAAA,gBACtC,UAAU,CAAC,EAAEA,EAAK,YAAYN,EAAK;AAAA,gBACnC,OAAAO;AAAA,gBACA,MAAMP,EAAK,MAAMO,CAAK;AAAA,gBACtB,MAAMD,EAAK;AAAA,cAAA,CACZ;AAAA,YAAA,CACF;AAAA,YACD,GAAG;AAAA,UAAA,GACF,MAAM,CAAC,UAAU,CAAC;AAAA,UACrBG,EAAYT,EAAK,QAAQ,eAAe;AAAA,YACtC,UAAU,CAAC,EAAEM,EAAK,YAAYN,EAAK;AAAA,YACnC,OAAAO;AAAA,YACA,MAAMP,EAAK,MAAMO,CAAK;AAAA,YACtB,MAAMD,EAAK;AAAA,UAAA,CACZ;AAAA,QAAA,CACF;AAAA,QACDE,EAAoB,QAAQb,GAAY;AAAA,UACtCc,EAAYT,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,YAC5Cc,EAAiBC,EAAiBhB,EAAM,OAAO,GAAG,CAAC;AAAA,UAAA,CACpD;AAAA,QAAA,CACF;AAAA,SACA,EAAE,EACN,GAAG,GAAG;AAAA,IAAA,CACR;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index51.js","sources":["../src/components/BbBreadcrumbs/BbBreadcrumbs.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = {\n \"aria-label\": \"Breadcrumbs\",\n class: \"bb-breadcrumbs\"\n}\nconst _hoisted_2 = { class: \"bb-breadcrumbs__breadcrumb-container\" }\nconst _hoisted_3 = {\n \"aria-hidden\": \"true\",\n class: \"bb-breadcrumbs__divider\"\n}\n\nimport type { CommonProps } from '@/types/CommonProps';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the button\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key that uniquely identifies the breadcrumb\n\t */\n\tkey: string | number;\n};\n\nexport type BbBreadcrumbsProps = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Array of items that describe how the breadcrumbs\n\t * should behave. It is compatible with navigating\n\t * through `a` or `router-link`.\n\t */\n\titems: Item[];\n\t/**\n\t * Text content of the divider\n\t */\n\tdivider?: string;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbBreadcrumbs',\n props: {\n disabled: { type: Boolean },\n items: {},\n divider: { default: '/' }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"nav\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.items, (item, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.key\n }, [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, `item:prepend`, {\n disabled: !!(item.disabled || _ctx.disabled),\n index: index,\n item: _ctx.items[index],\n text: item.text\n }),\n _createVNode(BaseButton, _mergeProps(item, {\n class: \"bb-breadcrumbs__breadcrumb\",\n disabled: item.disabled || _ctx.disabled\n }), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, `${item.key}`, {\n disabled: !!(item.disabled || _ctx.disabled),\n index: index,\n item: _ctx.items[index],\n text: item.text\n })\n ]),\n _: 2\n }, 1040, [\"disabled\"]),\n _renderSlot(_ctx.$slots, `item:append`, {\n disabled: !!(item.disabled || _ctx.disabled),\n index: index,\n item: _ctx.items[index],\n text: item.text\n })\n ]),\n _createElementVNode(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, \"divider\", {}, () => [\n _createTextVNode(_toDisplayString(props.divider), 1)\n ])\n ])\n ], 64))\n }), 128))\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","props","_ctx","_cache","_openBlock","_createElementBlock","_Fragment","_renderList","item","index","_createElementVNode","_renderSlot","_createVNode","BaseButton","_mergeProps","_withCtx","_createTextVNode","_toDisplayString"],"mappings":";;;AAGA,MAAMA,IAAa;AAAA,EACjB,cAAc;AAAA,EACd,OAAO;AACT,GACMC,IAAa,EAAE,OAAO,0CACtBC,IAAa;AAAA,EACjB,eAAe;AAAA,EACf,OAAO;AACT,GA+B4BC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,CAAC;AAAA,IACR,SAAS,EAAE,SAAS,IAAI;AAAA,EAC1B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD;AAIP,WAAA,CAACE,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOV,GAAY;AAAA,OAC1DS,EAAW,EAAI,GAAGC,EAAoBC,GAAW,MAAMC,EAAYL,EAAK,OAAO,CAACM,GAAMC,OAC7EL,EAAA,GAAcC,EAAoBC,GAAW;AAAA,QACnD,KAAKE,EAAK;AAAA,MAAA,GACT;AAAA,QACDE,EAAoB,QAAQd,GAAY;AAAA,UACtCe,EAAYT,EAAK,QAAQ,gBAAgB;AAAA,YACvC,UAAU,CAAC,EAAEM,EAAK,YAAYN,EAAK;AAAA,YACnC,OAAAO;AAAA,YACA,MAAMP,EAAK,MAAMO,CAAK;AAAA,YACtB,MAAMD,EAAK;AAAA,UAAA,CACZ;AAAA,UACDI,EAAaC,GAAYC,EAAYN,GAAM;AAAA,YACzC,OAAO;AAAA,YACP,UAAUA,EAAK,YAAYN,EAAK;AAAA,UAAA,CACjC,GAAG;AAAA,YACF,SAASa,EAAS,MAAM;AAAA,cACtBJ,EAAYT,EAAK,QAAQ,GAAGM,EAAK,GAAG,IAAI;AAAA,gBACtC,UAAU,CAAC,EAAEA,EAAK,YAAYN,EAAK;AAAA,gBACnC,OAAAO;AAAA,gBACA,MAAMP,EAAK,MAAMO,CAAK;AAAA,gBACtB,MAAMD,EAAK;AAAA,cAAA,CACZ;AAAA,YAAA,CACF;AAAA,YACD,GAAG;AAAA,UAAA,GACF,MAAM,CAAC,UAAU,CAAC;AAAA,UACrBG,EAAYT,EAAK,QAAQ,eAAe;AAAA,YACtC,UAAU,CAAC,EAAEM,EAAK,YAAYN,EAAK;AAAA,YACnC,OAAAO;AAAA,YACA,MAAMP,EAAK,MAAMO,CAAK;AAAA,YACtB,MAAMD,EAAK;AAAA,UAAA,CACZ;AAAA,QAAA,CACF;AAAA,QACDE,EAAoB,QAAQb,GAAY;AAAA,UACtCc,EAAYT,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,YAC5Cc,EAAiBC,EAAiBhB,EAAM,OAAO,GAAG,CAAC;AAAA,UAAA,CACpD;AAAA,QAAA,CACF;AAAA,SACA,EAAE,EACN,GAAG,GAAG;AAAA,IAAA,CACR;AAAA,EAEH;AAEA,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index53.js","sources":["../src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport type { BaseButtonProps } from \"../BaseButton/BaseButton.vue\"\nimport { BaseButton } from \"@/index\";\n\nexport type BbButtonProps = BaseButtonProps;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbButton',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n text: {},\n tag: {},\n activeClass: {},\n ariaCurrentValue: {},\n exactActiveClass: {},\n replace: { type: Boolean },\n to: {},\n data: {},\n headers: {},\n method: {},\n onBefore: { type: Function },\n onCancel: { type: Function },\n onCancelToken: { type: Function },\n onFinish: { type: Function },\n only: {},\n onProgress: { type: Function },\n onStart: { type: Function },\n onSuccess: { type: Function },\n preserveScroll: { type: [Boolean, Function] },\n preserveState: { type: [Boolean, Function, null] },\n queryStringArrayFormat: {},\n type: {},\n href: {},\n target: {}\n },\n setup(__props: any) {\n\n\n\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_unref(BaseButton), _mergeProps(_ctx.$props, { class: \"bb-button\" }), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","_ctx","_cache","_openBlock","_createBlock","_unref","BaseButton","_mergeProps","_withCtx","_renderSlot"],"mappings":";;;AAQA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,CAAC;AAAA,IACP,KAAK,CAAC;AAAA,IACN,aAAa,CAAC;AAAA,IACd,kBAAkB,CAAC;AAAA,IACnB,kBAAkB,CAAC;AAAA,IACnB,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,SAAS,CAAC;AAAA,IACV,QAAQ,CAAC;AAAA,IACT,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,eAAe,EAAE,MAAM,SAAS;AAAA,IAChC,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,MAAM,CAAC;AAAA,IACP,YAAY,EAAE,MAAM,SAAS;AAAA,IAC7B,SAAS,EAAE,MAAM,SAAS;AAAA,IAC1B,WAAW,EAAE,MAAM,SAAS;AAAA,IAC5B,gBAAgB,EAAE,MAAM,CAAC,SAAS,QAAQ,EAAE;AAAA,IAC5C,eAAe,EAAE,MAAM,CAAC,SAAS,UAAU,IAAI,EAAE;AAAA,IACjD,wBAAwB,CAAC;AAAA,IACzB,MAAM,CAAC;AAAA,IACP,MAAM,CAAC;AAAA,IACP,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,MAAMC,GAAc;AAOf,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAaC,EAAOC,CAAU,GAAGC,EAAYN,EAAK,QAAQ,EAAE,OAAO,YAAa,CAAA,GAAG;AAAA,MACvG,SAASO,EAAS,MAAM;AAAA,QACtBC,EAAYR,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,MACD,GAAG;AAAA,OACF,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index53.js","sources":["../src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport { BaseButton } from '@/index';\n\nexport type BbButtonProps = BaseButtonProps;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbButton',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n text: {},\n tag: {},\n activeClass: {},\n ariaCurrentValue: {},\n exactActiveClass: {},\n replace: { type: Boolean },\n to: {},\n data: {},\n headers: {},\n method: {},\n onBefore: { type: Function },\n onCancel: { type: Function },\n onCancelToken: { type: Function },\n onFinish: { type: Function },\n only: {},\n onProgress: { type: Function },\n onStart: { type: Function },\n onSuccess: { type: Function },\n preserveScroll: { type: [Boolean, Function] },\n preserveState: { type: [Boolean, Function, null] },\n queryStringArrayFormat: {},\n type: {},\n href: {},\n target: {}\n },\n setup(__props: any) {\n\n\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_unref(BaseButton), _mergeProps(_ctx.$props, { class: \"bb-button\" }), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","_ctx","_cache","_openBlock","_createBlock","_unref","BaseButton","_mergeProps","_withCtx","_renderSlot"],"mappings":";;;AAQA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,CAAC;AAAA,IACP,KAAK,CAAC;AAAA,IACN,aAAa,CAAC;AAAA,IACd,kBAAkB,CAAC;AAAA,IACnB,kBAAkB,CAAC;AAAA,IACnB,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,SAAS,CAAC;AAAA,IACV,QAAQ,CAAC;AAAA,IACT,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,eAAe,EAAE,MAAM,SAAS;AAAA,IAChC,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,MAAM,CAAC;AAAA,IACP,YAAY,EAAE,MAAM,SAAS;AAAA,IAC7B,SAAS,EAAE,MAAM,SAAS;AAAA,IAC1B,WAAW,EAAE,MAAM,SAAS;AAAA,IAC5B,gBAAgB,EAAE,MAAM,CAAC,SAAS,QAAQ,EAAE;AAAA,IAC5C,eAAe,EAAE,MAAM,CAAC,SAAS,UAAU,IAAI,EAAE;AAAA,IACjD,wBAAwB,CAAC;AAAA,IACzB,MAAM,CAAC;AAAA,IACP,MAAM,CAAC;AAAA,IACP,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,MAAMC,GAAc;AAMf,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAaC,EAAOC,CAAU,GAAGC,EAAYN,EAAK,QAAQ,EAAE,OAAO,YAAa,CAAA,GAAG;AAAA,MACvG,SAASO,EAAS,MAAM;AAAA,QACtBC,EAAYR,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,MACD,GAAG;AAAA,OACF,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index55.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as m, openBlock as p, createBlock as b, withCtx as l, renderSlot as r, normalizeProps as c, guardReactiveProps as h, createVNode as f, mergeProps as n } from "vue";
2
- import V from "./index11.js";
2
+ import k from "./index11.js";
3
3
  import "./index12.js";
4
- import k from "./index21.js";
4
+ import v from "./index21.js";
5
5
  import "./index22.js";
6
- const E = /* @__PURE__ */ m({
6
+ const $ = /* @__PURE__ */ m({
7
7
  __name: "BbCheckbox",
8
8
  props: {
9
9
  autofocus: {},
@@ -40,17 +40,17 @@ const E = /* @__PURE__ */ m({
40
40
  onMouseup: (e) => o("mouseup", e),
41
41
  "onUpdate:modelValue": (e) => o("update:modelValue", e)
42
42
  };
43
- return (e, P) => (p(), b(k, {
43
+ return (e, V) => (p(), b(v, {
44
+ id: e.id,
44
45
  class: "bb-checkbox",
45
46
  direction: e.direction,
46
47
  errors: e.errors,
47
- hasErrors: e.hasErrors,
48
- hideLabel: e.hideLabel,
49
- id: e.id,
50
- inputPosition: e.inputPosition,
48
+ "has-errors": e.hasErrors,
49
+ "hide-label": e.hideLabel,
50
+ "input-position": e.inputPosition,
51
51
  label: e.label,
52
- labelPosition: e.labelPosition,
53
- labelTag: "span",
52
+ "label-position": e.labelPosition,
53
+ "label-tag": "span",
54
54
  name: e.name,
55
55
  reverse: e.reverse,
56
56
  tag: "label"
@@ -59,32 +59,32 @@ const E = /* @__PURE__ */ m({
59
59
  r(e.$slots, "label", c(h(a)))
60
60
  ]),
61
61
  input: l(({ id: a, name: u, hasErrors: t }) => [
62
- f(V, n({
62
+ f(k, n({
63
+ id: a,
63
64
  autofocus: e.autofocus,
64
65
  checked: e.checked,
65
66
  color: e.color,
66
67
  disabled: e.disabled,
67
- hasErrors: t,
68
- id: a,
68
+ "false-value": e.falseValue,
69
+ "has-errors": t,
69
70
  indeterminate: e.indeterminate,
70
- modelValue: e.modelValue,
71
+ "model-value": e.modelValue,
71
72
  name: u,
72
73
  readonly: e.readonly,
73
- submitWhenFalse: e.submitWhenFalse,
74
- trueValue: e.trueValue,
75
- falseValue: e.falseValue
74
+ "submit-when-false": e.submitWhenFalse,
75
+ "true-value": e.trueValue
76
76
  }, i), {
77
77
  icon: l((d) => [
78
78
  r(e.$slots, "icon", n(d, { text: e.label }))
79
79
  ]),
80
80
  _: 2
81
- }, 1040, ["autofocus", "checked", "color", "disabled", "hasErrors", "id", "indeterminate", "modelValue", "name", "readonly", "submitWhenFalse", "trueValue", "falseValue"])
81
+ }, 1040, ["id", "autofocus", "checked", "color", "disabled", "false-value", "has-errors", "indeterminate", "model-value", "name", "readonly", "submit-when-false", "true-value"])
82
82
  ]),
83
83
  _: 3
84
- }, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "inputPosition", "label", "labelPosition", "name", "reverse"]));
84
+ }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "input-position", "label", "label-position", "name", "reverse"]));
85
85
  }
86
86
  });
87
87
  export {
88
- E as default
88
+ $ as default
89
89
  };
90
90
  //# sourceMappingURL=index55.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index55.js","sources":["../src/components/BbCheckbox/BbCheckbox.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, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseCheckbox from \"../BaseCheckbox/BaseCheckbox.vue\";\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport type { BaseCheckboxEvents, SlotAttributes } from \"../BaseCheckbox/BaseCheckbox.vue\";\nimport type { HTMLAttributes, InputHTMLAttributes } from \"vue\";\n\nexport type BbCheckboxProps = {\n /**\n * Sets autofocus on page load.\n */\n autofocus?: InputHTMLAttributes[\"autofocus\"];\n\n /**\n * Defines the input as checked\n */\n checked?: InputHTMLAttributes[\"checked\"];\n\n /**\n * Define a color for the component.\n *\n * Either a custom color or a coded color in common HEX, RGB, etc... format.\n */\n color?: string;\n\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * Value of the input when unchecked. It handles any kind of serializable object.\n */\n falseValue?: any;\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 * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Sets the input in an indeterminate state.\n */\n indeterminate?: InputHTMLAttributes[\"indeterminate\"];\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n\n /**\n * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n */\n submitWhenFalse?: boolean;\n\n /**\n * Value of the input when checked. It handles any kind of serializable object.\n */\n trueValue?: any;\n\n /**\n * Used by v-model. Can be any serializable type.\n */\n modelValue?: any;\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 * Can be a string or an array of string containing the messages to display.\n */\n errors?: string | string[];\n\n /**\n * Visually hides the label of the input while maintaining accessibility.\n */\n hideLabel?: boolean;\n\n /**\n * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n */\n inputPosition?: \"left\" | \"center\" | \"right\";\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 * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n */\n reverse?: boolean;\n};\n\nexport type BbCheckboxEvents = BaseCheckboxEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCheckbox',\n props: {\n autofocus: {},\n checked: {},\n color: {},\n disabled: { type: Boolean },\n falseValue: {},\n hasErrors: { type: Boolean },\n id: {},\n indeterminate: {},\n name: {},\n readonly: {},\n submitWhenFalse: { type: Boolean },\n trueValue: {},\n modelValue: {},\n direction: { default: \"auto\" },\n errors: {},\n hideLabel: { type: Boolean },\n inputPosition: {},\n label: {},\n labelPosition: {},\n reverse: { type: Boolean, default: true }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-checkbox\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n labelTag: 'span',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'label'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseCheckbox, _mergeProps({\n autofocus: _ctx.autofocus,\n checked: _ctx.checked,\n color: _ctx.color,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n indeterminate: _ctx.indeterminate,\n modelValue: _ctx.modelValue,\n name: name,\n readonly: _ctx.readonly,\n submitWhenFalse: _ctx.submitWhenFalse,\n trueValue: _ctx.trueValue,\n falseValue: _ctx.falseValue\n }, eventListeners), {\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps(data, { text: _ctx.label }))\n ]),\n _: 2\n }, 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"hasErrors\", \"id\", \"indeterminate\", \"modelValue\", \"name\", \"readonly\", \"submitWhenFalse\", \"trueValue\", \"falseValue\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseCheckbox","_mergeProps"],"mappings":";;;;;AAoHA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,SAAS,CAAC;AAAA,IACV,OAAO,CAAC;AAAA,IACR,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,YAAY,CAAC;AAAA,IACb,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,CAAC;AAAA,IAChB,MAAM,CAAC;AAAA,IACP,UAAU,CAAC;AAAA,IACX,iBAAiB,EAAE,MAAM,QAAQ;AAAA,IACjC,WAAW,CAAC;AAAA,IACZ,YAAY,CAAC;AAAA,IACb,WAAW,EAAE,SAAS,OAAO;AAAA,IAC7B,QAAQ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AAS;AAAA,QACxBC,EAAYP,EAAK,QAAQ,SAASQ,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC7E;AAAA,MACD,OAAOD,EAAS,CAAC,EAAE,IAAAK,GAAI,MAAAC,GAAM,WAAAC,QAAgB;AAAA,QAC3CC,EAAaC,GAAcC,EAAY;AAAA,UACrC,WAAWf,EAAK;AAAA,UAChB,SAASA,EAAK;AAAA,UACd,OAAOA,EAAK;AAAA,UACZ,UAAUA,EAAK;AAAA,UACf,WAAAY;AAAA,UACA,IAAAF;AAAA,UACA,eAAeV,EAAK;AAAA,UACpB,YAAYA,EAAK;AAAA,UACjB,MAAAW;AAAA,UACA,UAAUX,EAAK;AAAA,UACf,iBAAiBA,EAAK;AAAA,UACtB,WAAWA,EAAK;AAAA,UAChB,YAAYA,EAAK;AAAA,QACnB,GAAGH,CAAc,GAAG;AAAA,UAClB,MAAMQ,EAAS,CAACC,MAAS;AAAA,YACvBC,EAAYP,EAAK,QAAQ,QAAQe,EAAYT,GAAM,EAAE,MAAMN,EAAK,MAAM,CAAC,CAAC;AAAA,UAAA,CACzE;AAAA,UACD,GAAG;AAAA,QAAA,GACF,MAAM,CAAC,aAAa,WAAW,SAAS,YAAY,aAAa,MAAM,iBAAiB,cAAc,QAAQ,YAAY,mBAAmB,aAAa,YAAY,CAAC;AAAA,MAAA,CAC3K;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,iBAAiB,SAAS,iBAAiB,QAAQ,SAAS,CAAC;AAAA,EAE7H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index55.js","sources":["../src/components/BbCheckbox/BbCheckbox.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, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseCheckbox from '../BaseCheckbox/BaseCheckbox.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type {\n\tBaseCheckboxEvents,\n\tSlotAttributes,\n} from '../BaseCheckbox/BaseCheckbox.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BbCheckboxProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\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 * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\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 * 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 * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\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 * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nexport type BbCheckboxEvents = BaseCheckboxEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCheckbox',\n props: {\n autofocus: {},\n checked: {},\n color: {},\n disabled: { type: Boolean },\n falseValue: {},\n hasErrors: { type: Boolean },\n id: {},\n indeterminate: {},\n name: {},\n readonly: {},\n submitWhenFalse: { type: Boolean },\n trueValue: {},\n modelValue: {},\n direction: { default: 'auto' },\n errors: {},\n hideLabel: { type: Boolean },\n inputPosition: {},\n label: {},\n labelPosition: {},\n reverse: { type: Boolean, default: true }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n id: _ctx.id,\n class: \"bb-checkbox\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLabel,\n \"input-position\": _ctx.inputPosition,\n label: _ctx.label,\n \"label-position\": _ctx.labelPosition,\n \"label-tag\": 'span',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'label'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseCheckbox, _mergeProps({\n id: id,\n autofocus: _ctx.autofocus,\n checked: _ctx.checked,\n color: _ctx.color,\n disabled: _ctx.disabled,\n \"false-value\": _ctx.falseValue,\n \"has-errors\": hasErrors,\n indeterminate: _ctx.indeterminate,\n \"model-value\": _ctx.modelValue,\n name: name,\n readonly: _ctx.readonly,\n \"submit-when-false\": _ctx.submitWhenFalse,\n \"true-value\": _ctx.trueValue\n }, eventListeners), {\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps(data, { text: _ctx.label }))\n ]),\n _: 2\n }, 1040, [\"id\", \"autofocus\", \"checked\", \"color\", \"disabled\", \"false-value\", \"has-errors\", \"indeterminate\", \"model-value\", \"name\", \"readonly\", \"submit-when-false\", \"true-value\"])\n ]),\n _: 3\n }, 8, [\"id\", \"direction\", \"errors\", \"has-errors\", \"hide-label\", \"input-position\", \"label\", \"label-position\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseCheckbox","_mergeProps"],"mappings":";;;;;AAuHA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,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