@beeq/core 1.8.0-beta.14 → 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-c8f639ab.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-382eea5f.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-8e9f0bf3.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-59b33ad7.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 +14 -3
  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-0875b715.entry.js +0 -6
  529. package/dist/beeq/p-0875b715.entry.js.map +0 -1
  530. package/dist/beeq/p-0ff234ec.entry.js.map +0 -1
  531. package/dist/beeq/p-1d67af77.entry.js.map +0 -1
  532. package/dist/beeq/p-25365502.entry.js +0 -6
  533. package/dist/beeq/p-25365502.entry.js.map +0 -1
  534. package/dist/beeq/p-350cd07e.entry.js.map +0 -1
  535. package/dist/beeq/p-382eea5f.entry.js.map +0 -1
  536. package/dist/beeq/p-42d22a31.entry.js.map +0 -1
  537. package/dist/beeq/p-439583bc.entry.js.map +0 -1
  538. package/dist/beeq/p-457ab863.entry.js.map +0 -1
  539. package/dist/beeq/p-47d41233.entry.js.map +0 -1
  540. package/dist/beeq/p-4f47130c.entry.js.map +0 -1
  541. package/dist/beeq/p-5b5f9a2a.entry.js.map +0 -1
  542. package/dist/beeq/p-5da52049.js +0 -7
  543. package/dist/beeq/p-5da52049.js.map +0 -1
  544. package/dist/beeq/p-63941636.entry.js +0 -6
  545. package/dist/beeq/p-63941636.entry.js.map +0 -1
  546. package/dist/beeq/p-6482a62d.entry.js.map +0 -1
  547. package/dist/beeq/p-64ddef8a.entry.js +0 -6
  548. package/dist/beeq/p-64ddef8a.entry.js.map +0 -1
  549. package/dist/beeq/p-70ae504a.entry.js.map +0 -1
  550. package/dist/beeq/p-81b6556f.entry.js.map +0 -1
  551. package/dist/beeq/p-854e2114.entry.js.map +0 -1
  552. package/dist/beeq/p-8b595d1f.entry.js.map +0 -1
  553. package/dist/beeq/p-8e9f0bf3.entry.js.map +0 -1
  554. package/dist/beeq/p-94ca5709.entry.js +0 -6
  555. package/dist/beeq/p-94ca5709.entry.js.map +0 -1
  556. package/dist/beeq/p-96793709.entry.js.map +0 -1
  557. package/dist/beeq/p-99668b08.entry.js.map +0 -1
  558. package/dist/beeq/p-a0d6207d.entry.js.map +0 -1
  559. package/dist/beeq/p-a6094ed8.entry.js.map +0 -1
  560. package/dist/beeq/p-a89bfbd8.entry.js.map +0 -1
  561. package/dist/beeq/p-b9171e19.entry.js.map +0 -1
  562. package/dist/beeq/p-bdf2ea24.entry.js.map +0 -1
  563. package/dist/beeq/p-be234206.entry.js.map +0 -1
  564. package/dist/beeq/p-c8f639ab.entry.js.map +0 -1
  565. package/dist/beeq/p-cc83682b.entry.js.map +0 -1
  566. package/dist/beeq/p-d2c20a92.entry.js.map +0 -1
  567. package/dist/beeq/p-d7507599.entry.js.map +0 -1
  568. package/dist/beeq/p-def8acd7.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-59b33ad7.js.map +0 -1
  579. package/dist/components/p-641036af.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
@@ -5,6 +5,35 @@
5
5
  import { h } from "@stencil/core";
6
6
  import { clamp, debounce, isNil, isString } from "../../shared/utils";
7
7
  /**
8
+ * Sliders provide a visual representation of adjustable content, enabling users to change values by dragging a handle along a horizontal track.
9
+ *
10
+ * @example How to use it
11
+ * ```html
12
+ * <bq-slider max="100" value="30"></bq-slider>
13
+ * ```
14
+ *
15
+ * @documentation https://www.beeq.design/3d466e231/p/509cbc-slider/b/09d7b1
16
+ * @status stable
17
+ *
18
+ * @dependency bq-tooltip
19
+ *
20
+ * @attr {number} debounce-time - The amount of time, in milliseconds, to wait to trigger the bqChange event after each value change.
21
+ * @attr {boolean} disabled - If `true` the slider is disabled.
22
+ * @attr {boolean} enable-tooltip - If `true`, a tooltip will be shown displaying the progress value.
23
+ * @attr {boolean} enable-value-indicator - If `true` it will show the value label on the side of the slider track area.
24
+ * @attr {number} gap - A number representing the amount to remain between the minimum and maximum values (only for range type).
25
+ * @attr {number} max - A number representing the max value of the slider.
26
+ * @attr {number} min - A number representing the min value of the slider.
27
+ * @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.
28
+ * @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.
29
+ * @attr {"range" | "single"} type - It defines the type of slider to display.
30
+ * @attr {"[number, number]" | "number" | "string"} value - The value of the slider. If the slider type is single, the value is a number.
31
+ * 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).
32
+ *
33
+ * @event bqBlur - Handler to be called when the slider loses focus.
34
+ * @event bqChange - Handler to be called when changing the value on range inputs.
35
+ * @event bqFocus - Handler to be called when the slider gets focused.
36
+ *
8
37
  * @part base - The component's base wrapper.
9
38
  * @part container - The container of the slider.
10
39
  * @part track-area - The track area of the slider.
@@ -13,6 +42,12 @@ import { clamp, debounce, isNil, isString } from "../../shared/utils";
13
42
  * @part input-max - The input element for the maximum value.
14
43
  * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.
15
44
  * @part label-end - The label for maximum value when the slider type is `range`.
45
+ *
46
+ * @cssprop --bq-slider--size - The height of the slider track/progress area
47
+ * @cssprop --bq-slider--border-radius - Slider border radius
48
+ * @cssprop --bq-slider--thumb-size - Slider hover thumb size
49
+ * @cssprop --bq-slider--progress-color - Slider progress background color
50
+ * @cssprop --bq-slider--trackarea-color - Slider track background color
16
51
  */
17
52
  export class BqSlider {
18
53
  constructor() {
@@ -26,6 +61,7 @@ export class BqSlider {
26
61
  this.gap = 0;
27
62
  this.max = 100;
28
63
  this.min = 0;
64
+ this.name = undefined;
29
65
  this.step = 1;
30
66
  this.type = 'single';
31
67
  this.value = undefined;
@@ -43,6 +79,7 @@ export class BqSlider {
43
79
  debounceBqChange;
44
80
  // Reference to host HTML element
45
81
  // ===================================
82
+ internals;
46
83
  el;
47
84
  // Prop lifecycle events
48
85
  // =======================
@@ -75,9 +112,6 @@ export class BqSlider {
75
112
  // Component lifecycle events
76
113
  // Ordered by their natural call order
77
114
  // =====================================
78
- connectedCallback() {
79
- this.init();
80
- }
81
115
  componentWillLoad() {
82
116
  this.init();
83
117
  }
@@ -87,6 +121,9 @@ export class BqSlider {
87
121
  componentDidUpdate() {
88
122
  this.runUpdates();
89
123
  }
124
+ formAssociatedCallback() {
125
+ this.internals?.setFormValue(`${this.value}`);
126
+ }
90
127
  // Listeners
91
128
  // ==============
92
129
  // Public methods API
@@ -141,7 +178,9 @@ export class BqSlider {
141
178
  target.setAttribute('value', reflectedValue);
142
179
  // Sync the prop value.
143
180
  // This will trigger the `@Watch('value')` method and emit the `bqChange` event.
144
- this.value = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;
181
+ const { internals, isRangeType, maxValue, minValue } = this;
182
+ this.value = isRangeType ? [minValue, maxValue] : minValue;
183
+ internals?.setFormValue(isRangeType ? JSON.stringify(this.value) : this.value.toString());
145
184
  };
146
185
  calculatePercent = (value) => {
147
186
  const totalRange = Number(this.max) - Number(this.min);
@@ -229,7 +268,7 @@ export class BqSlider {
229
268
  return (h("input", { type: "range", class: {
230
269
  '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,
231
270
  'pointer-events-none': this.isRangeType,
232
- }, 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}` }));
271
+ }, 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}` }));
233
272
  };
234
273
  renderTooltip = (value, thumbPosition, refCallback) => (h("bq-tooltip", { class: {
235
274
  'absolute [&::part(panel)]:absolute': true,
@@ -239,7 +278,7 @@ export class BqSlider {
239
278
  // Always the last one in the class.
240
279
  // ===================================
241
280
  render() {
242
- 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 &&
281
+ 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 &&
243
282
  this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem)), this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input)), this.enableTooltip &&
244
283
  this.isRangeType &&
245
284
  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')));
@@ -247,6 +286,7 @@ export class BqSlider {
247
286
  static get is() { return "bq-slider"; }
248
287
  static get encapsulation() { return "shadow"; }
249
288
  static get delegatesFocus() { return true; }
289
+ static get formAssociated() { return true; }
250
290
  static get originalStyleUrls() {
251
291
  return {
252
292
  "$": ["./scss/bq-slider.scss"]
@@ -273,6 +313,8 @@ export class BqSlider {
273
313
  "tags": [],
274
314
  "text": "The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change."
275
315
  },
316
+ "getter": false,
317
+ "setter": false,
276
318
  "attribute": "debounce-time",
277
319
  "reflect": true,
278
320
  "defaultValue": "0"
@@ -291,6 +333,8 @@ export class BqSlider {
291
333
  "tags": [],
292
334
  "text": "If `true` the slider is disabled."
293
335
  },
336
+ "getter": false,
337
+ "setter": false,
294
338
  "attribute": "disabled",
295
339
  "reflect": true,
296
340
  "defaultValue": "false"
@@ -309,6 +353,8 @@ export class BqSlider {
309
353
  "tags": [],
310
354
  "text": "If `true` it will show the value label on a side of the slider track area"
311
355
  },
356
+ "getter": false,
357
+ "setter": false,
312
358
  "attribute": "enable-value-indicator",
313
359
  "reflect": true,
314
360
  "defaultValue": "false"
@@ -327,6 +373,8 @@ export class BqSlider {
327
373
  "tags": [],
328
374
  "text": "A number representing the amount to remain between the minimum and maximum values (only for range type)."
329
375
  },
376
+ "getter": false,
377
+ "setter": false,
330
378
  "attribute": "gap",
331
379
  "reflect": true,
332
380
  "defaultValue": "0"
@@ -345,6 +393,8 @@ export class BqSlider {
345
393
  "tags": [],
346
394
  "text": "A number representing the max value of the slider."
347
395
  },
396
+ "getter": false,
397
+ "setter": false,
348
398
  "attribute": "max",
349
399
  "reflect": true,
350
400
  "defaultValue": "100"
@@ -363,10 +413,31 @@ export class BqSlider {
363
413
  "tags": [],
364
414
  "text": "A number representing the min value of the slider."
365
415
  },
416
+ "getter": false,
417
+ "setter": false,
366
418
  "attribute": "min",
367
419
  "reflect": true,
368
420
  "defaultValue": "0"
369
421
  },
422
+ "name": {
423
+ "type": "string",
424
+ "mutable": false,
425
+ "complexType": {
426
+ "original": "string",
427
+ "resolved": "string",
428
+ "references": {}
429
+ },
430
+ "required": false,
431
+ "optional": false,
432
+ "docs": {
433
+ "tags": [],
434
+ "text": "Name of the form control. Submitted with the form as part of a name/value pair"
435
+ },
436
+ "getter": false,
437
+ "setter": false,
438
+ "attribute": "name",
439
+ "reflect": true
440
+ },
370
441
  "step": {
371
442
  "type": "number",
372
443
  "mutable": false,
@@ -381,6 +452,8 @@ export class BqSlider {
381
452
  "tags": [],
382
453
  "text": "A number representing the step of the slider.\n\u26A0\uFE0F Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`."
383
454
  },
455
+ "getter": false,
456
+ "setter": false,
384
457
  "attribute": "step",
385
458
  "reflect": true,
386
459
  "defaultValue": "1"
@@ -405,6 +478,8 @@ export class BqSlider {
405
478
  "tags": [],
406
479
  "text": "It defines the type of slider to display"
407
480
  },
481
+ "getter": false,
482
+ "setter": false,
408
483
  "attribute": "type",
409
484
  "reflect": true,
410
485
  "defaultValue": "'single'"
@@ -429,6 +504,8 @@ export class BqSlider {
429
504
  "tags": [],
430
505
  "text": "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)."
431
506
  },
507
+ "getter": false,
508
+ "setter": false,
432
509
  "attribute": "value",
433
510
  "reflect": true
434
511
  },
@@ -446,6 +523,8 @@ export class BqSlider {
446
523
  "tags": [],
447
524
  "text": "If `true`, a tooltip will be shown displaying the progress value"
448
525
  },
526
+ "getter": false,
527
+ "setter": false,
449
528
  "attribute": "enable-tooltip",
450
529
  "reflect": true,
451
530
  "defaultValue": "false"
@@ -464,6 +543,8 @@ export class BqSlider {
464
543
  "tags": [],
465
544
  "text": "If `true`, a tooltip will always display the progress value.\nIt relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true."
466
545
  },
546
+ "getter": false,
547
+ "setter": false,
467
548
  "attribute": "tooltip-always-visible",
468
549
  "reflect": true,
469
550
  "defaultValue": "false"
@@ -563,5 +644,6 @@ export class BqSlider {
563
644
  "methodName": "handleGapChange"
564
645
  }];
565
646
  }
647
+ static get attachInternalsMemberName() { return "internals"; }
566
648
  }
567
649
  //# sourceMappingURL=bq-slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bq-slider.js","sourceRoot":"","sources":["../../../../../../src/components/slider/bq-slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG/F,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AAEjF;;;;;;;;;GASG;AAQH,MAAM,OAAO,QAAQ;;;;;;4BAqCqB,CAAC;wBAGJ,KAAK;oCAGO,KAAK;mBAGR,CAAC;mBAGhB,GAAG;mBAGH,CAAC;oBAMA,CAAC;oBAGY,QAAQ;;6BAUH,KAAK;oCAME,KAAK;;IA5E9D,iBAAiB;IACjB,uBAAuB;IAEf,YAAY,CAAmB;IAC/B,YAAY,CAAmB;IAC/B,cAAc,CAAuB;IACrC,cAAc,CAAuB;IACrC,YAAY,CAAkB;IAC9B,SAAS,CAAkB;IAC3B,gBAAgB,CAAkB;IAE1C,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IAgEpC,wBAAwB;IACxB,0BAA0B;IAG1B,qBAAqB,CAAC,QAAsB;QAC1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAGD,oBAAoB;QAClB,IAAI,CAAC,QAAQ,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AAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;gBAE9E,IAAI,CAAC,aAAa;oBACjB,IAAI,CAAC,WAAW;oBAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;gBAEjG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F;YAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { 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"]}
1
+ {"version":3,"file":"bq-slider.js","sourceRoot":"","sources":["../../../../../../src/components/slider/bq-slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGhH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AASH,MAAM,OAAO,QAAQ;;;;;;4BAsCqB,CAAC;wBAGJ,KAAK;oCAGO,KAAK;mBAGR,CAAC;mBAGhB,GAAG;mBAGH,CAAC;;oBASA,CAAC;oBAGY,QAAQ;;6BAUH,KAAK;oCAME,KAAK;;IAhF9D,iBAAiB;IACjB,uBAAuB;IAEf,YAAY,CAAmB;IAC/B,YAAY,CAAmB;IAC/B,cAAc,CAAuB;IACrC,cAAc,CAAuB;IACrC,YAAY,CAAkB;IAC9B,SAAS,CAAkB;IAC3B,gBAAgB,CAAkB;IAE1C,iCAAiC;IACjC,sCAAsC;IAEnB,SAAS,CAAoB;IACrC,EAAE,CAAuB;IAmEpC,wBAAwB;IACxB,0BAA0B;IAG1B,qBAAqB,CAAC,QAAsB;QAC1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;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,I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cesContent":["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"]}
@@ -8,10 +8,36 @@ import { getCSSVariableValue, getTextContent, hasSlotContent, isHTMLElement, isN
8
8
  /**
9
9
  * Spinners are designed for users to display data loading.
10
10
  *
11
+ * @example How to use it
12
+ * ```html
13
+ * <bq-spinner size="medium" text-position="bellow">
14
+ * <span>Loading...</span>
15
+ * </bq-spinner>
16
+ * ```
17
+ *
18
+ * @documentation https://www.beeq.design/3d466e231/p/275f10-spinner/b/09d7b1
19
+ * @status stable
20
+ *
21
+ * @attr {boolean} animation - If `false`, the animation on the icon element will be stopped.
22
+ * @attr {"small" | "medium" | "large"} size - It defines the size of the icon element displayed.
23
+ * @attr {"above" | "below" | "left" | "right" | "none"} text-position - It defines the position of the label text.
24
+ *
25
+ * @slot icon - The icon slot container.
26
+ * @slot - The content of the spinner component.
27
+ *
11
28
  * @part base - The div wrapper container used under the hood.
12
29
  * @part icon - The `<svg>` icon element used to spin/animate.
13
30
  * @part custom-icon - The `<span>` tag element that holds the custom icon element passed.
14
31
  * @part text - The `<span>` tag element that renders the label text inside the component.
32
+ *
33
+ * @cssprop --bq-spinner--color - Spinner color
34
+ * @cssprop --bq-spinner--size-large - Spinner large size
35
+ * @cssprop --bq-spinner--size-medium - Spinner medium size
36
+ * @cssprop --bq-spinner--size-small - Spinner small size
37
+ * @cssprop --bq-spinner--large-text-fontSize - Spinner large text font size
38
+ * @cssprop --bq-spinner--medium-text-fontSize - Spinner medium text font size
39
+ * @cssprop --bq-spinner--small-text-fontSize - Spinner small text font size
40
+ * @cssprop --bq-spinner--text-lineHeight - Spinner text line height
15
41
  */
16
42
  export class BqSpinner {
17
43
  constructor() {
@@ -116,18 +142,18 @@ export class BqSpinner {
116
142
  // Always the last one in the class.
117
143
  // ===================================
118
144
  render() {
119
- return (h("div", { key: '16c6b705d29da31217a216a1f3112541406bab57', class: {
145
+ return (h("div", { key: '7ab7672b53b13d46e00dd329c57261cc790f8cbf', class: {
120
146
  [`bq-spinner ${this.size} text-${this.textPosition}`]: true,
121
147
  'is-animated': this.animation,
122
148
  'has-text': !!this.slotContentLength,
123
- }, 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: {
149
+ }, 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: {
124
150
  'bq-spinner--icon': true,
125
151
  flex: this.hasIconSlot,
126
152
  '!hidden': !this.hasIconSlot,
127
- }, ref: (spanElem) => (this.iconSlotElem = spanElem), part: "custom-icon" }, h("slot", { key: 'd574885b176b5b6a9e1b5257c2612266b9d90bf2', name: "icon", onSlotchange: this.handleIconSlotChange })), h("span", { key: '49b9c8be9ec8c9b3f1a67e0ef84a311d43838f77', class: {
153
+ }, ref: (spanElem) => (this.iconSlotElem = spanElem), part: "custom-icon" }, h("slot", { key: '2320f1cd826edc72e0f336453dd40d2aa18232f0', name: "icon", onSlotchange: this.handleIconSlotChange })), h("span", { key: '2363b72b6d4aac070c3d1e0124deabc9ed67c387', class: {
128
154
  'bq-spinner--text font-medium leading-regular text-primary': true,
129
155
  '!hidden': !this.isTextDisplayed,
130
- }, part: "text", ref: (spanElem) => (this.slotElem = spanElem) }, h("slot", { key: '14f3152ae4ee47e9c5d56cdc7402d9aeca07420b', onSlotchange: this.handleSlotChange }))));
156
+ }, part: "text", ref: (spanElem) => (this.slotElem = spanElem) }, h("slot", { key: '2f919bcbe1cf1b9e802105ab75f0617e068e8eec', onSlotchange: this.handleSlotChange }))));
131
157
  }
132
158
  static get is() { return "bq-spinner"; }
133
159
  static get encapsulation() { return "shadow"; }
@@ -157,6 +183,8 @@ export class BqSpinner {
157
183
  "tags": [],
158
184
  "text": "If `false`, the animation on the icon element will be stopped"
159
185
  },
186
+ "getter": false,
187
+ "setter": false,
160
188
  "attribute": "animation",
161
189
  "reflect": true,
162
190
  "defaultValue": "true"
@@ -181,6 +209,8 @@ export class BqSpinner {
181
209
  "tags": [],
182
210
  "text": "It defines the position of the label text"
183
211
  },
212
+ "getter": false,
213
+ "setter": false,
184
214
  "attribute": "text-position",
185
215
  "reflect": true,
186
216
  "defaultValue": "'none'"
@@ -205,6 +235,8 @@ export class BqSpinner {
205
235
  "tags": [],
206
236
  "text": "It defines the size of the icon element displayed"
207
237
  },
238
+ "getter": false,
239
+ "setter": false,
208
240
  "attribute": "size",
209
241
  "reflect": true,
210
242
  "defaultValue": "'medium'"
@@ -1 +1 @@
1
- {"version":3,"file":"bq-spinner.js","sourceRoot":"","sources":["../../../../../../src/components/spinner/bq-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAsC,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,aAAa,EACb,KAAK,EACL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AAMH,MAAM,OAAO,SAAS;;2BAoBW,KAAK;uBACT,KAAK;iCACK,CAAC;yBAMA,IA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C,0NAA0N,EAC5N,OAAO,EAAC,IAAI,GACZ,CACE,CACF,CACP;YACD,6DACE,KAAK,EAAE;oBACL,kBAAkB,EAAE,IAAI;oBACxB,IAAI,EAAE,IAAI,CAAC,WAAW;oBACtB,SAAS,EAAE,CAAC,IAAI,CAAC,WAAW;iBAC7B,EACD,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EACjD,IAAI,EAAC,aAAa;gBAElB,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,GAAI,CACxD;YACP,6DACE,KAAK,EAAE;oBACL,2DAA2D,EAAE,IAAI;oBACjE,SAAS,EAAE,CAAC,IAAI,CAAC,eAAe;iBACjC,EACD,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAE7C,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACxC,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { SPINNER_SIZE, SPINNER_TEXT_POSITION, TSpinnerSize, TSpinnerTextPosition } from './bq-spinner.types';\nimport {\n getCSSVariableValue,\n getTextContent,\n hasSlotContent,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\n\n/**\n * Spinners are designed for users to display data loading.\n *\n * @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"]}
1
+ {"version":3,"file":"bq-spinner.js","sourceRoot":"","sources":["../../../../../../src/components/spinner/bq-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAsC,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,aAAa,EACb,KAAK,EACL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAMH,MAAM,OAAO,SAAS;;2BAoBW,KAAK;uBACT,KAAK;iCACK,CAAC;yBAMA,IAAI;4BAGoB,MAAM;oBAGtB,QAAQ;;IAjCtD,iBAAiB;IACjB,uBAAuB;IAEf,YAAY,CAAc;IAC1B,QAAQ,CAAc;IACtB,QAAQ,GAAqB,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;QACtE,MAAM,CAAC,QAAQ,CA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D,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EACjD,IAAI,EAAC,aAAa;gBAElB,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,GAAI,CACxD;YACP,6DACE,KAAK,EAAE;oBACL,2DAA2D,EAAE,IAAI;oBACjE,SAAS,EAAE,CAAC,IAAI,CAAC,eAAe;iBACjC,EACD,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAE7C,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACxC,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { SPINNER_SIZE, SPINNER_TEXT_POSITION, TSpinnerSize, TSpinnerTextPosition } from './bq-spinner.types';\nimport {\n getCSSVariableValue,\n getTextContent,\n hasSlotContent,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\n\n/**\n * Spinners are designed for users to display data loading.\n *\n * @example How to use it\n * ```html\n * <bq-spinner size=\"medium\" text-position=\"bellow\">\n * <span>Loading...</span>\n * </bq-spinner>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/275f10-spinner/b/09d7b1\n * @status stable\n *\n * @attr {boolean} animation - If `false`, the animation on the icon element will be stopped.\n * @attr {\"small\" | \"medium\" | \"large\"} size - It defines the size of the icon element displayed.\n * @attr {\"above\" | \"below\" | \"left\" | \"right\" | \"none\"} text-position - It defines the position of the label text.\n *\n * @slot icon - The icon slot container.\n * @slot - The content of the spinner component.\n *\n * @part base - The div wrapper container used under the hood.\n * @part icon - The `<svg>` icon element used to spin/animate.\n * @part custom-icon - The `<span>` tag element that holds the custom icon element passed.\n * @part text - The `<span>` tag element that renders the label text inside the component.\n *\n * @cssprop --bq-spinner--color - Spinner color\n * @cssprop --bq-spinner--size-large - Spinner large size\n * @cssprop --bq-spinner--size-medium - Spinner medium size\n * @cssprop --bq-spinner--size-small - Spinner small size\n * @cssprop --bq-spinner--large-text-fontSize - Spinner large text font size\n * @cssprop --bq-spinner--medium-text-fontSize - Spinner medium text font size\n * @cssprop --bq-spinner--small-text-fontSize - Spinner small text font size\n * @cssprop --bq-spinner--text-lineHeight - Spinner text line height\n */\n@Component({\n tag: 'bq-spinner',\n styleUrl: './scss/bq-spinner.scss',\n shadow: true,\n})\nexport class BqSpinner {\n // Own Properties\n // ====================\n\n private iconSlotElem: HTMLElement;\n private slotElem: HTMLElement;\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.slotContentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSpinnerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasIconSlot = false;\n @State() private hasSlot = false;\n @State() private slotContentLength = 0;\n\n // Public Property API\n // ========================\n\n /** If `false`, the animation on the icon element will be stopped */\n @Prop({ reflect: true }) animation? = true;\n\n /** It defines the position of the label text */\n @Prop({ reflect: true }) textPosition: TSpinnerTextPosition = 'none';\n\n /** It defines the size of the icon element displayed */\n @Prop({ reflect: true }) size: TSpinnerSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('textPosition')\n handleTextPositionProp() {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n }\n\n @Watch('size')\n handleSizeProp() {\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n this.setIconSize();\n }\n\n @Watch('hasIconSlot')\n handleHasIconSlot() {\n this.setIconSize();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.setIconSize();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n if (!this.slotElem) return;\n\n this.hasSlot = hasSlotContent(this.slotElem);\n if (!this.hasSlot) return;\n\n const slot = this.slotElem.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.slotContentLength = getTextContent(slot, { recurse: true }).length;\n const nodes = slot.assignedNodes({ flatten: true });\n nodes.forEach((node) => {\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n });\n };\n\n private handleIconSlotChange = (): void => {\n this.hasIconSlot = hasSlotContent(this.iconSlotElem, 'icon');\n };\n\n private checkPropValues = (): void => {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n };\n\n private get isTextDisplayed(): boolean {\n return this.textPosition !== 'none';\n }\n\n private setIconSize(): void {\n if (!this.hasIconSlot || !this.bqIcon) return;\n\n this.bqIcon.size = parseInt(getCSSVariableValue(`bq-spinner--size-${this.size}`, this.el)).toString();\n }\n\n private get bqIcon(): HTMLBqIconElement | null {\n if (!this.hasIconSlot) return null;\n\n const slot = this.iconSlotElem.querySelector('slot');\n\n return [...slot.assignedElements({ flatten: true })].filter((el: Element) =>\n isHTMLElement(el, 'bq-icon'),\n )[0] as HTMLBqIconElement;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n [`bq-spinner ${this.size} text-${this.textPosition}`]: true,\n 'is-animated': this.animation,\n 'has-text': !!this.slotContentLength,\n }}\n part=\"base\"\n >\n {!this.hasIconSlot && (\n <div\n class={`bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`}\n aria-label=\"Loading...\"\n role=\"status\"\n >\n <svg class=\"bs-full is-full\" fill=\"currentColor\" viewBox=\"0 0 48 48\">\n <path\n fill=\"currentColor\"\n d=\"M10.27 7.637c-.937-1.117-.798-2.796.415-3.605a24 24 0 0 1 37.09 23.249c-.2 1.444-1.65 2.301-3.064 1.944-1.414-.356-2.25-1.793-2.096-3.242A18.72 18.72 0 0 0 14.102 8.11c-1.237.77-2.895.643-3.832-.474Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M48 24c0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0s24 10.745 24 24ZM5.28 24c0 10.339 8.381 18.72 18.72 18.72 10.339 0 18.72-8.381 18.72-18.72 0-10.339-8.381-18.72-18.72-18.72C13.661 5.28 5.28 13.661 5.28 24Z\"\n opacity=\".1\"\n />\n </svg>\n </div>\n )}\n <span\n class={{\n 'bq-spinner--icon': true,\n flex: this.hasIconSlot,\n '!hidden': !this.hasIconSlot,\n }}\n ref={(spanElem) => (this.iconSlotElem = spanElem)}\n part=\"custom-icon\"\n >\n <slot name=\"icon\" onSlotchange={this.handleIconSlotChange} />\n </span>\n <span\n class={{\n 'bq-spinner--text font-medium leading-regular text-primary': true,\n '!hidden': !this.isTextDisplayed,\n }}\n part=\"text\"\n ref={(spanElem) => (this.slotElem = spanElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n );\n }\n}\n"]}
@@ -6,9 +6,27 @@ import { h } from "@stencil/core";
6
6
  import { STATUS_TYPE } from "./bq-status.types";
7
7
  import { validatePropValue } from "../../shared/utils";
8
8
  /**
9
- * @part base - The component's internal wrapper of the status component
10
- * @part circle - The colored circle that marks the status type
11
- * @part text - The `<div>` container that holds the text label of the status component
9
+ * The Status Component is a UI element that represents the current state or condition of an item, task, or process.
10
+ *
11
+ * @example How to use it
12
+ * ```html
13
+ * <bq-status type="alert">Alert status</bq-status>
14
+ * ```
15
+ *
16
+ * @documentation https://www.beeq.design/3d466e231/p/46c8d5-status/b/09d7b1
17
+ * @status stable
18
+ *
19
+ * @dependency bq-badge
20
+ *
21
+ * @attr {"alert" | "danger" | "info" | "neutral" | "success"} type - It defines the type of status to display.
22
+ *
23
+ * @slot The content of the status component.
24
+ *
25
+ * @part base - The component's internal wrapper of the status component.
26
+ * @part circle - The colored circle that marks the status type.
27
+ * @part text - The `<div>` container that holds the text label of the status component.
28
+ *
29
+ * @cssprop --bq-status-circ - Status circle size.
12
30
  */
13
31
  export class BqStatus {
14
32
  constructor() {
@@ -49,7 +67,7 @@ export class BqStatus {
49
67
  // Always the last one in the class.
50
68
  // ===================================
51
69
  render() {
52
- 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' }))));
70
+ 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' }))));
53
71
  }
54
72
  static get is() { return "bq-status"; }
55
73
  static get encapsulation() { return "shadow"; }
@@ -85,6 +103,8 @@ export class BqStatus {
85
103
  "tags": [],
86
104
  "text": "It defines the type of status to display"
87
105
  },
106
+ "getter": false,
107
+ "setter": false,
88
108
  "attribute": "type",
89
109
  "reflect": true,
90
110
  "defaultValue": "'neutral'"
@@ -1 +1 @@
1
- {"version":3,"file":"bq-status.js","sourceRoot":"","sources":["../../../../../../src/components/status/bq-status.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AAMH,MAAM,OAAO,QAAQ;;oBAgB0B,SAAS;;IAftD,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAC3B,EAAE,CAAuB;IAYpC,wBAAwB;IACxB,0BAA0B;IAE1B,eAAe;QACb,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IACD,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IACD,YAAY;IACZ,iBAAiB;IAEjB,qBAAqB;IACrB,iDAAiD;IACjD,wBAAwB;IACxB,gCAAgC;IAChC,gDAAgD;IAChD,kDAAkD;IAElD,gBAAgB;IAChB,2BAA2B;IAC3B,wDAAwD;IACxD,0DAA0D;IAE1D,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IACtC,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ;YAC9E,iEAAU,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,GAAG;YACzG,4DACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM;gBAEX,8DAAQ,CACJ,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STATUS_TYPE, TStatusType } from './bq-status.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * @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"]}
1
+ {"version":3,"file":"bq-status.js","sourceRoot":"","sources":["../../../../../../src/components/status/bq-status.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAMH,MAAM,OAAO,QAAQ;;oBAgB0B,SAAS;;IAftD,iBAAiB;IACjB,uBAAuB;IAEvB,iCAAiC;IACjC,sCAAsC;IAC3B,EAAE,CAAuB;IAYpC,wBAAwB;IACxB,0BAA0B;IAE1B,eAAe;QACb,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IACD,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IACD,YAAY;IACZ,iBAAiB;IAEjB,qBAAqB;IACrB,iDAAiD;IACjD,wBAAwB;IACxB,gCAAgC;IAChC,gDAAgD;IAChD,kDAAkD;IAElD,gBAAgB;IAChB,2BAA2B;IAC3B,wDAAwD;IACxD,0DAA0D;IAE1D,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IACtC,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ;YAC9E,iEAAU,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,GAAG;YACzG,4DACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM;gBAEX,8DAAQ,CACJ,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STATUS_TYPE, TStatusType } from './bq-status.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Status Component is a UI element that represents the current state or condition of an item, task, or process.\n *\n * @example How to use it\n * ```html\n * <bq-status type=\"alert\">Alert status</bq-status>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/46c8d5-status/b/09d7b1\n * @status stable\n *\n * @dependency bq-badge\n *\n * @attr {\"alert\" | \"danger\" | \"info\" | \"neutral\" | \"success\"} type - It defines the type of status to display.\n *\n * @slot The content of the status component.\n *\n * @part base - The component's internal wrapper of the status component.\n * @part circle - The colored circle that marks the status type.\n * @part text - The `<div>` container that holds the text label of the status component.\n *\n * @cssprop --bq-status-circ - Status circle size.\n */\n@Component({\n tag: 'bq-status',\n styleUrl: './scss/bq-status.scss',\n shadow: true,\n})\nexport class BqStatus {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStatusElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines the type of status to display */\n @Prop({ reflect: true }) type: TStatusType = 'neutral';\n\n // Prop lifecycle events\n // =======================\n @Watch('type')\n checkPropValues() {\n validatePropValue(STATUS_TYPE, 'neutral', this.el, 'type');\n }\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n render() {\n return (\n <div class=\"bq-status inline-flex items-center gap-xs\" part=\"base\" role=\"status\">\n <bq-badge class={`bq-status__circle rounded-full ${this.type}`} size=\"medium\" part=\"circle\" role=\"img\" />\n <div\n class=\"bq-status__text text-s font-medium leading-regular text-primary max-bs-[20px] p-b-0 p-i-0 m-b-0 m-i-0\"\n part=\"text\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"]}