bitboss-ui 0.1.80 → 0.1.82

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 (224) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +5 -2
  2. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +3 -0
  3. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -2
  4. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +3 -0
  5. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +3 -0
  6. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +3 -0
  7. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +3 -0
  8. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -1
  9. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +4 -1
  10. package/dist/components/BaseRating/BaseRating.vue.d.ts +4 -1
  11. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +16 -2
  12. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +3 -0
  13. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +3 -0
  14. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +3 -0
  15. package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -1
  16. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +4 -1
  17. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +2 -2
  18. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +5 -2
  19. package/dist/components/BbAlert/BbAlert.vue.d.ts +3 -0
  20. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +7 -58
  21. package/dist/components/BbBadge/BbBadge.vue.d.ts +4 -1
  22. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +3 -0
  23. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +3 -0
  24. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -0
  25. package/dist/components/BbChip/BbChip.vue.d.ts +7 -1
  26. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +4 -1
  27. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -0
  28. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
  29. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +15 -3
  30. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +4 -1
  31. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +6 -7
  32. package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -0
  33. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +4 -1
  34. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +3 -0
  35. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
  36. package/dist/components/BbPagination/BbPagination.vue.d.ts +4 -1
  37. package/dist/components/BbPopover/BbPopover.vue.d.ts +14 -7
  38. package/dist/components/BbProgress/BbProgress.vue.d.ts +3 -0
  39. package/dist/components/BbRadio/BbRadio.vue.d.ts +3 -0
  40. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +1 -6
  41. package/dist/components/BbRating/BbRating.vue.d.ts +3 -0
  42. package/dist/components/BbRatio/BbRatio.vue.d.ts +4 -1
  43. package/dist/components/BbSelect/BbSelect.vue.d.ts +14 -3
  44. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +5 -2
  45. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -0
  46. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +3 -0
  47. package/dist/components/BbTab/BbTab.vue.d.ts +4 -1
  48. package/dist/components/BbTable/BbTable.vue.d.ts +258 -295
  49. package/dist/components/BbTable/types.d.ts +214 -0
  50. package/dist/components/BbTag/BbTag.vue.d.ts +3 -0
  51. package/dist/components/BbToast/BbToast.vue.d.ts +3 -0
  52. package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -0
  53. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +8 -7
  54. package/dist/components/BbTree/BbTree.vue.d.ts +9 -1
  55. package/dist/composables/useItemText.d.ts +6 -1
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index10.js +2 -2
  58. package/dist/index10.js.map +1 -1
  59. package/dist/index100.js +2 -2
  60. package/dist/index102.js +4 -3
  61. package/dist/index102.js.map +1 -1
  62. package/dist/index106.js +1 -1
  63. package/dist/index108.js +85 -57
  64. package/dist/index108.js.map +1 -1
  65. package/dist/index110.js +77 -55
  66. package/dist/index110.js.map +1 -1
  67. package/dist/index112.js +5 -5
  68. package/dist/index112.js.map +1 -1
  69. package/dist/index113.js +1 -1
  70. package/dist/index113.js.map +1 -1
  71. package/dist/index114.js +1 -1
  72. package/dist/index115.js +1 -1
  73. package/dist/index115.js.map +1 -1
  74. package/dist/index116.js +1 -1
  75. package/dist/index118.js +1 -1
  76. package/dist/index12.js +8 -8
  77. package/dist/index120.js +1 -1
  78. package/dist/index121.js +11 -11
  79. package/dist/index121.js.map +1 -1
  80. package/dist/index14.js +9 -9
  81. package/dist/index16.js +3 -3
  82. package/dist/index18.js +2 -2
  83. package/dist/index189.js +2 -2
  84. package/dist/index189.js.map +1 -1
  85. package/dist/index190.js +2 -4
  86. package/dist/index190.js.map +1 -1
  87. package/dist/index191.js +2 -2
  88. package/dist/index191.js.map +1 -1
  89. package/dist/index192.js +3 -2
  90. package/dist/index192.js.map +1 -1
  91. package/dist/index193.js +3 -2
  92. package/dist/index193.js.map +1 -1
  93. package/dist/index194.js +4 -3
  94. package/dist/index194.js.map +1 -1
  95. package/dist/index195.js +3 -35
  96. package/dist/index195.js.map +1 -1
  97. package/dist/index196.js +35 -6
  98. package/dist/index196.js.map +1 -1
  99. package/dist/index197.js +6 -350
  100. package/dist/index197.js.map +1 -1
  101. package/dist/index198.js +5 -134
  102. package/dist/index198.js.map +1 -1
  103. package/dist/index199.js +16 -5
  104. package/dist/index199.js.map +1 -1
  105. package/dist/index20.js +1 -1
  106. package/dist/index20.js.map +1 -1
  107. package/dist/index200.js +15 -18
  108. package/dist/index200.js.map +1 -1
  109. package/dist/index201.js +19 -2
  110. package/dist/index201.js.map +1 -1
  111. package/dist/index202.js +18 -184
  112. package/dist/index202.js.map +1 -1
  113. package/dist/index203.js +29 -23
  114. package/dist/index203.js.map +1 -1
  115. package/dist/index204.js +8 -331
  116. package/dist/index204.js.map +1 -1
  117. package/dist/index205.js +2 -2
  118. package/dist/index205.js.map +1 -1
  119. package/dist/index206.js +351 -2
  120. package/dist/index206.js.map +1 -1
  121. package/dist/index207.js +131 -13
  122. package/dist/index207.js.map +1 -1
  123. package/dist/index208.js +2 -16
  124. package/dist/index208.js.map +1 -1
  125. package/dist/index209.js +184 -18
  126. package/dist/index209.js.map +1 -1
  127. package/dist/index210.js +23 -29
  128. package/dist/index210.js.map +1 -1
  129. package/dist/index211.js +369 -8
  130. package/dist/index211.js.map +1 -1
  131. package/dist/index212.js +2 -3
  132. package/dist/index212.js.map +1 -1
  133. package/dist/index213.js +2 -3
  134. package/dist/index213.js.map +1 -1
  135. package/dist/index216.js +73 -53
  136. package/dist/index216.js.map +1 -1
  137. package/dist/index217.js +3 -3
  138. package/dist/index22.js +2 -2
  139. package/dist/index221.js +223 -10
  140. package/dist/index221.js.map +1 -1
  141. package/dist/index222.js +252 -429
  142. package/dist/index222.js.map +1 -1
  143. package/dist/index223.js +10 -8
  144. package/dist/index223.js.map +1 -1
  145. package/dist/index224.js +428 -82
  146. package/dist/index224.js.map +1 -1
  147. package/dist/index225.js +9 -8
  148. package/dist/index225.js.map +1 -1
  149. package/dist/index226.js +88 -5
  150. package/dist/index226.js.map +1 -1
  151. package/dist/index235.js +2 -69
  152. package/dist/index235.js.map +1 -1
  153. package/dist/index236.js +2 -162
  154. package/dist/index236.js.map +1 -1
  155. package/dist/index237.js +2 -2
  156. package/dist/index238.js +2 -2
  157. package/dist/index238.js.map +1 -1
  158. package/dist/index239.js +9 -2
  159. package/dist/index239.js.map +1 -1
  160. package/dist/index24.js +1 -1
  161. package/dist/index24.js.map +1 -1
  162. package/dist/index240.js +6 -2
  163. package/dist/index240.js.map +1 -1
  164. package/dist/index241.js +162 -2
  165. package/dist/index241.js.map +1 -1
  166. package/dist/index242.js +2 -2
  167. package/dist/index243.js +2 -224
  168. package/dist/index243.js.map +1 -1
  169. package/dist/index244.js +68 -257
  170. package/dist/index244.js.map +1 -1
  171. package/dist/index245.js +2 -38
  172. package/dist/index245.js.map +1 -1
  173. package/dist/index246.js +38 -2
  174. package/dist/index246.js.map +1 -1
  175. package/dist/index247.js +2 -2
  176. package/dist/index247.js.map +1 -1
  177. package/dist/index248.js +2 -2
  178. package/dist/index248.js.map +1 -1
  179. package/dist/index249.js +2 -2
  180. package/dist/index250.js +2 -2
  181. package/dist/index251.js +2 -2
  182. package/dist/index251.js.map +1 -1
  183. package/dist/index252.js +5 -0
  184. package/dist/index252.js.map +1 -0
  185. package/dist/index26.js +3 -3
  186. package/dist/index26.js.map +1 -1
  187. package/dist/index28.js +172 -155
  188. package/dist/index28.js.map +1 -1
  189. package/dist/index30.js +2 -2
  190. package/dist/index32.js +2 -2
  191. package/dist/index34.js +2 -2
  192. package/dist/index34.js.map +1 -1
  193. package/dist/index36.js +21 -19
  194. package/dist/index36.js.map +1 -1
  195. package/dist/index38.js.map +1 -1
  196. package/dist/index44.js +1 -1
  197. package/dist/index44.js.map +1 -1
  198. package/dist/index46.js +1 -1
  199. package/dist/index46.js.map +1 -1
  200. package/dist/index6.js.map +1 -1
  201. package/dist/index62.js +168 -137
  202. package/dist/index62.js.map +1 -1
  203. package/dist/index64.js +38 -30
  204. package/dist/index64.js.map +1 -1
  205. package/dist/index66.js.map +1 -1
  206. package/dist/index69.js +1 -1
  207. package/dist/index72.js +1 -1
  208. package/dist/index74.js.map +1 -1
  209. package/dist/index76.js +96 -66
  210. package/dist/index76.js.map +1 -1
  211. package/dist/index78.js +1 -1
  212. package/dist/index8.js +2 -2
  213. package/dist/index82.js +2 -2
  214. package/dist/index82.js.map +1 -1
  215. package/dist/index84.js.map +1 -1
  216. package/dist/index88.js +7 -4
  217. package/dist/index88.js.map +1 -1
  218. package/dist/index96.js +2 -2
  219. package/dist/index96.js.map +1 -1
  220. package/dist/index98.js +35 -30
  221. package/dist/index98.js.map +1 -1
  222. package/dist/style.css +1 -1
  223. package/dist/types/CommonProps.d.ts +15 -8
  224. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index36.js","sources":["../src/components/BaseTextarea/BaseTextarea.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, mergeProps as _mergeProps, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-textarea__inner-container\" }\nconst _hoisted_2 = [\"autofocus\", \"disabled\", \"id\", \"name\", \"placeholder\", \"readonly\", \"value\"]\n\nimport { computed, nextTick, onMounted, ref, watch } from \"vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Ref } from \"vue\";\n\nexport type BaseTextareaProps = Pick<\n CommonProps,\n | \"autofocus\"\n | \"disabled\"\n | \"hasErrors\"\n | \"id\"\n | \"name\"\n | \"placeholder\"\n | \"readonly\"\n> & {\n /**\n * Expands the textarea to match its content\n */\n autoGrow?: boolean;\n /**\n * Used by v-model\n */\n modelValue?: string | null;\n};\nexport type BaseTextareaEvents = {\n (e: \"blur\", event: FocusEvent): void;\n (e: \"change\", event: Event): void;\n (e: \"click\", event: MouseEvent): void;\n (e: \"focus\", event: FocusEvent): void;\n (e: \"input\", event: Event): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n (e: \"mousedown\", event: MouseEvent): void;\n (e: \"mouseup\", event: MouseEvent): void;\n (e: \"update:modelValue\", value: string | null): void;\n};\nexport type BaseTextareaSlots = {\n \"prepend-outer\"?: (props: {}) => any;\n prepend?: (props: {}) => any;\n append?: (props: {}) => any;\n \"append-outer\"?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextarea',\n props: {\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n placeholder: {},\n readonly: {},\n autoGrow: { type: Boolean },\n modelValue: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst textarea: Ref<HTMLTextAreaElement | null> = ref(null);\n\nconst classes = computed(() => ({\n \"bb-base-textarea\": true,\n \"bb-base-textarea--auto-grow\": props.autoGrow,\n \"bb-base-textarea--disabled\": props.disabled,\n \"bb-base-textarea--errors\": props.hasErrors,\n \"bb-base-textarea--readonly\": props.readonly,\n}));\n\n// Allow modelvalue to be reset to null\nconst modelValueWithDefault = computed(() =>\n props.modelValue ? props.modelValue : \"\"\n);\nonMounted(() => {\n if (props.autoGrow) {\n computeTextareaHeight();\n }\n});\nwatch(\n () => props.modelValue,\n () => {\n if (props.autoGrow) {\n nextTick(computeTextareaHeight);\n }\n }\n);\n\nfunction onInput(event: Event): void {\n // Prevemt enter from triggering smt else\n event.stopPropagation();\n if (event.target instanceof HTMLTextAreaElement) {\n let value = event.target.value;\n emit(\"input\", event);\n emit(\"update:modelValue\", value);\n }\n}\nfunction onKeydown(event: KeyboardEvent): void {\n // Prevent enter from triggering smt else\n event.stopPropagation();\n if (event.target instanceof HTMLTextAreaElement) {\n emit(\"keydown\", event);\n }\n}\n\n/**\n * These events are just propagated\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 onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n};\n\n/* \nReset height and the apply scroll height otherwise it would not be able to shrink\n*/\nfunction computeTextareaHeight() {\n if (!textarea.value) return;\n textarea.value.style.height = \"0px\";\n\n textarea.value.style.height = `${textarea.value.scrollHeight}px`;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([classes.value, \"bb-base-textarea__container\"])\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"textarea\", _mergeProps({\n autofocus: _ctx.autofocus,\n class: 'bb-base-textarea__input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n name: _ctx.name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n value: modelValueWithDefault.value,\n onInput: onInput,\n onKeydown: onKeydown\n }, eventListeners, {\n ref_key: \"textarea\",\n ref: textarea\n }), null, 16, _hoisted_2),\n _renderSlot(_ctx.$slots, \"append\")\n ]),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","textarea","ref","classes","computed","modelValueWithDefault","onMounted","computeTextareaHeight","watch","nextTick","onInput","event","value","onKeydown","eventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_mergeProps"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,uCACtBC,IAAa,CAAC,aAAa,YAAY,MAAM,QAAQ,eAAe,YAAY,OAAO,GA4CjEC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IA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sBX,EAAK,SAASW,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBX,EAAK,SAASW,CAAK;AAAA,MACnD,aAAa,CAACA,MAAsBX,EAAK,aAAaW,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBX,EAAK,WAAWW,CAAK;AAAA,IAAA;AAMzD,aAASJ,IAAwB;AAC/B,MAAKN,EAAS,UACLA,EAAA,MAAM,MAAM,SAAS,OAE9BA,EAAS,MAAM,MAAM,SAAS,GAAGA,EAAS,MAAM,YAAY;AAAA,IAC9D;AAEO,WAAA,CAACc,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQ;AAAA,MAChD,OAAOC,EAAgB,CAAChB,EAAQ,OAAO,6BAA6B,CAAC;AAAA,IAAA,GACpE;AAAA,MACDiB,EAAYL,EAAK,QAAQ,eAAe;AAAA,MACxCM,EAAoB,QAAQ5B,GAAY;AAAA,QACtC2B,EAAYL,EAAK,QAAQ,SAAS;AAAA,QAClCM,EAAoB,YAAYC,EAAY;AAAA,UAC1C,WAAWP,EAAK;AAAA,UAChB,OAAO;AAAA,UACP,UAAUA,EAAK;AAAA,UACf,IAAIA,EAAK;AAAA,UACT,MAAMA,EAAK;AAAA,UACX,aAAaA,EAAK;AAAA,UAClB,UAAUA,EAAK;AAAA,UACf,OAAOV,EAAsB;AAAA,UAC7B,SAAAK;AAAA,UACA,WAAAG;AAAA,WACCC,GAAgB;AAAA,UACjB,SAAS;AAAA,UACT,KAAKb;AAAA,QAAA,CACN,GAAG,MAAM,IAAIP,CAAU;AAAA,QACxB0B,EAAYL,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,MACDK,EAAYL,EAAK,QAAQ,cAAc;AAAA,OACtC,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index36.js","sources":["../src/components/BaseTextarea/BaseTextarea.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, mergeProps as _mergeProps, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-textarea__inner-container\" }\nconst _hoisted_2 = [\"autocomplete\", \"autofocus\", \"disabled\", \"id\", \"name\", \"placeholder\", \"readonly\", \"value\"]\n\nimport { computed, nextTick, onMounted, ref, watch } from \"vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Ref } from \"vue\";\n\nexport type BaseTextareaProps = Pick<\n CommonProps,\n | \"autocomplete\"\n | \"autofocus\"\n | \"disabled\"\n | \"hasErrors\"\n | \"id\"\n | \"name\"\n | \"placeholder\"\n | \"readonly\"\n> & {\n /**\n * Expands the textarea to match its content\n */\n autoGrow?: boolean;\n /**\n * Used by v-model\n */\n modelValue: string | null;\n};\nexport type BaseTextareaEvents = {\n (e: \"blur\", event: FocusEvent): void;\n (e: \"change\", event: Event): void;\n (e: \"click\", event: MouseEvent): void;\n (e: \"focus\", event: FocusEvent): void;\n (e: \"input\", event: Event): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n (e: \"mousedown\", event: MouseEvent): void;\n (e: \"mouseup\", event: MouseEvent): void;\n (e: \"update:modelValue\", value: string | null): void;\n};\nexport type BaseTextareaSlots = {\n \"prepend-outer\"?: (props: {}) => any;\n prepend?: (props: {}) => any;\n append?: (props: {}) => any;\n \"append-outer\"?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextarea',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n placeholder: {},\n readonly: {},\n autoGrow: { type: Boolean },\n modelValue: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst textarea: Ref<HTMLTextAreaElement | null> = ref(null);\n\nconst classes = computed(() => ({\n \"bb-base-textarea\": true,\n \"bb-base-textarea--auto-grow\": props.autoGrow,\n \"bb-base-textarea--disabled\": props.disabled,\n \"bb-base-textarea--errors\": props.hasErrors,\n \"bb-base-textarea--readonly\": props.readonly,\n}));\n\n// Allow modelvalue to be reset to null\nconst modelValueWithDefault = computed(() =>\n props.modelValue ? props.modelValue : \"\"\n);\nonMounted(() => {\n if (props.autoGrow) {\n computeTextareaHeight();\n }\n});\nwatch(\n () => props.modelValue,\n () => {\n if (props.autoGrow) {\n nextTick(computeTextareaHeight);\n }\n }\n);\n\nfunction onInput(event: Event): void {\n // Prevemt enter from triggering smt else\n event.stopPropagation();\n if (event.target instanceof HTMLTextAreaElement) {\n let value = event.target.value;\n emit(\"input\", event);\n emit(\"update:modelValue\", value);\n }\n}\nfunction onKeydown(event: KeyboardEvent): void {\n // Prevent enter from triggering smt else\n event.stopPropagation();\n if (event.target instanceof HTMLTextAreaElement) {\n emit(\"keydown\", event);\n }\n}\n\n/**\n * These events are just propagated\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 onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n};\n\n/* \nReset height and the apply scroll height otherwise it would not be able to shrink\n*/\nfunction computeTextareaHeight() {\n if (!textarea.value) return;\n textarea.value.style.height = \"0px\";\n\n textarea.value.style.height = `${textarea.value.scrollHeight}px`;\n}\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([classes.value, \"bb-base-textarea__container\"])\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"textarea\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-textarea__input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n name: _ctx.name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n value: modelValueWithDefault.value,\n onInput: onInput,\n onKeydown: onKeydown\n }, eventListeners, {\n ref_key: \"textarea\",\n ref: textarea\n }), null, 16, _hoisted_2),\n _renderSlot(_ctx.$slots, \"append\")\n ]),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","textarea","ref","classes","computed","modelValueWithDefault","onMounted","computeTextareaHeight","watch","nextTick","onInput","event","value","onKeydown","eventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_mergeProps"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,uCACtBC,IAAa,CAAC,gBAAgB,aAAa,YAAY,MAAM,QAAQ,eAAe,YAAY,OAAO,GA6CjFC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,YAAY,CAAC;AAAA,EACf;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EAC3G,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,UAAMC,IAAQF,GAERG,IAAOF,GAIPG,IAA4CC,EAAI,IAAI,GAEpDC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CAACc,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQ;AAAA,MAChD,OAAOC,EAAgB,CAAChB,EAAQ,OAAO,6BAA6B,CAAC;AAAA,IAAA,GACpE;AAAA,MACDiB,EAAYL,EAAK,QAAQ,eAAe;AAAA,MACxCM,EAAoB,QAAQ5B,GAAY;AAAA,QACtC2B,EAAYL,EAAK,QAAQ,SAAS;AAAA,QAClCM,EAAoB,YAAYC,EAAY;AAAA,UAC1C,cAAcP,EAAK;AAAA,UACnB,WAAWA,EAAK;AAAA,UAChB,OAAO;AAAA,UACP,UAAUA,EAAK;AAAA,UACf,IAAIA,EAAK;AAAA,UACT,MAAMA,EAAK;AAAA,UACX,aAAaA,EAAK;AAAA,UAClB,UAAUA,EAAK;AAAA,UACf,OAAOV,EAAsB;AAAA,UAC7B,SAAAK;AAAA,UACA,WAAAG;AAAA,WACCC,GAAgB;AAAA,UACjB,SAAS;AAAA,UACT,KAAKb;AAAA,QAAA,CACN,GAAG,MAAM,IAAIP,CAAU;AAAA,QACxB0B,EAAYL,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,MACDK,EAAYL,EAAK,QAAQ,cAAc;AAAA,OACtC,CAAC;AAAA,EAEN;AAEA,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index38.js","sources":["../src/components/BaseTextInput/BaseTextInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, mergeProps as _mergeProps, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-text-input__inner-container\" }\nconst _hoisted_2 = [\"autocomplete\", \"autofocus\", \"disabled\", \"id\", \"name\", \"placeholder\", \"readonly\", \"type\", \"value\"]\n\nimport { computed } from \"vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BaseTextInputProps = Pick<CommonProps, \n'autocomplete' |\n'autofocus' |\n'disabled' |\n'hasErrors' |\n'id' |\n'name' |\n'placeholder' |\n'readonly' \n> & {\n /**\n * Used my v-model\n */\n modelValue?: string | null;\n /**\n * Type of the input. Returns the content type of the object.\n */\n type?: HTMLInputElement['type'];\n}\n\nexport type BaseTextInputEvents = {\n (e: 'blur', event: FocusEvent) :void\n (e: 'change', event: Event) :void\n (e: 'click', event: MouseEvent) :void\n (e: 'focus', event: FocusEvent) :void\n (e: 'input', event: Event) :void\n (e: 'keydown', event: KeyboardEvent) :void\n (e: 'mousedown', event: MouseEvent) :void\n (e: 'mouseup', event: MouseEvent) :void\n (e: 'update:modelValue', value: string | null) :void\n}\nexport type BaseTextInputSlots = {\n 'prepend-outer'?: (props: {}) => any\n 'prepend'?: (props: {}) => any\n 'append'?: (props: {}) => any\n 'append-outer'?: (props: {}) => any\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextInput',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n placeholder: {},\n readonly: {},\n modelValue: {},\n type: { default: \"text\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst classes = computed(() => ({\n \"bb-base-text-input\": true,\n \"bb-base-text-input--errors\": props.hasErrors,\n \"bb-base-text-input--readonly\": props.readonly,\n \"bb-base-text-input--disabled\": props.disabled,\n}));\n\n/**\n * These events are just propagated\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 onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onInput: (event: Event) => {\n if (event.target instanceof HTMLInputElement) {\n emit(\"update:modelValue\", event.target.value);\n }\n emit(\"input\", event);\n },\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([classes.value, \"bb-base-text-input__container\"])\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"input\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-text-input__input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n name: _ctx.name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n type: _ctx.type,\n value: _ctx.modelValue\n }, eventListeners, { ref: \"input\" }), null, 16, _hoisted_2),\n _renderSlot(_ctx.$slots, \"append\")\n ]),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","classes","computed","eventListeners","event","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_mergeProps"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,yCACtBC,IAAa,CAAC,gBAAgB,aAAa,YAAY,MAAM,QAAQ,eAAe,YAAY,QAAQ,OAAO,GA4CzFC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,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OAAO;AAAA,UACP,UAAUA,EAAK;AAAA,UACf,IAAIA,EAAK;AAAA,UACT,MAAMA,EAAK;AAAA,UACX,aAAaA,EAAK;AAAA,UAClB,UAAUA,EAAK;AAAA,UACf,MAAMA,EAAK;AAAA,UACX,OAAOA,EAAK;AAAA,QAAA,GACXF,GAAgB,EAAE,KAAK,QAAS,CAAA,GAAG,MAAM,IAAIT,CAAU;AAAA,QAC1DgB,EAAYL,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,MACDK,EAAYL,EAAK,QAAQ,cAAc;AAAA,OACtC,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index38.js","sources":["../src/components/BaseTextInput/BaseTextInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, mergeProps as _mergeProps, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-text-input__inner-container\" }\nconst _hoisted_2 = [\"autocomplete\", \"autofocus\", \"disabled\", \"id\", \"name\", \"placeholder\", \"readonly\", \"type\", \"value\"]\n\nimport { computed } from \"vue\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BaseTextInputProps = Pick<CommonProps, \n'autocomplete' |\n'autofocus' |\n'disabled' |\n'hasErrors' |\n'id' |\n'name' |\n'placeholder' |\n'readonly' \n> & {\n /**\n * Used my v-model\n */\n modelValue: string | null;\n /**\n * Type of the input. Returns the content type of the object.\n */\n type?: HTMLInputElement['type'];\n}\n\nexport type BaseTextInputEvents = {\n (e: 'blur', event: FocusEvent) :void\n (e: 'change', event: Event) :void\n (e: 'click', event: MouseEvent) :void\n (e: 'focus', event: FocusEvent) :void\n (e: 'input', event: Event) :void\n (e: 'keydown', event: KeyboardEvent) :void\n (e: 'mousedown', event: MouseEvent) :void\n (e: 'mouseup', event: MouseEvent) :void\n (e: 'update:modelValue', value: string | null) :void\n}\nexport type BaseTextInputSlots = {\n 'prepend-outer'?: (props: {}) => any\n 'prepend'?: (props: {}) => any\n 'append'?: (props: {}) => any\n 'append-outer'?: (props: {}) => any\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTextInput',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n placeholder: {},\n readonly: {},\n modelValue: {},\n type: { default: \"text\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst classes = computed(() => ({\n \"bb-base-text-input\": true,\n \"bb-base-text-input--errors\": props.hasErrors,\n \"bb-base-text-input--readonly\": props.readonly,\n \"bb-base-text-input--disabled\": props.disabled,\n}));\n\n/**\n * These events are just propagated\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 onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onInput: (event: Event) => {\n if (event.target instanceof HTMLInputElement) {\n emit(\"update:modelValue\", event.target.value);\n }\n emit(\"input\", event);\n },\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([classes.value, \"bb-base-text-input__container\"])\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"input\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-text-input__input',\n disabled: _ctx.disabled,\n id: _ctx.id,\n name: _ctx.name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly,\n type: _ctx.type,\n value: _ctx.modelValue\n }, eventListeners, { ref: \"input\" }), null, 16, _hoisted_2),\n _renderSlot(_ctx.$slots, \"append\")\n ]),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","classes","computed","eventListeners","event","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_mergeProps"],"mappings":";AAGA,MAAMA,IAAa,EAAE,OAAO,yCACtBC,IAAa,CAAC,gBAAgB,aAAa,YAAY,MAAM,QAAQ,eAAe,YAAY,QAAQ,OAAO,GA4CzFC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,MAAM,EAAE,SAAS,OAAO;AAAA,EAC1B;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EAC3G,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,UAAMC,IAAQF,GAERG,IAAOF,GAIPG,IAAUC,EAAS,OAAO;AAAA,MAC9B,sBAAsB;AAAA,MACtB,8BAA8BH,EAAM;AAAA,MACpC,gCAAgCA,EAAM;AAAA,MACtC,gCAAgCA,EAAM;AAAA,IACtC,EAAA,GAKII,IAAiB;AAAA,MACrB,QAAQ,CAACC,MAAsBJ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"}
package/dist/index44.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, computed as u, ref as d, watch as f, openBlock as a, createElementBlock as l, normalizeProps as b, guardReactiveProps as z, createElementVNode as v, renderSlot as g, createCommentVNode as h } from "vue";
2
- import { isCssColor as _ } from "./index189.js";
2
+ import { isCssColor as _ } from "./index191.js";
3
3
  const k = { class: "bb-avatar__fallback" }, C = ["alt", "src", "srcset", "sizes"], B = /* @__PURE__ */ p({
4
4
  __name: "BbAvatar",
5
5
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"index44.js","sources":["../src/components/BbAvatar/BbAvatar.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-avatar__fallback\" }\nconst _hoisted_2 = [\"alt\", \"src\", \"srcset\", \"sizes\"]\n\nimport { computed, ref, watch } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport type { Classes } from \"@/types/Classes\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { Size } from \"../BbIcon/BbIcon.vue\";\n\nexport type BbAvatarProps = Pick<CommonProps, \"color\"> & {\n /**\n * Size of the avatar as a predefined string or as a number in pixels\n */\n size?: Size;\n /**\n * Attribute `sizes` for the `img` tag\n */\n sizes?: HTMLImageElement[\"sizes\"];\n} & (\n | {\n /**\n * Attribute `alt` for the `img` tag\n */\n alt: HTMLImageElement[\"alt\"];\n /**\n * Attribute `src` for the `img` tag\n */\n src: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset?: HTMLImageElement[\"srcset\"];\n }\n | {\n /**\n * Attribute `alt` for the `img` tag\n */\n alt: HTMLImageElement[\"alt\"];\n /**\n * Attribute `src` for the `img` tag\n */\n src?: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset: HTMLImageElement[\"srcset\"];\n }\n | {\n /**\n * Attribute `alt` for the `img` tag\n */\n alt?: HTMLImageElement[\"alt\"];\n /**\n * Attribute `src` for the `img` tag\n */\n src?: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset: HTMLImageElement[\"srcset\"];\n }\n );\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAvatar',\n props: {\n color: {},\n size: {},\n sizes: {},\n alt: {},\n src: {},\n srcset: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst sizeMap: Size = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 56,\n xl: 80,\n xxl: 104,\n};\n\nconst attributes = computed(() => {\n const classes: Classes = {\n \"bb-avatar\": true,\n };\n let dimension: any;\n if (props.size) {\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n } else {\n dimension = props.size;\n }\n dimension += `px`;\n }\n\n let style: { [key: string]: any } = {\n width: dimension,\n height: dimension,\n };\n if (props.color) {\n if (isCssColor(props.color)) {\n style.backgroundColor = props.color;\n } else {\n classes[`bb-avatar--${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nconst imageHasErrored = ref(false);\nconst onImageError = () => {\n imageHasErrored.value = true;\n};\nwatch(\n () => [props.src, props.srcset],\n () => {\n imageHasErrored.value = false;\n }\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(attributes.value)), [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n (!!(_ctx.src || _ctx.srcset) && !imageHasErrored.value)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n alt: _ctx.alt,\n src: _ctx.src,\n srcset: _ctx.srcset,\n sizes: _ctx.sizes,\n class: \"bb-avatar__img\",\n onError: onImageError\n }, null, 40, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","attributes","computed","classes","dimension","style","isCssColor","imageHasErrored","ref","onImageError","watch","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,yBACtBC,IAAa,CAAC,OAAO,OAAO,UAAU,OAAO,GA+DvBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,CAAC;AAAA,IACP,OAAO,CAAC;AAAA,IACR,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAgB;AAAA,MACpB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGDC,IAAaC,EAAS,MAAM;AAChC,YAAMC,IAAmB;AAAA,QACvB,aAAa;AAAA,MAAA;AAEX,UAAAC;AACJ,MAAIL,EAAM,SACJ,OAAOA,EAAM,QAAS,WACxBK,IAAYJ,EAAQD,EAAM,IAAkB,KAAK,SAASA,EAAM,MAAM,EAAE,IAExEK,IAAYL,EAAM,MAEPK,KAAA;AAGf,UAAIC,IAAgC;AAAA,QAClC,OAAOD;AAAA,QACP,QAAQA;AAAA,MAAA;AAEV,aAAIL,EAAM,UACJO,EAAWP,EAAM,KAAK,IACxBM,EAAM,kBAAkBN,EAAM,QAE9BI,EAAQ,cAAcJ,EAAM,KAAK,EAAE,IAAI,KAGpC;AAAA,QACL,OAAOI;AAAA,QACP,OAAAE;AAAA,MAAA;AAAA,IACF,CACD,GAEKE,IAAkBC,EAAI,EAAK,GAC3BC,IAAe,MAAM;AACzB,MAAAF,EAAgB,QAAQ;AAAA,IAAA;AAE1B,WAAAG;AAAA,MACE,MAAM,CAACX,EAAM,KAAKA,EAAM,MAAM;AAAA,MAC9B,MAAM;AACJ,QAAAQ,EAAgB,QAAQ;AAAA,MAC1B;AAAA,IAAA,GAGK,CAACI,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQC,EAAgBC,EAAoBf,EAAW,KAAK,CAAC,GAAG;AAAA,MACxGgB,EAAoB,QAAQvB,GAAY;AAAA,QACtCwB,EAAYP,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACGA,EAAK,OAAOA,EAAK,WAAW,CAACJ,EAAgB,SAC5CM,KAAcC,EAAoB,OAAO;AAAA,QACxC,KAAK;AAAA,QACL,KAAKH,EAAK;AAAA,QACV,KAAKA,EAAK;AAAA,QACV,QAAQA,EAAK;AAAA,QACb,OAAOA,EAAK;AAAA,QACZ,OAAO;AAAA,QACP,SAASF;AAAA,MAAA,GACR,MAAM,IAAId,CAAU,KACvBwB,EAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index44.js","sources":["../src/components/BbAvatar/BbAvatar.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-avatar__fallback\" }\nconst _hoisted_2 = [\"alt\", \"src\", \"srcset\", \"sizes\"]\n\nimport { computed, ref, watch } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport type { Classes } from \"@/types/Classes\";\nimport type { CommonProps } from \"@/types/CommonProps\";\nimport type { BbIconProps, Size } from \"../BbIcon/BbIcon.vue\";\n\nexport type BbAvatarProps = Pick<CommonProps, \"color\"> &\n Pick<BbIconProps, \"size\"> & {\n /**\n * Attribute `sizes` for the `img` tag\n */\n sizes?: HTMLImageElement[\"sizes\"];\n /**\n * Attribute `alt` for the `img` tag\n */\n alt: HTMLImageElement[\"alt\"];\n } & (\n | {\n /**\n * Attribute `src` for the `img` tag\n */\n src: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset?: HTMLImageElement[\"srcset\"];\n }\n | {\n /**\n * Attribute `src` for the `img` tag\n */\n src?: HTMLImageElement[\"src\"];\n /**\n * Attribute `srcset` for the `img` tag\n */\n srcset: HTMLImageElement[\"srcset\"];\n }\n );\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbAvatar',\n props: {\n color: {},\n size: {},\n sizes: {},\n alt: {},\n src: {},\n srcset: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\nconst sizeMap: Size = {\n xs: 24,\n sm: 32,\n md: 40,\n lg: 56,\n xl: 80,\n xxl: 104,\n};\n\nconst attributes = computed(() => {\n const classes: Classes = {\n \"bb-avatar\": true,\n };\n let dimension: any;\n if (props.size) {\n if (typeof props.size === \"string\") {\n dimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n } else {\n dimension = props.size;\n }\n dimension += `px`;\n }\n\n let style: { [key: string]: any } = {\n width: dimension,\n height: dimension,\n };\n if (props.color) {\n if (isCssColor(props.color)) {\n style.backgroundColor = props.color;\n } else {\n classes[`bb-avatar--${props.color}`] = true;\n }\n }\n return {\n class: classes,\n style,\n };\n});\n\nconst imageHasErrored = ref(false);\nconst onImageError = () => {\n imageHasErrored.value = true;\n};\nwatch(\n () => [props.src, props.srcset],\n () => {\n imageHasErrored.value = false;\n }\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _normalizeProps(_guardReactiveProps(attributes.value)), [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\")\n ]),\n (!!(_ctx.src || _ctx.srcset) && !imageHasErrored.value)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n alt: _ctx.alt,\n src: _ctx.src,\n srcset: _ctx.srcset,\n sizes: _ctx.sizes,\n class: \"bb-avatar__img\",\n onError: onImageError\n }, null, 40, _hoisted_2))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","sizeMap","attributes","computed","classes","dimension","style","isCssColor","imageHasErrored","ref","onImageError","watch","_ctx","_cache","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","_createElementVNode","_renderSlot","_createCommentVNode"],"mappings":";;AAGA,MAAMA,IAAa,EAAE,OAAO,yBACtBC,IAAa,CAAC,OAAO,OAAO,UAAU,OAAO,GA0CvBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,CAAC;AAAA,IACP,OAAO,CAAC;AAAA,IACR,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAIRE,IAAgB;AAAA,MACpB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGDC,IAAaC,EAAS,MAAM;AAChC,YAAMC,IAAmB;AAAA,QACvB,aAAa;AAAA,MAAA;AAEX,UAAAC;AACJ,MAAIL,EAAM,SACJ,OAAOA,EAAM,QAAS,WACxBK,IAAYJ,EAAQD,EAAM,IAAkB,KAAK,SAASA,EAAM,MAAM,EAAE,IAExEK,IAAYL,EAAM,MAEPK,KAAA;AAGf,UAAIC,IAAgC;AAAA,QAClC,OAAOD;AAAA,QACP,QAAQA;AAAA,MAAA;AAEV,aAAIL,EAAM,UACJO,EAAWP,EAAM,KAAK,IACxBM,EAAM,kBAAkBN,EAAM,QAE9BI,EAAQ,cAAcJ,EAAM,KAAK,EAAE,IAAI,KAGpC;AAAA,QACL,OAAOI;AAAA,QACP,OAAAE;AAAA,MAAA;AAAA,IACF,CACD,GAEKE,IAAkBC,EAAI,EAAK,GAC3BC,IAAe,MAAM;AACzB,MAAAF,EAAgB,QAAQ;AAAA,IAAA;AAE1B,WAAAG;AAAA,MACE,MAAM,CAACX,EAAM,KAAKA,EAAM,MAAM;AAAA,MAC9B,MAAM;AACJ,QAAAQ,EAAgB,QAAQ;AAAA,MAC1B;AAAA,IAAA,GAGK,CAACI,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQC,EAAgBC,EAAoBf,EAAW,KAAK,CAAC,GAAG;AAAA,MACxGgB,EAAoB,QAAQvB,GAAY;AAAA,QACtCwB,EAAYP,EAAK,QAAQ,SAAS;AAAA,MAAA,CACnC;AAAA,OACGA,EAAK,OAAOA,EAAK,WAAW,CAACJ,EAAgB,SAC5CM,KAAcC,EAAoB,OAAO;AAAA,QACxC,KAAK;AAAA,QACL,KAAKH,EAAK;AAAA,QACV,KAAKA,EAAK;AAAA,QACV,QAAQA,EAAK;AAAA,QACb,OAAOA,EAAK;AAAA,QACZ,OAAO;AAAA,QACP,SAASF;AAAA,MAAA,GACR,MAAM,IAAId,CAAU,KACvBwB,EAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index46.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, useSlots as d, computed as n, openBlock as m, createElementBlock as u, normalizeClass as g, createElementVNode as s, renderSlot as l, mergeProps as f, createTextVNode as _, toDisplayString as y } from "vue";
2
- import { isCssColor as r } from "./index189.js";
2
+ import { isCssColor as r } from "./index191.js";
3
3
  import { isNil as B } from "./index117.js";
4
4
  const C = { class: "bb-badge__wrapper" }, h = { class: "bb-badge__content-inner" }, S = /* @__PURE__ */ p({
5
5
  __name: "BbBadge",
@@ -1 +1 @@
1
- {"version":3,"file":"index46.js","sources":["../src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-badge__wrapper\" }\nconst _hoisted_2 = { class: \"bb-badge__content-inner\" }\n\nimport { computed, useSlots } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbBadgeProps = Pick<CommonProps, 'color'> & {\n /**\n * Displays the badge on the bottom of the wrapped component.\n */\n bottom?: boolean;\n /**\n * Text content of the badge\n */\n content?: string | number | null;\n /**\n * Renders the badge i little firther from the wrapped \n * component making it look like it's floating \n * and not stacked.\n */\n floating?: boolean;\n /**\n * Displays the badge on the left of the wrapped component.\n */\n left?: boolean;\n}\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbBadge',\n props: {\n color: {},\n bottom: { type: Boolean },\n content: {},\n floating: { type: Boolean },\n left: { type: Boolean }\n },\n setup(__props: any) {\n\nconst slots = useSlots();\n\nconst props = __props;\n\n\n\nconst classes = computed(() => {\n return {\n \"bb-badge\": true,\n \"bb-badge--bottom\": props.bottom,\n \"bb-badge--left\": props.left,\n \"bb-badge--positioned\": slots.default,\n \"bb-badge--floating\": props.floating,\n \"bb-badge--empty\": isNil(props.content),\n [`bb-badge--${props.color}`]: props.color && !isCssColor(props.color),\n };\n});\n\nconst contentAttributes = computed(() => {\n let style: Record<string, string> = {};\n if (props.color && isCssColor(props.color)) {\n style.backgroundColor = props.color;\n }\n\n let accessibilityAttributes: Record<string, string | boolean> = {};\n if (slots.wrap) {\n accessibilityAttributes[\"aria-atomic\"] = true;\n accessibilityAttributes[\"aria-live\"] = \"polite\";\n accessibilityAttributes[\"role\"] = \"status\";\n }\n return {\n style,\n ...accessibilityAttributes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass(classes.value)\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"span\", _mergeProps({ class: \"bb-badge__content-container\" }, contentAttributes.value), [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"content\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.content), 1)\n ])\n ])\n ], 16)\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","slots","useSlots","props","classes","computed","isNil","isCssColor","contentAttributes","style","accessibilityAttributes","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,uBACtBC,IAAa,EAAE,OAAO,6BA6BAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,QAAQ,EAAE,MAAM,QAAQ;AAAA,IACxB,SAAS,CAAC;AAAA,IACV,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,EAAE,MAAM,QAAQ;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQC,KAERC,IAAQH,GAIRI,IAAUC,EAAS,OAChB;AAAA,MACL,YAAY;AAAA,MACZ,oBAAoBF,EAAM;AAAA,MAC1B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBF,EAAM;AAAA,MAC9B,sBAAsBE,EAAM;AAAA,MAC5B,mBAAmBG,EAAMH,EAAM,OAAO;AAAA,MACtC,CAAC,aAAaA,EAAM,KAAK,EAAE,GAAGA,EAAM,SAAS,CAACI,EAAWJ,EAAM,KAAK;AAAA,IAAA,EAEvE,GAEKK,IAAoBH,EAAS,MAAM;AACvC,UAAII,IAAgC,CAAA;AACpC,MAAIN,EAAM,SAASI,EAAWJ,EAAM,KAAK,MACvCM,EAAM,kBAAkBN,EAAM;AAGhC,UAAIO,IAA4D,CAAA;AAChE,aAAIT,EAAM,SACRS,EAAwB,aAAa,IAAI,IACzCA,EAAwB,WAAW,IAAI,UACvCA,EAAwB,OAAU,WAE7B;AAAA,QACL,OAAAD;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACL,CACD;AAEM,WAAA,CAACC,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQ;AAAA,MAChD,OAAOC,EAAgBX,EAAQ,KAAK;AAAA,IAAA,GACnC;AAAA,MACDY,EAAoB,QAAQpB,GAAY;AAAA,QACtCqB,EAAYN,EAAK,QAAQ,SAAS;AAAA,QAClCK,EAAoB,QAAQE,EAAY,EAAE,OAAO,iCAAiCV,EAAkB,KAAK,GAAG;AAAA,UAC1GQ,EAAoB,QAAQnB,GAAY;AAAA,YACtCoB,EAAYN,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,cAC5CQ,EAAiBC,EAAiBT,EAAK,OAAO,GAAG,CAAC;AAAA,YAAA,CACnD;AAAA,UAAA,CACF;AAAA,WACA,EAAE;AAAA,MAAA,CACN;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index46.js","sources":["../src/components/BbBadge/BbBadge.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-badge__wrapper\" }\nconst _hoisted_2 = { class: \"bb-badge__content-inner\" }\n\nimport { computed, useSlots } from \"vue\";\nimport { isCssColor } from \"@/utilities/functions/isCssColor\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport type { CommonProps } from \"@/types/CommonProps\";\n\nexport type BbBadgeProps = Pick<CommonProps, \"color\"> & {\n /**\n * Displays the badge on the bottom of the wrapped component.\n */\n bottom?: boolean;\n /**\n * Text content of the badge\n */\n content?: string | number | null;\n /**\n * Renders the badge i little firther from the wrapped\n * component making it look like it's floating\n * and not stacked.\n */\n floating?: boolean;\n /**\n * Displays the badge on the left of the wrapped component.\n */\n left?: boolean;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbBadge',\n props: {\n color: {},\n bottom: { type: Boolean },\n content: {},\n floating: { type: Boolean },\n left: { type: Boolean }\n },\n setup(__props: any) {\n\nconst slots = useSlots();\n\nconst props = __props;\n\n\n\nconst classes = computed(() => {\n return {\n \"bb-badge\": true,\n \"bb-badge--bottom\": props.bottom,\n \"bb-badge--left\": props.left,\n \"bb-badge--positioned\": slots.default,\n \"bb-badge--floating\": props.floating,\n \"bb-badge--empty\": isNil(props.content),\n [`bb-badge--${props.color}`]: props.color && !isCssColor(props.color),\n };\n});\n\nconst contentAttributes = computed(() => {\n let style: Record<string, string> = {};\n if (props.color && isCssColor(props.color)) {\n style.backgroundColor = props.color;\n }\n\n let accessibilityAttributes: Record<string, string | boolean> = {};\n if (slots.wrap) {\n accessibilityAttributes[\"aria-atomic\"] = true;\n accessibilityAttributes[\"aria-live\"] = \"polite\";\n accessibilityAttributes[\"role\"] = \"status\";\n }\n return {\n style,\n ...accessibilityAttributes,\n };\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass(classes.value)\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"default\"),\n _createElementVNode(\"span\", _mergeProps({ class: \"bb-badge__content-container\" }, contentAttributes.value), [\n _createElementVNode(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"content\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.content), 1)\n ])\n ])\n ], 16)\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","slots","useSlots","props","classes","computed","isNil","isCssColor","contentAttributes","style","accessibilityAttributes","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString"],"mappings":";;;AAGA,MAAMA,IAAa,EAAE,OAAO,uBACtBC,IAAa,EAAE,OAAO,6BA6BAC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,QAAQ,EAAE,MAAM,QAAQ;AAAA,IACxB,SAAS,CAAC;AAAA,IACV,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,EAAE,MAAM,QAAQ;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQC,KAERC,IAAQH,GAIRI,IAAUC,EAAS,OAChB;AAAA,MACL,YAAY;AAAA,MACZ,oBAAoBF,EAAM;AAAA,MAC1B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBF,EAAM;AAAA,MAC9B,sBAAsBE,EAAM;AAAA,MAC5B,mBAAmBG,EAAMH,EAAM,OAAO;AAAA,MACtC,CAAC,aAAaA,EAAM,KAAK,EAAE,GAAGA,EAAM,SAAS,CAACI,EAAWJ,EAAM,KAAK;AAAA,IAAA,EAEvE,GAEKK,IAAoBH,EAAS,MAAM;AACvC,UAAII,IAAgC,CAAA;AACpC,MAAIN,EAAM,SAASI,EAAWJ,EAAM,KAAK,MACvCM,EAAM,kBAAkBN,EAAM;AAGhC,UAAIO,IAA4D,CAAA;AAChE,aAAIT,EAAM,SACRS,EAAwB,aAAa,IAAI,IACzCA,EAAwB,WAAW,IAAI,UACvCA,EAAwB,OAAU,WAE7B;AAAA,QACL,OAAAD;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACL,CACD;AAEM,WAAA,CAACC,GAAUC,OACRC,EAAA,GAAcC,EAAoB,QAAQ;AAAA,MAChD,OAAOC,EAAgBX,EAAQ,KAAK;AAAA,IAAA,GACnC;AAAA,MACDY,EAAoB,QAAQpB,GAAY;AAAA,QACtCqB,EAAYN,EAAK,QAAQ,SAAS;AAAA,QAClCK,EAAoB,QAAQE,EAAY,EAAE,OAAO,iCAAiCV,EAAkB,KAAK,GAAG;AAAA,UAC1GQ,EAAoB,QAAQnB,GAAY;AAAA,YACtCoB,EAAYN,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,cAC5CQ,EAAiBC,EAAiBT,EAAK,OAAO,GAAG,CAAC;AAAA,YAAA,CACnD;AAAA,UAAA,CACF;AAAA,WACA,EAAE;AAAA,MAAA,CACN;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index6.js","sources":["../src/components/BaseButton/BaseButton.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CommonProps, NonVoidElementTag } from \"@/types/CommonProps\";\nimport { computed, getCurrentInstance, resolveComponent } from \"vue\";\nimport type { InertiaLinkProps } from \"@inertiajs/vue3\";\nimport type { RouterLinkProps } from \"vue-router\";\n\nexport type BaseButtonProps = Pick<CommonProps, \"block\" | \"disabled\" | \"text\"> &\n NonVoidElementTag &\n Partial<\n Pick<\n RouterLinkProps,\n \"activeClass\" | \"ariaCurrentValue\" | \"exactActiveClass\" | \"replace\" | \"to\"\n >\n > &\n Partial<\n Pick<\n InertiaLinkProps,\n | \"data\"\n | \"headers\"\n | \"method\"\n | \"onBefore\"\n | \"onCancel\"\n | \"onCancelToken\"\n | \"onFinish\"\n | \"only\"\n | \"onProgress\"\n | \"onStart\"\n | \"onSuccess\"\n | \"preserveScroll\"\n | \"preserveState\"\n | \"queryStringArrayFormat\"\n >\n > &\n Partial<{\n /**\n * Gets the classification and default behavior of the button\n */\n type: HTMLButtonElement[\"type\"];\n /**\n * Returns the hyperlink's URL.\n *\n * Can be set, to change the URL.\n */\n href: HTMLAnchorElement[\"href\"];\n /**\n * Sets or retrieves the window or frame at which to target content.\n */\n target: HTMLAnchorElement[\"target\"];\n }>;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseButton',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n text: {},\n tag: { default: \"button\" },\n activeClass: {},\n ariaCurrentValue: {},\n exactActiveClass: {},\n replace: { type: Boolean },\n to: {},\n data: {},\n headers: {},\n method: {},\n onBefore: {},\n onCancel: {},\n onCancelToken: {},\n onFinish: {},\n only: {},\n onProgress: {},\n onStart: {},\n onSuccess: {},\n preserveScroll: { type: [Boolean, Function] },\n preserveState: { type: [Boolean, Function, null] },\n queryStringArrayFormat: {},\n type: { default: \"button\" },\n href: {},\n target: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n/* Ignore because possibly undefined */\n// @ts-ignore\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\n// @ts-ignore\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst tag = computed(() => {\n // For disabled links always render a\n if (props.href || (props.to && props.disabled)) {\n if (isInertia && !props.disabled) return resolveComponent(\"Link\");\n return \"a\";\n }\n if (props.to) {\n if (isNuxt) return resolveComponent(\"NuxtLink\");\n return \"router-link\";\n }\n return props.tag;\n});\n\nconst classes = computed(() => ({\n \"base-btn\": true,\n \"base-btn--block\": props.block,\n \"base-btn--disabled\": props.disabled,\n}));\n\nconst attributes = computed(() => {\n type PossibleAttributes = {\n \"aria-disabled\": boolean;\n activeClass: BaseButtonProps[\"activeClass\"];\n ariaCurrentValue: BaseButtonProps[\"ariaCurrentValue\"];\n data: BaseButtonProps[\"data\"];\n disabled: boolean;\n exactActiveClass: BaseButtonProps[\"exactActiveClass\"];\n headers: BaseButtonProps[\"headers\"];\n href: string;\n method: BaseButtonProps[\"method\"];\n onBefore: BaseButtonProps[\"onBefore\"];\n onCancel: BaseButtonProps[\"onCancel\"];\n onCancelToken: BaseButtonProps[\"onCancelToken\"];\n onFinish: BaseButtonProps[\"onFinish\"];\n only: BaseButtonProps[\"only\"];\n onProgress: BaseButtonProps[\"onProgress\"];\n onStart: BaseButtonProps[\"onStart\"];\n onSuccess: BaseButtonProps[\"onSuccess\"];\n preserveScroll: BaseButtonProps[\"preserveScroll\"];\n preserveState: BaseButtonProps[\"preserveState\"];\n queryStringArrayFormat: BaseButtonProps[\"queryStringArrayFormat\"];\n replace: BaseButtonProps[\"replace\"];\n role: string;\n style: { [rule: string]: string };\n target: string;\n to: BaseButtonProps[\"to\"];\n type: string;\n };\n const initial: Partial<PossibleAttributes> = {};\n\n if (tag.value === \"button\") {\n initial.disabled = props.disabled;\n initial.type = props.type;\n } else if (\n tag.value === \"a\" ||\n (isInertia && typeof tag.value !== \"string\" && tag.value.name === \"Link\")\n ) {\n // When rendering as anchor prevent navigation if disabled\n // https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n if (props.disabled) {\n initial[\"aria-disabled\"] = true;\n initial.role = \"link\";\n } else {\n // Only attach the href to active links\n // https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n initial.href = props.href;\n initial.target = props.target;\n\n if (isInertia) {\n initial.data = props.data;\n initial.headers = props.headers;\n initial.method = props.method;\n initial.onBefore = props.onBefore;\n initial.onCancel = props.onCancel;\n initial.onCancelToken = props.onCancelToken;\n initial.onFinish = props.onFinish;\n initial.only = props.only;\n initial.onProgress = props.onProgress;\n initial.onStart = props.onStart;\n initial.onSuccess = props.onSuccess;\n initial.preserveScroll = props.preserveScroll;\n initial.preserveState = props.preserveState;\n initial.queryStringArrayFormat = props.queryStringArrayFormat;\n initial.replace = props.replace;\n }\n }\n } else if (\n tag.value === \"router-link\" ||\n (typeof tag.value !== \"string\" && tag.value.name === \"NuxtLink\")\n ) {\n initial.activeClass = props.activeClass;\n initial.ariaCurrentValue = props.ariaCurrentValue;\n initial.exactActiveClass = props.exactActiveClass;\n initial.replace = props.replace;\n initial.target = props.target;\n initial.to = props.to;\n }\n\n switch (tag.value) {\n case \"button\":\n initial.disabled = props.disabled;\n initial.type = props.type;\n break;\n case \"a\":\n // When rendering as anchor prevent navigation if disabled\n // https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n if (props.disabled) {\n initial[\"aria-disabled\"] = true;\n initial.role = \"link\";\n } else {\n // Only attach the href to active links\n // https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n initial.href = props.href;\n }\n break;\n case \"router-link\":\n initial.to = props.to;\n break;\n default:\n break;\n }\n return initial;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(tag.value), _mergeProps({ class: classes.value }, attributes.value), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ]),\n _: 3\n }, 16, [\"class\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","isInertia","_b","_a","getCurrentInstance","isNuxt","_d","_c","tag","computed","resolveComponent","classes","attributes","initial","_ctx","_cache","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"mappings":";AAqDA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OA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EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,UAIfA,EAAQ,OAAOb,EAAM;AAEvB;AAAA,QACF,KAAK;AACH,UAAAa,EAAQ,KAAKb,EAAM;AACnB;AAAA,MAGJ;AACO,aAAAa;AAAA,IAAA,CACR;AAEM,WAAA,CAACC,GAAUC,OACRC,EAAW,GAAGC,EAAaC,EAAyBV,EAAI,KAAK,GAAGW,EAAY,EAAE,OAAOR,EAAQ,MAAS,GAAAC,EAAW,KAAK,GAAG;AAAA,MAC/H,SAASQ,EAAS,MAAM;AAAA,QACtBC,EAAYP,EAAK,QAAQ,WAAW,IAAI,MAAM;AAAA,UAC5CQ,EAAiBC,EAAiBT,EAAK,IAAI,GAAG,CAAC;AAAA,QAAA,CAChD;AAAA,MAAA,CACF;AAAA,MACD,GAAG;AAAA,IAAA,GACF,IAAI,CAAC,OAAO,CAAC;AAAA,EAElB;AAEA,CAAC;"}
1
+ {"version":3,"file":"index6.js","sources":["../src/components/BaseButton/BaseButton.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { CommonProps, NonVoidElementTag } from \"@/types/CommonProps\";\nimport { computed, getCurrentInstance, resolveComponent } from \"vue\";\nimport type { InertiaLinkProps } from \"@inertiajs/vue3\";\nimport type { RouterLinkProps } from \"vue-router\";\n\nexport type BaseButtonProps = Pick<CommonProps, \"block\" | \"disabled\" | \"text\"> &\n NonVoidElementTag &\n Partial<\n Pick<\n RouterLinkProps,\n \"activeClass\" | \"ariaCurrentValue\" | \"exactActiveClass\" | \"replace\" | \"to\"\n >\n > &\n Partial<\n Pick<\n InertiaLinkProps,\n | \"data\"\n | \"headers\"\n | \"method\"\n | \"onBefore\"\n | \"onCancel\"\n | \"onCancelToken\"\n | \"onFinish\"\n | \"only\"\n | \"onProgress\"\n | \"onStart\"\n | \"onSuccess\"\n | \"preserveScroll\"\n | \"preserveState\"\n | \"queryStringArrayFormat\"\n >\n > &\n Partial<{\n /**\n * Gets the classification and default behavior of the button.\n */\n type: HTMLButtonElement[\"type\"];\n /**\n * Returns the hyperlink's URL.\n *\n * Can be set, to change the URL.\n */\n href: HTMLAnchorElement[\"href\"];\n /**\n * Sets or retrieves the window or frame at which to target content.\n */\n target: HTMLAnchorElement[\"target\"];\n }>;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseButton',\n props: {\n block: { type: Boolean },\n disabled: { type: Boolean },\n text: {},\n tag: { default: \"button\" },\n activeClass: {},\n ariaCurrentValue: {},\n exactActiveClass: {},\n replace: { type: Boolean },\n to: {},\n data: {},\n headers: {},\n method: {},\n onBefore: {},\n onCancel: {},\n onCancelToken: {},\n onFinish: {},\n only: {},\n onProgress: {},\n onStart: {},\n onSuccess: {},\n preserveScroll: { type: [Boolean, Function] },\n preserveState: { type: [Boolean, Function, null] },\n queryStringArrayFormat: {},\n type: { default: \"button\" },\n href: {},\n target: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\n\n/* Ignore because possibly undefined */\n// @ts-ignore\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\n// @ts-ignore\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst tag = computed(() => {\n // For disabled links always render a\n if (props.href || (props.to && props.disabled)) {\n if (isInertia && !props.disabled) return resolveComponent(\"Link\");\n return \"a\";\n }\n if (props.to) {\n if (isNuxt) return resolveComponent(\"NuxtLink\");\n return \"router-link\";\n }\n return props.tag;\n});\n\nconst classes = computed(() => ({\n \"base-btn\": true,\n \"base-btn--block\": props.block,\n \"base-btn--disabled\": props.disabled,\n}));\n\nconst attributes = computed(() => {\n type PossibleAttributes = {\n \"aria-disabled\": boolean;\n activeClass: BaseButtonProps[\"activeClass\"];\n ariaCurrentValue: BaseButtonProps[\"ariaCurrentValue\"];\n data: BaseButtonProps[\"data\"];\n disabled: boolean;\n exactActiveClass: BaseButtonProps[\"exactActiveClass\"];\n headers: BaseButtonProps[\"headers\"];\n href: string;\n method: BaseButtonProps[\"method\"];\n onBefore: BaseButtonProps[\"onBefore\"];\n onCancel: BaseButtonProps[\"onCancel\"];\n onCancelToken: BaseButtonProps[\"onCancelToken\"];\n onFinish: BaseButtonProps[\"onFinish\"];\n only: BaseButtonProps[\"only\"];\n onProgress: BaseButtonProps[\"onProgress\"];\n onStart: BaseButtonProps[\"onStart\"];\n onSuccess: BaseButtonProps[\"onSuccess\"];\n preserveScroll: BaseButtonProps[\"preserveScroll\"];\n preserveState: BaseButtonProps[\"preserveState\"];\n queryStringArrayFormat: BaseButtonProps[\"queryStringArrayFormat\"];\n replace: BaseButtonProps[\"replace\"];\n role: string;\n style: { [rule: string]: string };\n target: string;\n to: BaseButtonProps[\"to\"];\n type: string;\n };\n const initial: Partial<PossibleAttributes> = {};\n\n if (tag.value === \"button\") {\n initial.disabled = props.disabled;\n initial.type = props.type;\n } else if (\n tag.value === \"a\" ||\n (isInertia && typeof tag.value !== \"string\" && tag.value.name === \"Link\")\n ) {\n // When rendering as anchor prevent navigation if disabled\n // https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n if (props.disabled) {\n initial[\"aria-disabled\"] = true;\n initial.role = \"link\";\n } else {\n // Only attach the href to active links\n // https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n initial.href = props.href;\n initial.target = props.target;\n\n if (isInertia) {\n initial.data = props.data;\n initial.headers = props.headers;\n initial.method = props.method;\n initial.onBefore = props.onBefore;\n initial.onCancel = props.onCancel;\n initial.onCancelToken = props.onCancelToken;\n initial.onFinish = props.onFinish;\n initial.only = props.only;\n initial.onProgress = props.onProgress;\n initial.onStart = props.onStart;\n initial.onSuccess = props.onSuccess;\n initial.preserveScroll = props.preserveScroll;\n initial.preserveState = props.preserveState;\n initial.queryStringArrayFormat = props.queryStringArrayFormat;\n initial.replace = props.replace;\n }\n }\n } else if (\n tag.value === \"router-link\" ||\n (typeof tag.value !== \"string\" && tag.value.name === \"NuxtLink\")\n ) {\n initial.activeClass = props.activeClass;\n initial.ariaCurrentValue = props.ariaCurrentValue;\n initial.exactActiveClass = props.exactActiveClass;\n initial.replace = props.replace;\n initial.target = props.target;\n initial.to = props.to;\n }\n\n switch (tag.value) {\n case \"button\":\n initial.disabled = props.disabled;\n initial.type = props.type;\n break;\n case \"a\":\n // When rendering as anchor prevent navigation if disabled\n // https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n if (props.disabled) {\n initial[\"aria-disabled\"] = true;\n initial.role = \"link\";\n } else {\n // Only attach the href to active links\n // https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n initial.href = props.href;\n }\n break;\n case \"router-link\":\n initial.to = props.to;\n break;\n default:\n break;\n }\n return initial;\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(tag.value), _mergeProps({ class: classes.value }, attributes.value), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"default\", {}, () => [\n _createTextVNode(_toDisplayString(_ctx.text), 1)\n ])\n ]),\n _: 3\n }, 16, [\"class\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","isInertia","_b","_a","getCurrentInstance","isNuxt","_d","_c","tag","computed","resolveComponent","classes","attributes","initial","_ctx","_cache","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"mappings":";AAqDA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,MAAM,CAAC;AAAA,IACP,KAAK,EAAE,SAAS,SAAS;AAAA,IACzB,aAAa,CAAC;AAAA,IACd,kBAAk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