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":"index65.js","sources":["../src/components/BbProgress/BbProgress.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-progress\" }\n\nimport { getAsPercentageBetween } from \"@/utilities/functions/percentage\";\nimport { computed } from \"vue\";\n\nexport interface BbProgressProps {\n modelValue?: number | null;\n min?: number;\n max?: number;\n}\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbProgress',\n props: {\n modelValue: { default: 0 },\n min: { default: 0 },\n max: { default: 100 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst width = computed(() =>\n getAsPercentageBetween(props.modelValue || props.min, props.min, props.max)\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"bb-progress-bar\",\n style: _normalizeStyle({ width: width.value + '%' })\n }, null, 4)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","width","computed","getAsPercentageBetween","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_normalizeStyle"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,iBAeAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,KAAK,EAAE,SAAS,EAAE;AAAA,IAClB,KAAK,EAAE,SAAS,IAAI;AAAA,EACtB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAQC;AAAA,MAAS,MACrBC,EAAuBH,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,IAAA;AAGrE,WAAA,CAACI,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOX,GAAY;AAAA,MAC3DY,EAAoB,OAAO;AAAA,QACzB,OAAO;AAAA,QACP,OAAOC,EAAgB,EAAE,OAAOR,EAAM,QAAQ,KAAK;AAAA,MAAA,GAClD,MAAM,CAAC;AAAA,IAAA,CACX;AAAA,EAEH;AAEA,CAAC;"}
1
+ {"version":3,"file":"index65.js","sources":["../src/components/BbPagination/BbPagination.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { \"aria-label\": \"Navigazione\" }\nconst _hoisted_2 = [\"disabled\"]\nconst _hoisted_3 = [\"onClick\", \"disabled\"]\nconst _hoisted_4 = [\"disabled\"]\n\nimport { debounce } from \"@/utilities/functions/debounce\";\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref } from \"vue\";\n\nexport interface BbPaginationProps {\n modelValue?: number;\n disabled?: boolean;\n totalPages?: number | string;\n maxSize?: number | string;\n ellipsis?: string;\n loading?: boolean;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPagination',\n props: {\n modelValue: { default: 1 },\n disabled: { type: Boolean },\n totalPages: { default: 1 },\n maxSize: { default: 5 },\n ellipsis: { default: \"...\" },\n loading: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst totalPages = computed(() => +props.totalPages);\nconst start = ref(1);\nconst maxSize = ref(+props.maxSize);\n\nconst outercontainer = ref<HTMLElement>();\nconst innercontainer = ref<HTMLElement>();\n\nconst buttonFootprint = ref<number>(Infinity);\n\n/** \n* Adjusts how many buttons to show.\n* if current buttons can't fit subtract maxSize until they do or until minimum is reached\n* if more buttons could fit add buttons until the don't\n* If minimum or maximum is reached just quit until next resize\n*/\nconst adjustMaxElements = () => {\n if (outercontainer.value && innercontainer.value) {\n /* If some buttons do not fit */\n if (outercontainer.value.clientWidth < innercontainer.value.clientWidth) {\n if (maxSize.value - 1 > 3) {\n maxSize.value--;\n nextTick(adjustMaxElements);\n } else {\n maxSize.value = 3;\n }\n /* If all current buttons do fit */\n } else {\n /* If some buttons have been hidden */\n if (maxSize.value < +props.maxSize) {\n if (\n /* If there is enought space to fit one */\n outercontainer.value.clientWidth - innercontainer.value.clientWidth >\n buttonFootprint.value\n ) {\n maxSize.value = Math.min(maxSize.value + 1, +props.maxSize);\n nextTick(adjustMaxElements);\n }\n }\n }\n }\n};\nif(globalThis.ResizeObserver) {\n const observer = new ResizeObserver(debounce(adjustMaxElements, 200));\n onMounted(() => {\n if (outercontainer.value && innercontainer.value) {\n const button = outercontainer.value.querySelectorAll(\n \".base-pagination__page\"\n )[1];\n if (button) {\n /* Compute the footprint necessary to render a new button */\n const gapString = getComputedStyle(innercontainer.value).columnGap;\n const numberAsString = gapString.replaceAll(/\\D/g, \"\");\n const gap = Number(numberAsString);\n buttonFootprint.value = button.clientWidth + gap;\n }\n observer.observe(outercontainer.value);\n }\n });\n onBeforeUnmount(() => {\n observer.disconnect()\n })\n}\n\nconst range = computed(() => {\n if (\n totalPages.value <= 0 ||\n isNaN(totalPages.value) ||\n totalPages.value > Number.MAX_SAFE_INTEGER\n )\n return [];\n\n if (maxSize.value <= 1) return [props.modelValue];\n\n if (totalPages.value <= maxSize.value) {\n return createRange(totalPages.value, start.value);\n }\n\n const even = maxSize.value % 2 === 0;\n const middle = even ? maxSize.value / 2 : Math.floor(maxSize.value / 2);\n const left = even ? middle : middle + 1;\n const right = totalPages.value - middle;\n\n if (left - props.modelValue >= 0) {\n return [\n ...createRange(Math.max(1, maxSize.value - 1), start.value),\n props.ellipsis,\n totalPages.value,\n ];\n } else if (props.modelValue - right >= (even ? 1 : 0)) {\n const rangeLength = maxSize.value - 1;\n const rangeStart = totalPages.value - rangeLength + start.value;\n return [\n start.value,\n props.ellipsis,\n ...createRange(rangeLength, rangeStart),\n ];\n } else {\n const rangeLength = Math.max(1, maxSize.value - 3);\n const rangeStart =\n rangeLength === 1\n ? props.modelValue\n : props.modelValue - Math.ceil(rangeLength / 2) + start.value;\n return [\n start.value,\n props.ellipsis,\n ...createRange(rangeLength, rangeStart),\n props.ellipsis,\n totalPages.value,\n ];\n }\n});\n\nconst items = computed(() => {\n return range.value.map((item, index) => {\n if (typeof item === \"string\") {\n return {\n active: false,\n key: `ellipsis-${index}`,\n page: item,\n ellipsis: true,\n icon: true,\n disabled: true,\n };\n } else {\n const active = item === props.modelValue;\n return {\n active,\n key: item,\n page: item,\n ellipsis: false,\n icon: true,\n disabled: !!props.disabled || +props.totalPages < 2 || props.loading,\n };\n }\n });\n});\n\nconst createRange = (length: number, start = 0): number[] => {\n return Array.from({ length }, (_, k) => start + k);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"base-pagination\",\n ref_key: \"outercontainer\",\n ref: outercontainer\n }, [\n _createElementVNode(\"nav\", _hoisted_1, [\n _createElementVNode(\"ul\", {\n class: \"base-pagination__pages\",\n ref_key: \"innercontainer\",\n ref: innercontainer\n }, [\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"button\", {\n class: \"base-pagination__page base-pagination__page--previous\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('update:modelValue', props.modelValue - 1))),\n disabled: props.modelValue <= 1 || _ctx.loading || _ctx.disabled\n }, [\n _renderSlot(_ctx.$slots, \"previous\", {}, () => [\n _createTextVNode(\"Precedente\")\n ])\n ], 8, _hoisted_2)\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items.value, (item) => {\n return (_openBlock(), _createElementBlock(\"li\", null, [\n _createElementVNode(\"button\", {\n class: _normalizeClass([\"base-pagination__page\", {\n 'base-pagination__page--active': item.active,\n 'base-pagination__page--ellipsis': item.ellipsis,\n }]),\n onClick: ($event: any) => (emit('update:modelValue', item.key)),\n disabled: item.disabled\n }, [\n _renderSlot(_ctx.$slots, \"item\", {}, () => [\n (item.ellipsis)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _createTextVNode(_toDisplayString(props.ellipsis), 1)\n ], 64))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createTextVNode(_toDisplayString(item.key), 1)\n ], 64))\n ])\n ], 10, _hoisted_3)\n ]))\n }), 256)),\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"button\", {\n class: \"base-pagination__page base-pagination__page--next\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('update:modelValue', props.modelValue + 1))),\n disabled: props.modelValue >= +totalPages.value || _ctx.loading || _ctx.disabled\n }, [\n _renderSlot(_ctx.$slots, \"previous\", {}, () => [\n _createTextVNode(\"Successivi\")\n ])\n ], 8, _hoisted_4)\n ])\n ], 512)\n ])\n ], 512))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","emit","props","totalPages","computed","start","ref","maxSize","outercontainer","innercontainer","buttonFootprint","adjustMaxElements","nextTick","observer","debounce","onMounted","button","numberAsString","gap","onBeforeUnmount","range","createRange","even","middle","left","right","rangeLength","rangeStart","items","item","index","length","_","k","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","$event","_renderSlot","_createTextVNode","_Fragment","_renderList","_normalizeClass","_toDisplayString"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,cAAc,iBAC7BC,IAAa,CAAC,UAAU,GACxBC,IAAa,CAAC,WAAW,UAAU,GACnCC,IAAa,CAAC,UAAU,GAeFC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,UAAU,EAAE,SAAS,MAAM;AAAA,IAC3B,SAAS,EAAE,MAAM,QAAQ;AAAA,EAC3B;AAAA,EACA,OAAO,CAAC,mBAAmB;AAAA,EAC3B,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAEhC,UAAMC,IAAQF,GAMRG,IAAaC,EAAS,MAAM,CAACF,EAAM,UAAU,GAC7CG,IAAQC,EAAI,CAAC,GACbC,IAAUD,EAAI,CAACJ,EAAM,OAAO,GAE5BM,IAAiBF,KACjBG,IAAiBH,KAEjBI,IAAkBJ,EAAY,KAAQ,GAQtCK,IAAoB,MAAM;AAC1B,MAAAH,EAAe,SAASC,EAAe,UAErCD,EAAe,MAAM,cAAcC,EAAe,MAAM,cACtDF,EAAQ,QAAQ,IAAI,KACdA,EAAA,SACRK,EAASD,CAAiB,KAE1BJ,EAAQ,QAAQ,IAKdA,EAAQ,QAAQ,CAACL,EAAM;AAAA,MAGvBM,EAAe,MAAM,cAAcC,EAAe,MAAM,cACx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BhB,EAAK,GAAG,GAAG,CAAC;AAAA,mBAC7C,EAAE;AAAA,cAAA,CACV;AAAA,YAAA,GACA,IAAIjC,CAAU;AAAA,UAAA,CAClB,EACF,GAAG,GAAG;AAAA,UACP0C,EAAoB,MAAM,MAAM;AAAA,YAC9BA,EAAoB,UAAU;AAAA,cAC5B,OAAO;AAAA,cACP,SAASH,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI,CAACI,MAAiBtC,EAAK,qBAAqBC,EAAM,aAAa,CAAC;AAAA,cACnG,UAAUA,EAAM,cAAc,CAACC,EAAW,SAAS+B,EAAK,WAAWA,EAAK;AAAA,YAAA,GACvE;AAAA,cACDM,EAAYN,EAAK,QAAQ,YAAY,IAAI,MAAM;AAAA,gBAC7CO,EAAiB,YAAY;AAAA,cAAA,CAC9B;AAAA,YAAA,GACA,GAAG5C,CAAU;AAAA,UAAA,CACjB;AAAA,WACA,GAAG;AAAA,MAAA,CACP;AAAA,OACA,GAAG;AAAA,EAER;AAEA,CAAC;"}
package/dist/index67.js CHANGED
@@ -1,84 +1,155 @@
1
- import { defineComponent as p, openBlock as b, createBlock as c, withCtx as a, renderSlot as r, normalizeProps as m, guardReactiveProps as f, createVNode as h, mergeProps as s, createSlots as y, renderList as k } from "vue";
2
- import B from "./index18.js";
3
- import "./index19.js";
4
- import P from "./index14.js";
5
- import "./index15.js";
6
- const M = /* @__PURE__ */ p({
7
- __name: "BbRadio",
1
+ import { defineComponent as M, ref as r, computed as L, openBlock as f, createElementBlock as S, mergeProps as z, createElementVNode as a, renderSlot as g, normalizeProps as F, guardReactiveProps as H, unref as m, createBlock as w, Teleport as q, normalizeClass as N, normalizeStyle as O, withCtx as V, createCommentVNode as A, nextTick as R } from "vue";
2
+ import { nanoid as U } from "./index176.js";
3
+ import { useFloating as j } from "./index186.js";
4
+ import { useFocusTrap as x } from "./index202.js";
5
+ import { wait as k } from "./index164.js";
6
+ import G from "./index2.js";
7
+ import "./index3.js";
8
+ import { autoUpdate as I } from "./index157.js";
9
+ import { flip as J, shift as K } from "./index166.js";
10
+ const Q = ["id"], W = /* @__PURE__ */ a("span", { class: "bb-popover__arrow" }, null, -1), X = { class: "bb-popover__bubble" }, Y = /* @__PURE__ */ a("span", { class: "bb-popover__close-label" }, "Chiudi", -1), Z = /* @__PURE__ */ a("svg", {
11
+ viewBox: "0 0 24 24",
12
+ fill: "none",
13
+ xmlns: "http://www.w3.org/2000/svg"
14
+ }, [
15
+ /* @__PURE__ */ a("path", {
16
+ d: "M23 23L1 1M23 1L1 23",
17
+ stroke: "currentColor",
18
+ "stroke-width": "2",
19
+ "stroke-linecap": "round"
20
+ })
21
+ ], -1), ce = /* @__PURE__ */ M({
22
+ __name: "BbPopover",
8
23
  props: {
9
- autofocus: { type: Boolean },
10
- checked: { type: Boolean },
11
- color: {},
12
- direction: { default: "auto" },
24
+ block: { type: Boolean },
13
25
  disabled: { type: Boolean },
14
- errors: {},
15
- hasErrors: { type: Boolean },
16
- hideLabel: { type: Boolean },
17
- id: {},
18
- inputPosition: {},
19
- label: {},
20
- labelPosition: {},
21
- modelValue: {},
22
- name: {},
23
- readonly: { type: Boolean },
24
- reverse: { type: Boolean, default: !0 },
25
- value: {}
26
+ focusTarget: {},
27
+ placement: { default: "bottom" },
28
+ theme: { default: "default" },
29
+ showClose: { type: Boolean, default: !0 },
30
+ transitionDuration: { default: 150 }
26
31
  },
27
- emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
28
- setup(v, { emit: o }) {
29
- const i = {
30
- onBlur: (e) => o("blur", e),
31
- onChange: (e) => o("change", e),
32
- onClick: (e) => o("click", e),
33
- onFocus: (e) => o("focus", e),
34
- onInput: (e) => o("input", e),
35
- onKeydown: (e) => o("keydown", e),
36
- onMousedown: (e) => o("mousedown", e),
37
- onMouseup: (e) => o("mouseup", e),
38
- "onUpdate:modelValue": (e) => o("update:modelValue", e)
32
+ emits: ["shown", "hidden"],
33
+ setup(y, { emit: l }) {
34
+ const t = y, p = `bb_${U()}`, u = r(), i = r(), { activate: C, deactivate: T } = x(i, {
35
+ /**
36
+ * This traps all clicks outside so we are pressing
37
+ * the trigger we just allow and process that in its
38
+ * own click handler.
39
+ * If we are pressing anything random on the page
40
+ * close the popover and be done
41
+ */
42
+ clickOutsideDeactivates: (e) => {
43
+ var h;
44
+ const o = e.target;
45
+ return o instanceof HTMLElement && (h = u.value) != null && h.contains(o) || (d(), l("hidden")), !0;
46
+ },
47
+ escapeDeactivates: () => (R(async () => {
48
+ await d(), v(), l("hidden");
49
+ }), !0),
50
+ /* We don't return focus so that when
51
+ * we press a button on tyhe page we can focus
52
+ * THAT button and not the current trigger
53
+ */
54
+ returnFocusOnDeactivate: !1
55
+ }), { floatingStyles: $, placement: _ } = j(u, i, {
56
+ placement: t.placement,
57
+ whileElementsMounted: I,
58
+ middleware: [J(), K({ padding: 10 })]
59
+ }), B = L(() => ({
60
+ class: {
61
+ "bb-popover--block": t.block,
62
+ [`bb-popover--theme-${t.theme}`]: t.theme
63
+ }
64
+ })), n = r(!1), s = r(!1), c = r(!1), b = r(!0), D = async () => {
65
+ b.value = !1, c.value = !1, n.value = !0, await k(50), s.value = !0, n.value = !1;
66
+ }, d = async () => {
67
+ s.value = !1, n.value = !1, c.value = !0, await k(t.transitionDuration), c.value = !1, b.value = !0;
68
+ }, P = async () => {
69
+ if (s.value) {
70
+ await d(), v(), l("hidden");
71
+ return;
72
+ }
73
+ if (n.value || t.disabled)
74
+ return;
75
+ await D();
76
+ let e = t.focusTarget ?? ".bb-popover__close";
77
+ C({
78
+ onPostActivate: () => {
79
+ if (i.value) {
80
+ const o = i.value.querySelector(e);
81
+ o instanceof HTMLElement && (o.focus(), l("shown"));
82
+ }
83
+ }
84
+ });
85
+ }, v = () => {
86
+ var o;
87
+ const e = (o = u.value) == null ? void 0 : o.querySelector(`[aria-controls=popover_${p}]`);
88
+ e instanceof HTMLElement && e.focus();
89
+ }, E = async () => {
90
+ T(), await d(), v(), l("hidden");
39
91
  };
40
- return (e, V) => (b(), c(P, {
41
- class: "bb-radio",
42
- direction: e.direction,
43
- hideLabel: e.hideLabel,
44
- id: e.id,
45
- inputPosition: e.inputPosition,
46
- label: e.label,
47
- labelPosition: e.labelPosition,
48
- labelTag: "span",
49
- name: e.name,
50
- reverse: e.reverse,
51
- tag: "label"
52
- }, {
53
- label: a((l) => [
54
- r(e.$slots, "label", m(f(l)))
55
- ]),
56
- input: a(({ id: l, name: d, hasErrors: u }) => [
57
- h(B, s({
58
- autofocus: e.autofocus,
59
- checked: e.checked,
60
- color: e.color,
92
+ return (e, o) => (f(), S("span", z({ class: "bb-popover" }, B.value), [
93
+ a("span", {
94
+ class: "bb-popover__wrapper",
95
+ ref_key: "wrapper",
96
+ ref: u
97
+ }, [
98
+ g(e.$slots, "activator", F(H({
99
+ props: {
100
+ "aria-controls": `popover_${p}`,
101
+ "aria-expanded": s.value,
102
+ onClick: P,
103
+ id: p,
104
+ disabled: e.disabled
105
+ },
106
+ closed: b.value,
107
+ closing: c.value,
61
108
  disabled: e.disabled,
62
- hasErrors: u,
63
- id: l,
64
- modelValue: e.modelValue,
65
- name: d,
66
- readonly: e.readonly,
67
- value: e.value
68
- }, i), y({ _: 2 }, [
69
- k(e.$slots, (g, n) => ({
70
- name: n,
71
- fn: a((t) => [
72
- r(e.$slots, n, s(t, { text: e.label }))
73
- ])
74
- }))
75
- ]), 1040, ["autofocus", "checked", "color", "disabled", "hasErrors", "id", "modelValue", "name", "readonly", "value"])
76
- ]),
77
- _: 3
78
- }, 8, ["direction", "hideLabel", "id", "inputPosition", "label", "labelPosition", "name", "reverse"]));
109
+ open: s.value,
110
+ opening: n.value,
111
+ placement: m(_)
112
+ })))
113
+ ], 512),
114
+ (f(), w(q, { to: "body" }, [
115
+ a("span", {
116
+ class: N(["bb-popover__bubble-container", {
117
+ [`bb-popover__bubble-container--${m(_)}`]: !0,
118
+ [`bb-popover__bubble-container--${e.theme}`]: e.theme,
119
+ "bb-popover__bubble-container--hidden": b.value,
120
+ "bb-popover__bubble-container--closing": c.value,
121
+ "bb-popover__bubble-container--opening": n.value,
122
+ "bb-popover__bubble-container--open": s.value
123
+ }]),
124
+ ref_key: "content",
125
+ ref: i,
126
+ style: O({
127
+ ...m($),
128
+ transitionDuration: `${t.transitionDuration}ms`
129
+ }),
130
+ id: `popover_${p}`
131
+ }, [
132
+ W,
133
+ a("span", X, [
134
+ e.showClose ? (f(), w(G, {
135
+ key: 0,
136
+ class: "bb-popover__close",
137
+ onClick: E
138
+ }, {
139
+ default: V(() => [
140
+ Y,
141
+ Z
142
+ ]),
143
+ _: 1
144
+ })) : A("", !0),
145
+ g(e.$slots, "default")
146
+ ])
147
+ ], 14, Q)
148
+ ]))
149
+ ], 16));
79
150
  }
80
151
  });
81
152
  export {
82
- M as default
153
+ ce as default
83
154
  };
84
155
  //# sourceMappingURL=index67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index67.js","sources":["../src/components/BbRadio/BbRadio.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseRadio from \"../BaseRadio/BaseRadio.vue\";\nimport type {BaseRadioEvents} from \"../BaseRadio/BaseRadio.vue\";\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\n\nexport interface BbRadioProps {\n autofocus?: boolean;\n checked?: boolean;\n color?: string;\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n disabled?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n label: string;\n labelPosition?: \"left\" | \"center\" | \"right\";\n modelValue?: any;\n name?: string;\n readonly?: boolean;\n reverse?: boolean;\n value: any;\n}\n\nexport type BbRadioEvents = BaseRadioEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRadio',\n props: {\n autofocus: { type: Boolean },\n checked: { type: Boolean },\n color: {},\n direction: { default: 'auto' },\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n label: {},\n labelPosition: {},\n modelValue: {},\n name: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean, default: true },\n value: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-radio\",\n direction: _ctx.direction,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n labelTag: 'span',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'label'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseRadio, _mergeProps({\n autofocus: _ctx.autofocus,\n checked: _ctx.checked,\n color: _ctx.color,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n readonly: _ctx.readonly,\n value: _ctx.value\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _mergeProps(data, { text: _ctx.label }))\n ])\n }\n })\n ]), 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"readonly\", \"value\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseRadio","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA6BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,OAAO,CAAC;AAAA,IACR,WAAW,EAAE,SAAS,OAAO;AAAA,IAC7B,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,CAAC;AAAA,IAChB,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,SAAS,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IACxC,OAAO,CAAC;AAAA,EACV;AAAA,EACA,OAAO,CAAC,QAAQ,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,OAAOA,EAAK;AAAA,UACZ,UAAUA,EAAK;AAAA,UACf,WAAAY;AAAA,UACA,IAAAF;AAAA,UACA,YAAYV,EAAK;AAAA,UACjB,MAAAW;AAAA,UACA,UAAUX,EAAK;AAAA,UACf,OAAOA,EAAK;AAAA,WACXH,CAAc,GAAGmB,EAAa,EAAE,GAAG,KAAK;AAAA,UACzCC,EAAYjB,EAAK,QAAQ,CAACkB,GAAGP,OACpB;AAAA,YACL,MAAMA;AAAAA,YACN,IAAIN,EAAS,CAACC,MAAS;AAAA,cACrBC,EAAYP,EAAK,QAAQW,GAAMI,EAAYT,GAAM,EAAE,MAAMN,EAAK,MAAM,CAAC,CAAC;AAAA,YAAA,CACvE;AAAA,UAAA,EAEJ;AAAA,QACF,CAAA,GAAG,MAAM,CAAC,aAAa,WAAW,SAAS,YAAY,aAAa,MAAM,cAAc,QAAQ,YAAY,OAAO,CAAC;AAAA,MAAA,CACtH;AAAA,MACD,GAAG;AAAA,IACL,GAAG,GAAG,CAAC,aAAa,aAAa,MAAM,iBAAiB,SAAS,iBAAiB,QAAQ,SAAS,CAAC;AAAA,EAEtG;AAEA,CAAC;"}
1
+ {"version":3,"file":"index67.js","sources":["../src/components/BbPopover/BbPopover.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 = [\"id\"]\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__arrow\" }, null, -1)\nconst _hoisted_3 = { class: \"bb-popover__bubble\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_5 = /*#__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, nextTick, ref } from \"vue\";\nimport { nanoid } from \"nanoid\";\nimport { useFloating, autoUpdate, flip, shift } from \"@floating-ui/vue\";\nimport { useFocusTrap } from \"@vueuse/integrations/useFocusTrap\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseButton from \"../BaseButton/BaseButton.vue\";\n\nexport type BbPopoverProps = {\n block?: boolean;\n disabled?: boolean;\n focusTarget?: string;\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\ntype BbPopoverEvents = {\n (e: 'shown'):void\n (e: 'hidden'):void\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPopover',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n focusTarget: {},\n placement: { default: \"bottom\" },\n theme: { default: \"default\" },\n showClose: { type: Boolean, default: true },\n transitionDuration: { default: 150 }\n },\n emits: [\"shown\", \"hidden\"],\n setup(__props: any, { emit }) {\n\nconst props = __props;\n\n\n\n\n\nconst id = `bb_${nanoid()}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n /** \n * This traps all clicks outside so we are pressing \n * the trigger we just allow and process that in its \n * own click handler.\n * If we are pressing anything random on the page \n * close the popover and be done\n */\n clickOutsideDeactivates: (event) => {\n const target = event.target;\n if (target instanceof HTMLElement) {\n if (wrapper.value?.contains(target)) {\n return true;\n }\n }\n closePopover();\n emit('hidden')\n return true;\n },\n escapeDeactivates: () => {\n nextTick(async () => {\n await closePopover();\n focusTrigger();\n emit('hidden')\n });\n return true;\n },\n /* We don't return focus so that when \n * we press a button on tyhe page we can focus \n * THAT button and not the current trigger \n */\n returnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement } = useFloating(wrapper, content, {\n placement: props.placement,\n whileElementsMounted: autoUpdate,\n middleware: [flip(), shift({ padding: 10 })],\n});\n\nconst attributes = computed(() => {\n const classes = {\n \"bb-popover--block\": props.block,\n [`bb-popover--theme-${props.theme}`]: props.theme,\n };\n return {\n class: classes,\n };\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst openPopover = async () => {\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 closePopover = 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};\n\nconst onTriggerClick = async () => {\n if(open.value) {\n await closePopover();\n focusTrigger();\n emit('hidden')\n return;\n }\n if (opening.value || props.disabled) return;\n await openPopover();\n let focusTarget = props.focusTarget ?? \".bb-popover__close\";\n\n activate({\n onPostActivate: () => {\n if (content.value) {\n const target = content.value.querySelector(focusTarget);\n if (target instanceof HTMLElement) {\n target.focus();\n emit('shown')\n }\n }\n },\n });\n};\n\nconst focusTrigger = () => {\n const trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n if (trigger instanceof HTMLElement) {\n trigger.focus();\n }\n};\n\nconst onClickClose = async () => {\n deactivate();\n await closePopover()\n focusTrigger()\n emit('hidden');\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n class: \"bb-popover__wrapper\",\n ref_key: \"wrapper\",\n ref: wrapper\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n props: {\n 'aria-controls': `popover_${id}`,\n 'aria-expanded': open.value,\n onClick: onTriggerClick,\n id: id,\n disabled: _ctx.disabled,\n },\n closed: closed.value,\n closing: closing.value,\n disabled: _ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n })))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n [`bb-popover__bubble-container--${_unref(placement)}`]: true,\n [`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n 'bb-popover__bubble-container--hidden': closed.value,\n 'bb-popover__bubble-container--closing': closing.value,\n 'bb-popover__bubble-container--opening': opening.value,\n 'bb-popover__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: `popover_${id}`\n }, [\n _hoisted_2,\n _createElementVNode(\"span\", _hoisted_3, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-popover__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_4,\n _hoisted_5\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 14, _hoisted_1)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_sfc_main","_defineComponent","__props","emit","props","id","nanoid","wrapper","ref","content","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","useFloating","autoUpdate","flip","shift","attributes","computed","opening","open","closing","closed","openPopover","wait","onTriggerClick","focusTarget","trigger","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;AAGA,MAAMA,IAAa,CAAC,IAAI,GAClBC,sBAA8C,QAAQ,EAAE,OAAO,uBAAuB,MAAM,EAAE,GAC9FC,IAAa,EAAE,OAAO,wBACtBC,sBAA8C,QAAQ,EAAE,OAAO,6BAA6B,UAAU,EAAE,GACxGC,sBAA8C,OAAO;AAAA,EACzD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EAAA,CACnB;AACH,GAAG,EAAE,GAqCuBC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,aAAa,CAAC;AAAA,IACd,WAAW,EAAE,SAAS,SAAS;AAAA,IAC/B,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,WAAW,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC1C,oBAAoB,EAAE,SAAS,IAAI;AAAA,EACrC;AAAA,EACA,OAAO,CAAC,SAAS,QAAQ;AAAA,EACzB,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAEhC,UAAMC,IAAQF,GAMRG,IAAK,MAAMC,EAAA,CAAQ,IAEnBC,IAAUC,KACVC,IAAUD,KAEV,EAAE,UAAAE,GAAU,YAAAC,MAAeC,EAAaH,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQrD,yBAAyB,CAACI,MAAU;;AAClC,cAAMC,IAASD,EAAM;AACrB,eAAIC,aA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rDN,EAAoB,QAAQ;AAAA,UAC1B,OAAOO,EAAgB,CAAC,gCAAgC;AAAA,YACtD,CAAC,iCAAiCH,EAAO1B,CAAS,CAAC,EAAE,GAAG;AAAA,YACxD,CAAC,iCAAiCiB,EAAK,KAAK,EAAE,GAAGA,EAAK;AAAA,YACtD,wCAAwCP,EAAO;AAAA,YAC/C,yCAAyCD,EAAQ;AAAA,YACjD,yCAAyCF,EAAQ;AAAA,YACjD,sCAAsCC,EAAK;AAAA,UAAA,CAC5C,CAAC;AAAA,UACF,SAAS;AAAA,UACT,KAAKnB;AAAA,UACL,OAAOyC,EAAgB;AAAA,YACrB,GAAGJ,EAAO3B,CAAc;AAAA,YACxB,oBAAoB,GAAGf,EAAM,kBAAkB;AAAA,UAAA,CAChD;AAAA,UACD,IAAI,WAAWC,CAAE;AAAA,QAAA,GAChB;AAAA,UACDT;AAAA,UACA8C,EAAoB,QAAQ7C,GAAY;AAAA,YACrCwC,EAAK,aACDE,KAAcQ,EAAaI,GAAY;AAAA,cACtC,KAAK;AAAA,cACL,OAAO;AAAA,cACP,SAASf;AAAA,YAAA,GACR;AAAA,cACD,SAASgB,EAAS,MAAM;AAAA,gBACtBtD;AAAA,gBACAC;AAAA,cAAA,CACD;AAAA,cACD,GAAG;AAAA,YAAA,CACJ,KACDsD,EAAoB,IAAI,EAAI;AAAA,YAChCV,EAAYN,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,QAAA,GACA,IAAI1C,CAAU;AAAA,MAAA,CAClB;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index69.js CHANGED
@@ -1,105 +1,25 @@
1
- import { defineComponent as p, openBlock as m, createBlock as c, withCtx as i, renderSlot as a, normalizeProps as l, guardReactiveProps as s, createVNode as b, mergeProps as h, createSlots as g, renderList as T } from "vue";
2
- import f from "./index14.js";
3
- import "./index15.js";
4
- import y from "./index20.js";
5
- import "./index21.js";
6
- const w = /* @__PURE__ */ p({
7
- __name: "BbRadioGroup",
1
+ import { defineComponent as r, computed as s, openBlock as n, createElementBlock as a, createElementVNode as l, normalizeStyle as m } from "vue";
2
+ import { getAsPercentageBetween as c } from "./index181.js";
3
+ const d = { class: "bb-progress" }, _ = /* @__PURE__ */ r({
4
+ __name: "BbProgress",
8
5
  props: {
9
- autofocus: { type: Boolean },
10
- color: {},
11
- dependencies: {},
12
- depsDebounceTime: {},
13
- direction: {},
14
- inputDirection: {},
15
- disabled: { type: Boolean },
16
- enforceCoherence: { type: Boolean },
17
- errors: {},
18
- hasErrors: { type: Boolean },
19
- hideLegend: { type: Boolean },
20
- hideLabel: { type: Boolean },
21
- id: {},
22
- inputPosition: {},
23
- items: { type: [Array, Function] },
24
- itemText: { type: [String, Function] },
25
- itemValue: { type: [String, Function] },
26
- legend: {},
27
- legendPosition: {},
28
- loadingText: {},
29
- modelValue: {},
30
- modelValueDebounceTime: {},
31
- name: {},
32
- noDataText: {},
33
- readonly: { type: Boolean },
34
- reverse: { type: Boolean }
6
+ modelValue: { default: 0 },
7
+ min: { default: 0 },
8
+ max: { default: 100 }
35
9
  },
36
- emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue", "inactive"],
37
- setup(V, { emit: o }) {
38
- const d = {
39
- onBlur: (e) => o("blur", e),
40
- onChange: (e) => o("change", e),
41
- onClick: (e) => o("click", e),
42
- onFocus: (e) => o("focus", e),
43
- onInactive: () => o("inactive"),
44
- onInput: (e) => o("input", e),
45
- onKeydown: (e) => o("keydown", e),
46
- onMousedown: (e) => o("mousedown", e),
47
- onMouseup: (e) => o("mouseup", e),
48
- "onUpdate:modelValue": (e) => o("update:modelValue", e)
49
- };
50
- return (e, D) => (m(), c(f, {
51
- class: "bb-radio-group",
52
- direction: e.direction,
53
- errors: e.errors,
54
- hasErrors: e.hasErrors,
55
- hideLabel: e.hideLegend,
56
- id: e.id,
57
- inputPosition: e.inputPosition,
58
- label: e.legend,
59
- labelPosition: e.legendPosition,
60
- labelTag: "legend",
61
- name: e.name,
62
- reverse: e.reverse,
63
- tag: "fieldset"
64
- }, {
65
- label: i((n) => [
66
- a(e.$slots, "legend", l(s(n)))
67
- ]),
68
- input: i(({ id: n, name: t }) => [
69
- b(y, h({
70
- autofocus: e.autofocus,
71
- color: e.color,
72
- dependencies: e.dependencies,
73
- depsDebounceTime: e.depsDebounceTime,
74
- direction: e.inputDirection,
75
- disabled: e.disabled,
76
- enforceCoherence: e.enforceCoherence,
77
- hasErrors: e.hasErrors,
78
- hideLabel: e.hideLabel,
79
- id: n,
80
- items: e.items,
81
- itemText: e.itemText,
82
- itemValue: e.itemValue,
83
- loadingText: e.loadingText,
84
- modelValue: e.modelValue,
85
- modelValueDebounceTime: e.modelValueDebounceTime,
86
- name: t,
87
- noDataText: e.noDataText,
88
- readonly: e.readonly
89
- }, d), g({ _: 2 }, [
90
- T(e.$slots, (B, r) => ({
91
- name: r,
92
- fn: i((u) => [
93
- a(e.$slots, r, l(s(u)))
94
- ])
95
- }))
96
- ]), 1040, ["autofocus", "color", "dependencies", "depsDebounceTime", "direction", "disabled", "enforceCoherence", "hasErrors", "hideLabel", "id", "items", "itemText", "itemValue", "loadingText", "modelValue", "modelValueDebounceTime", "name", "noDataText", "readonly"])
97
- ]),
98
- _: 3
99
- }, 8, ["direction", "errors", "hasErrors", "hideLabel", "id", "inputPosition", "label", "labelPosition", "name", "reverse"]));
10
+ setup(t) {
11
+ const e = t, o = s(
12
+ () => c(e.modelValue || e.min, e.min, e.max)
13
+ );
14
+ return (i, p) => (n(), a("div", d, [
15
+ l("div", {
16
+ class: "bb-progress-bar",
17
+ style: m({ width: o.value + "%" })
18
+ }, null, 4)
19
+ ]));
100
20
  }
101
21
  });
102
22
  export {
103
- w as default
23
+ _ as default
104
24
  };
105
25
  //# sourceMappingURL=index69.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index69.js","sources":["../src/components/BbRadioGroup/BbRadioGroup.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseRadioGroup from \"../BaseRadioGroup/BaseRadioGroup.vue\";\nimport type { BaseRadioGroupEvents } from \"../BaseRadioGroup/BaseRadioGroup.vue\";\n\nexport interface BbRadioGroupProps {\n autofocus?: boolean;\n color?: string;\n dependencies?: any[];\n depsDebounceTime?: number;\n direction?: \"horizontal\" | \"vertical\" | \"auto\";\n inputDirection?: \"horizontal\" | \"vertical\";\n disabled?: boolean;\n enforceCoherence?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLegend?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n items:\n | any[]\n | ((prefill: boolean, modelValue: any) => Promise<any[]>)\n | ((prefill: boolean, modelValue: any) => any[]);\n itemText?: string | ((item: any) => string);\n itemValue?: string | ((item: any) => any);\n legend: string;\n legendPosition?: \"left\" | \"center\" | \"right\";\n loadingText?: string;\n modelValue?: any;\n modelValueDebounceTime?: number;\n name: string;\n noDataText?: string;\n readonly?: boolean;\n reverse?: boolean;\n}\n\nexport type BbRadioGroupEvents = BaseRadioGroupEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRadioGroup',\n props: {\n autofocus: { type: Boolean },\n color: {},\n dependencies: {},\n depsDebounceTime: {},\n direction: {},\n inputDirection: {},\n disabled: { type: Boolean },\n enforceCoherence: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLegend: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n items: { type: [Array, Function] },\n itemText: { type: [String, Function] },\n itemValue: { type: [String, Function] },\n legend: {},\n legendPosition: {},\n loadingText: {},\n modelValue: {},\n modelValueDebounceTime: {},\n name: {},\n noDataText: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\", \"inactive\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInactive: () => emit(\"inactive\"),\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (event: any) => emit(\"update:modelValue\", event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-radio-group\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLegend,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.legend,\n labelPosition: _ctx.legendPosition,\n labelTag: 'legend',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'fieldset'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"legend\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name }) => [\n _createVNode(BaseRadioGroup, _mergeProps({\n autofocus: _ctx.autofocus,\n color: _ctx.color,\n dependencies: _ctx.dependencies,\n depsDebounceTime: _ctx.depsDebounceTime,\n direction: _ctx.inputDirection,\n disabled: _ctx.disabled,\n enforceCoherence: _ctx.enforceCoherence,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: id,\n items: _ctx.items,\n itemText: _ctx.itemText,\n itemValue: _ctx.itemValue,\n loadingText: _ctx.loadingText,\n modelValue: _ctx.modelValue,\n modelValueDebounceTime: _ctx.modelValueDebounceTime,\n name: name,\n noDataText: _ctx.noDataText,\n readonly: _ctx.readonly\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"autofocus\", \"color\", \"dependencies\", \"depsDebounceTime\", \"direction\", \"disabled\", \"enforceCoherence\", \"hasErrors\", \"hideLabel\", \"id\", \"items\", \"itemText\", \"itemValue\", \"loadingText\", \"modelValue\", \"modelValueDebounceTime\", \"name\", \"noDataText\", \"readonly\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","_createVNode","BaseRadioGroup","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AAyCA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,OAAO,CAAC;AAAA,IACR,cAAc,CAAC;AAAA,IACf,kBAAkB,CAAC;AAAA,IACnB,WAAW,CAAC;AAAA,IACZ,gBAAgB,CAAC;AAAA,IACjB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,kBAAkB,EAAE,MAAM,QAAQ;AAAA,IAClC,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,WAAW,EAAE,MAAM,QAAQ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;AAAA,YAAA,CAC1E;AAAA,UAAA,EAEJ;AAAA,QAAA,CACF,GAAG,MAAM,CAAC,aAAa,SAAS,gBAAgB,oBAAoB,aAAa,YAAY,oBAAoB,aAAa,aAAa,MAAM,SAAS,YAAY,aAAa,eAAe,cAAc,0BAA0B,QAAQ,cAAc,UAAU,CAAC;AAAA,MAAA,CAC7Q;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,iBAAiB,SAAS,iBAAiB,QAAQ,SAAS,CAAC;AAAA,EAE7H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index69.js","sources":["../src/components/BbProgress/BbProgress.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-progress\" }\n\nimport { getAsPercentageBetween } from \"@/utilities/functions/percentage\";\nimport { computed } from \"vue\";\n\nexport interface BbProgressProps {\n modelValue?: number | null;\n min?: number;\n max?: number;\n}\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbProgress',\n props: {\n modelValue: { default: 0 },\n min: { default: 0 },\n max: { default: 100 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst width = computed(() =>\n getAsPercentageBetween(props.modelValue || props.min, props.min, props.max)\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: \"bb-progress-bar\",\n style: _normalizeStyle({ width: width.value + '%' })\n }, null, 4)\n ]))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","width","computed","getAsPercentageBetween","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","_normalizeStyle"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,iBAeAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,KAAK,EAAE,SAAS,EAAE;AAAA,IAClB,KAAK,EAAE,SAAS,IAAI;AAAA,EACtB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAQC;AAAA,MAAS,MACrBC,EAAuBH,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,IAAA;AAGrE,WAAA,CAACI,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAOX,GAAY;AAAA,MAC3DY,EAAoB,OAAO;AAAA,QACzB,OAAO;AAAA,QACP,OAAOC,EAAgB,EAAE,OAAOR,EAAM,QAAQ,KAAK;AAAA,MAAA,GAClD,MAAM,CAAC;AAAA,IAAA,CACX;AAAA,EAEH;AAEA,CAAC;"}
package/dist/index71.js CHANGED
@@ -1,24 +1,84 @@
1
- import { defineComponent as t, openBlock as o, createElementBlock as r, normalizeStyle as a, createElementVNode as n, renderSlot as i } from "vue";
2
- const s = { class: "bb-ratio__inner" }, p = /* @__PURE__ */ t({
3
- __name: "BbRatio",
1
+ import { defineComponent as p, openBlock as b, createBlock as c, withCtx as a, renderSlot as r, normalizeProps as m, guardReactiveProps as f, createVNode as h, mergeProps as s, createSlots as y, renderList as k } from "vue";
2
+ import B from "./index18.js";
3
+ import "./index19.js";
4
+ import P from "./index14.js";
5
+ import "./index15.js";
6
+ const M = /* @__PURE__ */ p({
7
+ __name: "BbRadio",
4
8
  props: {
5
- ratio: { default: 1 }
9
+ autofocus: { type: Boolean },
10
+ checked: { type: Boolean },
11
+ color: {},
12
+ direction: { default: "auto" },
13
+ disabled: { type: Boolean },
14
+ errors: {},
15
+ hasErrors: { type: Boolean },
16
+ hideLabel: { type: Boolean },
17
+ id: {},
18
+ inputPosition: {},
19
+ label: {},
20
+ labelPosition: {},
21
+ modelValue: {},
22
+ name: {},
23
+ readonly: { type: Boolean },
24
+ reverse: { type: Boolean, default: !0 },
25
+ value: {}
6
26
  },
7
- setup(l) {
8
- return (e, d) => (o(), r("div", {
9
- class: "bb-ratio",
10
- style: a({
11
- width: "100%",
12
- paddingBottom: `${(1 / e.ratio * 100).toFixed(2)}%`
13
- })
14
- }, [
15
- n("div", s, [
16
- i(e.$slots, "default")
17
- ])
18
- ], 4));
27
+ emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
28
+ setup(v, { emit: o }) {
29
+ const i = {
30
+ onBlur: (e) => o("blur", e),
31
+ onChange: (e) => o("change", e),
32
+ onClick: (e) => o("click", e),
33
+ onFocus: (e) => o("focus", e),
34
+ onInput: (e) => o("input", e),
35
+ onKeydown: (e) => o("keydown", e),
36
+ onMousedown: (e) => o("mousedown", e),
37
+ onMouseup: (e) => o("mouseup", e),
38
+ "onUpdate:modelValue": (e) => o("update:modelValue", e)
39
+ };
40
+ return (e, V) => (b(), c(P, {
41
+ class: "bb-radio",
42
+ direction: e.direction,
43
+ hideLabel: e.hideLabel,
44
+ id: e.id,
45
+ inputPosition: e.inputPosition,
46
+ label: e.label,
47
+ labelPosition: e.labelPosition,
48
+ labelTag: "span",
49
+ name: e.name,
50
+ reverse: e.reverse,
51
+ tag: "label"
52
+ }, {
53
+ label: a((l) => [
54
+ r(e.$slots, "label", m(f(l)))
55
+ ]),
56
+ input: a(({ id: l, name: d, hasErrors: u }) => [
57
+ h(B, s({
58
+ autofocus: e.autofocus,
59
+ checked: e.checked,
60
+ color: e.color,
61
+ disabled: e.disabled,
62
+ hasErrors: u,
63
+ id: l,
64
+ modelValue: e.modelValue,
65
+ name: d,
66
+ readonly: e.readonly,
67
+ value: e.value
68
+ }, i), y({ _: 2 }, [
69
+ k(e.$slots, (g, n) => ({
70
+ name: n,
71
+ fn: a((t) => [
72
+ r(e.$slots, n, s(t, { text: e.label }))
73
+ ])
74
+ }))
75
+ ]), 1040, ["autofocus", "checked", "color", "disabled", "hasErrors", "id", "modelValue", "name", "readonly", "value"])
76
+ ]),
77
+ _: 3
78
+ }, 8, ["direction", "hideLabel", "id", "inputPosition", "label", "labelPosition", "name", "reverse"]));
19
79
  }
20
80
  });
21
81
  export {
22
- p as default
82
+ M as default
23
83
  };
24
84
  //# sourceMappingURL=index71.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index71.js","sources":["../src/components/BbRatio/BbRatio.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-ratio__inner\" }\n\nexport type BbRatioProps = {\n ratio?: number;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRatio',\n props: {\n ratio: { default: 1 }\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"bb-ratio\",\n style: _normalizeStyle({\n width: '100%',\n paddingBottom: `${((1 / _ctx.ratio) * 100).toFixed(2)}%`,\n })\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\")\n ])\n ], 4))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","_ctx","_cache","_openBlock","_createElementBlock","_normalizeStyle","_createElementVNode","_renderSlot"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,qBAMAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,SAAS,EAAE;AAAA,EACtB;AAAA,EACA,MAAMC,GAAc;AAMf,WAAA,CAACC,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,OAAO;AAAA,MACP,OAAOC,EAAgB;AAAA,QACrB,OAAO;AAAA,QACP,eAAe,IAAK,IAAIJ,EAAK,QAAS,KAAK,QAAQ,CAAC,CAAC;AAAA,MAAA,CACtD;AAAA,IAAA,GACA;AAAA,MACDK,EAAoB,OAAOT,GAAY;AAAA,QACrCU,EAAYN,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index71.js","sources":["../src/components/BbRadio/BbRadio.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseRadio from \"../BaseRadio/BaseRadio.vue\";\nimport type {BaseRadioEvents} from \"../BaseRadio/BaseRadio.vue\";\nimport BaseInputContainer from \"../BaseInputContainer/BaseInputContainer.vue\";\n\nexport interface BbRadioProps {\n autofocus?: boolean;\n checked?: boolean;\n color?: string;\n direction?: \"horizontal\" | \"vertical\" | \"auto\" | string;\n disabled?: boolean;\n errors?: string | string[];\n hasErrors?: boolean;\n hideLabel?: boolean;\n id?: string;\n inputPosition?: \"left\" | \"center\" | \"right\";\n label: string;\n labelPosition?: \"left\" | \"center\" | \"right\";\n modelValue?: any;\n name?: string;\n readonly?: boolean;\n reverse?: boolean;\n value: any;\n}\n\nexport type BbRadioEvents = BaseRadioEvents;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRadio',\n props: {\n autofocus: { type: Boolean },\n checked: { type: Boolean },\n color: {},\n direction: { default: 'auto' },\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n id: {},\n inputPosition: {},\n label: {},\n labelPosition: {},\n modelValue: {},\n name: {},\n readonly: { type: Boolean },\n reverse: { type: Boolean, default: true },\n value: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit }) {\n\n\n\n\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: any) => emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-radio\",\n direction: _ctx.direction,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n inputPosition: _ctx.inputPosition,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n labelTag: 'span',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'label'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseRadio, _mergeProps({\n autofocus: _ctx.autofocus,\n checked: _ctx.checked,\n color: _ctx.color,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n readonly: _ctx.readonly,\n value: _ctx.value\n }, eventListeners), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _mergeProps(data, { text: _ctx.label }))\n ])\n }\n })\n ]), 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"readonly\", \"value\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"hideLabel\", \"id\", \"inputPosition\", \"label\", \"labelPosition\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseRadio","_mergeProps","_createSlots","_renderList","_"],"mappings":";;;;;AA6BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,OAAO,CAAC;AAAA,IACR,WAAW,EAAE,SAAS,OAAO;AAAA,IAC7B,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,eAAe,CAAC;AAAA,IAChB,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,SAAS,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IACxC,OAAO,CAAC;AAAA,EACV;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EAC3G,MAAMC,GAAc,EAAE,MAAAC,KAAQ;AAMhC,UAAMC,IAAiB;AAAA,MACrB,QAAQ,CAACC,MAAsBF,EAAK,QAAQE,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBF,EAAK,UAAUE,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBF,EAAK,SAASE,CAA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