@beeq/core 1.8.1 → 1.8.3-beta.0

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 (510) hide show
  1. package/dist/beeq/beeq.esm.js +1 -1
  2. package/dist/beeq/beeq.esm.js.map +1 -1
  3. package/dist/beeq/index.esm.js +1 -1
  4. package/dist/beeq/{p-00702295.entry.js → p-0f9ecc0c.entry.js} +2 -2
  5. package/dist/beeq/p-0f9ecc0c.entry.js.map +1 -0
  6. package/dist/beeq/{p-0cab9a82.entry.js → p-1499deaf.entry.js} +2 -2
  7. package/dist/beeq/p-1499deaf.entry.js.map +1 -0
  8. package/dist/beeq/{p-b83f174c.entry.js → p-15bf8ffd.entry.js} +2 -2
  9. package/dist/beeq/{p-b83f174c.entry.js.map → p-15bf8ffd.entry.js.map} +1 -1
  10. package/dist/beeq/{p-2eab5223.entry.js → p-19f5a833.entry.js} +2 -2
  11. package/dist/beeq/{p-2eab5223.entry.js.map → p-19f5a833.entry.js.map} +1 -1
  12. package/dist/beeq/{p-cb3b24e6.entry.js → p-2c4cdf27.entry.js} +2 -2
  13. package/dist/beeq/p-2c4cdf27.entry.js.map +1 -0
  14. package/dist/{components/p-55b0aea8.js → beeq/p-34611c2f.js} +2 -2
  15. package/dist/beeq/p-34611c2f.js.map +1 -0
  16. package/dist/beeq/{p-20d91acf.entry.js → p-3806d9e3.entry.js} +2 -2
  17. package/dist/beeq/{p-20d91acf.entry.js.map → p-3806d9e3.entry.js.map} +1 -1
  18. package/dist/beeq/{p-c78ae3c2.js → p-397bc507.js} +2 -2
  19. package/dist/beeq/p-397bc507.js.map +1 -0
  20. package/dist/beeq/{p-4d6a9646.entry.js → p-39a80765.entry.js} +2 -2
  21. package/dist/beeq/{p-4d6a9646.entry.js.map → p-39a80765.entry.js.map} +1 -1
  22. package/dist/beeq/{p-f84ae6a1.entry.js → p-3d9ed4fa.entry.js} +2 -2
  23. package/dist/beeq/{p-f84ae6a1.entry.js.map → p-3d9ed4fa.entry.js.map} +1 -1
  24. package/dist/beeq/{p-5c7a719c.entry.js → p-3f654a12.entry.js} +2 -2
  25. package/dist/beeq/{p-5c7a719c.entry.js.map → p-3f654a12.entry.js.map} +1 -1
  26. package/dist/beeq/{p-7f124d61.entry.js → p-3fe626f1.entry.js} +2 -2
  27. package/dist/beeq/{p-7f124d61.entry.js.map → p-3fe626f1.entry.js.map} +1 -1
  28. package/dist/beeq/{p-0c12aa01.entry.js → p-4500ffe5.entry.js} +2 -2
  29. package/dist/beeq/{p-0c12aa01.entry.js.map → p-4500ffe5.entry.js.map} +1 -1
  30. package/dist/beeq/p-4a3784e1.js +7 -0
  31. package/dist/beeq/p-4a3784e1.js.map +1 -0
  32. package/dist/beeq/{p-0f72dbb6.entry.js → p-4d21a49d.entry.js} +2 -2
  33. package/dist/beeq/{p-0f72dbb6.entry.js.map → p-4d21a49d.entry.js.map} +1 -1
  34. package/dist/beeq/{p-36b653f6.entry.js → p-5546f242.entry.js} +2 -2
  35. package/dist/beeq/p-5546f242.entry.js.map +1 -0
  36. package/dist/beeq/{p-1cdea079.entry.js → p-65d67b85.entry.js} +2 -2
  37. package/dist/beeq/p-65d67b85.entry.js.map +1 -0
  38. package/dist/beeq/{p-43dc9906.entry.js → p-66b6d69a.entry.js} +2 -2
  39. package/dist/beeq/{p-43dc9906.entry.js.map → p-66b6d69a.entry.js.map} +1 -1
  40. package/dist/beeq/{p-dc544089.entry.js → p-70310ac8.entry.js} +2 -2
  41. package/dist/beeq/{p-dc544089.entry.js.map → p-70310ac8.entry.js.map} +1 -1
  42. package/dist/beeq/{p-a7fb6ffd.entry.js → p-7585f825.entry.js} +2 -2
  43. package/dist/beeq/{p-a7fb6ffd.entry.js.map → p-7585f825.entry.js.map} +1 -1
  44. package/dist/beeq/{p-75cc6789.entry.js → p-7efff703.entry.js} +2 -2
  45. package/dist/beeq/{p-75cc6789.entry.js.map → p-7efff703.entry.js.map} +1 -1
  46. package/dist/beeq/{p-19b7bbe0.entry.js → p-803269b3.entry.js} +2 -2
  47. package/dist/beeq/{p-19b7bbe0.entry.js.map → p-803269b3.entry.js.map} +1 -1
  48. package/dist/beeq/{p-1b0cfcd6.entry.js → p-8ed41b69.entry.js} +2 -2
  49. package/dist/beeq/{p-1b0cfcd6.entry.js.map → p-8ed41b69.entry.js.map} +1 -1
  50. package/dist/beeq/{p-7636aff3.entry.js → p-90165aef.entry.js} +2 -2
  51. package/dist/beeq/{p-7636aff3.entry.js.map → p-90165aef.entry.js.map} +1 -1
  52. package/dist/beeq/{p-921fa1ea.entry.js → p-9a7af424.entry.js} +2 -2
  53. package/dist/beeq/{p-921fa1ea.entry.js.map → p-9a7af424.entry.js.map} +1 -1
  54. package/dist/beeq/{p-d8a257b7.entry.js → p-a4e11bbc.entry.js} +2 -2
  55. package/dist/beeq/{p-d8a257b7.entry.js.map → p-a4e11bbc.entry.js.map} +1 -1
  56. package/dist/beeq/{p-4c1f6afc.entry.js → p-a56ea1e0.entry.js} +2 -2
  57. package/dist/beeq/{p-4c1f6afc.entry.js.map → p-a56ea1e0.entry.js.map} +1 -1
  58. package/dist/beeq/{p-c70c6b00.entry.js → p-a8075be3.entry.js} +2 -2
  59. package/dist/beeq/{p-c70c6b00.entry.js.map → p-a8075be3.entry.js.map} +1 -1
  60. package/dist/beeq/{p-026fad0d.entry.js → p-a8d64d1b.entry.js} +2 -2
  61. package/dist/beeq/{p-026fad0d.entry.js.map → p-a8d64d1b.entry.js.map} +1 -1
  62. package/dist/beeq/p-b129db1a.entry.js +6 -0
  63. package/dist/beeq/{p-2c566eb0.entry.js.map → p-b129db1a.entry.js.map} +1 -1
  64. package/dist/beeq/p-b69f347d.entry.js +6 -0
  65. package/dist/beeq/p-b69f347d.entry.js.map +1 -0
  66. package/dist/beeq/{p-c09dac58.entry.js → p-b7b3f7c6.entry.js} +2 -2
  67. package/dist/beeq/{p-29d9487c.entry.js → p-bbaad491.entry.js} +2 -2
  68. package/dist/beeq/{p-29d9487c.entry.js.map → p-bbaad491.entry.js.map} +1 -1
  69. package/dist/beeq/p-c42f9ac5.entry.js +6 -0
  70. package/dist/beeq/{p-6079f9b2.entry.js.map → p-c42f9ac5.entry.js.map} +1 -1
  71. package/dist/beeq/{p-cf523684.entry.js → p-cb9fa154.entry.js} +2 -2
  72. package/dist/beeq/{p-cf523684.entry.js.map → p-cb9fa154.entry.js.map} +1 -1
  73. package/dist/beeq/p-cf923c68.js +6 -0
  74. package/dist/beeq/p-dafa4162.entry.js +6 -0
  75. package/dist/beeq/p-dafa4162.entry.js.map +1 -0
  76. package/dist/beeq/{p-3c472097.js → p-e4dd6ff4.js} +2 -2
  77. package/dist/beeq/{p-e056c02a.entry.js → p-e655938a.entry.js} +2 -2
  78. package/dist/beeq/{p-e056c02a.entry.js.map → p-e655938a.entry.js.map} +1 -1
  79. package/dist/beeq/{p-0c0bd129.entry.js → p-e8f147c2.entry.js} +2 -2
  80. package/dist/beeq/{p-0c0bd129.entry.js.map → p-e8f147c2.entry.js.map} +1 -1
  81. package/dist/beeq/{p-2ef4ed54.entry.js → p-ed569a61.entry.js} +2 -2
  82. package/dist/beeq/{p-2ef4ed54.entry.js.map → p-ed569a61.entry.js.map} +1 -1
  83. package/dist/beeq/{p-4c66663c.entry.js → p-ee1ecb6e.entry.js} +2 -2
  84. package/dist/beeq/{p-4c66663c.entry.js.map → p-ee1ecb6e.entry.js.map} +1 -1
  85. package/dist/beeq/{p-d8221b88.entry.js → p-f4e8ebd3.entry.js} +2 -2
  86. package/dist/beeq/{p-d8221b88.entry.js.map → p-f4e8ebd3.entry.js.map} +1 -1
  87. package/dist/beeq/{p-2e0e325b.entry.js → p-f83857ac.entry.js} +2 -2
  88. package/dist/beeq/p-f83857ac.entry.js.map +1 -0
  89. package/dist/beeq.html-custom-data.json +208 -208
  90. package/dist/cjs/{assetsPath-5e03c40e.js → assetsPath-32c4030b.js} +2 -2
  91. package/dist/cjs/{assetsPath-5e03c40e.js.map → assetsPath-32c4030b.js.map} +1 -1
  92. package/dist/cjs/beeq.cjs.js +2 -2
  93. package/dist/cjs/beeq.cjs.js.map +1 -1
  94. package/dist/cjs/bq-accordion-group.cjs.entry.js +19 -6
  95. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
  96. package/dist/cjs/bq-accordion.cjs.entry.js +32 -18
  97. package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
  98. package/dist/cjs/bq-alert.cjs.entry.js +24 -11
  99. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  100. package/dist/cjs/bq-avatar.cjs.entry.js +19 -8
  101. package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
  102. package/dist/cjs/bq-badge.cjs.entry.js +13 -5
  103. package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
  104. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +13 -5
  105. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
  106. package/dist/cjs/bq-breadcrumb.cjs.entry.js +8 -2
  107. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  108. package/dist/cjs/bq-button_2.cjs.entry.js +62 -24
  109. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  110. package/dist/cjs/bq-card.cjs.entry.js +10 -3
  111. package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
  112. package/dist/cjs/bq-checkbox.cjs.entry.js +24 -10
  113. package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
  114. package/dist/cjs/bq-date-picker.cjs.entry.js +102 -48
  115. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  116. package/dist/cjs/bq-dialog.cjs.entry.js +24 -11
  117. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  118. package/dist/cjs/bq-divider.cjs.entry.js +25 -11
  119. package/dist/cjs/bq-divider.cjs.entry.js.map +1 -1
  120. package/dist/cjs/bq-drawer.cjs.entry.js +21 -10
  121. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  122. package/dist/cjs/bq-dropdown_2.cjs.entry.js +42 -17
  123. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
  124. package/dist/cjs/bq-empty-state.cjs.entry.js +10 -4
  125. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  126. package/dist/cjs/bq-input.cjs.entry.js +106 -31
  127. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  128. package/dist/cjs/bq-notification.cjs.entry.js +23 -11
  129. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  130. package/dist/cjs/bq-option-group.cjs.entry.js +1 -1
  131. package/dist/cjs/bq-option-list_2.cjs.entry.js +34 -12
  132. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  133. package/dist/cjs/bq-option.cjs.entry.js +16 -7
  134. package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
  135. package/dist/cjs/bq-page-title.cjs.entry.js +7 -4
  136. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  137. package/dist/cjs/bq-progress.cjs.entry.js +20 -8
  138. package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
  139. package/dist/cjs/bq-radio-group.cjs.entry.js +24 -10
  140. package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
  141. package/dist/cjs/bq-radio.cjs.entry.js +20 -8
  142. package/dist/cjs/bq-radio.cjs.entry.js.map +1 -1
  143. package/dist/cjs/bq-select.cjs.entry.js +74 -32
  144. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  145. package/dist/cjs/bq-side-menu-item.cjs.entry.js +13 -5
  146. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
  147. package/dist/cjs/bq-side-menu.cjs.entry.js +15 -5
  148. package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -1
  149. package/dist/cjs/bq-slider.cjs.entry.js +51 -17
  150. package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
  151. package/dist/cjs/bq-spinner.cjs.entry.js +15 -7
  152. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  153. package/dist/cjs/bq-status.cjs.entry.js +8 -2
  154. package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
  155. package/dist/cjs/bq-step-item.cjs.entry.js +12 -4
  156. package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
  157. package/dist/cjs/bq-steps.cjs.entry.js +12 -4
  158. package/dist/cjs/bq-steps.cjs.entry.js.map +1 -1
  159. package/dist/cjs/bq-switch.cjs.entry.js +32 -13
  160. package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
  161. package/dist/cjs/bq-tab-group.cjs.entry.js +18 -7
  162. package/dist/cjs/bq-tab-group.cjs.entry.js.map +1 -1
  163. package/dist/cjs/bq-tab.cjs.entry.js +22 -10
  164. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  165. package/dist/cjs/bq-textarea.cjs.entry.js +77 -24
  166. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  167. package/dist/cjs/bq-toast.cjs.entry.js +19 -8
  168. package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
  169. package/dist/cjs/bq-tooltip.cjs.entry.js +25 -9
  170. package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
  171. package/dist/cjs/{cally-9297cdd8.js → cally-1bde2e82.js} +3 -2
  172. package/dist/cjs/cally-1bde2e82.js.map +1 -0
  173. package/dist/cjs/{index-c4edfa07.js → index-0c8d249a.js} +1128 -920
  174. package/dist/cjs/index-0c8d249a.js.map +1 -0
  175. package/dist/cjs/{index-fc7876d6.js → index-30fbd193.js} +54 -29
  176. package/dist/cjs/index-30fbd193.js.map +1 -0
  177. package/dist/cjs/index.cjs.js +3 -3
  178. package/dist/cjs/{isDefined-e538d669.js → isDefined-5e8aae9d.js} +2 -2
  179. package/dist/cjs/{isDefined-e538d669.js.map → isDefined-5e8aae9d.js.map} +1 -1
  180. package/dist/cjs/loader.cjs.js +1 -1
  181. package/dist/collection/collection-manifest.json +1 -1
  182. package/dist/collection/components/accordion/bq-accordion.js +30 -18
  183. package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
  184. package/dist/collection/components/accordion/scss/bq-accordion.css +1 -1
  185. package/dist/collection/components/accordion-group/bq-accordion-group.js +18 -7
  186. package/dist/collection/components/accordion-group/bq-accordion-group.js.map +1 -1
  187. package/dist/collection/components/alert/bq-alert.js +23 -12
  188. package/dist/collection/components/alert/bq-alert.js.map +1 -1
  189. package/dist/collection/components/avatar/bq-avatar.js +18 -9
  190. package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
  191. package/dist/collection/components/badge/bq-badge.js +12 -6
  192. package/dist/collection/components/badge/bq-badge.js.map +1 -1
  193. package/dist/collection/components/breadcrumb/bq-breadcrumb.js +7 -3
  194. package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
  195. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +11 -5
  196. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
  197. package/dist/collection/components/button/bq-button.js +37 -16
  198. package/dist/collection/components/button/bq-button.js.map +1 -1
  199. package/dist/collection/components/card/bq-card.js +9 -4
  200. package/dist/collection/components/card/bq-card.js.map +1 -1
  201. package/dist/collection/components/checkbox/bq-checkbox.js +23 -11
  202. package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
  203. package/dist/collection/components/date-picker/bq-date-picker.js +98 -46
  204. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  205. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  206. package/dist/collection/components/dialog/bq-dialog.js +23 -12
  207. package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
  208. package/dist/collection/components/divider/bq-divider.js +24 -12
  209. package/dist/collection/components/divider/bq-divider.js.map +1 -1
  210. package/dist/collection/components/drawer/bq-drawer.js +19 -10
  211. package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
  212. package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
  213. package/dist/collection/components/dropdown/bq-dropdown.js +23 -11
  214. package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
  215. package/dist/collection/components/empty-state/bq-empty-state.js +9 -5
  216. package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
  217. package/dist/collection/components/icon/bq-icon.js +22 -9
  218. package/dist/collection/components/icon/bq-icon.js.map +1 -1
  219. package/dist/collection/components/input/bq-input.js +104 -31
  220. package/dist/collection/components/input/bq-input.js.map +1 -1
  221. package/dist/collection/components/notification/bq-notification.js +22 -12
  222. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  223. package/dist/collection/components/option/bq-option.js +15 -8
  224. package/dist/collection/components/option/bq-option.js.map +1 -1
  225. package/dist/collection/components/option-list/bq-option-list.js +9 -3
  226. package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
  227. package/dist/collection/components/page-title/bq-page-title.js +6 -5
  228. package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
  229. package/dist/collection/components/panel/bq-panel.js +17 -8
  230. package/dist/collection/components/panel/bq-panel.js.map +1 -1
  231. package/dist/collection/components/progress/bq-progress.js +19 -9
  232. package/dist/collection/components/progress/bq-progress.js.map +1 -1
  233. package/dist/collection/components/radio/bq-radio.js +19 -9
  234. package/dist/collection/components/radio/bq-radio.js.map +1 -1
  235. package/dist/collection/components/radio-group/bq-radio-group.js +23 -11
  236. package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
  237. package/dist/collection/components/select/bq-select.js +72 -32
  238. package/dist/collection/components/select/bq-select.js.map +1 -1
  239. package/dist/collection/components/select/scss/bq-select.css +1 -1
  240. package/dist/collection/components/side-menu/bq-side-menu.js +14 -6
  241. package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
  242. package/dist/collection/components/side-menu-item/bq-side-menu-item.js +12 -6
  243. package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
  244. package/dist/collection/components/slider/bq-slider.js +50 -18
  245. package/dist/collection/components/slider/bq-slider.js.map +1 -1
  246. package/dist/collection/components/spinner/bq-spinner.js +14 -8
  247. package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
  248. package/dist/collection/components/status/bq-status.js +7 -3
  249. package/dist/collection/components/status/bq-status.js.map +1 -1
  250. package/dist/collection/components/step-item/bq-step-item.js +11 -5
  251. package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
  252. package/dist/collection/components/steps/bq-steps.js +11 -5
  253. package/dist/collection/components/steps/bq-steps.js.map +1 -1
  254. package/dist/collection/components/switch/bq-switch.js +31 -14
  255. package/dist/collection/components/switch/bq-switch.js.map +1 -1
  256. package/dist/collection/components/tab/bq-tab.js +21 -11
  257. package/dist/collection/components/tab/bq-tab.js.map +1 -1
  258. package/dist/collection/components/tab-group/bq-tab-group.js +17 -8
  259. package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
  260. package/dist/collection/components/tag/bq-tag.js +24 -12
  261. package/dist/collection/components/tag/bq-tag.js.map +1 -1
  262. package/dist/collection/components/textarea/bq-textarea.js +75 -24
  263. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  264. package/dist/collection/components/textarea/scss/bq-textarea.css +1 -1
  265. package/dist/collection/components/toast/bq-toast.js +18 -9
  266. package/dist/collection/components/toast/bq-toast.js.map +1 -1
  267. package/dist/collection/components/tooltip/bq-tooltip.js +23 -9
  268. package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
  269. package/dist/collection/global/scripts/zeroheight-svg-loader.js +6 -5
  270. package/dist/components/bq-accordion-group.js +1 -1
  271. package/dist/components/bq-accordion-group.js.map +1 -1
  272. package/dist/components/bq-accordion.js +1 -1
  273. package/dist/components/bq-accordion.js.map +1 -1
  274. package/dist/components/bq-alert.js +1 -1
  275. package/dist/components/bq-alert.js.map +1 -1
  276. package/dist/components/bq-avatar.js +1 -1
  277. package/dist/components/bq-avatar.js.map +1 -1
  278. package/dist/components/bq-badge.js +1 -1
  279. package/dist/components/bq-breadcrumb-item.js +1 -1
  280. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  281. package/dist/components/bq-breadcrumb.js +1 -1
  282. package/dist/components/bq-breadcrumb.js.map +1 -1
  283. package/dist/components/bq-button.js +1 -1
  284. package/dist/components/bq-card.js +1 -1
  285. package/dist/components/bq-card.js.map +1 -1
  286. package/dist/components/bq-checkbox.js +1 -1
  287. package/dist/components/bq-checkbox.js.map +1 -1
  288. package/dist/components/bq-date-picker.js +1 -1
  289. package/dist/components/bq-date-picker.js.map +1 -1
  290. package/dist/components/bq-dialog.js +1 -1
  291. package/dist/components/bq-dialog.js.map +1 -1
  292. package/dist/components/bq-divider.js +1 -1
  293. package/dist/components/bq-drawer.js +1 -1
  294. package/dist/components/bq-drawer.js.map +1 -1
  295. package/dist/components/bq-dropdown.js +1 -1
  296. package/dist/components/bq-empty-state.js +1 -1
  297. package/dist/components/bq-empty-state.js.map +1 -1
  298. package/dist/components/bq-icon.js +1 -1
  299. package/dist/components/bq-input.js +1 -1
  300. package/dist/components/bq-input.js.map +1 -1
  301. package/dist/components/bq-notification.js +1 -1
  302. package/dist/components/bq-notification.js.map +1 -1
  303. package/dist/components/bq-option-group.js +1 -1
  304. package/dist/components/bq-option-list.js +1 -1
  305. package/dist/components/bq-option.js +1 -1
  306. package/dist/components/bq-option.js.map +1 -1
  307. package/dist/components/bq-page-title.js +1 -1
  308. package/dist/components/bq-page-title.js.map +1 -1
  309. package/dist/components/bq-panel.js +1 -1
  310. package/dist/components/bq-progress.js +1 -1
  311. package/dist/components/bq-progress.js.map +1 -1
  312. package/dist/components/bq-radio-group.js +1 -1
  313. package/dist/components/bq-radio-group.js.map +1 -1
  314. package/dist/components/bq-radio.js +1 -1
  315. package/dist/components/bq-radio.js.map +1 -1
  316. package/dist/components/bq-select.js +1 -1
  317. package/dist/components/bq-select.js.map +1 -1
  318. package/dist/components/bq-side-menu-item.js +1 -1
  319. package/dist/components/bq-side-menu-item.js.map +1 -1
  320. package/dist/components/bq-side-menu.js +1 -1
  321. package/dist/components/bq-side-menu.js.map +1 -1
  322. package/dist/components/bq-slider.js +1 -1
  323. package/dist/components/bq-slider.js.map +1 -1
  324. package/dist/components/bq-spinner.js +1 -1
  325. package/dist/components/bq-spinner.js.map +1 -1
  326. package/dist/components/bq-status.js +1 -1
  327. package/dist/components/bq-status.js.map +1 -1
  328. package/dist/components/bq-step-item.js +1 -1
  329. package/dist/components/bq-step-item.js.map +1 -1
  330. package/dist/components/bq-steps.js +1 -1
  331. package/dist/components/bq-steps.js.map +1 -1
  332. package/dist/components/bq-switch.js +1 -1
  333. package/dist/components/bq-switch.js.map +1 -1
  334. package/dist/components/bq-tab-group.js +1 -1
  335. package/dist/components/bq-tab-group.js.map +1 -1
  336. package/dist/components/bq-tab.js +1 -1
  337. package/dist/components/bq-tab.js.map +1 -1
  338. package/dist/components/bq-tag.js +1 -1
  339. package/dist/components/bq-textarea.js +1 -1
  340. package/dist/components/bq-textarea.js.map +1 -1
  341. package/dist/components/bq-toast.js +1 -1
  342. package/dist/components/bq-toast.js.map +1 -1
  343. package/dist/components/bq-tooltip.js +1 -1
  344. package/dist/components/index.js +1 -1
  345. package/dist/components/index.js.map +1 -1
  346. package/dist/{beeq/p-55b0aea8.js → components/p-34611c2f.js} +2 -2
  347. package/dist/components/p-34611c2f.js.map +1 -0
  348. package/dist/components/p-37483f1c.js +6 -0
  349. package/dist/components/{p-d62fdbae.js.map → p-37483f1c.js.map} +1 -1
  350. package/dist/components/{p-c78ae3c2.js → p-397bc507.js} +2 -2
  351. package/dist/components/p-397bc507.js.map +1 -0
  352. package/dist/components/{p-c2d43340.js → p-5b34bd04.js} +2 -2
  353. package/dist/components/{p-c2d43340.js.map → p-5b34bd04.js.map} +1 -1
  354. package/dist/components/{p-78d23ddc.js → p-6e0c7ab4.js} +2 -2
  355. package/dist/components/{p-33371480.js → p-8d8eeb62.js} +2 -2
  356. package/dist/components/{p-33371480.js.map → p-8d8eeb62.js.map} +1 -1
  357. package/dist/components/{p-27c1b08e.js → p-9a115ee5.js} +2 -2
  358. package/dist/components/{p-27c1b08e.js.map → p-9a115ee5.js.map} +1 -1
  359. package/dist/components/p-a02c6b73.js +6 -0
  360. package/dist/components/{p-1566efe3.js.map → p-a02c6b73.js.map} +1 -1
  361. package/dist/components/p-ac26ffcd.js +6 -0
  362. package/dist/components/{p-603c898d.js.map → p-ac26ffcd.js.map} +1 -1
  363. package/dist/components/{p-d62fdbae.js → p-b50adb19.js} +2 -2
  364. package/dist/components/p-b50adb19.js.map +1 -0
  365. package/dist/components/p-c58e0d87.js +6 -0
  366. package/dist/components/{p-28da2321.js.map → p-c58e0d87.js.map} +1 -1
  367. package/dist/components/p-d16482dc.js +6 -0
  368. package/dist/components/p-d16482dc.js.map +1 -0
  369. package/dist/components/p-f5588ccd.js +6 -0
  370. package/dist/components/{p-7d7f1f7e.js.map → p-f5588ccd.js.map} +1 -1
  371. package/dist/custom-elements.json +3113 -3113
  372. package/dist/esm/{assetsPath-eed21007.js → assetsPath-57848212.js} +2 -2
  373. package/dist/esm/{assetsPath-eed21007.js.map → assetsPath-57848212.js.map} +1 -1
  374. package/dist/esm/beeq.js +3 -3
  375. package/dist/esm/beeq.js.map +1 -1
  376. package/dist/esm/bq-accordion-group.entry.js +19 -6
  377. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  378. package/dist/esm/bq-accordion.entry.js +32 -18
  379. package/dist/esm/bq-accordion.entry.js.map +1 -1
  380. package/dist/esm/bq-alert.entry.js +24 -11
  381. package/dist/esm/bq-alert.entry.js.map +1 -1
  382. package/dist/esm/bq-avatar.entry.js +19 -8
  383. package/dist/esm/bq-avatar.entry.js.map +1 -1
  384. package/dist/esm/bq-badge.entry.js +13 -5
  385. package/dist/esm/bq-badge.entry.js.map +1 -1
  386. package/dist/esm/bq-breadcrumb-item.entry.js +13 -5
  387. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  388. package/dist/esm/bq-breadcrumb.entry.js +8 -2
  389. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  390. package/dist/esm/bq-button_2.entry.js +62 -24
  391. package/dist/esm/bq-button_2.entry.js.map +1 -1
  392. package/dist/esm/bq-card.entry.js +10 -3
  393. package/dist/esm/bq-card.entry.js.map +1 -1
  394. package/dist/esm/bq-checkbox.entry.js +24 -10
  395. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  396. package/dist/esm/bq-date-picker.entry.js +102 -48
  397. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  398. package/dist/esm/bq-dialog.entry.js +24 -11
  399. package/dist/esm/bq-dialog.entry.js.map +1 -1
  400. package/dist/esm/bq-divider.entry.js +25 -11
  401. package/dist/esm/bq-divider.entry.js.map +1 -1
  402. package/dist/esm/bq-drawer.entry.js +21 -10
  403. package/dist/esm/bq-drawer.entry.js.map +1 -1
  404. package/dist/esm/bq-dropdown_2.entry.js +42 -17
  405. package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
  406. package/dist/esm/bq-empty-state.entry.js +10 -4
  407. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  408. package/dist/esm/bq-input.entry.js +106 -31
  409. package/dist/esm/bq-input.entry.js.map +1 -1
  410. package/dist/esm/bq-notification.entry.js +23 -11
  411. package/dist/esm/bq-notification.entry.js.map +1 -1
  412. package/dist/esm/bq-option-group.entry.js +1 -1
  413. package/dist/esm/bq-option-list_2.entry.js +34 -12
  414. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  415. package/dist/esm/bq-option.entry.js +16 -7
  416. package/dist/esm/bq-option.entry.js.map +1 -1
  417. package/dist/esm/bq-page-title.entry.js +7 -4
  418. package/dist/esm/bq-page-title.entry.js.map +1 -1
  419. package/dist/esm/bq-progress.entry.js +20 -8
  420. package/dist/esm/bq-progress.entry.js.map +1 -1
  421. package/dist/esm/bq-radio-group.entry.js +24 -10
  422. package/dist/esm/bq-radio-group.entry.js.map +1 -1
  423. package/dist/esm/bq-radio.entry.js +20 -8
  424. package/dist/esm/bq-radio.entry.js.map +1 -1
  425. package/dist/esm/bq-select.entry.js +74 -32
  426. package/dist/esm/bq-select.entry.js.map +1 -1
  427. package/dist/esm/bq-side-menu-item.entry.js +13 -5
  428. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  429. package/dist/esm/bq-side-menu.entry.js +15 -5
  430. package/dist/esm/bq-side-menu.entry.js.map +1 -1
  431. package/dist/esm/bq-slider.entry.js +51 -17
  432. package/dist/esm/bq-slider.entry.js.map +1 -1
  433. package/dist/esm/bq-spinner.entry.js +15 -7
  434. package/dist/esm/bq-spinner.entry.js.map +1 -1
  435. package/dist/esm/bq-status.entry.js +8 -2
  436. package/dist/esm/bq-status.entry.js.map +1 -1
  437. package/dist/esm/bq-step-item.entry.js +12 -4
  438. package/dist/esm/bq-step-item.entry.js.map +1 -1
  439. package/dist/esm/bq-steps.entry.js +12 -4
  440. package/dist/esm/bq-steps.entry.js.map +1 -1
  441. package/dist/esm/bq-switch.entry.js +32 -13
  442. package/dist/esm/bq-switch.entry.js.map +1 -1
  443. package/dist/esm/bq-tab-group.entry.js +18 -7
  444. package/dist/esm/bq-tab-group.entry.js.map +1 -1
  445. package/dist/esm/bq-tab.entry.js +22 -10
  446. package/dist/esm/bq-tab.entry.js.map +1 -1
  447. package/dist/esm/bq-textarea.entry.js +77 -24
  448. package/dist/esm/bq-textarea.entry.js.map +1 -1
  449. package/dist/esm/bq-toast.entry.js +19 -8
  450. package/dist/esm/bq-toast.entry.js.map +1 -1
  451. package/dist/esm/bq-tooltip.entry.js +25 -9
  452. package/dist/esm/bq-tooltip.entry.js.map +1 -1
  453. package/dist/esm/{cally-1a3258d6.js → cally-49a83be1.js} +3 -2
  454. package/dist/esm/cally-49a83be1.js.map +1 -0
  455. package/dist/esm/{index-c7d02072.js → index-59610291.js} +1128 -920
  456. package/dist/esm/index-59610291.js.map +1 -0
  457. package/dist/esm/{index-1618c78b.js → index-d4eea621.js} +54 -29
  458. package/dist/esm/index-d4eea621.js.map +1 -0
  459. package/dist/esm/index.js +4 -4
  460. package/dist/esm/{isDefined-48de6db5.js → isDefined-30b8b652.js} +2 -2
  461. package/dist/esm/{isDefined-48de6db5.js.map → isDefined-30b8b652.js.map} +1 -1
  462. package/dist/esm/loader.js +2 -2
  463. package/dist/hydrate/index.js +2358 -1518
  464. package/dist/hydrate/index.mjs +2358 -1518
  465. package/dist/stencil.config.js +3 -0
  466. package/dist/stencil.config.js.map +1 -1
  467. package/dist/types/components/accordion/bq-accordion.d.ts +1 -1
  468. package/dist/types/components/date-picker/bq-date-picker.d.ts +2 -2
  469. package/package.json +5 -5
  470. package/dist/beeq/p-00702295.entry.js.map +0 -1
  471. package/dist/beeq/p-01de6133.js +0 -6
  472. package/dist/beeq/p-0cab9a82.entry.js.map +0 -1
  473. package/dist/beeq/p-19c94c6d.entry.js +0 -6
  474. package/dist/beeq/p-19c94c6d.entry.js.map +0 -1
  475. package/dist/beeq/p-1cdea079.entry.js.map +0 -1
  476. package/dist/beeq/p-2c566eb0.entry.js +0 -6
  477. package/dist/beeq/p-2e0e325b.entry.js.map +0 -1
  478. package/dist/beeq/p-36b653f6.entry.js.map +0 -1
  479. package/dist/beeq/p-55b0aea8.js.map +0 -1
  480. package/dist/beeq/p-60094726.js +0 -7
  481. package/dist/beeq/p-60094726.js.map +0 -1
  482. package/dist/beeq/p-6079f9b2.entry.js +0 -6
  483. package/dist/beeq/p-c78ae3c2.js.map +0 -1
  484. package/dist/beeq/p-cb3b24e6.entry.js.map +0 -1
  485. package/dist/beeq/p-eb662058.entry.js +0 -6
  486. package/dist/beeq/p-eb662058.entry.js.map +0 -1
  487. package/dist/cjs/cally-9297cdd8.js.map +0 -1
  488. package/dist/cjs/index-c4edfa07.js.map +0 -1
  489. package/dist/cjs/index-fc7876d6.js.map +0 -1
  490. package/dist/components/p-1566efe3.js +0 -6
  491. package/dist/components/p-28da2321.js +0 -6
  492. package/dist/components/p-55b0aea8.js.map +0 -1
  493. package/dist/components/p-5940b410.js +0 -7
  494. package/dist/components/p-5940b410.js.map +0 -1
  495. package/dist/components/p-603c898d.js +0 -6
  496. package/dist/components/p-7d7f1f7e.js +0 -6
  497. package/dist/components/p-93c16753.js +0 -6
  498. package/dist/components/p-93c16753.js.map +0 -1
  499. package/dist/components/p-c78ae3c2.js.map +0 -1
  500. package/dist/components/p-cf496927.js +0 -6
  501. package/dist/components/p-cf496927.js.map +0 -1
  502. package/dist/esm/cally-1a3258d6.js.map +0 -1
  503. package/dist/esm/index-1618c78b.js.map +0 -1
  504. package/dist/esm/index-c7d02072.js.map +0 -1
  505. /package/dist/beeq/{p-c09dac58.entry.js.map → p-b7b3f7c6.entry.js.map} +0 -0
  506. /package/dist/beeq/{p-01de6133.js.map → p-cf923c68.js.map} +0 -0
  507. /package/dist/beeq/{p-3c472097.js.map → p-e4dd6ff4.js.map} +0 -0
  508. /package/dist/components/{p-78d23ddc.js.map → p-6e0c7ab4.js.map} +0 -0
  509. /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/packages/beeq/.stencil/packages/beeq/stencil.config.d.ts +0 -0
  510. /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/packages/beeq/.stencil/tailwind.config.d.ts +0 -0
@@ -61,21 +61,30 @@ import { validatePropValue } from "../../shared/utils";
61
61
  * @cssprop --bq-avatar--badge-left-circle - Badge left position shape circle
62
62
  */
63
63
  export class BqAvatar {
64
- constructor() {
65
- this.hasError = undefined;
66
- this.altText = undefined;
67
- this.image = undefined;
68
- this.label = undefined;
69
- this.initials = undefined;
70
- this.shape = 'circle';
71
- this.size = 'medium';
72
- }
73
64
  // Own Properties
74
65
  // ====================
75
66
  trimmedInitials;
76
67
  // Reference to host HTML element
77
68
  // ===================================
78
69
  el;
70
+ // State() variables
71
+ // Inlined decorator, alphabetical order
72
+ // =======================================
73
+ hasError;
74
+ // Public Property API
75
+ // ========================
76
+ /** Alternate text for the avatar image if the image cannot be displayed */
77
+ altText;
78
+ /** The image source to load on the avatar (this can be also a base64 encoded image) */
79
+ image;
80
+ /** A text to use for describing the avatar on assistive devices */
81
+ label;
82
+ /** The text to display on avatar */
83
+ initials;
84
+ /** The shape of the avatar */
85
+ shape = 'circle';
86
+ /** The size of the avatar */
87
+ size = 'medium';
79
88
  // Prop lifecycle events
80
89
  // =======================
81
90
  handleImagePropChange() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-avatar.js","sourceRoot":"","sources":["../../../../../../src/components/avatar/bq-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,WAAW,EAA6B,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAMH,MAAM,OAAO,QAAQ;;;;;;;qBAiC4B,QAAQ;oBAGK,QAAQ;;IAnCpE,iBAAiB;IACjB,uBAAuB;IAEvB,eAAe,CAAS;IAExB,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IA6BpC,wBAAwB;IACxB,0BAA0B;IAG1B,qBAAqB;QACnB,sDAAsD;QACtD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAID,eAAe;QACb,iBAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC5D,iBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAID,gBAAgB;QACd,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAED,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { AVATAR_SHAPE, AVATAR_SIZE, TAvatarShape, TAvatarSize } from './bq-avatar.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Avatar component is a simple and customizable element that displays an image or initials in a circular or square shape.\n * This component is useful for displaying user profile pictures or any other image that represents a person or an entity.\n *\n * @example How to use it\n * ```html\n * <bq-avatar\n * alt-text=\"John Doe profile picture\"\n * image=\"/image/url/photo-1524593689594.jpeg\"\n * label=\"John Doe profile picture\"\n * shape=\"circle\"\n * size=\"medium\"\n * >\n * <bq-badge slot=\"badge\" text-color=\"#fff\">9</bq-badge>\n * </bq-avatar>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/148da7-avatar\n * @status stable\n *\n * @attr {string} alt-text - Alternate text for the avatar image if the image cannot be displayed.\n * @attr {string} image - The image source to load on the avatar (this can be also a base64 encoded image).\n * @attr {string} label - A text to use for describing the avatar on assistive devices.\n * @attr {string} initials - The text to display on avatar.\n * @attr {\"circle\" | \"square\"} shape - The shape of the avatar.\n * @attr {\"xsmall\" | \"small\" | \"medium\" | \"large\"} size - The size of the avatar.\n *\n * @slot badge - The badge slot is used to add a badge to the avatar. The badge is a small circle or square that can be used to display a number or a status.\n *\n * @part base - The component's internal wrapper.\n * @part img - The `<image>` tag element that load the image source.\n * @part text - The `<span>` tag element that rendered the `Initials` text string.\n * @part badge - The container that wraps the badge slot element.\n *\n * @cssprop --bq-avatar--background - Avatar background color\n *\n * @cssprop --bq-avatar--border-color - Avatar border color\n * @cssprop --bq-avatar--border-style - Avatar border style\n * @cssprop --bq-avatar--border-width - Avatar border width\n *\n * @cssprop --bq-avatar--border-radius-circle - Avatar border radius for circle & any size\n * @cssprop --bq-avatar--border-radius-squareXs - Avatar border radius for square & size xsmall\n * @cssprop --bq-avatar--border-radius-squareS - Avatar border radius for square & size small\n * @cssprop --bq-avatar--border-radius-squareM - Avatar border radius for square & size medium/large\n *\n * @cssprop --bq-avatar--size-xsmall - Avatar xsmall size\n * @cssprop --bq-avatar--size-small - Avatar small size\n * @cssprop --bq-avatar--size-medium - Avatar medium size\n * @cssprop --bq-avatar--size-large - Avatar large size\n *\n * @cssprop --bq-avatar--badge-top-square - Badge top position shape square\n * @cssprop --bq-avatar--badge-left-square - Badge left position shape square\n * @cssprop --bq-avatar--badge-top-circle - Badge top position shape circle\n * @cssprop --bq-avatar--badge-left-circle - Badge left position shape circle\n */\n@Component({\n tag: 'bq-avatar',\n styleUrl: './scss/bq-avatar.scss',\n shadow: true,\n})\nexport class BqAvatar {\n // Own Properties\n // ====================\n\n trimmedInitials: string;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqAvatarElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasError: boolean;\n\n // Public Property API\n // ========================\n\n /** Alternate text for the avatar image if the image cannot be displayed */\n @Prop({ reflect: true }) altText: string;\n\n /** The image source to load on the avatar (this can be also a base64 encoded image) */\n @Prop({ reflect: true }) image: string;\n\n /** A text to use for describing the avatar on assistive devices */\n @Prop({ reflect: true }) label: string;\n\n /** The text to display on avatar */\n @Prop({ reflect: true }) initials: string;\n\n /** The shape of the avatar */\n @Prop({ reflect: true }) shape: TAvatarShape = 'circle';\n\n /** The size of the avatar */\n @Prop({ reflect: true, mutable: true }) size: TAvatarSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('image')\n handleImagePropChange() {\n // Reset the error when a new image source is provided\n this.hasError = false;\n }\n\n @Watch('shape')\n @Watch('size')\n checkPropValues() {\n validatePropValue(AVATAR_SHAPE, 'circle', this.el, 'shape');\n validatePropValue(AVATAR_SIZE, 'medium', this.el, 'size');\n }\n\n @Watch('initials')\n @Watch('size')\n onInitialsChange() {\n this.trimInitialsBasedOnSize();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.trimInitialsBasedOnSize();\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onImageError = () => {\n this.hasError = true;\n };\n\n private trimInitialsBasedOnSize = (): void => {\n if (!this.initials) return;\n\n AVATAR_SIZE.forEach((size: TAvatarSize) => {\n if (this.size === size) {\n this.trimmedInitials = this.initials.substring(0, this.getIndex(size));\n }\n });\n };\n\n private getIndex = (size: TAvatarSize): number => {\n const sizeIndexMap = {\n xsmall: 1,\n small: 2,\n medium: 3,\n large: 4,\n };\n return sizeIndexMap[size] ?? sizeIndexMap.xsmall;\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'bq-avatar': true,\n [`size--${this.size}`]: true,\n 'rounded-[--bq-avatar--border-radius-circle]': this.shape === 'circle',\n 'rounded-[--bq-avatar--border-radius-squareXs]': this.shape === 'square' && this.size === 'xsmall',\n 'rounded-[--bq-avatar--border-radius-squareS]': this.shape === 'square' && this.size === 'small',\n 'rounded-[--bq-avatar--border-radius-squareM]':\n this.shape === 'square' && (this.size === 'medium' || this.size === 'large'),\n }}\n aria-label={this.label}\n role=\"img\"\n part=\"base\"\n >\n {this.initials && (\n <span\n class=\"absolute start-0 inline-flex items-center justify-center font-bold bs-full is-full inset-bs-0\"\n part=\"text\"\n >\n {this.trimmedInitials}\n </span>\n )}\n {this.image && !this.hasError && (\n <img\n class=\"absolute start-0 object-cover bs-full is-full inset-bs-0\"\n alt={this.altText ?? undefined}\n src={this.image}\n onError={this.onImageError}\n part=\"img\"\n />\n )}\n </div>\n <div\n class={{\n 'absolute flex items-center justify-center': true,\n 'start-[--bq-avatar--badge-left-square] inset-bs-[--bq-avatar--badge-top-square]': this.shape === 'square',\n 'start-[--bq-avatar--badge-left-circle] inset-bs-[--bq-avatar--badge-top-circle]': this.shape === 'circle',\n }}\n part=\"badge\"\n >\n <slot name=\"badge\"></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-avatar.js","sourceRoot":"","sources":["../../../../../../src/components/avatar/bq-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,WAAW,EAA6B,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAMH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEvB,eAAe,CAAS;IAExB,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IAEpC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEjC,QAAQ,CAAU;IAE3B,sBAAsB;IACtB,2BAA2B;IAE3B,2EAA2E;IAClD,OAAO,CAAS;IAEzC,uFAAuF;IAC9D,KAAK,CAAS;IAEvC,mEAAmE;IAC1C,KAAK,CAAS;IAEvC,oCAAoC;IACX,QAAQ,CAAS;IAE1C,8BAA8B;IACL,KAAK,GAAiB,QAAQ,CAAC;IAExD,6BAA6B;IACW,IAAI,GAAgB,QAAQ,CAAC;IAErE,wBAAwB;IACxB,0BAA0B;IAG1B,qBAAqB;QACnB,sDAAsD;QACtD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAID,eAAe;QACb,iBAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC5D,iBAAiB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,IAAI,EAAC,OAAO,GAAQ,CACtB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { AVATAR_SHAPE, AVATAR_SIZE, TAvatarShape, TAvatarSize } from './bq-avatar.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Avatar component is a simple and customizable element that displays an image or initials in a circular or square shape.\n * This component is useful for displaying user profile pictures or any other image that represents a person or an entity.\n *\n * @example How to use it\n * ```html\n * <bq-avatar\n * alt-text=\"John Doe profile picture\"\n * image=\"/image/url/photo-1524593689594.jpeg\"\n * label=\"John Doe profile picture\"\n * shape=\"circle\"\n * size=\"medium\"\n * >\n * <bq-badge slot=\"badge\" text-color=\"#fff\">9</bq-badge>\n * </bq-avatar>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/148da7-avatar\n * @status stable\n *\n * @attr {string} alt-text - Alternate text for the avatar image if the image cannot be displayed.\n * @attr {string} image - The image source to load on the avatar (this can be also a base64 encoded image).\n * @attr {string} label - A text to use for describing the avatar on assistive devices.\n * @attr {string} initials - The text to display on avatar.\n * @attr {\"circle\" | \"square\"} shape - The shape of the avatar.\n * @attr {\"xsmall\" | \"small\" | \"medium\" | \"large\"} size - The size of the avatar.\n *\n * @slot badge - The badge slot is used to add a badge to the avatar. The badge is a small circle or square that can be used to display a number or a status.\n *\n * @part base - The component's internal wrapper.\n * @part img - The `<image>` tag element that load the image source.\n * @part text - The `<span>` tag element that rendered the `Initials` text string.\n * @part badge - The container that wraps the badge slot element.\n *\n * @cssprop --bq-avatar--background - Avatar background color\n *\n * @cssprop --bq-avatar--border-color - Avatar border color\n * @cssprop --bq-avatar--border-style - Avatar border style\n * @cssprop --bq-avatar--border-width - Avatar border width\n *\n * @cssprop --bq-avatar--border-radius-circle - Avatar border radius for circle & any size\n * @cssprop --bq-avatar--border-radius-squareXs - Avatar border radius for square & size xsmall\n * @cssprop --bq-avatar--border-radius-squareS - Avatar border radius for square & size small\n * @cssprop --bq-avatar--border-radius-squareM - Avatar border radius for square & size medium/large\n *\n * @cssprop --bq-avatar--size-xsmall - Avatar xsmall size\n * @cssprop --bq-avatar--size-small - Avatar small size\n * @cssprop --bq-avatar--size-medium - Avatar medium size\n * @cssprop --bq-avatar--size-large - Avatar large size\n *\n * @cssprop --bq-avatar--badge-top-square - Badge top position shape square\n * @cssprop --bq-avatar--badge-left-square - Badge left position shape square\n * @cssprop --bq-avatar--badge-top-circle - Badge top position shape circle\n * @cssprop --bq-avatar--badge-left-circle - Badge left position shape circle\n */\n@Component({\n tag: 'bq-avatar',\n styleUrl: './scss/bq-avatar.scss',\n shadow: true,\n})\nexport class BqAvatar {\n // Own Properties\n // ====================\n\n trimmedInitials: string;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqAvatarElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasError: boolean;\n\n // Public Property API\n // ========================\n\n /** Alternate text for the avatar image if the image cannot be displayed */\n @Prop({ reflect: true }) altText: string;\n\n /** The image source to load on the avatar (this can be also a base64 encoded image) */\n @Prop({ reflect: true }) image: string;\n\n /** A text to use for describing the avatar on assistive devices */\n @Prop({ reflect: true }) label: string;\n\n /** The text to display on avatar */\n @Prop({ reflect: true }) initials: string;\n\n /** The shape of the avatar */\n @Prop({ reflect: true }) shape: TAvatarShape = 'circle';\n\n /** The size of the avatar */\n @Prop({ reflect: true, mutable: true }) size: TAvatarSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('image')\n handleImagePropChange() {\n // Reset the error when a new image source is provided\n this.hasError = false;\n }\n\n @Watch('shape')\n @Watch('size')\n checkPropValues() {\n validatePropValue(AVATAR_SHAPE, 'circle', this.el, 'shape');\n validatePropValue(AVATAR_SIZE, 'medium', this.el, 'size');\n }\n\n @Watch('initials')\n @Watch('size')\n onInitialsChange() {\n this.trimInitialsBasedOnSize();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.trimInitialsBasedOnSize();\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onImageError = () => {\n this.hasError = true;\n };\n\n private trimInitialsBasedOnSize = (): void => {\n if (!this.initials) return;\n\n AVATAR_SIZE.forEach((size: TAvatarSize) => {\n if (this.size === size) {\n this.trimmedInitials = this.initials.substring(0, this.getIndex(size));\n }\n });\n };\n\n private getIndex = (size: TAvatarSize): number => {\n const sizeIndexMap = {\n xsmall: 1,\n small: 2,\n medium: 3,\n large: 4,\n };\n return sizeIndexMap[size] ?? sizeIndexMap.xsmall;\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'bq-avatar': true,\n [`size--${this.size}`]: true,\n 'rounded-[--bq-avatar--border-radius-circle]': this.shape === 'circle',\n 'rounded-[--bq-avatar--border-radius-squareXs]': this.shape === 'square' && this.size === 'xsmall',\n 'rounded-[--bq-avatar--border-radius-squareS]': this.shape === 'square' && this.size === 'small',\n 'rounded-[--bq-avatar--border-radius-squareM]':\n this.shape === 'square' && (this.size === 'medium' || this.size === 'large'),\n }}\n aria-label={this.label}\n role=\"img\"\n part=\"base\"\n >\n {this.initials && (\n <span\n class=\"absolute start-0 inline-flex items-center justify-center font-bold bs-full is-full inset-bs-0\"\n part=\"text\"\n >\n {this.trimmedInitials}\n </span>\n )}\n {this.image && !this.hasError && (\n <img\n class=\"absolute start-0 object-cover bs-full is-full inset-bs-0\"\n alt={this.altText ?? undefined}\n src={this.image}\n onError={this.onImageError}\n part=\"img\"\n />\n )}\n </div>\n <div\n class={{\n 'absolute flex items-center justify-center': true,\n 'start-[--bq-avatar--badge-left-square] inset-bs-[--bq-avatar--badge-top-square]': this.shape === 'square',\n 'start-[--bq-avatar--badge-left-circle] inset-bs-[--bq-avatar--badge-top-circle]': this.shape === 'circle',\n }}\n part=\"badge\"\n >\n <slot name=\"badge\"></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -38,12 +38,6 @@ import { getColorCSSVariable, getTextContent, isNil, validatePropValue } from ".
38
38
  * @cssprop --bq-badge--text-color - The badge text color
39
39
  */
40
40
  export class BqBadge {
41
- constructor() {
42
- this.contentLength = 0;
43
- this.backgroundColor = 'ui--danger';
44
- this.textColor = 'text--inverse';
45
- this.size = 'small';
46
- }
47
41
  // Own Properties
48
42
  // ====================
49
43
  spanElement;
@@ -54,6 +48,18 @@ export class BqBadge {
54
48
  // Reference to host HTML element
55
49
  // ===================================
56
50
  el;
51
+ // State() variables
52
+ // Inlined decorator, alphabetical order
53
+ // =======================================
54
+ contentLength = 0;
55
+ // Public Property API
56
+ // ========================
57
+ /** Badge background color. The value should be a valid value of the palette color */
58
+ backgroundColor = 'ui--danger';
59
+ /** Badge number color. The value should be a valid value of the palette color */
60
+ textColor = 'text--inverse';
61
+ /** The size of the badge. Relevant if badge has no content. */
62
+ size = 'small';
57
63
  // Prop lifecycle events
58
64
  // =======================
59
65
  handleSizePropChange() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-badge.js","sourceRoot":"","sources":["../../../../../../src/components/badge/bq-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,UAAU,EAA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IAAI,EAAC,MAAM;gBAEX,6DAAM,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,EAAE,KAAK,EAAC,iCAAiC,EAAC,IAAI,EAAC,QAAQ;oBACzG,6DAAM,YAAY,EAAE,IAAI,CAAC,YAAY,GAAS,CACzC,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { BADGE_SIZE, TBadgeSize } from './bq-badge.types';\nimport { getColorCSSVariable, getTextContent, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * The Badge component is a visual indicator that can be added to various elements within a user interface.\n * It is typically used to highlight important or relevant information, such as alerts, notifications, or statuses.\n *\n * @example How to use it\n * ```html\n * <bq-badge background-color=\"ui--success\" text-color=\"text--inverse\" size=\"small\">9</bq-badge>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/194fd1-badge\n * @status stable\n *\n * @attr {string} background-color - Badge background color. The value should be a valid value of the palette color.\n * @attr {string} text-color - Badge number color. The value should be a valid value of the palette color.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the badge. Relevant if badge has no content.\n *\n * @slot - The default slot is used to add content to the badge. The content can be a number or a text.\n *\n * @part base - The component's internal wrapper that holds the count.\n * @part number - The component's internal wrapper that holds the slot.\n *\n * @cssprop --bq-badge--background-color - The badge background color\n * @cssprop --bq-badge--box-shadow - The badge box shadow\n * @cssprop --bq-badge--border-color - The badge border color\n * @cssprop --bq-badge--border-radius - The badge border radius\n * @cssprop --bq-badge--border-style - The badge border style\n * @cssprop --bq-badge--border-width - The badge border width\n * @cssprop --bq-badge--size-small - The badge small size\n * @cssprop --bq-badge--size-medium - The badge medium size\n * @cssprop --bq-badge--size-large - The badge large size\n * @cssprop --bq-badge--text-color - The badge text color\n */\n@Component({\n tag: 'bq-badge',\n styleUrl: './scss/bq-badge.scss',\n shadow: true,\n})\nexport class BqBadge {\n // Own Properties\n // ====================\n\n private spanElement?: HTMLSpanElement;\n\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.contentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el: HTMLBqBadgeElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private contentLength = 0;\n\n // Public Property API\n // ========================\n\n /** Badge background color. The value should be a valid value of the palette color */\n @Prop({ mutable: true, reflect: true }) backgroundColor? = 'ui--danger';\n\n /** Badge number color. The value should be a valid value of the palette color */\n @Prop({ mutable: true, reflect: true }) textColor? = 'text--inverse';\n\n /** The size of the badge. Relevant if badge has no content. */\n @Prop({ reflect: true, mutable: true }) size?: TBadgeSize = 'small';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n handleSizePropChange() {\n validatePropValue(BADGE_SIZE, 'small', this.el, 'size');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleSizePropChange();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onSlotChange = () => {\n const slot = this.slot;\n\n if (isNil(slot)) return;\n\n this.contentLength = getTextContent(slot, { recurse: true }).length;\n const [node] = slot.assignedNodes({ flatten: true });\n\n if (isNil(node)) {\n this.observer.takeRecords();\n return;\n }\n\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n };\n\n private get slot(): HTMLSlotElement | null {\n return this.spanElement?.querySelector('slot') ?? null;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const styles = {\n ...(this.backgroundColor && { '--bq-badge--background-color': getColorCSSVariable(this.backgroundColor) }),\n ...(this.textColor && { '--bq-badge--text-color': getColorCSSVariable(this.textColor) }),\n };\n\n return (\n <Host style={styles}>\n <div\n class={{\n 'bq-badge': true,\n [`size--${this.size}`]: this.contentLength === 0,\n digit: this.contentLength > 0,\n 'p-i-xs2': this.contentLength > 1,\n }}\n part=\"base\"\n >\n <span ref={(element) => (this.spanElement = element)} class=\"text-xs font-bold leading-small\" part=\"number\">\n <slot onSlotchange={this.onSlotChange}></slot>\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-badge.js","sourceRoot":"","sources":["../../../../../../src/components/badge/bq-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAc,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAMH,MAAM,OAAO,OAAO;IAClB,iBAAiB;IACjB,uBAAuB;IAEf,WAAW,CAAmB;IAE9B,QAAQ,GAAqB,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;QACtE,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAqB;IAElC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IA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Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { BADGE_SIZE, TBadgeSize } from './bq-badge.types';\nimport { getColorCSSVariable, getTextContent, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * The Badge component is a visual indicator that can be added to various elements within a user interface.\n * It is typically used to highlight important or relevant information, such as alerts, notifications, or statuses.\n *\n * @example How to use it\n * ```html\n * <bq-badge background-color=\"ui--success\" text-color=\"text--inverse\" size=\"small\">9</bq-badge>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/194fd1-badge\n * @status stable\n *\n * @attr {string} background-color - Badge background color. The value should be a valid value of the palette color.\n * @attr {string} text-color - Badge number color. The value should be a valid value of the palette color.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the badge. Relevant if badge has no content.\n *\n * @slot - The default slot is used to add content to the badge. The content can be a number or a text.\n *\n * @part base - The component's internal wrapper that holds the count.\n * @part number - The component's internal wrapper that holds the slot.\n *\n * @cssprop --bq-badge--background-color - The badge background color\n * @cssprop --bq-badge--box-shadow - The badge box shadow\n * @cssprop --bq-badge--border-color - The badge border color\n * @cssprop --bq-badge--border-radius - The badge border radius\n * @cssprop --bq-badge--border-style - The badge border style\n * @cssprop --bq-badge--border-width - The badge border width\n * @cssprop --bq-badge--size-small - The badge small size\n * @cssprop --bq-badge--size-medium - The badge medium size\n * @cssprop --bq-badge--size-large - The badge large size\n * @cssprop --bq-badge--text-color - The badge text color\n */\n@Component({\n tag: 'bq-badge',\n styleUrl: './scss/bq-badge.scss',\n shadow: true,\n})\nexport class BqBadge {\n // Own Properties\n // ====================\n\n private spanElement?: HTMLSpanElement;\n\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.contentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el: HTMLBqBadgeElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private contentLength = 0;\n\n // Public Property API\n // ========================\n\n /** Badge background color. The value should be a valid value of the palette color */\n @Prop({ mutable: true, reflect: true }) backgroundColor? = 'ui--danger';\n\n /** Badge number color. The value should be a valid value of the palette color */\n @Prop({ mutable: true, reflect: true }) textColor? = 'text--inverse';\n\n /** The size of the badge. Relevant if badge has no content. */\n @Prop({ reflect: true, mutable: true }) size?: TBadgeSize = 'small';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n handleSizePropChange() {\n validatePropValue(BADGE_SIZE, 'small', this.el, 'size');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleSizePropChange();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onSlotChange = () => {\n const slot = this.slot;\n\n if (isNil(slot)) return;\n\n this.contentLength = getTextContent(slot, { recurse: true }).length;\n const [node] = slot.assignedNodes({ flatten: true });\n\n if (isNil(node)) {\n this.observer.takeRecords();\n return;\n }\n\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n };\n\n private get slot(): HTMLSlotElement | null {\n return this.spanElement?.querySelector('slot') ?? null;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const styles = {\n ...(this.backgroundColor && { '--bq-badge--background-color': getColorCSSVariable(this.backgroundColor) }),\n ...(this.textColor && { '--bq-badge--text-color': getColorCSSVariable(this.textColor) }),\n };\n\n return (\n <Host style={styles}>\n <div\n class={{\n 'bq-badge': true,\n [`size--${this.size}`]: this.contentLength === 0,\n digit: this.contentLength > 0,\n 'p-i-xs2': this.contentLength > 1,\n }}\n part=\"base\"\n >\n <span ref={(element) => (this.spanElement = element)} class=\"text-xs font-bold leading-small\" part=\"number\">\n <slot onSlotchange={this.onSlotChange}></slot>\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -28,9 +28,6 @@ import { h, Host } from "@stencil/core";
28
28
  * @part separator - The container that wraps the separator element
29
29
  */
30
30
  export class BqBreadcrumb {
31
- constructor() {
32
- this.label = 'Breadcrumbs';
33
- }
34
31
  // Own Properties
35
32
  // ====================
36
33
  navElem;
@@ -38,6 +35,13 @@ export class BqBreadcrumb {
38
35
  // Reference to host HTML element
39
36
  // ===================================
40
37
  el;
38
+ // State() variables
39
+ // Inlined decorator, alphabetical order
40
+ // =======================================
41
+ // Public Property API
42
+ // ========================
43
+ /** The `aria-label` attribute to describe the type of navigation */
44
+ label = 'Breadcrumbs';
41
45
  // Prop lifecycle events
42
46
  // =======================
43
47
  // Events section
@@ -1 +1 @@
1
- {"version":3,"file":"bq-breadcrumb.js","sourceRoot":"","sources":["../../../../../../src/components/breadcrumb/bq-breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,YAAY;;qBAoBkB,aAAa;;IAnBtD,iBAAiB;IACjB,uBAAuB;IAEf,OAAO,CAAc;IACrB,QAAQ,CAAc;IAE9B,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAA2B;IAYxC,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,YAAY;IACZ,iBAAiB;IAEjB,qBAAqB;IACrB,iDAAiD;IACjD,wBAAwB;IACxB,gCAAgC;IAChC,gDAAgD;IAChD,kDAAkD;IAElD,gBAAgB;IAChB,2BAA2B;IAC3B,wDAAwD;IACxD,0DAA0D;IAElD,gBAAgB,GAAG,GAAS,EAAE;QACpC,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AM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,mBAAmB,gBAAa,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,EAAC,YAAY;gBAC5G,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C;YACN,6DAAM,MAAM,uBAAa,MAAM,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,IAAI,EAAC,WAAW;gBAC3F,6DAAM,IAAI,EAAC,WAAW;oBACpB,6DAAM,KAAK,EAAC,uCAAuC,QAAS,CACvD,CACF,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * The Breadcrumb is used to wraps a series of breadcrumb items to indicate the current page's location within a navigational hierarchy.\n *\n * @example How to use it\n * ```html\n * <bq-breadcrumb label=\"Breadcrumb\">\n * <bq-breadcrumb-item>Home</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Men's clothing</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Shirt</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>\n * </bq-breadcrumb>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/194fd1-breadcrumb\n * @status stable\n *\n * @attr {string} label - The `aria-label` attribute to describe the type of navigation\n *\n * @slot - The default slot is used to add `bq-breadcrumb-item` items to the breadcrumb.\n * @slot separator - The slot to add a separator between breadcrumb items. Default separator is `/`.\n *\n * @part navigation - The `nav` tag that loads the breadcrumb items\n * @part separator - The container that wraps the separator element\n */\n@Component({\n tag: 'bq-breadcrumb',\n styleUrl: './scss/bq-breadcrumb.scss',\n shadow: true,\n})\nexport class BqBreadcrumb {\n // Own Properties\n // ====================\n\n private navElem: HTMLElement;\n private spanElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqBreadcrumbElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The `aria-label` attribute to describe the type of navigation */\n @Prop({ reflect: true }) label: string = 'Breadcrumbs';\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = (): void => {\n const breadcrumbItems = this.breadcrumbItems;\n const itemCount = breadcrumbItems.length;\n const separatorElem = this.getSeparatorElem();\n\n breadcrumbItems.forEach((item, index) => {\n const isLastItem = index === itemCount - 1;\n const separatorSlot = item.querySelector('[slot=\"separator\"]');\n\n if (!separatorSlot && !isLastItem) {\n item.append(separatorElem.cloneNode(true));\n }\n\n item.setAttribute('aria-current', isLastItem ? 'page' : '');\n });\n };\n\n private getSeparatorElem = (): HTMLElement => {\n const clone = this.separatorFromSlot.cloneNode(true) as HTMLElement;\n clone.slot = 'separator';\n\n return clone;\n };\n\n private get separatorFromSlot() {\n return this.spanElem\n .querySelector<HTMLSlotElement>('slot[name=\"separator\"]')\n .assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n private get breadcrumbItems(): HTMLBqBreadcrumbItemElement[] {\n return this.navElem\n .querySelector<HTMLSlotElement>('slot')\n .assignedElements({ flatten: true }) as HTMLBqBreadcrumbItemElement[];\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <nav class=\"flex items-center\" aria-label={this.label} ref={(elem) => (this.navElem = elem)} part=\"navigation\">\n <slot onSlotchange={this.handleSlotChange}></slot>\n </nav>\n <span hidden aria-hidden=\"true\" ref={(element) => (this.spanElem = element)} part=\"separator\">\n <slot name=\"separator\">\n <span class=\"flex items-center justify-center is-3\">/</span>\n </slot>\n </span>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-breadcrumb.js","sourceRoot":"","sources":["../../../../../../src/components/breadcrumb/bq-breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,YAAY;IACvB,iBAAiB;IACjB,uBAAuB;IAEf,OAAO,CAAc;IACrB,QAAQ,CAAc;IAE9B,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAA2B;IAExC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAE1C,sBAAsB;IACtB,2BAA2B;IAE3B,oEAAoE;IAC3C,KAAK,GAAW,aAAa,CAAC;IAEvD,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,YAAY;IACZ,iBAAiB;IAEjB,qBAAqB;IACrB,iDAAiD;IACjD,wBAAwB;IACxB,gCAAgC;IAChC,gDAAgD;IAChD,kDAAkD;IAElD,gBAAgB;IAChB,2BAA2B;IAC3B,wDAAwD;IACxD,0DAA0D;IAElD,gBAAgB,GAAG,GAAS,EAAE;QACpC,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC;QACzC,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE9C,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;Y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AM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C;YACN,6DAAM,MAAM,uBAAa,MAAM,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,IAAI,EAAC,WAAW;gBAC3F,6DAAM,IAAI,EAAC,WAAW;oBACpB,6DAAM,KAAK,EAAC,uCAAuC,QAAS,CACvD,CACF,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * The Breadcrumb is used to wraps a series of breadcrumb items to indicate the current page's location within a navigational hierarchy.\n *\n * @example How to use it\n * ```html\n * <bq-breadcrumb label=\"Breadcrumb\">\n * <bq-breadcrumb-item>Home</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Men's clothing</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Shirt</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>\n * </bq-breadcrumb>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/194fd1-breadcrumb\n * @status stable\n *\n * @attr {string} label - The `aria-label` attribute to describe the type of navigation\n *\n * @slot - The default slot is used to add `bq-breadcrumb-item` items to the breadcrumb.\n * @slot separator - The slot to add a separator between breadcrumb items. Default separator is `/`.\n *\n * @part navigation - The `nav` tag that loads the breadcrumb items\n * @part separator - The container that wraps the separator element\n */\n@Component({\n tag: 'bq-breadcrumb',\n styleUrl: './scss/bq-breadcrumb.scss',\n shadow: true,\n})\nexport class BqBreadcrumb {\n // Own Properties\n // ====================\n\n private navElem: HTMLElement;\n private spanElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqBreadcrumbElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The `aria-label` attribute to describe the type of navigation */\n @Prop({ reflect: true }) label: string = 'Breadcrumbs';\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = (): void => {\n const breadcrumbItems = this.breadcrumbItems;\n const itemCount = breadcrumbItems.length;\n const separatorElem = this.getSeparatorElem();\n\n breadcrumbItems.forEach((item, index) => {\n const isLastItem = index === itemCount - 1;\n const separatorSlot = item.querySelector('[slot=\"separator\"]');\n\n if (!separatorSlot && !isLastItem) {\n item.append(separatorElem.cloneNode(true));\n }\n\n item.setAttribute('aria-current', isLastItem ? 'page' : '');\n });\n };\n\n private getSeparatorElem = (): HTMLElement => {\n const clone = this.separatorFromSlot.cloneNode(true) as HTMLElement;\n clone.slot = 'separator';\n\n return clone;\n };\n\n private get separatorFromSlot() {\n return this.spanElem\n .querySelector<HTMLSlotElement>('slot[name=\"separator\"]')\n .assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n private get breadcrumbItems(): HTMLBqBreadcrumbItemElement[] {\n return this.navElem\n .querySelector<HTMLSlotElement>('slot')\n .assignedElements({ flatten: true }) as HTMLBqBreadcrumbItemElement[];\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <nav class=\"flex items-center\" aria-label={this.label} ref={(elem) => (this.navElem = elem)} part=\"navigation\">\n <slot onSlotchange={this.handleSlotChange}></slot>\n </nav>\n <span hidden aria-hidden=\"true\" ref={(element) => (this.spanElem = element)} part=\"separator\">\n <slot name=\"separator\">\n <span class=\"flex items-center justify-center is-3\">/</span>\n </slot>\n </span>\n </Host>\n );\n }\n}\n"]}
@@ -51,16 +51,22 @@ import { isDefined } from "../../shared/utils";
51
51
  * @cssprop --bq-breadcrumb-item--padding-end-separator - Padding end of the breadcrumb item separator
52
52
  */
53
53
  export class BqBreadcrumbItem {
54
- constructor() {
55
- this.href = undefined;
56
- this.target = undefined;
57
- this.rel = 'noreferrer noopener';
58
- }
59
54
  // Own Properties
60
55
  // ====================
61
56
  // Reference to host HTML element
62
57
  // ===================================
63
58
  el;
59
+ // State() variables
60
+ // Inlined decorator, alphabetical order
61
+ // =======================================
62
+ // Public Property API
63
+ // ========================
64
+ /** If set, the breadcrumb item will be rendered as an `<a>` with this `href`, otherwise, a `<button>` will be rendered. */
65
+ href;
66
+ /** Where to display the link in the browser context. Relevant only if `href` is set. */
67
+ target;
68
+ /** Where to display the link in the browser context. Relevant only if `href` is set. */
69
+ rel = 'noreferrer noopener';
64
70
  // Prop lifecycle events
65
71
  // =======================
66
72
  // Events section
@@ -1 +1 @@
1
- {"version":3,"file":"bq-breadcrumb-item.js","sourceRoot":"","sources":["../../../../../../src/components/breadcrumb-item/bq-breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,MAAM,OAAO,gBAAgB;;;;mBAuBY,qBAAqB;;IAtB5D,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAA+B;IAkB5C,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,iDAAiD;IACxC,MAAM,CAA4C;IAE3D,gDAAgD;IACvC,OAAO,CAA4C;IAE5D,gDAAgD;IACvC,OAAO,CAA4C;IAE5D,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IA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,EACrB,IAAI,EAAC,MAAM;gBAEX,6DAAM,KAAK,EAAC,2BAA2B,EAAC,IAAI,EAAC,SAAS;oBACpD,8DAAa,CACR,CACC;YAEV,6DAAM,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,WAAW;gBACjD,6DAAM,IAAI,EAAC,WAAW,GAAQ,CACzB,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nimport { isDefined } from '../../shared/utils';\n\n/**\n * The Breadcrumb Item helps users understand their current location within a website or application's hierarchical structure.\n *\n * @example How to use it\n * ```html\n * <bq-breadcrumb-item label=\"Home page\">\n * <bq-icon name=\"house-line\" size=\"16\"></bq-icon>\n * Home\n * </bq-breadcrumb-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/61d6c0-breadcrumb\n * @status stable\n *\n * @attr {string} href - If set, the breadcrumb item will be rendered as an `<a>` with this `href`, otherwise, a `<button>` will be rendered.\n * @attr {string} target - Where to display the link in the browser context. Relevant only if `href` is set.\n * @attr {string} rel - Where to display the link in the browser context. Relevant only if `href` is set.\n *\n * @event bqFocus - Handler to be called when item is focused\n * @event bqClick - Handler to be called when item is clicked\n * @event bqBlur - Handler to be called when item loses focus\n *\n * @slot - The default slot is used to add content to the breadcrumb item.\n *\n * @part base - The component wrapper container\n * @part content - The `span` tag that wraps the content item\n * @part item - The breadcrumb item wrapper (`button` or `a`)\n * @part separator - The `span` tag that wraps the separator element\n *\n * @cssprop --bq-breadcrumb-item--background - Background color of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--box-shadow - Box shadow of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-color - Border color of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-style - Border style of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-width - Border width of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-radius - Border radius of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--line-height - Line height of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--text-color - Text color of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--text-color-current - Text color of the current breadcrumb item (active)\n * @cssprop --bq-breadcrumb-item--text-size - Text size of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--text-size-separator - Text size of the breadcrumb item separator\n * @cssprop --bq-breadcrumb-item--padding-start - Padding start of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--padding-end - Padding end of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--paddingY - Padding top and bottom of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--padding-start-separator - Padding start of the breadcrumb item separator\n * @cssprop --bq-breadcrumb-item--padding-end-separator - Padding end of the breadcrumb item separator\n */\n@Component({\n tag: 'bq-breadcrumb-item',\n styleUrl: './scss/bq-breadcrumb-item.scss',\n shadow: true,\n})\nexport class BqBreadcrumbItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqBreadcrumbItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If set, the breadcrumb item will be rendered as an `<a>` with this `href`, otherwise, a `<button>` will be rendered. */\n @Prop({ reflect: true }) href: string;\n\n /** Where to display the link in the browser context. Relevant only if `href` is set. */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** Where to display the link in the browser context. Relevant only if `href` is set. */\n @Prop({ reflect: true }) rel: string = 'noreferrer noopener';\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqBreadcrumbItemElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqBreadcrumbItemElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqBreadcrumbItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private onClick = () => {\n this.bqClick.emit(this.el);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n\n return (\n <div class=\"flex items-center\" part=\"base\">\n <TagElem\n class=\"breadcrumb-item\"\n href={isLink ? this.href : undefined}\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n part=\"item\"\n >\n <span class=\"flex items-center gap-xs2\" part=\"content\">\n <slot></slot>\n </span>\n </TagElem>\n {/* @internal use only */}\n <span class=\"breadcrumb-separator\" part=\"separator\">\n <slot name=\"separator\"></slot>\n </span>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-breadcrumb-item.js","sourceRoot":"","sources":["../../../../../../src/components/breadcrumb-item/bq-breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,MAAM,OAAO,gB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,CAAC,QAAQ,CAAC;QAExC,OAAO,CACL,4DAAK,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,MAAM;YACxC,EAAC,OAAO,qDACN,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACpC,GAAG,EAAE,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EAC9D,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACxC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAC,MAAM;gBAEX,6DAAM,KAAK,EAAC,2BAA2B,EAAC,IAAI,EAAC,SAAS;oBACpD,8DAAa,CACR,CACC;YAEV,6DAAM,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,WAAW;gBACjD,6DAAM,IAAI,EAAC,WAAW,GAAQ,CACzB,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nimport { isDefined } from '../../shared/utils';\n\n/**\n * The Breadcrumb Item helps users understand their current location within a website or application's hierarchical structure.\n *\n * @example How to use it\n * ```html\n * <bq-breadcrumb-item label=\"Home page\">\n * <bq-icon name=\"house-line\" size=\"16\"></bq-icon>\n * Home\n * </bq-breadcrumb-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/61d6c0-breadcrumb\n * @status stable\n *\n * @attr {string} href - If set, the breadcrumb item will be rendered as an `<a>` with this `href`, otherwise, a `<button>` will be rendered.\n * @attr {string} target - Where to display the link in the browser context. Relevant only if `href` is set.\n * @attr {string} rel - Where to display the link in the browser context. Relevant only if `href` is set.\n *\n * @event bqFocus - Handler to be called when item is focused\n * @event bqClick - Handler to be called when item is clicked\n * @event bqBlur - Handler to be called when item loses focus\n *\n * @slot - The default slot is used to add content to the breadcrumb item.\n *\n * @part base - The component wrapper container\n * @part content - The `span` tag that wraps the content item\n * @part item - The breadcrumb item wrapper (`button` or `a`)\n * @part separator - The `span` tag that wraps the separator element\n *\n * @cssprop --bq-breadcrumb-item--background - Background color of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--box-shadow - Box shadow of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-color - Border color of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-style - Border style of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-width - Border width of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--border-radius - Border radius of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--line-height - Line height of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--text-color - Text color of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--text-color-current - Text color of the current breadcrumb item (active)\n * @cssprop --bq-breadcrumb-item--text-size - Text size of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--text-size-separator - Text size of the breadcrumb item separator\n * @cssprop --bq-breadcrumb-item--padding-start - Padding start of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--padding-end - Padding end of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--paddingY - Padding top and bottom of the breadcrumb item\n * @cssprop --bq-breadcrumb-item--padding-start-separator - Padding start of the breadcrumb item separator\n * @cssprop --bq-breadcrumb-item--padding-end-separator - Padding end of the breadcrumb item separator\n */\n@Component({\n tag: 'bq-breadcrumb-item',\n styleUrl: './scss/bq-breadcrumb-item.scss',\n shadow: true,\n})\nexport class BqBreadcrumbItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqBreadcrumbItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If set, the breadcrumb item will be rendered as an `<a>` with this `href`, otherwise, a `<button>` will be rendered. */\n @Prop({ reflect: true }) href: string;\n\n /** Where to display the link in the browser context. Relevant only if `href` is set. */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** Where to display the link in the browser context. Relevant only if `href` is set. */\n @Prop({ reflect: true }) rel: string = 'noreferrer noopener';\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqBreadcrumbItemElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqBreadcrumbItemElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqBreadcrumbItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private onClick = () => {\n this.bqClick.emit(this.el);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n\n return (\n <div class=\"flex items-center\" part=\"base\">\n <TagElem\n class=\"breadcrumb-item\"\n href={isLink ? this.href : undefined}\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n part=\"item\"\n >\n <span class=\"flex items-center gap-xs2\" part=\"content\">\n <slot></slot>\n </span>\n </TagElem>\n {/* @internal use only */}\n <span class=\"breadcrumb-separator\" part=\"separator\">\n <slot name=\"separator\"></slot>\n </span>\n </div>\n );\n }\n}\n"]}
@@ -65,22 +65,6 @@ import { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from ".
65
65
  * @cssprop --bq-button--large-font-size - Button large font size
66
66
  */
67
67
  export class BqButton {
68
- constructor() {
69
- this.hasPrefix = false;
70
- this.hasSuffix = false;
71
- this.appearance = 'primary';
72
- this.block = false;
73
- this.border = 'm';
74
- this.disabled = false;
75
- this.download = undefined;
76
- this.href = undefined;
77
- this.justifyContent = 'center';
78
- this.loading = false;
79
- this.size = 'medium';
80
- this.target = undefined;
81
- this.type = 'button';
82
- this.variant = 'standard';
83
- }
84
68
  // Own Properties
85
69
  // ====================
86
70
  prefixElem;
@@ -89,6 +73,43 @@ export class BqButton {
89
73
  // ===================================
90
74
  el;
91
75
  internals;
76
+ // State() variables
77
+ // Inlined decorator, alphabetical order
78
+ // =======================================
79
+ hasPrefix = false;
80
+ hasSuffix = false;
81
+ // Public Property API
82
+ // ========================
83
+ /** The appearance style to apply to the button */
84
+ appearance = 'primary';
85
+ /** If `true`, it will make the button fit to its parent width. */
86
+ block = false;
87
+ /** The corner radius of the button */
88
+ border = 'm';
89
+ /** If true, the button will be disabled (no interaction allowed) */
90
+ disabled = false;
91
+ /**
92
+ * Tells the browser to treat the linked URL as a download. Only used when `href` is set.
93
+ * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download
94
+ */
95
+ download;
96
+ /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */
97
+ href;
98
+ /** It determinate how the content should be aligned */
99
+ justifyContent = 'center';
100
+ /** If `true` it will display the button in a loading state */
101
+ loading = false;
102
+ /** The size of the button */
103
+ size = 'medium';
104
+ /**
105
+ * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)
106
+ * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target
107
+ */
108
+ target;
109
+ /** The default behavior of the button */
110
+ type = 'button';
111
+ /** The variant of button to apply on top of the appearance (applicable only to `appearance="primary"`) */
112
+ variant = 'standard';
92
113
  // Prop lifecycle events
93
114
  // =======================
94
115
  checkPropValues() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-button.js","sourceRoot":"","sources":["../../../../../../src/components/button/bq-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtH,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,cAAc,GAMf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AASH,MAAM,OAAO,QAAQ;;yBAiBU,KAAK;yBACL,KAAK;0BAMuB,SAAS;qBAGxB,KAAK;sBAGQ,GAAG;wBAGvC,KAAK;;;8BAY+C,QAAQ;uBAG7D,KAAK;oBAGsB,QAAQ;;oBASR,QAAQ;uBAGF,UAAU;;IA9D7D,iBAAiB;IACjB,uBAAuB;IAEf,UAAU,CAAc;IACxB,UAAU,CAAc;IAEhC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IACjB,SAAS,CAAoB;IAsDhD,wBAAwB;IACxB,0BAA0B;IAM1B,eAAe;QACb,iBAAiB,CAAC,iBAAiB,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QACvE,iBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE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I,EAAC,aAAa,GAAG,CACjE,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport {\n BUTTON_APPEARANCE,\n BUTTON_SIZE,\n BUTTON_TYPE,\n BUTTON_VARIANT,\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @example How to use it\n * ```html\n * <bq-button appearance=\"primary\" border=\"m\" size=\"medium\">\n * <bq-icon name=\"arrow-circle-left\" slot=\"prefix\"></bq-icon>\n * Go back\n * </bq-button>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/286b43-buttons\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"primary\" | \"secondary\" | \"link\" | \"text\"} appearance - The appearance style to apply to the button\n * @attr {boolean} block - If `true`, it will make the button fit to its parent width.\n * @attr {string} border - The corner radius of the button\n * @attr {boolean} disabled - If `true`, the button will be disabled (no interaction allowed)\n * @attr {string} download - Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * @attr {string} href - When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`\n * @attr {\"left\" | \"center\" | \"right\"} justify-content - It determinate how the content should be aligned\n * @attr {boolean} loading - If `true` it will display the button in a loading state\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the button\n * @attr {\"_blank\" | \"_parent\" | \"_self\" | \"_top\"} target - Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * @attr {\"button\" | \"submit\" | \"reset\"} type - The default behavior of the button\n * @attr {\"standard\" | \"ghost\" | \"danger\"} variant - The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`)\n *\n * @event bqBlur - Handler to be called when the button loses focus\n * @event bqFocus - Handler to be called when button gets focus\n * @event bqClick - Handler to be called when the button is clicked\n *\n * @slot prefix - The prefix content to be displayed before the button label\n * @slot - The button label content\n * @slot suffix - The suffix content to be displayed after the button label\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n *\n * @cssprop --bq-button--border-color - Button border color\n * @cssprop --bq-button--border-radius - Button border radius\n * @cssprop --bq-button--border-style - Button border style\n * @cssprop --bq-button--border-width - Button border width\n * @cssprop --bq-button--small-height - Button small height\n * @cssprop --bq-button--small-paddingX - Button small padding block (top and bottom)\n * @cssprop --bq-button--small-paddingY - Button small padding inline (left and right)\n * @cssprop --bq-button--small-font-size - Button small font size\n * @cssprop --bq-button--medium-height - Button medium height\n * @cssprop --bq-button--medium-paddingX - Button medium padding block (top and bottom)\n * @cssprop --bq-button--medium-paddingY - Button medium padding inline (left and right)\n * @cssprop --bq-button--medium-font-size - Button medium font size\n * @cssprop --bq-button--large-height - Button large height\n * @cssprop --bq-button--large-paddingX - Button large padding block (top and bottom)\n * @cssprop --bq-button--large-paddingY - Button large padding inline (left and right)\n * @cssprop --bq-button--large-font-size - Button large font size\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n // Public Property API\n // ========================\n\n /** The appearance style to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n const { disabled, loading, bqClick, el } = this;\n\n if (disabled || loading) {\n this.preventEvent(ev);\n return;\n }\n\n const bqClickEvent = bqClick.emit(el);\n if (bqClickEvent.defaultPrevented) {\n this.preventEvent(ev);\n return;\n }\n\n this.handleFormAction();\n };\n\n private handleFormAction() {\n const {\n type,\n internals: { form },\n } = this;\n if (isNil(form)) return;\n\n const formAction = this.formActions(form)[type];\n if (isNil(formAction)) return;\n\n formAction();\n }\n\n private formActions = (form: HTMLFormElement) => ({\n submit: () => this.submitAssociatedForm(form),\n reset: () => form.reset(),\n });\n\n private submitAssociatedForm = (form: HTMLFormElement) => {\n if (!isClient() || isNil(form)) return;\n\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n form.append(btn);\n\n btn.click();\n btn.remove();\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private preventEvent(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && <bq-icon class=\"bq-button__loader\" name=\"spinner-gap\" />}\n </TagElem>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-button.js","sourceRoot":"","sources":["../../../../../../src/components/button/bq-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAA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DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACN,IAAI,CAAC,OAAO,IAAI,gEAAS,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,aAAa,GAAG,CACjE,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport {\n BUTTON_APPEARANCE,\n BUTTON_SIZE,\n BUTTON_TYPE,\n BUTTON_VARIANT,\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @example How to use it\n * ```html\n * <bq-button appearance=\"primary\" border=\"m\" size=\"medium\">\n * <bq-icon name=\"arrow-circle-left\" slot=\"prefix\"></bq-icon>\n * Go back\n * </bq-button>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/286b43-buttons\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"primary\" | \"secondary\" | \"link\" | \"text\"} appearance - The appearance style to apply to the button\n * @attr {boolean} block - If `true`, it will make the button fit to its parent width.\n * @attr {string} border - The corner radius of the button\n * @attr {boolean} disabled - If `true`, the button will be disabled (no interaction allowed)\n * @attr {string} download - Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * @attr {string} href - When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`\n * @attr {\"left\" | \"center\" | \"right\"} justify-content - It determinate how the content should be aligned\n * @attr {boolean} loading - If `true` it will display the button in a loading state\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the button\n * @attr {\"_blank\" | \"_parent\" | \"_self\" | \"_top\"} target - Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * @attr {\"button\" | \"submit\" | \"reset\"} type - The default behavior of the button\n * @attr {\"standard\" | \"ghost\" | \"danger\"} variant - The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`)\n *\n * @event bqBlur - Handler to be called when the button loses focus\n * @event bqFocus - Handler to be called when button gets focus\n * @event bqClick - Handler to be called when the button is clicked\n *\n * @slot prefix - The prefix content to be displayed before the button label\n * @slot - The button label content\n * @slot suffix - The suffix content to be displayed after the button label\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n *\n * @cssprop --bq-button--border-color - Button border color\n * @cssprop --bq-button--border-radius - Button border radius\n * @cssprop --bq-button--border-style - Button border style\n * @cssprop --bq-button--border-width - Button border width\n * @cssprop --bq-button--small-height - Button small height\n * @cssprop --bq-button--small-paddingX - Button small padding block (top and bottom)\n * @cssprop --bq-button--small-paddingY - Button small padding inline (left and right)\n * @cssprop --bq-button--small-font-size - Button small font size\n * @cssprop --bq-button--medium-height - Button medium height\n * @cssprop --bq-button--medium-paddingX - Button medium padding block (top and bottom)\n * @cssprop --bq-button--medium-paddingY - Button medium padding inline (left and right)\n * @cssprop --bq-button--medium-font-size - Button medium font size\n * @cssprop --bq-button--large-height - Button large height\n * @cssprop --bq-button--large-paddingX - Button large padding block (top and bottom)\n * @cssprop --bq-button--large-paddingY - Button large padding inline (left and right)\n * @cssprop --bq-button--large-font-size - Button large font size\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n // Public Property API\n // ========================\n\n /** The appearance style to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n const { disabled, loading, bqClick, el } = this;\n\n if (disabled || loading) {\n this.preventEvent(ev);\n return;\n }\n\n const bqClickEvent = bqClick.emit(el);\n if (bqClickEvent.defaultPrevented) {\n this.preventEvent(ev);\n return;\n }\n\n this.handleFormAction();\n };\n\n private handleFormAction() {\n const {\n type,\n internals: { form },\n } = this;\n if (isNil(form)) return;\n\n const formAction = this.formActions(form)[type];\n if (isNil(formAction)) return;\n\n formAction();\n }\n\n private formActions = (form: HTMLFormElement) => ({\n submit: () => this.submitAssociatedForm(form),\n reset: () => form.reset(),\n });\n\n private submitAssociatedForm = (form: HTMLFormElement) => {\n if (!isClient() || isNil(form)) return;\n\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n form.append(btn);\n\n btn.click();\n btn.remove();\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private preventEvent(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && <bq-icon class=\"bq-button__loader\" name=\"spinner-gap\" />}\n </TagElem>\n </Host>\n );\n }\n}\n"]}
@@ -39,15 +39,20 @@ import { validatePropValue } from "../../shared/utils";
39
39
  * @cssprop --bq-card--background - Card background color
40
40
  */
41
41
  export class BqCard {
42
- constructor() {
43
- this.type = 'default';
44
- this.border = 'm';
45
- }
46
42
  // Own Properties
47
43
  // ====================
48
44
  // Reference to host HTML element
49
45
  // ===================================
50
46
  el;
47
+ // State() variables
48
+ // Inlined decorator, alphabetical order
49
+ // =======================================
50
+ // Public Property API
51
+ // ========================
52
+ /** Type of card component */
53
+ type = 'default';
54
+ /** The corner radius of the card component */
55
+ border = 'm';
51
56
  // Prop lifecycle events
52
57
  // =======================
53
58
  checkPropValue() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-card.js","sourceRoot":"","sources":["../../../../../../src/components/card/bq-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAgC,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,MAAM,OAAO,MAAM;;oBAiB0B,SAAS;sBAGC,GAAG;;IAnBxD,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAqB;IAelC,wBAAwB;IACxB,0BAA0B;IAG1B,cAAc;QACZ,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,iBAAiB;QACf,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,YAAY;IACZ,iBAAiB;IAEjB,qBAAqB;IACrB,iDAAiD;IACjD,wBAAwB;IACxB,gCAAgC;IAChC,gDAAgD;IAChD,kDAAkD;IAElD,gBAAgB;IAChB,2BAA2B;IAC3B,wDAAwD;IACxD,0DAA0D;IAE1D,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IAEtC,MAAM;QACJ,MAAM,KAAK,GAAG;YACZ,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,yBAAyB,EAAE,oBAAoB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;SACtF,CAAC;QACF,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,KAAK;YAChB,4DACE,KAAK,EAAE;oBACL,mJAAmJ,EACjJ,IAAI;oBACN,mDAAmD,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;oBAC5E,uCAAuC;oBACvC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;iBACvC,EACD,IAAI,EAAC,SAAS;gBAEd,8DAAQ,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\nimport { CARD_TYPE, TCardBorderRadius, TCardType } from './bq-card.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Card component serves as a versatile container designed for flexible content presentation within user interfaces.\n * Its structure accommodates various styles, allowing users to customize and adapt it according to their design preferences.\n *\n * @example How to use it\n * ```html\n * <bq-card type=\"default\" border=\"m\">\n * <div class=\"p-m\">\n * <h3 class=\"text-xl font-bold\">Card Title</h3>\n * <p class=\"text-m\">Card content goes here</p>\n * </div>\n * </bq-card>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/522abb-card\n * @status stable\n *\n * @attr {\"default\" | \"minimal\"} type - Type of card component\n * @attr {\"none\" | \"xs2\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"full\"} border - The corner radius of the card component\n *\n * @slot - The content of the card component\n *\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-card--borderColor - Card border color\n * @cssprop --bq-card--borderRadius - Card border radius\n * @cssprop --bq-card--borderStyle - Card border style\n * @cssprop --bq-card--borderWidth - Card border width\n *\n * @cssprop --bq-card--padding - Card padding\n * @cssprop --bq-card--paddingMinimal - Minimal card padding\n * @cssprop --bq-card--background - Card background color\n */\n@Component({\n tag: 'bq-card',\n styleUrl: './scss/bq-card.scss',\n shadow: true,\n})\nexport class BqCard {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqCardElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** Type of card component */\n @Prop({ reflect: true }) type: TCardType = 'default';\n\n /** The corner radius of the card component */\n @Prop({ reflect: true }) border: TCardBorderRadius = 'm';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n checkPropValue() {\n validatePropValue(CARD_TYPE, 'default', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValue();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-card--borderRadius': `var(--bq-radius--${this.border})` }),\n };\n return (\n <Host style={style}>\n <div\n class={{\n 'bq-card rounded-[--bq-card--borderRadius] border-[length:--bq-card--borderWidth] border-[color:--bq-card--borderColor] bg-[--bq-card--background]':\n true,\n 'p-b-[--bq-card--padding] p-i-[--bq-card--padding]': this.type === 'default',\n // Remove padding for minimal card type\n 'p-b-0 p-i-0': this.type === 'minimal',\n }}\n part=\"wrapper\"\n >\n <slot />\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-card.js","sourceRoot":"","sources":["../../../../../../src/components/card/bq-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAgC,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,MAAM,OAAO,MAAM;IACjB,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAqB;IAElC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAE1C,sBAAsB;IACtB,2BAA2B;IAE3B,6BAA6B;IACJ,IAAI,GAAc,SAAS,CAAC;IAErD,8CAA8C;IACrB,MAAM,GAAsB,GAAG,CAAC;IAEzD,wBAAwB;IACxB,0BAA0B;IAG1B,cAAc;QACZ,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,iBAAiB;QACf,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,YAAY;IACZ,iBAAiB;IAEjB,qBAAqB;IACrB,iDAAiD;IACjD,wBAAwB;IACxB,gCAAgC;IAChC,gDAAgD;IAChD,kDAAkD;IAElD,gBAAgB;IAChB,2BAA2B;IAC3B,wDAAwD;IACxD,0DAA0D;IAE1D,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IAEtC,MAAM;QACJ,MAAM,KAAK,GAAG;YACZ,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,yBAAyB,EAAE,oBAAoB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;SACtF,CAAC;QACF,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,KAAK;YAChB,4DACE,KAAK,EAAE;oBACL,mJAAmJ,EACjJ,IAAI;oBACN,mDAAmD,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;oBAC5E,uCAAuC;oBACvC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;iBACvC,EACD,IAAI,EAAC,SAAS;gBAEd,8DAAQ,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\nimport { CARD_TYPE, TCardBorderRadius, TCardType } from './bq-card.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Card component serves as a versatile container designed for flexible content presentation within user interfaces.\n * Its structure accommodates various styles, allowing users to customize and adapt it according to their design preferences.\n *\n * @example How to use it\n * ```html\n * <bq-card type=\"default\" border=\"m\">\n * <div class=\"p-m\">\n * <h3 class=\"text-xl font-bold\">Card Title</h3>\n * <p class=\"text-m\">Card content goes here</p>\n * </div>\n * </bq-card>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/522abb-card\n * @status stable\n *\n * @attr {\"default\" | \"minimal\"} type - Type of card component\n * @attr {\"none\" | \"xs2\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"full\"} border - The corner radius of the card component\n *\n * @slot - The content of the card component\n *\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-card--borderColor - Card border color\n * @cssprop --bq-card--borderRadius - Card border radius\n * @cssprop --bq-card--borderStyle - Card border style\n * @cssprop --bq-card--borderWidth - Card border width\n *\n * @cssprop --bq-card--padding - Card padding\n * @cssprop --bq-card--paddingMinimal - Minimal card padding\n * @cssprop --bq-card--background - Card background color\n */\n@Component({\n tag: 'bq-card',\n styleUrl: './scss/bq-card.scss',\n shadow: true,\n})\nexport class BqCard {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqCardElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** Type of card component */\n @Prop({ reflect: true }) type: TCardType = 'default';\n\n /** The corner radius of the card component */\n @Prop({ reflect: true }) border: TCardBorderRadius = 'm';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n checkPropValue() {\n validatePropValue(CARD_TYPE, 'default', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValue();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-card--borderRadius': `var(--bq-radius--${this.border})` }),\n };\n return (\n <Host style={style}>\n <div\n class={{\n 'bq-card rounded-[--bq-card--borderRadius] border-[length:--bq-card--borderWidth] border-[color:--bq-card--borderColor] bg-[--bq-card--background]':\n true,\n 'p-b-[--bq-card--padding] p-i-[--bq-card--padding]': this.type === 'default',\n // Remove padding for minimal card type\n 'p-b-0 p-i-0': this.type === 'minimal',\n }}\n part=\"wrapper\"\n >\n <slot />\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -49,17 +49,6 @@ import { isNil } from "../../shared/utils";
49
49
  * @cssprop --bq-checkbox--border-width - Checkbox border width
50
50
  */
51
51
  export class BqCheckbox {
52
- constructor() {
53
- this.backgroundOnHover = false;
54
- this.formId = undefined;
55
- this.formValidationMessage = undefined;
56
- this.checked = undefined;
57
- this.disabled = false;
58
- this.indeterminate = false;
59
- this.name = undefined;
60
- this.required = undefined;
61
- this.value = undefined;
62
- }
63
52
  // Own Properties
64
53
  // ====================
65
54
  inputElem;
@@ -68,6 +57,29 @@ export class BqCheckbox {
68
57
  // ===================================
69
58
  el;
70
59
  internals;
60
+ // State() variables
61
+ // Inlined decorator, alphabetical order
62
+ // =======================================
63
+ // Public Property API
64
+ // ========================
65
+ /** If true checkbox displays background on hover */
66
+ backgroundOnHover = false;
67
+ /** The form ID that the checkbox is associated with */
68
+ formId;
69
+ /** The native form validation message */
70
+ formValidationMessage;
71
+ /** If true checkbox is checked */
72
+ checked;
73
+ /** If true checkbox is disabled */
74
+ disabled = false;
75
+ /** A state that is neither checked nor unchecked */
76
+ indeterminate = false;
77
+ /** Name of the HTML input form control. Submitted with the form as part of a name/value pair. */
78
+ name;
79
+ /** If `true`, it will indicate that the user must specify a value for the checkbox before the owning form can be submitted */
80
+ required;
81
+ /** A string representing the value of the checkbox. Primarily used to differentiate a list of related checkboxes that have the same name. */
82
+ value;
71
83
  // Prop lifecycle events
72
84
  // =======================
73
85
  handleIndeterminatePropChange() {