@beeq/core 1.8.0-beta.15 → 1.8.0-beta.16

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 (587) 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-350cd07e.entry.js → p-026fad0d.entry.js} +2 -2
  5. package/dist/beeq/p-026fad0d.entry.js.map +1 -0
  6. package/dist/beeq/{p-457ab863.entry.js → p-09323635.entry.js} +2 -2
  7. package/dist/beeq/p-09323635.entry.js.map +1 -0
  8. package/dist/beeq/p-0c0bd129.entry.js +6 -0
  9. package/dist/beeq/p-0c0bd129.entry.js.map +1 -0
  10. package/dist/beeq/{p-0180a237.entry.js → p-0c12aa01.entry.js} +2 -2
  11. package/dist/beeq/p-0c12aa01.entry.js.map +1 -0
  12. package/dist/beeq/{p-be234206.entry.js → p-0f72dbb6.entry.js} +2 -2
  13. package/dist/beeq/p-0f72dbb6.entry.js.map +1 -0
  14. package/dist/beeq/{p-96793709.entry.js → p-19b7bbe0.entry.js} +2 -2
  15. package/dist/beeq/p-19b7bbe0.entry.js.map +1 -0
  16. package/dist/beeq/{p-a89bfbd8.entry.js → p-1b0cfcd6.entry.js} +2 -2
  17. package/dist/beeq/p-1b0cfcd6.entry.js.map +1 -0
  18. package/dist/beeq/{p-0711a447.entry.js → p-1cdea079.entry.js} +2 -2
  19. package/dist/beeq/p-1cdea079.entry.js.map +1 -0
  20. package/dist/beeq/{p-99668b08.entry.js → p-20d91acf.entry.js} +2 -2
  21. package/dist/beeq/p-20d91acf.entry.js.map +1 -0
  22. package/dist/beeq/{p-854e2114.entry.js → p-29d9487c.entry.js} +2 -2
  23. package/dist/beeq/p-29d9487c.entry.js.map +1 -0
  24. package/dist/beeq/p-2c566eb0.entry.js +6 -0
  25. package/dist/beeq/p-2c566eb0.entry.js.map +1 -0
  26. package/dist/beeq/{p-d2c20a92.entry.js → p-2ef4ed54.entry.js} +2 -2
  27. package/dist/beeq/p-2ef4ed54.entry.js.map +1 -0
  28. package/dist/beeq/{p-561ff182.js → p-3c472097.js} +2 -2
  29. package/dist/beeq/{p-bdf2ea24.entry.js → p-43dc9906.entry.js} +2 -2
  30. package/dist/beeq/p-43dc9906.entry.js.map +1 -0
  31. package/dist/beeq/{p-b9171e19.entry.js → p-4c66663c.entry.js} +2 -2
  32. package/dist/beeq/p-4c66663c.entry.js.map +1 -0
  33. package/dist/beeq/{p-81b6556f.entry.js → p-4d6a9646.entry.js} +2 -2
  34. package/dist/beeq/p-4d6a9646.entry.js.map +1 -0
  35. package/dist/beeq/{p-0ff234ec.entry.js → p-52603411.entry.js} +2 -2
  36. package/dist/beeq/p-52603411.entry.js.map +1 -0
  37. package/dist/beeq/{p-d72440a3.entry.js → p-56c43424.entry.js} +2 -2
  38. package/dist/beeq/p-56c43424.entry.js.map +1 -0
  39. package/dist/beeq/{p-5b5f9a2a.entry.js → p-5d6fc48a.entry.js} +2 -2
  40. package/dist/beeq/p-5d6fc48a.entry.js.map +1 -0
  41. package/dist/beeq/p-60094726.js +7 -0
  42. package/dist/beeq/p-60094726.js.map +1 -0
  43. package/dist/beeq/p-6079f9b2.entry.js +6 -0
  44. package/dist/beeq/p-6079f9b2.entry.js.map +1 -0
  45. package/dist/beeq/{p-6482a62d.entry.js → p-6a0b0106.entry.js} +2 -2
  46. package/dist/beeq/p-6a0b0106.entry.js.map +1 -0
  47. package/dist/beeq/{p-e0e5c735.entry.js → p-73ef1309.entry.js} +2 -2
  48. package/dist/beeq/p-73ef1309.entry.js.map +1 -0
  49. package/dist/beeq/{p-cc83682b.entry.js → p-75cc6789.entry.js} +2 -2
  50. package/dist/beeq/p-75cc6789.entry.js.map +1 -0
  51. package/dist/beeq/{p-42d22a31.entry.js → p-7a719a9b.entry.js} +2 -2
  52. package/dist/beeq/p-7a719a9b.entry.js.map +1 -0
  53. package/dist/beeq/{p-a0d6207d.entry.js → p-7f124d61.entry.js} +2 -2
  54. package/dist/beeq/p-7f124d61.entry.js.map +1 -0
  55. package/dist/beeq/{p-def8acd7.entry.js → p-8ca2588f.entry.js} +2 -2
  56. package/dist/beeq/p-8ca2588f.entry.js.map +1 -0
  57. package/dist/beeq/{p-8b595d1f.entry.js → p-921fa1ea.entry.js} +2 -2
  58. package/dist/beeq/p-921fa1ea.entry.js.map +1 -0
  59. package/dist/beeq/p-99b5d671.entry.js +6 -0
  60. package/dist/beeq/p-99b5d671.entry.js.map +1 -0
  61. package/dist/beeq/{p-47d41233.entry.js → p-a5e01629.entry.js} +2 -2
  62. package/dist/beeq/p-a5e01629.entry.js.map +1 -0
  63. package/dist/beeq/{p-5f00f1f5.entry.js → p-adec3d5b.entry.js} +2 -2
  64. package/dist/beeq/{p-5f00f1f5.entry.js.map → p-adec3d5b.entry.js.map} +1 -1
  65. package/dist/beeq/{p-1d67af77.entry.js → p-b83f174c.entry.js} +2 -2
  66. package/dist/beeq/p-b83f174c.entry.js.map +1 -0
  67. package/dist/beeq/{p-4f47130c.entry.js → p-c09dac58.entry.js} +2 -2
  68. package/dist/beeq/p-c09dac58.entry.js.map +1 -0
  69. package/dist/beeq/p-c65d21e2.entry.js +6 -0
  70. package/dist/beeq/p-c65d21e2.entry.js.map +1 -0
  71. package/dist/beeq/{p-eab2d27c.entry.js → p-c70c6b00.entry.js} +2 -2
  72. package/dist/beeq/p-c70c6b00.entry.js.map +1 -0
  73. package/dist/beeq/{p-995bfd58.js → p-c9ed66d9.js} +2 -2
  74. package/dist/beeq/{p-a6094ed8.entry.js → p-d8221b88.entry.js} +2 -2
  75. package/dist/beeq/p-d8221b88.entry.js.map +1 -0
  76. package/dist/beeq/{p-439583bc.entry.js → p-d8a257b7.entry.js} +2 -2
  77. package/dist/beeq/p-d8a257b7.entry.js.map +1 -0
  78. package/dist/beeq/p-dc544089.entry.js +6 -0
  79. package/dist/beeq/p-dc544089.entry.js.map +1 -0
  80. package/dist/beeq/{p-70ae504a.entry.js → p-e056c02a.entry.js} +2 -2
  81. package/dist/beeq/p-e056c02a.entry.js.map +1 -0
  82. package/dist/beeq/{p-e1d3a748.entry.js → p-e68dcd3d.entry.js} +2 -2
  83. package/dist/beeq/p-e68dcd3d.entry.js.map +1 -0
  84. package/dist/beeq/{p-d7507599.entry.js → p-eb662058.entry.js} +2 -2
  85. package/dist/beeq/p-eb662058.entry.js.map +1 -0
  86. package/dist/beeq.html-custom-data.json +2029 -0
  87. package/dist/cjs/{assetsPath-557e47c5.js → assetsPath-0ec85a1a.js} +2 -2
  88. package/dist/cjs/{assetsPath-557e47c5.js.map → assetsPath-0ec85a1a.js.map} +1 -1
  89. package/dist/cjs/beeq.cjs.js +3 -3
  90. package/dist/cjs/beeq.cjs.js.map +1 -1
  91. package/dist/cjs/bq-accordion-group.cjs.entry.js +3 -3
  92. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
  93. package/dist/cjs/bq-accordion.cjs.entry.js +5 -5
  94. package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
  95. package/dist/cjs/bq-alert.cjs.entry.js +6 -6
  96. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  97. package/dist/cjs/bq-avatar.cjs.entry.js +5 -5
  98. package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
  99. package/dist/cjs/bq-badge.cjs.entry.js +3 -3
  100. package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
  101. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +4 -11
  102. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
  103. package/dist/cjs/bq-breadcrumb.cjs.entry.js +20 -38
  104. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  105. package/dist/cjs/bq-button_2.cjs.entry.js +7 -7
  106. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  107. package/dist/cjs/bq-card.cjs.entry.js +4 -4
  108. package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
  109. package/dist/cjs/bq-checkbox.cjs.entry.js +9 -11
  110. package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
  111. package/dist/cjs/bq-date-picker.cjs.entry.js +35 -16
  112. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  113. package/dist/cjs/bq-dialog.cjs.entry.js +6 -6
  114. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  115. package/dist/cjs/bq-divider.cjs.entry.js +5 -5
  116. package/dist/cjs/bq-divider.cjs.entry.js.map +1 -1
  117. package/dist/cjs/bq-drawer.cjs.entry.js +6 -6
  118. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  119. package/dist/cjs/bq-dropdown_2.cjs.entry.js +5 -5
  120. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
  121. package/dist/cjs/bq-empty-state.cjs.entry.js +5 -5
  122. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  123. package/dist/cjs/bq-input.cjs.entry.js +42 -17
  124. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  125. package/dist/cjs/bq-notification.cjs.entry.js +4 -4
  126. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  127. package/dist/cjs/bq-option-group.cjs.entry.js +2 -2
  128. package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
  129. package/dist/cjs/bq-option-list_2.cjs.entry.js +7 -7
  130. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  131. package/dist/cjs/bq-option.cjs.entry.js +5 -5
  132. package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
  133. package/dist/cjs/bq-page-title.cjs.entry.js +3 -3
  134. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  135. package/dist/cjs/bq-progress.cjs.entry.js +9 -9
  136. package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
  137. package/dist/cjs/bq-radio-group.cjs.entry.js +68 -25
  138. package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
  139. package/dist/cjs/bq-radio.cjs.entry.js +10 -4
  140. package/dist/cjs/bq-radio.cjs.entry.js.map +1 -1
  141. package/dist/cjs/bq-select.cjs.entry.js +7 -7
  142. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  143. package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
  144. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
  145. package/dist/cjs/bq-side-menu.cjs.entry.js +3 -3
  146. package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -1
  147. package/dist/cjs/bq-slider.cjs.entry.js +21 -7
  148. package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
  149. package/dist/cjs/bq-spinner.cjs.entry.js +5 -5
  150. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  151. package/dist/cjs/bq-status.cjs.entry.js +2 -2
  152. package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
  153. package/dist/cjs/bq-step-item.cjs.entry.js +5 -5
  154. package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
  155. package/dist/cjs/bq-steps.cjs.entry.js +2 -2
  156. package/dist/cjs/bq-steps.cjs.entry.js.map +1 -1
  157. package/dist/cjs/bq-switch.cjs.entry.js +56 -4
  158. package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
  159. package/dist/cjs/bq-tab-group.cjs.entry.js +9 -9
  160. package/dist/cjs/bq-tab-group.cjs.entry.js.map +1 -1
  161. package/dist/cjs/bq-tab.cjs.entry.js +6 -6
  162. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  163. package/dist/cjs/bq-textarea.cjs.entry.js +62 -13
  164. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  165. package/dist/cjs/bq-toast.cjs.entry.js +2 -2
  166. package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
  167. package/dist/cjs/bq-tooltip.cjs.entry.js +2 -2
  168. package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
  169. package/dist/cjs/{index-9cbab9ab.js → index-c4edfa07.js} +787 -553
  170. package/dist/cjs/index-c4edfa07.js.map +1 -0
  171. package/dist/cjs/index.cjs.js +3 -3
  172. package/dist/cjs/{isDefined-7235b5cd.js → isDefined-e538d669.js} +2 -2
  173. package/dist/cjs/{isDefined-7235b5cd.js.map → isDefined-e538d669.js.map} +1 -1
  174. package/dist/cjs/loader.cjs.js +2 -2
  175. package/dist/collection/collection-manifest.json +1 -1
  176. package/dist/collection/components/accordion/bq-accordion.js +117 -18
  177. package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
  178. package/dist/collection/components/accordion-group/bq-accordion-group.js +36 -1
  179. package/dist/collection/components/accordion-group/bq-accordion-group.js.map +1 -1
  180. package/dist/collection/components/accordion-group/scss/bq-accordion-group.css +1 -1
  181. package/dist/collection/components/alert/bq-alert.js +91 -9
  182. package/dist/collection/components/alert/bq-alert.js.map +1 -1
  183. package/dist/collection/components/alert/scss/bq-alert.css +1 -1
  184. package/dist/collection/components/avatar/bq-avatar.js +66 -4
  185. package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
  186. package/dist/collection/components/avatar/scss/bq-avatar.css +1 -1
  187. package/dist/collection/components/badge/bq-badge.js +36 -2
  188. package/dist/collection/components/badge/bq-badge.js.map +1 -1
  189. package/dist/collection/components/breadcrumb/bq-breadcrumb.js +43 -119
  190. package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
  191. package/dist/collection/components/breadcrumb/scss/bq-breadcrumb.css +1 -1
  192. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +50 -46
  193. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
  194. package/dist/collection/components/breadcrumb-item/scss/bq-breadcrumb-item.css +1 -1
  195. package/dist/collection/components/button/bq-button.js +77 -2
  196. package/dist/collection/components/button/bq-button.js.map +1 -1
  197. package/dist/collection/components/button/scss/bq-button.css +1 -1
  198. package/dist/collection/components/card/bq-card.js +37 -3
  199. package/dist/collection/components/card/bq-card.js.map +1 -1
  200. package/dist/collection/components/card/scss/bq-card.css +1 -1
  201. package/dist/collection/components/checkbox/bq-checkbox.js +62 -9
  202. package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
  203. package/dist/collection/components/checkbox/scss/bq-checkbox.css +1 -1
  204. package/dist/collection/components/date-picker/bq-date-picker.js +190 -43
  205. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  206. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  207. package/dist/collection/components/dialog/bq-dialog.js +96 -12
  208. package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
  209. package/dist/collection/components/dialog/scss/bq-dialog.css +1 -1
  210. package/dist/collection/components/divider/bq-divider.js +53 -8
  211. package/dist/collection/components/divider/bq-divider.js.map +1 -1
  212. package/dist/collection/components/drawer/bq-drawer.js +75 -13
  213. package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
  214. package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
  215. package/dist/collection/components/dropdown/bq-dropdown.js +70 -4
  216. package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
  217. package/dist/collection/components/dropdown/scss/bq-dropdown.css +1 -1
  218. package/dist/collection/components/empty-state/bq-empty-state.js +24 -4
  219. package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
  220. package/dist/collection/components/icon/bq-icon.js +34 -2
  221. package/dist/collection/components/icon/bq-icon.js.map +1 -1
  222. package/dist/collection/components/input/bq-input.js +176 -14
  223. package/dist/collection/components/input/bq-input.js.map +1 -1
  224. package/dist/collection/components/input/scss/bq-input.css +1 -1
  225. package/dist/collection/components/notification/bq-notification.js +73 -7
  226. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  227. package/dist/collection/components/notification/scss/bq-notification.css +1 -1
  228. package/dist/collection/components/option/bq-option.js +52 -4
  229. package/dist/collection/components/option/bq-option.js.map +1 -1
  230. package/dist/collection/components/option-group/bq-option-group.js +32 -1
  231. package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
  232. package/dist/collection/components/option-list/bq-option-list.js +24 -1
  233. package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
  234. package/dist/collection/components/option-list/scss/bq-option-list.css +1 -1
  235. package/dist/collection/components/page-title/bq-page-title.js +39 -2
  236. package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
  237. package/dist/collection/components/panel/bq-panel.js +44 -1
  238. package/dist/collection/components/panel/bq-panel.js.map +1 -1
  239. package/dist/collection/components/panel/scss/bq-panel.css +1 -1
  240. package/dist/collection/components/progress/bq-progress.js +105 -67
  241. package/dist/collection/components/progress/bq-progress.js.map +1 -1
  242. package/dist/collection/components/radio/bq-radio.js +76 -2
  243. package/dist/collection/components/radio/bq-radio.js.map +1 -1
  244. package/dist/collection/components/radio/scss/bq-radio.css +1 -1
  245. package/dist/collection/components/radio-group/bq-radio-group.js +187 -57
  246. package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
  247. package/dist/collection/components/radio-group/scss/bq-radio-group.css +1 -1
  248. package/dist/collection/components/select/bq-select.js +133 -4
  249. package/dist/collection/components/select/bq-select.js.map +1 -1
  250. package/dist/collection/components/select/scss/bq-select.css +1 -1
  251. package/dist/collection/components/side-menu/bq-side-menu.js +53 -2
  252. package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
  253. package/dist/collection/components/side-menu-item/bq-side-menu-item.js +43 -0
  254. package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
  255. package/dist/collection/components/side-menu-item/scss/bq-side-menu-item.css +1 -1
  256. package/dist/collection/components/slider/bq-slider.js +88 -6
  257. package/dist/collection/components/slider/bq-slider.js.map +1 -1
  258. package/dist/collection/components/spinner/bq-spinner.js +36 -4
  259. package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
  260. package/dist/collection/components/status/bq-status.js +24 -4
  261. package/dist/collection/components/status/bq-status.js.map +1 -1
  262. package/dist/collection/components/step-item/bq-step-item.js +42 -4
  263. package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
  264. package/dist/collection/components/steps/bq-steps.js +34 -1
  265. package/dist/collection/components/steps/bq-steps.js.map +1 -1
  266. package/dist/collection/components/switch/bq-switch.js +124 -3
  267. package/dist/collection/components/switch/bq-switch.js.map +1 -1
  268. package/dist/collection/components/switch/scss/bq-switch.css +1 -1
  269. package/dist/collection/components/tab/bq-tab.js +100 -41
  270. package/dist/collection/components/tab/bq-tab.js.map +1 -1
  271. package/dist/collection/components/tab-group/bq-tab-group.js +84 -46
  272. package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
  273. package/dist/collection/components/tab-group/scss/bq-tab-group.css +1 -1
  274. package/dist/collection/components/tag/bq-tag.js +70 -3
  275. package/dist/collection/components/tag/bq-tag.js.map +1 -1
  276. package/dist/collection/components/tag/scss/bq-tag.css +1 -1
  277. package/dist/collection/components/textarea/bq-textarea.js +176 -11
  278. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  279. package/dist/collection/components/textarea/scss/bq-textarea.css +1 -1
  280. package/dist/collection/components/toast/bq-toast.js +60 -3
  281. package/dist/collection/components/toast/bq-toast.js.map +1 -1
  282. package/dist/collection/components/tooltip/bq-tooltip.js +55 -1
  283. package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
  284. package/dist/collection/global/scripts/global.js.map +1 -1
  285. package/dist/collection/tools/generate-custom-elements-json.js +8 -7
  286. package/dist/collection/tools/generate-custom-elements-json.js.map +1 -1
  287. package/dist/components/bq-accordion-group.js +1 -1
  288. package/dist/components/bq-accordion-group.js.map +1 -1
  289. package/dist/components/bq-accordion.js +1 -1
  290. package/dist/components/bq-accordion.js.map +1 -1
  291. package/dist/components/bq-alert.js +1 -1
  292. package/dist/components/bq-alert.js.map +1 -1
  293. package/dist/components/bq-avatar.js +1 -1
  294. package/dist/components/bq-avatar.js.map +1 -1
  295. package/dist/components/bq-badge.js +1 -1
  296. package/dist/components/bq-breadcrumb-item.js +1 -1
  297. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  298. package/dist/components/bq-breadcrumb.js +1 -1
  299. package/dist/components/bq-breadcrumb.js.map +1 -1
  300. package/dist/components/bq-button.js +1 -1
  301. package/dist/components/bq-card.js +1 -1
  302. package/dist/components/bq-card.js.map +1 -1
  303. package/dist/components/bq-checkbox.js +1 -1
  304. package/dist/components/bq-checkbox.js.map +1 -1
  305. package/dist/components/bq-date-picker.js +1 -1
  306. package/dist/components/bq-date-picker.js.map +1 -1
  307. package/dist/components/bq-dialog.js +1 -1
  308. package/dist/components/bq-dialog.js.map +1 -1
  309. package/dist/components/bq-divider.js +1 -1
  310. package/dist/components/bq-drawer.js +1 -1
  311. package/dist/components/bq-drawer.js.map +1 -1
  312. package/dist/components/bq-dropdown.js +1 -1
  313. package/dist/components/bq-empty-state.js +1 -1
  314. package/dist/components/bq-empty-state.js.map +1 -1
  315. package/dist/components/bq-icon.js +1 -1
  316. package/dist/components/bq-input.js +1 -1
  317. package/dist/components/bq-input.js.map +1 -1
  318. package/dist/components/bq-notification.js +1 -1
  319. package/dist/components/bq-notification.js.map +1 -1
  320. package/dist/components/bq-option-group.js +1 -1
  321. package/dist/components/bq-option-group.js.map +1 -1
  322. package/dist/components/bq-option-list.js +1 -1
  323. package/dist/components/bq-option.js +1 -1
  324. package/dist/components/bq-option.js.map +1 -1
  325. package/dist/components/bq-page-title.js +1 -1
  326. package/dist/components/bq-page-title.js.map +1 -1
  327. package/dist/components/bq-panel.js +1 -1
  328. package/dist/components/bq-progress.js +1 -1
  329. package/dist/components/bq-progress.js.map +1 -1
  330. package/dist/components/bq-radio-group.js +1 -1
  331. package/dist/components/bq-radio-group.js.map +1 -1
  332. package/dist/components/bq-radio.js +1 -1
  333. package/dist/components/bq-radio.js.map +1 -1
  334. package/dist/components/bq-select.js +1 -1
  335. package/dist/components/bq-select.js.map +1 -1
  336. package/dist/components/bq-side-menu-item.js +1 -1
  337. package/dist/components/bq-side-menu-item.js.map +1 -1
  338. package/dist/components/bq-side-menu.js +1 -1
  339. package/dist/components/bq-side-menu.js.map +1 -1
  340. package/dist/components/bq-slider.js +1 -1
  341. package/dist/components/bq-slider.js.map +1 -1
  342. package/dist/components/bq-spinner.js +1 -1
  343. package/dist/components/bq-spinner.js.map +1 -1
  344. package/dist/components/bq-status.js +1 -1
  345. package/dist/components/bq-status.js.map +1 -1
  346. package/dist/components/bq-step-item.js +1 -1
  347. package/dist/components/bq-step-item.js.map +1 -1
  348. package/dist/components/bq-steps.js +1 -1
  349. package/dist/components/bq-steps.js.map +1 -1
  350. package/dist/components/bq-switch.js +1 -1
  351. package/dist/components/bq-switch.js.map +1 -1
  352. package/dist/components/bq-tab-group.js +1 -1
  353. package/dist/components/bq-tab-group.js.map +1 -1
  354. package/dist/components/bq-tab.js +1 -1
  355. package/dist/components/bq-tab.js.map +1 -1
  356. package/dist/components/bq-tag.js +1 -1
  357. package/dist/components/bq-textarea.js +1 -1
  358. package/dist/components/bq-textarea.js.map +1 -1
  359. package/dist/components/bq-toast.js +1 -1
  360. package/dist/components/bq-toast.js.map +1 -1
  361. package/dist/components/bq-tooltip.js +1 -1
  362. package/dist/components/index.js +1 -1
  363. package/dist/components/{p-2bdb6f46.js → p-27c1b08e.js} +2 -2
  364. package/dist/components/p-27c1b08e.js.map +1 -0
  365. package/dist/components/{p-209dd39e.js → p-295b174b.js} +2 -2
  366. package/dist/components/p-295b174b.js.map +1 -0
  367. package/dist/components/{p-fd41feb9.js → p-33371480.js} +2 -2
  368. package/dist/components/{p-fd41feb9.js.map → p-33371480.js.map} +1 -1
  369. package/dist/components/p-5940b410.js +7 -0
  370. package/dist/components/p-5940b410.js.map +1 -0
  371. package/dist/components/{p-00b80145.js → p-78d23ddc.js} +2 -2
  372. package/dist/components/{p-9e8fdef7.js → p-93c16753.js} +2 -2
  373. package/dist/components/p-93c16753.js.map +1 -0
  374. package/dist/components/{p-56dbc376.js → p-9f037c57.js} +2 -2
  375. package/dist/components/p-9f037c57.js.map +1 -0
  376. package/dist/components/{p-2c245c83.js → p-c2d43340.js} +2 -2
  377. package/dist/components/p-c2d43340.js.map +1 -0
  378. package/dist/components/{p-641036af.js → p-cbfc423f.js} +2 -2
  379. package/dist/components/p-cbfc423f.js.map +1 -0
  380. package/dist/components/{p-07467338.js → p-cf496927.js} +1 -1
  381. package/dist/components/p-cf496927.js.map +1 -0
  382. package/dist/components/{p-ddf2a5ae.js → p-f5cd1f38.js} +2 -2
  383. package/dist/components/p-f5cd1f38.js.map +1 -0
  384. package/dist/components/{p-9cfa3565.js → p-fe0b66e5.js} +2 -2
  385. package/dist/components/p-fe0b66e5.js.map +1 -0
  386. package/dist/custom-elements.json +17528 -0
  387. package/dist/esm/{assetsPath-15d3d3e4.js → assetsPath-6c498eae.js} +2 -2
  388. package/dist/esm/{assetsPath-15d3d3e4.js.map → assetsPath-6c498eae.js.map} +1 -1
  389. package/dist/esm/beeq.js +4 -4
  390. package/dist/esm/beeq.js.map +1 -1
  391. package/dist/esm/bq-accordion-group.entry.js +3 -3
  392. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  393. package/dist/esm/bq-accordion.entry.js +5 -5
  394. package/dist/esm/bq-accordion.entry.js.map +1 -1
  395. package/dist/esm/bq-alert.entry.js +6 -6
  396. package/dist/esm/bq-alert.entry.js.map +1 -1
  397. package/dist/esm/bq-avatar.entry.js +5 -5
  398. package/dist/esm/bq-avatar.entry.js.map +1 -1
  399. package/dist/esm/bq-badge.entry.js +3 -3
  400. package/dist/esm/bq-badge.entry.js.map +1 -1
  401. package/dist/esm/bq-breadcrumb-item.entry.js +4 -11
  402. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  403. package/dist/esm/bq-breadcrumb.entry.js +20 -38
  404. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  405. package/dist/esm/bq-button_2.entry.js +7 -7
  406. package/dist/esm/bq-button_2.entry.js.map +1 -1
  407. package/dist/esm/bq-card.entry.js +4 -4
  408. package/dist/esm/bq-card.entry.js.map +1 -1
  409. package/dist/esm/bq-checkbox.entry.js +9 -11
  410. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  411. package/dist/esm/bq-date-picker.entry.js +35 -16
  412. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  413. package/dist/esm/bq-dialog.entry.js +6 -6
  414. package/dist/esm/bq-dialog.entry.js.map +1 -1
  415. package/dist/esm/bq-divider.entry.js +5 -5
  416. package/dist/esm/bq-divider.entry.js.map +1 -1
  417. package/dist/esm/bq-drawer.entry.js +6 -6
  418. package/dist/esm/bq-drawer.entry.js.map +1 -1
  419. package/dist/esm/bq-dropdown_2.entry.js +5 -5
  420. package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
  421. package/dist/esm/bq-empty-state.entry.js +5 -5
  422. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  423. package/dist/esm/bq-input.entry.js +42 -17
  424. package/dist/esm/bq-input.entry.js.map +1 -1
  425. package/dist/esm/bq-notification.entry.js +4 -4
  426. package/dist/esm/bq-notification.entry.js.map +1 -1
  427. package/dist/esm/bq-option-group.entry.js +2 -2
  428. package/dist/esm/bq-option-group.entry.js.map +1 -1
  429. package/dist/esm/bq-option-list_2.entry.js +7 -7
  430. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  431. package/dist/esm/bq-option.entry.js +5 -5
  432. package/dist/esm/bq-option.entry.js.map +1 -1
  433. package/dist/esm/bq-page-title.entry.js +3 -3
  434. package/dist/esm/bq-page-title.entry.js.map +1 -1
  435. package/dist/esm/bq-progress.entry.js +9 -9
  436. package/dist/esm/bq-progress.entry.js.map +1 -1
  437. package/dist/esm/bq-radio-group.entry.js +68 -25
  438. package/dist/esm/bq-radio-group.entry.js.map +1 -1
  439. package/dist/esm/bq-radio.entry.js +10 -4
  440. package/dist/esm/bq-radio.entry.js.map +1 -1
  441. package/dist/esm/bq-select.entry.js +7 -7
  442. package/dist/esm/bq-select.entry.js.map +1 -1
  443. package/dist/esm/bq-side-menu-item.entry.js +2 -2
  444. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  445. package/dist/esm/bq-side-menu.entry.js +3 -3
  446. package/dist/esm/bq-side-menu.entry.js.map +1 -1
  447. package/dist/esm/bq-slider.entry.js +21 -7
  448. package/dist/esm/bq-slider.entry.js.map +1 -1
  449. package/dist/esm/bq-spinner.entry.js +5 -5
  450. package/dist/esm/bq-spinner.entry.js.map +1 -1
  451. package/dist/esm/bq-status.entry.js +2 -2
  452. package/dist/esm/bq-status.entry.js.map +1 -1
  453. package/dist/esm/bq-step-item.entry.js +5 -5
  454. package/dist/esm/bq-step-item.entry.js.map +1 -1
  455. package/dist/esm/bq-steps.entry.js +2 -2
  456. package/dist/esm/bq-steps.entry.js.map +1 -1
  457. package/dist/esm/bq-switch.entry.js +56 -4
  458. package/dist/esm/bq-switch.entry.js.map +1 -1
  459. package/dist/esm/bq-tab-group.entry.js +9 -9
  460. package/dist/esm/bq-tab-group.entry.js.map +1 -1
  461. package/dist/esm/bq-tab.entry.js +6 -6
  462. package/dist/esm/bq-tab.entry.js.map +1 -1
  463. package/dist/esm/bq-textarea.entry.js +62 -13
  464. package/dist/esm/bq-textarea.entry.js.map +1 -1
  465. package/dist/esm/bq-toast.entry.js +2 -2
  466. package/dist/esm/bq-toast.entry.js.map +1 -1
  467. package/dist/esm/bq-tooltip.entry.js +2 -2
  468. package/dist/esm/bq-tooltip.entry.js.map +1 -1
  469. package/dist/esm/{index-f0f1a8c6.js → index-c7d02072.js} +787 -553
  470. package/dist/esm/index-c7d02072.js.map +1 -0
  471. package/dist/esm/index.js +4 -4
  472. package/dist/esm/{isDefined-edd9ee7b.js → isDefined-48de6db5.js} +2 -2
  473. package/dist/esm/{isDefined-edd9ee7b.js.map → isDefined-48de6db5.js.map} +1 -1
  474. package/dist/esm/loader.js +3 -3
  475. package/dist/hydrate/index.js +3017 -848
  476. package/dist/hydrate/index.mjs +3017 -848
  477. package/dist/stencil.config.js +12 -2
  478. package/dist/stencil.config.js.map +1 -1
  479. package/dist/types/components/accordion/bq-accordion.d.ts +100 -10
  480. package/dist/types/components/accordion-group/bq-accordion-group.d.ts +25 -0
  481. package/dist/types/components/alert/bq-alert.d.ts +71 -5
  482. package/dist/types/components/avatar/bq-avatar.d.ts +51 -1
  483. package/dist/types/components/badge/bq-badge.d.ts +28 -0
  484. package/dist/types/components/breadcrumb/bq-breadcrumb.d.ts +25 -17
  485. package/dist/types/components/breadcrumb-item/bq-breadcrumb-item.d.ts +43 -10
  486. package/dist/types/components/button/bq-button.d.ts +51 -0
  487. package/dist/types/components/card/bq-card.d.ts +31 -1
  488. package/dist/types/components/checkbox/bq-checkbox.d.ts +37 -1
  489. package/dist/types/components/date-picker/bq-date-picker.d.ts +112 -28
  490. package/dist/types/components/dialog/bq-dialog.d.ts +76 -8
  491. package/dist/types/components/divider/bq-divider.d.ts +31 -4
  492. package/dist/types/components/drawer/bq-drawer.d.ts +59 -9
  493. package/dist/types/components/dropdown/bq-dropdown.d.ts +51 -3
  494. package/dist/types/components/empty-state/bq-empty-state.d.ts +18 -0
  495. package/dist/types/components/icon/bq-icon.d.ts +21 -1
  496. package/dist/types/components/input/bq-input.d.ts +77 -0
  497. package/dist/types/components/notification/bq-notification.d.ts +57 -5
  498. package/dist/types/components/option/bq-option.d.ts +40 -0
  499. package/dist/types/components/option-group/bq-option-group.d.ts +31 -0
  500. package/dist/types/components/option-list/bq-option-list.d.ts +21 -0
  501. package/dist/types/components/page-title/bq-page-title.d.ts +37 -0
  502. package/dist/types/components/panel/bq-panel.d.ts +31 -0
  503. package/dist/types/components/progress/bq-progress.d.ts +33 -9
  504. package/dist/types/components/radio/bq-radio.d.ts +37 -0
  505. package/dist/types/components/radio-group/bq-radio-group.d.ts +53 -10
  506. package/dist/types/components/select/bq-select.d.ts +85 -0
  507. package/dist/types/components/side-menu/bq-side-menu.d.ts +45 -0
  508. package/dist/types/components/side-menu-item/bq-side-menu-item.d.ts +37 -0
  509. package/dist/types/components/slider/bq-slider.d.ts +39 -1
  510. package/dist/types/components/spinner/bq-spinner.d.ts +26 -0
  511. package/dist/types/components/status/bq-status.d.ts +21 -3
  512. package/dist/types/components/step-item/bq-step-item.d.ts +32 -0
  513. package/dist/types/components/steps/bq-steps.d.ts +27 -0
  514. package/dist/types/components/switch/bq-switch.d.ts +43 -0
  515. package/dist/types/components/tab/bq-tab.d.ts +47 -5
  516. package/dist/types/components/tab-group/bq-tab-group.d.ts +34 -8
  517. package/dist/types/components/tag/bq-tag.d.ts +49 -0
  518. package/dist/types/components/textarea/bq-textarea.d.ts +74 -0
  519. package/dist/types/components/toast/bq-toast.d.ts +47 -2
  520. package/dist/types/components/tooltip/bq-tooltip.d.ts +40 -0
  521. package/dist/types/components.d.ts +5783 -71
  522. package/dist/types/global/scripts/global.d.ts +0 -21
  523. package/dist/types/global.d.ts +26 -0
  524. package/dist/types/tools/generate-custom-elements-json.d.ts +1 -1
  525. package/package.json +1 -1
  526. package/dist/beeq/p-0180a237.entry.js.map +0 -1
  527. package/dist/beeq/p-0711a447.entry.js.map +0 -1
  528. package/dist/beeq/p-0ff234ec.entry.js.map +0 -1
  529. package/dist/beeq/p-1d67af77.entry.js.map +0 -1
  530. package/dist/beeq/p-25365502.entry.js +0 -6
  531. package/dist/beeq/p-25365502.entry.js.map +0 -1
  532. package/dist/beeq/p-26332d3f.entry.js +0 -6
  533. package/dist/beeq/p-26332d3f.entry.js.map +0 -1
  534. package/dist/beeq/p-34637682.entry.js +0 -6
  535. package/dist/beeq/p-34637682.entry.js.map +0 -1
  536. package/dist/beeq/p-350cd07e.entry.js.map +0 -1
  537. package/dist/beeq/p-42d22a31.entry.js.map +0 -1
  538. package/dist/beeq/p-439583bc.entry.js.map +0 -1
  539. package/dist/beeq/p-457ab863.entry.js.map +0 -1
  540. package/dist/beeq/p-47d41233.entry.js.map +0 -1
  541. package/dist/beeq/p-4f47130c.entry.js.map +0 -1
  542. package/dist/beeq/p-5b5f9a2a.entry.js.map +0 -1
  543. package/dist/beeq/p-5da52049.js +0 -7
  544. package/dist/beeq/p-5da52049.js.map +0 -1
  545. package/dist/beeq/p-6482a62d.entry.js.map +0 -1
  546. package/dist/beeq/p-64ddef8a.entry.js +0 -6
  547. package/dist/beeq/p-64ddef8a.entry.js.map +0 -1
  548. package/dist/beeq/p-70ae504a.entry.js.map +0 -1
  549. package/dist/beeq/p-81b6556f.entry.js.map +0 -1
  550. package/dist/beeq/p-854e2114.entry.js.map +0 -1
  551. package/dist/beeq/p-8b595d1f.entry.js.map +0 -1
  552. package/dist/beeq/p-94ca5709.entry.js +0 -6
  553. package/dist/beeq/p-94ca5709.entry.js.map +0 -1
  554. package/dist/beeq/p-96793709.entry.js.map +0 -1
  555. package/dist/beeq/p-99668b08.entry.js.map +0 -1
  556. package/dist/beeq/p-a0d6207d.entry.js.map +0 -1
  557. package/dist/beeq/p-a6094ed8.entry.js.map +0 -1
  558. package/dist/beeq/p-a89bfbd8.entry.js.map +0 -1
  559. package/dist/beeq/p-b9171e19.entry.js.map +0 -1
  560. package/dist/beeq/p-bdf2ea24.entry.js.map +0 -1
  561. package/dist/beeq/p-be234206.entry.js.map +0 -1
  562. package/dist/beeq/p-cc83682b.entry.js.map +0 -1
  563. package/dist/beeq/p-d2c20a92.entry.js.map +0 -1
  564. package/dist/beeq/p-d72440a3.entry.js.map +0 -1
  565. package/dist/beeq/p-d7507599.entry.js.map +0 -1
  566. package/dist/beeq/p-def8acd7.entry.js.map +0 -1
  567. package/dist/beeq/p-e0e5c735.entry.js.map +0 -1
  568. package/dist/beeq/p-e1d3a748.entry.js.map +0 -1
  569. package/dist/beeq/p-eab2d27c.entry.js.map +0 -1
  570. package/dist/beeq/p-f9d9bd41.entry.js +0 -6
  571. package/dist/beeq/p-f9d9bd41.entry.js.map +0 -1
  572. package/dist/cjs/index-9cbab9ab.js.map +0 -1
  573. package/dist/components/p-07467338.js.map +0 -1
  574. package/dist/components/p-209dd39e.js.map +0 -1
  575. package/dist/components/p-2bdb6f46.js.map +0 -1
  576. package/dist/components/p-2c245c83.js.map +0 -1
  577. package/dist/components/p-56dbc376.js.map +0 -1
  578. package/dist/components/p-641036af.js.map +0 -1
  579. package/dist/components/p-9cfa3565.js.map +0 -1
  580. package/dist/components/p-9e8fdef7.js.map +0 -1
  581. package/dist/components/p-ddf2a5ae.js.map +0 -1
  582. package/dist/components/p-f1736bec.js +0 -7
  583. package/dist/components/p-f1736bec.js.map +0 -1
  584. package/dist/esm/index-f0f1a8c6.js.map +0 -1
  585. /package/dist/beeq/{p-561ff182.js.map → p-3c472097.js.map} +0 -0
  586. /package/dist/beeq/{p-995bfd58.js.map → p-c9ed66d9.js.map} +0 -0
  587. /package/dist/components/{p-00b80145.js.map → p-78d23ddc.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  * Built by Endavans
3
3
  * © https://beeq.design - Apache 2 License.
4
4
  */
5
- import { r as registerInstance, c as createEvent, g as getElement, h } from './index-f0f1a8c6.js';
5
+ import { r as registerInstance, c as createEvent, g as getElement, h } from './index-c7d02072.js';
6
6
  import { c as clamp } from './clamp-efa6c596.js';
7
7
  import { d as debounce } from './debounce-3e72f418.js';
8
8
  import { i as isNil } from './isNil-2290f64e.js';
@@ -17,6 +17,13 @@ const BqSlider = class {
17
17
  this.bqChange = createEvent(this, "bqChange", 7);
18
18
  this.bqBlur = createEvent(this, "bqBlur", 7);
19
19
  this.bqFocus = createEvent(this, "bqFocus", 7);
20
+ if (hostRef.$hostElement$["s-ei"]) {
21
+ this.internals = hostRef.$hostElement$["s-ei"];
22
+ }
23
+ else {
24
+ this.internals = hostRef.$hostElement$.attachInternals();
25
+ hostRef.$hostElement$["s-ei"] = this.internals;
26
+ }
20
27
  this.minValue = undefined;
21
28
  this.maxValue = undefined;
22
29
  this.minThumbPosition = undefined;
@@ -27,6 +34,7 @@ const BqSlider = class {
27
34
  this.gap = 0;
28
35
  this.max = 100;
29
36
  this.min = 0;
37
+ this.name = undefined;
30
38
  this.step = 1;
31
39
  this.type = 'single';
32
40
  this.value = undefined;
@@ -42,6 +50,9 @@ const BqSlider = class {
42
50
  progressElem;
43
51
  trackElem;
44
52
  debounceBqChange;
53
+ // Reference to host HTML element
54
+ // ===================================
55
+ internals;
45
56
  get el() { return getElement(this); }
46
57
  // Prop lifecycle events
47
58
  // =======================
@@ -74,9 +85,6 @@ const BqSlider = class {
74
85
  // Component lifecycle events
75
86
  // Ordered by their natural call order
76
87
  // =====================================
77
- connectedCallback() {
78
- this.init();
79
- }
80
88
  componentWillLoad() {
81
89
  this.init();
82
90
  }
@@ -86,6 +94,9 @@ const BqSlider = class {
86
94
  componentDidUpdate() {
87
95
  this.runUpdates();
88
96
  }
97
+ formAssociatedCallback() {
98
+ this.internals?.setFormValue(`${this.value}`);
99
+ }
89
100
  // Listeners
90
101
  // ==============
91
102
  // Public methods API
@@ -140,7 +151,9 @@ const BqSlider = class {
140
151
  target.setAttribute('value', reflectedValue);
141
152
  // Sync the prop value.
142
153
  // This will trigger the `@Watch('value')` method and emit the `bqChange` event.
143
- this.value = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;
154
+ const { internals, isRangeType, maxValue, minValue } = this;
155
+ this.value = isRangeType ? [minValue, maxValue] : minValue;
156
+ internals?.setFormValue(isRangeType ? JSON.stringify(this.value) : this.value.toString());
144
157
  };
145
158
  calculatePercent = (value) => {
146
159
  const totalRange = Number(this.max) - Number(this.min);
@@ -228,7 +241,7 @@ const BqSlider = class {
228
241
  return (h("input", { type: "range", class: {
229
242
  'absolute start-0 -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none is-full inset-bs-[50%] disabled:cursor-not-allowed': true,
230
243
  'pointer-events-none': this.isRangeType,
231
- }, style: this.isRangeType ? { zIndex: zIndexValue(type) } : undefined, disabled: this.disabled, min: this.min, max: this.max, step: this.step, ref: refCallback, onInput: (ev) => this.handleInputChange(type, ev), onBlur: this.handleBlur, onFocus: this.handleFocus, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp, value: value, part: `input-${type}` }));
244
+ }, style: this.isRangeType ? { zIndex: zIndexValue(type) } : undefined, disabled: this.disabled, min: this.min, max: this.max, name: this.name, step: this.step, ref: refCallback, onInput: (ev) => this.handleInputChange(type, ev), onBlur: this.handleBlur, onFocus: this.handleFocus, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp, value: value, part: `input-${type}` }));
232
245
  };
233
246
  renderTooltip = (value, thumbPosition, refCallback) => (h("bq-tooltip", { class: {
234
247
  'absolute [&::part(panel)]:absolute': true,
@@ -238,12 +251,13 @@ const BqSlider = class {
238
251
  // Always the last one in the class.
239
252
  // ===================================
240
253
  render() {
241
- return (h("div", { key: 'b1a7ed6996e58caeedad0b01e40d35b2c965c538', "aria-disabled": this.disabled ? 'true' : 'false', class: { 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }, part: "base" }, this.renderLabel(this.minValue, 'start', 'me-xs text-end'), h("div", { key: '26a02fe059a4574ace3351aa40c2988ed2ac7ccc', class: "relative is-full", part: "container" }, h("span", { key: 'cb54afa2b95756d9453d44c6eaf6b4410002cdbe', class: "absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]", ref: (elem) => (this.trackElem = elem), part: "track-area" }), h("span", { key: 'f65177846f32e3a2e8d6fa057685b25561587706', class: "absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]", ref: (elem) => (this.progressElem = elem), part: "progress-area" }), this.enableTooltip &&
254
+ return (h("div", { key: '295ad3ada29d51d1eca68a7efab8507c36e09008', "aria-disabled": this.disabled ? 'true' : 'false', class: { 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }, part: "base" }, this.renderLabel(this.minValue, 'start', 'me-xs text-end'), h("div", { key: '0bfa885d663c505c5492c43072ae696401f7bbae', class: "relative is-full", part: "container" }, h("span", { key: '85becad69dcfae733c4720a7ff0380a98e4df815', class: "absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]", ref: (elem) => (this.trackElem = elem), part: "track-area" }), h("span", { key: '4dfc2ac0be5dadc762c201b8e90ba0dadbce5ddb', class: "absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]", ref: (elem) => (this.progressElem = elem), part: "progress-area" }), this.enableTooltip &&
242
255
  this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem)), this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input)), this.enableTooltip &&
243
256
  this.isRangeType &&
244
257
  this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem)), this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))), this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')));
245
258
  }
246
259
  static get delegatesFocus() { return true; }
260
+ static get formAssociated() { return true; }
247
261
  static get watchers() { return {
248
262
  "value": ["handleValuePropChange"],
249
263
  "step": ["handleStepPropChange"],
@@ -1 +1 @@
1
- {"file":"bq-slider.entry.js","mappings":";;;;;;;;;;AAAA,MAAM,WAAW,GAAG,qozBAAqozB,CAAC;AAC1pzB,uBAAe,WAAW;;MCqBb,QAAQ;;;;;;;;;;4BAqCqB,CAAC;wBAGJ,KAAK;oCAGO,KAAK;mBAGR,CAAC;mBAGhB,GAAG;mBAGH,CAAC;oBAMA,CAAC;oBAGY,QAAQ;;6BAUH,KAAK;oCAME,KAAK;;;;IAzEtD,YAAY,CAAmB;IAC/B,YAAY,CAAmB;IAC/B,cAAc,CAAuB;IACrC,cAAc,CAAuB;IACrC,YAAY,CAAkB;IAC9B,SAAS,CAAkB;IAC3B,gBAAgB,CAAkB;;;;IAyE1C,qBAAqB,CAAC,QAAsB;QAC1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;IAGD,oBAAoB;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA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AAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F,EAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD,EACN;KACH;;;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-m border-solid border-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-brand;\n }\n}\n\n:host {\n @apply block is-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","import { 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 * @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@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\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 @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 /**\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 connectedCallback() {\n this.init();\n }\n\n componentWillLoad() {\n this.init();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\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 this.value = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\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 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"],"version":3}
1
+ {"file":"bq-slider.entry.js","mappings":";;;;;;;;;;AAAA,MAAM,WAAW,GAAG,qozBAAqozB,CAAC;AAC1pzB,uBAAe,WAAW;;MCyDb,QAAQ;;;;;;;;;;;;;;;;;4BAsCqB,CAAC;wBAGJ,KAAK;oCAGO,KAAK;mBAGR,CAAC;mBAGhB,GAAG;mBAGH,CAAC;;oBASA,CAAC;oBAGY,QAAQ;;6BAUH,KAAK;oCAME,KAAK;;;;IA7EtD,YAAY,CAAmB;IAC/B,YAAY,CAAmB;IAC/B,cAAc,CAAuB;IACrC,cAAc,CAAuB;IACrC,YAAY,CAAkB;IAC9B,SAAS,CAAkB;IAC3B,gBAAgB,CAAkB;;;IAKvB,SAAS,CAAoB;;;;IAwEhD,qBAAqB,CAAC,QAAsB;QAC1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;IAGD,oBAAoB;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ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,CAAC,CAAC,EAEjG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F,EAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD,EACN;KACH;;;;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-m border-solid border-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-brand;\n }\n}\n\n:host {\n @apply block is-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","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"],"version":3}
@@ -2,7 +2,7 @@
2
2
  * Built by Endavans
3
3
  * © https://beeq.design - Apache 2 License.
4
4
  */
5
- import { r as registerInstance, g as getElement, h } from './index-f0f1a8c6.js';
5
+ import { r as registerInstance, g as getElement, h } from './index-c7d02072.js';
6
6
  import { a as getCSSVariableValue } from './cssVariables-000c23ad.js';
7
7
  import { i as isNil } from './isNil-2290f64e.js';
8
8
  import { i as isHTMLElement } from './isHTMLElement-0271eefe.js';
@@ -117,18 +117,18 @@ const BqSpinner = class {
117
117
  // Always the last one in the class.
118
118
  // ===================================
119
119
  render() {
120
- return (h("div", { key: '16c6b705d29da31217a216a1f3112541406bab57', class: {
120
+ return (h("div", { key: '7ab7672b53b13d46e00dd329c57261cc790f8cbf', class: {
121
121
  [`bq-spinner ${this.size} text-${this.textPosition}`]: true,
122
122
  'is-animated': this.animation,
123
123
  'has-text': !!this.slotContentLength,
124
- }, part: "base" }, !this.hasIconSlot && (h("div", { key: '963e8626cc63d84271989ac1c88865b677e006f8', class: `bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`, "aria-label": "Loading...", role: "status" }, h("svg", { key: 'd2516d3243caa3b9bd1223c2eadc9de3298b7803', class: "bs-full is-full", fill: "currentColor", viewBox: "0 0 48 48" }, h("path", { key: '72f146eff86a3758c6bd9516cce570b3085fa3ba', fill: "currentColor", 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" }), h("path", { key: '2366c8c25addee9092f1cc1f6402fa2d2835c742', fill: "currentColor", 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", opacity: ".1" })))), h("span", { key: '79c4c16ce19fb6d443c09d3b1e43e856f7230057', class: {
124
+ }, part: "base" }, !this.hasIconSlot && (h("div", { key: '8d0c6bcfa0ddaaad34bce2d1b24c84c712d0caa6', class: `bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`, "aria-label": "Loading...", role: "status" }, h("svg", { key: 'eef7dff50bac692de1dffdfb1ff8a93066125505', class: "bs-full is-full", fill: "currentColor", viewBox: "0 0 48 48" }, h("path", { key: '8bb00cc88c90c9be94cd2a64235def81135271db', fill: "currentColor", 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" }), h("path", { key: 'ebbd4c4ad21d6c540d8dbc1b352435fe896060db', fill: "currentColor", 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", opacity: ".1" })))), h("span", { key: '01574bf08249545471498bbfb631904a3b9141b1', class: {
125
125
  'bq-spinner--icon': true,
126
126
  flex: this.hasIconSlot,
127
127
  '!hidden': !this.hasIconSlot,
128
- }, ref: (spanElem) => (this.iconSlotElem = spanElem), part: "custom-icon" }, h("slot", { key: 'd574885b176b5b6a9e1b5257c2612266b9d90bf2', name: "icon", onSlotchange: this.handleIconSlotChange })), h("span", { key: '49b9c8be9ec8c9b3f1a67e0ef84a311d43838f77', class: {
128
+ }, ref: (spanElem) => (this.iconSlotElem = spanElem), part: "custom-icon" }, h("slot", { key: '2320f1cd826edc72e0f336453dd40d2aa18232f0', name: "icon", onSlotchange: this.handleIconSlotChange })), h("span", { key: '2363b72b6d4aac070c3d1e0124deabc9ed67c387', class: {
129
129
  'bq-spinner--text font-medium leading-regular text-primary': true,
130
130
  '!hidden': !this.isTextDisplayed,
131
- }, part: "text", ref: (spanElem) => (this.slotElem = spanElem) }, h("slot", { key: '14f3152ae4ee47e9c5d56cdc7402d9aeca07420b', onSlotchange: this.handleSlotChange }))));
131
+ }, part: "text", ref: (spanElem) => (this.slotElem = spanElem) }, h("slot", { key: '2f919bcbe1cf1b9e802105ab75f0617e068e8eec', onSlotchange: this.handleSlotChange }))));
132
132
  }
133
133
  static get watchers() { return {
134
134
  "textPosition": ["handleTextPositionProp"],
@@ -1 +1 @@
1
- {"file":"bq-spinner.entry.js","mappings":";;;;;;;;;;;AAAO,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AACpF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;;ACDjE,MAAM,YAAY,GAAG,myrBAAmyr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e;aACjC,EACD,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,QAAQ,MAAM,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAE7C,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACxC,CACH,EACN;KACH;;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/spinner/bq-spinner.types.ts","../../packages/beeq/src/components/spinner/scss/bq-spinner.scss?tag=bq-spinner&encapsulation=shadow","../../packages/beeq/src/components/spinner/bq-spinner.tsx"],"sourcesContent":["export const SPINNER_TEXT_POSITION = ['none', 'left', 'right', 'above', 'bellow'] as const;\nexport const SPINNER_SIZE = ['small', 'medium', 'large'] as const;\nexport type TSpinnerTextPosition = (typeof SPINNER_TEXT_POSITION)[number];\nexport type TSpinnerSize = (typeof SPINNER_SIZE)[number];\n","/* -------------------------------------------------------------------------- */\n/* Spinner styles */\n/* -------------------------------------------------------------------------- */\n@import './bq-spinner.variables';\n\n:host {\n @apply relative inline-block;\n}\n\n.bq-spinner {\n @apply flex;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Spinner loader size */\n/* -------------------------------------------------------------------------- */\n\n.bq-spinner--loader.large {\n @apply bs-[--bq-spinner--size-large] is-[--bq-spinner--size-large];\n}\n\n.bq-spinner--loader.medium {\n @apply bs-[--bq-spinner--size-medium] is-[--bq-spinner--size-medium];\n}\n\n.bq-spinner--loader.small {\n @apply bs-[--bq-spinner--size-small] is-[--bq-spinner--size-small];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Text position */\n/* -------------------------------------------------------------------------- */\n\n.text-left,\n.text-right {\n @apply flex-row items-center;\n\n &.has-text {\n @apply gap-x-m;\n }\n}\n\n.text-left {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-right {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n.text-above,\n.text-bellow {\n @apply flex-col items-center;\n\n &.has-text {\n @apply gap-y-m;\n }\n}\n\n.text-above {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-bellow {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Animate slotted icon if provided */\n/* -------------------------------------------------------------------------- */\n\n.is-animated {\n .bq-spinner--icon,\n .bq-spinner--loader > svg {\n @include animation-spin;\n }\n}\n","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 * @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@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"],"version":3}
1
+ {"file":"bq-spinner.entry.js","mappings":";;;;;;;;;;;AAAO,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AACpF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;;ACDjE,MAAM,YAAY,GAAG,myrBAAmyrB,CAAC;AACzzrB,wBAAe,YAAY;;MCkDd,SAAS;;;2BAoBW,KAAK;uBACT,KAAK;iCACK,CAAC;yBAMA,IAAI;4BAGoB,MAAM;oBAGtB,QAAQ;;;;IA9B9C,YAAY,CAAc;IAC1B,QAAQ,CAAc;IACtB,QAAQ,GAAqB,IAAI,gBAAgB,CAAC,CAAC,SAAS;QAClE,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;KAC7D,CAAC,CAAC;;;;IA+BH,sBAAsB;QACpB,iBAAiB,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;KAC3E;IAGD,cAAc;QACZ,iBAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;KACpB;IAGD,iBAAiB;QACf,IAAI,CAAC,WAAW,EAAE,CAAC;KACpB;;;;;;;IAUD,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;IAED,gBAAgB;QACd,IAAI,CAAC,WAAW,EAAE,CAAC;KACpB;IAED,oBAAoB;QAClB,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC;KA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;gBACxB,IAAI,EAAE,IAAI,CAAC,WAAW;gBACtB,SAAS,EAAE,CAAC,IAAI,CAAC,WAAW;aAC7B,EACD,GAAG,EAAE,CAAC,QAAQ,MAAM,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EACjD,IAAI,EAAC,aAAa,IAElB,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,GAAI,CACxD,EACP,6DACE,KAAK,EAAE;gBACL,2DAA2D,EAAE,IAAI;gBACjE,SAAS,EAAE,CAAC,IAAI,CAAC,eAAe;aACjC,EACD,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,QAAQ,MAAM,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAE7C,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACxC,CACH,EACN;KACH;;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/spinner/bq-spinner.types.ts","../../packages/beeq/src/components/spinner/scss/bq-spinner.scss?tag=bq-spinner&encapsulation=shadow","../../packages/beeq/src/components/spinner/bq-spinner.tsx"],"sourcesContent":["export const SPINNER_TEXT_POSITION = ['none', 'left', 'right', 'above', 'bellow'] as const;\nexport const SPINNER_SIZE = ['small', 'medium', 'large'] as const;\nexport type TSpinnerTextPosition = (typeof SPINNER_TEXT_POSITION)[number];\nexport type TSpinnerSize = (typeof SPINNER_SIZE)[number];\n","/* -------------------------------------------------------------------------- */\n/* Spinner styles */\n/* -------------------------------------------------------------------------- */\n@import './bq-spinner.variables';\n\n:host {\n @apply relative inline-block;\n}\n\n.bq-spinner {\n @apply flex;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Spinner loader size */\n/* -------------------------------------------------------------------------- */\n\n.bq-spinner--loader.large {\n @apply bs-[--bq-spinner--size-large] is-[--bq-spinner--size-large];\n}\n\n.bq-spinner--loader.medium {\n @apply bs-[--bq-spinner--size-medium] is-[--bq-spinner--size-medium];\n}\n\n.bq-spinner--loader.small {\n @apply bs-[--bq-spinner--size-small] is-[--bq-spinner--size-small];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Text position */\n/* -------------------------------------------------------------------------- */\n\n.text-left,\n.text-right {\n @apply flex-row items-center;\n\n &.has-text {\n @apply gap-x-m;\n }\n}\n\n.text-left {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-right {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n.text-above,\n.text-bellow {\n @apply flex-col items-center;\n\n &.has-text {\n @apply gap-y-m;\n }\n}\n\n.text-above {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-bellow {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Animate slotted icon if provided */\n/* -------------------------------------------------------------------------- */\n\n.is-animated {\n .bq-spinner--icon,\n .bq-spinner--loader > svg {\n @include animation-spin;\n }\n}\n","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"],"version":3}
@@ -2,7 +2,7 @@
2
2
  * Built by Endavans
3
3
  * © https://beeq.design - Apache 2 License.
4
4
  */
5
- import { r as registerInstance, g as getElement, h } from './index-f0f1a8c6.js';
5
+ import { r as registerInstance, g as getElement, h } from './index-c7d02072.js';
6
6
  import { v as validatePropValue } from './props-3bf7f546.js';
7
7
 
8
8
  const STATUS_TYPE = ['alert', 'danger', 'info', 'neutral', 'success'];
@@ -46,7 +46,7 @@ const BqStatus = class {
46
46
  // Always the last one in the class.
47
47
  // ===================================
48
48
  render() {
49
- return (h("div", { key: '4d591f888f3bad0314c12af4db22da33c48a229a', class: "bq-status inline-flex items-center gap-xs", part: "base", role: "status" }, h("bq-badge", { key: '0ffb552feb332dc9e6195b93bd2d28c3d1dce407', class: `bq-status__circle rounded-full ${this.type}`, size: "medium", part: "circle", role: "img" }), h("div", { key: '0756c71eb9107d795bc9a36e20f4f605e3a8c7c9', 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", part: "text" }, h("slot", { key: '06755c25bd07df4cb2d2544ef219289f7ad4831c' }))));
49
+ return (h("div", { key: 'f30047e7b867e4adc0ef10c6eb78bd54a7572a2a', class: "bq-status inline-flex items-center gap-xs", part: "base", role: "status" }, h("bq-badge", { key: 'f575cdab29674e087f3f2f489f50f9622a9854de', class: `bq-status__circle rounded-full ${this.type}`, size: "medium", part: "circle", role: "img" }), h("div", { key: '2ea549e7c5d446f23e89cd9f0c8d1d373f6c80a5', 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", part: "text" }, h("slot", { key: '2d1b13f6e501353893d502e87f71c99564195ee5' }))));
50
50
  }
51
51
  static get watchers() { return {
52
52
  "type": ["checkPropValues"]
@@ -1 +1 @@
1
- {"file":"bq-status.entry.js","mappings":";;;;;;;AAAO,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAU;;ACArF,MAAM,WAAW,GAAG,k6oBAAk6oB,CAAC;AACv7oB,uBAAe,WAAW;;MCcb,QAAQ;;;oBAgB0B,SAAS;;;;;IAKtD,eAAe;QACb,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;KAC5D;;;;;;;IASD,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;;;;;;;;;;;;;;;;IAmBD,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,IAC9E,iEAAU,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,GAAG,EACzG,4DACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM,IAEX,8DAAQ,CACJ,CACF,EACN;KACH;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/status/bq-status.types.ts","../../packages/beeq/src/components/status/scss/bq-status.scss?tag=bq-status&encapsulation=shadow","../../packages/beeq/src/components/status/bq-status.tsx"],"sourcesContent":["export const STATUS_TYPE = ['alert', 'danger', 'info', 'neutral', 'success'] as const;\nexport type TStatusType = (typeof STATUS_TYPE)[number];\n","@import './bq-status.variables';\n\n.bq-status__circle {\n &::part(base) {\n --bq-badge--size-medium: var(--bq-status-circle--size);\n }\n\n &.success::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.success);\n }\n\n &.danger::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.danger);\n }\n\n &.neutral::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.secondary);\n }\n\n &.alert::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.warning);\n }\n\n &.info::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.brand);\n }\n}\n\n.bq-status__text ::slotted(*) {\n @apply text-s font-medium leading-regular text-primary p-b-0 p-i-0 m-b-0 m-i-0;\n}\n","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 * @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@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"],"version":3}
1
+ {"file":"bq-status.entry.js","mappings":";;;;;;;AAAO,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAU;;ACArF,MAAM,WAAW,GAAG,k6oBAAk6oB,CAAC;AACv7oB,uBAAe,WAAW;;MCgCb,QAAQ;;;oBAgB0B,SAAS;;;;;IAKtD,eAAe;QACb,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;KAC5D;;;;;;;IASD,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;;;;;;;;;;;;;;;;IAmBD,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,IAC9E,iEAAU,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,GAAG,EACzG,4DACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM,IAEX,8DAAQ,CACJ,CACF,EACN;KACH;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/status/bq-status.types.ts","../../packages/beeq/src/components/status/scss/bq-status.scss?tag=bq-status&encapsulation=shadow","../../packages/beeq/src/components/status/bq-status.tsx"],"sourcesContent":["export const STATUS_TYPE = ['alert', 'danger', 'info', 'neutral', 'success'] as const;\nexport type TStatusType = (typeof STATUS_TYPE)[number];\n","@import './bq-status.variables';\n\n.bq-status__circle {\n &::part(base) {\n --bq-badge--size-medium: var(--bq-status-circle--size);\n }\n\n &.success::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.success);\n }\n\n &.danger::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.danger);\n }\n\n &.neutral::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.secondary);\n }\n\n &.alert::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.warning);\n }\n\n &.info::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.brand);\n }\n}\n\n.bq-status__text ::slotted(*) {\n @apply text-s font-medium leading-regular text-primary p-b-0 p-i-0 m-b-0 m-i-0;\n}\n","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"],"version":3}
@@ -2,7 +2,7 @@
2
2
  * Built by Endavans
3
3
  * © https://beeq.design - Apache 2 License.
4
4
  */
5
- import { r as registerInstance, c as createEvent, g as getElement, h } from './index-f0f1a8c6.js';
5
+ import { r as registerInstance, c as createEvent, g as getElement, h } from './index-c7d02072.js';
6
6
  import { i as isHTMLElement } from './isHTMLElement-0271eefe.js';
7
7
  import { v as validatePropValue } from './props-3bf7f546.js';
8
8
  import { S as STEPS_SIZE } from './bq-steps.types-3a84b1e3.js';
@@ -74,18 +74,18 @@ const BqStepItem = class {
74
74
  // Always the last one in the class.
75
75
  // ===================================
76
76
  render() {
77
- return (h("div", { key: '0b83690a453edf783ee752888c0557ef8619c04f', class: {
77
+ return (h("div", { key: '1161a3c603b431caa096ef8e0e8e5ab929173c80', class: {
78
78
  'bq-step-item flex gap-s': true,
79
79
  [`bq-step-item--${this.status}`]: true,
80
80
  'pointer-events-none opacity-60': this.isDisabled,
81
- }, part: "base" }, h("div", { key: 'c20c2a316726878841679080075f38b7c840662d', class: `bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}` }, h("slot", { key: 'd1964706f6b54b97f5d0ee553e502e7cc58fd08a', name: "prefix", onSlotchange: this.handleIconPrefix })), h("div", { key: '81e1d2d5465b7b2f6d5db1a138e70e895c40139a', class: "bq-step-item__content" }, h("div", { key: '5701bc95e68376ac83bafa00a2a413786a62fbd3', class: {
81
+ }, part: "base" }, h("div", { key: '84901faf3c3b314f9fbe6f5169a9ba7b3bc2cf75', class: `bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}` }, h("slot", { key: '1e8f12cbbd3f87a439b4c71653c5ab592c3f62e4', name: "prefix", onSlotchange: this.handleIconPrefix })), h("div", { key: '4411789c420bc5b25c16cf5c159a3b7960df6974', class: "bq-step-item__content" }, h("div", { key: '84449ef9359c2f46620e4f4fabd3cab4dfc0a4a5', class: {
82
82
  'bq-step-item__content--title pe-xs3 text-m leading-regular text-primary': true,
83
83
  'pointer-events-none': this.isDisabled,
84
84
  'text-brand': this.isCurrent,
85
- }, part: "title" }, h("slot", { key: '027b7bd5777d656bbdff56f8c083dde98e049274' })), h("div", { key: 'c64e30109b64ff5c9c98601cc6ac6c06c1ad0fa3', class: {
85
+ }, part: "title" }, h("slot", { key: 'b26efa3c0d9bdb6e3691d947d018597114103b2b' })), h("div", { key: 'cfe3ba67018815d685815bf52d75d1225d81b113', class: {
86
86
  'bq-step-item__content--description text-s leading-regular opacity-60': true,
87
87
  'opacity-60': this.isDisabled,
88
- }, part: "description" }, h("slot", { key: '72c833051e1ab88aad6f33a9d46b84f09915a943', name: "description" })))));
88
+ }, part: "description" }, h("slot", { key: '97be3adf391e9f125c65435fd5e8a8db2b029dad', name: "description" })))));
89
89
  }
90
90
  static get watchers() { return {
91
91
  "size": ["checkPropValues"],
@@ -1 +1 @@
1
- {"file":"bq-step-item.entry.js","mappings":";;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAU;;ACAjG,MAAM,aAAa,GAAG,sguBAAsguB,CAAC;AAC7huB,yBAAe,aAAa;;MCef,UAAU;;;;oBAgBwB,QAAQ;sBAGD,SAAS;;;;;;IAU7D,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;QAElE,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;;;;;IAOQ,OAAO,CAAiE;;;;IAMjF,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;KACxB;IAED,iBAAiB;QACf,IA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DACE,KAAK,EAAE;gBACL,sEAAsE,EAAE,IAAI;gBAC5E,YAAY,EAAE,IAAI,CAAC,UAAU;aAC9B,EACD,IAAI,EAAC,aAAa,IAElB,6DAAM,IAAI,EAAC,aAAa,GAAG,CACvB,CACF,CACF,EACN;KACH;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/step-item/bq-step-item.types.ts","../../packages/beeq/src/components/step-item/scss/bq-step-item.scss?tag=bq-step-item&encapsulation=shadow","../../packages/beeq/src/components/step-item/bq-step-item.tsx"],"sourcesContent":["export const STEP_ITEM_STATUS = ['default', 'current', 'completed', 'error', 'disabled'] as const;\nexport type TStepItemStatus = (typeof STEP_ITEM_STATUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Step item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-step-item.variables';\n\n:host {\n --bq-icon--color: theme(stroke.icon.primary);\n\n @apply bg-primary;\n}\n\n.bq-step-item__prefix.dot,\n.bq-step-item__prefix.icon {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color);\n }\n\n &.current {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-current);\n }\n }\n\n &.completed {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-completed);\n }\n }\n\n &.error {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-error);\n }\n }\n\n &.disabled {\n ::slotted(bq-icon) {\n opacity: 0.6;\n }\n }\n}\n\n.bq-step-item__prefix.numeric {\n @apply flex items-center justify-center rounded-full;\n @apply bg-[--bq-step-item--prefix-num-bg-color] bs-[--bq-step-item--prefix-num-size] is-[--bq-step-item--prefix-num-size];\n @apply text-m font-semibold leading-regular;\n\n &.small {\n @apply text-s [--bq-step-item--prefix-num-size:--bq-spacing-l];\n }\n\n // Status\n\n &.current {\n @apply bg-[var(--bq-step-item--prefix-color-current)] text-alt;\n }\n\n &.completed {\n @apply bg-ui-success-alt text-success;\n }\n\n &.error {\n @apply bg-ui-danger-alt text-danger;\n }\n\n &.disabled {\n @apply opacity-60;\n }\n}\n\n.bq-step-item__content--description::slotted(*) {\n @apply text-s leading-regular opacity-60;\n}\n","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 * @part base - The component's base wrapper.\n * @part title - The component's title.\n * @part description - The component's description.\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"],"version":3}
1
+ {"file":"bq-step-item.entry.js","mappings":";;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAU;;ACAjG,MAAM,aAAa,GAAG,sguBAAsguB,CAAC;AAC7huB,yBAAe,aAAa;;MC+Cf,UAAU;;;;oBAgBwB,QAAQ;sBAGD,SAAS;;;;;;IAU7D,eAAe;QACb,iBAAiB,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,E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AC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,EACN,4DAAK,KAAK,EAAC,uBAAuB,IAEhC,4DACE,KAAK,EAAE;gBACL,yEAAyE,EAAE,IAAI;gBAC/E,qBAAqB,EAAE,IAAI,CAAC,UAAU;gBACtC,YAAY,EAAE,IAAI,CAAC,SAAS;aAC7B,EACD,IAAI,EAAC,OAAO,IAEZ,8DAAQ,CACJ,EAEN,4DACE,KAAK,EAAE;gBACL,sEAAsE,EAAE,IAAI;gBAC5E,YAAY,EAAE,IAAI,CAAC,UAAU;aAC9B,EACD,IAAI,EAAC,aAAa,IAElB,6DAAM,IAAI,EAAC,aAAa,GAAG,CACvB,CACF,CACF,EACN;KACH;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/step-item/bq-step-item.types.ts","../../packages/beeq/src/components/step-item/scss/bq-step-item.scss?tag=bq-step-item&encapsulation=shadow","../../packages/beeq/src/components/step-item/bq-step-item.tsx"],"sourcesContent":["export const STEP_ITEM_STATUS = ['default', 'current', 'completed', 'error', 'disabled'] as const;\nexport type TStepItemStatus = (typeof STEP_ITEM_STATUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Step item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-step-item.variables';\n\n:host {\n --bq-icon--color: theme(stroke.icon.primary);\n\n @apply bg-primary;\n}\n\n.bq-step-item__prefix.dot,\n.bq-step-item__prefix.icon {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color);\n }\n\n &.current {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-current);\n }\n }\n\n &.completed {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-completed);\n }\n }\n\n &.error {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-error);\n }\n }\n\n &.disabled {\n ::slotted(bq-icon) {\n opacity: 0.6;\n }\n }\n}\n\n.bq-step-item__prefix.numeric {\n @apply flex items-center justify-center rounded-full;\n @apply bg-[--bq-step-item--prefix-num-bg-color] bs-[--bq-step-item--prefix-num-size] is-[--bq-step-item--prefix-num-size];\n @apply text-m font-semibold leading-regular;\n\n &.small {\n @apply text-s [--bq-step-item--prefix-num-size:--bq-spacing-l];\n }\n\n // Status\n\n &.current {\n @apply bg-[var(--bq-step-item--prefix-color-current)] text-alt;\n }\n\n &.completed {\n @apply bg-ui-success-alt text-success;\n }\n\n &.error {\n @apply bg-ui-danger-alt text-danger;\n }\n\n &.disabled {\n @apply opacity-60;\n }\n}\n\n.bq-step-item__content--description::slotted(*) {\n @apply text-s leading-regular opacity-60;\n}\n","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"],"version":3}
@@ -2,7 +2,7 @@
2
2
  * Built by Endavans
3
3
  * © https://beeq.design - Apache 2 License.
4
4
  */
5
- import { r as registerInstance, g as getElement, h } from './index-f0f1a8c6.js';
5
+ import { r as registerInstance, g as getElement, h } from './index-c7d02072.js';
6
6
  import { S as STEPS_SIZE, a as STEPS_TYPE } from './bq-steps.types-3a84b1e3.js';
7
7
  import { v as validatePropValue } from './props-3bf7f546.js';
8
8
 
@@ -68,7 +68,7 @@ const BqSteps = class {
68
68
  // ===================================
69
69
  render() {
70
70
  const dividerPaddingTop = this.size === 'small' ? 'p-bs-s' : 'p-bs-m';
71
- return (h("div", { key: '0db3af56983cb0a41fc4bca5ca93d4455d52bd19', class: "relative flex w-full items-start justify-between", ref: (div) => (this.stepElem = div), part: "container" }, h("slot", { key: '05ec86abb032fd6f0d17b77228fa6f2a3ab38c8d' }), h("bq-divider", { key: 'a5444e7a1d01284d048d9f24015643d7740d0820', class: `absolute -z-10 p-i-s inset-ie-0 inset-is-0 ${dividerPaddingTop}`, strokeColor: this.dividerColor, strokeThickness: 2, exportparts: "base:divider-base,dash-start:divider-dash-start,dash-end:divider-dash-end" })));
71
+ return (h("div", { key: '3dce87e1c73302eca5f4f7ddf8608318ceae1938', class: "relative flex w-full items-start justify-between", ref: (div) => (this.stepElem = div), part: "container" }, h("slot", { key: '5d55a7c2244bcdaab1ecc90365ac0e35b6f940e9' }), h("bq-divider", { key: '337a125bde11140ab4dff1fef10797b13613d182', class: `absolute -z-10 p-i-s inset-ie-0 inset-is-0 ${dividerPaddingTop}`, strokeColor: this.dividerColor, strokeThickness: 2, exportparts: "base:divider-base,dash-start:divider-dash-start,dash-end:divider-dash-end" })));
72
72
  }
73
73
  static get watchers() { return {
74
74
  "type": ["checkPropValues"],
@@ -1 +1 @@
1
- {"file":"bq-steps.entry.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,w+nBAAw+nB,CAAC;AAC5/nB,sBAAe,UAAU;;MCeZ,OAAO;;;4BAmB8B,iBAAiB;oBAGrB,QAAQ;;;;;IAlB5C,QAAQ,CAAc;;;;IA4B9B,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;KACzB;;;;;;;IASD,gBAAgB;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;;;;;;;;;;;;;IAiBD,IAAY,OAAO;QACjB,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CACzD,CAAC,EAA6B,KAAK,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,cAAc,CAChD,CAAC;KAClC;IAEO,gBAAgB,GAAG;QACzB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,UAAiC;YACrD,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YAC5B,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SAC7B,CAAC,CAAC;KACJ,CAAC;;;;;;;IAUF,MAAM;QACJ,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;QAEtE,QACE,4DACE,KAAK,EAAC,kDAAkD,EACxD,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,WAAW,IAEhB,8DAAQ,EACR,mEACE,KAAK,EAAE,8CAA8C,iBAAiB,EAAE,EACxE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,CAAC,EAClB,WAAW,EAAC,2EAA2E,GACvF,CACE,EACN;KACH;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/steps/scss/bq-steps.scss?tag=bq-steps&encapsulation=shadow","../../packages/beeq/src/components/steps/bq-steps.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Steps styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-steps.variables';\n\n:host {\n @apply block;\n}\n\n::slotted(bq-step-item:not(:first-child)) {\n @apply ps-[--bq-steps--gap];\n}\n\n::slotted(bq-step-item:not(:last-child)) {\n @apply pe-[--bq-steps--gap];\n}\n","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 * @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@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"],"version":3}
1
+ {"file":"bq-steps.entry.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,w+nBAAw+nB,CAAC;AAC5/nB,sBAAe,UAAU;;MC0CZ,OAAO;;;4BAmB8B,iBAAiB;oBAGrB,QAAQ;;;;;IAlB5C,QAAQ,CAAc;;;;IA4B9B,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;KACzB;;;;;;;IASD,gBAAgB;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;;;;;;;;;;;;;IAiBD,IAAY,OAAO;QACjB,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CACzD,CAAC,EAA6B,KAAK,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,cAAc,CAChD,CAAC;KAClC;IAEO,gBAAgB,GAAG;QACzB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,UAAiC;YACrD,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YAC5B,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SAC7B,CAAC,CAAC;KACJ,CAAC;;;;;;;IAUF,MAAM;QACJ,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;QAEtE,QACE,4DACE,KAAK,EAAC,kDAAkD,EACxD,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,WAAW,IAEhB,8DAAQ,EACR,mEACE,KAAK,EAAE,8CAA8C,iBAAiB,EAAE,EACxE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,CAAC,EAClB,WAAW,EAAC,2EAA2E,GACvF,CACE,EACN;KACH;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/steps/scss/bq-steps.scss?tag=bq-steps&encapsulation=shadow","../../packages/beeq/src/components/steps/bq-steps.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Steps styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-steps.variables';\n\n:host {\n @apply block;\n}\n\n::slotted(bq-step-item:not(:first-child)) {\n @apply ps-[--bq-steps--gap];\n}\n\n::slotted(bq-step-item:not(:last-child)) {\n @apply pe-[--bq-steps--gap];\n}\n","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"],"version":3}