@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
@@ -50,24 +50,6 @@ import { clamp, debounce, isNil, isString } from "../../shared/utils";
50
50
  * @cssprop --bq-slider--trackarea-color - Slider track background color
51
51
  */
52
52
  export class BqSlider {
53
- constructor() {
54
- this.minValue = undefined;
55
- this.maxValue = undefined;
56
- this.minThumbPosition = undefined;
57
- this.maxThumbPosition = undefined;
58
- this.debounceTime = 0;
59
- this.disabled = false;
60
- this.enableValueIndicator = false;
61
- this.gap = 0;
62
- this.max = 100;
63
- this.min = 0;
64
- this.name = undefined;
65
- this.step = 1;
66
- this.type = 'single';
67
- this.value = undefined;
68
- this.enableTooltip = false;
69
- this.tooltipAlwaysVisible = false;
70
- }
71
53
  // Own Properties
72
54
  // ====================
73
55
  inputMinElem;
@@ -81,6 +63,56 @@ export class BqSlider {
81
63
  // ===================================
82
64
  internals;
83
65
  el;
66
+ // State() variables
67
+ // Inlined decorator, alphabetical order
68
+ // =======================================
69
+ /**
70
+ * The `minValue` state is the only value when the slider type is `single`
71
+ * and the minimum value when the slider type is `range`.
72
+ */
73
+ minValue;
74
+ /** The `maxValue` state is only used when the slider type is `range`. */
75
+ maxValue;
76
+ /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */
77
+ minThumbPosition;
78
+ /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */
79
+ maxThumbPosition;
80
+ // Public Property API
81
+ // ========================
82
+ /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */
83
+ debounceTime = 0;
84
+ /** If `true` the slider is disabled. */
85
+ disabled = false;
86
+ /** If `true` it will show the value label on a side of the slider track area */
87
+ enableValueIndicator = false;
88
+ /** A number representing the amount to remain between the minimum and maximum values (only for range type). */
89
+ gap = 0;
90
+ /** A number representing the max value of the slider. */
91
+ max = 100;
92
+ /** A number representing the min value of the slider. */
93
+ min = 0;
94
+ /** Name of the form control. Submitted with the form as part of a name/value pair */
95
+ name;
96
+ /**
97
+ * A number representing the step of the slider.
98
+ * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.
99
+ */
100
+ step = 1;
101
+ /** It defines the type of slider to display */
102
+ type = 'single';
103
+ /**
104
+ * The value of the slider.
105
+ * - If the slider type is `single`, the value is a number.
106
+ * - If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value).
107
+ */
108
+ value;
109
+ /** If `true`, a tooltip will be shown displaying the progress value */
110
+ enableTooltip = false;
111
+ /**
112
+ * If `true`, a tooltip will always display the progress value.
113
+ * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.
114
+ */
115
+ tooltipAlwaysVisible = false;
84
116
  // Prop lifecycle events
85
117
  // =======================
86
118
  handleValuePropChange(newValue) {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-slider.js","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AEjG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;gBAE9E,IAAI,CAAC,aAAa;oBACjB,IAAI,CAAC,WAAW;oBAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;gBAEjG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F;YAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TSliderType, TSliderValue } from './bq-slider.types';\nimport { clamp, debounce, isNil, isString, TDebounce } from '../../shared/utils';\n\n/**\n * Sliders provide a visual representation of adjustable content, enabling users to change values by dragging a handle along a horizontal track.\n *\n * @example How to use it\n * ```html\n * <bq-slider max=\"100\" value=\"30\"></bq-slider>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/509cbc-slider/b/09d7b1\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait to trigger the bqChange event after each value change.\n * @attr {boolean} disabled - If `true` the slider is disabled.\n * @attr {boolean} enable-tooltip - If `true`, a tooltip will be shown displaying the progress value.\n * @attr {boolean} enable-value-indicator - If `true` it will show the value label on the side of the slider track area.\n * @attr {number} gap - A number representing the amount to remain between the minimum and maximum values (only for range type).\n * @attr {number} max - A number representing the max value of the slider.\n * @attr {number} min - A number representing the min value of the slider.\n * @attr {number} step - A number represents the step of the slider. ⚠️ Please notice that the value (or list of values if the slider type is range) will be rounded to the nearest multiple of step.\n * @attr {boolean} tooltip-always-visible - If `true`, a tooltip will always display the progress value. It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n * @attr {\"range\" | \"single\"} type - It defines the type of slider to display.\n * @attr {\"[number, number]\" | \"number\" | \"string\"} value - The value of the slider. If the slider type is single, the value is a number.\n * If the slider type is range, the value is an array of two numbers (the first number represents the min value and the second number represents the max value).\n *\n * @event bqBlur - Handler to be called when the slider loses focus.\n * @event bqChange - Handler to be called when changing the value on range inputs.\n * @event bqFocus - Handler to be called when the slider gets focused.\n *\n * @part base - The component's base wrapper.\n * @part container - The container of the slider.\n * @part track-area - The track area of the slider.\n * @part progress-area - The progress area of the slider.\n * @part input-min - The input element for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part input-max - The input element for the maximum value.\n * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part label-end - The label for maximum value when the slider type is `range`.\n *\n * @cssprop --bq-slider--size - The height of the slider track/progress area\n * @cssprop --bq-slider--border-radius - Slider border radius\n * @cssprop --bq-slider--thumb-size - Slider hover thumb size\n * @cssprop --bq-slider--progress-color - Slider progress background color\n * @cssprop --bq-slider--trackarea-color - Slider track background color\n */\n@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSlider {\n // Own Properties\n // ====================\n\n private inputMinElem: HTMLInputElement;\n private inputMaxElem: HTMLInputElement;\n private minTooltipElem: HTMLBqTooltipElement;\n private maxTooltipElem: HTMLBqTooltipElement;\n private progressElem: HTMLSpanElement;\n private trackElem: HTMLSpanElement;\n private debounceBqChange: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqSliderElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n /**\n * The `minValue` state is the only value when the slider type is `single`\n * and the minimum value when the slider type is `range`.\n */\n @State() minValue: number;\n /** The `maxValue` state is only used when the slider type is `range`. */\n @State() maxValue: number;\n /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */\n @State() minThumbPosition: number;\n /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */\n @State() maxThumbPosition: number;\n\n // Public Property API\n // ========================\n\n /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */\n @Prop({ reflect: true }) debounceTime = 0;\n\n /** If `true` the slider is disabled. */\n @Prop({ reflect: true }) disabled? = false;\n\n /** If `true` it will show the value label on a side of the slider track area */\n @Prop({ reflect: true }) enableValueIndicator? = false;\n\n /** A number representing the amount to remain between the minimum and maximum values (only for range type). */\n @Prop({ reflect: true, mutable: true }) gap = 0;\n\n /** A number representing the max value of the slider. */\n @Prop({ reflect: true }) max = 100;\n\n /** A number representing the min value of the slider. */\n @Prop({ reflect: true }) min = 0;\n\n /** Name of the form control. Submitted with the form as part of a name/value pair */\n @Prop({ reflect: true }) name: string;\n\n /**\n * A number representing the step of the slider.\n * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.\n */\n @Prop({ reflect: true }) step = 1;\n\n /** It defines the type of slider to display */\n @Prop({ reflect: true }) type: TSliderType = 'single';\n\n /**\n * The value of the slider.\n * - If the slider type is `single`, the value is a number.\n * - If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value).\n */\n @Prop({ reflect: true, mutable: true }) value: TSliderValue;\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /**\n * If `true`, a tooltip will always display the progress value.\n * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n */\n @Prop({ reflect: true }) tooltipAlwaysVisible: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValuePropChange(newValue: TSliderValue) {\n this.setState(newValue);\n this.emitBqChange();\n }\n\n @Watch('step')\n handleStepPropChange() {\n this.minValue = Math.round(this.minValue / this.step) * this.step;\n this.maxValue = Math.round(this.maxValue / this.step) * this.step;\n }\n\n @Watch('gap')\n handleGapChange(newValue: number) {\n if (!this.isRangeType) return;\n // Use the this.value prop value when the component is initialized\n // Otherwise, use the current this.min and this.max state values\n const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);\n // If the gap is less than the min or greater than the max, set it to 0\n this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when change the value on range inputs */\n @Event() bqChange: EventEmitter<{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }>;\n\n /** Handler to be called when the slider loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSliderElement>;\n\n /** Handler to be called when the slider gets focused */\n @Event() bqFocus: EventEmitter<HTMLBqSliderElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.init();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\n }\n\n formAssociatedCallback() {\n this.internals?.setFormValue(`${this.value}`);\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 init = () => {\n this.handleGapChange(this.gap);\n this.setState(this.value);\n this.handleStepPropChange();\n };\n\n private runUpdates = () => {\n this.updateProgressTrack();\n this.syncInputsValue();\n this.setThumbPosition();\n };\n\n private setState = (newValue: TSliderValue) => {\n const isRangeType = this.isRangeType;\n const value = this.stringToObject(newValue);\n\n this.minValue = isRangeType ? clamp(value[0], this.min, this.max - this.gap) : value;\n this.maxValue = isRangeType ? clamp(value[1], this.minValue + this.gap, this.max) : this.minValue;\n };\n\n private setThumbPosition = () => {\n if (!this.enableTooltip) return;\n\n // Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition\n ({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());\n };\n\n private syncInputsValue = () => {\n this.inputMinElem?.setAttribute('value', this.minValue.toString());\n this.inputMaxElem?.setAttribute('value', this.maxValue.toString());\n };\n\n private stringToObject = (value: TSliderValue) => (isString(value) ? JSON.parse(value) : value);\n\n private handleInputChange = (type: 'min' | 'max', event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n const value = parseFloat(target.value);\n\n if (type === 'min') {\n this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;\n } else if (type === 'max') {\n this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;\n }\n\n // Update the input value to reflect the clamped value\n const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();\n target.value = reflectedValue;\n target.setAttribute('value', reflectedValue);\n\n // Sync the prop value.\n // This will trigger the `@Watch('value')` method and emit the `bqChange` event.\n const { internals, isRangeType, maxValue, minValue } = this;\n this.value = isRangeType ? [minValue, maxValue] : minValue;\n internals?.setFormValue(isRangeType ? JSON.stringify(this.value) : this.value.toString());\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return (value / totalRange) * 100;\n };\n\n private updateProgressTrack = () => {\n if (!this.progressElem) return;\n\n // For range type, left starts from the `min` value and width is the difference between `max` and `min`.\n // For non-range type, left starts from 0 and width is the `min` value.\n const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;\n const width = this.isRangeType\n ? this.calculatePercent(Number(this.maxValue) - Number(this.minValue))\n : this.calculatePercent(this.minValue);\n\n this.progressElem.style.insetInlineStart = `${left}%`;\n this.progressElem.style.inlineSize = `${width}%`;\n };\n\n private calculateThumbPosition = (value: number): number => {\n if (!this.progressElem) return;\n\n // Get the width of the track area and the size of the input range thumb\n const trackAreaWidth = this.trackElem.getBoundingClientRect().width;\n // We need to also add 4px to the thumb size,\n // this is because the thumb is 2px border (`border-m`)\n const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;\n const totalWidth = trackAreaWidth - inputThumbSize;\n\n return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;\n };\n\n private thumbPosition = (): { minThumbPosition: number; maxThumbPosition?: number } => {\n const minThumbPosition = this.calculateThumbPosition(this.minValue);\n const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;\n\n return { minThumbPosition, maxThumbPosition };\n };\n\n private emitBqChange = () => {\n this.debounceBqChange?.cancel();\n\n const value: Exclude<TSliderValue, string> = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);\n\n this.debounceBqChange();\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 handleMouseDown = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'remove');\n };\n\n private handleMouseUp = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'add');\n };\n\n private handleTooltipVisibility = (event: MouseEvent, action: 'add' | 'remove') => {\n if (!this.enableTooltip || this.tooltipAlwaysVisible) return;\n\n const target = event.target as HTMLElement;\n const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;\n tooltipElem.classList[action]('hidden');\n };\n\n private get decimalCount(): number {\n // Return the length of the decimal part of the step value.\n return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;\n }\n\n private get isRangeType() {\n return this.type === 'range';\n }\n\n private get isTooltipAlwaysVisible(): boolean {\n return this.tooltipAlwaysVisible && this.enableTooltip;\n }\n\n private renderLabel = (value: number, position: 'start' | 'end', css?: string) => {\n return (\n <span\n class={{\n [`${css} box-content block text-s font-medium leading-regular text-primary is-fit min-is-8 [font-variant:tabular-nums]`]:\n true,\n hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,\n }}\n part={`label-${position}`}\n >\n {value.toFixed(this.decimalCount)}\n </span>\n );\n };\n\n private renderInput = (type: 'max' | 'min', value: number, refCallback: (input: HTMLInputElement) => void) => {\n // Determine the zIndex value based on the type and the current min and max values.\n const zIndexValue = (type: 'min' | 'max'): string => {\n const zIndex = {\n min: this.minValue === this.min && this.maxValue === this.minValue,\n max: this.maxValue === this.max && this.minValue === this.maxValue,\n };\n\n // If the value of both thumbs is the same as the min or max value, set the zIndex to -1\n return zIndex[type] ? '-1' : '0';\n };\n\n return (\n <input\n type=\"range\"\n class={{\n 'absolute start-0 -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none is-full inset-bs-[50%] disabled:cursor-not-allowed':\n true,\n 'pointer-events-none': this.isRangeType,\n }}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n name={this.name}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute bs-1 is-1\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"relative is-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-slider.js","sourceRoot":"","sources":["../../../../../../src/components/slider/bq-slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGhH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AASH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,YAAY,CAAmB;IAC/B,YAAY,CAAmB;IAC/B,cAAc,CAAuB;IACrC,cAAc,CAAuB;IACrC,YAAY,CAAkB;IAC9B,SAAS,CAAkB;IAC3B,gBAAgB,CAAkB;IAE1C,iCAAiC;IACjC,sCAAsC;IAEnB,SAAS,CAAoB;IACrC,EAAE,CAAuB;IAEpC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAE1C;;;OAGG;IACM,QAAQ,CAAS;IAC1B,yEAAyE;IAChE,QAAQ,CAAS;IAC1B,gHAAgH;IACvG,gBAAgB,CAAS;IAClC,mGAAmG;IAC1F,gBAAgB,CAAS;IAElC,sBAAsB;IACtB,2BAA2B;IAE3B,4GAA4G;IACnF,YAAY,GAAG,CAAC,CAAC;IAE1C,wCAAwC;IACf,QAAQ,GAAI,KAAK,CAAC;IAE3C,gFAAgF;IACvD,oBAAoB,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C,CAAC;gBAEjG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F;YAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TSliderType, TSliderValue } from './bq-slider.types';\nimport { clamp, debounce, isNil, isString, TDebounce } from '../../shared/utils';\n\n/**\n * Sliders provide a visual representation of adjustable content, enabling users to change values by dragging a handle along a horizontal track.\n *\n * @example How to use it\n * ```html\n * <bq-slider max=\"100\" value=\"30\"></bq-slider>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/509cbc-slider/b/09d7b1\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait to trigger the bqChange event after each value change.\n * @attr {boolean} disabled - If `true` the slider is disabled.\n * @attr {boolean} enable-tooltip - If `true`, a tooltip will be shown displaying the progress value.\n * @attr {boolean} enable-value-indicator - If `true` it will show the value label on the side of the slider track area.\n * @attr {number} gap - A number representing the amount to remain between the minimum and maximum values (only for range type).\n * @attr {number} max - A number representing the max value of the slider.\n * @attr {number} min - A number representing the min value of the slider.\n * @attr {number} step - A number represents the step of the slider. ⚠️ Please notice that the value (or list of values if the slider type is range) will be rounded to the nearest multiple of step.\n * @attr {boolean} tooltip-always-visible - If `true`, a tooltip will always display the progress value. It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n * @attr {\"range\" | \"single\"} type - It defines the type of slider to display.\n * @attr {\"[number, number]\" | \"number\" | \"string\"} value - The value of the slider. If the slider type is single, the value is a number.\n * If the slider type is range, the value is an array of two numbers (the first number represents the min value and the second number represents the max value).\n *\n * @event bqBlur - Handler to be called when the slider loses focus.\n * @event bqChange - Handler to be called when changing the value on range inputs.\n * @event bqFocus - Handler to be called when the slider gets focused.\n *\n * @part base - The component's base wrapper.\n * @part container - The container of the slider.\n * @part track-area - The track area of the slider.\n * @part progress-area - The progress area of the slider.\n * @part input-min - The input element for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part input-max - The input element for the maximum value.\n * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part label-end - The label for maximum value when the slider type is `range`.\n *\n * @cssprop --bq-slider--size - The height of the slider track/progress area\n * @cssprop --bq-slider--border-radius - Slider border radius\n * @cssprop --bq-slider--thumb-size - Slider hover thumb size\n * @cssprop --bq-slider--progress-color - Slider progress background color\n * @cssprop --bq-slider--trackarea-color - Slider track background color\n */\n@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSlider {\n // Own Properties\n // ====================\n\n private inputMinElem: HTMLInputElement;\n private inputMaxElem: HTMLInputElement;\n private minTooltipElem: HTMLBqTooltipElement;\n private maxTooltipElem: HTMLBqTooltipElement;\n private progressElem: HTMLSpanElement;\n private trackElem: HTMLSpanElement;\n private debounceBqChange: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqSliderElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n /**\n * The `minValue` state is the only value when the slider type is `single`\n * and the minimum value when the slider type is `range`.\n */\n @State() minValue: number;\n /** The `maxValue` state is only used when the slider type is `range`. */\n @State() maxValue: number;\n /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */\n @State() minThumbPosition: number;\n /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */\n @State() maxThumbPosition: number;\n\n // Public Property API\n // ========================\n\n /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */\n @Prop({ reflect: true }) debounceTime = 0;\n\n /** If `true` the slider is disabled. */\n @Prop({ reflect: true }) disabled? = false;\n\n /** If `true` it will show the value label on a side of the slider track area */\n @Prop({ reflect: true }) enableValueIndicator? = false;\n\n /** A number representing the amount to remain between the minimum and maximum values (only for range type). */\n @Prop({ reflect: true, mutable: true }) gap = 0;\n\n /** A number representing the max value of the slider. */\n @Prop({ reflect: true }) max = 100;\n\n /** A number representing the min value of the slider. */\n @Prop({ reflect: true }) min = 0;\n\n /** Name of the form control. Submitted with the form as part of a name/value pair */\n @Prop({ reflect: true }) name: string;\n\n /**\n * A number representing the step of the slider.\n * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.\n */\n @Prop({ reflect: true }) step = 1;\n\n /** It defines the type of slider to display */\n @Prop({ reflect: true }) type: TSliderType = 'single';\n\n /**\n * The value of the slider.\n * - If the slider type is `single`, the value is a number.\n * - If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value).\n */\n @Prop({ reflect: true, mutable: true }) value: TSliderValue;\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /**\n * If `true`, a tooltip will always display the progress value.\n * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n */\n @Prop({ reflect: true }) tooltipAlwaysVisible: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValuePropChange(newValue: TSliderValue) {\n this.setState(newValue);\n this.emitBqChange();\n }\n\n @Watch('step')\n handleStepPropChange() {\n this.minValue = Math.round(this.minValue / this.step) * this.step;\n this.maxValue = Math.round(this.maxValue / this.step) * this.step;\n }\n\n @Watch('gap')\n handleGapChange(newValue: number) {\n if (!this.isRangeType) return;\n // Use the this.value prop value when the component is initialized\n // Otherwise, use the current this.min and this.max state values\n const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);\n // If the gap is less than the min or greater than the max, set it to 0\n this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when change the value on range inputs */\n @Event() bqChange: EventEmitter<{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }>;\n\n /** Handler to be called when the slider loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSliderElement>;\n\n /** Handler to be called when the slider gets focused */\n @Event() bqFocus: EventEmitter<HTMLBqSliderElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.init();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\n }\n\n formAssociatedCallback() {\n this.internals?.setFormValue(`${this.value}`);\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 init = () => {\n this.handleGapChange(this.gap);\n this.setState(this.value);\n this.handleStepPropChange();\n };\n\n private runUpdates = () => {\n this.updateProgressTrack();\n this.syncInputsValue();\n this.setThumbPosition();\n };\n\n private setState = (newValue: TSliderValue) => {\n const isRangeType = this.isRangeType;\n const value = this.stringToObject(newValue);\n\n this.minValue = isRangeType ? clamp(value[0], this.min, this.max - this.gap) : value;\n this.maxValue = isRangeType ? clamp(value[1], this.minValue + this.gap, this.max) : this.minValue;\n };\n\n private setThumbPosition = () => {\n if (!this.enableTooltip) return;\n\n // Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition\n ({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());\n };\n\n private syncInputsValue = () => {\n this.inputMinElem?.setAttribute('value', this.minValue.toString());\n this.inputMaxElem?.setAttribute('value', this.maxValue.toString());\n };\n\n private stringToObject = (value: TSliderValue) => (isString(value) ? JSON.parse(value) : value);\n\n private handleInputChange = (type: 'min' | 'max', event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n const value = parseFloat(target.value);\n\n if (type === 'min') {\n this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;\n } else if (type === 'max') {\n this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;\n }\n\n // Update the input value to reflect the clamped value\n const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();\n target.value = reflectedValue;\n target.setAttribute('value', reflectedValue);\n\n // Sync the prop value.\n // This will trigger the `@Watch('value')` method and emit the `bqChange` event.\n const { internals, isRangeType, maxValue, minValue } = this;\n this.value = isRangeType ? [minValue, maxValue] : minValue;\n internals?.setFormValue(isRangeType ? JSON.stringify(this.value) : this.value.toString());\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return (value / totalRange) * 100;\n };\n\n private updateProgressTrack = () => {\n if (!this.progressElem) return;\n\n // For range type, left starts from the `min` value and width is the difference between `max` and `min`.\n // For non-range type, left starts from 0 and width is the `min` value.\n const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;\n const width = this.isRangeType\n ? this.calculatePercent(Number(this.maxValue) - Number(this.minValue))\n : this.calculatePercent(this.minValue);\n\n this.progressElem.style.insetInlineStart = `${left}%`;\n this.progressElem.style.inlineSize = `${width}%`;\n };\n\n private calculateThumbPosition = (value: number): number => {\n if (!this.progressElem) return;\n\n // Get the width of the track area and the size of the input range thumb\n const trackAreaWidth = this.trackElem.getBoundingClientRect().width;\n // We need to also add 4px to the thumb size,\n // this is because the thumb is 2px border (`border-m`)\n const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;\n const totalWidth = trackAreaWidth - inputThumbSize;\n\n return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;\n };\n\n private thumbPosition = (): { minThumbPosition: number; maxThumbPosition?: number } => {\n const minThumbPosition = this.calculateThumbPosition(this.minValue);\n const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;\n\n return { minThumbPosition, maxThumbPosition };\n };\n\n private emitBqChange = () => {\n this.debounceBqChange?.cancel();\n\n const value: Exclude<TSliderValue, string> = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);\n\n this.debounceBqChange();\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 handleMouseDown = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'remove');\n };\n\n private handleMouseUp = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'add');\n };\n\n private handleTooltipVisibility = (event: MouseEvent, action: 'add' | 'remove') => {\n if (!this.enableTooltip || this.tooltipAlwaysVisible) return;\n\n const target = event.target as HTMLElement;\n const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;\n tooltipElem.classList[action]('hidden');\n };\n\n private get decimalCount(): number {\n // Return the length of the decimal part of the step value.\n return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;\n }\n\n private get isRangeType() {\n return this.type === 'range';\n }\n\n private get isTooltipAlwaysVisible(): boolean {\n return this.tooltipAlwaysVisible && this.enableTooltip;\n }\n\n private renderLabel = (value: number, position: 'start' | 'end', css?: string) => {\n return (\n <span\n class={{\n [`${css} box-content block text-s font-medium leading-regular text-primary is-fit min-is-8 [font-variant:tabular-nums]`]:\n true,\n hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,\n }}\n part={`label-${position}`}\n >\n {value.toFixed(this.decimalCount)}\n </span>\n );\n };\n\n private renderInput = (type: 'max' | 'min', value: number, refCallback: (input: HTMLInputElement) => void) => {\n // Determine the zIndex value based on the type and the current min and max values.\n const zIndexValue = (type: 'min' | 'max'): string => {\n const zIndex = {\n min: this.minValue === this.min && this.maxValue === this.minValue,\n max: this.maxValue === this.max && this.minValue === this.maxValue,\n };\n\n // If the value of both thumbs is the same as the min or max value, set the zIndex to -1\n return zIndex[type] ? '-1' : '0';\n };\n\n return (\n <input\n type=\"range\"\n class={{\n 'absolute start-0 -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none is-full inset-bs-[50%] disabled:cursor-not-allowed':\n true,\n 'pointer-events-none': this.isRangeType,\n }}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n name={this.name}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute bs-1 is-1\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"relative is-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"]}
@@ -40,14 +40,6 @@ import { getCSSVariableValue, getTextContent, hasSlotContent, isHTMLElement, isN
40
40
  * @cssprop --bq-spinner--text-lineHeight - Spinner text line height
41
41
  */
42
42
  export class BqSpinner {
43
- constructor() {
44
- this.hasIconSlot = false;
45
- this.hasSlot = false;
46
- this.slotContentLength = 0;
47
- this.animation = true;
48
- this.textPosition = 'none';
49
- this.size = 'medium';
50
- }
51
43
  // Own Properties
52
44
  // ====================
53
45
  iconSlotElem;
@@ -59,6 +51,20 @@ export class BqSpinner {
59
51
  // Reference to host HTML element
60
52
  // ===================================
61
53
  el;
54
+ // State() variables
55
+ // Inlined decorator, alphabetical order
56
+ // =======================================
57
+ hasIconSlot = false;
58
+ hasSlot = false;
59
+ slotContentLength = 0;
60
+ // Public Property API
61
+ // ========================
62
+ /** If `false`, the animation on the icon element will be stopped */
63
+ animation = true;
64
+ /** It defines the position of the label text */
65
+ textPosition = 'none';
66
+ /** It defines the size of the icon element displayed */
67
+ size = 'medium';
62
68
  // Prop lifecycle events
63
69
  // =======================
64
70
  handleTextPositionProp() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-spinner.js","sourceRoot":"","sources":["../../../../../../src/components/spinner/bq-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAsC,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,aAAa,EACb,KAAK,EACL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAMH,MAAM,OAAO,SAAS;;2BAoBW,KAAK;uBACT,KAAK;iCACK,CAAC;yBAMA,IAAI;4BAGoB,MAAM;oBAGtB,QAAQ;;IAjCtD,iBAAiB;IACjB,uBAAuB;IAEf,YAAY,CAAc;IAC1B,QAAQ,CAAc;IACtB,QAAQ,GAAqB,IAAI,gBAAgB,CAAC,C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tB,SAAS,EAAE,CAAC,IAAI,CAAC,WAAW;iBAC7B,EACD,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EACjD,IAAI,EAAC,aAAa;gBAElB,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,GAAI,CACxD;YACP,6DACE,KAAK,EAAE;oBACL,2DAA2D,EAAE,IAAI;oBACjE,SAAS,EAAE,CAAC,IAAI,CAAC,eAAe;iBACjC,EACD,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAE7C,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACxC,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { SPINNER_SIZE, SPINNER_TEXT_POSITION, TSpinnerSize, TSpinnerTextPosition } from './bq-spinner.types';\nimport {\n getCSSVariableValue,\n getTextContent,\n hasSlotContent,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\n\n/**\n * Spinners are designed for users to display data loading.\n *\n * @example How to use it\n * ```html\n * <bq-spinner size=\"medium\" text-position=\"bellow\">\n * <span>Loading...</span>\n * </bq-spinner>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/275f10-spinner/b/09d7b1\n * @status stable\n *\n * @attr {boolean} animation - If `false`, the animation on the icon element will be stopped.\n * @attr {\"small\" | \"medium\" | \"large\"} size - It defines the size of the icon element displayed.\n * @attr {\"above\" | \"below\" | \"left\" | \"right\" | \"none\"} text-position - It defines the position of the label text.\n *\n * @slot icon - The icon slot container.\n * @slot - The content of the spinner component.\n *\n * @part base - The div wrapper container used under the hood.\n * @part icon - The `<svg>` icon element used to spin/animate.\n * @part custom-icon - The `<span>` tag element that holds the custom icon element passed.\n * @part text - The `<span>` tag element that renders the label text inside the component.\n *\n * @cssprop --bq-spinner--color - Spinner color\n * @cssprop --bq-spinner--size-large - Spinner large size\n * @cssprop --bq-spinner--size-medium - Spinner medium size\n * @cssprop --bq-spinner--size-small - Spinner small size\n * @cssprop --bq-spinner--large-text-fontSize - Spinner large text font size\n * @cssprop --bq-spinner--medium-text-fontSize - Spinner medium text font size\n * @cssprop --bq-spinner--small-text-fontSize - Spinner small text font size\n * @cssprop --bq-spinner--text-lineHeight - Spinner text line height\n */\n@Component({\n tag: 'bq-spinner',\n styleUrl: './scss/bq-spinner.scss',\n shadow: true,\n})\nexport class BqSpinner {\n // Own Properties\n // ====================\n\n private iconSlotElem: HTMLElement;\n private slotElem: HTMLElement;\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.slotContentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSpinnerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasIconSlot = false;\n @State() private hasSlot = false;\n @State() private slotContentLength = 0;\n\n // Public Property API\n // ========================\n\n /** If `false`, the animation on the icon element will be stopped */\n @Prop({ reflect: true }) animation? = true;\n\n /** It defines the position of the label text */\n @Prop({ reflect: true }) textPosition: TSpinnerTextPosition = 'none';\n\n /** It defines the size of the icon element displayed */\n @Prop({ reflect: true }) size: TSpinnerSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('textPosition')\n handleTextPositionProp() {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n }\n\n @Watch('size')\n handleSizeProp() {\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n this.setIconSize();\n }\n\n @Watch('hasIconSlot')\n handleHasIconSlot() {\n this.setIconSize();\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.checkPropValues();\n }\n\n componentDidLoad() {\n this.setIconSize();\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 handleSlotChange = () => {\n if (!this.slotElem) return;\n\n this.hasSlot = hasSlotContent(this.slotElem);\n if (!this.hasSlot) return;\n\n const slot = this.slotElem.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.slotContentLength = getTextContent(slot, { recurse: true }).length;\n const nodes = slot.assignedNodes({ flatten: true });\n nodes.forEach((node) => {\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n });\n };\n\n private handleIconSlotChange = (): void => {\n this.hasIconSlot = hasSlotContent(this.iconSlotElem, 'icon');\n };\n\n private checkPropValues = (): void => {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n };\n\n private get isTextDisplayed(): boolean {\n return this.textPosition !== 'none';\n }\n\n private setIconSize(): void {\n if (!this.hasIconSlot || !this.bqIcon) return;\n\n this.bqIcon.size = parseInt(getCSSVariableValue(`bq-spinner--size-${this.size}`, this.el)).toString();\n }\n\n private get bqIcon(): HTMLBqIconElement | null {\n if (!this.hasIconSlot) return null;\n\n const slot = this.iconSlotElem.querySelector('slot');\n\n return [...slot.assignedElements({ flatten: true })].filter((el: Element) =>\n isHTMLElement(el, 'bq-icon'),\n )[0] as HTMLBqIconElement;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n [`bq-spinner ${this.size} text-${this.textPosition}`]: true,\n 'is-animated': this.animation,\n 'has-text': !!this.slotContentLength,\n }}\n part=\"base\"\n >\n {!this.hasIconSlot && (\n <div\n class={`bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`}\n aria-label=\"Loading...\"\n role=\"status\"\n >\n <svg class=\"bs-full is-full\" fill=\"currentColor\" viewBox=\"0 0 48 48\">\n <path\n fill=\"currentColor\"\n d=\"M10.27 7.637c-.937-1.117-.798-2.796.415-3.605a24 24 0 0 1 37.09 23.249c-.2 1.444-1.65 2.301-3.064 1.944-1.414-.356-2.25-1.793-2.096-3.242A18.72 18.72 0 0 0 14.102 8.11c-1.237.77-2.895.643-3.832-.474Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M48 24c0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0s24 10.745 24 24ZM5.28 24c0 10.339 8.381 18.72 18.72 18.72 10.339 0 18.72-8.381 18.72-18.72 0-10.339-8.381-18.72-18.72-18.72C13.661 5.28 5.28 13.661 5.28 24Z\"\n opacity=\".1\"\n />\n </svg>\n </div>\n )}\n <span\n class={{\n 'bq-spinner--icon': true,\n flex: this.hasIconSlot,\n '!hidden': !this.hasIconSlot,\n }}\n ref={(spanElem) => (this.iconSlotElem = spanElem)}\n part=\"custom-icon\"\n >\n <slot name=\"icon\" onSlotchange={this.handleIconSlotChange} />\n </span>\n <span\n class={{\n 'bq-spinner--text font-medium leading-regular text-primary': true,\n '!hidden': !this.isTextDisplayed,\n }}\n part=\"text\"\n ref={(spanElem) => (this.slotElem = spanElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-spinner.js","sourceRoot":"","sources":["../../../../../../src/components/spinner/bq-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { SPINNER_SIZE, SPINNER_TEXT_POSITION, TSpinnerSize, TSpinnerTextPosition } from './bq-spinner.types';\nimport {\n getCSSVariableValue,\n getTextContent,\n hasSlotContent,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\n\n/**\n * Spinners are designed for users to display data loading.\n *\n * @example How to use it\n * ```html\n * <bq-spinner size=\"medium\" text-position=\"bellow\">\n * <span>Loading...</span>\n * </bq-spinner>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/275f10-spinner/b/09d7b1\n * @status stable\n *\n * @attr {boolean} animation - If `false`, the animation on the icon element will be stopped.\n * @attr {\"small\" | \"medium\" | \"large\"} size - It defines the size of the icon element displayed.\n * @attr {\"above\" | \"below\" | \"left\" | \"right\" | \"none\"} text-position - It defines the position of the label text.\n *\n * @slot icon - The icon slot container.\n * @slot - The content of the spinner component.\n *\n * @part base - The div wrapper container used under the hood.\n * @part icon - The `<svg>` icon element used to spin/animate.\n * @part custom-icon - The `<span>` tag element that holds the custom icon element passed.\n * @part text - The `<span>` tag element that renders the label text inside the component.\n *\n * @cssprop --bq-spinner--color - Spinner color\n * @cssprop --bq-spinner--size-large - Spinner large size\n * @cssprop --bq-spinner--size-medium - Spinner medium size\n * @cssprop --bq-spinner--size-small - Spinner small size\n * @cssprop --bq-spinner--large-text-fontSize - Spinner large text font size\n * @cssprop --bq-spinner--medium-text-fontSize - Spinner medium text font size\n * @cssprop --bq-spinner--small-text-fontSize - Spinner small text font size\n * @cssprop --bq-spinner--text-lineHeight - Spinner text line height\n */\n@Component({\n tag: 'bq-spinner',\n styleUrl: './scss/bq-spinner.scss',\n shadow: true,\n})\nexport class BqSpinner {\n // Own Properties\n // ====================\n\n private iconSlotElem: HTMLElement;\n private slotElem: HTMLElement;\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.slotContentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSpinnerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasIconSlot = false;\n @State() private hasSlot = false;\n @State() private slotContentLength = 0;\n\n // Public Property API\n // ========================\n\n /** If `false`, the animation on the icon element will be stopped */\n @Prop({ reflect: true }) animation? = true;\n\n /** It defines the position of the label text */\n @Prop({ reflect: true }) textPosition: TSpinnerTextPosition = 'none';\n\n /** It defines the size of the icon element displayed */\n @Prop({ reflect: true }) size: TSpinnerSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('textPosition')\n handleTextPositionProp() {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n }\n\n @Watch('size')\n handleSizeProp() {\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n this.setIconSize();\n }\n\n @Watch('hasIconSlot')\n handleHasIconSlot() {\n this.setIconSize();\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.checkPropValues();\n }\n\n componentDidLoad() {\n this.setIconSize();\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 handleSlotChange = () => {\n if (!this.slotElem) return;\n\n this.hasSlot = hasSlotContent(this.slotElem);\n if (!this.hasSlot) return;\n\n const slot = this.slotElem.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.slotContentLength = getTextContent(slot, { recurse: true }).length;\n const nodes = slot.assignedNodes({ flatten: true });\n nodes.forEach((node) => {\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n });\n };\n\n private handleIconSlotChange = (): void => {\n this.hasIconSlot = hasSlotContent(this.iconSlotElem, 'icon');\n };\n\n private checkPropValues = (): void => {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n };\n\n private get isTextDisplayed(): boolean {\n return this.textPosition !== 'none';\n }\n\n private setIconSize(): void {\n if (!this.hasIconSlot || !this.bqIcon) return;\n\n this.bqIcon.size = parseInt(getCSSVariableValue(`bq-spinner--size-${this.size}`, this.el)).toString();\n }\n\n private get bqIcon(): HTMLBqIconElement | null {\n if (!this.hasIconSlot) return null;\n\n const slot = this.iconSlotElem.querySelector('slot');\n\n return [...slot.assignedElements({ flatten: true })].filter((el: Element) =>\n isHTMLElement(el, 'bq-icon'),\n )[0] as HTMLBqIconElement;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n [`bq-spinner ${this.size} text-${this.textPosition}`]: true,\n 'is-animated': this.animation,\n 'has-text': !!this.slotContentLength,\n }}\n part=\"base\"\n >\n {!this.hasIconSlot && (\n <div\n class={`bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`}\n aria-label=\"Loading...\"\n role=\"status\"\n >\n <svg class=\"bs-full is-full\" fill=\"currentColor\" viewBox=\"0 0 48 48\">\n <path\n fill=\"currentColor\"\n d=\"M10.27 7.637c-.937-1.117-.798-2.796.415-3.605a24 24 0 0 1 37.09 23.249c-.2 1.444-1.65 2.301-3.064 1.944-1.414-.356-2.25-1.793-2.096-3.242A18.72 18.72 0 0 0 14.102 8.11c-1.237.77-2.895.643-3.832-.474Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M48 24c0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0s24 10.745 24 24ZM5.28 24c0 10.339 8.381 18.72 18.72 18.72 10.339 0 18.72-8.381 18.72-18.72 0-10.339-8.381-18.72-18.72-18.72C13.661 5.28 5.28 13.661 5.28 24Z\"\n opacity=\".1\"\n />\n </svg>\n </div>\n )}\n <span\n class={{\n 'bq-spinner--icon': true,\n flex: this.hasIconSlot,\n '!hidden': !this.hasIconSlot,\n }}\n ref={(spanElem) => (this.iconSlotElem = spanElem)}\n part=\"custom-icon\"\n >\n <slot name=\"icon\" onSlotchange={this.handleIconSlotChange} />\n </span>\n <span\n class={{\n 'bq-spinner--text font-medium leading-regular text-primary': true,\n '!hidden': !this.isTextDisplayed,\n }}\n part=\"text\"\n ref={(spanElem) => (this.slotElem = spanElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n );\n }\n}\n"]}
@@ -29,14 +29,18 @@ import { validatePropValue } from "../../shared/utils";
29
29
  * @cssprop --bq-status-circ - Status circle size.
30
30
  */
31
31
  export class BqStatus {
32
- constructor() {
33
- this.type = 'neutral';
34
- }
35
32
  // Own Properties
36
33
  // ====================
37
34
  // Reference to host HTML element
38
35
  // ===================================
39
36
  el;
37
+ // State() variables
38
+ // Inlined decorator, alphabetical order
39
+ // =======================================
40
+ // Public Property API
41
+ // ========================
42
+ /** It defines the type of status to display */
43
+ type = 'neutral';
40
44
  // Prop lifecycle events
41
45
  // =======================
42
46
  checkPropValues() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-status.js","sourceRoot":"","sources":["../../../../../../src/components/status/bq-status.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAMH,MAAM,OAAO,QAAQ;;oBAgB0B,SAAS;;IAftD,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAC3B,EAAE,CAAuB;IAYpC,wBAAwB;IACxB,0BAA0B;IAE1B,eAAe;QACb,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IACD,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IACD,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;IACtC,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ;YAC9E,iEAAU,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,GAAG;YACzG,4DACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM;gBAEX,8DAAQ,CACJ,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STATUS_TYPE, TStatusType } from './bq-status.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Status Component is a UI element that represents the current state or condition of an item, task, or process.\n *\n * @example How to use it\n * ```html\n * <bq-status type=\"alert\">Alert status</bq-status>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/46c8d5-status/b/09d7b1\n * @status stable\n *\n * @dependency bq-badge\n *\n * @attr {\"alert\" | \"danger\" | \"info\" | \"neutral\" | \"success\"} type - It defines the type of status to display.\n *\n * @slot The content of the status component.\n *\n * @part base - The component's internal wrapper of the status component.\n * @part circle - The colored circle that marks the status type.\n * @part text - The `<div>` container that holds the text label of the status component.\n *\n * @cssprop --bq-status-circ - Status circle size.\n */\n@Component({\n tag: 'bq-status',\n styleUrl: './scss/bq-status.scss',\n shadow: true,\n})\nexport class BqStatus {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStatusElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines the type of status to display */\n @Prop({ reflect: true }) type: TStatusType = 'neutral';\n\n // Prop lifecycle events\n // =======================\n @Watch('type')\n checkPropValues() {\n validatePropValue(STATUS_TYPE, 'neutral', this.el, 'type');\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.checkPropValues();\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 render() {\n return (\n <div class=\"bq-status inline-flex items-center gap-xs\" part=\"base\" role=\"status\">\n <bq-badge class={`bq-status__circle rounded-full ${this.type}`} size=\"medium\" part=\"circle\" role=\"img\" />\n <div\n class=\"bq-status__text text-s font-medium leading-regular text-primary max-bs-[20px] p-b-0 p-i-0 m-b-0 m-i-0\"\n part=\"text\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-status.js","sourceRoot":"","sources":["../../../../../../src/components/status/bq-status.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EA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7G,IAAI,EAAC,MAAM;gBAEX,8DAAQ,CACJ,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STATUS_TYPE, TStatusType } from './bq-status.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Status Component is a UI element that represents the current state or condition of an item, task, or process.\n *\n * @example How to use it\n * ```html\n * <bq-status type=\"alert\">Alert status</bq-status>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/46c8d5-status/b/09d7b1\n * @status stable\n *\n * @dependency bq-badge\n *\n * @attr {\"alert\" | \"danger\" | \"info\" | \"neutral\" | \"success\"} type - It defines the type of status to display.\n *\n * @slot The content of the status component.\n *\n * @part base - The component's internal wrapper of the status component.\n * @part circle - The colored circle that marks the status type.\n * @part text - The `<div>` container that holds the text label of the status component.\n *\n * @cssprop --bq-status-circ - Status circle size.\n */\n@Component({\n tag: 'bq-status',\n styleUrl: './scss/bq-status.scss',\n shadow: true,\n})\nexport class BqStatus {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStatusElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines the type of status to display */\n @Prop({ reflect: true }) type: TStatusType = 'neutral';\n\n // Prop lifecycle events\n // =======================\n @Watch('type')\n checkPropValues() {\n validatePropValue(STATUS_TYPE, 'neutral', this.el, 'type');\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.checkPropValues();\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 render() {\n return (\n <div class=\"bq-status inline-flex items-center gap-xs\" part=\"base\" role=\"status\">\n <bq-badge class={`bq-status__circle rounded-full ${this.type}`} size=\"medium\" part=\"circle\" role=\"img\" />\n <div\n class=\"bq-status__text text-s font-medium leading-regular text-primary max-bs-[20px] p-b-0 p-i-0 m-b-0 m-i-0\"\n part=\"text\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"]}
@@ -44,16 +44,22 @@ import { STEPS_SIZE } from "../steps/bq-steps.types";
44
44
  * @cssprop --bq-step-item--prefix-num-bg-color - Background color of the prefix number
45
45
  */
46
46
  export class BqStepItem {
47
- constructor() {
48
- this.size = 'medium';
49
- this.status = 'default';
50
- this.type = undefined;
51
- }
52
47
  // Own Properties
53
48
  // ====================
54
49
  // Reference to host HTML element
55
50
  // ===================================
56
51
  el;
52
+ // State() variables
53
+ // Inlined decorator, alphabetical order
54
+ // =======================================
55
+ // Public Property API
56
+ // ========================
57
+ /** It defines prefix size */
58
+ size = 'medium';
59
+ /** It defines step item appearance based on its status */
60
+ status = 'default';
61
+ /** It defines the step item type used */
62
+ type;
57
63
  // Prop lifecycle events
58
64
  // =======================
59
65
  checkPropValues() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-step-item.js","sourceRoot":"","sources":["../../../../../../src/components/step-item/bq-step-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,UAAU,EAA0B,MAAM,yBAAyB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAMH,MAAM,OAAO,UAAU;;oBAgBwB,Q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ent":["import { Component, Element, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\n\nimport { STEP_ITEM_STATUS, TStepItemStatus } from './bq-step-item.types';\nimport { isHTMLElement, validatePropValue } from '../../shared/utils';\nimport { STEPS_SIZE, TStepsSize, TStepsType } from '../steps/bq-steps.types';\n\n/**\n * The Step Item Component is a UI element used to display a single step or stage in a process or task.\n * It should be used inside the Steps component.\n *\n * @example How to use it\n * ```html\n * <bq-step-item status=\"completed\">\n * <bq-icon slot=\"prefix\" name=\"check-circle\"></bq-icon>\n * <span>Title</span>\n * <span slot=\"description\">Description</span>\n * </bq-step-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @attr {\"small\" | \"medium\"} size - It defines prefix size\n * @attr {\"completed\" | \"current\" | \"error\" | \"default\" | \"disabled\"} status - It defines step item appearance based on its status\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - It defines the step item type used\n *\n * @event bqClick - Callback handler emitted when the step item is clicked\n *\n * @slot - The step item content\n * @slot prefix - The step item prefix\n * @slot description - The step item description\n *\n * @part base - The component's base wrapper.\n * @part title - The component's title.\n * @part description - The component's description.\n *\n * @cssprop --bq-step-item--prefix-color - Color of the prefix icon\n * @cssprop --bq-step-item--prefix-color-current - Color of the prefix icon when current\n * @cssprop --bq-step-item--prefix-color-completed - Color of the prefix icon when completed\n * @cssprop --bq-step-item--prefix-color-error - Color of the prefix icon when error\n * @cssprop --bq-step-item--prefix-num-size - Size of the prefix number\n * @cssprop --bq-step-item--prefix-num-bg-color - Background color of the prefix number\n */\n@Component({\n tag: 'bq-step-item',\n styleUrl: './scss/bq-step-item.scss',\n shadow: true,\n})\nexport class BqStepItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStepItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines prefix size */\n @Prop({ reflect: true }) size?: TStepsSize = 'medium';\n\n /** It defines step item appearance based on its status */\n @Prop({ reflect: true }) status?: TStepItemStatus = 'default';\n\n /** It defines the step item type used */\n @Prop({ reflect: true }) type?: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('status')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEP_ITEM_STATUS, 'default', this.el, 'status');\n\n this.handleIconPrefix();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the step item is clicked */\n @Event() bqClick: EventEmitter<{ target: HTMLBqStepItemElement; value: string }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.checkPropValues();\n }\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleIconPrefix();\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 get isDisabled(): boolean {\n return this.status === 'disabled';\n }\n\n private get isCurrent(): boolean {\n return this.status === 'current';\n }\n\n private handleIconPrefix = () => {\n const iconElem = this.el.querySelector('[slot=\"prefix\"]');\n if (!iconElem || !isHTMLElement(iconElem, 'bq-icon')) return;\n\n iconElem.size = this.size === 'small' ? 24 : 32;\n iconElem.weight = this.isCurrent ? 'fill' : 'regular';\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n 'bq-step-item flex gap-s': true,\n [`bq-step-item--${this.status}`]: true,\n 'pointer-events-none opacity-60': this.isDisabled,\n }}\n part=\"base\"\n >\n <div class={`bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}`}>\n <slot name=\"prefix\" onSlotchange={this.handleIconPrefix} />\n </div>\n <div class=\"bq-step-item__content\">\n {/* TITLE */}\n <div\n class={{\n 'bq-step-item__content--title pe-xs3 text-m leading-regular text-primary': true,\n 'pointer-events-none': this.isDisabled,\n 'text-brand': this.isCurrent,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n {/* DESCRIPTION */}\n <div\n class={{\n 'bq-step-item__content--description text-s leading-regular opacity-60': true,\n 'opacity-60': this.isDisabled,\n }}\n part=\"description\"\n >\n <slot name=\"description\" />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-step-item.js","sourceRoot":"","sources":["../../../../../../src/components/step-item/bq-step-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,UAAU,EAA0B,MAAM,yBAAyB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAMH,MAAM,OAAO,UAAU;IACrB,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAC3B,EAAE,CAAyB;IAEtC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAE1C,sBAAsB;IACtB,2BAA2B;IAE3B,6BAA6B;IACJ,IAAI,GAAgB,QAAQ,CAAC;IAEtD,0DAA0D;IACjC,MAAM,GAAqB,SAAS,CAAC;IAE9D,yCAAyC;IAChB,IAAI,CAAc;IAE3C,wBAAwB;IACxB,0BAA0B;IAI1B,eAAe;QACb,iBAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QACzD,iBAAiB,CAAC,gBAAgB,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QAEl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,EAAE,IAAI;gBAC/B,CAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI;gBACtC,gCAAgC,EAAE,IAAI,CAAC,UAAU;aAClD,EACD,IAAI,EAAC,MAAM;YAEX,4DAAK,KAAK,EAAE,iCAAiC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;gBAClF,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD;YACN,4DAAK,KAAK,EAAC,uBAAuB;gBAEhC,4DACE,KAAK,EAAE;wBACL,yEAAyE,EAAE,IAAI;wBAC/E,qBAAqB,EAAE,IAAI,CAAC,UAAU;wBACtC,YAAY,EAAE,IAAI,CAAC,SAAS;qBAC7B,EACD,IAAI,EAAC,OAAO;oBAEZ,8DAAQ,CACJ;gBAEN,4DACE,KAAK,EAAE;wBACL,sEAAsE,EAAE,IAAI;wBAC5E,YAAY,EAAE,IAAI,CAAC,UAAU;qBAC9B,EACD,IAAI,EAAC,aAAa;oBAElB,6DAAM,IAAI,EAAC,aAAa,GAAG,CACvB,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\n\nimport { STEP_ITEM_STATUS, TStepItemStatus } from './bq-step-item.types';\nimport { isHTMLElement, validatePropValue } from '../../shared/utils';\nimport { STEPS_SIZE, TStepsSize, TStepsType } from '../steps/bq-steps.types';\n\n/**\n * The Step Item Component is a UI element used to display a single step or stage in a process or task.\n * It should be used inside the Steps component.\n *\n * @example How to use it\n * ```html\n * <bq-step-item status=\"completed\">\n * <bq-icon slot=\"prefix\" name=\"check-circle\"></bq-icon>\n * <span>Title</span>\n * <span slot=\"description\">Description</span>\n * </bq-step-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @attr {\"small\" | \"medium\"} size - It defines prefix size\n * @attr {\"completed\" | \"current\" | \"error\" | \"default\" | \"disabled\"} status - It defines step item appearance based on its status\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - It defines the step item type used\n *\n * @event bqClick - Callback handler emitted when the step item is clicked\n *\n * @slot - The step item content\n * @slot prefix - The step item prefix\n * @slot description - The step item description\n *\n * @part base - The component's base wrapper.\n * @part title - The component's title.\n * @part description - The component's description.\n *\n * @cssprop --bq-step-item--prefix-color - Color of the prefix icon\n * @cssprop --bq-step-item--prefix-color-current - Color of the prefix icon when current\n * @cssprop --bq-step-item--prefix-color-completed - Color of the prefix icon when completed\n * @cssprop --bq-step-item--prefix-color-error - Color of the prefix icon when error\n * @cssprop --bq-step-item--prefix-num-size - Size of the prefix number\n * @cssprop --bq-step-item--prefix-num-bg-color - Background color of the prefix number\n */\n@Component({\n tag: 'bq-step-item',\n styleUrl: './scss/bq-step-item.scss',\n shadow: true,\n})\nexport class BqStepItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStepItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines prefix size */\n @Prop({ reflect: true }) size?: TStepsSize = 'medium';\n\n /** It defines step item appearance based on its status */\n @Prop({ reflect: true }) status?: TStepItemStatus = 'default';\n\n /** It defines the step item type used */\n @Prop({ reflect: true }) type?: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('status')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEP_ITEM_STATUS, 'default', this.el, 'status');\n\n this.handleIconPrefix();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the step item is clicked */\n @Event() bqClick: EventEmitter<{ target: HTMLBqStepItemElement; value: string }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.checkPropValues();\n }\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleIconPrefix();\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 get isDisabled(): boolean {\n return this.status === 'disabled';\n }\n\n private get isCurrent(): boolean {\n return this.status === 'current';\n }\n\n private handleIconPrefix = () => {\n const iconElem = this.el.querySelector('[slot=\"prefix\"]');\n if (!iconElem || !isHTMLElement(iconElem, 'bq-icon')) return;\n\n iconElem.size = this.size === 'small' ? 24 : 32;\n iconElem.weight = this.isCurrent ? 'fill' : 'regular';\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n 'bq-step-item flex gap-s': true,\n [`bq-step-item--${this.status}`]: true,\n 'pointer-events-none opacity-60': this.isDisabled,\n }}\n part=\"base\"\n >\n <div class={`bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}`}>\n <slot name=\"prefix\" onSlotchange={this.handleIconPrefix} />\n </div>\n <div class=\"bq-step-item__content\">\n {/* TITLE */}\n <div\n class={{\n 'bq-step-item__content--title pe-xs3 text-m leading-regular text-primary': true,\n 'pointer-events-none': this.isDisabled,\n 'text-brand': this.isCurrent,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n {/* DESCRIPTION */}\n <div\n class={{\n 'bq-step-item__content--description text-s leading-regular opacity-60': true,\n 'opacity-60': this.isDisabled,\n }}\n part=\"description\"\n >\n <slot name=\"description\" />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
@@ -39,17 +39,23 @@ import { validatePropValue } from "../../shared/utils";
39
39
  * @cssprop --bq-steps--gap - Gap between steps
40
40
  */
41
41
  export class BqSteps {
42
- constructor() {
43
- this.dividerColor = 'stroke--primary';
44
- this.size = 'medium';
45
- this.type = undefined;
46
- }
47
42
  // Own Properties
48
43
  // ====================
49
44
  stepElem;
50
45
  // Reference to host HTML element
51
46
  // ===================================
52
47
  el;
48
+ // State() variables
49
+ // Inlined decorator, alphabetical order
50
+ // =======================================
51
+ // Public Property API
52
+ // ========================
53
+ /** The color of the line that connects the steps. It should be a valid declarative color token. */
54
+ dividerColor = 'stroke--primary';
55
+ /** The size of the steps */
56
+ size = 'medium';
57
+ /** The type of prefix element to use on the step items */
58
+ type;
53
59
  // Prop lifecycle events
54
60
  // =======================
55
61
  checkPropValues() {
@@ -1 +1 @@
1
- {"version":3,"file":"bq-steps.js","sourceRoot":"","sources":["../../../../../../src/components/steps/bq-steps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,UAAU,EAA0B,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,MAAM,OAAO,OAAO;;4BAmB8B,iBAAiB;oBAGrB,QAAQ;;;IArBpD,iBAAiB;IACjB,uBAAuB;IAEf,QAAQ,CAAc;IAE9B,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAsB;IAkBnC,wBAAwB;IACxB,0BAA0B;IAI1B,eAAe;QACb,iBAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QACzD,iBAAiB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAE1D,IAAI,CAAC,gBAAgB,EAAE,CAA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,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,WAAW;YAEhB,8DAAQ;YACR,mEACE,KAAK,EAAE,8CAA8C,iBAAiB,EAAE,EACxE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,CAAC,EAClB,WAAW,EAAC,2EAA2E,GACvF,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STEPS_SIZE, STEPS_TYPE, TStepsSize, TStepsType } from './bq-steps.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Steps Component is a UI element used to display a series of steps or stages in a process or task.\n * It is used to guide users through a process or task and to indicate their progress.\n *\n * @example How to use it\n * ```html\n * <bq-steps divider-color=\"stroke--primary\" type=\"dot\" size=\"medium\">\n * <bq-step-item status=\"completed\"> ... </bq-step-item>\n * <bq-step-item status=\"error\"> ... </bq-step-item>\n * <bq-step-item status=\"current\"> ... </bq-step-item>\n * <bq-step-item status=\"default\"> ... </bq-step-item>\n * </bq-steps>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @dependency bq-divider\n *\n * @attr {string} divider-color - The color of the line that connects the steps. It should be a valid declarative color token.\n * @attr {\"medium\" | \"small\"} size - The size of the steps\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - The type of prefix element to use on the step items\n *\n * @slot - The step items\n *\n * @part container - The container wrapper of the Steps component\n * @part divider-base - The base wrapper of the divider component\n * @part divider-dash-start - The dash start wrapper of the divider component\n * @part divider-dash-end - The dash end wrapper of the divider component\n *\n * @cssprop --bq-steps--divider-color - Divider color\n * @cssprop --bq-steps--gap - Gap between steps\n */\n@Component({\n tag: 'bq-steps',\n styleUrl: './scss/bq-steps.scss',\n shadow: true,\n})\nexport class BqSteps {\n // Own Properties\n // ====================\n\n private stepElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqStepsElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The color of the line that connects the steps. It should be a valid declarative color token. */\n @Prop({ reflect: true }) dividerColor: string = 'stroke--primary';\n\n /** The size of the steps */\n @Prop({ reflect: true }) size: TStepsSize = 'medium';\n\n /** The type of prefix element to use on the step items */\n @Prop({ reflect: true }) type: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n @Watch('size')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEPS_TYPE, 'numeric', this.el, 'type');\n\n this.setStepItemProps();\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 componentDidLoad() {\n this.setStepItemProps();\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 get bqSteps(): HTMLBqStepItemElement[] {\n if (!this.stepElem) return [];\n\n const slot = this.stepElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === 'bq-step-item',\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private setStepItemProps = () => {\n this.bqSteps.forEach((bqStepElem: HTMLBqStepItemElement) => {\n bqStepElem.size = this.size;\n bqStepElem.type = this.type;\n });\n };\n\n // private handleChange = (event) => {\n // this.bqChange.emit(event);\n // }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const dividerPaddingTop = this.size === 'small' ? 'p-bs-s' : 'p-bs-m';\n\n return (\n <div\n class=\"relative flex w-full items-start justify-between\"\n ref={(div) => (this.stepElem = div)}\n part=\"container\"\n >\n <slot />\n <bq-divider\n class={`absolute -z-10 p-i-s inset-ie-0 inset-is-0 ${dividerPaddingTop}`}\n strokeColor={this.dividerColor}\n strokeThickness={2}\n exportparts=\"base:divider-base,dash-start:divider-dash-start,dash-end:divider-dash-end\"\n />\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-steps.js","sourceRoot":"","sources":["../../../../../../src/components/steps/bq-steps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,UAAU,EAA0B,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,MAAM,OAAO,OAAO;IAClB,iBAAiB;IACjB,uBAAuB;IAEf,QAAQ,CAAc;IAE9B,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAsB;IAEnC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAE1C,sBAAsB;IACtB,2BAA2B;IAE3B,mGAAmG;IAC1E,YAAY,GAAW,iBAAiB,CAAC;IAElE,4BAA4B;IACH,IAAI,GAAe,QAAQ,CAAC;IAErD,0DAA0D;IACjC,IAAI,CAAa;IAE1C,wBAAwB;IACxB,0BAA0B;IAI1B,eAAe;QACb,iBAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QACzD,iBAAiB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAE1D,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAA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CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,WAAW;YAEhB,8DAAQ;YACR,mEACE,KAAK,EAAE,8CAA8C,iBAAiB,EAAE,EACxE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,CAAC,EAClB,WAAW,EAAC,2EAA2E,GACvF,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STEPS_SIZE, STEPS_TYPE, TStepsSize, TStepsType } from './bq-steps.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Steps Component is a UI element used to display a series of steps or stages in a process or task.\n * It is used to guide users through a process or task and to indicate their progress.\n *\n * @example How to use it\n * ```html\n * <bq-steps divider-color=\"stroke--primary\" type=\"dot\" size=\"medium\">\n * <bq-step-item status=\"completed\"> ... </bq-step-item>\n * <bq-step-item status=\"error\"> ... </bq-step-item>\n * <bq-step-item status=\"current\"> ... </bq-step-item>\n * <bq-step-item status=\"default\"> ... </bq-step-item>\n * </bq-steps>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @dependency bq-divider\n *\n * @attr {string} divider-color - The color of the line that connects the steps. It should be a valid declarative color token.\n * @attr {\"medium\" | \"small\"} size - The size of the steps\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - The type of prefix element to use on the step items\n *\n * @slot - The step items\n *\n * @part container - The container wrapper of the Steps component\n * @part divider-base - The base wrapper of the divider component\n * @part divider-dash-start - The dash start wrapper of the divider component\n * @part divider-dash-end - The dash end wrapper of the divider component\n *\n * @cssprop --bq-steps--divider-color - Divider color\n * @cssprop --bq-steps--gap - Gap between steps\n */\n@Component({\n tag: 'bq-steps',\n styleUrl: './scss/bq-steps.scss',\n shadow: true,\n})\nexport class BqSteps {\n // Own Properties\n // ====================\n\n private stepElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqStepsElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The color of the line that connects the steps. It should be a valid declarative color token. */\n @Prop({ reflect: true }) dividerColor: string = 'stroke--primary';\n\n /** The size of the steps */\n @Prop({ reflect: true }) size: TStepsSize = 'medium';\n\n /** The type of prefix element to use on the step items */\n @Prop({ reflect: true }) type: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n @Watch('size')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEPS_TYPE, 'numeric', this.el, 'type');\n\n this.setStepItemProps();\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 componentDidLoad() {\n this.setStepItemProps();\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 get bqSteps(): HTMLBqStepItemElement[] {\n if (!this.stepElem) return [];\n\n const slot = this.stepElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === 'bq-step-item',\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private setStepItemProps = () => {\n this.bqSteps.forEach((bqStepElem: HTMLBqStepItemElement) => {\n bqStepElem.size = this.size;\n bqStepElem.type = this.type;\n });\n };\n\n // private handleChange = (event) => {\n // this.bqChange.emit(event);\n // }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const dividerPaddingTop = this.size === 'small' ? 'p-bs-s' : 'p-bs-m';\n\n return (\n <div\n class=\"relative flex w-full items-start justify-between\"\n ref={(div) => (this.stepElem = div)}\n part=\"container\"\n >\n <slot />\n <bq-divider\n class={`absolute -z-10 p-i-s inset-ie-0 inset-is-0 ${dividerPaddingTop}`}\n strokeColor={this.dividerColor}\n strokeThickness={2}\n exportparts=\"base:divider-base,dash-start:divider-dash-start,dash-end:divider-dash-end\"\n />\n </div>\n );\n }\n}\n"]}
@@ -51,20 +51,6 @@ import { getTextContent, isNil } from "../../shared/utils";
51
51
  * @cssprop --bq-switch--dot-size - Switch dot size
52
52
  */
53
53
  export class BqSwitch {
54
- constructor() {
55
- this.hasLabel = false;
56
- this.backgroundOnHover = false;
57
- this.checked = false;
58
- this.disabled = false;
59
- this.formValidationMessage = undefined;
60
- this.fullWidth = false;
61
- this.innerLabel = 'default';
62
- this.justifyContent = 'start';
63
- this.name = undefined;
64
- this.required = false;
65
- this.reverseOrder = false;
66
- this.value = undefined;
67
- }
68
54
  // Own Properties
69
55
  // ====================
70
56
  labelElem;
@@ -74,6 +60,37 @@ export class BqSwitch {
74
60
  // ===================================
75
61
  internals;
76
62
  el;
63
+ // State() variables
64
+ // Inlined decorator, alphabetical order
65
+ // =======================================
66
+ hasLabel = false;
67
+ // Public Property API
68
+ // ========================
69
+ /** If true, a background will be displayed on hover */
70
+ backgroundOnHover = false;
71
+ /** It indicates whether if the switch is `ON` by default (when the page loads) */
72
+ checked = false;
73
+ /** If true, the switch control will be disabled and no interaction will be allowed */
74
+ disabled = false;
75
+ /** The native form validation message */
76
+ formValidationMessage;
77
+ /** If true, the component will take the full width space available on the parent container */
78
+ fullWidth = false;
79
+ /** It indicates how to to display the on/off marks inside the control, with icons or none (default) */
80
+ innerLabel = 'default';
81
+ /**
82
+ * It defines how to distribute the space between and around the control and the label text
83
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content)
84
+ */
85
+ justifyContent = 'start';
86
+ /** Name of the form control. Submitted with the form as part of a name/value pair */
87
+ name;
88
+ /** If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted */
89
+ required = false;
90
+ /** If true, the order of the control and the label text will be changed */
91
+ reverseOrder = false;
92
+ /** The input control's value, submitted as a name/value pair with form data. */
93
+ value;
77
94
  // Prop lifecycle events
78
95
  // =======================
79
96
  handleRequiredChange() {