bitboss-ui 0.2.30 → 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 (333) 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 +12 -12
  50. package/dist/components/BbTable/types.d.ts +108 -108
  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 +53 -58
  66. package/dist/index101.js.map +1 -1
  67. package/dist/index103.js +18 -18
  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 +2 -2
  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 +1 -1
  92. package/dist/index121.js.map +1 -1
  93. package/dist/index122.js.map +1 -1
  94. package/dist/index124.js.map +1 -1
  95. package/dist/index125.js +4 -4
  96. package/dist/index125.js.map +1 -1
  97. package/dist/index126.js +1 -1
  98. package/dist/index126.js.map +1 -1
  99. package/dist/index127.js +1 -1
  100. package/dist/index128.js +4 -1
  101. package/dist/index128.js.map +1 -1
  102. package/dist/index129.js.map +1 -1
  103. package/dist/index13.js +11 -11
  104. package/dist/index13.js.map +1 -1
  105. package/dist/index130.js.map +1 -1
  106. package/dist/index131.js +2 -2
  107. package/dist/index15.js +229 -227
  108. package/dist/index15.js.map +1 -1
  109. package/dist/index17.js +61 -62
  110. package/dist/index17.js.map +1 -1
  111. package/dist/index19.js +22 -22
  112. package/dist/index19.js.map +1 -1
  113. package/dist/index196.js +2 -5
  114. package/dist/index196.js.map +1 -1
  115. package/dist/index197.js +2 -16
  116. package/dist/index197.js.map +1 -1
  117. package/dist/index198.js +4 -16
  118. package/dist/index198.js.map +1 -1
  119. package/dist/index199.js +294 -18
  120. package/dist/index199.js.map +1 -1
  121. package/dist/index2.js +23 -23
  122. package/dist/index2.js.map +1 -1
  123. package/dist/index200.js +13 -17
  124. package/dist/index200.js.map +1 -1
  125. package/dist/index201.js +13 -26
  126. package/dist/index201.js.map +1 -1
  127. package/dist/index202.js +19 -8
  128. package/dist/index202.js.map +1 -1
  129. package/dist/index203.js +20 -2
  130. package/dist/index203.js.map +1 -1
  131. package/dist/index204.js +29 -3
  132. package/dist/index204.js.map +1 -1
  133. package/dist/index205.js +8 -35
  134. package/dist/index205.js.map +1 -1
  135. package/dist/index206.js +2 -6
  136. package/dist/index206.js.map +1 -1
  137. package/dist/index207.js +235 -2
  138. package/dist/index207.js.map +1 -1
  139. package/dist/index208.js +3 -4
  140. package/dist/index208.js.map +1 -1
  141. package/dist/index209.js +33 -376
  142. package/dist/index209.js.map +1 -1
  143. package/dist/index21.js +4 -4
  144. package/dist/index21.js.map +1 -1
  145. package/dist/index210.js +6 -2
  146. package/dist/index210.js.map +1 -1
  147. package/dist/index211.js +8 -371
  148. package/dist/index211.js.map +1 -1
  149. package/dist/index212.js +378 -2
  150. package/dist/index212.js.map +1 -1
  151. package/dist/index213.js +134 -3
  152. package/dist/index213.js.map +1 -1
  153. package/dist/index214.js +2 -3
  154. package/dist/index214.js.map +1 -1
  155. package/dist/index215.js +174 -2
  156. package/dist/index215.js.map +1 -1
  157. package/dist/index216.js +23 -2
  158. package/dist/index216.js.map +1 -1
  159. package/dist/index217.js +365 -126
  160. package/dist/index217.js.map +1 -1
  161. package/dist/index218.js +3 -174
  162. package/dist/index218.js.map +1 -1
  163. package/dist/index219.js +3 -23
  164. package/dist/index219.js.map +1 -1
  165. package/dist/index220.js +2 -10
  166. package/dist/index220.js.map +1 -1
  167. package/dist/index221.js +26 -233
  168. package/dist/index221.js.map +1 -1
  169. package/dist/index222.js +16 -8
  170. package/dist/index222.js.map +1 -1
  171. package/dist/index223.js +2 -121
  172. package/dist/index223.js.map +1 -1
  173. package/dist/index224.js +8 -27
  174. package/dist/index224.js.map +1 -1
  175. package/dist/index225.js +120 -12
  176. package/dist/index225.js.map +1 -1
  177. package/dist/index226.js +1 -1
  178. package/dist/index227.js +3 -434
  179. package/dist/index227.js.map +1 -1
  180. package/dist/index228.js +2 -89
  181. package/dist/index228.js.map +1 -1
  182. package/dist/index229.js +6 -200
  183. package/dist/index229.js.map +1 -1
  184. package/dist/index23.js +15 -17
  185. package/dist/index23.js.map +1 -1
  186. package/dist/index230.js +2 -295
  187. package/dist/index230.js.map +1 -1
  188. package/dist/index231.js +2 -6
  189. package/dist/index231.js.map +1 -1
  190. package/dist/index232.js +2 -2
  191. package/dist/index236.js +435 -2
  192. package/dist/index236.js.map +1 -1
  193. package/dist/index237.js +89 -2
  194. package/dist/index237.js.map +1 -1
  195. package/dist/index238.js +199 -3
  196. package/dist/index238.js.map +1 -1
  197. package/dist/index239.js +218 -111
  198. package/dist/index239.js.map +1 -1
  199. package/dist/index240.js +246 -94
  200. package/dist/index240.js.map +1 -1
  201. package/dist/index241.js +2 -2
  202. package/dist/index241.js.map +1 -1
  203. package/dist/index242.js +111 -218
  204. package/dist/index242.js.map +1 -1
  205. package/dist/index243.js +94 -246
  206. package/dist/index243.js.map +1 -1
  207. package/dist/index244.js +17 -19
  208. package/dist/index244.js.map +1 -1
  209. package/dist/index246.js +9 -9
  210. package/dist/index246.js.map +1 -1
  211. package/dist/index247.js +4 -1
  212. package/dist/index247.js.map +1 -1
  213. package/dist/index248.js +2 -2
  214. package/dist/index249.js +37 -14
  215. package/dist/index249.js.map +1 -1
  216. package/dist/index25.js +4 -4
  217. package/dist/index25.js.map +1 -1
  218. package/dist/index250.js +2 -38
  219. package/dist/index250.js.map +1 -1
  220. package/dist/index251.js +2 -2
  221. package/dist/index251.js.map +1 -1
  222. package/dist/index252.js +15 -2
  223. package/dist/index252.js.map +1 -1
  224. package/dist/index253.js +3 -2
  225. package/dist/index253.js.map +1 -1
  226. package/dist/index255.js +2 -3
  227. package/dist/index255.js.map +1 -1
  228. package/dist/index27.js +7 -7
  229. package/dist/index27.js.map +1 -1
  230. package/dist/index29.js +15 -15
  231. package/dist/index29.js.map +1 -1
  232. package/dist/index3.js +2 -1
  233. package/dist/index3.js.map +1 -1
  234. package/dist/index31.js +29 -29
  235. package/dist/index31.js.map +1 -1
  236. package/dist/index33.js +11 -12
  237. package/dist/index33.js.map +1 -1
  238. package/dist/index35.js +2 -2
  239. package/dist/index35.js.map +1 -1
  240. package/dist/index37.js +12 -12
  241. package/dist/index37.js.map +1 -1
  242. package/dist/index39.js +5 -7
  243. package/dist/index39.js.map +1 -1
  244. package/dist/index4.js.map +1 -1
  245. package/dist/index41.js +5 -5
  246. package/dist/index41.js.map +1 -1
  247. package/dist/index43.js +19 -16
  248. package/dist/index43.js.map +1 -1
  249. package/dist/index45.js +9 -9
  250. package/dist/index45.js.map +1 -1
  251. package/dist/index47.js +4 -4
  252. package/dist/index47.js.map +1 -1
  253. package/dist/index49.js +1 -1
  254. package/dist/index49.js.map +1 -1
  255. package/dist/index5.js +7 -6
  256. package/dist/index5.js.map +1 -1
  257. package/dist/index51.js +6 -6
  258. package/dist/index51.js.map +1 -1
  259. package/dist/index53.js.map +1 -1
  260. package/dist/index55.js +20 -20
  261. package/dist/index55.js.map +1 -1
  262. package/dist/index57.js +35 -35
  263. package/dist/index57.js.map +1 -1
  264. package/dist/index59.js +8 -8
  265. package/dist/index59.js.map +1 -1
  266. package/dist/index6.js +38 -38
  267. package/dist/index6.js.map +1 -1
  268. package/dist/index61.js +27 -27
  269. package/dist/index61.js.map +1 -1
  270. package/dist/index63.js +4 -4
  271. package/dist/index63.js.map +1 -1
  272. package/dist/index65.js +20 -20
  273. package/dist/index65.js.map +1 -1
  274. package/dist/index67.js +26 -26
  275. package/dist/index67.js.map +1 -1
  276. package/dist/index69.js +21 -19
  277. package/dist/index69.js.map +1 -1
  278. package/dist/index7.js.map +1 -1
  279. package/dist/index71.js +2 -2
  280. package/dist/index71.js.map +1 -1
  281. package/dist/index72.js +3 -3
  282. package/dist/index72.js.map +1 -1
  283. package/dist/index73.js +14 -14
  284. package/dist/index73.js.map +1 -1
  285. package/dist/index75.js +18 -18
  286. package/dist/index75.js.map +1 -1
  287. package/dist/index77.js +11 -11
  288. package/dist/index77.js.map +1 -1
  289. package/dist/index79.js +15 -15
  290. package/dist/index79.js.map +1 -1
  291. package/dist/index8.js +10 -7
  292. package/dist/index8.js.map +1 -1
  293. package/dist/index81.js +1 -1
  294. package/dist/index81.js.map +1 -1
  295. package/dist/index83.js +20 -20
  296. package/dist/index83.js.map +1 -1
  297. package/dist/index85.js +34 -34
  298. package/dist/index85.js.map +1 -1
  299. package/dist/index87.js +18 -18
  300. package/dist/index87.js.map +1 -1
  301. package/dist/index89.js.map +1 -1
  302. package/dist/index9.js.map +1 -1
  303. package/dist/index91.js +53 -53
  304. package/dist/index91.js.map +1 -1
  305. package/dist/index93.js +16 -16
  306. package/dist/index93.js.map +1 -1
  307. package/dist/index95.js +21 -21
  308. package/dist/index95.js.map +1 -1
  309. package/dist/index97.js +37 -37
  310. package/dist/index97.js.map +1 -1
  311. package/dist/index99.js +18 -18
  312. package/dist/index99.js.map +1 -1
  313. package/dist/style.css +1 -1
  314. package/dist/types/CommonProps.d.ts +18 -18
  315. package/dist/types/ExtractGenericFromComputedRef.d.ts +1 -1
  316. package/dist/types/ExtractGenericFromRef.d.ts +1 -1
  317. package/dist/types/VoidHtmlElements.d.ts +1 -1
  318. package/dist/utilities/functions/cloneDeep.d.ts +1 -1
  319. package/dist/utilities/functions/debounce.d.ts +1 -1
  320. package/dist/utilities/functions/flow.d.ts +1 -1
  321. package/dist/utilities/functions/get.d.ts +1 -1
  322. package/dist/utilities/functions/isNotNil.d.ts +1 -1
  323. package/dist/utilities/functions/mapValues.d.ts +1 -1
  324. package/dist/utilities/functions/merge.d.ts +1 -1
  325. package/dist/utilities/functions/millisecondsTo.d.ts +1 -1
  326. package/dist/utilities/functions/overEvery.d.ts +1 -1
  327. package/dist/utilities/functions/percentage.d.ts +4 -4
  328. package/dist/utilities/functions/pick.d.ts +1 -1
  329. package/dist/utilities/functions/pickBy.d.ts +1 -1
  330. package/dist/utilities/functions/roundToTheNearest.d.ts +1 -1
  331. package/package.json +93 -77
  332. package/dist/index256.js +0 -5
  333. package/dist/index256.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index113.js","sources":["../src/components/BbTree/BbTree.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, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, resolveComponent as _resolveComponent, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-tree-row\" }\nconst _hoisted_2 = { class: \"bb-tree-main-content\" }\n\nimport { flattenTree } from \"@/utilities/functions/flattenTree\";\nimport { computed } from \"vue\";\n\nexport type TreeItem = {\n /**\n * Array of children of the current item. Is the key\n * with which we can identify whther the node is nested or not.\n */\n children?: TreeItem[];\n /**\n * Status of the current node. When a node is open\n * it's children are displayed. Otherwise its children\n * are hidden.\n */\n open?: boolean;\n [key: symbol | string]: any;\n} & Pick<BbTreeProps, \"expandable\">;\n\nexport type BbTreeProps = {\n /**\n * Array containing the tree like structure of the items.\n */\n items: TreeItem[];\n /**\n * Parent of the current node. `undefined` for the first level.\n */\n parent?: TreeItem;\n /**\n * Identifier of the item.\n */\n identifier?: string | number;\n /**\n * Current depth of the tree. Starting at 0 for\n * the first level increasing at every level down.\n */\n depth?: number;\n /**\n * Defines the item as expandable. It can be a\n * global boolean defining all items as expandable.\n * Or it can be a function that receives the item,\n * depth, and parent of the current node and returns a boolean.\n */\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n};\n\nexport type BbTreeSlots = {\n [key: string]: (props: {\n item: any;\n parent?: any;\n index: number;\n offset: number;\n open: boolean;\n depth: number;\n identifier?: string | number;\n expandable: boolean;\n }) => any;\n};\ntype MappedItem = {\n children: TreeItem[\"children\"];\n depth: NonNullable<BbTreeProps[\"depth\"]>;\n expandable: boolean;\n identifier: any;\n index: number;\n offset: number;\n open: boolean;\n original: any;\n parent: BbTreeProps[\"parent\"];\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTree',\n props: {\n items: { default: () => [] as TreeItem[] },\n parent: {},\n identifier: { default: \"id\" },\n depth: { default: 0 },\n expandable: { type: [Boolean, Function] }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst itemIsOpen = (item: TreeItem) => {\n /* If the item is not expandable it must be open */\n if (typeof item.open === \"undefined\") return true;\n return item.open;\n};\n\nconst internalItems = computed<MappedItem[]>(() => {\n let currentOffset = 0;\n\n return props.items.map((item: TreeItem, index) => {\n const open = itemIsOpen(item);\n const expandableProp = item.expandable ?? props.expandable;\n const offset = currentOffset + 1;\n\n currentOffset = currentOffset + flattenTree([item], \"children\").length;\n\n let expandable = false;\n if (typeof expandableProp !== \"undefined\") {\n if (typeof expandableProp === \"function\")\n expandable = expandableProp(item, props.depth, props.parent);\n else expandable = expandableProp;\n }\n return {\n children: item.children,\n depth: props.depth,\n expandable: expandable,\n identifier: item[props.identifier],\n offset,\n index,\n open,\n original: item,\n parent: props.parent,\n };\n });\n});\n\nreturn (_ctx: any,_cache: any) => {\n const _component_BbTree = _resolveComponent(\"BbTree\", true)!\n\n return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(internalItems.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"bb-tree\", {\n [`bb-tree--depth-${item.depth}`]: true,\n 'bb-tree--open': item.open,\n }]),\n key: item.identifier\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.$slots[item.identifier])\n ? _renderSlot(_ctx.$slots, item.identifier, {\n key: 0,\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n })\n : (_ctx.$slots[item.depth])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 1,\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n })\n : _renderSlot(_ctx.$slots, 'default', {\n key: 2,\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass(`bb-tree--depth-${item.depth}-children`)\n }, [\n _renderSlot(_ctx.$slots, `${item.depth}-children`, {\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n }, () => [\n _renderSlot(_ctx.$slots, `${item.identifier}-children`, {\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n }, () => [\n _createVNode(_component_BbTree, {\n depth: item.depth + 1,\n expandable: _ctx.expandable,\n identifier: props.identifier,\n items: item.children,\n parent: item\n }, _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1032, [\"depth\", \"expandable\", \"identifier\", \"items\", \"parent\"])\n ])\n ])\n ], 2)\n ], 2))\n }), 128))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","itemIsOpen","item","internalItems","computed","currentOffset","index","open","expandableProp","offset","flattenTree","expandable","_ctx","_cache","_component_BbTree","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createElementVNode","_renderSlot","_createVNode","_createSlots","_","name","_withCtx","data","_normalizeProps","_guardReactiveProps"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,iBACtBC,IAAa,EAAE,OAAO,0BA0EAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,SAAS,MAAM,GAAiB;AAAA,IACzC,QAAQ,CAAC;AAAA,IACT,YAAY,EAAE,SAAS,KAAK;AAAA,IAC5B,OAAO,EAAE,SAAS,EAAE;AAAA,IACpB,YAAY,EAAE,MAAM,CAAC,SAAS,QAAQ,EAAE;AAAA,EAC1C;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAa,CAACC,MAEd,OAAOA,EAAK,OAAS,MAAoB,KACtCA,EAAK,MAGRC,IAAgBC,EAAuB,MAAM;AACjD,UAAIC,IAAgB;AAEpB,aAAOL,EAAM,MAAM,IAAI,CAACE,GAAgBI,MAAU;AAC1C,cAAAC,IAAON,EAAWC,CAAI,GACtBM,IAAiBN,EAAK,cAAcF,E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AAA,cACX,QAAQA,EAAK;AAAA,YAAA,GACZ,MAAM;AAAA,cACPqB,EAAaT,GAAmB;AAAA,gBAC9B,OAAOZ,EAAK,QAAQ;AAAA,gBACpB,YAAYU,EAAK;AAAA,gBACjB,YAAYZ,EAAM;AAAA,gBAClB,OAAOE,EAAK;AAAA,gBACZ,QAAQA;AAAA,cACP,GAAAsB,EAAa,EAAE,GAAG,KAAK;AAAA,gBACxBL,EAAYP,EAAK,QAAQ,CAACa,GAAGC,OACpB;AAAA,kBACL,MAAAA;AAAA,kBACA,IAAIC,EAAS,CAACC,MAAS;AAAA,oBACrBN,EAAYV,EAAK,QAAQc,GAAMG,EAAgBC,EAAoBF,CAAI,CAAC,CAAC;AAAA,kBAAA,CAC1E;AAAA,gBAAA,EAEJ;AAAA,cAAA,CACF,GAAG,MAAM,CAAC,SAAS,cAAc,cAAc,SAAS,QAAQ,CAAC;AAAA,YAAA,CACnE;AAAA,UAAA,CACF;AAAA,WACA,CAAC;AAAA,SACH,CAAC,EACL,GAAG,GAAG;AAAA,IAAA;AAAA,EAET;AAEA,CAAC;"}
1
+ {"version":3,"file":"index113.js","sources":["../src/components/BbTree/BbTree.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, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, resolveComponent as _resolveComponent, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-tree-row\" }\nconst _hoisted_2 = { class: \"bb-tree-main-content\" }\n\nimport { flattenTree } from '@/utilities/functions/flattenTree';\nimport { computed } from 'vue';\n\nexport type TreeItem = {\n\t/**\n\t * Array of children of the current item. Is the key\n\t * with which we can identify whther the node is nested or not.\n\t */\n\tchildren?: TreeItem[];\n\t/**\n\t * Status of the current node. When a node is open\n\t * it's children are displayed. Otherwise its children\n\t * are hidden.\n\t */\n\topen?: boolean;\n\t[key: symbol | string]: any;\n} & Pick<BbTreeProps, 'expandable'>;\n\nexport type BbTreeProps = {\n\t/**\n\t * Array containing the tree like structure of the items.\n\t */\n\titems: TreeItem[];\n\t/**\n\t * Parent of the current node. `undefined` for the first level.\n\t */\n\tparent?: TreeItem;\n\t/**\n\t * Identifier of the item.\n\t */\n\tidentifier?: string | number;\n\t/**\n\t * Current depth of the tree. Starting at 0 for\n\t * the first level increasing at every level down.\n\t */\n\tdepth?: number;\n\t/**\n\t * Defines the item as expandable. It can be a\n\t * global boolean defining all items as expandable.\n\t * Or it can be a function that receives the item,\n\t * depth, and parent of the current node and returns a boolean.\n\t */\n\texpandable?:\n\t\t| boolean\n\t\t| ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n};\n\nexport type BbTreeSlots = {\n\t[key: string]: (props: {\n\t\titem: any;\n\t\tparent?: any;\n\t\tindex: number;\n\t\toffset: number;\n\t\topen: boolean;\n\t\tdepth: number;\n\t\tidentifier?: string | number;\n\t\texpandable: boolean;\n\t}) => any;\n};\ntype MappedItem = {\n\tchildren: TreeItem['children'];\n\tdepth: NonNullable<BbTreeProps['depth']>;\n\texpandable: boolean;\n\tidentifier: any;\n\tindex: number;\n\toffset: number;\n\topen: boolean;\n\toriginal: any;\n\tparent: BbTreeProps['parent'];\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTree',\n props: {\n items: { default: () => [] as TreeItem[] },\n parent: {},\n identifier: { default: 'id' },\n depth: { default: 0 },\n expandable: { type: [Boolean, Function] }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst itemIsOpen = (item: TreeItem) => {\n\t/* If the item is not expandable it must be open */\n\tif (typeof item.open === 'undefined') return true;\n\treturn item.open;\n};\n\nconst internalItems = computed<MappedItem[]>(() => {\n\tlet currentOffset = 0;\n\n\treturn props.items.map((item: TreeItem, index) => {\n\t\tconst open = itemIsOpen(item);\n\t\tconst expandableProp = item.expandable ?? props.expandable;\n\t\tconst offset = currentOffset + 1;\n\n\t\tcurrentOffset = currentOffset + flattenTree([item], 'children').length;\n\n\t\tlet expandable = false;\n\t\tif (typeof expandableProp !== 'undefined') {\n\t\t\tif (typeof expandableProp === 'function')\n\t\t\t\texpandable = expandableProp(item, props.depth, props.parent);\n\t\t\telse expandable = expandableProp;\n\t\t}\n\t\treturn {\n\t\t\tchildren: item.children,\n\t\t\tdepth: props.depth,\n\t\t\texpandable: expandable,\n\t\t\tidentifier: item[props.identifier],\n\t\t\toffset,\n\t\t\tindex,\n\t\t\topen,\n\t\t\toriginal: item,\n\t\t\tparent: props.parent,\n\t\t};\n\t});\n});\n\nreturn (_ctx: any,_cache: any) => {\n const _component_BbTree = _resolveComponent(\"BbTree\", true)!\n\n return (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(internalItems.value, (item) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: item.identifier,\n class: _normalizeClass([\"bb-tree\", {\n\t\t\t[`bb-tree--depth-${item.depth}`]: true,\n\t\t\t'bb-tree--open': item.open,\n\t\t}])\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.$slots[item.identifier])\n ? _renderSlot(_ctx.$slots, item.identifier, {\n key: 0,\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n })\n : (_ctx.$slots[item.depth])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 1,\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n })\n : _renderSlot(_ctx.$slots, 'default', {\n key: 2,\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass(`bb-tree--depth-${item.depth}-children`)\n }, [\n _renderSlot(_ctx.$slots, `${item.depth}-children`, {\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n }, () => [\n _renderSlot(_ctx.$slots, `${item.identifier}-children`, {\n depth: item.depth,\n expandable: item.expandable,\n identifier: item.identifier,\n index: item.index,\n item: item.original,\n offset: item.offset,\n open: item.open,\n parent: item.parent\n }, () => [\n _createVNode(_component_BbTree, {\n depth: item.depth + 1,\n expandable: _ctx.expandable,\n identifier: props.identifier,\n items: item.children,\n parent: item\n }, _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1032, [\"depth\", \"expandable\", \"identifier\", \"items\", \"parent\"])\n ])\n ])\n ], 2)\n ], 2))\n }), 128))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","itemIsOpen","item","internalItems","computed","currentOffset","index","open","expandableProp","offset","flattenTree","expandable","_ctx","_cache","_component_BbTree","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createElementVNode","_renderSlot","_createVNode","_createSlots","_","name","_withCtx","data","_normalizeProps","_guardReactiveProps"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,iBACtBC,IAAa,EAAE,OAAO,0BA0EAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,SAAS,MAAM,GAAiB;AAAA,IACzC,QAAQ,CAAC;AAAA,IACT,YAAY,EAAE,SAAS,KAAK;AAAA,IAC5B,OAAO,EAAE,SAAS,EAAE;AAAA,I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A,EAAK;AAAA,YACX,QAAQA,EAAK;AAAA,YACb,MAAMA,EAAK;AAAA,YACX,QAAQA,EAAK;AAAA,UAAA,GACZ,MAAM;AAAA,YACPoB,EAAYV,EAAK,QAAQ,GAAGV,EAAK,UAAU,aAAa;AAAA,cACtD,OAAOA,EAAK;AAAA,cACZ,YAAYA,EAAK;AAAA,cACjB,YAAYA,EAAK;AAAA,cACjB,OAAOA,EAAK;AAAA,cACZ,MAAMA,EAAK;AAAA,cACX,QAAQA,EAAK;AAAA,cACb,MAAMA,EAAK;AAAA,cACX,QAAQA,EAAK;AAAA,YAAA,GACZ,MAAM;AAAA,cACPqB,EAAaT,GAAmB;AAAA,gBAC9B,OAAOZ,EAAK,QAAQ;AAAA,gBACpB,YAAYU,EAAK;AAAA,gBACjB,YAAYZ,EAAM;AAAA,gBAClB,OAAOE,EAAK;AAAA,gBACZ,QAAQA;AAAA,cACP,GAAAsB,EAAa,EAAE,GAAG,KAAK;AAAA,gBACxBL,EAAYP,EAAK,QAAQ,CAACa,GAAGC,OACpB;AAAA,kBACL,MAAAA;AAAA,kBACA,IAAIC,EAAS,CAACC,MAAS;AAAA,oBACrBN,EAAYV,EAAK,QAAQc,GAAMG,EAAgBC,EAAoBF,CAAI,CAAC,CAAC;AAAA,kBAAA,CAC1E;AAAA,gBAAA,EAEJ;AAAA,cAAA,CACF,GAAG,MAAM,CAAC,SAAS,cAAc,cAAc,SAAS,QAAQ,CAAC;AAAA,YAAA,CACnE;AAAA,UAAA,CACF;AAAA,WACA,CAAC;AAAA,SACH,CAAC,EACL,GAAG,GAAG;AAAA,IAAA;AAAA,EAET;AAEA,CAAC;"}
package/dist/index115.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as c, openBlock as t, createElementBlock as o, createElementVNode as l, renderSlot as r, createTextVNode as i, toDisplayString as p, withModifiers as _, createCommentVNode as d } from "vue";
2
2
  const b = { class: "bb-chip" }, h = { class: "bb-chip__content" }, m = ["aria-label"], u = {
3
- xmlns: "http://www.w3.org/2000/svg",
4
- viewBox: "0 0 20 20",
5
- role: "img",
6
3
  "aria-hidden": "true",
7
4
  class: "v-icon__svg",
8
- style: { height: "20px", width: "20px" }
5
+ role: "img",
6
+ style: { height: "20px", width: "20px" },
7
+ viewBox: "0 0 20 20",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
9
  }, L = /* @__PURE__ */ l("path", {
10
10
  d: "M15 6.375L14.125 5.5L10 9.625L5.875 5.5L5 6.375L9.125 10.5L5 14.625L5.875 15.5L10 11.375L14.125 15.5L15 14.625L10.875 10.5L15 6.375Z",
11
11
  fill: "currentColor"
@@ -33,8 +33,8 @@ const b = { class: "bb-chip" }, h = { class: "bb-chip__content" }, m = ["aria-la
33
33
  key: 0,
34
34
  "aria-label": e.clearableLabel,
35
35
  class: "bb-chip__clear-button",
36
- onClick: _(n, ["stop", "prevent"]),
37
- type: "button"
36
+ type: "button",
37
+ onClick: _(n, ["stop", "prevent"])
38
38
  }, [
39
39
  (t(), o("svg", u, f))
40
40
  ], 8, m)) : d("", !0)
@@ -1 +1 @@
1
- {"version":3,"file":"index115.js","sources":["../src/components/BbChip/BbChip.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, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-chip\" }\nconst _hoisted_2 = { class: \"bb-chip__content\" }\nconst _hoisted_3 = [\"aria-label\"]\nconst _hoisted_4 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n role: \"img\",\n \"aria-hidden\": \"true\",\n class: \"v-icon__svg\",\n style: {\"height\":\"20px\",\"width\":\"20px\"}\n}\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M15 6.375L14.125 5.5L10 9.625L5.875 5.5L5 6.375L9.125 10.5L5 14.625L5.875 15.5L10 11.375L14.125 15.5L15 14.625L10.875 10.5L15 6.375Z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_6 = [\n _hoisted_5\n]\n\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbChipProps = Pick<CommonProps, \"text\"> & {\n /**\n * Renders a button with a close icon. Used to indicate the possibility of deleting the item.\n */\n clearable?: boolean;\n /**\n * The label the clearing button must have\n */\n clearableLabel?: string;\n};\n\nexport type BbChipEvents = {\n (e: \"click:clear\", event: MouseEvent): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbChip',\n props: {\n text: {},\n clearable: { type: Boolean, default: true },\n clearableLabel: { default: \"Elimina\" }\n },\n emits: [\"click:clear\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\n\n\nconst emit = __emit;\nconst onClear = (event: MouseEvent) => {\n emit(\"click:clear\", event);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"default\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ]),\n (_ctx.clearable)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n \"aria-label\": _ctx.clearableLabel,\n class: \"bb-chip__clear-button\",\n onClick: _withModifiers(onClear, [\"stop\",\"prevent\"]),\n type: \"button\"\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_4, _hoisted_6))\n ], 8, _hoisted_3))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_sfc_main","_defineComponent","__props","__emit","emit","onClear","event","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","_withModifiers","_create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AAGH,CAAU,KAChBoB,EAAoB,IAAI,EAAI;AAAA,IAAA,CACjC;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index115.js","sources":["../src/components/BbChip/BbChip.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, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-chip\" }\nconst _hoisted_2 = { class: \"bb-chip__content\" }\nconst _hoisted_3 = [\"aria-label\"]\nconst _hoisted_4 = {\n \"aria-hidden\": \"true\",\n class: \"v-icon__svg\",\n role: \"img\",\n style: {\"height\":\"20px\",\"width\":\"20px\"},\n viewBox: \"0 0 20 20\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M15 6.375L14.125 5.5L10 9.625L5.875 5.5L5 6.375L9.125 10.5L5 14.625L5.875 15.5L10 11.375L14.125 15.5L15 14.625L10.875 10.5L15 6.375Z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_6 = [\n _hoisted_5\n]\n\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbChipProps = Pick<CommonProps, 'text'> & {\n\t/**\n\t * Renders a button with a close icon. Used to indicate the possibility of deleting the item.\n\t */\n\tclearable?: boolean;\n\t/**\n\t * The label the clearing button must have\n\t */\n\tclearableLabel?: string;\n};\n\nexport type BbChipEvents = {\n\t(e: 'click:clear', event: MouseEvent): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbChip',\n props: {\n text: {},\n clearable: { type: Boolean, default: true },\n clearableLabel: { default: 'Elimina' }\n },\n emits: ['click:clear'],\n setup(__props: any, { emit: __emit }) {\n\n\n\n\n\nconst emit = __emit;\nconst onClear = (event: MouseEvent) => {\n\temit('click:clear', event);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"default\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ]),\n (_ctx.clearable)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n \"aria-label\": _ctx.clearableLabel,\n class: \"bb-chip__clear-button\",\n type: \"button\",\n onClick: _withModifiers(onClear, [\"stop\",\"prevent\"])\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_4, _hoisted_6))\n ], 8, _hoisted_3))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_sfc_main","_defineComponent","__props","__emit","emit","onClear","event","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","_withModifiers","_createCommentVNode"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,aACtBC,IAAa,EAAE,OAAO,sBACtBC,IAAa,CAAC,YAAY,GAC1BC,IAAa;AAAA,EACjB,eAAe;AAAA,EACf,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO,EAAC,QAAS,QAAO,OAAQ,OAAM;AAAA,EACtC,SAAS;AAAA,EACT,OAAO;AACT,GACMC,sBAA8C,QAAQ;AAAA,EAC1D,GAAG;AAAA,EACH,MAAM;AACR,GAAG,MAAM,EAAE,GACLC,IAAa;AAAA,EACjBD;AACF,GAoB4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,MAAM,CAAC;AAAA,IACP,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,gBAAgB,EAAE,SAAS,UAAU;AAAA,EACvC;AAAA,EACA,OAAO,CAAC,aAAa;AAAA,EACrB,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAMxC,UAAMC,IAAOD,GACPE,IAAU,CAACC,MAAsB;AACtC,MAAAF,EAAK,eAAeE,CAAK;AAAA,IAAA;AAGnB,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAoB,QAAQhB,GAAY;AAAA,MAC5DiB,EAAoB,QAAQhB,GAAY;AAAA,QACtCiB,EAAYL,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,UAC5CM,EAAiBC,EAAiBP,EAAK,IAAI,GAAG,CAAC;AAAA,QAAA,CAChD;AAAA,MAAA,CACF;AAAA,MACAA,EAAK,aACDE,KAAcC,EAAoB,UAAU;AAAA,QAC3C,KAAK;AAAA,QACL,cAAcH,EAAK;AAAA,QACnB,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAASQ,EAAeV,GAAS,CAAC,QAAO,SAAS,CAAC;AAAA,MAAA,GAClD;AAAA,SACAI,EAAW,GAAGC,EAAoB,OAAOb,GAAYE,CAAU;AAAA,SAC/D,GAAGH,CAAU,KAChBoB,EAAoB,IAAI,EAAI;AAAA,IAAA,CACjC;AAAA,EAEH;AAEA,CAAC;"}
package/dist/index116.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, ref as a, watch as s, computed as u, openBlock as c, createElementBlock as p, normalizeProps as d, guardReactiveProps as m, createElementVNode as b, renderSlot as v, createCommentVNode as f } from "vue";
2
2
  import { wait as V } from "./index122.js";
3
- import { throttle as _ } from "./index204.js";
3
+ import { throttle as _ } from "./index208.js";
4
4
  const h = { class: "bb-collapsible__content" }, k = /* @__PURE__ */ i({
5
5
  __name: "BbCollapsible",
6
6
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"index116.js","sources":["../src/components/BbCollapsible/BbCollapsible.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-collapsible__content\" }\n\nimport { wait } from \"@/utilities/functions/wait\";\nimport { throttle } from \"@/utilities/functions/throttle\";\nimport { computed, ref, watch } from \"vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbCollapsibleProps = Pick<CommonProps, 'eager' | 'transitionDuration'> & {\n /**\n * Used by v-model to trigger opening / closing the collapsible\n */\n modelValue: boolean;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCollapsible',\n props: {\n eager: { type: Boolean },\n transitionDuration: { default: 250 },\n modelValue: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst visible = ref(props.modelValue);\nconst hasRenderedOnce = ref(visible.value);\n\n/**\n * Every time model value changes if content is going to be expanded\n * make it visible straight away.\n * If content id going to be collapsed wait for end of \n * transition before hiding from keyboard navigation\n */\nwatch(\n () => props.modelValue,\n throttle(async (value) => {\n if (value) {\n hasRenderedOnce.value = true;\n visible.value = true;\n } else {\n await wait(props.transitionDuration);\n visible.value = false;\n }\n }, props.transitionDuration)\n);\nconst collapsibleAttributes = computed(() => {\n return {\n \"aria-expanded\": props.modelValue,\n class: {\n \"bb-collapsible\": true,\n \"bb-collapsible--open\": props.modelValue,\n \"bb-collapsible--closed\": !props.modelValue,\n \"bb-collapsible--invisible\": !visible.value,\n },\n style: {\n transitionDuration: props.transitionDuration + \"ms\",\n },\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _normalizeProps(_guardReactiveProps(collapsibleAttributes.value)), [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.eager || hasRenderedOnce.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","visible","ref","hasRenderedOnce","watch","throttle","value","wait","collapsibleAttributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,6BAeAC,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,EAC9B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAUC,EAAIF,EAAM,UAAU,GAC9BG,IAAkBD,EAAID,EAAQ,KAAK;AAQzC,IAAAG;AAAA,MACE,MAAMJ,EAAM;AAAA,MACZK,EAAS,OAAOC,MAAU;AACxB,QAAIA,KACFH,EAAgB,QAAQ,IACxBF,EAAQ,QAAQ,OAEV,MAAAM,EAAKP,EAAM,kBAAkB,GACnCC,EAAQ,QAAQ;AAAA,MAClB,GACCD,EAAM,kBAAkB;AAAA,IAAA;AAEvB,UAAAQ,IAAwBC,EAAS,OAC9B;AAAA,MACL,iBAAiBT,EAAM;AAAA,MACvB,OAAO;AAAA,QACL,kBAAkB;AAAA,QAClB,wBAAwBA,EAAM;AAAA,QAC9B,0BAA0B,CAACA,EAAM;AAAA,QACjC,6BAA6B,CAACC,EAAQ;AAAA,MACxC;AAAA,MACA,OAAO;AAAA,QACL,oBAAoBD,EAAM,qBAAqB;AAAA,MACjD;AAAA,IAAA,EAEH;AAEM,WAAA,CAACU,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAOC,EAAgBC,EAAoBP,EAAsB,KAAK,CAAC,GAAG;AAAA,MAClHQ,EAAoB,OAAOpB,GAAY;AAAA,QACpCc,EAAK,SAASP,EAAgB,QAC3Bc,EAAYP,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA,IAC9CQ,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index116.js","sources":["../src/components/BbCollapsible/BbCollapsible.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-collapsible__content\" }\n\nimport { wait } from '@/utilities/functions/wait';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { computed, ref, watch } from 'vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbCollapsibleProps = Pick<\n\tCommonProps,\n\t'eager' | 'transitionDuration'\n> & {\n\t/**\n\t * Used by v-model to trigger opening / closing the collapsible\n\t */\n\tmodelValue: boolean;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCollapsible',\n props: {\n eager: { type: Boolean },\n transitionDuration: { default: 250 },\n modelValue: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst visible = ref(props.modelValue);\nconst hasRenderedOnce = ref(visible.value);\n\n/**\n * Every time model value changes if content is going to be expanded\n * make it visible straight away.\n * If content id going to be collapsed wait for end of\n * transition before hiding from keyboard navigation\n */\nwatch(\n\t() => props.modelValue,\n\tthrottle(async (value) => {\n\t\tif (value) {\n\t\t\thasRenderedOnce.value = true;\n\t\t\tvisible.value = true;\n\t\t} else {\n\t\t\tawait wait(props.transitionDuration);\n\t\t\tvisible.value = false;\n\t\t}\n\t}, props.transitionDuration)\n);\nconst collapsibleAttributes = computed(() => {\n\treturn {\n\t\t'aria-expanded': props.modelValue,\n\t\tclass: {\n\t\t\t'bb-collapsible': true,\n\t\t\t'bb-collapsible--open': props.modelValue,\n\t\t\t'bb-collapsible--closed': !props.modelValue,\n\t\t\t'bb-collapsible--invisible': !visible.value,\n\t\t},\n\t\tstyle: {\n\t\t\ttransitionDuration: props.transitionDuration + 'ms',\n\t\t},\n\t};\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _normalizeProps(_guardReactiveProps(collapsibleAttributes.value)), [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.eager || hasRenderedOnce.value)\n ? _renderSlot(_ctx.$slots, \"default\", { key: 0 })\n : _createCommentVNode(\"\", true)\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","visible","ref","hasRenderedOnce","watch","throttle","value","wait","collapsibleAttributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,6BAkBAC,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,EAC9B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAUC,EAAIF,EAAM,UAAU,GAC9BG,IAAkBD,EAAID,EAAQ,KAAK;AAQzC,IAAAG;AAAA,MACC,MAAMJ,EAAM;AAAA,MACZK,EAAS,OAAOC,MAAU;AACzB,QAAIA,KACHH,EAAgB,QAAQ,IACxBF,EAAQ,QAAQ,OAEV,MAAAM,EAAKP,EAAM,kBAAkB,GACnCC,EAAQ,QAAQ;AAAA,MACjB,GACED,EAAM,kBAAkB;AAAA,IAAA;AAEtB,UAAAQ,IAAwBC,EAAS,OAC/B;AAAA,MACN,iBAAiBT,EAAM;AAAA,MACvB,OAAO;AAAA,QACN,kBAAkB;AAAA,QAClB,wBAAwBA,EAAM;AAAA,QAC9B,0BAA0B,CAACA,EAAM;AAAA,QACjC,6BAA6B,CAACC,EAAQ;AAAA,MACvC;AAAA,MACA,OAAO;AAAA,QACN,oBAAoBD,EAAM,qBAAqB;AAAA,MAChD;AAAA,IAAA,EAED;AAEM,WAAA,CAACU,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAOC,EAAgBC,EAAoBP,EAAsB,KAAK,CAAC,GAAG;AAAA,MAClHQ,EAAoB,OAAOpB,GAAY;AAAA,QACpCc,EAAK,SAASP,EAAgB,QAC3Bc,EAAYP,EAAK,QAAQ,WAAW,EAAE,KAAK,EAAG,CAAA,IAC9CQ,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index117.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
2
- import { isCssColor as z } from "./index207.js";
2
+ import { isCssColor as z } from "./index197.js";
3
3
  const g = ["innerHTML"], $ = /* @__PURE__ */ m({
4
4
  __name: "BbIcon",
5
5
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"index117.js","sources":["../src/components/BbIcon/BbIcon.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed, getCurrentInstance, inject, ref, watchEffect } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport type { Size as S } from \"@/types/CommonProps\";\n\nexport type Size = {\n xs: number;\n sm: number;\n md: number;\n lg: number;\n xl: number;\n xxl: number;\n};\n\nexport type BbIconProps = S<Size> & {\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 * Name of the icon to use\n */\n type: string;\n };\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbIcon',\n props: {\n size: { default: \"md\" },\n color: {},\n type: {}\n },\n setup(__props: any) {\n\nconst props = __props;\nlet icons: Record<string, () => Promise<string>> | undefined;\n// @ts-ignore\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nif (isNuxt) {\n // @ts-ignore\n if (process.client) {\n // @ts-ignore\n icons = useNuxtApp()[`$icons`] as typeof icons;\n }\n} else {\n icons = inject(\"icons\");\n}\n\nconst sizeMap: Size = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 28,\n xl: 36,\n xxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n const classes: any = {\n \"bb-icon\": true,\n };\n const width = computed(() => {\n let dimension: number;\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n } else if (typeof props.size === \"number\") {\n dimension = props.size;\n } else {\n dimension = 24;\n }\n return dimension + `px`;\n });\n let style: { [key: string]: any } = { width: width.value };\n\n if (props.color) {\n if (isCssColor(props.color)) {\n style.color = props.color;\n } else {\n classes[`bb-icon-${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nconst icon = ref<string | null>(null);\n\nwatchEffect(async () => {\n if (icons) {\n if (typeof icons[props.type] === \"undefined\")\n throw new Error(`Icon \"${props.type}\" does not exist.`);\n icon.value = await icons[props.type]();\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"i\", _mergeProps(iconAttributes.value, { innerHTML: icon.value }), null, 16, _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","icons","_b","_a","getCurrentInstance","inject","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","icon","ref","watchEffect","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps"],"mappings":";;AAGA,MAAMA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AACxD,QAAAa,EAAK,QAAQ,MAAMZ,EAAMD,EAAM,IAAI,EAAE;AAAA,MACvC;AAAA,IAAA,CACD,GAEM,CAACgB,GAAUC,OACRC,EAAW,GAAGC,EAAoB,KAAKC,EAAYb,EAAe,OAAO,EAAE,WAAWM,EAAK,MAAO,CAAA,GAAG,MAAM,IAAIjB,CAAU;AAAA,EAEnI;AAEA,CAAC;"}
1
+ {"version":3,"file":"index117.js","sources":["../src/components/BbIcon/BbIcon.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\n\nimport { computed, getCurrentInstance, inject, ref, watchEffect } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Size as S } from '@/types/CommonProps';\n\nexport type Size = {\n\txs: number;\n\tsm: number;\n\tmd: number;\n\tlg: number;\n\txl: number;\n\txxl: number;\n};\n\nexport type BbIconProps = S<Size> & {\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\t/**\n\t * Name of the icon to use\n\t */\n\ttype: string;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbIcon',\n props: {\n size: { default: 'md' },\n color: {},\n type: {}\n },\n setup(__props: any) {\n\nconst props = __props;\nlet icons: Record<string, () => Promise<string>> | undefined;\n// @ts-ignore\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nif (isNuxt) {\n\t// @ts-ignore\n\tif (process.client) {\n\t\t// @ts-ignore\n\t\ticons = useNuxtApp()[`$icons`] as typeof icons;\n\t}\n} else {\n\ticons = inject('icons');\n}\n\nconst sizeMap: Size = {\n\txs: 12,\n\tsm: 16,\n\tmd: 24,\n\tlg: 28,\n\txl: 36,\n\txxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n\tconst classes: any = {\n\t\t'bb-icon': true,\n\t};\n\tconst width = computed(() => {\n\t\tlet dimension: number;\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 if (typeof props.size === 'number') {\n\t\t\tdimension = props.size;\n\t\t} else {\n\t\t\tdimension = 24;\n\t\t}\n\t\treturn dimension + `px`;\n\t});\n\tlet style: { [key: string]: any } = { width: width.value };\n\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.color = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-icon-${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\nconst icon = ref<string | null>(null);\n\nwatchEffect(async () => {\n\tif (icons) {\n\t\tif (typeof icons[props.type] === 'undefined')\n\t\t\tthrow new Error(`Icon \"${props.type}\" does not exist.`);\n\t\ticon.value = await icons[props.type]();\n\t}\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"i\", _mergeProps(iconAttributes.value, { innerHTML: icon.value }), null, 16, _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","icons","_b","_a","getCurrentInstance","inject","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","icon","ref","watchEffect","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps"],"mappings":";;AAGA,MAAMA,IAAa,CAAC,WAAW,GA4BHC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,MAAM,EAAE,SAAS,KAAK;AAAA,IACtB,OAAO,CAAC;AAAA,IACR,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc;;AAEtB,UAAMC,IAAQD;AACV,QAAAE;AAIJ,IAFe,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,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as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
2
- import { throttle as g } from "./index204.js";
2
+ import { throttle as g } from "./index208.js";
3
3
  const O = /* @__PURE__ */ v({
4
4
  __name: "BbSmoothHeight",
5
5
  props: {
@@ -23,16 +23,16 @@ const O = /* @__PURE__ */ v({
23
23
  }
24
24
  }, 200);
25
25
  return (o, y) => (i(), l(u(o.tag), {
26
- class: "bb-smooth-height",
27
26
  ref_key: "container",
28
27
  ref: s,
28
+ class: "bb-smooth-height",
29
29
  style: m({ "transition-duration": n.transitionDuration / 1e3 + "s" })
30
30
  }, {
31
31
  default: f(() => [
32
32
  (i(), l(u(o.tag), {
33
- class: "content",
34
33
  ref_key: "content",
35
- ref: e
34
+ ref: e,
35
+ class: "content"
36
36
  }, {
37
37
  default: f(() => [
38
38
  d(o.$slots, "default")
@@ -1 +1 @@
1
- {"version":3,"file":"index118.js","sources":["../src/components/BbSmoothHeight/BbSmoothHeight.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport type { CommonProps, NonVoidElementTag } from \"@/types/CommonProps\";\nimport { throttle } from \"@/utilities/functions/throttle\";\nimport { ref, onMounted, onBeforeUnmount } from \"vue\";\n\nexport type BbSmoothHeightProps = {\n /**\n * Options to pass to the MutationObserver\n */\n mutationOptions?: MutationObserverInit;\n /**\n * Options to pass to the ResizeObserver\n */\n resizeOptions?: ResizeObserverOptions;\n /**\n * Define which strategy to use. By default is used 'resize' which means the \n * component will update on resizing.\n * You can also define 'mutation' to use a MutationObserver\n */\n strategy?: \"resize\" | \"mutation\";\n} & NonVoidElementTag & Pick<CommonProps, 'transitionDuration'>\n\nexport type BbSmoothHeightSlots = {\n default?: (props: {}) => any\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSmoothHeight',\n props: {\n mutationOptions: { default: () => ({ childList: true }) },\n resizeOptions: {},\n strategy: { default: \"resize\" },\n tag: { default: \"div\" },\n transitionDuration: { default: 200 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst container = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst observer = ref<ResizeObserver | MutationObserver | null>(null);\n\nif (globalThis.ResizeObserver) {\n onMounted(() => {\n if (props.strategy === \"resize\") {\n if (content.value) {\n observer.value = new ResizeObserver(onContentGrow);\n observer.value.observe(content.value, props.resizeOptions);\n }\n } else if (props.strategy === \"mutation\") {\n if (content.value) {\n observer.value = new MutationObserver(onContentGrow);\n observer.value.observe(content.value, props.mutationOptions);\n }\n }\n onContentGrow();\n });\n onBeforeUnmount(() => {\n if (observer.value) {\n observer.value.disconnect();\n }\n });\n}\n\n/**\n * This is called when content changes.\n * It could be called numerous times so throttle every 200ms\n */\nconst onContentGrow = throttle(() => {\n if (container.value && content.value) {\n const contentHeight = content.value.scrollHeight + 2;\n container.value.style.height = \"0px\";\n container.value.style.height = `${contentHeight}px`;\n }\n}, 200);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n class: \"bb-smooth-height\",\n ref_key: \"container\",\n ref: container,\n style: _normalizeStyle({ 'transition-duration': props.transitionDuration / 1000 + 's' })\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n class: \"content\",\n ref_key: \"content\",\n ref: content\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 512))\n ]),\n _: 3\n }, 8, [\"style\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","container","ref","content","observer","onMounted","onContentGrow","onBeforeUnmount","throttle","contentHeight","_ctx","_cache","_openBlock","_createBlock","_resolveDyn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,uBAAuBf,EAAM,qBAAqB,MAAO,KAAK;AAAA,IAAA,GACtF;AAAA,MACD,SAASgB,EAAS,MAAM;AAAA,SACrBJ,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,UAC9D,OAAO;AAAA,UACP,SAAS;AAAA,UACT,KAAKP;AAAA,QAAA,GACJ;AAAA,UACD,SAASa,EAAS,MAAM;AAAA,YACtBC,EAAYP,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,UACD,GAAG;AAAA,WACF,GAAG;AAAA,MAAA,CACP;AAAA,MACD,GAAG;AAAA,IAAA,GACF,GAAG,CAAC,OAAO,CAAC;AAAA,EAEjB;AAEA,CAAC;"}
1
+ {"version":3,"file":"index118.js","sources":["../src/components/BbSmoothHeight/BbSmoothHeight.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle } from \"vue\"\n\nimport type { CommonProps, NonVoidElementTag } from '@/types/CommonProps';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { ref, onMounted, onBeforeUnmount } from 'vue';\n\nexport type BbSmoothHeightProps = {\n\t/**\n\t * Options to pass to the MutationObserver\n\t */\n\tmutationOptions?: MutationObserverInit;\n\t/**\n\t * Options to pass to the ResizeObserver\n\t */\n\tresizeOptions?: ResizeObserverOptions;\n\t/**\n\t * Define which strategy to use. By default is used 'resize' which means the\n\t * component will update on resizing.\n\t * You can also define 'mutation' to use a MutationObserver\n\t */\n\tstrategy?: 'resize' | 'mutation';\n} & NonVoidElementTag &\n\tPick<CommonProps, 'transitionDuration'>;\n\nexport type BbSmoothHeightSlots = {\n\tdefault?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSmoothHeight',\n props: {\n mutationOptions: { default: () => ({ childList: true }) },\n resizeOptions: {},\n strategy: { default: 'resize' },\n tag: { default: 'div' },\n transitionDuration: { default: 200 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst container = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst observer = ref<ResizeObserver | MutationObserver | null>(null);\n\nif (globalThis.ResizeObserver) {\n\tonMounted(() => {\n\t\tif (props.strategy === 'resize') {\n\t\t\tif (content.value) {\n\t\t\t\tobserver.value = new ResizeObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(content.value, props.resizeOptions);\n\t\t\t}\n\t\t} else if (props.strategy === 'mutation') {\n\t\t\tif (content.value) {\n\t\t\t\tobserver.value = new MutationObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(content.value, props.mutationOptions);\n\t\t\t}\n\t\t}\n\t\tonContentGrow();\n\t});\n\tonBeforeUnmount(() => {\n\t\tif (observer.value) {\n\t\t\tobserver.value.disconnect();\n\t\t}\n\t});\n}\n\n/**\n * This is called when content changes.\n * It could be called numerous times so throttle every 200ms\n */\nconst onContentGrow = throttle(() => {\n\tif (container.value && content.value) {\n\t\tconst contentHeight = content.value.scrollHeight + 2;\n\t\tcontainer.value.style.height = '0px';\n\t\tcontainer.value.style.height = `${contentHeight}px`;\n\t}\n}, 200);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n ref_key: \"container\",\n ref: container,\n class: \"bb-smooth-height\",\n style: _normalizeStyle({ 'transition-duration': props.transitionDuration / 1000 + 's' })\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n ref_key: \"content\",\n ref: content,\n class: \"content\"\n }, {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 512))\n ]),\n _: 3\n }, 8, [\"style\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","container","ref","content","observer","onMounted","onContentGrow","onBeforeUnmount","throttle","contentHeight","_ctx","_cache","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeStyle","_withCtx","_renderSlot"],"mappings":";;AA8BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,iBAAiB,EAAE,SAAS,OAAO,EAAE,WAAW,GAAQ,GAAA;AAAA,IACxD,eAAe,CAAC;AAAA,IAChB,UAAU,EAAE,SAAS,SAAS;AAAA,IAC9B,KAAK,EAAE,SAAS,MAAM;AAAA,IACtB,oBAAoB,EAAE,SAAS,IAAI;AAAA,EACrC;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAYC,EAAwB,IAAI,GACxCC,IAAUD,EAAwB,IAAI,GACtCE,IAAWF,EAA8C,IAAI;AAEnE,IAAI,WAAW,mBACdG,EAAU,MAAM;AACX,MAAAL,EAAM,aAAa,WAClBG,EAAQ,UACFC,EAAA,QAAQ,IAAI,eAAeE,CAAa,GACjDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,aAAa,KAEhDA,EAAM,aAAa,cACzBG,EAAQ,UACFC,EAAA,QAAQ,IAAI,iBAAiBE,CAAa,GACnDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,eAAe,IAG/CM;IAAA,CACd,GACDC,EAAgB,MAAM;AACrB,MAAIH,EAAS,SACZA,EAAS,MAAM;IAChB,CACA;AAOI,UAAAE,IAAgBE,EAAS,MAAM;AAChC,UAAAP,EAAU,SAASE,EAAQ,OAAO;AAC/B,cAAAM,IAAgBN,EAAQ,MAAM,eAAe;AACzC,QAAAF,EAAA,MAAM,MAAM,SAAS,OAC/BA,EAAU,MAAM,MAAM,SAAS,GAAGQ,CAAa;AAAA,MAChD;AAAA,OACE,GAAG;AAEC,WAAA,CAACC,GAAUC,OACRC,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,MACrE,SAAS;AAAA,MACT,KAAKT;AAAA,MACL,OAAO;AAAA,MACP,OAAOc,EAAgB,EAAE,uBAAuBf,EAAM,qBAAqB,MAAO,KAAK;AAAA,IAAA,GACtF;AAAA,MACD,SAASgB,EAAS,MAAM;AAAA,SACrBJ,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,UAC9D,SAAS;AAAA,UACT,KAAKP;AAAA,UACL,OAAO;AAAA,QAAA,GACN;AAAA,UACD,SAASa,EAAS,MAAM;AAAA,YACtBC,EAAYP,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,UACD,GAAG;AAAA,WACF,GAAG;AAAA,MAAA,CACP;AAAA,MACD,GAAG;AAAA,IAAA,GACF,GAAG,CAAC,OAAO,CAAC;AAAA,EAEjB;AAEA,CAAC;"}
package/dist/index119.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
2
- import { isCssColor as f } from "./index207.js";
2
+ import { isCssColor as f } from "./index197.js";
3
3
  const _ = /* @__PURE__ */ c("svg", {
4
- xmlns: "http://www.w3.org/2000/svg",
5
- viewBox: "0 0 512 512"
4
+ viewBox: "0 0 512 512",
5
+ xmlns: "http://www.w3.org/2000/svg"
6
6
  }, [
7
7
  /* @__PURE__ */ c("path", {
8
- fill: "currentColor",
9
- d: "M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"
8
+ d: "M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z",
9
+ fill: "currentColor"
10
10
  })
11
11
  ], -1), x = [
12
12
  _
@@ -1 +1 @@
1
- {"version":3,"file":"index119.js","sources":["../src/components/BbSpinner/BbSpinner.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 512 512\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z\"\n })\n], -1)\nconst _hoisted_2 = [\n _hoisted_1\n]\n\nimport { computed } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport type { Classes } from \"@/types/Classes\";\nimport type { CommonProps, Size as S } from \"@/types/CommonProps\";\nimport type { Size as IconSize } from \"../BbIcon/BbIcon.vue\";\n\nexport type Size = IconSize;\nexport type BbSpinnerProps = Pick<CommonProps, \"color\"> & S<IconSize>;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSpinner',\n props: {\n color: {},\n size: { default: \"md\" }\n },\n setup(__props: any) {\n\nconst props = __props;\n\nconst sizeMap: IconSize = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 28,\n xl: 36,\n xxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n const classes: Classes = {\n \"bb-spinner\": true,\n };\n const width = computed(() => {\n let dimension: number;\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as keyof IconSize] ?? parseInt(props.size, 10);\n } else {\n dimension = props.size;\n }\n return dimension + `px`;\n });\n let style: { [key: string]: any } = { width: width.value };\n\n if (props.color) {\n if (isCssColor(props.color)) {\n style.color = props.color;\n } else {\n classes[`bb-spinner--${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(iconAttributes.value)), _hoisted_2, 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps"],"mappings":";;AAGA,MAAMA,sBAA8C,OAAO;AAAA,EACzD,OAAO;AAAA,EACP,SAAS;AACX,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,MAAM;AAAA,IACN,GAAG;AAAA,EAAA,CACJ;AACH,GAAG,EAAE,GACCC,IAAa;AAAA,EACjBD;AACF,GAY4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,EAAE,SAAS,KAAK;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAERE,IAAoB;AAAA,MACxB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGDC,IAAiBC,EAAS,MAAM;AACpC,YAAMC,IAAmB;AAAA,QACvB,cAAc;AAAA,MAAA;AAWhB,UAAIC,IAAgC,EAAE,OATxBF,EAAS,MAAM;AACvB,YAAAG;AACA,eAAA,OAAON,EAAM,QAAS,WACxBM,IAAYL,EAAQD,EAAM,IAAsB,KAAK,SAASA,EAAM,MAAM,EAAE,IAE5EM,IAAYN,EAAM,MAEbM,IAAY;AAAA,MAAA,CACpB,EACkD,MAAM;AAEzD,aAAIN,EAAM,UACJO,EAAWP,EAAM,KAAK,IACxBK,EAAM,QAAQL,EAAM,QAEpBI,EAAQ,eAAeJ,EAAM,KAAK,EAAE,IAAI,KAGrC;AAAA,QACL,OAAOI;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACF,CACD;AAEM,WAAA,CAACG,GAAUC,OACRC,EAAc,GAAAC,EAAoB,QAAQC,EAAgBC,EAAoBX,EAAe,KAAK,CAAC,GAAGN,GAAY,EAAE;AAAA,EAE9H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index119.js","sources":["../src/components/BbSpinner/BbSpinner.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 512 512\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z\",\n fill: \"currentColor\"\n })\n], -1)\nconst _hoisted_2 = [\n _hoisted_1\n]\n\nimport { computed } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Classes } from '@/types/Classes';\nimport type { CommonProps, Size as S } from '@/types/CommonProps';\nimport type { Size as IconSize } from '../BbIcon/BbIcon.vue';\n\nexport type Size = IconSize;\nexport type BbSpinnerProps = Pick<CommonProps, 'color'> & S<IconSize>;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbSpinner',\n props: {\n color: {},\n size: { default: 'md' }\n },\n setup(__props: any) {\n\nconst props = __props;\n\nconst sizeMap: IconSize = {\n\txs: 12,\n\tsm: 16,\n\tmd: 24,\n\tlg: 28,\n\txl: 36,\n\txxl: 40,\n};\n\nconst iconAttributes = computed(() => {\n\tconst classes: Classes = {\n\t\t'bb-spinner': true,\n\t};\n\tconst width = computed(() => {\n\t\tlet dimension: number;\n\t\tif (typeof props.size === 'string') {\n\t\t\tdimension =\n\t\t\t\tsizeMap[props.size as keyof IconSize] ?? parseInt(props.size, 10);\n\t\t} else {\n\t\t\tdimension = props.size;\n\t\t}\n\t\treturn dimension + `px`;\n\t});\n\tlet style: { [key: string]: any } = { width: width.value };\n\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.color = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-spinner--${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(iconAttributes.value)), _hoisted_2, 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","iconAttributes","computed","classes","style","dimension","isCssColor","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps"],"mappings":";;AAGA,MAAMA,sBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,MAAM;AAAA,EAAA,CACP;AACH,GAAG,EAAE,GACCC,IAAa;AAAA,EACjBD;AACF,GAY4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,EAAE,SAAS,KAAK;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAERE,IAAoB;AAAA,MACzB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGAC,IAAiBC,EAAS,MAAM;AACrC,YAAMC,IAAmB;AAAA,QACxB,cAAc;AAAA,MAAA;AAYf,UAAIC,IAAgC,EAAE,OAVxBF,EAAS,MAAM;AACxB,YAAAG;AACA,eAAA,OAAON,EAAM,QAAS,WACzBM,IACCL,EAAQD,EAAM,IAAsB,KAAK,SAASA,EAAM,MAAM,EAAE,IAEjEM,IAAYN,EAAM,MAEZM,IAAY;AAAA,MAAA,CACnB,EACkD,MAAM;AAEzD,aAAIN,EAAM,UACLO,EAAWP,EAAM,KAAK,IACzBK,EAAM,QAAQL,EAAM,QAEpBI,EAAQ,eAAeJ,EAAM,KAAK,EAAE,IAAI,KAGnC;AAAA,QACN,OAAOI;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACD,CACA;AAEM,WAAA,CAACG,GAAUC,OACRC,EAAc,GAAAC,EAAoB,QAAQC,EAAgBC,EAAoBX,EAAe,KAAK,CAAC,GAAGN,GAAY,EAAE;AAAA,EAE9H;AAEA,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index120.js","sources":["../src/utilities/functions/isNil.ts"],"sourcesContent":["/**\n * Returns true if the item is not null or undefined\n * @param value The item to check\n * @returns true | false\n */\nexport const isNil = (value: unknown) => {\n if(typeof value === 'undefined') return true;\n if(value === null) return true;\n return false;\n}\n"],"names":["isNil","value"],"mappings":"AAKa,MAAAA,IAAQ,CAACC,MACjB,OAAOA,IAAU,OACjBA,MAAU;"}
1
+ {"version":3,"file":"index120.js","sources":["../src/utilities/functions/isNil.ts"],"sourcesContent":["/**\n * Returns true if the item is not null or undefined\n * @param value The item to check\n * @returns true | false\n */\nexport const isNil = (value: unknown) => {\n\tif (typeof value === 'undefined') return true;\n\tif (value === null) return true;\n\treturn false;\n};\n"],"names":["isNil","value"],"mappings":"AAKa,MAAAA,IAAQ,CAACC,MACjB,OAAOA,IAAU,OACjBA,MAAU;"}
package/dist/index121.js CHANGED
@@ -1,4 +1,4 @@
1
- import { clamp as o } from "./index212.js";
1
+ import { clamp as o } from "./index196.js";
2
2
  const r = (t, e) => t * 100 / e, p = (t, e) => t / 100 * e, l = (t, e, n) => r(t - e, n - e), P = ({
3
3
  value: t = 0,
4
4
  originalBounds: e,
@@ -1 +1 @@
1
- {"version":3,"file":"index121.js","sources":["../src/utilities/functions/percentage.ts"],"sourcesContent":["import { clamp } from \"./clamp\";\n\n/**\n * Get the percentage \"a\" represents in total\n * @returns\n */\nexport const getAsPercentage = (a: number, total: number) => (a * 100) / total;\n/**\n * Get \"a\" knowing the percentage\n * @returns\n */\nexport const getPercentageFrom = (a: number, total: number) =>\n (a / 100) * total;\n\n/**\n * Normalize the bounds of a value\n */\nexport const getAsPercentageBetween = (a: number, min: number, max: number) =>\n getAsPercentage(a - min, max - min);\n\n /**\n * Get a value \"b\" that is the same percentage as \"a\" into it's target bounds.\n * EG 40% = 4 for a bound 0, 10 is transposed to 40% = 8\n * for bounds 0, 20, or again 40% = 4 for bound 10, 20\n */\ntype TransposeValueParameters = {\n value: number,\n originalBounds: {\n min: number,\n max: number\n },\n targetBounds: {\n min: number,\n max: number\n },\n step: number\n}\nexport const transposeValue: (params: TransposeValueParameters) => number = ({\n value = 0,\n originalBounds,\n targetBounds,\n step = 1,\n}) => {\n const percentageOfOriginal = getAsPercentageBetween(\n value,\n originalBounds.min,\n originalBounds.max\n );\n const transposedValue = getPercentageFrom(\n percentageOfOriginal,\n targetBounds.max - targetBounds.min\n );\n const adjusted = transposedValue + targetBounds.min;\n const withStep = Math.round(adjusted / step) * step;\n \n const clamped = clamp(withStep, targetBounds.min, targetBounds.max);\n return clamped;\n};"],"names":["getAsPercentage","a","total","getPercentageFrom","getAsPercentageBetween","min","max","transposeValue","value","originalBounds","targetBounds","step","percentageOfOriginal","adjusted","withStep","clamp"],"mappings":";AAMO,MAAMA,IAAkB,CAACC,GAAWC,MAAmBD,IAAI,MAAOC,GAK5DC,IAAoB,CAACF,GAAWC,MAC1CD,IAAI,MAAOC,GAKDE,IAAyB,CAACH,GAAWI,GAAaC,MAC7DN,EAAgBC,IAAII,GAAKC,IAAMD,CAAG,GAmBvBE,IAA+D,CAAC;AAAA,EACzE,OAAAC,IAAQ;AAAA,EACR,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AACX,MAAM;AACF,QAAMC,IAAuBR;AAAA,IACzBI;AAAA,IACAC,EAAe;AAAA,IACfA,EAAe;AAAA,EAAA,GAMbI,IAJkBV;AAAA,IACpBS;AAAA,IACAF,EAAa,MAAMA,EAAa;AAAA,EAAA,IAEDA,EAAa,KAC1CI,IAAW,KAAK,MAAMD,IAAWF,CAAI,IAAIA;AAGxC,SADSI,EAAMD,GAAUJ,EAAa,KAAKA,EAAa,GAAG;AAEtE;"}
1
+ {"version":3,"file":"index121.js","sources":["../src/utilities/functions/percentage.ts"],"sourcesContent":["import { clamp } from './clamp';\n\n/**\n * Get the percentage \"a\" represents in total\n * @returns\n */\nexport const getAsPercentage = (a: number, total: number) => (a * 100) / total;\n/**\n * Get \"a\" knowing the percentage\n * @returns\n */\nexport const getPercentageFrom = (a: number, total: number) =>\n\t(a / 100) * total;\n\n/**\n * Normalize the bounds of a value\n */\nexport const getAsPercentageBetween = (a: number, min: number, max: number) =>\n\tgetAsPercentage(a - min, max - min);\n\n/**\n * Get a value \"b\" that is the same percentage as \"a\" into it's target bounds.\n * EG 40% = 4 for a bound 0, 10 is transposed to 40% = 8\n * for bounds 0, 20, or again 40% = 4 for bound 10, 20\n */\ntype TransposeValueParameters = {\n\tvalue: number;\n\toriginalBounds: {\n\t\tmin: number;\n\t\tmax: number;\n\t};\n\ttargetBounds: {\n\t\tmin: number;\n\t\tmax: number;\n\t};\n\tstep: number;\n};\nexport const transposeValue: (params: TransposeValueParameters) => number = ({\n\tvalue = 0,\n\toriginalBounds,\n\ttargetBounds,\n\tstep = 1,\n}) => {\n\tconst percentageOfOriginal = getAsPercentageBetween(\n\t\tvalue,\n\t\toriginalBounds.min,\n\t\toriginalBounds.max\n\t);\n\tconst transposedValue = getPercentageFrom(\n\t\tpercentageOfOriginal,\n\t\ttargetBounds.max - targetBounds.min\n\t);\n\tconst adjusted = transposedValue + targetBounds.min;\n\tconst withStep = Math.round(adjusted / step) * step;\n\n\tconst clamped = clamp(withStep, targetBounds.min, targetBounds.max);\n\treturn clamped;\n};\n"],"names":["getAsPercentage","a","total","getPercentageFrom","getAsPercentageBetween","min","max","transposeValue","value","originalBounds","targetBounds","step","percentageOfOriginal","adjusted","withStep","clamp"],"mappings":";AAMO,MAAMA,IAAkB,CAACC,GAAWC,MAAmBD,IAAI,MAAOC,GAK5DC,IAAoB,CAACF,GAAWC,MAC3CD,IAAI,MAAOC,GAKAE,IAAyB,CAACH,GAAWI,GAAaC,MAC9DN,EAAgBC,IAAII,GAAKC,IAAMD,CAAG,GAmBtBE,IAA+D,CAAC;AAAA,EAC5E,OAAAC,IAAQ;AAAA,EACR,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AACR,MAAM;AACL,QAAMC,IAAuBR;AAAA,IAC5BI;AAAA,IACAC,EAAe;AAAA,IACfA,EAAe;AAAA,EAAA,GAMVI,IAJkBV;AAAA,IACvBS;AAAA,IACAF,EAAa,MAAMA,EAAa;AAAA,EAAA,IAEEA,EAAa,KAC1CI,IAAW,KAAK,MAAMD,IAAWF,CAAI,IAAIA;AAGxC,SADSI,EAAMD,GAAUJ,EAAa,KAAKA,EAAa,GAAG;AAEnE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index122.js","sources":["../src/utilities/functions/wait.ts"],"sourcesContent":["/** Wait a specified amount of time before resolving a promise */\nexport const wait: (ms: number) => Promise<void> = (ms) => new Promise((resolve) => setTimeout(resolve, ms));"],"names":["wait","ms","resolve"],"mappings":"AACa,MAAAA,IAAsC,CAACC,MAAO,IAAI,QAAQ,CAACC,MAAY,WAAWA,GAASD,CAAE,CAAC;"}
1
+ {"version":3,"file":"index122.js","sources":["../src/utilities/functions/wait.ts"],"sourcesContent":["/** Wait a specified amount of time before resolving a promise */\nexport const wait: (ms: number) => Promise<void> = (ms) =>\n\tnew Promise((resolve) => setTimeout(resolve, ms));\n"],"names":["wait","ms","resolve"],"mappings":"AACa,MAAAA,IAAsC,CAACC,MACnD,IAAI,QAAQ,CAACC,MAAY,WAAWA,GAASD,CAAE,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index124.js","sources":["../src/utilities/functions/isNotNil.ts"],"sourcesContent":["/**\n * Returns true if the item is not null or undefined\n * @param value The item to check\n * @returns true | false\n */\nexport const isNotNil = <T extends unknown>(value: T): value is Exclude<T, null | undefined> => {\n if(typeof value === 'undefined') return false;\n if(value === null) return false;\n return true;\n}\n"],"names":["isNotNil","value"],"mappings":"AAKa,MAAAA,IAAW,CAAoBC,MACvC,SAAOA,IAAU,OACjBA,MAAU;"}
1
+ {"version":3,"file":"index124.js","sources":["../src/utilities/functions/isNotNil.ts"],"sourcesContent":["/**\n * Returns true if the item is not null or undefined\n * @param value The item to check\n * @returns true | false\n */\nexport const isNotNil = <T>(\n\tvalue: T\n): value is Exclude<T, null | undefined> => {\n\tif (typeof value === 'undefined') return false;\n\tif (value === null) return false;\n\treturn true;\n};\n"],"names":["isNotNil","value"],"mappings":"AAKa,MAAAA,IAAW,CACvBC,MAEI,SAAOA,IAAU,OACjBA,MAAU;"}
package/dist/index125.js CHANGED
@@ -1,5 +1,5 @@
1
- import t from "./index221.js";
2
- const e = () => ({
1
+ import t from "./index207.js";
2
+ const o = () => ({
3
3
  getItemText(r, n) {
4
4
  if (typeof r == "string" && !n)
5
5
  return r;
@@ -8,7 +8,7 @@ const e = () => ({
8
8
  let f = n(r);
9
9
  return typeof f != "string" && (f = JSON.stringify(f)), f;
10
10
  } else if (typeof n == "string") {
11
- let f = t(r, n);
11
+ const f = t(r, n);
12
12
  return typeof f == "string" ? f : JSON.stringify(f);
13
13
  }
14
14
  }
@@ -16,6 +16,6 @@ const e = () => ({
16
16
  }
17
17
  });
18
18
  export {
19
- e as useItemText
19
+ o as useItemText
20
20
  };
21
21
  //# sourceMappingURL=index125.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index125.js","sources":["../src/composables/useItemText.ts"],"sourcesContent":["import get from \"@/utilities/functions/get\";\n\ntype NestedKeyOf<ObjectType extends object> = \n{[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object \n? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`\n: `${Key}`\n}[keyof ObjectType & (string | number)];\n\nexport type Path<T> = T extends object ? NestedKeyOf<T> | ((item: T) => string | number) | undefined | string & Record<never, never> : undefined;\n\nexport const useItemText = () => ({\n getItemText<T>(item: T, getter?: Path<T>): string {\n if (typeof item === \"string\" && !getter) return item;\n else if (getter) {\n if(typeof getter === 'function') {\n let found = getter(item);\n if (typeof found !== \"string\") found = JSON.stringify(found);\n return found;\n } else if (typeof getter === 'string') {\n let found = get(item, getter);\n if(typeof found === 'string') return found;\n else return JSON.stringify(found)\n }\n }\n return JSON.stringify(item);\n },\n});"],"names":["useItemText","item","getter","found","get"],"mappings":";AAUO,MAAMA,IAAc,OAAO;AAAA,EAChC,YAAeC,GAASC,GAA0B;AAC5C,QAAA,OAAOD,KAAS,YAAY,CAACC;AAAe,aAAAD;AAAA,QACvCC;AACJ,UAAA,OAAOA,KAAW,YAAY;AAC3B,YAAAC,IAAQD,EAAOD,CAAI;AACvB,eAAI,OAAOE,KAAU,aAAmBA,IAAA,KAAK,UAAUA,CAAK,IACrDA;AAAA,MAAA,WACE,OAAOD,KAAW,UAAU;AACjC,YAAAC,IAAQC,EAAIH,GAAMC,CAAM;AAC5B,eAAG,OAAOC,KAAU,WAAiBA,IACzB,KAAK,UAAUA,CAAK;AAAA,MAClC;AAAA;AAEK,WAAA,KAAK,UAAUF,CAAI;AAAA,EAC5B;AACF;"}
1
+ {"version":3,"file":"index125.js","sources":["../src/composables/useItemText.ts"],"sourcesContent":["import get from '@/utilities/functions/get';\n\ntype NestedKeyOf<ObjectType extends object> = {\n\t[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object\n\t\t? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`\n\t\t: `${Key}`;\n}[keyof ObjectType & (string | number)];\n\nexport type Path<T> = T extends object\n\t?\n\t\t\t| NestedKeyOf<T>\n\t\t\t| ((item: T) => string | number)\n\t\t\t| undefined\n\t\t\t| (string & Record<never, never>)\n\t: undefined;\n\nexport const useItemText = () => ({\n\tgetItemText<T>(item: T, getter?: Path<T>): string {\n\t\tif (typeof item === 'string' && !getter) return item;\n\t\telse if (getter) {\n\t\t\tif (typeof getter === 'function') {\n\t\t\t\tlet found = getter(item);\n\t\t\t\tif (typeof found !== 'string') found = JSON.stringify(found);\n\t\t\t\treturn found;\n\t\t\t} else if (typeof getter === 'string') {\n\t\t\t\tconst found = get(item, getter);\n\t\t\t\tif (typeof found === 'string') return found;\n\t\t\t\telse return JSON.stringify(found);\n\t\t\t}\n\t\t}\n\t\treturn JSON.stringify(item);\n\t},\n});\n"],"names":["useItemText","item","getter","found","get"],"mappings":";AAgBO,MAAMA,IAAc,OAAO;AAAA,EACjC,YAAeC,GAASC,GAA0B;AAC7C,QAAA,OAAOD,KAAS,YAAY,CAACC;AAAe,aAAAD;AAAA,QACvCC;AACJ,UAAA,OAAOA,KAAW,YAAY;AAC7B,YAAAC,IAAQD,EAAOD,CAAI;AACvB,eAAI,OAAOE,KAAU,aAAkBA,IAAA,KAAK,UAAUA,CAAK,IACpDA;AAAA,MAAA,WACG,OAAOD,KAAW,UAAU;AAChC,cAAAC,IAAQC,EAAIH,GAAMC,CAAM;AAC9B,eAAI,OAAOC,KAAU,WAAiBA,IAC1B,KAAK,UAAUA,CAAK;AAAA,MACjC;AAAA;AAEM,WAAA,KAAK,UAAUF,CAAI;AAAA,EAC3B;AACD;"}
package/dist/index126.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index221.js";
1
+ import o from "./index207.js";
2
2
  const e = () => ({
3
3
  getItemValue(n, f) {
4
4
  if (typeof f > "u")
@@ -1 +1 @@
1
- {"version":3,"file":"index126.js","sources":["../src/composables/useItemValue.ts"],"sourcesContent":["import get from \"@/utilities/functions/get\";\n\nexport const useItemValue = () => ({\n getItemValue<T>(item: T, getter?: string | ((item: T) => any)): any {\n if(typeof getter === 'undefined') return item;\n if(typeof getter === 'function') return getter(item)\n if(typeof getter === 'string') return get(item, getter);\n },\n});\n"],"names":["useItemValue","item","getter","get"],"mappings":";AAEO,MAAMA,IAAe,OAAO;AAAA,EACjC,aAAgBC,GAASC,GAA2C;AAClE,QAAG,OAAOA,IAAW;AAAoB,aAAAD;AACzC,QAAG,OAAOC,KAAW;AAAY,aAAOA,EAAOD,CAAI;AACnD,QAAG,OAAOC,KAAW;AAAiB,aAAAC,EAAIF,GAAMC,CAAM;AAAA,EACxD;AACF;"}
1
+ {"version":3,"file":"index126.js","sources":["../src/composables/useItemValue.ts"],"sourcesContent":["import get from '@/utilities/functions/get';\n\nexport const useItemValue = () => ({\n\tgetItemValue<T>(item: T, getter?: string | ((item: T) => any)): any {\n\t\tif (typeof getter === 'undefined') return item;\n\t\tif (typeof getter === 'function') return getter(item);\n\t\tif (typeof getter === 'string') return get(item, getter);\n\t},\n});\n"],"names":["useItemValue","item","getter","get"],"mappings":";AAEO,MAAMA,IAAe,OAAO;AAAA,EAClC,aAAgBC,GAASC,GAA2C;AACnE,QAAI,OAAOA,IAAW;AAAoB,aAAAD;AAC1C,QAAI,OAAOC,KAAW;AAAY,aAAOA,EAAOD,CAAI;AACpD,QAAI,OAAOC,KAAW;AAAiB,aAAAC,EAAIF,GAAMC,CAAM;AAAA,EACxD;AACD;"}
package/dist/index127.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isArray as b, isPlainObject as m } from "./index249.js";
1
+ import { isArray as b, isPlainObject as m } from "./index252.js";
2
2
  function i(e, n, l, o, r) {
3
3
  const u = {}.propertyIsEnumerable.call(o, n) ? "enumerable" : "nonenumerable";
4
4
  u === "enumerable" && (e[n] = l), r && u === "nonenumerable" && Object.defineProperty(e, n, {
package/dist/index128.js CHANGED
@@ -1,4 +1,7 @@
1
- const u = (e, s) => Object.keys(e).reduce((t, r) => (t[r] = s(e[r], r, e), t), {});
1
+ const u = (e, s) => Object.keys(e).reduce(
2
+ (t, r) => (t[r] = s(e[r], r, e), t),
3
+ {}
4
+ );
2
5
  export {
3
6
  u as mapValues
4
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index128.js","sources":["../src/utilities/functions/mapValues.ts"],"sourcesContent":["/*\nMaps the values of an object.\nIteratee is run with value, key, object as arguments\n\n*/\nexport const mapValues = <\n T extends Record<string, unknown>,\n U extends unknown\n>(\n obj: T,\n fn: (v: T[keyof T], k: keyof T, o: T) => U\n): { [Property in keyof T]: ReturnType<typeof fn> } =>\n (Object.keys(obj) as (keyof T)[]).reduce((acc, k) => {\n acc[k] = fn(obj[k], k, obj);\n return acc;\n }, {} as { [Property in keyof T]: ReturnType<typeof fn> });\n"],"names":["mapValues","obj","fn","acc","k"],"mappings":"AAKa,MAAAA,IAAY,CAIvBC,GACAC,MAEC,OAAO,KAAKD,CAAG,EAAkB,OAAO,CAACE,GAAKC,OAC7CD,EAAIC,CAAC,IAAIF,EAAGD,EAAIG,CAAC,GAAGA,GAAGH,CAAG,GACnBE,IACN,CAAsD,CAAA;"}
1
+ {"version":3,"file":"index128.js","sources":["../src/utilities/functions/mapValues.ts"],"sourcesContent":["/*\nMaps the values of an object.\nIteratee is run with value, key, object as arguments\n\n*/\nexport const mapValues = <T extends Record<string, unknown>, U>(\n\tobj: T,\n\tfn: (v: T[keyof T], k: keyof T, o: T) => U\n): { [Property in keyof T]: ReturnType<typeof fn> } =>\n\t(Object.keys(obj) as (keyof T)[]).reduce(\n\t\t(acc, k) => {\n\t\t\tacc[k] = fn(obj[k], k, obj);\n\t\t\treturn acc;\n\t\t},\n\t\t{} as { [Property in keyof T]: ReturnType<typeof fn> }\n\t);\n"],"names":["mapValues","obj","fn","acc","k"],"mappings":"AAKO,MAAMA,IAAY,CACxBC,GACAC,MAEC,OAAO,KAAKD,CAAG,EAAkB;AAAA,EACjC,CAACE,GAAKC,OACLD,EAAIC,CAAC,IAAIF,EAAGD,EAAIG,CAAC,GAAGA,GAAGH,CAAG,GACnBE;AAAA,EAER,CAAC;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index129.js","sources":["../src/composables/useRoute.ts"],"sourcesContent":["import { computed, getCurrentInstance, type Ref } from \"vue\";\nimport type { RouteLocationNormalizedLoaded } from \"vue-router\";\n\nexport function useRoute(): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance();\n\n return computed(() => vm?.proxy?.$route);\n}\n"],"names":["useRoute","vm","getCurrentInstance","computed","_a"],"mappings":";AAGO,SAASA,IAA2D;AACzE,QAAMC,IAAKC;AAEX,SAAOC,EAAS,MAAM;;AAAA,YAAAC,IAAAH,KAAA,gBAAAA,EAAI,UAAJ,gBAAAG,EAAW;AAAA,GAAM;AACzC;"}
1
+ {"version":3,"file":"index129.js","sources":["../src/composables/useRoute.ts"],"sourcesContent":["import { computed, getCurrentInstance, type Ref } from 'vue';\nimport type { RouteLocationNormalizedLoaded } from 'vue-router';\n\nexport function useRoute(): Ref<RouteLocationNormalizedLoaded | undefined> {\n\tconst vm = getCurrentInstance();\n\n\treturn computed(() => vm?.proxy?.$route);\n}\n"],"names":["useRoute","vm","getCurrentInstance","computed","_a"],"mappings":";AAGO,SAASA,IAA2D;AAC1E,QAAMC,IAAKC;AAEX,SAAOC,EAAS,MAAM;;AAAA,YAAAC,IAAAH,KAAA,gBAAAA,EAAI,UAAJ,gBAAAG,EAAW;AAAA,GAAM;AACxC;"}
package/dist/index13.js CHANGED
@@ -33,8 +33,8 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
33
33
  readonly: {}
34
34
  },
35
35
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
36
- setup(C, { emit: E }) {
37
- const t = C, a = E, d = y(), i = y(!1), { loading: x, options: m } = N({
36
+ setup(E, { emit: x }) {
37
+ const t = E, a = x, d = y(), i = y(!1), { loading: C, options: m } = N({
38
38
  dependencies: l(() => t.dependencies),
39
39
  depsDebounceTime: t.depsDebounceTime,
40
40
  disabled: l(() => t.disabled),
@@ -72,17 +72,17 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
72
72
  e.target instanceof HTMLElement && ((n = d.value) != null && n.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", b), document.removeEventListener("click", p)));
73
73
  };
74
74
  return (e, n) => (c(), r("span", {
75
+ ref_key: "container",
76
+ ref: d,
75
77
  class: f(["bb-base-checkbox-group", {
76
78
  "bb-base-checkbox-group--errors": e.hasErrors,
77
79
  "bb-base-checkbox-group--horizontal": e.direction === "horizontal",
78
80
  "bb-base-checkbox-group--vertical": e.direction === "vertical"
79
- }]),
80
- ref_key: "container",
81
- ref: d
81
+ }])
82
82
  }, [
83
83
  g("span", M, [
84
84
  s(e.$slots, "prepend"),
85
- !u(m).length && u(x) ? (c(), r("span", H, [
85
+ !u(m).length && u(C) ? (c(), r("span", H, [
86
86
  s(e.$slots, "loading", {}, () => [
87
87
  k(v(e.loadingText), 1)
88
88
  ])
@@ -103,15 +103,15 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
103
103
  }])
104
104
  }, [
105
105
  S(I, T({
106
+ id: o.id,
106
107
  autofocus: e.autofocus && !$,
107
108
  checked: o.selected,
108
109
  color: e.color,
109
110
  disabled: o.disabled,
110
111
  "has-errors": e.hasErrors,
111
- id: o.id,
112
112
  name: e.name,
113
+ "on-change": (h) => D(h, o),
113
114
  readonly: e.readonly,
114
- onChange: (h) => D(h, o),
115
115
  "true-value": o.value
116
116
  }, _), {
117
117
  icon: F((h) => [
@@ -121,7 +121,7 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
121
121
  }, h))
122
122
  ]),
123
123
  _: 2
124
- }, 1040, ["autofocus", "checked", "color", "disabled", "has-errors", "id", "name", "readonly", "onChange", "true-value"]),
124
+ }, 1040, ["id", "autofocus", "checked", "color", "disabled", "has-errors", "name", "on-change", "readonly", "true-value"]),
125
125
  g("span", {
126
126
  class: f({
127
127
  "bb-base-checkbox-group-option__text": !0,
@@ -129,9 +129,9 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
129
129
  })
130
130
  }, [
131
131
  s(e.$slots, "label", {
132
- text: o.text,
132
+ checked: o.selected,
133
133
  item: o.original,
134
- checked: o.selected
134
+ text: o.text
135
135
  }, () => [
136
136
  k(v(o.text), 1)
137
137
  ])