@beeq/core 1.12.4-beta.1 → 1.12.4

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 (425) hide show
  1. package/dist/beeq/beeq.esm.js +1 -1
  2. package/dist/beeq/beeq.esm.js.map +1 -1
  3. package/dist/beeq/index.esm.js +1 -1
  4. package/dist/beeq/{p-050c757b.entry.js → p-0a3c5b97.entry.js} +2 -2
  5. package/dist/beeq/{p-050c757b.entry.js.map → p-0a3c5b97.entry.js.map} +1 -1
  6. package/dist/beeq/{p-a83ce5aa.entry.js → p-0cfa8d0b.entry.js} +2 -2
  7. package/dist/beeq/{p-a83ce5aa.entry.js.map → p-0cfa8d0b.entry.js.map} +1 -1
  8. package/dist/beeq/{p-a71efa95.entry.js → p-1764899f.entry.js} +2 -2
  9. package/dist/beeq/p-1764899f.entry.js.map +1 -0
  10. package/dist/beeq/{p-f47905ae.entry.js → p-21db2c4e.entry.js} +2 -2
  11. package/dist/beeq/{p-e9535627.entry.js → p-25772ebd.entry.js} +2 -2
  12. package/dist/beeq/{p-6cd90918.entry.js → p-2a7c5b1e.entry.js} +2 -2
  13. package/dist/beeq/{p-6cd90918.entry.js.map → p-2a7c5b1e.entry.js.map} +1 -1
  14. package/dist/beeq/{p-41910dc5.entry.js → p-327cb74b.entry.js} +2 -2
  15. package/dist/beeq/{p-41910dc5.entry.js.map → p-327cb74b.entry.js.map} +1 -1
  16. package/dist/beeq/{p-7adb6e2e.entry.js → p-365f0372.entry.js} +2 -2
  17. package/dist/beeq/p-365f0372.entry.js.map +1 -0
  18. package/dist/beeq/{p-04e3950c.entry.js → p-49a999b4.entry.js} +2 -2
  19. package/dist/beeq/{p-04e3950c.entry.js.map → p-49a999b4.entry.js.map} +1 -1
  20. package/dist/beeq/{p-7a6a89f1.entry.js → p-53ea5999.entry.js} +2 -2
  21. package/dist/beeq/p-53ea5999.entry.js.map +1 -0
  22. package/dist/beeq/{p-1fb43de2.entry.js → p-5645238d.entry.js} +2 -2
  23. package/dist/beeq/p-56810dba.entry.js +6 -0
  24. package/dist/beeq/{p-a77b58aa.entry.js.map → p-56810dba.entry.js.map} +1 -1
  25. package/dist/beeq/{p-0d8618d2.entry.js → p-644013aa.entry.js} +2 -2
  26. package/dist/beeq/{p-0d8618d2.entry.js.map → p-644013aa.entry.js.map} +1 -1
  27. package/dist/beeq/{p-348d42aa.entry.js → p-69cf0536.entry.js} +2 -2
  28. package/dist/beeq/{p-348d42aa.entry.js.map → p-69cf0536.entry.js.map} +1 -1
  29. package/dist/beeq/{p-8dfd0329.entry.js → p-6b0f896f.entry.js} +2 -2
  30. package/dist/beeq/{p-30a79437.entry.js → p-7972ba08.entry.js} +2 -2
  31. package/dist/beeq/{p-30a79437.entry.js.map → p-7972ba08.entry.js.map} +1 -1
  32. package/dist/beeq/{p-1e675bdc.entry.js → p-79aab4dd.entry.js} +2 -2
  33. package/dist/beeq/{p-1e675bdc.entry.js.map → p-79aab4dd.entry.js.map} +1 -1
  34. package/dist/beeq/{p-e198464e.entry.js → p-79fd999a.entry.js} +2 -2
  35. package/dist/beeq/{p-e198464e.entry.js.map → p-79fd999a.entry.js.map} +1 -1
  36. package/dist/beeq/p-84e96891.entry.js +6 -0
  37. package/dist/beeq/{p-45b7464b.entry.js.map → p-84e96891.entry.js.map} +1 -1
  38. package/dist/beeq/{p-5855a8d0.entry.js → p-8974f66f.entry.js} +2 -2
  39. package/dist/beeq/{p-5855a8d0.entry.js.map → p-8974f66f.entry.js.map} +1 -1
  40. package/dist/beeq/{p-e63d6c4f.entry.js → p-8d9bef7a.entry.js} +2 -2
  41. package/dist/beeq/{p-e63d6c4f.entry.js.map → p-8d9bef7a.entry.js.map} +1 -1
  42. package/dist/beeq/{p-CO2T68hs.js → p-BSSRzVAz.js} +2 -2
  43. package/dist/beeq/p-BSSRzVAz.js.map +1 -0
  44. package/dist/beeq/p-DbxZ8FhA.js +6 -0
  45. package/dist/beeq/p-DbxZ8FhA.js.map +1 -0
  46. package/dist/beeq/p-DdvbF5yL.js.map +1 -1
  47. package/dist/beeq/{p-40163197.entry.js → p-b26ee039.entry.js} +2 -2
  48. package/dist/beeq/{p-e366fc1b.entry.js → p-b31d249b.entry.js} +2 -2
  49. package/dist/beeq/{p-9d1503bd.entry.js → p-b4b02b99.entry.js} +2 -2
  50. package/dist/beeq/{p-9d1503bd.entry.js.map → p-b4b02b99.entry.js.map} +1 -1
  51. package/dist/beeq/{p-3c77308c.entry.js → p-b6f5430a.entry.js} +2 -2
  52. package/dist/beeq/{p-c25c20bf.entry.js → p-b7c6fdbd.entry.js} +2 -2
  53. package/dist/beeq/p-b7c6fdbd.entry.js.map +1 -0
  54. package/dist/beeq/p-b8bac7c7.entry.js +6 -0
  55. package/dist/beeq/p-b8bac7c7.entry.js.map +1 -0
  56. package/dist/beeq/{p-40bb4e2c.entry.js → p-bb99b400.entry.js} +2 -2
  57. package/dist/beeq/{p-40bb4e2c.entry.js.map → p-bb99b400.entry.js.map} +1 -1
  58. package/dist/beeq/{p-cfe07fad.entry.js → p-cf2e4d57.entry.js} +2 -2
  59. package/dist/beeq/{p-cfe07fad.entry.js.map → p-cf2e4d57.entry.js.map} +1 -1
  60. package/dist/beeq/p-d4df64ae.entry.js +6 -0
  61. package/dist/beeq/{p-2283258e.entry.js.map → p-d4df64ae.entry.js.map} +1 -1
  62. package/dist/beeq/{p-a0ef4135.entry.js → p-d7c20c6f.entry.js} +2 -2
  63. package/dist/beeq/{p-a0ef4135.entry.js.map → p-d7c20c6f.entry.js.map} +1 -1
  64. package/dist/beeq/{p-bae91da4.entry.js → p-e91ee0da.entry.js} +2 -2
  65. package/dist/beeq/{p-bae91da4.entry.js.map → p-e91ee0da.entry.js.map} +1 -1
  66. package/dist/beeq/{p-d155bf0e.entry.js → p-ef783b95.entry.js} +2 -2
  67. package/dist/beeq/{p-d155bf0e.entry.js.map → p-ef783b95.entry.js.map} +1 -1
  68. package/dist/beeq/{p-42e388d0.entry.js → p-f07f4d99.entry.js} +2 -2
  69. package/dist/beeq/{p-42e388d0.entry.js.map → p-f07f4d99.entry.js.map} +1 -1
  70. package/dist/beeq/{p-54bfb042.entry.js → p-f0a2c87e.entry.js} +2 -2
  71. package/dist/beeq/{p-54bfb042.entry.js.map → p-f0a2c87e.entry.js.map} +1 -1
  72. package/dist/beeq/{p-580f0a77.entry.js → p-f3184477.entry.js} +2 -2
  73. package/dist/beeq/{p-580f0a77.entry.js.map → p-f3184477.entry.js.map} +1 -1
  74. package/dist/beeq/{p-000d575f.entry.js → p-f4c66e83.entry.js} +2 -2
  75. package/dist/beeq/{p-ad419446.entry.js → p-fb763ec5.entry.js} +2 -2
  76. package/dist/beeq/{p-290a95ef.entry.js → p-fe22de00.entry.js} +2 -2
  77. package/dist/beeq/{p-290a95ef.entry.js.map → p-fe22de00.entry.js.map} +1 -1
  78. package/dist/beeq/p-kY6d9Evy.js +6 -0
  79. package/dist/beeq/p-kY6d9Evy.js.map +1 -0
  80. package/dist/beeq.html-custom-data.json +206 -201
  81. package/dist/cjs/beeq.cjs.js +3 -3
  82. package/dist/cjs/beeq.cjs.js.map +1 -1
  83. package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -2
  84. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
  85. package/dist/cjs/bq-accordion.cjs.entry.js +2 -2
  86. package/dist/cjs/bq-alert.cjs.entry.js +3 -3
  87. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  88. package/dist/cjs/bq-avatar.cjs.entry.js +3 -3
  89. package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
  90. package/dist/cjs/bq-badge.cjs.entry.js +3 -3
  91. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +3 -3
  92. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
  93. package/dist/cjs/bq-breadcrumb.cjs.entry.js +2 -2
  94. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  95. package/dist/cjs/bq-button_2.cjs.entry.js +5 -5
  96. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  97. package/dist/cjs/bq-card.cjs.entry.js +3 -3
  98. package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
  99. package/dist/cjs/bq-checkbox.cjs.entry.js +35 -22
  100. package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
  101. package/dist/cjs/bq-date-picker.cjs.entry.js +3 -3
  102. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  103. package/dist/cjs/bq-dialog.cjs.entry.js +3 -3
  104. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  105. package/dist/cjs/bq-divider.cjs.entry.js +3 -3
  106. package/dist/cjs/bq-drawer.cjs.entry.js +3 -3
  107. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  108. package/dist/cjs/bq-dropdown_2.cjs.entry.js +3 -3
  109. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
  110. package/dist/cjs/bq-empty-state.cjs.entry.js +3 -3
  111. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  112. package/dist/cjs/bq-input.cjs.entry.js +17 -10
  113. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  114. package/dist/cjs/bq-notification.cjs.entry.js +7 -7
  115. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  116. package/dist/cjs/bq-option-group.cjs.entry.js +2 -2
  117. package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
  118. package/dist/cjs/bq-option-list_2.cjs.entry.js +5 -5
  119. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  120. package/dist/cjs/bq-option.cjs.entry.js +2 -2
  121. package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
  122. package/dist/cjs/bq-page-title.cjs.entry.js +2 -2
  123. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  124. package/dist/cjs/bq-progress.cjs.entry.js +3 -3
  125. package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
  126. package/dist/cjs/bq-radio-group.cjs.entry.js +8 -12
  127. package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
  128. package/dist/cjs/bq-radio.cjs.entry.js +1 -1
  129. package/dist/cjs/bq-select.cjs.entry.js +39 -10
  130. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  131. package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
  132. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
  133. package/dist/cjs/bq-side-menu.cjs.entry.js +1 -1
  134. package/dist/cjs/bq-slider.cjs.entry.js +1 -1
  135. package/dist/cjs/bq-spinner.cjs.entry.js +4 -4
  136. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  137. package/dist/cjs/bq-status.cjs.entry.js +3 -3
  138. package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
  139. package/dist/cjs/bq-step-item.cjs.entry.js +3 -3
  140. package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
  141. package/dist/cjs/bq-steps.cjs.entry.js +2 -2
  142. package/dist/cjs/bq-switch.cjs.entry.js +1 -1
  143. package/dist/cjs/bq-tab-group.cjs.entry.js +2 -2
  144. package/dist/cjs/bq-tab.cjs.entry.js +3 -3
  145. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  146. package/dist/cjs/bq-textarea.cjs.entry.js +17 -15
  147. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  148. package/dist/cjs/bq-toast.cjs.entry.js +5 -7
  149. package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
  150. package/dist/cjs/bq-tooltip.cjs.entry.js +2 -2
  151. package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
  152. package/dist/cjs/{cssVariables-exM7Oz37.js → cssVariables-DuVz7KcV.js} +3 -3
  153. package/dist/cjs/cssVariables-DuVz7KcV.js.map +1 -0
  154. package/dist/cjs/{index-BSrsKFVG.js → index-J9jJ-fFQ.js} +47 -12
  155. package/dist/cjs/index-J9jJ-fFQ.js.map +1 -0
  156. package/dist/cjs/index.cjs.js +2 -2
  157. package/dist/cjs/loader.cjs.js +2 -2
  158. package/dist/cjs/{props-DzFXZXSF.js → props-BXpv3G-e.js} +6 -5
  159. package/dist/cjs/props-BXpv3G-e.js.map +1 -0
  160. package/dist/cjs/transition-C0S-pYqN.js.map +1 -1
  161. package/dist/collection/collection-manifest.json +1 -1
  162. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +1 -1
  163. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
  164. package/dist/collection/components/button/scss/bq-button.css +1 -1
  165. package/dist/collection/components/checkbox/bq-checkbox.js +33 -20
  166. package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
  167. package/dist/collection/components/checkbox/scss/bq-checkbox.css +1 -1
  168. package/dist/collection/components/icon/helper/request.js +1 -1
  169. package/dist/collection/components/icon/helper/request.js.map +1 -1
  170. package/dist/collection/components/input/bq-input.js +15 -8
  171. package/dist/collection/components/input/bq-input.js.map +1 -1
  172. package/dist/collection/components/notification/bq-notification.js +4 -4
  173. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  174. package/dist/collection/components/radio-group/bq-radio-group.js +6 -10
  175. package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
  176. package/dist/collection/components/select/bq-select.js +59 -10
  177. package/dist/collection/components/select/bq-select.js.map +1 -1
  178. package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
  179. package/dist/collection/components/tag/scss/bq-tag.css +1 -1
  180. package/dist/collection/components/textarea/bq-textarea.js +15 -13
  181. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  182. package/dist/collection/components/toast/bq-toast.js +2 -4
  183. package/dist/collection/components/toast/bq-toast.js.map +1 -1
  184. package/dist/collection/shared/test-utils/computedStyle.js +24 -24
  185. package/dist/collection/shared/test-utils/computedStyle.js.map +1 -1
  186. package/dist/collection/shared/test-utils/sleep.js +5 -1
  187. package/dist/collection/shared/test-utils/sleep.js.map +1 -1
  188. package/dist/collection/shared/utils/cssVariables.js +1 -1
  189. package/dist/collection/shared/utils/cssVariables.js.map +1 -1
  190. package/dist/collection/shared/utils/props.js +4 -3
  191. package/dist/collection/shared/utils/props.js.map +1 -1
  192. package/dist/collection/shared/utils/transition.js.map +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-alert.js +1 -1
  197. package/dist/components/bq-alert.js.map +1 -1
  198. package/dist/components/bq-avatar.js +1 -1
  199. package/dist/components/bq-avatar.js.map +1 -1
  200. package/dist/components/bq-badge.js +1 -1
  201. package/dist/components/bq-breadcrumb-item.js +1 -1
  202. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  203. package/dist/components/bq-breadcrumb.js +1 -1
  204. package/dist/components/bq-breadcrumb.js.map +1 -1
  205. package/dist/components/bq-button.js +1 -1
  206. package/dist/components/bq-card.js +1 -1
  207. package/dist/components/bq-card.js.map +1 -1
  208. package/dist/components/bq-checkbox.js +1 -1
  209. package/dist/components/bq-checkbox.js.map +1 -1
  210. package/dist/components/bq-date-picker.js +1 -1
  211. package/dist/components/bq-date-picker.js.map +1 -1
  212. package/dist/components/bq-dialog.js +1 -1
  213. package/dist/components/bq-dialog.js.map +1 -1
  214. package/dist/components/bq-divider.js +1 -1
  215. package/dist/components/bq-drawer.js +1 -1
  216. package/dist/components/bq-drawer.js.map +1 -1
  217. package/dist/components/bq-dropdown.js +1 -1
  218. package/dist/components/bq-empty-state.js +1 -1
  219. package/dist/components/bq-empty-state.js.map +1 -1
  220. package/dist/components/bq-icon.js +1 -1
  221. package/dist/components/bq-input.js +1 -1
  222. package/dist/components/bq-input.js.map +1 -1
  223. package/dist/components/bq-notification.js +1 -1
  224. package/dist/components/bq-notification.js.map +1 -1
  225. package/dist/components/bq-option-group.js +1 -1
  226. package/dist/components/bq-option-group.js.map +1 -1
  227. package/dist/components/bq-option-list.js +1 -1
  228. package/dist/components/bq-option.js +1 -1
  229. package/dist/components/bq-option.js.map +1 -1
  230. package/dist/components/bq-page-title.js +1 -1
  231. package/dist/components/bq-page-title.js.map +1 -1
  232. package/dist/components/bq-panel.js +1 -1
  233. package/dist/components/bq-progress.js +1 -1
  234. package/dist/components/bq-progress.js.map +1 -1
  235. package/dist/components/bq-radio-group.js +1 -1
  236. package/dist/components/bq-radio-group.js.map +1 -1
  237. package/dist/components/bq-radio.js +1 -1
  238. package/dist/components/bq-select.js +1 -1
  239. package/dist/components/bq-select.js.map +1 -1
  240. package/dist/components/bq-side-menu-item.js +1 -1
  241. package/dist/components/bq-side-menu-item.js.map +1 -1
  242. package/dist/components/bq-side-menu.js +1 -1
  243. package/dist/components/bq-slider.js +1 -1
  244. package/dist/components/bq-spinner.js +1 -1
  245. package/dist/components/bq-spinner.js.map +1 -1
  246. package/dist/components/bq-status.js +1 -1
  247. package/dist/components/bq-status.js.map +1 -1
  248. package/dist/components/bq-step-item.js +1 -1
  249. package/dist/components/bq-step-item.js.map +1 -1
  250. package/dist/components/bq-steps.js +1 -1
  251. package/dist/components/bq-switch.js +1 -1
  252. package/dist/components/bq-tab-group.js +1 -1
  253. package/dist/components/bq-tab.js +1 -1
  254. package/dist/components/bq-tab.js.map +1 -1
  255. package/dist/components/bq-tag.js +1 -1
  256. package/dist/components/bq-textarea.js +1 -1
  257. package/dist/components/bq-textarea.js.map +1 -1
  258. package/dist/components/bq-toast.js +1 -1
  259. package/dist/components/bq-toast.js.map +1 -1
  260. package/dist/components/bq-tooltip.js +1 -1
  261. package/dist/components/index.js +1 -1
  262. package/dist/{beeq/p-45b7464b.entry.js → components/p-2bpX-u8x.js} +2 -2
  263. package/dist/components/p-2bpX-u8x.js.map +1 -0
  264. package/dist/components/{p-YjPwN7vu.js → p-2eUC8A3N.js} +2 -2
  265. package/dist/components/p-2eUC8A3N.js.map +1 -0
  266. package/dist/components/{p-BY4GkNoQ.js → p-BMHXMsVR.js} +2 -2
  267. package/dist/components/{p-Dj-mQvqv.js → p-BOuMP_Rm.js} +2 -2
  268. package/dist/components/{p-Dj-mQvqv.js.map → p-BOuMP_Rm.js.map} +1 -1
  269. package/dist/components/{p-D3RCJ1ti.js → p-CK3SnGa2.js} +2 -2
  270. package/dist/components/{p-D4ZErYyQ.js → p-CNITfoR_.js} +2 -2
  271. package/dist/components/p-CNITfoR_.js.map +1 -0
  272. package/dist/components/p-CfP6le1E.js +6 -0
  273. package/dist/components/{p-Ci3ldciT.js.map → p-CfP6le1E.js.map} +1 -1
  274. package/dist/components/p-DbxZ8FhA.js +6 -0
  275. package/dist/components/p-DbxZ8FhA.js.map +1 -0
  276. package/dist/components/p-DdvbF5yL.js.map +1 -1
  277. package/dist/components/{p-4ksDMBf6.js → p-MSqM1CAF.js} +2 -2
  278. package/dist/components/{p-4ksDMBf6.js.map → p-MSqM1CAF.js.map} +1 -1
  279. package/dist/components/{p-B99eLANt.js → p-jrBUnEFW.js} +2 -2
  280. package/dist/components/{p-B99eLANt.js.map → p-jrBUnEFW.js.map} +1 -1
  281. package/dist/components/p-kY6d9Evy.js +6 -0
  282. package/dist/components/p-kY6d9Evy.js.map +1 -0
  283. package/dist/components/{p-D3JbL1Mm.js → p-wi7vUIoV.js} +2 -2
  284. package/dist/components/{p-D3JbL1Mm.js.map → p-wi7vUIoV.js.map} +1 -1
  285. package/dist/custom-elements.json +3520 -3221
  286. package/dist/esm/beeq.js +4 -4
  287. package/dist/esm/beeq.js.map +1 -1
  288. package/dist/esm/bq-accordion-group.entry.js +2 -2
  289. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  290. package/dist/esm/bq-accordion.entry.js +2 -2
  291. package/dist/esm/bq-alert.entry.js +3 -3
  292. package/dist/esm/bq-alert.entry.js.map +1 -1
  293. package/dist/esm/bq-avatar.entry.js +3 -3
  294. package/dist/esm/bq-avatar.entry.js.map +1 -1
  295. package/dist/esm/bq-badge.entry.js +3 -3
  296. package/dist/esm/bq-breadcrumb-item.entry.js +3 -3
  297. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  298. package/dist/esm/bq-breadcrumb.entry.js +2 -2
  299. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  300. package/dist/esm/bq-button_2.entry.js +5 -5
  301. package/dist/esm/bq-button_2.entry.js.map +1 -1
  302. package/dist/esm/bq-card.entry.js +3 -3
  303. package/dist/esm/bq-card.entry.js.map +1 -1
  304. package/dist/esm/bq-checkbox.entry.js +35 -22
  305. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  306. package/dist/esm/bq-date-picker.entry.js +3 -3
  307. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  308. package/dist/esm/bq-dialog.entry.js +3 -3
  309. package/dist/esm/bq-dialog.entry.js.map +1 -1
  310. package/dist/esm/bq-divider.entry.js +3 -3
  311. package/dist/esm/bq-drawer.entry.js +3 -3
  312. package/dist/esm/bq-drawer.entry.js.map +1 -1
  313. package/dist/esm/bq-dropdown_2.entry.js +3 -3
  314. package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
  315. package/dist/esm/bq-empty-state.entry.js +3 -3
  316. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  317. package/dist/esm/bq-input.entry.js +17 -10
  318. package/dist/esm/bq-input.entry.js.map +1 -1
  319. package/dist/esm/bq-notification.entry.js +7 -7
  320. package/dist/esm/bq-notification.entry.js.map +1 -1
  321. package/dist/esm/bq-option-group.entry.js +2 -2
  322. package/dist/esm/bq-option-group.entry.js.map +1 -1
  323. package/dist/esm/bq-option-list_2.entry.js +5 -5
  324. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  325. package/dist/esm/bq-option.entry.js +2 -2
  326. package/dist/esm/bq-option.entry.js.map +1 -1
  327. package/dist/esm/bq-page-title.entry.js +2 -2
  328. package/dist/esm/bq-page-title.entry.js.map +1 -1
  329. package/dist/esm/bq-progress.entry.js +3 -3
  330. package/dist/esm/bq-progress.entry.js.map +1 -1
  331. package/dist/esm/bq-radio-group.entry.js +8 -12
  332. package/dist/esm/bq-radio-group.entry.js.map +1 -1
  333. package/dist/esm/bq-radio.entry.js +1 -1
  334. package/dist/esm/bq-select.entry.js +39 -10
  335. package/dist/esm/bq-select.entry.js.map +1 -1
  336. package/dist/esm/bq-side-menu-item.entry.js +2 -2
  337. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  338. package/dist/esm/bq-side-menu.entry.js +1 -1
  339. package/dist/esm/bq-slider.entry.js +1 -1
  340. package/dist/esm/bq-spinner.entry.js +4 -4
  341. package/dist/esm/bq-spinner.entry.js.map +1 -1
  342. package/dist/esm/bq-status.entry.js +3 -3
  343. package/dist/esm/bq-status.entry.js.map +1 -1
  344. package/dist/esm/bq-step-item.entry.js +3 -3
  345. package/dist/esm/bq-step-item.entry.js.map +1 -1
  346. package/dist/esm/bq-steps.entry.js +2 -2
  347. package/dist/esm/bq-switch.entry.js +1 -1
  348. package/dist/esm/bq-tab-group.entry.js +2 -2
  349. package/dist/esm/bq-tab.entry.js +3 -3
  350. package/dist/esm/bq-tab.entry.js.map +1 -1
  351. package/dist/esm/bq-textarea.entry.js +17 -15
  352. package/dist/esm/bq-textarea.entry.js.map +1 -1
  353. package/dist/esm/bq-toast.entry.js +5 -7
  354. package/dist/esm/bq-toast.entry.js.map +1 -1
  355. package/dist/esm/bq-tooltip.entry.js +2 -2
  356. package/dist/esm/bq-tooltip.entry.js.map +1 -1
  357. package/dist/esm/{cssVariables-CyiWA5Ok.js → cssVariables-DhGXeOL_.js} +3 -3
  358. package/dist/esm/cssVariables-DhGXeOL_.js.map +1 -0
  359. package/dist/esm/{index-CO2T68hs.js → index-BSSRzVAz.js} +47 -12
  360. package/dist/esm/index-BSSRzVAz.js.map +1 -0
  361. package/dist/esm/index.js +2 -2
  362. package/dist/esm/loader.js +3 -3
  363. package/dist/esm/{props-zh4P02Kn.js → props-DbxZ8FhA.js} +6 -5
  364. package/dist/esm/props-DbxZ8FhA.js.map +1 -0
  365. package/dist/esm/transition-DdvbF5yL.js.map +1 -1
  366. package/dist/hydrate/index.js +181 -84
  367. package/dist/hydrate/index.mjs +181 -84
  368. package/dist/stencil.config.js +1 -0
  369. package/dist/stencil.config.js.map +1 -1
  370. package/dist/types/components/checkbox/bq-checkbox.d.ts +2 -2
  371. package/dist/types/components/input/bq-input.d.ts +1 -0
  372. package/dist/types/components/select/bq-select.d.ts +5 -0
  373. package/dist/types/components.d.ts +13 -0
  374. package/dist/types/home/runner/work/BEEQ/BEEQ/.stencil/packages/beeq/vitest.config.d.ts +2 -0
  375. package/dist/types/shared/test-utils/computedStyle.d.ts +7 -6
  376. package/dist/types/shared/test-utils/setProperties.d.ts +1 -1
  377. package/dist/types/shared/test-utils/sleep.d.ts +5 -1
  378. package/dist/types/stencil-public-runtime.d.ts +1 -0
  379. package/dist/vitest.config.js +81 -0
  380. package/dist/vitest.config.js.map +1 -0
  381. package/package.json +1 -1
  382. package/dist/beeq/p-2283258e.entry.js +0 -6
  383. package/dist/beeq/p-30ba61a1.entry.js +0 -6
  384. package/dist/beeq/p-30ba61a1.entry.js.map +0 -1
  385. package/dist/beeq/p-7a6a89f1.entry.js.map +0 -1
  386. package/dist/beeq/p-7adb6e2e.entry.js.map +0 -1
  387. package/dist/beeq/p-CO2T68hs.js.map +0 -1
  388. package/dist/beeq/p-_RvVpeh2.js +0 -6
  389. package/dist/beeq/p-_RvVpeh2.js.map +0 -1
  390. package/dist/beeq/p-a71efa95.entry.js.map +0 -1
  391. package/dist/beeq/p-a77b58aa.entry.js +0 -6
  392. package/dist/beeq/p-c25c20bf.entry.js.map +0 -1
  393. package/dist/beeq/p-zh4P02Kn.js +0 -6
  394. package/dist/beeq/p-zh4P02Kn.js.map +0 -1
  395. package/dist/cjs/cssVariables-exM7Oz37.js.map +0 -1
  396. package/dist/cjs/index-BSrsKFVG.js.map +0 -1
  397. package/dist/cjs/props-DzFXZXSF.js.map +0 -1
  398. package/dist/components/p-Ci3ldciT.js +0 -6
  399. package/dist/components/p-D4ZErYyQ.js.map +0 -1
  400. package/dist/components/p-DnqmdkvK.js +0 -6
  401. package/dist/components/p-DnqmdkvK.js.map +0 -1
  402. package/dist/components/p-YjPwN7vu.js.map +0 -1
  403. package/dist/components/p-_RvVpeh2.js +0 -6
  404. package/dist/components/p-_RvVpeh2.js.map +0 -1
  405. package/dist/components/p-zh4P02Kn.js +0 -6
  406. package/dist/components/p-zh4P02Kn.js.map +0 -1
  407. package/dist/esm/cssVariables-CyiWA5Ok.js.map +0 -1
  408. package/dist/esm/index-CO2T68hs.js.map +0 -1
  409. package/dist/esm/props-zh4P02Kn.js.map +0 -1
  410. package/dist/jest.config.js +0 -23
  411. package/dist/jest.config.js.map +0 -1
  412. package/dist/types/Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System/.stencil/packages/beeq/jest.config.d.ts +0 -19
  413. /package/dist/beeq/{p-f47905ae.entry.js.map → p-21db2c4e.entry.js.map} +0 -0
  414. /package/dist/beeq/{p-e9535627.entry.js.map → p-25772ebd.entry.js.map} +0 -0
  415. /package/dist/beeq/{p-1fb43de2.entry.js.map → p-5645238d.entry.js.map} +0 -0
  416. /package/dist/beeq/{p-8dfd0329.entry.js.map → p-6b0f896f.entry.js.map} +0 -0
  417. /package/dist/beeq/{p-40163197.entry.js.map → p-b26ee039.entry.js.map} +0 -0
  418. /package/dist/beeq/{p-e366fc1b.entry.js.map → p-b31d249b.entry.js.map} +0 -0
  419. /package/dist/beeq/{p-3c77308c.entry.js.map → p-b6f5430a.entry.js.map} +0 -0
  420. /package/dist/beeq/{p-000d575f.entry.js.map → p-f4c66e83.entry.js.map} +0 -0
  421. /package/dist/beeq/{p-ad419446.entry.js.map → p-fb763ec5.entry.js.map} +0 -0
  422. /package/dist/components/{p-BY4GkNoQ.js.map → p-BMHXMsVR.js.map} +0 -0
  423. /package/dist/components/{p-D3RCJ1ti.js.map → p-CK3SnGa2.js.map} +0 -0
  424. /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/packages/beeq/stencil.config.d.ts +0 -0
  425. /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/tailwind.config.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"bq-notification.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/notification/bq-notification.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvG,OAAO,EACL,QAAQ,EACR,KAAK,EACL,cAAc,EACd,QAAQ,EACR,KAAK,EAEL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAMH,MAAM,OAAO,cAAc;IACzB,iBAAiB;IACjB,uBAAuB;IAEf,mBAAmB,CAAkB;IACrC,QAAQ,CAAiB;IACzB,UAAU,CAAiB;IAC3B,gBAAgB,CAAiB;IAEzC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAA6B;IAE1C,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEzB,UAAU,GAAG,KAAK,CAAC;IACnB,SAAS,GAAG,KAAK,CAAC;IAClB,kBAAkB,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,4BAA4B,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAErH,sBAAsB;IACtB,2BAA2B;IAE3B,2FAA2F;IAClE,WAAW,CAAU;IAE9C,sDAAsD;IAC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AAI,CACrD,CACF;oBAEN,4DACE,KAAK,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACtE,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;4BACX,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;wBACxB,CAAC;wBAED,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, Host, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport {\n debounce,\n enter,\n hasSlotContent,\n isClient,\n leave,\n type TDebounce,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TNotificationBorderRadius, TNotificationType } from './bq-notification.types';\nimport { NOTIFICATION_TYPE } from './bq-notification.types';\n\nconst NOTIFICATION_PORTAL_SELECTOR = 'bq-notification-portal';\n\n/**\n * The Notification component is a user interface element used to provide information or alerts to users in a non-intrusive manner.\n *\n * @example How to use it\n * ```html\n * <bq-notification border=\"s\" time=\"3000\" type=\"info\">\n * Title\n * <span slot=\"body\">\n * This is some description text text\n * <a class=\"bq-link\" href=\"https://example.com\">Link</a>\n * </span>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-notification>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/945cb6-notification\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {boolean} auto-dismiss - If true, the notification will automatically hide after the specified amount of time\n * @attr {string} border - The corder radius of the notification component\n * @attr {boolean} disable-close - If true, the close button at the top right of the notification won't be shown\n * @attr {boolean} hide-icon - If true, the notification icon won't be shown\n * @attr {boolean} open - If true, the notification will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the notification will close itself. Only valid if `auto-dismiss=\"true\"`\n * @attr {string} type - Type of Notification\n *\n * @event bqAfterClose - Callback handler to be called after the notification has been closed\n * @event bqAfterOpen - Callback handler to be called after the notification has been opened\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The notification title content\n * @slot body - The notification description content\n * @slot footer - The notification footer content\n * @slot icon - The icon to be displayed in the notification\n * @slot btn-close - The close button of the notification\n *\n * @part base - The `<div>` container of the predefined bq-icon component.\n * @part body - The container `<div>` that wraps the notification description content\n * @part btn-close - The `bq-button` used to close the notification\n * @part content - The container `<div>` that wraps all the notification content (title, description, footer)\n * @part footer - The container `<div>` that wraps the notification footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon based on the notification type\n * @part icon-outline - The container `<div>` that wraps the icon element\n * @part main - The container `<div>` that wraps the notification main content (title, description)\n * @part svg - The `<svg>` element of the predefined bq-icon component.\n * @part title - The container `<div>` that wraps the notification title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-notification--background - The notification background color\n * @cssprop --bq-notification--box-shadow - The notification box shadow\n * @cssprop --bq-notification--border-color - The notification border color\n * @cssprop --bq-notification--border-radius - The notification border radius\n * @cssprop --bq-notification--border-style - The notification border style\n * @cssprop --bq-notification--border-width - The notification border width\n * @cssprop --bq-notification--content-footer-gap - The notification content and footer gap\n * @cssprop --bq-notification--title-body-gap - The notification title and body gap\n * @cssprop --bq-notification--icon-color-error - The notification icon color for error type\n * @cssprop --bq-notification--icon-color-info - The notification icon color for info type\n * @cssprop --bq-notification--icon-color-neutral - The notification icon color for neutral type\n * @cssprop --bq-notification--icon-color-success - The notification icon color for success type\n * @cssprop --bq-notification--icon-color-warning - The notification icon color for warning type\n * @cssprop --bq-notification--padding - The notification padding\n * @cssprop --bq-notification--min-width - The notification min width\n */\n@Component({\n tag: 'bq-notification',\n styleUrl: './scss/bq-notification.scss',\n shadow: true,\n})\nexport class BqNotification {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n private notificationElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqNotificationElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n @State() private notificationPortal = isClient() ? document.querySelector(`.${NOTIFICATION_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** If true, the notification will automatically hide after the specified amount of time */\n @Prop({ reflect: true }) autoDismiss: boolean;\n\n /** The corder radius of the notification component */\n @Prop({ reflect: true }) border: TNotificationBorderRadius = 's';\n\n /** If true, the close button at the top right of the notification won't be shown */\n @Prop({ reflect: true }) disableClose: boolean;\n\n /** If true, the notification icon won't be shown */\n @Prop({ reflect: true }) hideIcon: boolean;\n\n /** If true, the notification will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the notification will close itself. Only valid if `autoDismiss=\"true\"` */\n @Prop({ reflect: true }) time: number = 3000;\n\n /** Type of Notification */\n @Prop({ reflect: true }) type: TNotificationType = 'info';\n\n // Prop lifecycle events\n // =======================\n @Watch('autoDismiss')\n @Watch('time')\n handleTimeout() {\n this.autoDismissDebounce?.cancel();\n if (!this.autoDismiss) return;\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n // Make sure to autodismiss the notification if the `auto-dismiss` value changed while open\n if (this.open) this.autoDismissDebounce();\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (!(this.autoDismiss && this.open)) return;\n this.autoDismissDebounce();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(NOTIFICATION_TYPE, 'info', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide!: EventEmitter;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow!: EventEmitter;\n\n /** Callback handler to be called after the notification has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the notification has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (!notificationPortal) {\n this.notificationPortal = Object.assign(document.createElement('div'), {\n className: NOTIFICATION_PORTAL_SELECTOR,\n });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeout();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqAfterClose')\n afterNotificationClose() {\n try {\n const { notificationPortal } = this;\n notificationPortal.removeChild(this.el);\n // Remove the notification portal from the DOM when there are no more notifications\n if (notificationPortal.querySelector(this.el.tagName.toLowerCase()) === null) {\n notificationPortal.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\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 /** Method to be called to hide the notification component */\n @Method()\n async hide(): Promise<void> {\n await this.handleHide();\n }\n\n /** Method to be called to show the notification component */\n @Method()\n async show(): Promise<void> {\n await this.handleShow();\n }\n\n /** This method can be used to display notifications in a fixed-position element that allows for stacking multiple notifications vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (notificationPortal?.parentElement === null) {\n document.body.append(notificationPortal);\n }\n\n notificationPortal?.appendChild(this.el);\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = async () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n await leave(this.notificationElem);\n this.open = false;\n this.handleTransitionEnd();\n }\n };\n\n private handleShow = async () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n await enter(this.notificationElem);\n this.handleTransitionEnd();\n }\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconName(): string {\n const typeMap = {\n error: 'x-circle',\n success: 'check-circle',\n warning: 'warning-circle',\n };\n\n return typeMap[this.type] || 'info';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n aria-hidden={!this.open ? 'true' : 'false'}\n class={{ 'is-hidden': !this.open }}\n hidden={!this.open ? 'true' : 'false'}\n role=\"alert\"\n style={style}\n >\n <div\n class=\"bq-notification\"\n data-transition-enter=\"transform transition ease-out duration-300\"\n data-transition-enter-end=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-enter-start=\"translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-leave=\"transform transition ease-in duration-100\"\n data-transition-leave-end=\"-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-leave-start=\"translate-y-0 opacity-100 sm:translate-x-0\"\n part=\"wrapper\"\n ref={(div) => {\n this.notificationElem = div;\n }}\n >\n {/* CLOSE BUTTON */}\n {!this.disableClose && (\n <bq-button\n appearance=\"text\"\n border=\"s\"\n class=\"absolute inset-ie-m [&::part(button)]:p-0\"\n label=\"Close\"\n onBqClick={() => this.hide()}\n onlyIcon\n part=\"btn-close\"\n size=\"small\"\n >\n <slot name=\"btn-close\">\n <bq-icon aria-hidden=\"true\" name=\"x\" />\n </slot>\n </bq-button>\n )}\n {/* ICON */}\n <div\n class={{\n '!hidden': this.hideIcon,\n [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)\n 'notification--icon me-xs flex text-left align-top': true,\n }}\n part=\"icon-outline\"\n >\n <slot name=\"icon\">\n <bq-icon exportparts=\"base,svg\" name={this.iconName} part=\"icon\" />\n </slot>\n </div>\n {/* MAIN */}\n <div class=\"flex flex-col items-start gap-[--bq-notification--content-footer-gap]\" part=\"main\">\n <div class=\"flex flex-col gap-[--bq-notification--title-body-gap]\" part=\"content\">\n {/* TITLE */}\n <div class=\"title-font font-semibold leading-regular\" part=\"title\">\n <slot />\n </div>\n {/* BODY */}\n <div\n class={{ 'text-s leading-regular': true, '!hidden': !this.hasContent }}\n part=\"body\"\n ref={(div) => {\n this.bodyElem = div;\n }}\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* FOOTER */}\n <div\n class={{ 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }}\n part=\"footer\"\n ref={(div) => {\n this.footerElem = div;\n }}\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-notification.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/notification/bq-notification.tsx"],"names":[],"mappings":"AACA,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DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, Host, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport {\n debounce,\n enter,\n hasSlotContent,\n isClient,\n leave,\n type TDebounce,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TNotificationBorderRadius, TNotificationType } from './bq-notification.types';\nimport { NOTIFICATION_TYPE } from './bq-notification.types';\n\nconst NOTIFICATION_PORTAL_SELECTOR = 'bq-notification-portal';\n\n/**\n * The Notification component is a user interface element used to provide information or alerts to users in a non-intrusive manner.\n *\n * @example How to use it\n * ```html\n * <bq-notification border=\"s\" time=\"3000\" type=\"info\">\n * Title\n * <span slot=\"body\">\n * This is some description text text\n * <a class=\"bq-link\" href=\"https://example.com\">Link</a>\n * </span>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-notification>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/945cb6-notification\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {boolean} auto-dismiss - If true, the notification will automatically hide after the specified amount of time\n * @attr {string} border - The corder radius of the notification component\n * @attr {boolean} disable-close - If true, the close button at the top right of the notification won't be shown\n * @attr {boolean} hide-icon - If true, the notification icon won't be shown\n * @attr {boolean} open - If true, the notification will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the notification will close itself. Only valid if `auto-dismiss=\"true\"`\n * @attr {string} type - Type of Notification\n *\n * @event bqAfterClose - Callback handler to be called after the notification has been closed\n * @event bqAfterOpen - Callback handler to be called after the notification has been opened\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The notification title content\n * @slot body - The notification description content\n * @slot footer - The notification footer content\n * @slot icon - The icon to be displayed in the notification\n * @slot btn-close - The close button of the notification\n *\n * @part base - The `<div>` container of the predefined bq-icon component.\n * @part body - The container `<div>` that wraps the notification description content\n * @part btn-close - The `bq-button` used to close the notification\n * @part content - The container `<div>` that wraps all the notification content (title, description, footer)\n * @part footer - The container `<div>` that wraps the notification footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon based on the notification type\n * @part icon-outline - The container `<div>` that wraps the icon element\n * @part main - The container `<div>` that wraps the notification main content (title, description)\n * @part svg - The `<svg>` element of the predefined bq-icon component.\n * @part title - The container `<div>` that wraps the notification title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-notification--background - The notification background color\n * @cssprop --bq-notification--box-shadow - The notification box shadow\n * @cssprop --bq-notification--border-color - The notification border color\n * @cssprop --bq-notification--border-radius - The notification border radius\n * @cssprop --bq-notification--border-style - The notification border style\n * @cssprop --bq-notification--border-width - The notification border width\n * @cssprop --bq-notification--content-footer-gap - The notification content and footer gap\n * @cssprop --bq-notification--title-body-gap - The notification title and body gap\n * @cssprop --bq-notification--icon-color-error - The notification icon color for error type\n * @cssprop --bq-notification--icon-color-info - The notification icon color for info type\n * @cssprop --bq-notification--icon-color-neutral - The notification icon color for neutral type\n * @cssprop --bq-notification--icon-color-success - The notification icon color for success type\n * @cssprop --bq-notification--icon-color-warning - The notification icon color for warning type\n * @cssprop --bq-notification--padding - The notification padding\n * @cssprop --bq-notification--min-width - The notification min width\n */\n@Component({\n tag: 'bq-notification',\n styleUrl: './scss/bq-notification.scss',\n shadow: true,\n})\nexport class BqNotification {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n private notificationElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqNotificationElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n @State() private notificationPortal = isClient() ? document.querySelector(`.${NOTIFICATION_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** If true, the notification will automatically hide after the specified amount of time */\n @Prop({ reflect: true }) autoDismiss: boolean;\n\n /** The corder radius of the notification component */\n @Prop({ reflect: true }) border: TNotificationBorderRadius = 's';\n\n /** If true, the close button at the top right of the notification won't be shown */\n @Prop({ reflect: true }) disableClose: boolean;\n\n /** If true, the notification icon won't be shown */\n @Prop({ reflect: true }) hideIcon: boolean;\n\n /** If true, the notification will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the notification will close itself. Only valid if `autoDismiss=\"true\"` */\n @Prop({ reflect: true }) time: number = 3000;\n\n /** Type of Notification */\n @Prop({ reflect: true }) type: TNotificationType = 'info';\n\n // Prop lifecycle events\n // =======================\n @Watch('autoDismiss')\n @Watch('time')\n handleTimeout() {\n this.autoDismissDebounce?.cancel();\n if (!this.autoDismiss) return;\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n // Make sure to autodismiss the notification if the `auto-dismiss` value changed while open\n if (this.open) this.autoDismissDebounce();\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (!(this.autoDismiss && this.open)) return;\n this.autoDismissDebounce();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(NOTIFICATION_TYPE, 'info', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide!: EventEmitter;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow!: EventEmitter;\n\n /** Callback handler to be called after the notification has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the notification has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (!notificationPortal) {\n this.notificationPortal = Object.assign(document.createElement('div'), {\n className: NOTIFICATION_PORTAL_SELECTOR,\n });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeout();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqAfterClose')\n afterNotificationClose() {\n try {\n const { notificationPortal } = this;\n notificationPortal.removeChild(this.el);\n // Remove the notification portal from the DOM when there are no more notifications\n if (notificationPortal.querySelector(this.el.tagName.toLowerCase()) === null) {\n notificationPortal.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\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 /** Method to be called to hide the notification component */\n @Method()\n async hide(): Promise<void> {\n await this.handleHide();\n }\n\n /** Method to be called to show the notification component */\n @Method()\n async show(): Promise<void> {\n await this.handleShow();\n }\n\n /** This method can be used to display notifications in a fixed-position element that allows for stacking multiple notifications vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (notificationPortal?.parentElement === null) {\n document.body.append(notificationPortal);\n }\n\n notificationPortal?.appendChild(this.el);\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = async () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n await leave(this.notificationElem);\n this.open = false;\n this.handleTransitionEnd();\n }\n };\n\n private handleShow = async () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n await enter(this.notificationElem);\n this.handleTransitionEnd();\n }\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconName(): string {\n const typeMap = {\n error: 'x-circle',\n success: 'check-circle',\n warning: 'warning-circle',\n };\n\n return typeMap[this.type] || 'info';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n aria-hidden={!this.open ? 'true' : 'false'}\n class={{ 'is-hidden': !this.open }}\n hidden={!this.open ? 'true' : 'false'}\n role=\"alert\"\n style={style}\n >\n <div\n class=\"bq-notification\"\n data-transition-enter=\"transform transition ease-out duration-300\"\n data-transition-enter-end=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-enter-start=\"translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-leave=\"transform transition ease-in duration-100\"\n data-transition-leave-end=\"-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-leave-start=\"translate-y-0 opacity-100 sm:translate-x-0\"\n part=\"wrapper\"\n ref={(div) => {\n this.notificationElem = div;\n }}\n >\n {/* CLOSE BUTTON */}\n {!this.disableClose && (\n <bq-button\n appearance=\"text\"\n border=\"s\"\n class=\"absolute inset-ie-m [&::part(button)]:p-0\"\n label=\"Close\"\n onBqClick={() => this.hide()}\n onlyIcon\n part=\"btn-close\"\n size=\"small\"\n >\n <slot class=\"flex\" name=\"btn-close\">\n <bq-icon aria-hidden=\"true\" name=\"x\" />\n </slot>\n </bq-button>\n )}\n {/* ICON */}\n <div\n class={{\n '!hidden': this.hideIcon,\n [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)\n 'notification--icon me-xs flex text-left align-top': true,\n }}\n part=\"icon-outline\"\n >\n <slot name=\"icon\">\n <bq-icon exportparts=\"base,svg\" name={this.iconName} part=\"icon\" />\n </slot>\n </div>\n {/* MAIN */}\n <div class=\"flex flex-col items-start gap-[--bq-notification--content-footer-gap]\" part=\"main\">\n <div class=\"flex flex-col gap-[--bq-notification--title-body-gap]\" part=\"content\">\n {/* TITLE */}\n <div class=\"title-font font-semibold leading-regular\" part=\"title\">\n <slot />\n </div>\n {/* BODY */}\n <div\n class={{ 'text-s leading-regular': true, '!hidden': !this.hasContent }}\n part=\"body\"\n ref={(div) => {\n this.bodyElem = div;\n }}\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* FOOTER */}\n <div\n class={{ 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }}\n part=\"footer\"\n ref={(div) => {\n this.footerElem = div;\n }}\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -153,8 +153,8 @@ export class BqRadioGroup {
153
153
  formResetCallback() {
154
154
  this.value = this.initialValue;
155
155
  this.internals.setFormValue(this.value ?? null);
156
- this.updateFormValidity();
157
156
  this.updateCustomStates();
157
+ this.updateFormValidity();
158
158
  }
159
159
  // Listeners
160
160
  // ==============
@@ -241,18 +241,14 @@ export class BqRadioGroup {
241
241
  });
242
242
  return;
243
243
  }
244
- // Find which radio should be focusable
245
- let focusableRadio;
246
244
  // Priority 1: Currently checked radio
247
- focusableRadio = this.cachedRadioElements.find((radio) => radio.checked);
245
+ let focusableRadio = this.cachedRadioElements.find((radio) => radio.checked);
248
246
  // Priority 2: Radio matching current value
249
- if (!focusableRadio && this.value) {
250
- focusableRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);
247
+ if (!isNil(this.value)) {
248
+ focusableRadio ??= this.cachedRadioElements.find((radio) => radio.value === this.value);
251
249
  }
252
250
  // Priority 3: First enabled radio (fallback)
253
- if (!focusableRadio) {
254
- focusableRadio = this.cachedRadioElements.find((radio) => !radio.disabled);
255
- }
251
+ focusableRadio ??= this.cachedRadioElements.find((radio) => !radio.disabled);
256
252
  // Apply tabIndex to all radios
257
253
  this.cachedRadioElements.forEach((radio) => {
258
254
  radio.tabIndex = radio === focusableRadio ? 0 : -1;
@@ -353,7 +349,7 @@ export class BqRadioGroup {
353
349
  // Always the last one in the class.
354
350
  // ===================================
355
351
  render() {
356
- return (h(Host, { key: '324a831a19e6713db5b5f561d78571cb84e9b530', tabindex: this.tabIndex }, h("fieldset", { key: '41474f54b518587ecd897bbbddd8a96ba1e7ebed', "aria-controls": "bq-radiogroup", "aria-disabled": this.disabled, "aria-labelledby": "bq-radio-group__label", class: { 'bq-radio-group': true, 'has-fieldset': this.fieldset }, disabled: this.disabled, part: "base" }, h("legend", { key: 'f5c8834333aa3174418298e7240f16d9d5e85c70', part: "label" }, h("slot", { key: '8180b8c2a610af608092a5a37b3bb5b59ef32b76', id: "bq-radiogroup__label", name: "label" })), h("div", { key: 'dbad104bf6d984de4f9057e2d588dc1899705116', class: `bq-radio-group--${this.orientation}`, part: "group" }, h("slot", { key: '08ce09046a91f79a46e015bda8fc094291a66f4a', id: "bq-radiogroup", onSlotchange: this.handleSlotChange })))));
352
+ return (h(Host, { key: 'd9824d933742f7b4f97ffb41ef218f8af10d8528', tabindex: this.tabIndex }, h("fieldset", { key: '3a2c8481f073e99f2776ec88b701a49a1b4d157e', "aria-controls": "bq-radiogroup", "aria-disabled": this.disabled, "aria-labelledby": "bq-radio-group__label", class: { 'bq-radio-group': true, 'has-fieldset': this.fieldset }, disabled: this.disabled, part: "base" }, h("legend", { key: '228655d22bc983e0feeade0c2c673dc8d03be986', part: "label" }, h("slot", { key: 'edc973f89301ed2cf50e6958512de7a64746762d', id: "bq-radiogroup__label", name: "label" })), h("div", { key: '9246e7fcce1873436ec311e1b270d7dc46b518cc', class: `bq-radio-group--${this.orientation}`, part: "group" }, h("slot", { key: '32ce950e249832c49ad05385dd2772938b577db9', id: "bq-radiogroup", onSlotchange: this.handleSlotChange })))));
357
353
  }
358
354
  static get is() { return "bq-radio-group"; }
359
355
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-radio-group.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/radio-group/bq-radio-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhH,OAAO,EACL,QAAQ,EACR,cAAc,EACd,SAAS,EACT,2BAA2B,EAC3B,KAAK,EAEL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,MAAM,OAAO,GAAG;IACd,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,UAAU;CACb,CAAC;AAIX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AASH,MAAM,OAAO,YAAY;IACvB,iBAAiB;IACjB,uBAAuB;IAEf,YAAY,CAAU;IACtB,iBAAiB,CAA2D;IAC5E,cAAc,GAA8B,IAAI,CAAC;IACxC,gBAAgB,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC1D,mBAAmB,GAAyB,EAAE,CAAC;IAEvD,iCAAiC;IACj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AE,EAChE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,MAAM;gBAEX,+DAAQ,IAAI,EAAC,OAAO;oBAClB,6DAAM,EAAE,EAAC,sBAAsB,EAAC,IAAI,EAAC,OAAO,GAAG,CACxC;gBACT,4DAAK,KAAK,EAAE,mBAAmB,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAC,OAAO;oBAC7D,6DAAM,EAAE,EAAC,eAAe,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CAC5D,CACG,CACN,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport { AttachInternals, Component, Element, Event, Host, h, Listen, Prop, State, Watch } from '@stencil/core';\n\nimport {\n debounce,\n getNextElement,\n isDefined,\n isEventTargetChildOfElement,\n isNil,\n type TDebounce,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TRadioGroupOrientation } from './bq-radio-group.types';\nimport { RADIO_GROUP_ORIENTATION } from './bq-radio-group.types';\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 occurred 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) => {\n this.radioElementsSet.add(radio);\n });\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) => {\n radio.tabIndex = -1;\n });\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) => {\n this.internals?.states.add(state);\n });\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 aria-controls=\"bq-radiogroup\"\n aria-disabled={this.disabled}\n aria-labelledby=\"bq-radio-group__label\"\n class={{ 'bq-radio-group': true, 'has-fieldset': this.fieldset }}\n disabled={this.disabled}\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"]}
1
+ {"version":3,"file":"bq-radio-group.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/radio-group/bq-radio-group.tsx"],"names":[],"mappings":"AACA,OAAO,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport { AttachInternals, Component, Element, Event, Host, h, Listen, Prop, State, Watch } from '@stencil/core';\n\nimport {\n debounce,\n getNextElement,\n isDefined,\n isEventTargetChildOfElement,\n isNil,\n type TDebounce,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TRadioGroupOrientation } from './bq-radio-group.types';\nimport { RADIO_GROUP_ORIENTATION } from './bq-radio-group.types';\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.updateCustomStates();\n this.updateFormValidity();\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 occurred 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) => {\n this.radioElementsSet.add(radio);\n });\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) => {\n radio.tabIndex = -1;\n });\n return;\n }\n\n // Priority 1: Currently checked radio\n let focusableRadio = this.cachedRadioElements.find((radio) => radio.checked);\n\n // Priority 2: Radio matching current value\n if (!isNil(this.value)) {\n focusableRadio ??= this.cachedRadioElements.find((radio) => radio.value === this.value);\n }\n\n // Priority 3: First enabled radio (fallback)\n focusableRadio ??= this.cachedRadioElements.find((radio) => !radio.disabled);\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) => {\n this.internals?.states.add(state);\n });\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 aria-controls=\"bq-radiogroup\"\n aria-disabled={this.disabled}\n aria-labelledby=\"bq-radio-group__label\"\n class={{ 'bq-radio-group': true, 'has-fieldset': this.fieldset }}\n disabled={this.disabled}\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"]}
@@ -38,6 +38,7 @@ import { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, stringToArra
38
38
  * @attr {boolean} disabled - Indicates whether the Select input is disabled and cannot be interacted with.
39
39
  * @attr {number} distance - Represents the distance (gutter or margin) between the Select panel and the input element.
40
40
  * @attr {string} form - The ID of the form that Select input field belongs to.
41
+ * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).
41
42
  * @attr {boolean} keep-open-on-select - If `true`, the Select panel will remain open after a selection is made.
42
43
  * @attr {number} max-tags-visible - The maximum number of tags to display when multiple selection is enabled.
43
44
  * @attr {boolean} multiple - If `true`, the Select input will allow multiple selections.
@@ -158,6 +159,8 @@ export class BqSelect {
158
159
  distance = 8;
159
160
  /** The ID of the form that the Select input belongs to. */
160
161
  form;
162
+ /** The native form validation message (mandatory if `required` is set) */
163
+ formValidationMessage;
161
164
  /** If true, the Select panel will remain open after a selection is made. */
162
165
  keepOpenOnSelect = false;
163
166
  /** The Select input name. */
@@ -205,6 +208,7 @@ export class BqSelect {
205
208
  this.value = this.multiple ? [] : '';
206
209
  this.internals.setFormValue(undefined);
207
210
  this.syncItemsFromValue();
211
+ this.updateFormValidity();
208
212
  return;
209
213
  }
210
214
  // Handle multiple selection mode
@@ -212,12 +216,17 @@ export class BqSelect {
212
216
  this.value = stringToArray(this.value);
213
217
  this.internals.setFormValue(this.value.join(','));
214
218
  this.syncItemsFromValue();
219
+ this.updateFormValidity();
215
220
  return;
216
221
  }
217
222
  // Handle single selection mode
218
223
  this.value = String(this.value);
219
224
  this.internals.setFormValue(this.value);
220
225
  this.syncItemsFromValue();
226
+ this.updateFormValidity();
227
+ }
228
+ handleRequiredPropChange() {
229
+ this.updateFormValidity();
221
230
  }
222
231
  // Events section
223
232
  // Requires JSDocs for public API documentation
@@ -251,11 +260,12 @@ export class BqSelect {
251
260
  formAssociatedCallback() {
252
261
  this.internals.role = 'combobox';
253
262
  this.internals.ariaExpanded = this.open ? 'true' : 'false';
263
+ this.updateFormValidity();
254
264
  }
255
265
  async formResetCallback() {
256
266
  if (isNil(this.value))
257
267
  return;
258
- this.internals.setValidity({});
268
+ this.updateFormValidity();
259
269
  this.clear();
260
270
  }
261
271
  // Listeners
@@ -537,6 +547,23 @@ export class BqSelect {
537
547
  }
538
548
  return '';
539
549
  };
550
+ updateFormValidity = () => {
551
+ const { formValidationMessage, internals, required, value } = this;
552
+ // Clear the validity state
553
+ internals?.states.clear();
554
+ const isEmpty = this.multiple
555
+ ? !Array.isArray(value) || value.length === 0
556
+ : !isDefined(value) || String(value).trim() === '';
557
+ if (required && isEmpty) {
558
+ // Set validity state to invalid
559
+ internals?.states.add('invalid');
560
+ internals?.setValidity({ valueMissing: true }, formValidationMessage || 'Please select an option', this.inputElem);
561
+ return;
562
+ }
563
+ // Set validity state to valid if textarea has value or is not required
564
+ internals?.states.add('valid');
565
+ internals?.setValidity({});
566
+ };
540
567
  get options() {
541
568
  return Array.from(this.el.querySelectorAll('bq-option'));
542
569
  }
@@ -575,29 +602,29 @@ export class BqSelect {
575
602
  // ===================================
576
603
  render() {
577
604
  const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;
578
- return (h("div", { key: '7fce1b5a16a7e5b25cce5624c60c09187f380f2c', class: "bq-select", part: "base" }, h("label", { key: '5785e81858a0493c5cfc2e80ebcd19d96ff50d22', "aria-label": this.name || this.fallbackInputId, class: { 'bq-select__label': true, '!hidden': !this.hasLabel }, htmlFor: this.name || this.fallbackInputId, id: labelId, part: "label", ref: (labelElem) => {
605
+ return (h("div", { key: '3ac6927fd004b8de97f4b66f0fcb83151d04755c', class: "bq-select", part: "base" }, h("label", { key: '5f0d3b9899c3c17ce58a4cff93ba377993ff4f72', "aria-label": this.name || this.fallbackInputId, class: { 'bq-select__label': true, '!hidden': !this.hasLabel }, htmlFor: this.name || this.fallbackInputId, id: labelId, part: "label", ref: (labelElem) => {
579
606
  this.labelElem = labelElem;
580
- } }, h("slot", { key: 'bb7730c735f53312411f9d873483cb876835da0f', name: "label", onSlotchange: this.handleSlotChange })), h("bq-dropdown", { key: '8064982e9df5815d0213d6129212bc1e7472fdf9', class: "bq-select__dropdown w-full", disabled: this.disabled, disableScrollLock: this.disableScrollLock, distance: this.distance, exportparts: "panel", keepOpenOnSelect: this.keepOpenOnSelect, open: this.open, panelHeight: this.panelHeight, placement: this.placement, sameWidth: this.sameWidth, skidding: this.skidding, strategy: this.strategy }, h("div", { key: '014b00e22b0870ae1fc70fdd712e75890741212f', class: {
607
+ } }, h("slot", { key: 'c7262cb63edc2a85de1bd119b9acab5f22038cb7', name: "label", onSlotchange: this.handleSlotChange })), h("bq-dropdown", { key: '3c8b5050c2c5d59236a5c2e9c663f11fde6d22eb', class: "bq-select__dropdown w-full", disabled: this.disabled, disableScrollLock: this.disableScrollLock, distance: this.distance, exportparts: "panel", keepOpenOnSelect: this.keepOpenOnSelect, open: this.open, panelHeight: this.panelHeight, placement: this.placement, sameWidth: this.sameWidth, skidding: this.skidding, strategy: this.strategy }, h("div", { key: 'f4affd0bc3129ebd50d6812b71aab734ad08dc14', class: {
581
608
  'bq-select__control': true,
582
609
  [`validation-${this.validationStatus}`]: true,
583
610
  disabled: this.disabled,
584
- }, part: "control", slot: "trigger" }, h("span", { key: '9258ab50855df0a94eaa470d55371cf5a3197ac9', class: { 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }, part: "prefix", ref: (spanElem) => {
611
+ }, part: "control", slot: "trigger" }, h("span", { key: '228c2739b4e2ba0d1fa09360e1c45a2594e3af1c', class: { 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }, part: "prefix", ref: (spanElem) => {
585
612
  this.prefixElem = spanElem;
586
- } }, h("slot", { key: '1cf1940473621784792bf8d0e77391233ec99aee', name: "prefix", onSlotchange: this.handleSlotChange })), h("div", { key: 'a91471faea3a207758de88e98081e159848c573f', class: "flex flex-1 overflow-x-auto", part: "input-outline" }, this.multiple && (h("span", { key: 'db8bbcc8837bb9c3949130a8ca9a09a1377abf55', class: "bq-select__tags", part: "tags" }, h("slot", { key: '6a9d99f481a7b0a7e3df77ff01bbc515135c0bfb', name: "tags" }, this.displayTags))), h("input", { key: 'bf4b0b97f3b5adf3f7116a04efcdf66701b72e0a', "aria-controls": `bq-options-${this.name}`, "aria-disabled": this.disabled ? 'true' : 'false', "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "listbox", autoCapitalize: "off", autoComplete: "off", class: "bq-select__control--input is-full flex-grow", disabled: this.disabled, form: this.form, id: this.name || this.fallbackInputId, name: this.name, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handleInput, onKeyDown: this.handleKeydown, part: "input", placeholder: this.displayPlaceholder, readOnly: this.readonly, ref: (inputElem) => {
613
+ } }, h("slot", { key: '98a207db3b4e9fbb2aee9545d40b56ae3e3a2124', name: "prefix", onSlotchange: this.handleSlotChange })), h("div", { key: 'ee7ff8f24c599b9954f0ca664f7169262ee75636', class: "flex flex-1 overflow-x-auto", part: "input-outline" }, this.multiple && (h("span", { key: 'a9f016739ad1cad0e468954932bddaa00c222160', class: "bq-select__tags", part: "tags" }, h("slot", { key: 'faae09dca15fa1fbec43e6cbde5ecb7241fb82c0', name: "tags" }, this.displayTags))), h("input", { key: 'f5d11d101de3bab402f41253bd0bcbeb7f40c417', "aria-controls": `bq-options-${this.name}`, "aria-disabled": this.disabled ? 'true' : 'false', "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "listbox", autoCapitalize: "off", autoComplete: "off", class: "bq-select__control--input is-full flex-grow", disabled: this.disabled, form: this.form, id: this.name || this.fallbackInputId, name: this.name, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handleInput, onKeyDown: this.handleKeydown, part: "input", placeholder: this.displayPlaceholder, readOnly: this.readonly, ref: (inputElem) => {
587
614
  this.inputElem = inputElem;
588
615
  }, required: this.required, role: "combobox",
589
616
  // Events
590
617
  spellcheck: false, type: "text", value: this.displayValue })), this.hasClearIcon && (
591
618
  // The clear button will be visible as long as the input has a value
592
619
  // and the parent group is hovered or has focus-within
593
- h("bq-button", { key: '8a74e1c5d96622392a828ce6336152e84b2d427d', appearance: "text", border: "s", class: "bq-select__control--clear ms-[--bq-select--gap] hidden [&::part(button)]:border-none [&::part(button)]:p-0", exportparts: "button", label: this.clearButtonLabel, onBqClick: this.handleClearClick, onlyIcon: true, part: "clear-btn", size: "small", tabIndex: -1 }, h("slot", { key: '0d3b64bba90b0d28fbf1fd1ef3f91b07cce7c542', name: "clear-icon" }, h("bq-icon", { key: 'e081ee013781bed15d22d1d3c999314eb1fc76af', "aria-hidden": "true", class: "flex", name: "x-circle" })))), h("span", { key: 'd6ee0750683f57c4843b66c0f57fa4f8fe593233', class: { 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }, part: "suffix", ref: (spanElem) => {
620
+ h("bq-button", { key: '1bae439a9b9f3ba28393cf3c7a6fa7dde1bfdd4d', appearance: "text", border: "s", class: "bq-select__control--clear ms-[--bq-select--gap] hidden [&::part(button)]:border-none [&::part(button)]:p-0", exportparts: "button", label: this.clearButtonLabel, onBqClick: this.handleClearClick, onlyIcon: true, part: "clear-btn", size: "small", tabIndex: -1 }, h("slot", { key: '52147b8bbb070b92acfe631114e6c074ed04b3c1', name: "clear-icon" }, h("bq-icon", { key: 'fc1f97a1f710654113431fd816229e4421f04f72', "aria-hidden": "true", class: "flex", name: "x-circle" })))), h("span", { key: 'd6499acc2ff3c1d977d9048c62e961e90a894164', class: { 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }, part: "suffix", ref: (spanElem) => {
594
621
  this.suffixElem = spanElem;
595
- } }, h("slot", { key: '60bbf927836994e487ec5615ac37b46309a7f0d2', name: "suffix", onSlotchange: this.handleSlotChange }, h("bq-icon", { key: 'f92b77a0d9833e0ad31d7a9adbd8b0ce76f069b7', class: "flex", name: "caret-down" })))), h("bq-option-list", { key: '0b4fa059ac5d9a296358bffb05cd61a08bbb41f6', "aria-expanded": this.open ? 'true' : 'false', exportparts: "base:option-list", id: `bq-options-${this.name}`, onBqSelect: this.handleSelect, role: "listbox" }, h("slot", { key: '9a42fd00864ff85ea0b9298b60d0f4cbdb9be43e' }))), h("div", { key: 'f09628183dc0f4e35caae1551d3de266a96ccc64', class: {
622
+ } }, h("slot", { key: 'b8da8cd1692533d5cb89507849b7b8ef11086287', name: "suffix", onSlotchange: this.handleSlotChange }, h("bq-icon", { key: '14e08948bbcac9b5ce4657fb900737c255e83415', class: "flex", name: "caret-down" })))), h("bq-option-list", { key: 'c8636fcfd3537b92bfa0ae4c2afff3da2207ac49', "aria-expanded": this.open ? 'true' : 'false', exportparts: "base:option-list", id: `bq-options-${this.name}`, onBqSelect: this.handleSelect, role: "listbox" }, h("slot", { key: 'fb79a3d78b80e1e46fbd686262f5b5ac32f14e69' }))), h("div", { key: 'c5a85030b5239bfef0997a893472bbe713d2a434', class: {
596
623
  [`bq-select__helper-text validation-${this.validationStatus}`]: true,
597
624
  '!hidden': !this.hasHelperText,
598
625
  }, part: "helper-text", ref: (divElem) => {
599
626
  this.helperTextElem = divElem;
600
- } }, h("slot", { key: '0ab5418216b6b41c64b7019a6ff4f6ab8bc751c4', name: "helper-text", onSlotchange: this.handleSlotChange }))));
627
+ } }, h("slot", { key: '7e779ebbb1ac575e253003e26d54c9eb402357fb', name: "helper-text", onSlotchange: this.handleSlotChange }))));
601
628
  }
602
629
  static get is() { return "bq-select"; }
603
630
  static get encapsulation() { return "shadow"; }
@@ -773,6 +800,25 @@ export class BqSelect {
773
800
  "reflect": true,
774
801
  "attribute": "form"
775
802
  },
803
+ "formValidationMessage": {
804
+ "type": "string",
805
+ "mutable": true,
806
+ "complexType": {
807
+ "original": "string",
808
+ "resolved": "string",
809
+ "references": {}
810
+ },
811
+ "required": false,
812
+ "optional": true,
813
+ "docs": {
814
+ "tags": [],
815
+ "text": "The native form validation message (mandatory if `required` is set)"
816
+ },
817
+ "getter": false,
818
+ "setter": false,
819
+ "reflect": false,
820
+ "attribute": "form-validation-message"
821
+ },
776
822
  "keepOpenOnSelect": {
777
823
  "type": "boolean",
778
824
  "mutable": false,
@@ -1074,7 +1120,7 @@ export class BqSelect {
1074
1120
  "references": {
1075
1121
  "TSelectValue": {
1076
1122
  "location": "local",
1077
- "path": "/Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System/packages/beeq/src/components/select/bq-select.tsx",
1123
+ "path": "/home/runner/work/BEEQ/BEEQ/packages/beeq/src/components/select/bq-select.tsx",
1078
1124
  "id": "../../packages/beeq/src/components/select/bq-select.tsx::TSelectValue"
1079
1125
  }
1080
1126
  }
@@ -1241,7 +1287,7 @@ export class BqSelect {
1241
1287
  },
1242
1288
  "TSelectValue": {
1243
1289
  "location": "local",
1244
- "path": "/Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System/packages/beeq/src/components/select/bq-select.tsx",
1290
+ "path": "/home/runner/work/BEEQ/BEEQ/packages/beeq/src/components/select/bq-select.tsx",
1245
1291
  "id": "../../packages/beeq/src/components/select/bq-select.tsx::TSelectValue"
1246
1292
  }
1247
1293
  },
@@ -1268,6 +1314,9 @@ export class BqSelect {
1268
1314
  return [{
1269
1315
  "propName": "value",
1270
1316
  "methodName": "handleValueChange"
1317
+ }, {
1318
+ "propName": "required",
1319
+ "methodName": "handleRequiredPropChange"
1271
1320
  }];
1272
1321
  }
1273
1322
  static get listeners() {