@beeq/core 1.11.0-beta.0 → 1.11.0-beta.2

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 (465) 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/bq-accordion-group.entry.esm.js.map +1 -1
  4. package/dist/beeq/bq-alert.entry.esm.js.map +1 -1
  5. package/dist/beeq/bq-avatar.entry.esm.js.map +1 -1
  6. package/dist/beeq/bq-breadcrumb-item.entry.esm.js.map +1 -1
  7. package/dist/beeq/bq-breadcrumb.entry.esm.js.map +1 -1
  8. package/dist/beeq/bq-button.bq-icon.entry.esm.js.map +1 -1
  9. package/dist/beeq/bq-card.entry.esm.js.map +1 -1
  10. package/dist/beeq/bq-checkbox.entry.esm.js.map +1 -1
  11. package/dist/beeq/bq-date-picker.entry.esm.js.map +1 -1
  12. package/dist/beeq/bq-dialog.entry.esm.js.map +1 -1
  13. package/dist/beeq/bq-drawer.entry.esm.js.map +1 -1
  14. package/dist/beeq/bq-dropdown.bq-panel.entry.esm.js.map +1 -1
  15. package/dist/beeq/bq-empty-state.entry.esm.js.map +1 -1
  16. package/dist/beeq/bq-input.entry.esm.js.map +1 -1
  17. package/dist/beeq/bq-notification.entry.esm.js.map +1 -1
  18. package/dist/beeq/bq-option-group.entry.esm.js.map +1 -1
  19. package/dist/beeq/bq-option-list.bq-tag.entry.esm.js.map +1 -1
  20. package/dist/beeq/bq-page-title.entry.esm.js.map +1 -1
  21. package/dist/beeq/bq-progress.entry.esm.js.map +1 -1
  22. package/dist/beeq/bq-select.entry.esm.js.map +1 -1
  23. package/dist/beeq/bq-side-menu-item.entry.esm.js.map +1 -1
  24. package/dist/beeq/bq-spinner.entry.esm.js.map +1 -1
  25. package/dist/beeq/bq-status.entry.esm.js.map +1 -1
  26. package/dist/beeq/bq-steps.entry.esm.js.map +1 -1
  27. package/dist/beeq/bq-switch.entry.esm.js.map +1 -1
  28. package/dist/beeq/bq-tab.entry.esm.js.map +1 -1
  29. package/dist/beeq/bq-textarea.entry.esm.js.map +1 -1
  30. package/dist/beeq/bq-toast.entry.esm.js.map +1 -1
  31. package/dist/beeq/{p-ba12d135.entry.js → p-0e481031.entry.js} +2 -2
  32. package/dist/beeq/p-0e481031.entry.js.map +1 -0
  33. package/dist/beeq/{p-d1dd36ca.entry.js → p-14588d1f.entry.js} +2 -2
  34. package/dist/beeq/p-14588d1f.entry.js.map +1 -0
  35. package/dist/beeq/{p-6d429afd.entry.js → p-1770fd5b.entry.js} +2 -2
  36. package/dist/beeq/p-1770fd5b.entry.js.map +1 -0
  37. package/dist/beeq/{p-c023718e.entry.js → p-1f8cc15c.entry.js} +2 -2
  38. package/dist/beeq/p-1f8cc15c.entry.js.map +1 -0
  39. package/dist/beeq/{p-1421f4a3.entry.js → p-25e92d0a.entry.js} +2 -2
  40. package/dist/beeq/p-25e92d0a.entry.js.map +1 -0
  41. package/dist/beeq/{p-3dca7a14.entry.js → p-28788a48.entry.js} +2 -2
  42. package/dist/beeq/p-28788a48.entry.js.map +1 -0
  43. package/dist/beeq/{p-fbc38c77.entry.js → p-32a07a71.entry.js} +2 -2
  44. package/dist/beeq/p-32a07a71.entry.js.map +1 -0
  45. package/dist/beeq/{p-3e8980ff.entry.js → p-33899839.entry.js} +2 -2
  46. package/dist/beeq/p-33899839.entry.js.map +1 -0
  47. package/dist/beeq/{p-2f008ed1.entry.js → p-3424586a.entry.js} +2 -2
  48. package/dist/beeq/p-3424586a.entry.js.map +1 -0
  49. package/dist/beeq/{p-0deed5d1.entry.js → p-3b1ef7e6.entry.js} +2 -2
  50. package/dist/beeq/p-3b1ef7e6.entry.js.map +1 -0
  51. package/dist/beeq/{p-1cd1ae48.entry.js → p-4a726c36.entry.js} +2 -2
  52. package/dist/beeq/p-4a726c36.entry.js.map +1 -0
  53. package/dist/beeq/p-61065a1c.entry.js +6 -0
  54. package/dist/beeq/p-61065a1c.entry.js.map +1 -0
  55. package/dist/beeq/{p-7063e5c2.entry.js → p-61fe519c.entry.js} +2 -2
  56. package/dist/beeq/p-61fe519c.entry.js.map +1 -0
  57. package/dist/beeq/{p-a9643899.entry.js → p-6eb0f643.entry.js} +2 -2
  58. package/dist/beeq/p-6eb0f643.entry.js.map +1 -0
  59. package/dist/beeq/{p-6852a0b0.entry.js → p-73054d34.entry.js} +2 -2
  60. package/dist/beeq/p-73054d34.entry.js.map +1 -0
  61. package/dist/beeq/{p-9305e1a2.entry.js → p-7bf79e31.entry.js} +2 -2
  62. package/dist/beeq/p-7bf79e31.entry.js.map +1 -0
  63. package/dist/beeq/{p-6a10175b.entry.js → p-7ecff021.entry.js} +2 -2
  64. package/dist/beeq/p-7ecff021.entry.js.map +1 -0
  65. package/dist/beeq/{p-96f6c9ae.entry.js → p-84c96afc.entry.js} +2 -2
  66. package/dist/beeq/p-84c96afc.entry.js.map +1 -0
  67. package/dist/beeq/{p-48811a09.entry.js → p-895454b8.entry.js} +2 -2
  68. package/dist/beeq/p-895454b8.entry.js.map +1 -0
  69. package/dist/beeq/{p-8eb8612b.entry.js → p-92fed771.entry.js} +2 -2
  70. package/dist/beeq/p-92fed771.entry.js.map +1 -0
  71. package/dist/beeq/{p-477f032f.entry.js → p-9584ff4f.entry.js} +2 -2
  72. package/dist/beeq/p-9584ff4f.entry.js.map +1 -0
  73. package/dist/beeq/{p-DDw-pDpy.js → p-B2Q_ACEf.js} +3 -3
  74. package/dist/beeq/p-B2Q_ACEf.js.map +1 -0
  75. package/dist/beeq/p-C_mtknb1.js +6 -0
  76. package/dist/beeq/p-C_mtknb1.js.map +1 -0
  77. package/dist/beeq/p-DdvbF5yL.js.map +1 -1
  78. package/dist/beeq/{p-dd896cd8.entry.js → p-acec3250.entry.js} +2 -2
  79. package/dist/beeq/p-acec3250.entry.js.map +1 -0
  80. package/dist/beeq/{p-dc4d2d77.entry.js → p-afecb3f2.entry.js} +2 -2
  81. package/dist/beeq/p-afecb3f2.entry.js.map +1 -0
  82. package/dist/beeq/{p-1c6ef374.entry.js → p-b324e939.entry.js} +2 -2
  83. package/dist/beeq/p-b324e939.entry.js.map +1 -0
  84. package/dist/beeq/{p-f8d5c1ab.entry.js → p-b387860a.entry.js} +2 -2
  85. package/dist/beeq/p-b387860a.entry.js.map +1 -0
  86. package/dist/beeq/{p-78be94d2.entry.js → p-b40aaef2.entry.js} +2 -2
  87. package/dist/beeq/p-b40aaef2.entry.js.map +1 -0
  88. package/dist/beeq/{p-87430ad8.entry.js → p-ba7572f4.entry.js} +2 -2
  89. package/dist/beeq/p-ba7572f4.entry.js.map +1 -0
  90. package/dist/beeq/{p-eb2cfa90.entry.js → p-bcd00932.entry.js} +2 -2
  91. package/dist/beeq/p-bcd00932.entry.js.map +1 -0
  92. package/dist/beeq/p-c737da48.entry.js +6 -0
  93. package/dist/beeq/p-c737da48.entry.js.map +1 -0
  94. package/dist/beeq/{p-b520bdb8.entry.js → p-c7471d26.entry.js} +2 -2
  95. package/dist/beeq/p-c7471d26.entry.js.map +1 -0
  96. package/dist/beeq/{p-04745600.entry.js → p-db38b20c.entry.js} +2 -2
  97. package/dist/beeq/p-db38b20c.entry.js.map +1 -0
  98. package/dist/beeq/{p-b268b017.entry.js → p-dc188227.entry.js} +2 -2
  99. package/dist/beeq/p-dc188227.entry.js.map +1 -0
  100. package/dist/beeq/{p-8280145e.entry.js → p-de332995.entry.js} +2 -2
  101. package/dist/beeq/p-de332995.entry.js.map +1 -0
  102. package/dist/beeq/{p-5ce77af6.entry.js → p-e1450a16.entry.js} +2 -2
  103. package/dist/beeq/p-e1450a16.entry.js.map +1 -0
  104. package/dist/beeq/{p-37a2fb82.entry.js → p-e1ecf09d.entry.js} +2 -2
  105. package/dist/beeq/p-e1ecf09d.entry.js.map +1 -0
  106. package/dist/beeq/{p-e7bd48a0.entry.js → p-e2aec11c.entry.js} +2 -2
  107. package/dist/beeq/p-e2aec11c.entry.js.map +1 -0
  108. package/dist/beeq/{p-d0a16e94.entry.js → p-e5e294ad.entry.js} +2 -2
  109. package/dist/beeq/p-e5e294ad.entry.js.map +1 -0
  110. package/dist/beeq/{p-f12a127c.entry.js → p-ee9117e4.entry.js} +2 -2
  111. package/dist/beeq/p-ee9117e4.entry.js.map +1 -0
  112. package/dist/beeq/{p-3c7397cf.entry.js → p-f82cff9e.entry.js} +2 -2
  113. package/dist/beeq/p-f82cff9e.entry.js.map +1 -0
  114. package/dist/beeq.html-custom-data.json +66 -66
  115. package/dist/cjs/beeq.cjs.js +2 -4
  116. package/dist/cjs/beeq.cjs.js.map +1 -1
  117. package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -4
  118. package/dist/cjs/bq-accordion-group.entry.cjs.js.map +1 -1
  119. package/dist/cjs/bq-accordion.cjs.entry.js +1 -3
  120. package/dist/cjs/bq-alert.cjs.entry.js +2 -4
  121. package/dist/cjs/bq-alert.entry.cjs.js.map +1 -1
  122. package/dist/cjs/bq-avatar.cjs.entry.js +2 -4
  123. package/dist/cjs/bq-avatar.entry.cjs.js.map +1 -1
  124. package/dist/cjs/bq-badge.cjs.entry.js +1 -3
  125. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +2 -4
  126. package/dist/cjs/bq-breadcrumb-item.entry.cjs.js.map +1 -1
  127. package/dist/cjs/bq-breadcrumb.cjs.entry.js +2 -4
  128. package/dist/cjs/bq-breadcrumb.entry.cjs.js.map +1 -1
  129. package/dist/cjs/bq-button.bq-icon.entry.cjs.js.map +1 -1
  130. package/dist/cjs/bq-button_2.cjs.entry.js +2 -4
  131. package/dist/cjs/bq-card.cjs.entry.js +2 -4
  132. package/dist/cjs/bq-card.entry.cjs.js.map +1 -1
  133. package/dist/cjs/bq-checkbox.cjs.entry.js +2 -4
  134. package/dist/cjs/bq-checkbox.entry.cjs.js.map +1 -1
  135. package/dist/cjs/bq-date-picker.cjs.entry.js +2 -4
  136. package/dist/cjs/bq-date-picker.entry.cjs.js.map +1 -1
  137. package/dist/cjs/bq-dialog.cjs.entry.js +2 -4
  138. package/dist/cjs/bq-dialog.entry.cjs.js.map +1 -1
  139. package/dist/cjs/bq-divider.cjs.entry.js +1 -3
  140. package/dist/cjs/bq-drawer.cjs.entry.js +2 -4
  141. package/dist/cjs/bq-drawer.entry.cjs.js.map +1 -1
  142. package/dist/cjs/bq-dropdown.bq-panel.entry.cjs.js.map +1 -1
  143. package/dist/cjs/bq-dropdown_2.cjs.entry.js +3 -5
  144. package/dist/cjs/bq-empty-state.cjs.entry.js +2 -4
  145. package/dist/cjs/bq-empty-state.entry.cjs.js.map +1 -1
  146. package/dist/cjs/bq-input.cjs.entry.js +2 -4
  147. package/dist/cjs/bq-input.entry.cjs.js.map +1 -1
  148. package/dist/cjs/bq-notification.cjs.entry.js +2 -4
  149. package/dist/cjs/bq-notification.entry.cjs.js.map +1 -1
  150. package/dist/cjs/bq-option-group.cjs.entry.js +2 -4
  151. package/dist/cjs/bq-option-group.entry.cjs.js.map +1 -1
  152. package/dist/cjs/bq-option-list.bq-tag.entry.cjs.js.map +1 -1
  153. package/dist/cjs/bq-option-list_2.cjs.entry.js +3 -5
  154. package/dist/cjs/bq-option.cjs.entry.js +1 -3
  155. package/dist/cjs/bq-page-title.cjs.entry.js +2 -4
  156. package/dist/cjs/bq-page-title.entry.cjs.js.map +1 -1
  157. package/dist/cjs/bq-progress.cjs.entry.js +2 -4
  158. package/dist/cjs/bq-progress.entry.cjs.js.map +1 -1
  159. package/dist/cjs/bq-radio-group.cjs.entry.js +1 -3
  160. package/dist/cjs/bq-radio.cjs.entry.js +1 -3
  161. package/dist/cjs/bq-select.cjs.entry.js +2 -4
  162. package/dist/cjs/bq-select.entry.cjs.js.map +1 -1
  163. package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -4
  164. package/dist/cjs/bq-side-menu-item.entry.cjs.js.map +1 -1
  165. package/dist/cjs/bq-side-menu.cjs.entry.js +1 -3
  166. package/dist/cjs/bq-slider.cjs.entry.js +1 -3
  167. package/dist/cjs/bq-spinner.cjs.entry.js +2 -4
  168. package/dist/cjs/bq-spinner.entry.cjs.js.map +1 -1
  169. package/dist/cjs/bq-status.cjs.entry.js +2 -4
  170. package/dist/cjs/bq-status.entry.cjs.js.map +1 -1
  171. package/dist/cjs/bq-step-item.cjs.entry.js +1 -3
  172. package/dist/cjs/bq-steps.cjs.entry.js +2 -4
  173. package/dist/cjs/bq-steps.entry.cjs.js.map +1 -1
  174. package/dist/cjs/bq-switch.cjs.entry.js +2 -4
  175. package/dist/cjs/bq-switch.entry.cjs.js.map +1 -1
  176. package/dist/cjs/bq-tab-group.cjs.entry.js +1 -3
  177. package/dist/cjs/bq-tab.cjs.entry.js +2 -4
  178. package/dist/cjs/bq-tab.entry.cjs.js.map +1 -1
  179. package/dist/cjs/bq-textarea.cjs.entry.js +2 -4
  180. package/dist/cjs/bq-textarea.entry.cjs.js.map +1 -1
  181. package/dist/cjs/bq-toast.cjs.entry.js +2 -4
  182. package/dist/cjs/bq-toast.entry.cjs.js.map +1 -1
  183. package/dist/cjs/bq-tooltip.cjs.entry.js +2 -4
  184. package/dist/cjs/{index-tFN0ax76.js → index-B6fG32hZ.js} +39 -22
  185. package/dist/cjs/index-B6fG32hZ.js.map +1 -0
  186. package/dist/cjs/{index-CLoLF-_B.js → index-DMgUhnao.js} +25 -20
  187. package/dist/cjs/index-DMgUhnao.js.map +1 -0
  188. package/dist/cjs/index.cjs.js +0 -2
  189. package/dist/cjs/loader.cjs.js +1 -3
  190. package/dist/cjs/transition-C0S-pYqN.js.map +1 -1
  191. package/dist/collection/collection-manifest.json +1 -1
  192. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  193. package/dist/components/bq-accordion-group.js +1 -1
  194. package/dist/components/bq-accordion-group.js.map +1 -1
  195. package/dist/components/bq-accordion.js +1 -1
  196. package/dist/components/bq-accordion.js.map +1 -1
  197. package/dist/components/bq-alert.js +1 -1
  198. package/dist/components/bq-alert.js.map +1 -1
  199. package/dist/components/bq-avatar.js +1 -1
  200. package/dist/components/bq-avatar.js.map +1 -1
  201. package/dist/components/bq-badge.js +1 -1
  202. package/dist/components/bq-breadcrumb-item.js +1 -1
  203. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  204. package/dist/components/bq-breadcrumb.js +1 -1
  205. package/dist/components/bq-breadcrumb.js.map +1 -1
  206. package/dist/components/bq-button.js +1 -1
  207. package/dist/components/bq-card.js +1 -1
  208. package/dist/components/bq-card.js.map +1 -1
  209. package/dist/components/bq-checkbox.js +1 -1
  210. package/dist/components/bq-checkbox.js.map +1 -1
  211. package/dist/components/bq-date-picker.js +1 -1
  212. package/dist/components/bq-date-picker.js.map +1 -1
  213. package/dist/components/bq-dialog.js +1 -1
  214. package/dist/components/bq-dialog.js.map +1 -1
  215. package/dist/components/bq-divider.js +1 -1
  216. package/dist/components/bq-drawer.js +1 -1
  217. package/dist/components/bq-drawer.js.map +1 -1
  218. package/dist/components/bq-dropdown.js +1 -1
  219. package/dist/components/bq-empty-state.js +1 -1
  220. package/dist/components/bq-empty-state.js.map +1 -1
  221. package/dist/components/bq-icon.js +1 -1
  222. package/dist/components/bq-input.js +1 -1
  223. package/dist/components/bq-input.js.map +1 -1
  224. package/dist/components/bq-notification.js +1 -1
  225. package/dist/components/bq-notification.js.map +1 -1
  226. package/dist/components/bq-option-group.js +1 -1
  227. package/dist/components/bq-option-group.js.map +1 -1
  228. package/dist/components/bq-option-list.js +1 -1
  229. package/dist/components/bq-option.js +1 -1
  230. package/dist/components/bq-option.js.map +1 -1
  231. package/dist/components/bq-page-title.js +1 -1
  232. package/dist/components/bq-page-title.js.map +1 -1
  233. package/dist/components/bq-panel.js +1 -1
  234. package/dist/components/bq-progress.js +1 -1
  235. package/dist/components/bq-progress.js.map +1 -1
  236. package/dist/components/bq-radio-group.js +1 -1
  237. package/dist/components/bq-radio-group.js.map +1 -1
  238. package/dist/components/bq-radio.js +1 -1
  239. package/dist/components/bq-radio.js.map +1 -1
  240. package/dist/components/bq-select.js +1 -1
  241. package/dist/components/bq-select.js.map +1 -1
  242. package/dist/components/bq-side-menu-item.js +1 -1
  243. package/dist/components/bq-side-menu-item.js.map +1 -1
  244. package/dist/components/bq-side-menu.js +1 -1
  245. package/dist/components/bq-side-menu.js.map +1 -1
  246. package/dist/components/bq-slider.js +1 -1
  247. package/dist/components/bq-slider.js.map +1 -1
  248. package/dist/components/bq-spinner.js +1 -1
  249. package/dist/components/bq-spinner.js.map +1 -1
  250. package/dist/components/bq-status.js +1 -1
  251. package/dist/components/bq-status.js.map +1 -1
  252. package/dist/components/bq-step-item.js +1 -1
  253. package/dist/components/bq-step-item.js.map +1 -1
  254. package/dist/components/bq-steps.js +1 -1
  255. package/dist/components/bq-steps.js.map +1 -1
  256. package/dist/components/bq-switch.js +1 -1
  257. package/dist/components/bq-switch.js.map +1 -1
  258. package/dist/components/bq-tab-group.js +1 -1
  259. package/dist/components/bq-tab-group.js.map +1 -1
  260. package/dist/components/bq-tab.js +1 -1
  261. package/dist/components/bq-tab.js.map +1 -1
  262. package/dist/components/bq-tag.js +1 -1
  263. package/dist/components/bq-textarea.js +1 -1
  264. package/dist/components/bq-textarea.js.map +1 -1
  265. package/dist/components/bq-toast.js +1 -1
  266. package/dist/components/bq-toast.js.map +1 -1
  267. package/dist/components/bq-tooltip.js +1 -1
  268. package/dist/components/index.js +1 -1
  269. package/dist/components/{p-BIl7Vq5P.js → p--r87nWid.js} +2 -2
  270. package/dist/components/{p-BIl7Vq5P.js.map → p--r87nWid.js.map} +1 -1
  271. package/dist/components/{p-CjS2vgik.js → p-3U5U42sd.js} +2 -2
  272. package/dist/components/{p-CjS2vgik.js.map → p-3U5U42sd.js.map} +1 -1
  273. package/dist/components/{p-k2047NJf.js → p-B6nMRjwz.js} +2 -2
  274. package/dist/components/{p-k2047NJf.js.map → p-B6nMRjwz.js.map} +1 -1
  275. package/dist/components/{p-Bs3hKCXS.js → p-BeCgojET.js} +2 -2
  276. package/dist/components/{p-Bs3hKCXS.js.map → p-BeCgojET.js.map} +1 -1
  277. package/dist/components/{p-5er2o4Mn.js → p-CHy0sCco.js} +2 -2
  278. package/dist/components/{p-5er2o4Mn.js.map → p-CHy0sCco.js.map} +1 -1
  279. package/dist/components/p-C_mtknb1.js +6 -0
  280. package/dist/components/p-C_mtknb1.js.map +1 -0
  281. package/dist/components/{p-Bkf_oCvP.js → p-D5Ui9x2e.js} +2 -2
  282. package/dist/components/{p-Bkf_oCvP.js.map → p-D5Ui9x2e.js.map} +1 -1
  283. package/dist/components/{p-DE7kLeHf.js → p-D8zAe4nK.js} +2 -2
  284. package/dist/components/{p-DE7kLeHf.js.map → p-D8zAe4nK.js.map} +1 -1
  285. package/dist/components/{p-C4Jb3i-D.js → p-DX628oDu.js} +2 -2
  286. package/dist/components/{p-C4Jb3i-D.js.map → p-DX628oDu.js.map} +1 -1
  287. package/dist/components/p-DdvbF5yL.js.map +1 -1
  288. package/dist/components/{p-BPVTwD6U.js → p-DwLfHxB7.js} +2 -2
  289. package/dist/components/{p-BPVTwD6U.js.map → p-DwLfHxB7.js.map} +1 -1
  290. package/dist/components/{p-fQPjV9jm.js → p-eLopxgQr.js} +2 -2
  291. package/dist/components/p-eLopxgQr.js.map +1 -0
  292. package/dist/custom-elements.json +1574 -1574
  293. package/dist/esm/beeq.js +3 -5
  294. package/dist/esm/beeq.js.map +1 -1
  295. package/dist/esm/bq-accordion-group.entry.js +2 -4
  296. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  297. package/dist/esm/bq-accordion.entry.js +1 -3
  298. package/dist/esm/bq-alert.entry.js +2 -4
  299. package/dist/esm/bq-alert.entry.js.map +1 -1
  300. package/dist/esm/bq-avatar.entry.js +2 -4
  301. package/dist/esm/bq-avatar.entry.js.map +1 -1
  302. package/dist/esm/bq-badge.entry.js +1 -3
  303. package/dist/esm/bq-breadcrumb-item.entry.js +2 -4
  304. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  305. package/dist/esm/bq-breadcrumb.entry.js +2 -4
  306. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  307. package/dist/esm/bq-button.bq-icon.entry.js.map +1 -1
  308. package/dist/esm/bq-button_2.entry.js +2 -4
  309. package/dist/esm/bq-card.entry.js +2 -4
  310. package/dist/esm/bq-card.entry.js.map +1 -1
  311. package/dist/esm/bq-checkbox.entry.js +2 -4
  312. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  313. package/dist/esm/bq-date-picker.entry.js +2 -4
  314. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  315. package/dist/esm/bq-dialog.entry.js +2 -4
  316. package/dist/esm/bq-dialog.entry.js.map +1 -1
  317. package/dist/esm/bq-divider.entry.js +1 -3
  318. package/dist/esm/bq-drawer.entry.js +2 -4
  319. package/dist/esm/bq-drawer.entry.js.map +1 -1
  320. package/dist/esm/bq-dropdown.bq-panel.entry.js.map +1 -1
  321. package/dist/esm/bq-dropdown_2.entry.js +3 -5
  322. package/dist/esm/bq-empty-state.entry.js +2 -4
  323. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  324. package/dist/esm/bq-input.entry.js +2 -4
  325. package/dist/esm/bq-input.entry.js.map +1 -1
  326. package/dist/esm/bq-notification.entry.js +2 -4
  327. package/dist/esm/bq-notification.entry.js.map +1 -1
  328. package/dist/esm/bq-option-group.entry.js +2 -4
  329. package/dist/esm/bq-option-group.entry.js.map +1 -1
  330. package/dist/esm/bq-option-list.bq-tag.entry.js.map +1 -1
  331. package/dist/esm/bq-option-list_2.entry.js +3 -5
  332. package/dist/esm/bq-option.entry.js +1 -3
  333. package/dist/esm/bq-page-title.entry.js +2 -4
  334. package/dist/esm/bq-page-title.entry.js.map +1 -1
  335. package/dist/esm/bq-progress.entry.js +2 -4
  336. package/dist/esm/bq-progress.entry.js.map +1 -1
  337. package/dist/esm/bq-radio-group.entry.js +1 -3
  338. package/dist/esm/bq-radio.entry.js +1 -3
  339. package/dist/esm/bq-select.entry.js +2 -4
  340. package/dist/esm/bq-select.entry.js.map +1 -1
  341. package/dist/esm/bq-side-menu-item.entry.js +2 -4
  342. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  343. package/dist/esm/bq-side-menu.entry.js +1 -3
  344. package/dist/esm/bq-slider.entry.js +1 -3
  345. package/dist/esm/bq-spinner.entry.js +2 -4
  346. package/dist/esm/bq-spinner.entry.js.map +1 -1
  347. package/dist/esm/bq-status.entry.js +2 -4
  348. package/dist/esm/bq-status.entry.js.map +1 -1
  349. package/dist/esm/bq-step-item.entry.js +1 -3
  350. package/dist/esm/bq-steps.entry.js +2 -4
  351. package/dist/esm/bq-steps.entry.js.map +1 -1
  352. package/dist/esm/bq-switch.entry.js +2 -4
  353. package/dist/esm/bq-switch.entry.js.map +1 -1
  354. package/dist/esm/bq-tab-group.entry.js +1 -3
  355. package/dist/esm/bq-tab.entry.js +2 -4
  356. package/dist/esm/bq-tab.entry.js.map +1 -1
  357. package/dist/esm/bq-textarea.entry.js +2 -4
  358. package/dist/esm/bq-textarea.entry.js.map +1 -1
  359. package/dist/esm/bq-toast.entry.js +2 -4
  360. package/dist/esm/bq-toast.entry.js.map +1 -1
  361. package/dist/esm/bq-tooltip.entry.js +2 -4
  362. package/dist/esm/{index-DDw-pDpy.js → index-B2Q_ACEf.js} +25 -20
  363. package/dist/esm/index-B2Q_ACEf.js.map +1 -0
  364. package/dist/esm/{index-y49NXy_H.js → index-C_mtknb1.js} +39 -22
  365. package/dist/esm/index-C_mtknb1.js.map +1 -0
  366. package/dist/esm/index.js +0 -2
  367. package/dist/esm/loader.js +2 -4
  368. package/dist/esm/transition-DdvbF5yL.js.map +1 -1
  369. package/dist/hydrate/index.js +53 -28
  370. package/dist/hydrate/index.mjs +53 -28
  371. package/dist/types/stencil-public-runtime.d.ts +23 -0
  372. package/package.json +4 -4
  373. package/dist/beeq/p-04745600.entry.js.map +0 -1
  374. package/dist/beeq/p-0deed5d1.entry.js.map +0 -1
  375. package/dist/beeq/p-1421f4a3.entry.js.map +0 -1
  376. package/dist/beeq/p-1c6ef374.entry.js.map +0 -1
  377. package/dist/beeq/p-1cd1ae48.entry.js.map +0 -1
  378. package/dist/beeq/p-2f008ed1.entry.js.map +0 -1
  379. package/dist/beeq/p-37a2fb82.entry.js.map +0 -1
  380. package/dist/beeq/p-3c7397cf.entry.js.map +0 -1
  381. package/dist/beeq/p-3dca7a14.entry.js.map +0 -1
  382. package/dist/beeq/p-3e8980ff.entry.js.map +0 -1
  383. package/dist/beeq/p-477f032f.entry.js.map +0 -1
  384. package/dist/beeq/p-48811a09.entry.js.map +0 -1
  385. package/dist/beeq/p-540d625a.entry.js +0 -6
  386. package/dist/beeq/p-540d625a.entry.js.map +0 -1
  387. package/dist/beeq/p-5ce77af6.entry.js.map +0 -1
  388. package/dist/beeq/p-60db3689.entry.js +0 -6
  389. package/dist/beeq/p-60db3689.entry.js.map +0 -1
  390. package/dist/beeq/p-6852a0b0.entry.js.map +0 -1
  391. package/dist/beeq/p-6a10175b.entry.js.map +0 -1
  392. package/dist/beeq/p-6d429afd.entry.js.map +0 -1
  393. package/dist/beeq/p-7063e5c2.entry.js.map +0 -1
  394. package/dist/beeq/p-78be94d2.entry.js.map +0 -1
  395. package/dist/beeq/p-8280145e.entry.js.map +0 -1
  396. package/dist/beeq/p-87430ad8.entry.js.map +0 -1
  397. package/dist/beeq/p-8eb8612b.entry.js.map +0 -1
  398. package/dist/beeq/p-9305e1a2.entry.js.map +0 -1
  399. package/dist/beeq/p-96f6c9ae.entry.js.map +0 -1
  400. package/dist/beeq/p-DDw-pDpy.js.map +0 -1
  401. package/dist/beeq/p-a9643899.entry.js.map +0 -1
  402. package/dist/beeq/p-b268b017.entry.js.map +0 -1
  403. package/dist/beeq/p-b520bdb8.entry.js.map +0 -1
  404. package/dist/beeq/p-ba12d135.entry.js.map +0 -1
  405. package/dist/beeq/p-c023718e.entry.js.map +0 -1
  406. package/dist/beeq/p-d0a16e94.entry.js.map +0 -1
  407. package/dist/beeq/p-d1dd36ca.entry.js.map +0 -1
  408. package/dist/beeq/p-dc4d2d77.entry.js.map +0 -1
  409. package/dist/beeq/p-dd896cd8.entry.js.map +0 -1
  410. package/dist/beeq/p-e7bd48a0.entry.js.map +0 -1
  411. package/dist/beeq/p-eb2cfa90.entry.js.map +0 -1
  412. package/dist/beeq/p-f12a127c.entry.js.map +0 -1
  413. package/dist/beeq/p-f8d5c1ab.entry.js.map +0 -1
  414. package/dist/beeq/p-fbc38c77.entry.js.map +0 -1
  415. package/dist/beeq/p-y49NXy_H.js +0 -6
  416. package/dist/beeq/p-y49NXy_H.js.map +0 -1
  417. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +0 -1
  418. package/dist/cjs/bq-accordion.cjs.entry.js.map +0 -1
  419. package/dist/cjs/bq-alert.cjs.entry.js.map +0 -1
  420. package/dist/cjs/bq-avatar.cjs.entry.js.map +0 -1
  421. package/dist/cjs/bq-badge.cjs.entry.js.map +0 -1
  422. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +0 -1
  423. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +0 -1
  424. package/dist/cjs/bq-button_2.cjs.entry.js.map +0 -1
  425. package/dist/cjs/bq-card.cjs.entry.js.map +0 -1
  426. package/dist/cjs/bq-checkbox.cjs.entry.js.map +0 -1
  427. package/dist/cjs/bq-date-picker.cjs.entry.js.map +0 -1
  428. package/dist/cjs/bq-dialog.cjs.entry.js.map +0 -1
  429. package/dist/cjs/bq-divider.cjs.entry.js.map +0 -1
  430. package/dist/cjs/bq-drawer.cjs.entry.js.map +0 -1
  431. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +0 -1
  432. package/dist/cjs/bq-empty-state.cjs.entry.js.map +0 -1
  433. package/dist/cjs/bq-input.cjs.entry.js.map +0 -1
  434. package/dist/cjs/bq-notification.cjs.entry.js.map +0 -1
  435. package/dist/cjs/bq-option-group.cjs.entry.js.map +0 -1
  436. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +0 -1
  437. package/dist/cjs/bq-option.cjs.entry.js.map +0 -1
  438. package/dist/cjs/bq-page-title.cjs.entry.js.map +0 -1
  439. package/dist/cjs/bq-progress.cjs.entry.js.map +0 -1
  440. package/dist/cjs/bq-radio-group.cjs.entry.js.map +0 -1
  441. package/dist/cjs/bq-radio.cjs.entry.js.map +0 -1
  442. package/dist/cjs/bq-select.cjs.entry.js.map +0 -1
  443. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +0 -1
  444. package/dist/cjs/bq-side-menu.cjs.entry.js.map +0 -1
  445. package/dist/cjs/bq-slider.cjs.entry.js.map +0 -1
  446. package/dist/cjs/bq-spinner.cjs.entry.js.map +0 -1
  447. package/dist/cjs/bq-status.cjs.entry.js.map +0 -1
  448. package/dist/cjs/bq-step-item.cjs.entry.js.map +0 -1
  449. package/dist/cjs/bq-steps.cjs.entry.js.map +0 -1
  450. package/dist/cjs/bq-switch.cjs.entry.js.map +0 -1
  451. package/dist/cjs/bq-tab-group.cjs.entry.js.map +0 -1
  452. package/dist/cjs/bq-tab.cjs.entry.js.map +0 -1
  453. package/dist/cjs/bq-textarea.cjs.entry.js.map +0 -1
  454. package/dist/cjs/bq-toast.cjs.entry.js.map +0 -1
  455. package/dist/cjs/bq-tooltip.cjs.entry.js.map +0 -1
  456. package/dist/cjs/index-CLoLF-_B.js.map +0 -1
  457. package/dist/cjs/index-tFN0ax76.js.map +0 -1
  458. package/dist/components/p-fQPjV9jm.js.map +0 -1
  459. package/dist/components/p-y49NXy_H.js +0 -6
  460. package/dist/components/p-y49NXy_H.js.map +0 -1
  461. package/dist/esm/bq-button_2.entry.js.map +0 -1
  462. package/dist/esm/bq-dropdown_2.entry.js.map +0 -1
  463. package/dist/esm/bq-option-list_2.entry.js.map +0 -1
  464. package/dist/esm/index-DDw-pDpy.js.map +0 -1
  465. package/dist/esm/index-y49NXy_H.js.map +0 -1
@@ -1 +0,0 @@
1
- {"file":"bq-radio-group.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAO,MAAM,uBAAuB,GAAG,CAAC,YAAY,EAAE,UAAU,CAAU;;ACA1E,MAAM,eAA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AAQ,mBACb,IAAI,CAAC,QAAQ,EAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,MAAM,EAAA,EAEXA,OAAQ,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EAAA,EAClBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAAC,sBAAsB,EAAC,IAAI,EAAC,OAAO,GAAG,CACxC,EACTA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAmB,gBAAA,EAAA,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAC,OAAO,EAAA,EAC7DA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,EAAE,EAAC,eAAe,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CAC5D,CACG,CACN;;;;;;;;;;;;;;;;;;","names":["debounce","validatePropValue","event","isEventTargetChildOfElement","isDefined","isNil","getNextElement","h","Host"],"sources":["../../packages/beeq/src/components/radio-group/bq-radio-group.types.ts","../../packages/beeq/src/components/radio-group/scss/bq-radio-group.scss?tag=bq-radio-group&encapsulation=shadow","../../packages/beeq/src/components/radio-group/bq-radio-group.tsx"],"sourcesContent":["export const RADIO_GROUP_ORIENTATION = ['horizontal', 'vertical'] as const;\nexport type TRadioGroupOrientation = (typeof RADIO_GROUP_ORIENTATION)[number];\n","/* -------------------------------------------------------------------------- */\n/* Radio group styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply inline-block;\n}\n\n.bq-radio-group {\n @apply m-b-0 m-i-0;\n\n &:not(.has-fieldset) {\n @apply border-0 m-b-0 m-i-0 p-b-0 p-i-0;\n }\n\n &--horizontal {\n @apply flex;\n }\n\n &--vertical {\n @apply flex flex-col;\n }\n}\n","import { AttachInternals, Component, Element, Event, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { RADIO_GROUP_ORIENTATION } from './bq-radio-group.types';\nimport type { TRadioGroupOrientation } from './bq-radio-group.types';\nimport {\n debounce,\n getNextElement,\n isDefined,\n isEventTargetChildOfElement,\n isNil,\n TDebounce,\n validatePropValue,\n} from '../../shared/utils';\n\nconst KEY_MAP = {\n ArrowDown: 'forward',\n ArrowRight: 'forward',\n ArrowUp: 'backward',\n ArrowLeft: 'backward',\n} as const;\n\ntype Direction = (typeof KEY_MAP)[keyof typeof KEY_MAP];\n\n/**\n * The radio group is a user interface component that groups radio buttons to enable a single selection within the group.\n *\n * @example How to use it\n * ```html\n * <bq-radio-group fieldset value=\"option1\">\n * <span slot=\"label\">radio group</span>\n * <bq-radio value=\"option1\">Radio option 1</bq-radio>\n * <bq-radio value=\"option2\">Radio option 2</bq-radio>\n * <bq-radio value=\"option3\">Radio option 3</bq-radio>\n * </bq-radio-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/9718e1-radio-button/b/09d7b1\n * @status stable\n *\n * @attr {boolean} background-on-hover - If `true`, the radio displays background on hover\n * @attr {number} debounce-time - A number representing the delay time (in milliseconds) that bqChange event handler gets triggered once the value change\n * @attr {boolean} disabled - If `true` radio inputs are disabled\n * @attr {boolean} fieldset - If `true` displays fieldset\n * @attr {string} name - Name of the HTML input form control. Submitted with the form as part of a name/value pair\n * @attr {\"horizontal\" | \"vertical\"} orientation - The display orientation of the radio inputs\n * @attr {boolean} required - If `true`, the radio group is required\n * @attr {string} required-validation-message - The native form validation message when the radio group is required\n * @attr {string} value - The display orientation of the radio inputs\n *\n * @method vClick - Simulate a click event on the native `<input>` HTML element used under the hood\n * @method vFocus - Sets focus on the native `<input>` HTML element used under the hood\n * @method vBlur - Remove focus from the native `<input>` HTML element used under the hood\n *\n * @event bqChange - Handler to be called when the radio state changes\n *\n * @slot - The bq-radio items to group\n * @slot label - The label content of radio group\n *\n * @part base - The component's internal wrapper of the radio components.\n * @part label - The `<legend>` element that holds the text content.\n * @part group - The `<div>` element that holds the radio inputs.\n */\n@Component({\n tag: 'bq-radio-group',\n styleUrl: './scss/bq-radio-group.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqRadioGroup {\n // Own Properties\n // ====================\n\n private initialValue?: string;\n private debouncedBqChange: TDebounce<{ value: string; target: HTMLBqRadioElement }>;\n private focusedBqRadio: HTMLBqRadioElement | null = null;\n private readonly radioElementsSet = new Set<HTMLBqRadioElement>();\n private cachedRadioElements: HTMLBqRadioElement[] = [];\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqRadioGroupElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() checkedRadio?: HTMLBqRadioElement;\n @State() tabIndex: '0' | '-1' = '0';\n\n // Public Property API\n // ========================\n\n /** If true, all radio inputs in the group will display a background on hover */\n @Prop({ reflect: true }) backgroundOnHover = false;\n\n /** A number representing the delay time (in milliseconds) that `bqChange` event handler gets triggered once the value change */\n @Prop({ reflect: true, mutable: true }) debounceTime = 0;\n\n /** If true radio inputs are disabled */\n @Prop({ reflect: true }) disabled = false;\n\n /** If true displays fieldset */\n @Prop({ reflect: true }) fieldset = false;\n\n /** Name of the HTML input form control. Submitted with the form as part of a name/value pair. */\n @Prop({ reflect: true }) name!: string;\n\n /** The display orientation of the radio inputs */\n @Prop({ reflect: true, mutable: true }) orientation: TRadioGroupOrientation = 'vertical';\n\n /** If true, the radio group is required */\n @Prop({ reflect: true }) required = false;\n\n /** The native form validation message when the radio group is required */\n @Prop({ reflect: true }) requiredValidationMessage?: string;\n\n /** A string representing the value of the radio. */\n @Prop({ reflect: true, mutable: true }) value?: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('debounceTime')\n handleDebounceTimeChange() {\n const MIN_DEBOUNCE_TIME = 0;\n const normalizedDebounceTime = Math.max(MIN_DEBOUNCE_TIME, this.debounceTime);\n\n if (normalizedDebounceTime !== this.debounceTime) {\n this.debounceTime = normalizedDebounceTime;\n }\n\n this.debouncedBqChange?.cancel();\n this.debouncedBqChange = debounce((event: { value: string; target: HTMLBqRadioElement }): void => {\n this.bqChange?.emit(event);\n }, this.debounceTime);\n }\n\n @Watch('disabled')\n handleDisabledChange() {\n this.tabIndex = this.disabled ? '-1' : '0';\n this.updateRadioTabIndexes();\n }\n\n @Watch('backgroundOnHover')\n @Watch('disabled')\n @Watch('name')\n @Watch('required')\n handleGroupProperties() {\n this.updateRadioProperties();\n }\n\n @Watch('orientation')\n checkPropValues() {\n validatePropValue(RADIO_GROUP_ORIENTATION, 'vertical', this.el, 'orientation');\n }\n\n @Watch('required')\n handleRequiredChange() {\n this.updateFormValidity();\n }\n\n @Watch('value')\n handleValueChange() {\n this.updateRadioProperties();\n this.updateFormValidity();\n\n // Find and update the checked radio based on the new value\n const newCheckedRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);\n if (newCheckedRadio) {\n this.checkedRadio = newCheckedRadio;\n this.debouncedBqChange?.({ value: this.value, target: newCheckedRadio });\n } else {\n this.checkedRadio = undefined;\n }\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the radio state changes */\n @Event() bqChange: EventEmitter<{ value: string; target: HTMLBqRadioElement }>;\n\n /** Handler to be called when the radio loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqRadioElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.handleDebounceTimeChange();\n this.internals.setFormValue(this.value ?? null);\n\n this.updateCustomStates();\n this.updateFormValidity();\n }\n\n disconnectedCallback() {\n this.debouncedBqChange?.cancel();\n }\n\n formAssociatedCallback() {\n this.internals.setFormValue(this.value ?? null);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n this.internals.setFormValue(this.value ?? null);\n this.updateFormValidity();\n this.updateCustomStates();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { capture: true })\n async onBqClick(event: CustomEvent<{ value: string; target: HTMLBqRadioElement }>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const { target, value } = event.detail;\n if (value === this.value) return;\n\n requestAnimationFrame(() => {\n if (event.defaultPrevented) return;\n this.updateRadioSelection(target);\n });\n }\n\n @Listen('bqKeyDown')\n onBqKeyDown(event: CustomEvent<{ key: string; target: HTMLBqRadioElement }>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const direction: Direction | undefined = KEY_MAP[event.detail.key];\n if (!direction) return;\n\n this.focusRadioInputSibling(event.detail.target, direction);\n }\n\n @Listen('bqFocus', { capture: true })\n onBqFocus(event: CustomEvent<HTMLBqRadioElement>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const shouldStopPropagation = isDefined(this.focusedBqRadio);\n this.focusedBqRadio = event.detail;\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n }\n\n @Listen('bqBlur', { capture: true })\n onBqBlur(event: CustomEvent<HTMLBqRadioElement>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n // NOTE: if focusedBqRadio is nil that means the event occured from this component\n if (isNil(this.focusedBqRadio)) return;\n\n event.stopPropagation();\n\n requestAnimationFrame(() => {\n if (this.focusedBqRadio !== event.detail) return;\n\n this.focusedBqRadio = null;\n this.bqBlur.emit(event.detail);\n });\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 /**\n * Initializes the radio elements set by querying the host element for `ds-radio` elements.\n * This is done to avoid re-querying the host element for radio elements on every change.\n */\n private initializeRadioElements = (): void => {\n this.radioElementsSet.clear();\n this.el.querySelectorAll('bq-radio').forEach((radio) => this.radioElementsSet.add(radio));\n // Caching the radio elements in an array for faster access and iteration\n this.cachedRadioElements = Array.from(this.radioElementsSet);\n // Set the tabIndex of the host element to -1 if there are no radio elements or the group is disabled, otherwise set it to 0\n this.tabIndex = this.cachedRadioElements.length === 0 || this.disabled ? '-1' : '0';\n // Set initial tabIndex for all radios\n this.updateRadioTabIndexes();\n };\n\n /**\n * Sets tabIndex for all radio elements based on current state\n * Handles all scenarios: disabled state, checked radio, value matching, fallback to first\n */\n private updateRadioTabIndexes = (): void => {\n if (this.cachedRadioElements.length === 0) return;\n\n // If disabled, all radios get tabIndex -1\n if (this.disabled) {\n this.cachedRadioElements.forEach((radio) => (radio.tabIndex = -1));\n return;\n }\n\n // Find which radio should be focusable\n let focusableRadio: HTMLBqRadioElement | undefined;\n\n // Priority 1: Currently checked radio\n focusableRadio = this.cachedRadioElements.find((radio) => radio.checked);\n\n // Priority 2: Radio matching current value\n if (!focusableRadio && this.value) {\n focusableRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);\n }\n\n // Priority 3: First enabled radio (fallback)\n if (!focusableRadio) {\n focusableRadio = this.cachedRadioElements.find((radio) => !radio.disabled);\n }\n\n // Apply tabIndex to all radios\n this.cachedRadioElements.forEach((radio) => {\n radio.tabIndex = radio === focusableRadio ? 0 : -1;\n });\n };\n\n /**\n * Updates the radio selection and focus.\n * @param target - The radio element to update.\n */\n private updateRadioSelection = (target: HTMLBqRadioElement): void => {\n // Only uncheck the previously checked radio if it's different\n if (this.checkedRadio && this.checkedRadio !== target) {\n this.checkedRadio.checked = false;\n this.checkedRadio.tabIndex = -1;\n }\n\n target.checked = true;\n target.tabIndex = 0;\n target.vFocus();\n\n this.checkedRadio = target;\n this.value = target.value;\n this.internals?.setFormValue(this.value ?? null);\n\n this.updateRadioTabIndexes();\n };\n\n /**\n * Synchronizes properties of child radio elements with the group's state.\n */\n private updateRadioProperties = (): void => {\n if (this.cachedRadioElements.length === 0) return;\n\n const { backgroundOnHover, disabled, name, required, value } = this;\n\n for (const radio of this.cachedRadioElements) {\n radio.backgroundOnHover = backgroundOnHover;\n radio.checked = value === radio.value;\n // This will allows us to force all radio elements to be disabled\n // while keeping the disabled state of the radio element if it was set individually by the user\n radio.forceDisabled = disabled;\n radio.name = name;\n radio.required = required;\n }\n };\n\n /**\n * Focuses the next/previous radio element in the group based on the current target.\n * Handles circular navigation and skips disabled elements.\n * @param currentTarget - The currently focused radio element\n * @param direction - The navigation direction ('forward' | 'backward')\n */\n private focusRadioInputSibling = (currentTarget: HTMLBqRadioElement, direction: Direction): void => {\n // If there is none or only one radio element, there will be no sibling to focus\n if (this.cachedRadioElements.length <= 1) return;\n\n const currentIndex = this.cachedRadioElements.indexOf(currentTarget);\n // If the index of the radio element target is not found, it means that it's not part of the group\n if (currentIndex === -1) return;\n\n const nextElement = getNextElement(this.cachedRadioElements, currentIndex, direction);\n this.updateRadioSelection(nextElement);\n };\n\n private updateFormValidity = async (): Promise<void> => {\n const { internals, required, requiredValidationMessage, value } = this;\n // Clear the validity state\n internals?.states.clear();\n\n if (!required || (required && !isNil(value))) {\n // If the radio group is not required or has a value, set the validity state to valid\n internals?.states.add('valid');\n internals?.setValidity({});\n return;\n }\n\n const firstRadio = this.cachedRadioElements[0];\n if (!firstRadio) return;\n // If the radio group is required and has no value, set the validity state to invalid\n internals?.states.add('invalid');\n // We need to pass the native input element to the setValidity method as anchor element\n internals?.setValidity(\n { valueMissing: true },\n requiredValidationMessage ?? 'Please select an option',\n await firstRadio.getNativeInput(),\n );\n };\n\n /**\n * Updates the custom states based on the component properties.\n * The custom states can be used to style the component based on the component properties.\n * The custom states are `disabled`, based on the component properties.\n */\n private updateCustomStates = (): void => {\n const states = new Set<string>();\n\n if (this.disabled) states.add('disabled');\n if (this.orientation) states.add(this.orientation);\n\n // Update states\n this.internals?.states.clear();\n states.forEach((state) => this.internals?.states.add(state));\n };\n\n private handleSlotChange = (): void => {\n this.initializeRadioElements();\n this.updateRadioProperties();\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host tabindex={this.tabIndex}>\n <fieldset\n class={{ 'bq-radio-group': true, 'has-fieldset': this.fieldset }}\n aria-controls=\"bq-radiogroup\"\n aria-labelledby=\"bq-radio-group__label\"\n aria-disabled={this.disabled}\n aria-required={this.required}\n disabled={this.disabled}\n role=\"radiogroup\"\n part=\"base\"\n >\n <legend part=\"label\">\n <slot id=\"bq-radiogroup__label\" name=\"label\" />\n </legend>\n <div class={`bq-radio-group--${this.orientation}`} part=\"group\">\n <slot id=\"bq-radiogroup\" onSlotchange={this.handleSlotChange} />\n </div>\n </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-radio.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,+lvBAA+lvB;;MCiDrmvB,OAAO,GAAA,MAAA;;;;;;;;;;AAGV,IAAA,YAAY;;;;;;;;IAeK,iBAAiB,GAAG,KAAK;;IAGV,OAAO,GAAG,KAAK;;IAG9B,QAAQ,GAAG,KAAK;;IAGhB,aAAa,GAAG,KAAK;;AAGrB,IAAA,MAAM;;AAGN,IAAA,IAAI;;AAGJ,IAAA,QAAQ;;AAGR,IAAA,KAAK;;;;;;;AAUrB,IAAA,OAAO;;AAGP,IAAA,OAAO;;AAGP,IAAA,MAAM;;AAGN,IAAA,SAAS;;;;;;;;;;;;AAgBlB;;;AAGG;AAEH,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE;;AAG5B;;;AAGG;AAEH,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE;;AAG5B;;;AAGG;AAEH,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE;;AAG3B;;AAEG;AAEH,IAAA,MAAM,cAAc,GAAA;QAClB,OAAO,IAAI,CAAC,YAAY;;;;;;AAQlB,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;;QAE1C,KA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&encapsulation=shadow","../../packages/beeq/src/components/radio/bq-radio.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Radio styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-radio.variables';\n\n:host {\n @apply inline-block;\n}\n\n.bq-radio {\n @apply box-border inline-flex cursor-pointer items-center justify-center gap-2 transition-[background-color] duration-300;\n @apply rounded-s p-b-xs p-i-xs;\n\n &.is-disabled {\n @apply cursor-not-allowed opacity-60;\n\n &.is-checked .bq-radio__circle {\n @apply border-icon-brand;\n }\n\n &.is-checked .bq-radio__checked {\n @apply bg-ui-brand;\n }\n }\n\n &.has-background:not(.is-disabled):hover {\n @apply bg-hover-ui-primary;\n }\n\n &.is-checked:not(.is-disabled) {\n .bq-radio__circle {\n @apply border-icon-brand;\n }\n\n .bq-radio__checked {\n @apply bg-ui-brand;\n }\n }\n\n &:not(.is-disabled):hover .bq-radio__circle {\n @apply border-hover-icon-brand;\n }\n\n &.is-checked:not(.is-disabled):hover {\n .bq-radio__checked,\n .bq-radio__circle {\n @apply border-hover-icon-brand;\n }\n }\n}\n\n.bq-radio__input {\n @apply sr-only;\n\n &:focus-visible {\n ~ .bq-radio__circle {\n @apply focus;\n }\n }\n}\n\n.bq-radio__control {\n @apply box-border flex items-center justify-center rounded-full bs-[--bq-radio--size] is-[--bq-radio--size] p-b-[2px] p-i-[2px];\n}\n\n.bq-radio__circle {\n @apply relative box-border flex items-center justify-center rounded-full border-[length:--bq-radio--border-width] border-solid border-hover-icon-primary bs-full is-full p-b-[3px] p-i-[3px];\n}\n\n.bq-radio__checked {\n @apply rounded-full bs-full is-full;\n}\n\n.bq-radio__label {\n @apply font-medium leading-regular text-primary;\n}\n\n.bq-radio__circle,\n.bq-radio__checked,\n.bq-radio__label {\n @apply transition-[color,background-color,border-color,box-shadow] duration-300;\n}\n","import { Component, Element, Event, h, Host, Method, Prop } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\n/**\n * The radio button is a user interface element that allows users to select a single option.\n *\n * @example How to use it\n * ```html\n * <bq-radio value=\"option1\">Radio option 1</bq-radio>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/9718e1-radio-button/b/09d7b1\n * @status stable\n *\n * @attr {boolean} background-on-hover - If `true`, the radio displays background on hover\n * @attr {boolean} checked - If `true` radio input is checked\n * @attr {boolean} disabled - If `true` radio input is disabled\n * @attr {string} form-id - The form ID that the radio input is associated with\n * @attr {string} name - Name of the HTML input form control. Submitted with the form as part of a name/value pair\n * @attr {boolean} required - If `true`, it will indicate that the user must specify a value for the radio before the owning form can be submitted\n * @attr {boolean} value - A string representing the value of the radio\n *\n * @method vClick - Simulate a click event on the native `<input>` HTML element used under the hood\n * @method vFocus - Sets focus on the native `<input>` HTML element used under the hood\n * @method vBlur - Remove focus from the native `<input>` HTML element used under the hood\n * @method getNativeInput - Returns the native `<input>` HTML element used under the hood\n *\n * @event bqBlur - Handler to be called when the radio loses focus\n * @event bqClick - Handler to be called when the radio state changes\n * @event bqFocus - Handler to be called when the radio gets focused\n * @event bqKeyDown - The handler is to be called when the radio key is pressed\n *\n * @slot - The bq-radio item\n *\n * @part base - The component's internal wrapper of the radio component.\n * @part input - The native HTML `<input type=\"radio\">` used under the hood.\n * @part radio - The component's internal wrapper of the radio component.\n * @part label - The `<span>` element that holds the text content.\n *\n * @cssprop --bq-radio--size - Radio size\n * @cssprop --bq-radio--border-width - Radio border width\n */\n@Component({\n tag: 'bq-radio',\n styleUrl: './scss/bq-radio.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqRadio {\n // Own Properties\n // ====================\n private inputElement: HTMLInputElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqRadioElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true radio displays background on hover */\n @Prop({ reflect: true }) backgroundOnHover = false;\n\n /** If true radio input is checked */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /** If true radio input is disabled */\n @Prop({ reflect: true }) disabled = false;\n\n /** @internal Used by the radio-group parent component to force the disabled state of the radio input */\n @Prop({ reflect: true }) forceDisabled = false;\n\n /** The form ID that the radio input is associated with */\n @Prop({ reflect: true }) formId?: string;\n\n /** Name of the HTML input form control. Submitted with the form as part of a name/value pair. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, it will indicate that the user must specify a value for the radio before the owning form can be submitted */\n @Prop({ reflect: true }) required?: boolean;\n\n /** A string representing the value of the radio. */\n @Prop({ reflect: true }) value!: string;\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the radio state changes */\n @Event() bqClick: EventEmitter<{ value: string; target: HTMLBqRadioElement }>;\n\n /** Handler to be called when the radio gets focus */\n @Event() bqFocus: EventEmitter<HTMLBqRadioElement>;\n\n /** Handler to be called when the radio loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqRadioElement>;\n\n /** Handler to be called when the radio key is pressed */\n @Event() bqKeyDown: EventEmitter<{ key: string; target: HTMLBqRadioElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Simulate a click event on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.click()`.\n */\n @Method()\n async vClick() {\n this.inputElement?.click();\n }\n\n /**\n * Sets focus on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.focus()`.\n */\n @Method()\n async vFocus() {\n this.inputElement?.focus();\n }\n\n /**\n * Remove focus from the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.blur()`.\n */\n @Method()\n async vBlur() {\n this.inputElement?.blur();\n }\n\n /**\n * Returns the native `<input>` HTML element used under the hood.\n */\n @Method()\n async getNativeInput() {\n return this.inputElement;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleClick = (event: MouseEvent) => {\n // Prevent the native input click default behavior\n event.preventDefault();\n if (this.disabled) return;\n\n // Emit the event without changing state\n // Let the radio-group handle all state management and event propagation\n const bqClickEvent = this.bqClick.emit({ value: this.value, target: this.el });\n if (bqClickEvent.defaultPrevented) {\n event.stopImmediatePropagation();\n }\n };\n\n private handleOnFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleOnBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleOnKeyDown = (event: KeyboardEvent) => {\n this.bqKeyDown.emit({ key: event.key, target: this.el });\n };\n\n private get isDisabled() {\n return this.disabled || this.forceDisabled;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <label\n class={{\n 'bq-radio group': true,\n 'is-disabled': this.isDisabled,\n 'is-checked': this.checked,\n 'has-background': this.backgroundOnHover,\n }}\n part=\"base\"\n >\n <div class=\"bq-radio__control\">\n <input\n class=\"bq-radio__input\"\n ref={(element) => (this.inputElement = element)}\n type=\"radio\"\n form={this.formId}\n name={this.name}\n value={this.value}\n required={this.required}\n disabled={this.isDisabled}\n checked={this.checked}\n onBlur={this.handleOnBlur}\n onClick={this.handleClick}\n onFocus={this.handleOnFocus}\n onKeyDown={this.handleOnKeyDown}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-disabled={this.isDisabled ? 'true' : 'false'}\n aria-labelledby=\"bq-radio__label\"\n part=\"input\"\n />\n <div class=\"bq-radio__circle\" part=\"radio\">\n <div class=\"bq-radio__checked\" />\n </div>\n </div>\n <span\n class=\"bq-radio__label group-hover:text-text-primary-hover group-[.is-disabled]:text-text-primary-disabled\"\n part=\"label\"\n >\n <slot id=\"bq-radio__label\"></slot>\n </span>\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,sz7BAAsz7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CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,EACrDA,OAAS,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,MAAM,EAAA,CAAG,CACrC,CACF,CACH,EACNA,OAAA,CAAA,gBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,EAAE,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,CAAA,CAAE,EAC7B,UAAU,EAAE,IAAI,CAAC,YAAY,mBACd,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,EAC3C,WAAW,EAAC,kBAAkB,EAC9B,IAAI,EAAC,SAAS,EAAA,EAEdA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACO,CACL,EAEdA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,CAAC,qCAAqC,IAAI,CAAC,gBAAgB,CAAE,CAAA,GAAG,IAAI;AACpE,gBAAA,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa;AAC/B,aAAA,EACD,GAAG,EAAE,CAAC,OAAuB,MAAM,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,EACjE,IAAI,EAAC,aAAa,EAAA,EAElBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CAC5D,CACF;;;;;;;;;;;;","names":["isNil","stringToArray","isHTMLElement","isDefined","debounce","hasSlotContent","index","h"],"sources":["../../packages/beeq/src/components/select/scss/bq-select.scss?tag=bq-select&encapsulation=shadow","../../packages/beeq/src/components/select/bq-select.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Select styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-select.variables';\n\n:host {\n @apply block w-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label and Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__label {\n @apply flex items-center m-be-[--bq-select--label-margin-bottom];\n @apply text-[length:--bq-select--label-text-size] text-[color:--bq-select--label-text-color];\n}\n\n.bq-select__helper-text {\n @apply text-[length:--bq-select--helper-text-size] text-[color:--bq-select--helper-text-color] m-bs-[--bq-select--helper-margin-top];\n}\n\n.bq-select__helper-text.validation-error {\n @apply text-danger;\n}\n\n.bq-select__helper-text.validation-success {\n @apply text-success;\n}\n\n.bq-select__helper-text.validation-warning {\n @apply text-warning;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Select input group control */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__dropdown:has(:focus-within, :focus-visible) {\n // The focus state will be controlled by the dropdown element\n // if any of its children has focus, the dropdown will set the focus state to the .bq-select__control\n .bq-select__control {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-select--border-color-focus);\n\n @apply focus border-[color:--bq-select--border-color-focus];\n }\n}\n\n.bq-select__control {\n @apply flex items-center transition-[border-color,box-shadow] is-full;\n // Border\n @apply rounded-[--bq-select--border-radius] border-[length:--bq-select--border-width] border-[color:--bq-select--border-color];\n // Padding\n @apply pe-[--bq-select--padding-end] ps-[--bq-select--padding-start] p-b-[var(--bq-select--paddingY)];\n // Text\n @apply select-none text-[length:--bq-select--text-size] text-[color:--bq-select--text-color] placeholder:text-[color:--bq-select--text-placeholder-color];\n // Hover\n @apply [&:not(.disabled):not(:focus-within)]:hover:border-hover-brand;\n\n border-style: var(--bq-select--border-style);\n\n // Enable clear button whenever the input group control is hovered or has focus\n &:not(.disabled):hover,\n &:not(.disabled):focus-within {\n .bq-select__control--clear {\n @apply inline-block;\n }\n }\n}\n\n.bq-select__control.disabled {\n @apply cursor-not-allowed opacity-60;\n}\n\n/* ------------------------------- Validation ------------------------------- */\n\n.bq-select__control.validation-error {\n @apply border-danger [&:not(.disabled):not(:focus-within)]:hover:border-hover-danger;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.danger);\n\n @apply border-active-danger;\n }\n}\n\n.bq-select__control.validation-success {\n @apply border-success [&:not(.disabled):not(:focus-within)]:hover:border-hover-success;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.success);\n\n @apply border-active-success;\n }\n}\n\n.bq-select__control.validation-warning {\n @apply border-warning [&:not(.disabled):not(:focus-within)]:hover:border-hover-warning;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.warning);\n\n @apply border-active-warning;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Native HTML Input */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--input {\n @apply flex-auto cursor-inherit select-none appearance-none bg-inherit font-inherit text-[length:inherit] text-inherit;\n @apply m-0 border-none p-0 min-bs-[var(--bq-select--icon-size)] min-is-0 focus:outline-none focus-visible:outline-none;\n\n box-shadow: none;\n font-weight: inherit;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Clear button */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--clear::part(button) {\n // Since the clear button is inside the input group control,\n // we need to reset the focus ring styles\n --bq-ring-width: initial;\n --bq-ring-offset-width: initial;\n --bq-ring-color-focus: initial;\n\n @apply rounded-xs border-none p-0 bs-auto;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Prefix and suffix */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--prefix,\n.bq-select__control--suffix {\n @apply pointer-events-none flex items-center text-[color:var(--bq-select--text-color)];\n}\n\n.bq-select__control--prefix {\n @apply me-[--bq-select--gap];\n}\n\n.bq-select__control--suffix {\n @apply ms-[--bq-select--gap] transition-transform duration-300 ease-in-out;\n}\n\n.bq-select__tags {\n @apply me-xs2 flex flex-1 gap-xs2;\n\n bq-tag,\n ::slotted(bq-tag) {\n @apply inline-flex;\n }\n\n bq-tag::part(text) {\n @apply text-nowrap leading-small;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Slotted and internal icons */\n/* -------------------------------------------------------------------------- */\n\nbq-icon,\n::slotted(bq-icon) {\n --bq-icon--size: var(--bq-select--icon-size) !important;\n}\n","import { AttachInternals, Component, Element, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport {\n debounce,\n hasSlotContent,\n isDefined,\n isHTMLElement,\n isNil,\n stringToArray,\n TDebounce,\n} from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\n\nexport type TSelectValue = string | string[];\n\n/**\n * The select input component lets users choose from a predefined list, commonly used in forms for easy data selection.\n *\n * @example How to use it\n * ```html\n * <bq-select placeholder=\"Placeholder\">\n * <label slot=\"label\">Select label</label>\n * <span slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n *\n * <bq-option value=\"1\">Option 1</bq-option>\n * <bq-option value=\"2\">Option 2</bq-option>\n * <bq-option value=\"3\">Option 3</bq-option>\n * </bq-select>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/41989d-select/b/09d7b1\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n * @dependency bq-option-list\n * @dependency bq-tag\n *\n * @attr {boolean} autofocus - If `true`, the Select input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Select input is disabled and cannot be interacted with.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Select panel and the input element.\n * @attr {string} form - The ID of the form that Select input field belongs to.\n * @attr {boolean} keep-open-on-select - If `true`, the Select panel will remain open after a selection is made.\n * @attr {number} max-tags-visible - The maximum number of tags to display when multiple selection is enabled.\n * @attr {boolean} multiple - If `true`, the Select input will allow multiple selections.\n * @attr {string} name - The Select input name.\n * @attr {boolean} open - If `true`, the Select panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Select panel.\n * @attr {string} placeholder - The Select input placeholder text value.\n * @attr {\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"} placement - Position of the Select panel.\n * @attr {boolean} readonly - If `true`, the Select input cannot be modified.\n * @attr {boolean} required - Indicates whether or not the Select input is required to be filled out before submitting the form.\n * @attr {boolean} same-width - Whether the panel should have the Select same width as the input element.\n * @attr {number} skidding - Represents the skidding between the Select panel and the input element.\n * @attr {\"absolute\" | \"fixed\"} strategy - Defines the strategy to position the Select panel.\n * @attr {\"error\" | \"success\" | \"warning\" | \"none\"} validation-status - The validation status of the Select input.\n * @attr {\"number\" | \"string\" | \"string[]\"} value - The select input value can be used to reset the field to a previous value.\n *\n * @method clear - Method to be called to clear the selected value.\n *\n * @event bqBlur - The callback handler is emitted when the Select input loses focus.\n * @event bqClear - The callback handler is emitted when the selected value has been cleared.\n * @event bqFocus - A callback handler is emitted when the Select input has received focus.\n * @event bqSelect - The callback handler is emitted when the selected value has changed.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot tags - The tags slot container.\n * @slot clear-icon - The clear icon slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input-outline - The input outline wrapper that holds the tags container and the native HTML input used under the hood.\n * @part helper-text - The helper text slot container.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The select panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n * @part tags - The tags container of the BqTags for multiple selection.\n * @part tag - The tag container of the BqTag for multiple selection.\n * @part tag__base - The base wrapper of the BqTag for multiple selection.\n * @part tag__prefix - The prefix slot container of the BqTag for multiple selection.\n * @part tag__text - The text slot container of the BqTag for multiple selection.\n * @part tag__btn-close - The close button of the BqTag for multiple selection.\n * @part option-list - The option list container.\n *\n * @cssprop --bq-select--background-color - Select background color\n * @cssprop --bq-select--border-color - Select border color\n * @cssprop --bq-select--border-color-focus - Select border color on focus\n * @cssprop --bq-select--border-color-disabled - Select border color when disabled\n * @cssprop --bq-select--border-radius - Select border radius\n * @cssprop --bq-select--border-width - Select border width\n * @cssprop --bq-select--border-style - Select border style\n * @cssprop --bq-select--gap - Gap between Select content and prefix/suffix\n * @cssprop --bq-select--helper-margin-top - Helper text margin top\n * @cssprop --bq-select--helper-text-color - Helper text color\n * @cssprop --bq-select--helper-text-size - Helper text size\n * @cssprop --bq-select--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-select--label-margin-bottom - Select label margin bottom\n * @cssprop --bq-select--label-text-color - Select label text color\n * @cssprop --bq-select--label-text-size - Select label text size\n * @cssprop --bq-select--padding-start - Select padding start\n * @cssprop --bq-select--padding-end - Select padding end\n * @cssprop --bq-select--paddingY - Select padding top and bottom\n * @cssprop --bq-select--text-color - Select text color\n * @cssprop --bq-select--text-size - Select text size\n * @cssprop --bq-select--text-placeholder-color - Select placeholder text color\n */\n@Component({\n tag: 'bq-select',\n styleUrl: './scss/bq-select.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSelect {\n // Own Properties\n // ====================\n\n private helperTextElem?: HTMLElement;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private debounceQuery: TDebounce<void>;\n private debounceInput: TDebounce<void>;\n\n private fallbackInputId = 'select';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSelectElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() displayValue?: string;\n @State() hasHelperText = false;\n @State() selectedOptions: HTMLBqOptionElement[] = [];\n\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If true, the Select input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * A value of 0 means no debouncing will occur.\n */\n @Prop({ reflect: true, mutable: true }) debounceTime? = 0;\n\n /** If true, the Select panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /**\n * Indicates whether the Select input is disabled or not.\n * If `true`, the Select is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** If true, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /** Represents the distance (gutter or margin) between the Select panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The ID of the form that the Select input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** If true, the Select panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** The Select input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** The maximum number of tags to display when multiple selection is enabled */\n @Prop({ mutable: true }) maxTagsVisible: number = 2;\n\n /** If true, the Select input will allow multiple selections. */\n @Prop({ reflect: true }) multiple?: boolean = false;\n\n /** If true, the Select panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Select panel. */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** The Select input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Select panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom';\n\n /** If true, the list of options cannot be filtered (searching won't be available) */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the Select input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Whether the panel should have the Select same width as the input element */\n @Prop({ reflect: true }) sameWidth?: boolean = true;\n\n /** Represents the skidding between the Select panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the Select panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value, it can be used to reset the field to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TSelectValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n // Early return for undefined/null values\n if (isNil(this.value)) {\n this.value = this.multiple ? [] : '';\n this.internals.setFormValue(undefined);\n this.syncItemsFromValue();\n return;\n }\n\n // Handle multiple selection mode\n if (this.multiple) {\n this.value = stringToArray(this.value);\n this.internals.setFormValue(this.value.join(','));\n this.syncItemsFromValue();\n\n return;\n }\n\n // Handle single selection mode\n this.value = String(this.value);\n this.internals.setFormValue(this.value);\n this.syncItemsFromValue();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the Select input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the Select input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has changed */\n @Event() bqSelect!: EventEmitter<{ value: string | number | string[]; item: HTMLBqOptionElement }>;\n\n /** Callback handler emitted when the Select input changes its value while typing */\n @Event() bqInput: EventEmitter<{ value: string | number | string[] }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.initMultipleValue();\n }\n\n componentWillLoad() {\n this.initMultipleValue();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n\n if (this.multiple && Array.isArray(this.value)) {\n this.selectedOptions = this.options.filter((item) => this.value.includes(item.value));\n }\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.internals.role = 'combobox';\n this.internals.ariaExpanded = this.open ? 'true' : 'false';\n }\n\n async formResetCallback() {\n if (isNil(this.value)) return;\n\n this.internals.setValidity({});\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n }\n\n @Listen('bqFocus', { capture: true })\n @Listen('bqBlur', { capture: true })\n stopOptionFocusBlurPropagation(ev: CustomEvent) {\n // Stop propagation of focus and blur events coming from the `bq-option` elements\n if (isHTMLElement(ev.target, 'bq-select')) return;\n\n ev.stopPropagation();\n }\n\n @Listen('scroll', { target: 'window', passive: true, capture: true })\n handleScrollEvent() {\n if (!this.open || this.disableScrollLock) return;\n\n // Close the panel when the scroll event is triggered.\n // This is useful for those cases where the floating panel is inside a scrollable container.\n // For example, a select inside a dialog, drawer, etc.\n // ⚠️ Notice that document body scroll lock is handled via the `scrollLock` utility.\n this.open = false;\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 /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n const { multiple, inputElem, bqClear, el } = this;\n\n // Clear value and selected options\n this.value = '';\n this.selectedOptions = [];\n\n // Clear display value and input element if not multiple\n if (!multiple) {\n this.displayValue = '';\n inputElem.value = '';\n }\n\n // Update form value and reset options visibility\n this.resetOptionsVisibility();\n\n // Emit clear event\n bqClear.emit(el);\n }\n\n /**\n * Resets the Select input to a previous value.\n *\n * @param {TSelectValue} value - The value to reset the Select input to.\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async reset(value: TSelectValue): Promise<void> {\n if (isNil(value)) return;\n\n this.value = value;\n this.syncItemsFromValue();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private initMultipleValue = () => {\n if (!this.multiple || !isDefined(this.value)) return;\n\n this.value = Array.isArray(this.value) ? this.value : Array.from(JSON.parse(String(this.value)));\n };\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleSelect = (ev: CustomEvent<{ value: TSelectValue; item: HTMLBqOptionElement }>) => {\n if (this.disabled) return;\n\n if (this.multiple) {\n ev.stopPropagation();\n }\n\n const { value, item } = ev.detail;\n\n if (this.multiple) {\n this.handleMultipleSelection(item);\n // Clear the input value after selecting an item\n this.inputElem.value = '';\n // If multiple selection is enabled, emit the selected items array instead of relying on\n // the option list to emit the value of the selected item\n this.bqSelect.emit({ value: this.value, item });\n } else {\n this.value = value;\n }\n\n this.resetOptionsVisibility();\n this.inputElem.focus();\n };\n\n private handleMultipleSelection = (item: HTMLBqOptionElement) => {\n // Set has O(1) complexity for insertion, deletion, and search operations, compared to an Array's O(n)\n const selectedOptionsSet = new Set(this.selectedOptions);\n\n if (selectedOptionsSet.has(item)) {\n selectedOptionsSet.delete(item);\n } else {\n selectedOptionsSet.add(item);\n }\n\n this.selectedOptions = Array.from(selectedOptionsSet);\n this.value = this.selectedOptions.map((item) => item.value);\n };\n\n private handleSearchFilter = (value: string) => {\n if (this.disabled) return;\n\n this.debounceQuery?.cancel();\n\n if (!isDefined(value)) {\n this.clear();\n } else {\n this.debounceQuery = debounce(() => {\n this.options.forEach((item: HTMLBqOptionElement) => {\n const itemLabel = this.getOptionLabel(item).toLowerCase();\n item.hidden = !itemLabel.includes(value);\n });\n }, this.debounceTime);\n\n this.debounceQuery();\n }\n\n // The panel will close once a selection is made\n // so we need to make sure it's open when the user is typing and the query is not empty\n this.open = true;\n };\n\n private handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n const { value } = ev.target as HTMLInputElement;\n\n this.debounceInput?.cancel();\n\n this.debounceInput = debounce(() => {\n const inputEvent = this.bqInput.emit({ value });\n if (!inputEvent.defaultPrevented) {\n // Continue with search filtering only if the event wasn't prevented\n this.handleSearchFilter(value);\n }\n }, this.debounceTime);\n\n this.debounceInput();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n (async () => {\n await this.clear();\n })();\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleTagRemove = (item: HTMLBqOptionElement) => {\n if (this.disabled) return;\n\n this.handleMultipleSelection(item);\n this.bqSelect.emit({ value: this.value, item });\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private resetOptionsVisibility = () => {\n this.options.forEach((item: HTMLBqOptionElement) => (item.hidden = false));\n };\n\n private syncItemsFromValue = () => {\n const { internals, options, value } = this;\n if (!options.length) return;\n\n // Sync selected state of the BqOption elements\n this.syncSelectedOptionsState();\n\n if (this.multiple) {\n // Sync selected options for multiple selection mode\n this.selectedOptions = options.filter((option) => this.value?.includes(option.value));\n }\n\n // Always update display value and form value\n this.updateDisplayLabel();\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n /**\n * Syncs the selected state of the BqOption elements which value is included in the `value` property.\n * Notice that value can be a string or an array of strings.\n *\n * @private\n * @memberof BqSelect\n */\n private syncSelectedOptionsState = () => {\n const { options, multiple, value } = this;\n const lowerCaseValue = String(value).toLowerCase();\n\n options.forEach((option: HTMLBqOptionElement) => {\n if (multiple && Array.isArray(value)) {\n option.selected = value.includes(option.value);\n } else {\n option.selected = option.value.toLowerCase() === lowerCaseValue;\n }\n });\n };\n\n /**\n * Updates the display value of the input element based on the selected option.\n *\n * @private\n * @memberof BqSelect\n */\n private updateDisplayLabel = () => {\n const { value, options, inputElem } = this;\n\n const checkedItem = options.find((item) => item.value === value);\n const displayValue = checkedItem ? this.getOptionLabel(checkedItem) : '';\n\n this.displayValue = displayValue;\n if (inputElem) {\n inputElem.value = displayValue;\n }\n };\n\n private getOptionLabel = (item: HTMLBqOptionElement) => {\n if (!item) return '';\n return item.innerText.trim() ?? '';\n };\n\n private get options() {\n return Array.from(this.el.querySelectorAll('bq-option'));\n }\n\n private get displayPlaceholder() {\n // Hide the placeholder when multiple selection is enabled and there are selected items\n return this.multiple && this.selectedOptions.length !== 0 ? undefined : this.placeholder;\n }\n\n private get displayTags() {\n return this.selectedOptions.map((item, index) => {\n if (index < this.maxTagsVisible || this.maxTagsVisible < 0) {\n return (\n <bq-tag\n key={item.value}\n removable\n size=\"xsmall\"\n variant=\"filled\"\n onBqClose={(event) => {\n // NOTE: prevents triggering bqClose on parent\n event.stopPropagation();\n this.handleTagRemove(item);\n }}\n // Prevent the tag from closing the panel when clicked\n onClick={(ev: MouseEvent) => ev.stopPropagation()}\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n {this.getOptionLabel(item)}\n </bq-tag>\n );\n } else if (index === this.maxTagsVisible) {\n return (\n <bq-tag\n key=\"more\"\n size=\"xsmall\"\n variant=\"filled\"\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n +{this.selectedOptions.length - index}\n </bq-tag>\n );\n }\n\n return null;\n });\n }\n\n private get hasClearIcon() {\n if (this.disableClear || this.disabled) {\n return false;\n }\n\n if (this.multiple) {\n return this.selectedOptions.length > 0;\n }\n\n return isDefined(this.displayValue);\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-select\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-select__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select dropdown */}\n <bq-dropdown\n class=\"bq-select__dropdown w-full\"\n disableScrollLock={this.disableScrollLock}\n disabled={this.disabled}\n distance={this.distance}\n keepOpenOnSelect={this.keepOpenOnSelect}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-select__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <div class=\"flex flex-1 overflow-x-auto\" part=\"input-outline\">\n {/* Display selected values using BqTags for multiple selection */}\n {this.multiple && (\n <span class=\"bq-select__tags\" part=\"tags\">\n <slot name=\"tags\">{this.displayTags}</slot>\n </span>\n )}\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-select__control--input flex-grow is-full\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`bq-options-${this.name}`}\n aria-expanded={this.open ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.displayPlaceholder}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n role=\"combobox\"\n spellcheck={false}\n type=\"text\"\n value={this.displayValue}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n </div>\n {/* Clear Button */}\n {this.hasClearIcon && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-select__control--clear ms-[--bq-select--gap]\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n tabIndex={-1}\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class={{ 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }}\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"caret-down\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <bq-option-list\n id={`bq-options-${this.name}`}\n onBqSelect={this.handleSelect}\n aria-expanded={this.open ? 'true' : 'false'}\n exportparts=\"base:option-list\"\n role=\"listbox\"\n >\n <slot />\n </bq-option-list>\n </bq-dropdown>\n {/* Helper text */}\n <div\n class={{\n [`bq-select__helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem: HTMLDivElement) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 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,EAAE,KAEfA,OAAA,CAAA,YAAA,EAAA,EAAY,KAAK,EAAC,mCAAmC,EAAC,SAAS,EAAC,OAAO,EAAC,WAAW,EAAC,gBAAgB,EAAA,EACjG,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,QAAQ,EAAE,CACL,CACd;;;;;;;","names":["getTextContent","h"],"sources":["../../packages/beeq/src/components/side-menu-item/scss/bq-side-menu-item.scss?tag=bq-side-menu-item&encapsulation=shadow","../../packages/beeq/src/components/side-menu-item/bq-side-menu-item.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Side menu item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-side-menu-item.variables';\n\n:host {\n @apply flex;\n}\n\n.bq-side-menu__item {\n @apply flex flex-grow items-center gap-x-s rounded-s border-none px-[var(--bq-side-menu-item--paddingX)] py-[var(--bq-side-menu-item--paddingY)] no-underline transition-colors duration-150;\n\n // Default state\n @apply bg-[var(--bq-side-menu-item--bg-default)] text-m text-[color:var(--bq-side-menu-item--text-default)];\n\n // Focus state\n @apply [&:not(.disabled)]:focus-visible:focus;\n\n // Hover state\n @apply [&:not(.disabled)]:hover:cursor-pointer;\n @apply [&:not(.disabled,.active)]:hover:text-m [&:not(.disabled,.active)]:hover:bg-hover-ui-alt [&:not(.disabled,.active)]:hover:text-hover-primary;\n}\n\n.bq-side-menu__item.active {\n // Active state\n @apply bg-[var(--bq-side-menu-item--bg-active)] text-m text-[color:var(--bq-side-menu-item--text-active)];\n}\n\n.bq-side-menu__item.disabled {\n @apply opacity-60 hover:cursor-not-allowed;\n}\n\n.bq-side-menu__item.is-collapsed {\n @apply justify-center gap-0;\n\n .bq-side-menu__item--label,\n .bq-side-menu__item--suffix {\n @apply sr-only scale-0;\n }\n}\n\n.bq-side-menu__item--label,\n.bq-side-menu__item--suffix {\n @apply transition-all duration-300 ease-in-out;\n}\n","import { Component, Element, Event, h, Prop, State } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { getTextContent } from '../../shared/utils';\n\n/**\n * Represents the default side menu item for standard navigation elements, providing a clean and straightforward way to display menu options.\n *\n * @example How to use it\n * ```html\n * <bq-side-menu-item>\n * <bq-icon name=\"star-four\" slot=\"prefix\"></bq-icon>\n * Menu item\n * <bq-badge slot=\"suffix\">5</bq-badge>\n * </bq-side-menu-item>\n * ```\n * @documentation https://www.beeq.design/3d466e231/p/99822d-side-menu/b/09d7b1\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {boolean} active - If `true`, the menu item will be shown as active/selected.\n * @attr {boolean} collapse - If `true`, the item label and suffix will be hidden and the `width` will be reduced according to its parent.\n * @attr {boolean} disabled - If `true`, the menu item will be disabled (no interaction allowed).\n *\n * @event bqBlur - Handler to be called when the button loses focus.\n * @event bqClick - Handler to be called when the button gets focused.\n * @event bqFocus - Handler to be called when the button is clicked.\n *\n * @slot prefix - The prefix part of menu item.\n * @slot - The content of the menu item.\n * @slot suffix - The suffix part of menu item.\n *\n * @part base - The component wrapper container inside the shadow DOM\n * @part label - The label slot\n * @part prefix - The prefix slot\n * @part suffix - The suffix slot\n * @part panel - The `<div>` container that holds the tooltip content (when the side menu is collapsed)\n * @part trigger - The `<div>` container that holds the element which displays tooltip on hover (when the side menu is collapsed)\n *\n * @cssprop --bq-side-menu-item--bg-default - Side menu item default background color\n * @cssprop --bq-side-menu-item--bg-active - Side menu item active background color\n * @cssprop --bq-side-menu-item--text-default - Side menu item default text color\n * @cssprop --bq-side-menu-item--text-active - Side menu item active text color\n * @cssprop --bq-side-menu-item--paddingX - Side menu item vertical padding\n * @cssprop --bq-side-menu-item--paddingY - Side menu item horizontal padding\n */\n@Component({\n tag: 'bq-side-menu-item',\n styleUrl: './scss/bq-side-menu-item.scss',\n shadow: true,\n})\nexport class BqSideMenuItem {\n // Own Properties\n // ====================\n\n private labelElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSideMenuItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() textContent: string;\n\n // Public Property API\n // ========================\n\n /** If true, the menu item will be shown as active/selected. */\n @Prop() active: boolean = false;\n\n /** If true, the item label and suffix will be hidden and the `width` will be reduced according to its parent. */\n @Prop() collapse: boolean = false;\n\n /** If true, the menu item will be disabled (no interaction allowed) */\n @Prop() disabled: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSideMenuItemElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqSideMenuItemElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqSideMenuItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\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.labelElem) return;\n this.textContent = getTextContent(this.labelElem.querySelector('slot'));\n };\n\n handleBlur = (ev: Event) => {\n if (this.disabled) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n handleFocus = (ev: Event) => {\n if (this.disabled) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n handleClick = (ev: Event) => {\n if (this.disabled || this.active) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n private menuItem = () => (\n <button\n class={{\n 'bq-side-menu__item': true,\n active: this.active,\n disabled: this.disabled,\n 'is-collapsed': this.collapse,\n }}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n aria-disabled={this.disabled ? 'true' : 'false'}\n role=\"menuitem\"\n tabindex={this.disabled ? -1 : 0}\n slot=\"trigger\"\n part=\"base\"\n >\n <div class=\"bq-side-menu__item--prefix flex items-center\" part=\"prefix\">\n <slot name=\"prefix\" />\n </div>\n <div\n class=\"bq-side-menu__item--label overflow-hidden text-ellipsis whitespace-nowrap\"\n ref={(labelElem) => (this.labelElem = labelElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"bq-side-menu__item--suffix ml-auto flex items-center\" part=\"suffix\">\n <slot name=\"suffix\" />\n </div>\n </button>\n );\n\n render() {\n return !this.collapse ? (\n this.menuItem()\n ) : (\n <bq-tooltip class=\"bq-side-menu__item--tooltip block\" placement=\"right\" exportparts=\"trigger, panel\">\n {this.textContent}\n {this.menuItem()}\n </bq-tooltip>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-side-menu.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,aAAa,GAAG,yquBAAyquB;;MC8DlruB,UAAU,GAAA,MAAA;;;;;;;;IAIb,mBAAmB,GAAG,mBAAmB;IAEzC,OAAO,GAAG,oBAAoB;IAC9B,aAAa,GAAG,4BAA4B;IAC5C,eAAe,GAAG,8BAA8B;AAEhD,IAAA,QAAQ;;;;;;AASC,IAAA,YAAY;;;;IAMJ,UAAU,GAAwB,SAAS;;IAG3C,QAAQ,GAAY,KAAK;;IAGzB,IAAI,GAAkB,QAAQ;;;IAMvD,oBAAoB,GAAA;QAClB,IAAI,CAAC,cAAc,EAAE;AACrB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;;;;;;AAQ1C,IAAA,UAAU;;AAGV,IAAA,QAAQ;;;;IAMjB,gBAAgB,GAAA;QACd,IAAI,CAACA,iBAAQ,EAAE;YAAE;QAEjB,IAAI,CAAC,YA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AAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,MAAM,EAAA,CAAG,CAChB,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,uDAAuD,EAC7D,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;;YAE3C,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,KAAK,EAAA,EAEVA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,gHAAgH,EACtH,IAAI,EAAC,QAAQ,EAAA,EAEbA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACA;;;;;;;;;;","names":["isClient","isHTMLElement","h"],"sources":["../../packages/beeq/src/components/side-menu/scss/bq-side-menu.scss?tag=bq-side-menu&encapsulation=shadow","../../packages/beeq/src/components/side-menu/bq-side-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Side menu styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-side-menu.variables';\n\n:host {\n @apply flex overflow-hidden;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Aside container */\n/* -------------------------------------------------------------------------- */\n\n.bq-side-menu {\n @apply fixed flex h-dynamic-vh grow flex-col bg-[--bq-side-menu--bg-color] is-[--bq-side-menu--width] inset-bs-0 inset-is-0;\n @apply border-0 border-e-s border-solid border-[color:--bq-side-menu--border-color];\n @apply transition-[background-color,width] duration-150;\n @include hide-scrollbar;\n}\n\n.bq-side-menu.is-collapsed {\n @apply is-[--bq-side-menu--width-collapse];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Logo container */\n/* -------------------------------------------------------------------------- */\n\n.bq-side-menu--logo {\n @apply sticky top-0 z-[1] p-xs;\n @apply box-content flex items-center bg-[--bq-side-menu--bg-color] text-[color:--bq-side-menu--brand-color];\n}\n\n/* -------------------------------------------------------------------------- */\n/* APPEARANCE */\n/* -------------------------------------------------------------------------- */\n\n/**\n * The following change the default values of some CSS custom properties\n * to make it complain with the side menu appearance selected\n */\n\n:host([size='small']) {\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--paddingY: theme(space.s);\n }\n}\n\n:host([appearance='brand']) {\n --bq-focus: theme(stroke.alt);\n --bq-side-menu--bg-color: theme(backgroundColor.ui.brand);\n --bq-side-menu--brand-color: theme(stroke.inverse);\n --bq-side-menu--border-color: theme(stroke.brand);\n\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--bg-hover: color-mix(in srgb, var(--bq-ui--brand), var(--bq-hover) 20%);\n\n --bq-side-menu-item--text-default: theme(textColor.alt);\n --bq-side-menu-item--text-hover: theme(textColor.alt);\n }\n\n .bq-side-menu--footer ::slotted([slot='footer']) {\n --bq-ui--secondary: theme(colors.transparent);\n --bq-text--primary: theme(textColor.inverse);\n }\n}\n\n:host([appearance='inverse']) {\n --bq-side-menu--bg-color: theme(backgroundColor.ui.inverse);\n --bq-side-menu--brand-color: theme(stroke.inverse);\n --bq-side-menu--border-color: theme(backgroundColor.ui.inverse);\n\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--bg-hover: color-mix(in srgb, var(--bq-ui--inverse), var(--bq-hover) 20%);\n --bq-side-menu-item--bg-active: color-mix(in srgb, var(--bq-ui--alt), var(--bq-active) 20%);\n\n --bq-side-menu-item--text-default: theme(textColor.inverse);\n --bq-side-menu-item--text-hover: theme(textColor.inverse);\n --bq-side-menu-item--text-active: theme(textColor.primary);\n }\n\n .bq-side-menu--footer ::slotted([slot='footer']) {\n --bq-ui--secondary: theme(colors.transparent);\n --bq-text--primary: theme(textColor.inverse);\n }\n}\n","import { Component, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TSideMenuAppearance, TSideMenuSize } from './bq-side-menu.types';\nimport { isClient, isHTMLElement } from '../../shared/utils';\n\n/**\n *The default side menu serves as a versatile container for organizing and displaying navigation elements,\n * with default side menu items providing a clean and straightforward way to represent individual menu options.\n * Together, they form the foundation for building structured and intuitive side menu layouts.\n *\n * @example How to use it\n * ```html\n * <bq-side-menu>\n * <div slot=\"logo\">\n * <h1>Your Logo</h1>\n * </div>\n * <bq-side-menu-item active>\n * <bq-icon name=\"home\" slot=\"prefix\"></bq-icon>\n * Home\n * </bq-side-menu-item>\n * <bq-side-menu-item>\n * <bq-icon name=\"settings\" slot=\"prefix\"></bq-icon>\n * Settings\n * </bq-side-menu-item>\n * <bq-side-menu-item disabled>\n * <bq-icon name=\"help\" slot=\"prefix\"></bq-icon>\n * Help\n * </bq-side-menu-item>\n * </bq-side-menu>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/99822d-side-menu/b/09d7b1\n * @status stable\n *\n * @attr {\"brand\" | \"default\" | \"inverse\"} appearance - It sets a predefined appearance of the side menu.\n * @attr {boolean} collapse - If `true`, the container will reduce its width.\n * @attr {\"medium\" | \"small\"} - size - It sets the size of the navigation menu items.\n *\n * @method toggleCollapse - Method to be called to toggle the collapse state of the side menu.\n *\n * @event bqCollapse - Callback handler to be called when the Side menu changes its width from expanded to collapse and vice versa.\n * @event bqSelect - Callback handler to be called when the active/selected menu item changes.\n *\n * @slot logo - The section for displaying the logo or brand in the side menu.\n * @slot The main section that holds all menu items.\n * @slot footer - The section for adding footer content to the side menu.\n *\n * @part base - HTML `<aside>` root container\n * @part footer - HTML `<div>` element that holds the footer\n * @part logo - HTML `<div>` element that holds the logo\n * @part nav - HTML `<nav>` element that holds the navigation items\n *\n * @cssprop --bq-side-menu--bg-color - Side menu background color\n * @cssprop --bq-side-menu--brand-color - Side menu logo color\n * @cssprop --bq-side-menu--border-color - Side menu border color\n */\n@Component({\n tag: 'bq-side-menu',\n styleUrl: './scss/bq-side-menu.scss',\n shadow: true,\n})\nexport class BqSideMenu {\n // Own Properties\n // ====================\n\n private menuItemCssSelector = 'bq-side-menu-item';\n\n private bodyCss = 'bq-body--side-menu';\n private bodyCssExpand = 'bq-body--side-menu__expand';\n private bodyCssCollapse = 'bq-body--side-menu__collapse';\n\n private menuElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private documentBody: HTMLBodyElement;\n\n // Public Property API\n // ========================\n\n /** It sets a predefined appearance of the side menu */\n @Prop({ reflect: true }) appearance: TSideMenuAppearance = 'default';\n\n /** If true, the container will reduce its width */\n @Prop({ reflect: true }) collapse: boolean = false;\n\n /** It sets the size of the navigation menu items */\n @Prop({ reflect: true }) size: TSideMenuSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('collapse')\n onCollapsePropChange() {\n this.handleCollapse();\n this.bqCollapse.emit({ collapse: this.collapse });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the Side menu changes its width from expanded to collapse and vice versa */\n @Event() bqCollapse: EventEmitter<{ collapse: boolean }>;\n\n /** Callback handler to be called when the active/selected menu item changes */\n @Event() bqSelect: EventEmitter<HTMLBqSideMenuItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n if (!isClient()) return;\n\n this.documentBody = document.querySelector('body');\n this.documentBody.classList.add(this.bodyCss);\n this.handleCollapse();\n }\n\n disconnectedCallback() {\n this.cleanDocumentBodyClass();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { passive: true })\n onMenuItemClick(event: Event) {\n const { target: item } = event;\n if (!isHTMLElement(item, 'bq-side-menu-item')) return;\n\n this.menuItems.forEach(\n (menuItem: HTMLBqSideMenuItemElement) => (menuItem.active = !menuItem.disabled && menuItem === item),\n );\n this.bqSelect.emit(item);\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 /** Toggle the collapse state of the side menu */\n @Method()\n async toggleCollapse() {\n this.collapse = !this.collapse;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get menuItems() {\n if (!this.menuElem) return [];\n\n const slot = this.menuElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === this.menuItemCssSelector,\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private handleCollapse = () => {\n if (!this.menuItems.length) return;\n\n this.menuItems.forEach((menuItem: HTMLBqSideMenuItemElement) => (menuItem.collapse = this.collapse));\n if (this.collapse) {\n this.collapseDocumentBody();\n } else {\n this.expandDocumentBody();\n }\n };\n\n private collapseDocumentBody = () => {\n if (!this.collapse) return;\n\n this.documentBody.classList.remove(this.bodyCssExpand);\n this.documentBody.classList.add(this.bodyCssCollapse);\n };\n\n private expandDocumentBody = () => {\n if (this.collapse) return;\n\n this.documentBody.classList.remove(this.bodyCssCollapse);\n this.documentBody.classList.add(this.bodyCssExpand);\n };\n\n private cleanDocumentBodyClass = () => {\n this.documentBody.classList.remove(this.bodyCss, this.bodyCssCollapse, this.bodyCssExpand);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <aside class={{ 'bq-side-menu overflow-y-auto': true, 'is-collapsed': this.collapse }} part=\"base\">\n {/* Company logo and name */}\n <div class={{ 'bq-side-menu--logo': true, 'is-collapsed': this.collapse }} part=\"logo\">\n <slot name=\"logo\" />\n </div>\n {/* Navigation content */}\n <nav\n class=\"bq-side-menu--nav flex flex-col gap-y-xs px-xs pt-xs2\"\n ref={(navElem) => (this.menuElem = navElem)}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"menu\"\n part=\"nav\"\n >\n <slot />\n </nav>\n {/* Footer */}\n <div\n class=\"bq-side-menu--footer sticky flex justify-center bg-[var(--bq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S,GAAG,IAAI,CAAC,EACtC,IAAI,EAAC,YAAY,EACjB,CAAA,EAEFA,OACE,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oGAAoG,EAC1G,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,EACzC,IAAI,EAAC,eAAe,EACpB,CAAA,EAED,IAAI,CAAC,aAAa;YACjB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,EAEjG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,EAE9E,IAAI,CAAC,aAAa;AACjB,YAAA,IAAI,CAAC,WAAW;AAChB,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,EAEjG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F,EAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD;;;;;;;;;;;;;;","names":["isNil","clamp","isString","debounce","h"],"sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-m border-solid border-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-brand;\n }\n}\n\n:host {\n @apply block is-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","import { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { 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 if (isRangeType) this.el.setAttribute('value', JSON.stringify(this.value));\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return ((value - this.min) / 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) + this.min)\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 0;\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]`]: 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': true,\n 'pointer-events-none': this.isRangeType,\n }}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n name={this.name}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute bs-1 is-1\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'flex is-full': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"relative is-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-spinner.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAO,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAU;AACnF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;;ACDjE,MAAM,YAAY,GAAG,08rBAA08rB;;MCoDl9rB,SAAS,GAAA,MAAA;;;;;;AAIZ,IAAA,YAAY;AACZ,IAAA,QAAQ;AACR,IAAA,QAAQ,GAAqB,IAAI,gBAAgB,CAAC,CAAC,SAAS,KAAI;AACtE,QAAA,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;QAC5B,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM;AAC7D,KAAC,CAAC;;;;;IAWe,WAAW,GAAG,KAAK;IACnB,OAAO,GAAG,KAAK;IACf,iBAAiB,GAAG,CAAC;;;;IAMb,SAAS,GAAI,IAAI;;IAGjB,YAAY,GAAyB,MAAM;;IAG3C,IAAI,GAAiB,QAAQ;;;IAMtD,sBAAsB,GAAA;QACpBA,uBAAiB,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;;IAI3E,cAAc,GAAA;QACZA,uBAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC;QAC1D,IAAI,CAAC,WAAW,EAAE;;IAIpB,iBAAiB,GAAA;QACf,IAAI,CAAC,WAAW,EAAE;;;;;;;;IAWpB,iBAAiB,GA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AM,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAA,EAE7CA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACxC,CACH;;;;;;;;;;;;","names":["validatePropValue","hasSlotContent","slot","isNil","getTextContent","getCSSVariableValue","isHTMLElement","h"],"sources":["../../packages/beeq/src/components/spinner/bq-spinner.types.ts","../../packages/beeq/src/components/spinner/scss/bq-spinner.scss?tag=bq-spinner&encapsulation=shadow","../../packages/beeq/src/components/spinner/bq-spinner.tsx"],"sourcesContent":["export const SPINNER_TEXT_POSITION = ['none', 'left', 'right', 'above', 'bellow'] as const;\nexport const SPINNER_SIZE = ['small', 'medium', 'large'] as const;\nexport type TSpinnerTextPosition = (typeof SPINNER_TEXT_POSITION)[number];\nexport type TSpinnerSize = (typeof SPINNER_SIZE)[number];\n","/* -------------------------------------------------------------------------- */\n/* Spinner styles */\n/* -------------------------------------------------------------------------- */\n@import './bq-spinner.variables';\n\n:host {\n @apply relative inline-block;\n}\n\n.bq-spinner {\n @apply flex;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Spinner loader size */\n/* -------------------------------------------------------------------------- */\n\n.bq-spinner--loader.large {\n @apply bs-[--bq-spinner--size-large] is-[--bq-spinner--size-large];\n}\n\n.bq-spinner--loader.medium {\n @apply bs-[--bq-spinner--size-medium] is-[--bq-spinner--size-medium];\n}\n\n.bq-spinner--loader.small {\n @apply bs-[--bq-spinner--size-small] is-[--bq-spinner--size-small];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Text position */\n/* -------------------------------------------------------------------------- */\n\n.text-left,\n.text-right {\n @apply flex-row items-center;\n\n &.has-text {\n @apply gap-x-m;\n }\n}\n\n.text-left {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-right {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n.text-above,\n.text-bellow {\n @apply flex-col items-center;\n\n &.has-text {\n @apply gap-y-m;\n }\n}\n\n.text-above {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-bellow {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Animate slotted icon if provided */\n/* -------------------------------------------------------------------------- */\n\n.is-animated {\n .bq-spinner--icon,\n .bq-spinner--loader > svg {\n @include animation-spin;\n }\n}\n","import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { SPINNER_SIZE, SPINNER_TEXT_POSITION } from './bq-spinner.types';\nimport type { 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.handleSlotChange();\n this.handleIconSlotChange();\n this.setIconSize();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n if (!this.slotElem) return;\n\n this.hasSlot = hasSlotContent(this.slotElem);\n if (!this.hasSlot) return;\n\n const slot = this.slotElem.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.slotContentLength = getTextContent(slot, { recurse: true }).length;\n const nodes = slot.assignedNodes({ flatten: true });\n nodes.forEach((node) => {\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n });\n };\n\n private handleIconSlotChange = (): void => {\n this.hasIconSlot = hasSlotContent(this.iconSlotElem, 'icon');\n };\n\n private checkPropValues = (): void => {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n };\n\n private get isTextDisplayed(): boolean {\n return this.textPosition !== 'none';\n }\n\n private setIconSize(): void {\n if (!this.hasIconSlot || !this.bqIcon) return;\n\n this.bqIcon.size = parseInt(getCSSVariableValue(`bq-spinner--size-${this.size}`, this.el)).toString();\n }\n\n private get bqIcon(): HTMLBqIconElement | null {\n if (!this.hasIconSlot) return null;\n\n const slot = this.iconSlotElem.querySelector('slot');\n\n return [...slot.assignedElements({ flatten: true })].filter((el: Element) =>\n isHTMLElement(el, 'bq-icon'),\n )[0] as HTMLBqIconElement;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n [`bq-spinner ${this.size} text-${this.textPosition}`]: true,\n 'is-animated': this.animation,\n 'has-text': !!this.slotContentLength,\n }}\n part=\"base\"\n >\n {!this.hasIconSlot && (\n <div\n class={`bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`}\n aria-label=\"Loading...\"\n role=\"status\"\n >\n <svg class=\"bs-full is-full\" fill=\"currentColor\" viewBox=\"0 0 48 48\">\n <path\n fill=\"currentColor\"\n d=\"M10.27 7.637c-.937-1.117-.798-2.796.415-3.605a24 24 0 0 1 37.09 23.249c-.2 1.444-1.65 2.301-3.064 1.944-1.414-.356-2.25-1.793-2.096-3.242A18.72 18.72 0 0 0 14.102 8.11c-1.237.77-2.895.643-3.832-.474Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M48 24c0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0s24 10.745 24 24ZM5.28 24c0 10.339 8.381 18.72 18.72 18.72 10.339 0 18.72-8.381 18.72-18.72 0-10.339-8.381-18.72-18.72-18.72C13.661 5.28 5.28 13.661 5.28 24Z\"\n opacity=\".1\"\n />\n </svg>\n </div>\n )}\n <span\n class={{\n 'bq-spinner--icon': true,\n flex: this.hasIconSlot,\n '!hidden': !this.hasIconSlot,\n }}\n ref={(spanElem) => (this.iconSlotElem = spanElem)}\n part=\"custom-icon\"\n >\n <slot name=\"icon\" onSlotchange={this.handleIconSlotChange} />\n </span>\n <span\n class={{\n 'bq-spinner--text font-medium leading-regular text-primary': true,\n '!hidden': !this.isTextDisplayed,\n }}\n part=\"text\"\n ref={(spanElem) => (this.slotElem = spanElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-status.entry.cjs.js","mappings":";;;;;;;;;AAAO,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAU;;ACArF,MAAM,WAAW,GAAG,ykpBAAykpB;;MCkChlpB,QAAQ,GAAA,MAAA;;;;;;;;;;;IAgBM,IAAI,GAAgB,SAAS;;;IAKtD,eAAe,GAAA;QACbA,uBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC;;;;;;;;IAU5D,iBAAiB,GAAA;QACf,IAAI,CAAC,eAAe,EAAE;;;;;;;;;;;;;;;;;IAoBxB,MAAM,GAAA;AACJ,QAAA,QACEC,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAA,EAC9EA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,KAAK,EAAE,CAAkC,+BAAA,EAAA,IAAI,CAAC,IAAI,CAAA,CAAE,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAG,CAAA,EACzGA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM,EAAA,EAEXA,OAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACF;;;;;;;;;;","names":["validatePropValue","h"],"sources":["../../packages/beeq/src/components/status/bq-status.types.ts","../../packages/beeq/src/components/status/scss/bq-status.scss?tag=bq-status&encapsulation=shadow","../../packages/beeq/src/components/status/bq-status.tsx"],"sourcesContent":["export const STATUS_TYPE = ['alert', 'danger', 'info', 'neutral', 'success'] as const;\nexport type TStatusType = (typeof STATUS_TYPE)[number];\n","@import './bq-status.variables';\n\n.bq-status__circle {\n &::part(base) {\n --bq-badge--size-medium: var(--bq-status-circle--size);\n }\n\n &.success::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.success);\n }\n\n &.danger::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.danger);\n }\n\n &.neutral::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.secondary);\n }\n\n &.alert::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.warning);\n }\n\n &.info::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.brand);\n }\n}\n\n.bq-status__text ::slotted(*) {\n @apply text-s font-medium leading-regular text-primary p-b-0 p-i-0 m-b-0 m-i-0;\n}\n","import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { STATUS_TYPE } from './bq-status.types';\nimport type { TStatusType } from './bq-status.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Status Component is a UI element that represents the current state or condition of an item, task, or process.\n *\n * @example How to use it\n * ```html\n * <bq-status type=\"alert\">Alert status</bq-status>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/46c8d5-status/b/09d7b1\n * @status stable\n *\n * @dependency bq-badge\n *\n * @attr {\"alert\" | \"danger\" | \"info\" | \"neutral\" | \"success\"} type - It defines the type of status to display.\n *\n * @slot The content of the status component.\n *\n * @part base - The component's internal wrapper of the status component.\n * @part circle - The colored circle that marks the status type.\n * @part text - The `<div>` container that holds the text label of the status component.\n *\n * @cssprop --bq-status-circ - Status circle size.\n */\n@Component({\n tag: 'bq-status',\n styleUrl: './scss/bq-status.scss',\n shadow: true,\n})\nexport class BqStatus {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStatusElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines the type of status to display */\n @Prop({ reflect: true }) type: TStatusType = 'neutral';\n\n // Prop lifecycle events\n // =======================\n @Watch('type')\n checkPropValues() {\n validatePropValue(STATUS_TYPE, 'neutral', this.el, 'type');\n }\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n render() {\n return (\n <div class=\"bq-status inline-flex items-center gap-xs\" part=\"base\" role=\"status\">\n <bq-badge class={`bq-status__circle rounded-full ${this.type}`} size=\"medium\" part=\"circle\" role=\"img\" />\n <div\n class=\"bq-status__text text-s font-medium leading-regular text-primary max-bs-[20px] p-b-0 p-i-0 m-b-0 m-i-0\"\n part=\"text\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-step-item.entry.cjs.js","mappings":";;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAU;;ACAjG,MAAM,aAAa,GAAG,2qxBAA2qxB;;MCqDprxB,UAAU,GAAA,MAAA;;;;;;;;;;;;;;IAgBI,IAAI,GAAgB,QAAQ;;IAGb,MAAM,GAAqB,SAAS;;AAGnD,IAAA,IAAI;;;IAO7B,eAAe,GAAA;QACbA,uBAAiB,CAACC,wBAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC;QACxDD,uBAAiB,CAAC,gBAAgB,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;QAEjE,IAAI,CAAC,gBAAgB,EAAE;;;;;;AAQhB,IAAA,OAAO;;AAGP,IAAA,OAAO;;AAGP,IAAA,MAAM;;;;IAMf,iBAAiB,GAAA;QACf,IAAI,CAAC,eAAe,EAAE;;IAGxB,iBAAiB,GAAA;QACf,IAAI,CAAC,eAAe,EAAE;;IAGxB,gBAAgB,GAAA;QACd,IAAI,CAAC,gBAAgB,EAAE;;;;;;;;;;;;;;IAkBjB,WAAW,GAAG,MAAK;QACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5B,KAAC;IAEO,UAAU,GAAG,MAAK;QACxB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC3B,K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AE,IAAI,CAAC,UAAU,EACvB,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,MAAM,EAAA,EAEXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,CAAA,8BAAA,EAAiC,IAAI,CAAC,IAAI,CAAI,CAAA,EAAA,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAE,CAAA,EAAA,EAClFA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CACvD,EACNA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,8CAA8C,EAAA,EAEvDA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,yEAAyE,EAAE,IAAI;gBAC/E,qBAAqB,EAAE,IAAI,CAAC,UAAU;gBACtC,YAAY,EAAE,IAAI,CAAC,SAAS;aAC7B,EACD,IAAI,EAAC,OAAO,EAAA,EAEZA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,0EAA0E,EAAE,IAAI;gBAChF,YAAY,EAAE,IAAI,CAAC,UAAU;aAC9B,EACD,IAAI,EAAC,aAAa,EAAA,EAElBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,aAAa,EAAA,CAAG,CACvB,CACF,CACC;;;;;;;;;;;;","names":["validatePropValue","STEPS_SIZE","isHTMLElement","h"],"sources":["../../packages/beeq/src/components/step-item/bq-step-item.types.ts","../../packages/beeq/src/components/step-item/scss/bq-step-item.scss?tag=bq-step-item&encapsulation=shadow","../../packages/beeq/src/components/step-item/bq-step-item.tsx"],"sourcesContent":["export const STEP_ITEM_STATUS = ['default', 'current', 'completed', 'error', 'disabled'] as const;\nexport type TStepItemStatus = (typeof STEP_ITEM_STATUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Step item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-step-item.variables';\n\n:host {\n --bq-icon--color: theme(stroke.icon.primary);\n // !Note: The use of the `bg-primary` is to avoid the divider to be visible behind the step item.\n @apply bg-primary;\n}\n\n.bq-step-item {\n @apply flex gap-s rounded-m border-none bg-transparent pe-[--bq-steps--gap] ps-0 p-b-xs2 focus-visible:focus hover:bg-hover-ui-secondary;\n @apply transition-colors duration-300;\n}\n\n.bq-step-item__prefix.dot,\n.bq-step-item__prefix.icon {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color);\n }\n\n &.current {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-current);\n }\n }\n\n &.completed {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-completed);\n }\n }\n\n &.error {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-error);\n }\n }\n\n &.disabled {\n ::slotted(bq-icon) {\n opacity: 0.6;\n }\n }\n}\n\n.bq-step-item__prefix.numeric {\n @apply flex items-center justify-center rounded-full;\n @apply bg-[--bq-step-item--prefix-num-bg-color] bs-[--bq-step-item--prefix-num-size] is-[--bq-step-item--prefix-num-size];\n @apply text-m font-semibold leading-regular text-primary;\n\n &.small {\n @apply text-s [--bq-step-item--prefix-num-size:--bq-spacing-l];\n }\n\n // Status\n\n &.current {\n @apply bg-[var(--bq-step-item--prefix-color-current)] text-alt;\n }\n\n &.completed {\n @apply bg-ui-success-alt text-success;\n }\n\n &.error {\n @apply bg-ui-danger-alt text-danger;\n }\n\n &.disabled {\n @apply opacity-60;\n }\n}\n\n.bq-step-item__content--description::slotted(*) {\n @apply text-s leading-regular opacity-60;\n}\n","import { Component, Element, Event, h, Prop, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { STEP_ITEM_STATUS } from './bq-step-item.types';\nimport type { TStepItemStatus } from './bq-step-item.types';\nimport { isHTMLElement, validatePropValue } from '../../shared/utils';\nimport { STEPS_SIZE } from '../steps/bq-steps.types';\nimport type { TStepsSize, TStepsType } from '../steps/bq-steps.types';\n\n/**\n * The Step Item Component is a UI element used to display a single step or stage in a process or task.\n * It should be used inside the Steps component.\n *\n * @example How to use it\n * ```html\n * <bq-step-item status=\"completed\">\n * <bq-icon slot=\"prefix\" name=\"check-circle\"></bq-icon>\n * <span>Title</span>\n * <span slot=\"description\">Description</span>\n * </bq-step-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @attr {\"small\" | \"medium\"} size - It defines prefix size\n * @attr {\"completed\" | \"current\" | \"error\" | \"default\" | \"disabled\"} status - It defines step item appearance based on its status\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - It defines the step item type used\n *\n * @event bqClick - Callback handler emitted when the step item is clicked\n *\n * @slot - The step item content\n * @slot prefix - The step item prefix\n * @slot description - The step item description\n *\n * @part base - The component's base wrapper.\n * @part title - The component's title.\n * @part description - The component's description.\n *\n * @cssprop --bq-step-item--prefix-color - Color of the prefix icon\n * @cssprop --bq-step-item--prefix-color-current - Color of the prefix icon when current\n * @cssprop --bq-step-item--prefix-color-completed - Color of the prefix icon when completed\n * @cssprop --bq-step-item--prefix-color-error - Color of the prefix icon when error\n * @cssprop --bq-step-item--prefix-num-size - Size of the prefix number\n * @cssprop --bq-step-item--prefix-num-bg-color - Background color of the prefix number\n */\n@Component({\n tag: 'bq-step-item',\n styleUrl: './scss/bq-step-item.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqStepItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStepItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines prefix size */\n @Prop({ reflect: true }) size?: TStepsSize = 'medium';\n\n /** It defines step item appearance based on its status */\n @Prop({ reflect: true, mutable: true }) status?: TStepItemStatus = 'default';\n\n /** It defines the step item type used */\n @Prop({ reflect: true }) type?: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('status')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEP_ITEM_STATUS, 'default', this.el, 'status');\n\n this.handleIconPrefix();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler triggered when the step item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqStepItemElement>;\n\n /** Callback handler triggered when the step item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqStepItemElement>;\n\n /** Callback handler triggered when the step item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqStepItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.checkPropValues();\n }\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleIconPrefix();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleClick = async () => {\n if (this.isDisabled || this.isCurrent) return;\n\n const clickEvent = this.bqClick.emit(this.el);\n if (clickEvent.defaultPrevented) return;\n\n const stepsParent = this.el.closest('bq-steps') as HTMLBqStepsElement;\n if (!stepsParent) return;\n\n await stepsParent.setCurrentStepItem(this.el);\n };\n\n private handleIconPrefix = () => {\n const iconElem = this.el.querySelector('[slot=\"prefix\"]');\n if (!iconElem || !isHTMLElement(iconElem, 'bq-icon')) return;\n\n iconElem.size = this.size === 'small' ? 24 : 32;\n };\n\n private get isDisabled(): boolean {\n return this.status === 'disabled';\n }\n\n private get isCurrent(): boolean {\n return this.status === 'current';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <button\n class={{\n 'bq-step-item': true,\n [`bq-step-item--${this.status}`]: true,\n 'pointer-events-none opacity-60': this.isDisabled,\n }}\n disabled={this.isDisabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n type=\"button\"\n part=\"base\"\n >\n <div class={`bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}`}>\n <slot name=\"prefix\" onSlotchange={this.handleIconPrefix} />\n </div>\n <div class=\"bq-step-item__content items-start text-start\">\n {/* TITLE */}\n <div\n class={{\n 'bq-step-item__content--title pe-xs3 text-m leading-regular text-primary': true,\n 'pointer-events-none': this.isDisabled,\n 'text-brand': this.isCurrent,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n {/* DESCRIPTION */}\n <div\n class={{\n 'bq-step-item__content--description text-s leading-regular text-secondary': true,\n 'opacity-60': this.isDisabled,\n }}\n part=\"description\"\n >\n <slot name=\"description\" />\n </div>\n </div>\n </button>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-steps.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,UAAU,GAAG,g/nBAAg/nB;;MC4Ct/nB,OAAO,GAAA,MAAA;;;;;;AAIV,IAAA,QAAQ;;;;;;;;IAeS,YAAY,GAAW,iBAAiB;;IAGxC,IAAI,GAAe,QAAQ;;AAG3B,IAAA,IAAI;;;IAO7B,eAAe,GAAA;QACbA,uBAAiB,CAACC,wBAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC;QACxDD,uBAAiB,CAACE,wBAAU,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MA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EACnC,IAAI,EAAC,WAAW,EAAA,EAEhBA,OAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACRA,OACE,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAA8C,2CAAA,EAAA,iBAAiB,CAAE,CAAA,EACxE,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,CAAC,EAClB,WAAW,EAAC,2EAA2E,EAAA,CACvF,CACE;;;;;;;;;;;","names":["validatePropValue","STEPS_SIZE","STEPS_TYPE","h"],"sources":["../../packages/beeq/src/components/steps/scss/bq-steps.scss?tag=bq-steps&encapsulation=shadow","../../packages/beeq/src/components/steps/bq-steps.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Steps styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-steps.variables';\n\n:host {\n @apply block;\n}\n\n::slotted(bq-step-item:not(:first-child)) {\n @apply ps-[--bq-steps--gap];\n}\n","import { Component, Element, h, Method, Prop, Watch } from '@stencil/core';\n\nimport { STEPS_SIZE, STEPS_TYPE } from './bq-steps.types';\nimport type { TStepsSize, TStepsType } from './bq-steps.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The Steps Component is a UI element used to display a series of steps or stages in a process or task.\n * It is used to guide users through a process or task and to indicate their progress.\n *\n * @example How to use it\n * ```html\n * <bq-steps divider-color=\"stroke--primary\" type=\"dot\" size=\"medium\">\n * <bq-step-item status=\"completed\"> ... </bq-step-item>\n * <bq-step-item status=\"error\"> ... </bq-step-item>\n * <bq-step-item status=\"current\"> ... </bq-step-item>\n * <bq-step-item status=\"default\"> ... </bq-step-item>\n * </bq-steps>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @dependency bq-divider\n *\n * @attr {string} divider-color - The color of the line that connects the steps. It should be a valid declarative color token.\n * @attr {\"medium\" | \"small\"} size - The size of the steps\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - The type of prefix element to use on the step items\n *\n * @slot - The step items\n *\n * @part container - The container wrapper of the Steps component\n * @part divider-base - The base wrapper of the divider component\n * @part divider-dash-start - The dash start wrapper of the divider component\n * @part divider-dash-end - The dash end wrapper of the divider component\n *\n * @cssprop --bq-steps--divider-color - Divider color\n * @cssprop --bq-steps--gap - Gap between steps\n */\n@Component({\n tag: 'bq-steps',\n styleUrl: './scss/bq-steps.scss',\n shadow: true,\n})\nexport class BqSteps {\n // Own Properties\n // ====================\n\n private stepElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqStepsElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The color of the line that connects the steps. It should be a valid declarative color token. */\n @Prop({ reflect: true }) dividerColor: string = 'stroke--primary';\n\n /** The size of the steps */\n @Prop({ reflect: true }) size: TStepsSize = 'medium';\n\n /** The type of prefix element to use on the step items */\n @Prop({ reflect: true }) type: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n @Watch('size')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEPS_TYPE, 'numeric', this.el, 'type');\n\n this.setStepItemProps();\n }\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.setStepItemProps();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Set the current step item.\n * @param newCurrentStep - The step item to set as current.\n */\n @Method()\n async setCurrentStepItem(newCurrentStep: HTMLBqStepItemElement): Promise<void> {\n // Ideally, only one step item should be current.\n // So we change the status of the current step item to default.\n const currentStep = this.bqSteps.find((step) => step.status === 'current');\n if (currentStep) currentStep.status = 'default';\n // And then we set the status of the new current step item to current.\n newCurrentStep.status = 'current';\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get bqSteps(): HTMLBqStepItemElement[] {\n if (!this.stepElem) return [];\n\n const slot = this.stepElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === 'bq-step-item',\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private setStepItemProps = () => {\n this.bqSteps.forEach((bqStepElem: HTMLBqStepItemElement) => {\n bqStepElem.size = this.size;\n bqStepElem.type = this.type;\n });\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n // !Note: We use a custom padding value for the medium size to avoid misalignment between the steps and the divider.\n const dividerPaddingTop = this.size === 'small' ? 'p-bs-m' : 'p-bs-5';\n\n return (\n <div\n class=\"relative flex w-full items-start justify-between\"\n ref={(div) => (this.stepElem = div)}\n part=\"container\"\n >\n <slot />\n <bq-divider\n class={`absolute -z-10 p-i-s inset-ie-0 inset-is-0 ${dividerPaddingTop}`}\n strokeColor={this.dividerColor}\n strokeThickness={2}\n exportparts=\"base:divider-base,dash-start:divider-dash-start,dash-end:divider-dash-end\"\n />\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-switch.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,WAAW,GAAG,mlwBAAmlwB;;MC4D1lwB,QAAQ,GAAA,MAAA;;;;;;;;;;;;;;;;AAIX,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,gBAAgB;;;AAKL,IAAA,SAAS;;;;;IAOnB,QAAQ,GAAG,KAAK;;;;IAMA,iBAAiB,GAAa,KAAK;;IAGpB,OAAO,GAAa,KAAK;;IAGxC,QAAQ,GAAa,KAAK;;AAG1B,IAAA,qBAAqB;;IAGrB,SAAS,GAAa,KAAK;;IAG3B,UAAU,GAAuB,SAAS;AAEnE;;;AAGG;IACsB,cAAc,GAA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CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,iGAAiG,EAAE,IAAI;gBACvG,MAAM,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY;AAC3C,gBAAA,MAAM,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY;AAC3C,aAAA,EACD,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EACtC,IAAI,EAAC,OAAO,EAAA,EAEZA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACxC,CACD,CACH;;;;;;;;;;;;","names":["slot","isNil","getTextContent","h","Host"],"sources":["../../packages/beeq/src/components/switch/scss/bq-switch.scss?tag=bq-switch&encapsulation=shadow","../../packages/beeq/src/components/switch/bq-switch.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Switch styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-switch.variables';\n\n:host {\n @apply inline-block;\n}\n\n:host(.full-width) {\n @apply is-full;\n}\n\n.bq-switch {\n @apply flex cursor-pointer select-none items-center rounded-s transition-colors duration-300 p-b-2 p-i-2;\n\n justify-content: var(--bq-switch--justify-content);\n\n // Display background on hover (if enabled)\n &.has-background:not(.is-disabled):hover {\n @apply bg-hover-ui-primary;\n }\n\n &.is-disabled {\n @apply cursor-not-allowed opacity-60;\n }\n}\n\n.bq-switch--input:not(:disabled):focus,\n.bq-switch--input:not(:disabled):focus-visible {\n ~ .bq-switch--control {\n @apply focus;\n }\n}\n\n.bq-switch--control__dot {\n @apply absolute start-xs2 rounded-full bg-ui-primary bs-[--bq-switch--dot-size] is-[--bq-switch--dot-size];\n @apply group-[&.is-checked]:start-[calc(100%_-_var(--bq-switch--dot-size)_-_var(--bq-spacing-xs2))] group-[&.is-checked]:bg-[--bq-icon--alt];\n @apply transition-all duration-300;\n}\n\n.bq-switch--control__icon {\n --bq-icon--size: var(--bq-switch--dot-size) !important;\n\n &::part(base) {\n @apply flex;\n }\n}\n","import { AttachInternals, Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TSwitchInnerLabel, TSwitchJustifyContent } from './bq-switch.types';\nimport { getTextContent, isNil } from '../../shared/utils';\n\n/**\n * Toggle switches are digital on/off switches.\n * They should provide immediate results, giving users the freedom to control their preferences as needed.\n *\n * @example How to use it\n * ```html\n * <bq-switch inner-label=\"default\" justify-content=\"start\" name=\"bq-switch\" value=\"Switch value\">\n * Toggle me!\n * </bq-switch>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/49d9c9-switch\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {boolean} background-on-hover - If `true`, a background will be displayed on hover\n * @attr {boolean} checked - It indicates whether if the switch is `ON` by default (when the page loads)\n * @attr {boolean} disabled - If `true`, the switch control will be disabled and no interaction will be allowed\n * @attr {string} form-validation-message - The native form validation message\n * @attr {boolean} full-width - If `true`, the component will take the full width space available on the parent container\n * @attr {\"default\" | \"icon\"} inner-label - It indicates how to to display the on/off marks inside the control, with icons or none (default)\n * @attr {\"start\" | \"end\" | \"center\" | \"space-between\" | \"space-around\" | \"space-evenly\"} justify-content - It defines how to distribute the space between and around the control and the label text\n * @attr {string} name - Name of the form control. Submitted with the form as part of a name/value pair\n * @attr {boolean} required - If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted\n * @attr {boolean} reverse-order - If `true`, the order of the control and the label text will be changed\n * @attr {string} value - The input control's value, submitted as a name/value pair with form data\n *\n * @event bqChange - Handler to be called when the switch state changes\n * @event bqFocus - Handler to be called when the switch gets focus\n * @event bqBlur - Handler to be called when the switch loses focus\n *\n * @slot - The switch label text\n *\n * @part base - HTML `<label>` root container\n * @part control - HTML `<div>` element for the custom control\n * @part dot - HTML `<div>` element that acts as changing dot\n * @part icon-off - HTMLBqIcon `<pk-icon>` element used as the `OFF` mark inner label\n * @part icon-on - HTMLBqIcon `<pk-icon>` element used as the `ON` mark inner label\n * @part label - HTML `<span>` element that holds the label text\n *\n * @cssprop --bq-switch--height - Switch height\n * @cssprop --bq-switch--justify-content - Switch justify content\n * @cssprop --bq-switch--width - Switch width\n * @cssprop --bq-switch--dot-size - Switch dot size\n */\n@Component({\n tag: 'bq-switch',\n styleUrl: './scss/bq-switch.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSwitch {\n // Own Properties\n // ====================\n\n private labelElem: HTMLSpanElement;\n private inputElem: HTMLInputElement;\n private prevCheckedValue: boolean;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqSwitchElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasLabel = false;\n\n // Public Property API\n // ========================\n\n /** If true, a background will be displayed on hover */\n @Prop({ reflect: true }) backgroundOnHover?: boolean = false;\n\n /** It indicates whether if the switch is `ON` by default (when the page loads) */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n\n /** If true, the switch control will be disabled and no interaction will be allowed */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** The native form validation message */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** If true, the component will take the full width space available on the parent container */\n @Prop({ reflect: true }) fullWidth?: boolean = false;\n\n /** It indicates how to to display the on/off marks inside the control, with icons or none (default) */\n @Prop({ reflect: true }) innerLabel?: TSwitchInnerLabel = 'default';\n\n /**\n * It defines how to distribute the space between and around the control and the label text\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content)\n */\n @Prop({ reflect: true }) justifyContent?: TSwitchJustifyContent = 'start';\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 /** If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /** If true, the order of the control and the label text will be changed */\n @Prop({ reflect: true }) reverseOrder?: boolean = false;\n\n /** The input control's value, submitted as a name/value pair with form data. */\n @Prop({ reflect: true }) value?: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('required')\n handleRequiredChange() {\n this.updateFormValidity();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the switch state changes */\n @Event() bqChange: EventEmitter<{ checked: boolean }>;\n\n /** Handler to be called when the switch gets focus */\n @Event() bqFocus: EventEmitter<HTMLBqSwitchElement>;\n\n /** Handler to be called when the switch loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSwitchElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.prevCheckedValue = this.checked;\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n componentDidUpdate() {\n /**\n * We need to trigger the `bqChange` immediately after the first update happens\n * so the checked attribute get applied, otherwise, a delay will happen\n * between the event emits and when the checked attribute value gets reflected in the element host.\n */\n if (this.checked !== this.prevCheckedValue) {\n this.bqChange.emit({ checked: this.checked });\n this.prevCheckedValue = this.checked;\n }\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.checked);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n // Reset the form value and validity state\n this.checked = false;\n this.inputElem.removeAttribute('checked');\n this.internals?.setFormValue(undefined);\n this.updateFormValidity();\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 /**\n * Simulate a click event on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.click()`.\n */\n @Method()\n async vClick() {\n this.inputElem?.click();\n }\n\n /**\n * Sets focus on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.focus()`.\n */\n @Method()\n async vFocus() {\n this.inputElem?.focus();\n }\n\n /**\n * Remove focus from the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.blur()`.\n */\n @Method()\n async vBlur() {\n this.inputElem?.blur();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleChange = () => {\n this.checked = !this.checked;\n this.inputElem.setAttribute('checked', `${this.checked}`);\n this.setFormValue(this.checked);\n this.updateFormValidity();\n };\n\n private handleOnFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleOnBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleSlotChange = () => {\n const slot = this.labelElem?.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.hasLabel = !!getTextContent(slot, { recurse: true }).length;\n };\n\n private setFormValue = (checked: boolean) => {\n const value = checked ? 'on' : undefined;\n // Set form value based on the checked state\n // Here we also pass the state of the component (2nd argument) as the state of the form control\n // Details: https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue\n this.internals?.setFormValue(value, `${this.checked}`);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, checked, inputElem } = this;\n // Clear the validity state\n internals?.states.clear();\n\n if (!(required && !checked)) {\n // If the switch component is not required or is checked, set the validity state to valid\n internals?.states.add('valid');\n internals?.setValidity({});\n return;\n }\n\n // Set validity state based on the required property and checked state\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const hostStyle = {\n ...(this.justifyContent && { '--bq-switch--justify-content': this.justifyContent }),\n };\n\n const labelCssClasses = {\n 'has-background': this.backgroundOnHover,\n 'is-checked': this.checked,\n 'is-disabled': this.disabled,\n 'flex-row-reverse': this.reverseOrder,\n };\n\n return (\n <Host class={{ 'full-width': this.fullWidth }} style={hostStyle}>\n <label class={{ 'bq-switch group': true, ...labelCssClasses }} part=\"base\">\n {/* Hidden native HTML input */}\n <input\n class=\"bq-switch--input peer sr-only !bs-[--bq-switch--dot-size] !is-[--bq-switch--width] peer-checked:invisible\"\n type=\"checkbox\"\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n name={!isNil(this.name) ? this.name : undefined}\n aria-label={this.name}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onBlur={this.handleOnBlur}\n onChange={this.handleChange}\n onFocus={this.handleOnFocus}\n ref={(input) => (this.inputElem = input)}\n role=\"switch\"\n value={this.value}\n />\n {/* Control */}\n <div\n class=\"bq-switch--control relative box-border flex justify-between rounded-full bg-ui-tertiary transition duration-300 bs-[--bq-switch--height] is-[--bq-switch--width] p-b-xs2 p-i-xs2 group-[&.is-checked]:bg-ui-brand\"\n part=\"control\"\n >\n {this.innerLabel === 'icon' && (\n <bq-icon\n class=\"bq-switch--control__icon on\"\n name=\"check\"\n color=\"icon--alt\"\n role=\"img\"\n title=\"On\"\n part=\"icon-on\"\n />\n )}\n {this.innerLabel === 'icon' && (\n <bq-icon\n class=\"bq-switch--control__icon off\"\n name=\"x\"\n color=\"icon--inverse\"\n role=\"img\"\n title=\"Off\"\n part=\"icon-off\"\n />\n )}\n {/* Dot */}\n <div class=\"bq-switch--control__dot\" part=\"dot\" />\n </div>\n {/* Label */}\n <span\n class={{\n 'bq-switch--label text-m font-medium leading-regular text-primary transition-colors duration-300': true,\n 'ms-s': this.hasLabel && !this.reverseOrder,\n 'me-s': this.hasLabel && this.reverseOrder,\n }}\n ref={(span) => (this.labelElem = span)}\n part=\"label\"\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"bq-tab-group.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,g0qBAAg0qB;;MC0Cz0qB,UAAU,GAAA,MAAA;;;;;;;AAIb,IAAA,iBAAiB;;;;;;;;IAee,YAAY,GAAG,CAAC;;IAG/B,cAAc,GAAG,KAAK;;IAGtB,WAAW,GAA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AACxB,QAAA,MAAM,CAAC,MAAM,GAAG,IAAI;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;QAClB,IAAI,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAClD,KAAC;;;;IAMD,MAAM,GAAA;AACJ,QAAA,QACEC,OAAA,CAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,WAAW,KAAK,UAAU,EAAE,EAAA,EAC9DD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;gBACL,CAAC,CAAA,2BAAA,EAA8B,IAAI,CAAC,WAAW,CAAA,CAAA,EAAI,IAAI,CAAC,SAAS,CAAA,aAAA,CAAe,GAAG,IAAI;gBACvF,YAAY,EAAE,IAAI,CAAC,cAAc;AAClC,aAAA,EACD,IAAI,EAAC,MAAM,EAAA,EAEXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,8CAA8C,EAAE,IAAI;AACpD,gBAAA,UAAU,EAAE,IAAI,CAAC,WAAW,KAAK,YAAY;aAC9C,EACD,IAAI,EAAC,SAAS,EACd,IAAI,EAAC,MAAM,EAAA,EAEXA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACF,CACD;;;;;;;;;;;;;;","names":["debounce","validatePropValue","TAB_SIZE","TAB_ORIENTATION","TAB_PLACEMENT","isNil","isHTMLElement","getNextElement","h","Host"],"sources":["../../packages/beeq/src/components/tab-group/scss/bq-tab-group.scss?tag=bq-tab-group&encapsulation=shadow","../../packages/beeq/src/components/tab-group/bq-tab-group.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Tab styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply block;\n}\n\n.bq-tab-group {\n @apply relative;\n\n &::after {\n @apply absolute flex border-0 border-solid border-primary content-empty;\n }\n\n &--horizontal-start,\n &--horizontal-end {\n &::after {\n @apply is-full inset-be-0 [border-block-end-width:--bq-stroke-s];\n }\n }\n\n &--horizontal-start {\n @apply justify-start;\n }\n\n &--horizontal-end {\n @apply justify-end;\n }\n\n &--vertical-start::after {\n @apply end-0 bs-full is-0 [border-block-end-width:0px] [border-inline-end-width:--bq-stroke-s];\n }\n\n &--vertical-end::after {\n @apply start-0 bs-full is-0 [border-block-end-width:0px] [border-inline-start-width:--bq-stroke-s];\n }\n}\n\n.bq-tab-group.no-divider {\n &::after {\n @apply content-none;\n }\n}\n\n.bq-tab-group--container {\n @include hide-scrollbar;\n @apply gap-xs2 p-xs2; // This will avoid cutting the outline focus style\n}\n","import { Component, Element, Event, h, Host, Listen, Prop, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { debounce, getNextElement, isHTMLElement, isNil, TDebounce, validatePropValue } from '../../shared/utils';\nimport { TAB_ORIENTATION, TAB_PLACEMENT, TAB_SIZE } from '../tab/bq-tab.types';\nimport type { TTabOrientation, TTabPlacement, TTabSize } from '../tab/bq-tab.types';\n\n/**\n * The tab group is a user interface element that allows users wrap a set of tab items.\n *\n * @example How to use it\n * ```html\n * <bq-tab-group value=\"5\">\n * <bq-tab tab-id=\"1\">Tab</bq-tab>\n * <bq-tab tab-id=\"2\" active>Tab</bq-tab>\n * <bq-tab tab-id=\"3\">Long Tab name</bq-tab>\n * <bq-tab tab-id=\"4\" disabled>Tab</bq-tab>\n * </bq-tab-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/775321-tabs\n * @status stable\n *\n * @attr {number} debounce-time - A number representing the delay value applied to bqChange event handler\n * @attr {boolean} disable-divider - If true, the underline divider below the tabs won't be shown\n * @attr {string} orientation - The direction that tab should be render\n * @attr {string} placement - The placement that tab should be render\n * @attr {string} size - The size of the tab\n * @attr {string} value - A string representing the id of the selected tab.\n *\n * @event bqChange - Handler to be called when the tab value changes\n *\n * @slot - The bq-tab items\n *\n * @part base - The HTML div wrapper inside the shadow DOM.\n * @part tabs - The HTML div used to hold the tab buttons.\n */\n@Component({\n tag: 'bq-tab-group',\n styleUrl: './scss/bq-tab-group.scss',\n shadow: true,\n})\nexport class BqTabGroup {\n // Own Properties\n // ====================\n\n private debouncedBqChange: TDebounce<{ value: string; target: HTMLBqTabElement }>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqTabGroupElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** A number representing the delay value applied to bqChange event handler */\n @Prop({ reflect: true, mutable: true }) debounceTime = 0;\n\n /** If true, the underline divider below the tabs won't be shown */\n @Prop({ reflect: true }) disableDivider = false;\n\n /** The direction that tab should be render */\n @Prop({ reflect: true }) orientation?: TTabOrientation = 'horizontal';\n\n /** The placement that tab should be render */\n @Prop({ reflect: true }) placement?: TTabPlacement = 'start';\n\n /** The size of the tab */\n @Prop({ reflect: true }) size: TTabSize = 'medium';\n\n /** A string representing the id of the selected tab. */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('debounceTime')\n checkDebounceChange() {\n if (this.debounceTime < 0) {\n this.debounceTime = Math.max(0, this.debounceTime);\n }\n\n if (this.debouncedBqChange) {\n this.debouncedBqChange.cancel();\n }\n\n this.debouncedBqChange = debounce((event: Parameters<typeof this.debouncedBqChange>[0]) => {\n this.bqChange.emit(event);\n }, this.debounceTime);\n }\n\n @Watch('size')\n @Watch('value')\n @Watch('orientation')\n @Watch('placement')\n checkPropValues() {\n validatePropValue(TAB_SIZE, 'medium', this.el, 'size');\n validatePropValue(TAB_ORIENTATION, 'horizontal', this.el, 'orientation');\n validatePropValue(TAB_PLACEMENT, 'start', this.el, 'placement');\n\n this.bqTabElements.forEach((bqTabElement) => {\n bqTabElement.size = this.size;\n bqTabElement.orientation = this.orientation;\n bqTabElement.placement = this.placement;\n bqTabElement.active = !isNil(this.value) ? bqTabElement.tabId === this.value : false;\n });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the tab value changes */\n @Event() bqChange: EventEmitter<{ target: HTMLBqTabElement; value: string }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkDebounceChange();\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n @Listen('keyup', { target: 'body', passive: true, capture: true })\n onKeyUp(event: KeyboardEvent) {\n const { target } = event;\n if (!isHTMLElement(target, 'bq-tab')) return;\n\n this.makeTabsFocusable();\n }\n\n @Listen('bqClick', { passive: true })\n onBqClick(event: CustomEvent<HTMLBqTabElement>) {\n const { detail: target } = event;\n this.bqTabElements.forEach((bqTabElement) => (bqTabElement.active = bqTabElement === target));\n this.debouncedBqChange({ value: target.tabId, target });\n this.selectTab(target);\n }\n\n @Listen('bqKeyDown', { passive: true })\n async onBqKeyDown(event: CustomEvent<KeyboardEvent>) {\n const { target } = event;\n\n // NOTE: ensures the target is an HTML element with the tag name 'bq-tab'\n if (!isHTMLElement(target, 'bq-tab')) return;\n\n const keyActions: { [key: string]: 'forward' | 'backward' } = {\n ArrowDown: 'forward',\n ArrowRight: 'forward',\n ArrowUp: 'backward',\n ArrowLeft: 'backward',\n };\n\n // NOTE: gets the direction based on key pressed\n const direction = keyActions[event.detail.key];\n\n if (!direction) return;\n\n await this.focusTabSibling(target, direction);\n }\n\n @Listen('bqBlur', { capture: true, passive: true })\n onBqBlur() {\n this.restoreTabsFocus();\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 focusTabSibling = async (\n currentTarget: HTMLBqTabElement,\n direction: 'forward' | 'backward',\n ): Promise<void> => {\n let target: HTMLBqTabElement | null = null;\n\n this.bqTabElements.forEach((bqTabElement, index, elements) => {\n bqTabElement.active = false;\n\n if (bqTabElement === currentTarget) {\n target = getNextElement(elements, index, direction);\n }\n });\n\n if (target) {\n await target.vFocus();\n this.selectTab(target);\n }\n };\n\n private makeTabsFocusable = (): void => {\n this.bqTabElements.forEach((bqTabElement) => {\n if (bqTabElement.disabled) return;\n\n /**\n * This is a \"fire and forget\" operation. The callback itself doesn't do anything special\n * with the asynchronous code (doesn't await it or do anything with the result)\n * Details: https://stackoverflow.com/a/63488201\n */\n (async () => {\n await bqTabElement.enableFocus(true);\n })();\n });\n };\n\n private restoreTabsFocus = (): void => {\n this.bqTabElements.forEach((bqTabElement) => {\n if (bqTabElement.disabled || bqTabElement.active) return;\n\n /** @See line #173 */\n (async () => {\n await bqTabElement.enableFocus(false);\n })();\n });\n };\n\n private get bqTabElements(): HTMLBqTabElement[] {\n return Array.from(this.el.querySelectorAll('bq-tab'));\n }\n\n private selectTab = (target: HTMLBqTabElement): void => {\n const { tabId } = target;\n target.active = true;\n this.value = tabId;\n this.debouncedBqChange({ value: tabId, target });\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host class={{ 'inline-block': this.orientation === 'vertical' }}>\n <div\n class={{\n [`bq-tab-group bq-tab-group--${this.orientation}-${this.placement} flex is-full`]: true,\n 'no-divider': this.disableDivider,\n }}\n part=\"base\"\n >\n <div\n class={{\n 'bq-tab-group--container flex overflow-x-auto': true,\n 'flex-col': this.orientation !== 'horizontal',\n }}\n role=\"tablist\"\n part=\"tabs\"\n >\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}