bitboss-ui 0.1.2 → 0.1.4

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 (284) hide show
  1. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -0
  2. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +151 -0
  3. package/dist/components/BbPopover/BbPopover.vue.d.ts +96 -0
  4. package/dist/components/BbRatio/BbRatio.vue.d.ts +12 -0
  5. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.js +104 -98
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +123 -95
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +43 -3
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +2 -2
  14. package/dist/index102.js +2 -2
  15. package/dist/index103.js +2 -2
  16. package/dist/index104.js +2 -2
  17. package/dist/index105.js +2 -2
  18. package/dist/index106.js +2 -2
  19. package/dist/index107.js +2 -2
  20. package/dist/index108.js +2 -2
  21. package/dist/index109.js +2 -2
  22. package/dist/index110.js +2 -2
  23. package/dist/index111.js +2 -2
  24. package/dist/index112.js +2 -2
  25. package/dist/index113.js +2 -2
  26. package/dist/index114.js +2 -2
  27. package/dist/index115.js +2 -2
  28. package/dist/index116.js +2 -2
  29. package/dist/index117.js +2 -2
  30. package/dist/index118.js +2 -2
  31. package/dist/index119.js +3 -2
  32. package/dist/index119.js.map +1 -1
  33. package/dist/index12.js +4 -4
  34. package/dist/index120.js +2 -2
  35. package/dist/index121.js +3 -2
  36. package/dist/index121.js.map +1 -1
  37. package/dist/index123.js +2 -2
  38. package/dist/index124.js +2 -3
  39. package/dist/index124.js.map +1 -1
  40. package/dist/index125.js +2 -2
  41. package/dist/index126.js +2 -3
  42. package/dist/index126.js.map +1 -1
  43. package/dist/index127.js +2 -2
  44. package/dist/index128.js +2 -2
  45. package/dist/index129.js +3 -2
  46. package/dist/index129.js.map +1 -1
  47. package/dist/index130.js +2 -2
  48. package/dist/index131.js +2 -2
  49. package/dist/index132.js +2 -2
  50. package/dist/index133.js +2 -2
  51. package/dist/index134.js +2 -3
  52. package/dist/index134.js.map +1 -1
  53. package/dist/index135.js +2 -2
  54. package/dist/index136.js +2 -2
  55. package/dist/index137.js +2 -2
  56. package/dist/index138.js +2 -2
  57. package/dist/index139.js +2 -2
  58. package/dist/index14.js +6 -6
  59. package/dist/index140.js +3 -2
  60. package/dist/index140.js.map +1 -1
  61. package/dist/index141.js +2 -2
  62. package/dist/index142.js +3 -2
  63. package/dist/index142.js.map +1 -1
  64. package/dist/index145.js +2 -2
  65. package/dist/index146.js +2 -3
  66. package/dist/index146.js.map +1 -1
  67. package/dist/index147.js +2 -2
  68. package/dist/index148.js +2 -3
  69. package/dist/index148.js.map +1 -1
  70. package/dist/index149.js +2 -2
  71. package/dist/index150.js +2 -2
  72. package/dist/index151.js +3 -2
  73. package/dist/index151.js.map +1 -1
  74. package/dist/index152.js +3 -4
  75. package/dist/index152.js.map +1 -1
  76. package/dist/index153.js +3 -8
  77. package/dist/index153.js.map +1 -1
  78. package/dist/index154.js +3 -2
  79. package/dist/index154.js.map +1 -1
  80. package/dist/index155.js +3 -2
  81. package/dist/index155.js.map +1 -1
  82. package/dist/index156.js +3 -5
  83. package/dist/index156.js.map +1 -1
  84. package/dist/index157.js +348 -17
  85. package/dist/index157.js.map +1 -1
  86. package/dist/index158.js +131 -17
  87. package/dist/index158.js.map +1 -1
  88. package/dist/index159.js +5 -29
  89. package/dist/index159.js.map +1 -1
  90. package/dist/index16.js +1 -1
  91. package/dist/index160.js +19 -2
  92. package/dist/index160.js.map +1 -1
  93. package/dist/index162.js +2 -2
  94. package/dist/index162.js.map +1 -1
  95. package/dist/index163.js +184 -14
  96. package/dist/index163.js.map +1 -1
  97. package/dist/index164.js +2 -13
  98. package/dist/index164.js.map +1 -1
  99. package/dist/index165.js +23 -2
  100. package/dist/index165.js.map +1 -1
  101. package/dist/index166.js +328 -3
  102. package/dist/index166.js.map +1 -1
  103. package/dist/index167.js +16 -2
  104. package/dist/index167.js.map +1 -1
  105. package/dist/index168.js +12 -5
  106. package/dist/index168.js.map +1 -1
  107. package/dist/index169.js +2 -350
  108. package/dist/index169.js.map +1 -1
  109. package/dist/index170.js +2 -134
  110. package/dist/index170.js.map +1 -1
  111. package/dist/index171.js +2 -186
  112. package/dist/index171.js.map +1 -1
  113. package/dist/index172.js +4 -23
  114. package/dist/index172.js.map +1 -1
  115. package/dist/index173.js +8 -328
  116. package/dist/index173.js.map +1 -1
  117. package/dist/index174.js +20 -2
  118. package/dist/index174.js.map +1 -1
  119. package/dist/index175.js +29 -21
  120. package/dist/index175.js.map +1 -1
  121. package/dist/index176.js +2 -3
  122. package/dist/index176.js.map +1 -1
  123. package/dist/index177.js +3 -3
  124. package/dist/index177.js.map +1 -1
  125. package/dist/index178.js +6 -38
  126. package/dist/index178.js.map +1 -1
  127. package/dist/index179.js +2 -28
  128. package/dist/index179.js.map +1 -1
  129. package/dist/index18.js +2 -2
  130. package/dist/index180.js +2 -13
  131. package/dist/index180.js.map +1 -1
  132. package/dist/index181.js +20 -8
  133. package/dist/index181.js.map +1 -1
  134. package/dist/index182.js +3 -96
  135. package/dist/index182.js.map +1 -1
  136. package/dist/index183.js +3 -4
  137. package/dist/index183.js.map +1 -1
  138. package/dist/index184.js +38 -295
  139. package/dist/index184.js.map +1 -1
  140. package/dist/index185.js +9 -6
  141. package/dist/index185.js.map +1 -1
  142. package/dist/index186.js +96 -2
  143. package/dist/index186.js.map +1 -1
  144. package/dist/index187.js +28 -2
  145. package/dist/index187.js.map +1 -1
  146. package/dist/index188.js +13 -2
  147. package/dist/index188.js.map +1 -1
  148. package/dist/index189.js +6 -2
  149. package/dist/index189.js.map +1 -1
  150. package/dist/index190.js +2 -235
  151. package/dist/index190.js.map +1 -1
  152. package/dist/index191.js +294 -88
  153. package/dist/index191.js.map +1 -1
  154. package/dist/index192.js +2 -2
  155. package/dist/index193.js +2 -117
  156. package/dist/index193.js.map +1 -1
  157. package/dist/index194.js +111 -100
  158. package/dist/index194.js.map +1 -1
  159. package/dist/index195.js +105 -78
  160. package/dist/index195.js.map +1 -1
  161. package/dist/index196.js +4 -224
  162. package/dist/index196.js.map +1 -1
  163. package/dist/index197.js +226 -249
  164. package/dist/index197.js.map +1 -1
  165. package/dist/index198.js +2 -38
  166. package/dist/index198.js.map +1 -1
  167. package/dist/index199.js +2 -2
  168. package/dist/index199.js.map +1 -1
  169. package/dist/index20.js +4 -4
  170. package/dist/index200.js +89 -2
  171. package/dist/index200.js.map +1 -1
  172. package/dist/index201.js +79 -2
  173. package/dist/index201.js.map +1 -1
  174. package/dist/index202.js +49 -8
  175. package/dist/index202.js.map +1 -1
  176. package/dist/index203.js +223 -5
  177. package/dist/index203.js.map +1 -1
  178. package/dist/index204.js +261 -0
  179. package/dist/index204.js.map +1 -0
  180. package/dist/index205.js +41 -0
  181. package/dist/index205.js.map +1 -0
  182. package/dist/index206.js +5 -0
  183. package/dist/index206.js.map +1 -0
  184. package/dist/index207.js +5 -0
  185. package/dist/index207.js.map +1 -0
  186. package/dist/index208.js +12 -0
  187. package/dist/index208.js.map +1 -0
  188. package/dist/index209.js +9 -0
  189. package/dist/index209.js.map +1 -0
  190. package/dist/index210.js +5 -0
  191. package/dist/index210.js.map +1 -0
  192. package/dist/index211.js +14 -0
  193. package/dist/index211.js.map +1 -0
  194. package/dist/index212.js +434 -0
  195. package/dist/index212.js.map +1 -0
  196. package/dist/index213.js +12 -0
  197. package/dist/index213.js.map +1 -0
  198. package/dist/index214.js +203 -0
  199. package/dist/index214.js.map +1 -0
  200. package/dist/index22.js +14 -14
  201. package/dist/index24.js +4 -4
  202. package/dist/index26.js +2 -2
  203. package/dist/index28.js +4 -4
  204. package/dist/index34.js +2 -2
  205. package/dist/index36.js +50 -37
  206. package/dist/index36.js.map +1 -1
  207. package/dist/index38.js +39 -39
  208. package/dist/index38.js.map +1 -1
  209. package/dist/index4.js +2 -2
  210. package/dist/index40.js +36 -82
  211. package/dist/index40.js.map +1 -1
  212. package/dist/index42.js +44 -57
  213. package/dist/index42.js.map +1 -1
  214. package/dist/index44.js +98 -79
  215. package/dist/index44.js.map +1 -1
  216. package/dist/index46.js +79 -81
  217. package/dist/index46.js.map +1 -1
  218. package/dist/index48.js +80 -40
  219. package/dist/index48.js.map +1 -1
  220. package/dist/index50.js +40 -283
  221. package/dist/index50.js.map +1 -1
  222. package/dist/index52.js +279 -95
  223. package/dist/index52.js.map +1 -1
  224. package/dist/index54.js +98 -212
  225. package/dist/index54.js.map +1 -1
  226. package/dist/index56.js +213 -44
  227. package/dist/index56.js.map +1 -1
  228. package/dist/index58.js +45 -40
  229. package/dist/index58.js.map +1 -1
  230. package/dist/index59.js +2 -96
  231. package/dist/index59.js.map +1 -1
  232. package/dist/index6.js +4 -4
  233. package/dist/index60.js +44 -2
  234. package/dist/index60.js.map +1 -1
  235. package/dist/index61.js +89 -211
  236. package/dist/index61.js.map +1 -1
  237. package/dist/index63.js +210 -130
  238. package/dist/index63.js.map +1 -1
  239. package/dist/index65.js +134 -18
  240. package/dist/index65.js.map +1 -1
  241. package/dist/index67.js +145 -74
  242. package/dist/index67.js.map +1 -1
  243. package/dist/index69.js +18 -98
  244. package/dist/index69.js.map +1 -1
  245. package/dist/index71.js +77 -17
  246. package/dist/index71.js.map +1 -1
  247. package/dist/index73.js +48 -66
  248. package/dist/index73.js.map +1 -1
  249. package/dist/index75.js +21 -78
  250. package/dist/index75.js.map +1 -1
  251. package/dist/index77.js +77 -46
  252. package/dist/index77.js.map +1 -1
  253. package/dist/index79.js +44 -61
  254. package/dist/index79.js.map +1 -1
  255. package/dist/index8.js +188 -181
  256. package/dist/index8.js.map +1 -1
  257. package/dist/index81.js +82 -106
  258. package/dist/index81.js.map +1 -1
  259. package/dist/index83.js +88 -370
  260. package/dist/index83.js.map +1 -1
  261. package/dist/index85.js +106 -74
  262. package/dist/index85.js.map +1 -1
  263. package/dist/index87.js +371 -68
  264. package/dist/index87.js.map +1 -1
  265. package/dist/index89.js +75 -111
  266. package/dist/index89.js.map +1 -1
  267. package/dist/index91.js +76 -87
  268. package/dist/index91.js.map +1 -1
  269. package/dist/index93.js +111 -32
  270. package/dist/index93.js.map +1 -1
  271. package/dist/index94.js +2 -37
  272. package/dist/index94.js.map +1 -1
  273. package/dist/index95.js +87 -42
  274. package/dist/index95.js.map +1 -1
  275. package/dist/index96.js +2 -43
  276. package/dist/index96.js.map +1 -1
  277. package/dist/index97.js +38 -3
  278. package/dist/index97.js.map +1 -1
  279. package/dist/index98.js +37 -3
  280. package/dist/index98.js.map +1 -1
  281. package/dist/index99.js +47 -3
  282. package/dist/index99.js.map +1 -1
  283. package/dist/style.css +1 -1
  284. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index93.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, 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\", \"onClick\"]\nconst _hoisted_4 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n role: \"img\",\n \"aria-hidden\": \"true\",\n class: \"v-icon__svg\",\n style: {\"font-size\":\"18px\",\"height\":\"18px\",\"width\":\"18px\"}\n}\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"path\", { d: \"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z\" }, null, -1)\nconst _hoisted_6 = [\n _hoisted_5\n]\n\nexport interface BbChipProps {\n clearable?: boolean;\n clearableLabel?: string\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbChip',\n props: {\n clearable: { type: Boolean },\n clearableLabel: { default: 'Elimina' }\n },\n emits: [\"click:clear\"],\n setup(__props: any, { emit }) {\n\n\n\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 ]),\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","onClear","event","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_renderSlot","_withModifiers","_createCommentVNode"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,aACtBC,IAAa,EAAE,OAAO,sBACtBC,IAAa,CAAC,cAAc,SAAS,GACrCC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,eAAe;AAAA,EACf,OAAO;AAAA,EACP,OAAO,EAAC,aAAY,QAAO,QAAS,QAAO,OAAQ,OAAM;AAC3D,GACMC,sBAA8C,QAAQ,EAAE,GAAG,8MAA8M,MAAM,EAAE,GACjRC,IAAa;AAAA,EACjBD;AACF,GAO4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,gBAAgB,EAAE,SAAS,UAAU;AAAA,EACvC;AAAA,EACA,OAAO,CAAC,aAAa;AAAA,EACrB,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAI1B,UAAAC,IAAU,CAACC,MAAqB;AACpC,MAAAF,EAAK,eAAeE,CAAK;AAAA,IAAA;AAGpB,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAoB,QAAQf,GAAY;AAAA,MAC5DgB,EAAoB,QAAQf,GAAY;AAAA,QACtCgB,EAAYL,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,MACAA,EAAK,aACDE,KAAcC,EAAoB,UAAU;AAAA,QAC3C,KAAK;AAAA,QACL,cAAcH,EAAK;AAAA,QACnB,OAAO;AAAA,QACP,SAASM,EAAeR,GAAS,CAAC,QAAO,SAAS,CAAC;AAAA,QACnD,MAAM;AAAA,MAAA,GACL;AAAA,SACAI,EAAW,GAAGC,EAAoB,OAAOZ,GAAYE,CAAU;AAAA,SAC/D,GAAGH,CAAU,KAChBiB,EAAoB,IAAI,EAAI;AAAA,IAAA,CACjC;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index93.js","sources":["../src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport, mergeProps as _mergeProps, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-tooltip__arrow\" }, null, -1)\nconst _hoisted_2 = { class: \"bb-tooltip__bubble\" }\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\"\n })\n], -1)\n\nimport { computed, ref } from \"vue\";\nimport { useFloating, autoUpdate, flip, shift } from \"@floating-ui/vue\";\nimport { nanoid } from \"nanoid\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\n\nexport type BbTooltipProps = {\n block?: boolean;\n disabled?: boolean;\n placement?:\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"right\"\n | \"right-start\"\n | \"right-end\"\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"left\"\n | \"left-start\"\n | \"left-end\";\n theme?: string;\n showClose?: boolean;\n transitionDuration?: number;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTooltip',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n placement: { default: \"top\" },\n theme: { default: \"default\" },\n showClose: { type: Boolean, default: true },\n transitionDuration: { default: 150 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst id = `bb_${nanoid()}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\n\nconst { floatingStyles, placement } = useFloating(wrapper, content, {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [flip(), shift({ padding: 10 })],\n});\n\nconst canOpen = ref(true);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst onMouseenter = () => {\n if (open.value || opening.value || props.disabled) return;\n openTooltip();\n document.addEventListener(\"mouseover\", onMouseOver, { passive: true });\n document.addEventListener(\"keydown\", onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = (event: Event) => {\n const target = event.target;\n if (!target) return;\n if (target instanceof HTMLElement) {\n let isOutside = true;\n\n if (wrapper.value) {\n if (wrapper.value.contains(target)) {\n isOutside = false;\n }\n }\n if (content.value) {\n if (content.value.contains(target)) {\n isOutside = false;\n }\n }\n\n if (isOutside) {\n closeTooltip();\n }\n }\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n if (open.value) {\n if (event.key === \"Escape\") {\n closeTooltip();\n }\n }\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n canOpen.value = false;\n closeTooltip();\n};\n\nconst openTooltip = async () => {\n if (!canOpen.value) return;\n closed.value = false;\n closing.value = false;\n opening.value = true;\n await wait(50);\n open.value = true;\n opening.value = false;\n};\n\nconst closeTooltip = async () => {\n open.value = false;\n opening.value = false;\n closing.value = true;\n await wait(props.transitionDuration);\n closing.value = false;\n closed.value = true;\n document.removeEventListener(\"mouseover\", onMouseOver);\n document.removeEventListener(\"keydown\", onEsc);\n};\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-tooltip--block\": props.block,\n [`bb-tooltip--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-tooltip\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-tooltip__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-describedby': id,\n onMouseenter: onMouseenter,\n onFocus: _unref(onFocus),\n onBlur: closeTooltip,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bb-tooltip__bubble-container\", {\n [`bb-tooltip__bubble-container--${_unref(placement)}`]: true,\n [`bb-tooltip__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-tooltip__bubble-container--hidden': closed.value,\n 'bb-tooltip__bubble-container--closing': closing.value,\n 'bb-tooltip__bubble-container--opening': opening.value,\n 'bb-tooltip__bubble-container--open': open.value,\n }]),\n ref_key: \"content\",\n ref: content,\n style: _normalizeStyle({\n ..._unref(floatingStyles),\n transitionDuration: `${props.transitionDuration}ms`,\n }),\n id: id\n }, [\n _hoisted_1,\n _createElementVNode(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n tabindex: \"-1\",\n \"aria-hidden\": \"true\",\n class: \"bb-tooltip__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 6)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","props","id","nanoid","wrapper","ref","content","floatingStyles","placement","useFloating","autoUpdate","flip","shift","canOpen","opening","open","closing","closed","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","event","target","isOutside","closeTooltip","onClickClose","wait","attributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;AAGA,MAAMA,sBAA8C,QAAQ,EAAE,OAAO,uBAAuB,MAAM,EAAE,GAC9FC,IAAa,EAAE,OAAO,wBACtBC,sBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,g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import { defineComponent as i, ref as n, watch as s, computed as r, openBlock as u, createElementBlock as c, normalizeProps as p, guardReactiveProps as b, createElementVNode as d, renderSlot as m } from "vue";
2
- import { wait as f } from "./index167.js";
3
- import { throttle as v } from "./index166.js";
4
- const _ = { class: "bb-collapsible__content" }, w = /* @__PURE__ */ i({
5
- __name: "BbCollapsible",
6
- props: {
7
- modelValue: { type: Boolean },
8
- transitionDuration: { default: 250 }
9
- },
10
- setup(t) {
11
- const e = t, l = n(e.modelValue);
12
- s(
13
- () => e.modelValue,
14
- v(async (o) => {
15
- o ? l.value = !0 : (await f(e.transitionDuration), l.value = !1);
16
- }, e.transitionDuration)
17
- );
18
- const a = r(() => ({
19
- "aria-expanded": e.modelValue,
20
- class: {
21
- "bb-collapsible": !0,
22
- "bb-collapsible--open": e.modelValue,
23
- "bb-collapsible--closed": !e.modelValue,
24
- "bb-collapsible--invisible": !l.value
25
- },
26
- style: {
27
- transitionDuration: e.transitionDuration + "ms"
28
- }
29
- }));
30
- return (o, V) => (u(), c("div", p(b(a.value)), [
31
- d("div", _, [
32
- m(o.$slots, "default")
33
- ])
34
- ], 16));
35
- }
36
- });
1
+ const e = "";
37
2
  export {
38
- w as default
3
+ e as default
39
4
  };
40
5
  //# sourceMappingURL=index94.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index94.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, 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\";\n\nexport interface BbCollapsibleProps {\n modelValue?: boolean;\n transitionDuration?: number;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCollapsible',\n props: {\n modelValue: { type: Boolean },\n transitionDuration: { default: 250 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst visible = ref(props.modelValue);\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 goinf 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 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 _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","visible","ref","watch","throttle","value","wait","collapsibleAttributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,6BAYAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,oBAAoB,EAAE,SAAS,IAAI;AAAA,EACrC;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAUC,EAAIF,EAAM,UAAU;AAQpC,IAAAG;AAAA,MACE,MAAMH,EAAM;AAAA,MACZI,EAAS,OAAOC,MAAU;AACxB,QAAIA,IACFJ,EAAQ,QAAQ,MAEV,MAAAK,EAAKN,EAAM,kBAAkB,GACnCC,EAAQ,QAAQ;AAAA,MAClB,GACCD,EAAM,kBAAkB;AAAA,IAAA;AAEvB,UAAAO,IAAwBC,EAAS,OAC9B;AAAA,MACL,iBAAiBR,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,CAACS,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAOC,EAAgBC,EAAoBP,EAAsB,KAAK,CAAC,GAAG;AAAA,MAClHQ,EAAoB,OAAOnB,GAAY;AAAA,QACrCoB,EAAYP,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index94.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index95.js CHANGED
@@ -1,50 +1,95 @@
1
- import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount 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 "./index166.js";
3
- const O = /* @__PURE__ */ v({
4
- __name: "BbSmoothHeight",
1
+ import { defineComponent as $, computed as x, resolveComponent as g, openBlock as l, createElementBlock as o, Fragment as v, renderList as s, normalizeClass as i, createElementVNode as t, renderSlot as r, createVNode as k, createSlots as y, withCtx as B, normalizeProps as C, guardReactiveProps as _ } from "vue";
2
+ const T = { class: "bb-tree-row" }, w = { class: "bb-tree-main-content" }, F = /* @__PURE__ */ $({
3
+ __name: "BbTree",
5
4
  props: {
6
- mutationOptions: { default: () => ({ childList: !0 }) },
7
- resizeOptions: {},
8
- strategy: { default: "resize" },
9
- tag: { default: "div" },
10
- transitionDuration: { default: 200 }
5
+ items: { default: () => [] },
6
+ parent: {},
7
+ identifier: { default: "id" },
8
+ depth: { default: 0 },
9
+ expandable: { type: [Boolean, Function] }
11
10
  },
12
- setup(c) {
13
- const n = c, s = r(null), e = r(null), t = r(null);
14
- globalThis.ResizeObserver && (p(() => {
15
- n.strategy === "resize" ? e.value && (t.value = new ResizeObserver(a), t.value.observe(e.value, n.resizeOptions)) : n.strategy === "mutation" && e.value && (t.value = new MutationObserver(a), t.value.observe(e.value, n.mutationOptions)), a();
16
- }), h(() => {
17
- t.value && t.value.disconnect();
11
+ setup(h) {
12
+ const a = h, b = (n) => typeof n.open > "u" ? !0 : n.open, u = x(() => a.items.map((n) => {
13
+ const p = b(n);
14
+ return {
15
+ children: n.children,
16
+ depth: a.depth,
17
+ expandable: n.expandable,
18
+ identifier: n[a.identifier],
19
+ open: p,
20
+ original: n,
21
+ parent: a.parent
22
+ };
18
23
  }));
19
- const a = g(() => {
20
- if (s.value && e.value) {
21
- const o = e.value.scrollHeight + 2;
22
- s.value.style.height = "0px", s.value.style.height = `${o}px`;
23
- }
24
- }, 200);
25
- return (o, y) => (i(), l(u(o.tag), {
26
- class: "bb-smooth-height",
27
- ref_key: "container",
28
- ref: s,
29
- style: m({ "transition-duration": n.transitionDuration / 1e3 + "s" })
30
- }, {
31
- default: f(() => [
32
- (i(), l(u(o.tag), {
33
- class: "content",
34
- ref_key: "content",
35
- ref: e
36
- }, {
37
- default: f(() => [
38
- d(o.$slots, "default")
39
- ]),
40
- _: 3
41
- }, 512))
42
- ]),
43
- _: 3
44
- }, 8, ["style"]));
24
+ return (n, p) => {
25
+ const c = g("BbTree", !0);
26
+ return l(!0), o(v, null, s(u.value, (e) => (l(), o("div", {
27
+ class: i(["bb-tree", {
28
+ [`bb-tree--depth-${e.depth}`]: !0,
29
+ "bb-tree--open": e.open
30
+ }]),
31
+ key: e.identifier
32
+ }, [
33
+ t("div", T, [
34
+ t("div", w, [
35
+ n.$slots[e.identifier] ? r(n.$slots, e.depth, {
36
+ key: 0,
37
+ item: e.original,
38
+ parent: e.parent,
39
+ depth: e.depth,
40
+ expandable: e.expandable
41
+ }) : n.$slots[e.depth] ? r(n.$slots, e.depth, {
42
+ key: 1,
43
+ item: e.original,
44
+ parent: e.parent,
45
+ depth: e.depth,
46
+ expandable: e.expandable
47
+ }) : r(n.$slots, "default", {
48
+ key: 2,
49
+ item: e.original,
50
+ parent: e.parent,
51
+ depth: e.depth,
52
+ expandable: e.expandable
53
+ })
54
+ ])
55
+ ]),
56
+ t("div", {
57
+ class: i(`bb-tree--depth-${e.depth}-children`)
58
+ }, [
59
+ r(n.$slots, `${e.depth}-children`, {
60
+ item: e.original,
61
+ parent: e.parent,
62
+ depth: e.depth,
63
+ expandable: e.expandable
64
+ }, () => [
65
+ r(n.$slots, `${e.identifier}-children`, {
66
+ item: e.original,
67
+ parent: e.parent,
68
+ depth: e.depth,
69
+ expandable: e.expandable
70
+ }, () => [
71
+ k(c, {
72
+ depth: e.depth + 1,
73
+ items: e.children,
74
+ parent: e,
75
+ identifier: e.identifier,
76
+ expandable: n.expandable
77
+ }, y({ _: 2 }, [
78
+ s(n.$slots, (z, d) => ({
79
+ name: d,
80
+ fn: B((f) => [
81
+ r(n.$slots, d, C(_(f)))
82
+ ])
83
+ }))
84
+ ]), 1032, ["depth", "items", "parent", "identifier", "expandable"])
85
+ ])
86
+ ])
87
+ ], 2)
88
+ ], 2))), 128);
89
+ };
45
90
  }
46
91
  });
47
92
  export {
48
- O as default
93
+ F as default
49
94
  };
50
95
  //# sourceMappingURL=index95.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index95.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 { throttle } from \"@/utilities/functions/throttle\";\nimport { ref, onMounted, onBeforeUnmount } from \"vue\";\n\ntype VoidHTMLElements =\n | \"area\"\n | \"base\"\n | \"br\"\n | \"col\"\n | \"command\"\n | \"embed\"\n | \"hr\"\n | \"img\"\n | \"input\"\n | \"keygen\"\n | \"link\"\n | \"meta\"\n | \"param\"\n | \"source\"\n | \"track\"\n | \"wbr\";\n\nexport type BbSmoothHeightProps = {\n mutationOptions?: MutationObserverInit;\n resizeOptions?: ResizeObserverOptions;\n strategy?: \"resize\" | \"mutation\";\n tag?: keyof Omit<HTMLElementTagNameMap, VoidHTMLElements> | \"\";\n transitionDuration?: number;\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","_resolveDynamicComponent","_normalizeStyle","_withCtx","_renderSlot"],"mappings":";;AAiCA,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,mBACbG,EAAU,MAAM;AACV,MAAAL,EAAM,aAAa,WACjBG,EAAQ,UACDC,EAAA,QAAQ,IAAI,eAAeE,CAAa,GACjDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,aAAa,KAElDA,EAAM,aAAa,cACxBG,EAAQ,UACDC,EAAA,QAAQ,IAAI,iBAAiBE,CAAa,GACnDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,eAAe,IAGjDM;IAAA,CACf,GACDC,EAAgB,MAAM;AACpB,MAAIH,EAAS,SACXA,EAAS,MAAM;IACjB,CACD;AAOG,UAAAE,IAAgBE,EAAS,MAAM;AAC/B,UAAAP,EAAU,SAASE,EAAQ,OAAO;AAC9B,cAAAM,IAAgBN,EAAQ,MAAM,eAAe;AACzC,QAAAF,EAAA,MAAM,MAAM,SAAS,OAC/BA,EAAU,MAAM,MAAM,SAAS,GAAGQ,CAAa;AAAA,MACjD;AAAA,OACC,GAAG;AAEC,WAAA,CAACC,GAAUC,OACRC,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,GAAG,GAAG;AAAA,MACrE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,KAAKT;AAAA,MACL,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,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":"index95.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 { computed } from \"vue\";\n\nexport type TreeItem = {\n children?: TreeItem[];\n open?: boolean;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\n [key: symbol | string]: any;\n};\n\nexport type BbTreeProps = {\n items: TreeItem[];\n parent?: TreeItem;\n identifier?: string | number;\n depth?: number;\n expandable?:\n | boolean\n | ((item: TreeItem, depth: number, parent?: TreeItem) => boolean);\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(() => {\n return props.items.map((item: TreeItem) => {\n const open = itemIsOpen(item);\n return {\n children: item.children,\n depth: props.depth,\n expandable: item.expandable,\n identifier: item[props.identifier],\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.depth, {\n key: 0,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n })\n : (_ctx.$slots[item.depth])\n ? _renderSlot(_ctx.$slots, item.depth, {\n key: 1,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n })\n : _renderSlot(_ctx.$slots, \"default\", {\n key: 2,\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n })\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass(`bb-tree--depth-${item.depth}-children`)\n }, [\n _renderSlot(_ctx.$slots, `${item.depth}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n }, () => [\n _renderSlot(_ctx.$slots, `${item.identifier}-children`, {\n item: item.original,\n parent: item.parent,\n depth: item.depth,\n expandable: item.expandable\n }, () => [\n _createVNode(_component_BbTree, {\n depth: item.depth + 1,\n items: item.children,\n parent: item,\n identifier: item.identifier,\n expandable: _ctx.expandable\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\", \"items\", \"parent\", \"identifier\", \"expandable\"])\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","open","_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,0BAuBAC,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,IACp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G,MAAM,CAAC,SAAS,SAAS,UAAU,cAAc,YAAY,CAAC;AAAA,YAAA,CACnE;AAAA,UAAA,CACF;AAAA,WACA,CAAC;AAAA,SACH,CAAC,EACL,GAAG,GAAG;AAAA,IAAA;AAAA,EAET;AAEA,CAAC;"}
package/dist/index96.js CHANGED
@@ -1,46 +1,5 @@
1
- import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, mergeProps as u, createElementVNode as c } from "vue";
2
- import { isCssColor as z } from "./index151.js";
3
- const f = /* @__PURE__ */ c("svg", {
4
- xmlns: "http://www.w3.org/2000/svg",
5
- viewBox: "0 0 512 512"
6
- }, [
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"
10
- })
11
- ], -1), x = [
12
- f
13
- ], w = /* @__PURE__ */ m({
14
- __name: "BbSpinner",
15
- props: {
16
- color: {},
17
- size: { default: "md" }
18
- },
19
- setup(n) {
20
- const e = n, l = {
21
- xs: 12,
22
- sm: 16,
23
- md: 24,
24
- lg: 28,
25
- xl: 36,
26
- xxl: 40
27
- }, i = r(() => {
28
- const s = {
29
- "bb-spinner": !0
30
- };
31
- let o = { width: r(() => {
32
- let t;
33
- return typeof e.size == "string" ? t = l[e.size] ?? parseInt(e.size, 10) : t = e.size, t + "px";
34
- }).value };
35
- return e.color && (z(e.color) ? o.color = e.color : s[`text-${e.color}`] = !0), {
36
- class: s,
37
- style: o
38
- };
39
- });
40
- return (s, p) => (a(), d("span", u({ class: "bb-spinner" }, i.value), x, 16));
41
- }
42
- });
1
+ const e = "";
43
2
  export {
44
- w as default
3
+ e as default
45
4
  };
46
5
  //# sourceMappingURL=index96.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index96.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, mergeProps as _mergeProps, 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 BbIcon from \"../BbIcon/BbIcon.vue\";\nimport { Classes } from \"@/types/Classes\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport { computed } from \"vue\";\n\ntype Size = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\" | string | number;\n\nexport interface BbSpinnerProps {\n color?: string;\n size?: Size;\n}\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\n\n\n\nconst sizeMap: Record<Size, number> = {\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 Size] ?? 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[`text-${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\", _mergeProps({ class: \"bb-spinner\" }, 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","_mergeProps"],"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,GAe4BE,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,GAKRE,IAAgC;AAAA,MACpC,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,IAAY,KAAK,SAASA,EAAM,MAAM,EAAE,IAElEM,IAAYN,EAAM,MAEbM,IAAY;AAAA,MAAA,CACpB,EACkD,MAAM;AAEzD,aAAIN,EAAM,UACJO,EAAWP,EAAM,KAAK,IACxBK,EAAM,QAAQL,EAAM,QAEpBI,EAAQ,QAAQJ,EAAM,KAAK,EAAE,IAAI,KAG9B;AAAA,QACL,OAAOI;AAAA,QACP,OAAAC;AAAA,MAAA;AAAA,IACF,CACD;AAEM,WAAA,CAACG,GAAUC,OACRC,EAAW,GAAGC,EAAoB,QAAQC,EAAY,EAAE,OAAO,aAAA,GAAgBV,EAAe,KAAK,GAAGN,GAAY,EAAE;AAAA,EAE9H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index96.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index97.js CHANGED
@@ -1,6 +1,41 @@
1
- import o from "./index2.js";
2
- import "./index3.js";
1
+ import { defineComponent as n, openBlock as t, createElementBlock as o, createElementVNode as l, renderSlot as c, withModifiers as i, createCommentVNode as r } from "vue";
2
+ const p = { class: "bb-chip" }, _ = { class: "bb-chip__content" }, b = ["aria-label", "onClick"], d = {
3
+ xmlns: "http://www.w3.org/2000/svg",
4
+ viewBox: "0 0 24 24",
5
+ role: "img",
6
+ "aria-hidden": "true",
7
+ class: "v-icon__svg",
8
+ style: { "font-size": "18px", height: "18px", width: "18px" }
9
+ }, h = /* @__PURE__ */ l("path", { d: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z" }, null, -1), L = [
10
+ h
11
+ ], f = /* @__PURE__ */ n({
12
+ __name: "BbChip",
13
+ props: {
14
+ clearable: { type: Boolean },
15
+ clearableLabel: { default: "Elimina" }
16
+ },
17
+ emits: ["click:clear"],
18
+ setup(m, { emit: a }) {
19
+ const s = (e) => {
20
+ a("click:clear", e);
21
+ };
22
+ return (e, u) => (t(), o("span", p, [
23
+ l("span", _, [
24
+ c(e.$slots, "default")
25
+ ]),
26
+ e.clearable ? (t(), o("button", {
27
+ key: 0,
28
+ "aria-label": e.clearableLabel,
29
+ class: "bb-chip__clear-button",
30
+ onClick: i(s, ["stop", "prevent"]),
31
+ type: "button"
32
+ }, [
33
+ (t(), o("svg", d, L))
34
+ ], 8, b)) : r("", !0)
35
+ ]));
36
+ }
37
+ });
3
38
  export {
4
- o as default
39
+ f as default
5
40
  };
6
41
  //# sourceMappingURL=index97.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index97.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index97.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, 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\", \"onClick\"]\nconst _hoisted_4 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n role: \"img\",\n \"aria-hidden\": \"true\",\n class: \"v-icon__svg\",\n style: {\"font-size\":\"18px\",\"height\":\"18px\",\"width\":\"18px\"}\n}\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"path\", { d: \"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z\" }, null, -1)\nconst _hoisted_6 = [\n _hoisted_5\n]\n\nexport interface BbChipProps {\n clearable?: boolean;\n clearableLabel?: string\n}\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbChip',\n props: {\n clearable: { type: Boolean },\n clearableLabel: { default: 'Elimina' }\n },\n emits: [\"click:clear\"],\n setup(__props: any, { emit }) {\n\n\n\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 ]),\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","onClear","event","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_renderSlot","_withModifiers","_createCommentVNode"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,aACtBC,IAAa,EAAE,OAAO,sBACtBC,IAAa,CAAC,cAAc,SAAS,GACrCC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,eAAe;AAAA,EACf,OAAO;AAAA,EACP,OAAO,EAAC,aAAY,QAAO,QAAS,QAAO,OAAQ,OAAM;AAC3D,GACMC,sBAA8C,QAAQ,EAAE,GAAG,8MAA8M,MAAM,EAAE,GACjRC,IAAa;AAAA,EACjBD;AACF,GAO4BE,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,gBAAgB,EAAE,SAAS,UAAU;AAAA,EACvC;AAAA,EACA,OAAO,CAAC,aAAa;AAAA,EACrB,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAI1B,UAAAC,IAAU,CAACC,MAAqB;AACpC,MAAAF,EAAK,eAAeE,CAAK;AAAA,IAAA;AAGpB,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAoB,QAAQf,GAAY;AAAA,MAC5DgB,EAAoB,QAAQf,GAAY;AAAA,QACtCgB,EAAYL,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,MACAA,EAAK,aACDE,KAAcC,EAAoB,UAAU;AAAA,QAC3C,KAAK;AAAA,QACL,cAAcH,EAAK;AAAA,QACnB,OAAO;AAAA,QACP,SAASM,EAAeR,GAAS,CAAC,QAAO,SAAS,CAAC;AAAA,QACnD,MAAM;AAAA,MAAA,GACL;AAAA,SACAI,EAAW,GAAGC,EAAoB,OAAOZ,GAAYE,CAAU;AAAA,SAC/D,GAAGH,CAAU,KAChBiB,EAAoB,IAAI,EAAI;AAAA,IAAA,CACjC;AAAA,EAEH;AAEA,CAAC;"}
package/dist/index98.js CHANGED
@@ -1,6 +1,40 @@
1
- import o from "./index4.js";
2
- import "./index5.js";
1
+ import { defineComponent as i, ref as n, watch as s, computed as r, openBlock as u, createElementBlock as c, normalizeProps as p, guardReactiveProps as b, createElementVNode as d, renderSlot as m } from "vue";
2
+ import { wait as f } from "./index164.js";
3
+ import { throttle as v } from "./index177.js";
4
+ const _ = { class: "bb-collapsible__content" }, w = /* @__PURE__ */ i({
5
+ __name: "BbCollapsible",
6
+ props: {
7
+ modelValue: { type: Boolean },
8
+ transitionDuration: { default: 250 }
9
+ },
10
+ setup(t) {
11
+ const e = t, l = n(e.modelValue);
12
+ s(
13
+ () => e.modelValue,
14
+ v(async (o) => {
15
+ o ? l.value = !0 : (await f(e.transitionDuration), l.value = !1);
16
+ }, e.transitionDuration)
17
+ );
18
+ const a = r(() => ({
19
+ "aria-expanded": e.modelValue,
20
+ class: {
21
+ "bb-collapsible": !0,
22
+ "bb-collapsible--open": e.modelValue,
23
+ "bb-collapsible--closed": !e.modelValue,
24
+ "bb-collapsible--invisible": !l.value
25
+ },
26
+ style: {
27
+ transitionDuration: e.transitionDuration + "ms"
28
+ }
29
+ }));
30
+ return (o, V) => (u(), c("div", p(b(a.value)), [
31
+ d("div", _, [
32
+ m(o.$slots, "default")
33
+ ])
34
+ ], 16));
35
+ }
36
+ });
3
37
  export {
4
- o as default
38
+ w as default
5
39
  };
6
40
  //# sourceMappingURL=index98.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index98.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index98.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, 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\";\n\nexport interface BbCollapsibleProps {\n modelValue?: boolean;\n transitionDuration?: number;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbCollapsible',\n props: {\n modelValue: { type: Boolean },\n transitionDuration: { default: 250 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst visible = ref(props.modelValue);\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 goinf 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 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 _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","visible","ref","watch","throttle","value","wait","collapsibleAttributes","computed","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,6BAYAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,oBAAoB,EAAE,SAAS,IAAI;AAAA,EACrC;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAUC,EAAIF,EAAM,UAAU;AAQpC,IAAAG;AAAA,MACE,MAAMH,EAAM;AAAA,MACZI,EAAS,OAAOC,MAAU;AACxB,QAAIA,IACFJ,EAAQ,QAAQ,MAEV,MAAAK,EAAKN,EAAM,kBAAkB,GACnCC,EAAQ,QAAQ;AAAA,MAClB,GACCD,EAAM,kBAAkB;AAAA,IAAA;AAEvB,UAAAO,IAAwBC,EAAS,OAC9B;AAAA,MACL,iBAAiBR,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,CAACS,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAOC,EAAgBC,EAAoBP,EAAsB,KAAK,CAAC,GAAG;AAAA,MAClHQ,EAAoB,OAAOnB,GAAY;AAAA,QACrCoB,EAAYP,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index99.js CHANGED
@@ -1,6 +1,50 @@
1
- import o from "./index6.js";
2
- import "./index7.js";
1
+ import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount 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 "./index177.js";
3
+ const O = /* @__PURE__ */ v({
4
+ __name: "BbSmoothHeight",
5
+ props: {
6
+ mutationOptions: { default: () => ({ childList: !0 }) },
7
+ resizeOptions: {},
8
+ strategy: { default: "resize" },
9
+ tag: { default: "div" },
10
+ transitionDuration: { default: 200 }
11
+ },
12
+ setup(c) {
13
+ const n = c, s = r(null), e = r(null), t = r(null);
14
+ globalThis.ResizeObserver && (p(() => {
15
+ n.strategy === "resize" ? e.value && (t.value = new ResizeObserver(a), t.value.observe(e.value, n.resizeOptions)) : n.strategy === "mutation" && e.value && (t.value = new MutationObserver(a), t.value.observe(e.value, n.mutationOptions)), a();
16
+ }), h(() => {
17
+ t.value && t.value.disconnect();
18
+ }));
19
+ const a = g(() => {
20
+ if (s.value && e.value) {
21
+ const o = e.value.scrollHeight + 2;
22
+ s.value.style.height = "0px", s.value.style.height = `${o}px`;
23
+ }
24
+ }, 200);
25
+ return (o, y) => (i(), l(u(o.tag), {
26
+ class: "bb-smooth-height",
27
+ ref_key: "container",
28
+ ref: s,
29
+ style: m({ "transition-duration": n.transitionDuration / 1e3 + "s" })
30
+ }, {
31
+ default: f(() => [
32
+ (i(), l(u(o.tag), {
33
+ class: "content",
34
+ ref_key: "content",
35
+ ref: e
36
+ }, {
37
+ default: f(() => [
38
+ d(o.$slots, "default")
39
+ ]),
40
+ _: 3
41
+ }, 512))
42
+ ]),
43
+ _: 3
44
+ }, 8, ["style"]));
45
+ }
46
+ });
3
47
  export {
4
- o as default
48
+ O as default
5
49
  };
6
50
  //# sourceMappingURL=index99.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index99.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index99.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 { throttle } from \"@/utilities/functions/throttle\";\nimport { ref, onMounted, onBeforeUnmount } from \"vue\";\n\ntype VoidHTMLElements =\n | \"area\"\n | \"base\"\n | \"br\"\n | \"col\"\n | \"command\"\n | \"embed\"\n | \"hr\"\n | \"img\"\n | \"input\"\n | \"keygen\"\n | \"link\"\n | \"meta\"\n | \"param\"\n | \"source\"\n | \"track\"\n | \"wbr\";\n\nexport type BbSmoothHeightProps = {\n mutationOptions?: MutationObserverInit;\n resizeOptions?: ResizeObserverOptions;\n strategy?: \"resize\" | \"mutation\";\n tag?: keyof Omit<HTMLElementTagNameMap, VoidHTMLElements> | \"\";\n transitionDuration?: number;\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","_resolveDynamicComponent","_normalizeStyle","_withCtx","_renderSlot"],"mappings":";;AAiCA,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,mBACbG,EAAU,MAAM;AACV,MAAAL,EAAM,aAAa,WACjBG,EAAQ,UACDC,EAAA,QAAQ,IAAI,eAAeE,CAAa,GACjDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,aAAa,KAElDA,EAAM,aAAa,cACxBG,EAAQ,UACDC,EAAA,QAAQ,IAAI,iBAAiBE,CAAa,GACnDF,EAAS,MAAM,QAAQD,EAAQ,OAAOH,EAAM,eAAe,IAGjDM;IAAA,CACf,GACDC,EAAgB,MAAM;AACpB,MAAIH,EAAS,SACXA,EAAS,MAAM;IACjB,CACD;AAOG,UAAAE,IAAgBE,EAAS,MAAM;AAC/B,UAAAP,EAAU,SAASE,EAAQ,OAAO;AAC9B,cAAAM,IAAgBN,EAAQ,MAAM,eAAe;AACzC,QAAAF,EAAA,MAAM,MAAM,SAAS,OAC/BA,EAAU,MAAM,MAAM,SAAS,GAAGQ,CAAa;AAAA,MACjD;AAAA,OACC,GAAG;AAEC,WAAA,CAACC,GAAUC,OACRC,EAAc,GAAAC,EAAaC,EAAyBJ,EAAK,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