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

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 (468) hide show
  1. package/dist/beeq/beeq.esm.js +1 -1
  2. package/dist/beeq/beeq.esm.js.map +1 -1
  3. package/dist/beeq/bq-accordion-group.entry.esm.js.map +1 -1
  4. package/dist/beeq/bq-alert.entry.esm.js.map +1 -1
  5. package/dist/beeq/bq-avatar.entry.esm.js.map +1 -1
  6. package/dist/beeq/bq-breadcrumb-item.entry.esm.js.map +1 -1
  7. package/dist/beeq/bq-breadcrumb.entry.esm.js.map +1 -1
  8. package/dist/beeq/bq-button.bq-icon.entry.esm.js.map +1 -1
  9. package/dist/beeq/bq-card.entry.esm.js.map +1 -1
  10. package/dist/beeq/bq-checkbox.entry.esm.js.map +1 -1
  11. package/dist/beeq/bq-date-picker.entry.esm.js.map +1 -1
  12. package/dist/beeq/bq-dialog.entry.esm.js.map +1 -1
  13. package/dist/beeq/bq-drawer.entry.esm.js.map +1 -1
  14. package/dist/beeq/bq-dropdown.bq-panel.entry.esm.js.map +1 -1
  15. package/dist/beeq/bq-empty-state.entry.esm.js.map +1 -1
  16. package/dist/beeq/bq-input.entry.esm.js.map +1 -1
  17. package/dist/beeq/bq-notification.entry.esm.js.map +1 -1
  18. package/dist/beeq/bq-option-group.entry.esm.js.map +1 -1
  19. package/dist/beeq/bq-option-list.bq-tag.entry.esm.js.map +1 -1
  20. package/dist/beeq/bq-page-title.entry.esm.js.map +1 -1
  21. package/dist/beeq/bq-progress.entry.esm.js.map +1 -1
  22. package/dist/beeq/bq-select.entry.esm.js.map +1 -1
  23. package/dist/beeq/bq-side-menu-item.entry.esm.js.map +1 -1
  24. package/dist/beeq/bq-spinner.entry.esm.js.map +1 -1
  25. package/dist/beeq/bq-status.entry.esm.js.map +1 -1
  26. package/dist/beeq/bq-steps.entry.esm.js.map +1 -1
  27. package/dist/beeq/bq-switch.entry.esm.js.map +1 -1
  28. package/dist/beeq/bq-tab-group.entry.esm.js.map +1 -1
  29. package/dist/beeq/bq-tab.entry.esm.js.map +1 -1
  30. package/dist/beeq/bq-textarea.entry.esm.js.map +1 -1
  31. package/dist/beeq/bq-toast.entry.esm.js.map +1 -1
  32. package/dist/beeq/{p-8eb8612b.entry.js → p-08b19f97.entry.js} +2 -2
  33. package/dist/beeq/p-08b19f97.entry.js.map +1 -0
  34. package/dist/beeq/{p-ba12d135.entry.js → p-0e481031.entry.js} +2 -2
  35. package/dist/beeq/p-0e481031.entry.js.map +1 -0
  36. package/dist/beeq/{p-6d429afd.entry.js → p-1770fd5b.entry.js} +2 -2
  37. package/dist/beeq/p-1770fd5b.entry.js.map +1 -0
  38. package/dist/beeq/{p-c023718e.entry.js → p-1f8cc15c.entry.js} +2 -2
  39. package/dist/beeq/p-1f8cc15c.entry.js.map +1 -0
  40. package/dist/beeq/{p-1421f4a3.entry.js → p-25e92d0a.entry.js} +2 -2
  41. package/dist/beeq/p-25e92d0a.entry.js.map +1 -0
  42. package/dist/beeq/{p-3dca7a14.entry.js → p-28788a48.entry.js} +2 -2
  43. package/dist/beeq/p-28788a48.entry.js.map +1 -0
  44. package/dist/beeq/{p-fbc38c77.entry.js → p-32a07a71.entry.js} +2 -2
  45. package/dist/beeq/p-32a07a71.entry.js.map +1 -0
  46. package/dist/beeq/{p-3e8980ff.entry.js → p-33899839.entry.js} +2 -2
  47. package/dist/beeq/p-33899839.entry.js.map +1 -0
  48. package/dist/beeq/{p-2f008ed1.entry.js → p-3424586a.entry.js} +2 -2
  49. package/dist/beeq/p-3424586a.entry.js.map +1 -0
  50. package/dist/beeq/{p-0deed5d1.entry.js → p-3b1ef7e6.entry.js} +2 -2
  51. package/dist/beeq/p-3b1ef7e6.entry.js.map +1 -0
  52. package/dist/beeq/p-42515484.entry.js +6 -0
  53. package/dist/beeq/p-42515484.entry.js.map +1 -0
  54. package/dist/beeq/{p-1cd1ae48.entry.js → p-4a726c36.entry.js} +2 -2
  55. package/dist/beeq/p-4a726c36.entry.js.map +1 -0
  56. package/dist/beeq/{p-7063e5c2.entry.js → p-61fe519c.entry.js} +2 -2
  57. package/dist/beeq/p-61fe519c.entry.js.map +1 -0
  58. package/dist/beeq/{p-a9643899.entry.js → p-6eb0f643.entry.js} +2 -2
  59. package/dist/beeq/p-6eb0f643.entry.js.map +1 -0
  60. package/dist/beeq/{p-6852a0b0.entry.js → p-73054d34.entry.js} +2 -2
  61. package/dist/beeq/p-73054d34.entry.js.map +1 -0
  62. package/dist/beeq/{p-9305e1a2.entry.js → p-7bf79e31.entry.js} +2 -2
  63. package/dist/beeq/p-7bf79e31.entry.js.map +1 -0
  64. package/dist/beeq/{p-6a10175b.entry.js → p-7ecff021.entry.js} +2 -2
  65. package/dist/beeq/p-7ecff021.entry.js.map +1 -0
  66. package/dist/beeq/{p-96f6c9ae.entry.js → p-84c96afc.entry.js} +2 -2
  67. package/dist/beeq/p-84c96afc.entry.js.map +1 -0
  68. package/dist/beeq/{p-48811a09.entry.js → p-895454b8.entry.js} +2 -2
  69. package/dist/beeq/p-895454b8.entry.js.map +1 -0
  70. package/dist/beeq/{p-477f032f.entry.js → p-9584ff4f.entry.js} +2 -2
  71. package/dist/beeq/p-9584ff4f.entry.js.map +1 -0
  72. package/dist/beeq/{p-DDw-pDpy.js → p-B2Q_ACEf.js} +3 -3
  73. package/dist/beeq/p-B2Q_ACEf.js.map +1 -0
  74. package/dist/beeq/p-C_mtknb1.js +6 -0
  75. package/dist/beeq/p-C_mtknb1.js.map +1 -0
  76. package/dist/beeq/p-DdvbF5yL.js.map +1 -1
  77. package/dist/beeq/{p-04745600.entry.js → p-a287dd31.entry.js} +2 -2
  78. package/dist/beeq/p-a287dd31.entry.js.map +1 -0
  79. package/dist/beeq/{p-dd896cd8.entry.js → p-acec3250.entry.js} +2 -2
  80. package/dist/beeq/p-acec3250.entry.js.map +1 -0
  81. package/dist/beeq/{p-dc4d2d77.entry.js → p-afecb3f2.entry.js} +2 -2
  82. package/dist/beeq/p-afecb3f2.entry.js.map +1 -0
  83. package/dist/beeq/{p-1c6ef374.entry.js → p-b324e939.entry.js} +2 -2
  84. package/dist/beeq/p-b324e939.entry.js.map +1 -0
  85. package/dist/beeq/{p-f8d5c1ab.entry.js → p-b387860a.entry.js} +2 -2
  86. package/dist/beeq/p-b387860a.entry.js.map +1 -0
  87. package/dist/beeq/{p-78be94d2.entry.js → p-b40aaef2.entry.js} +2 -2
  88. package/dist/beeq/p-b40aaef2.entry.js.map +1 -0
  89. package/dist/beeq/{p-87430ad8.entry.js → p-ba7572f4.entry.js} +2 -2
  90. package/dist/beeq/p-ba7572f4.entry.js.map +1 -0
  91. package/dist/beeq/{p-eb2cfa90.entry.js → p-bcd00932.entry.js} +2 -2
  92. package/dist/beeq/p-bcd00932.entry.js.map +1 -0
  93. package/dist/beeq/p-c737da48.entry.js +6 -0
  94. package/dist/beeq/p-c737da48.entry.js.map +1 -0
  95. package/dist/beeq/{p-b520bdb8.entry.js → p-c7471d26.entry.js} +2 -2
  96. package/dist/beeq/p-c7471d26.entry.js.map +1 -0
  97. package/dist/beeq/{p-b268b017.entry.js → p-dc188227.entry.js} +2 -2
  98. package/dist/beeq/p-dc188227.entry.js.map +1 -0
  99. package/dist/beeq/{p-8280145e.entry.js → p-de332995.entry.js} +2 -2
  100. package/dist/beeq/p-de332995.entry.js.map +1 -0
  101. package/dist/beeq/{p-5ce77af6.entry.js → p-e1450a16.entry.js} +2 -2
  102. package/dist/beeq/p-e1450a16.entry.js.map +1 -0
  103. package/dist/beeq/{p-37a2fb82.entry.js → p-e1ecf09d.entry.js} +2 -2
  104. package/dist/beeq/p-e1ecf09d.entry.js.map +1 -0
  105. package/dist/beeq/{p-e7bd48a0.entry.js → p-e2aec11c.entry.js} +2 -2
  106. package/dist/beeq/p-e2aec11c.entry.js.map +1 -0
  107. package/dist/beeq/{p-d0a16e94.entry.js → p-e5e294ad.entry.js} +2 -2
  108. package/dist/beeq/p-e5e294ad.entry.js.map +1 -0
  109. package/dist/beeq/{p-d1dd36ca.entry.js → p-e97a106c.entry.js} +2 -2
  110. package/dist/beeq/p-e97a106c.entry.js.map +1 -0
  111. package/dist/beeq/{p-f12a127c.entry.js → p-ee9117e4.entry.js} +2 -2
  112. package/dist/beeq/p-ee9117e4.entry.js.map +1 -0
  113. package/dist/beeq/{p-3c7397cf.entry.js → p-f82cff9e.entry.js} +2 -2
  114. package/dist/beeq/p-f82cff9e.entry.js.map +1 -0
  115. package/dist/beeq.html-custom-data.json +67 -67
  116. package/dist/cjs/beeq.cjs.js +2 -4
  117. package/dist/cjs/beeq.cjs.js.map +1 -1
  118. package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -4
  119. package/dist/cjs/bq-accordion-group.entry.cjs.js.map +1 -1
  120. package/dist/cjs/bq-accordion.cjs.entry.js +1 -3
  121. package/dist/cjs/bq-alert.cjs.entry.js +2 -4
  122. package/dist/cjs/bq-alert.entry.cjs.js.map +1 -1
  123. package/dist/cjs/bq-avatar.cjs.entry.js +2 -4
  124. package/dist/cjs/bq-avatar.entry.cjs.js.map +1 -1
  125. package/dist/cjs/bq-badge.cjs.entry.js +1 -3
  126. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +2 -4
  127. package/dist/cjs/bq-breadcrumb-item.entry.cjs.js.map +1 -1
  128. package/dist/cjs/bq-breadcrumb.cjs.entry.js +2 -4
  129. package/dist/cjs/bq-breadcrumb.entry.cjs.js.map +1 -1
  130. package/dist/cjs/bq-button.bq-icon.entry.cjs.js.map +1 -1
  131. package/dist/cjs/bq-button_2.cjs.entry.js +2 -4
  132. package/dist/cjs/bq-card.cjs.entry.js +2 -4
  133. package/dist/cjs/bq-card.entry.cjs.js.map +1 -1
  134. package/dist/cjs/bq-checkbox.cjs.entry.js +2 -4
  135. package/dist/cjs/bq-checkbox.entry.cjs.js.map +1 -1
  136. package/dist/cjs/bq-date-picker.cjs.entry.js +2 -4
  137. package/dist/cjs/bq-date-picker.entry.cjs.js.map +1 -1
  138. package/dist/cjs/bq-dialog.cjs.entry.js +2 -4
  139. package/dist/cjs/bq-dialog.entry.cjs.js.map +1 -1
  140. package/dist/cjs/bq-divider.cjs.entry.js +1 -3
  141. package/dist/cjs/bq-drawer.cjs.entry.js +2 -4
  142. package/dist/cjs/bq-drawer.entry.cjs.js.map +1 -1
  143. package/dist/cjs/bq-dropdown.bq-panel.entry.cjs.js.map +1 -1
  144. package/dist/cjs/bq-dropdown_2.cjs.entry.js +3 -5
  145. package/dist/cjs/bq-empty-state.cjs.entry.js +2 -4
  146. package/dist/cjs/bq-empty-state.entry.cjs.js.map +1 -1
  147. package/dist/cjs/bq-input.cjs.entry.js +2 -4
  148. package/dist/cjs/bq-input.entry.cjs.js.map +1 -1
  149. package/dist/cjs/bq-notification.cjs.entry.js +2 -4
  150. package/dist/cjs/bq-notification.entry.cjs.js.map +1 -1
  151. package/dist/cjs/bq-option-group.cjs.entry.js +2 -4
  152. package/dist/cjs/bq-option-group.entry.cjs.js.map +1 -1
  153. package/dist/cjs/bq-option-list.bq-tag.entry.cjs.js.map +1 -1
  154. package/dist/cjs/bq-option-list_2.cjs.entry.js +3 -5
  155. package/dist/cjs/bq-option.cjs.entry.js +1 -3
  156. package/dist/cjs/bq-page-title.cjs.entry.js +2 -4
  157. package/dist/cjs/bq-page-title.entry.cjs.js.map +1 -1
  158. package/dist/cjs/bq-progress.cjs.entry.js +2 -4
  159. package/dist/cjs/bq-progress.entry.cjs.js.map +1 -1
  160. package/dist/cjs/bq-radio-group.cjs.entry.js +1 -3
  161. package/dist/cjs/bq-radio.cjs.entry.js +1 -3
  162. package/dist/cjs/bq-select.cjs.entry.js +2 -4
  163. package/dist/cjs/bq-select.entry.cjs.js.map +1 -1
  164. package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -4
  165. package/dist/cjs/bq-side-menu-item.entry.cjs.js.map +1 -1
  166. package/dist/cjs/bq-side-menu.cjs.entry.js +1 -3
  167. package/dist/cjs/bq-slider.cjs.entry.js +1 -3
  168. package/dist/cjs/bq-spinner.cjs.entry.js +2 -4
  169. package/dist/cjs/bq-spinner.entry.cjs.js.map +1 -1
  170. package/dist/cjs/bq-status.cjs.entry.js +2 -4
  171. package/dist/cjs/bq-status.entry.cjs.js.map +1 -1
  172. package/dist/cjs/bq-step-item.cjs.entry.js +1 -3
  173. package/dist/cjs/bq-steps.cjs.entry.js +2 -4
  174. package/dist/cjs/bq-steps.entry.cjs.js.map +1 -1
  175. package/dist/cjs/bq-switch.cjs.entry.js +2 -4
  176. package/dist/cjs/bq-switch.entry.cjs.js.map +1 -1
  177. package/dist/cjs/bq-tab-group.cjs.entry.js +2 -4
  178. package/dist/cjs/bq-tab-group.entry.cjs.js.map +1 -1
  179. package/dist/cjs/bq-tab.cjs.entry.js +2 -4
  180. package/dist/cjs/bq-tab.entry.cjs.js.map +1 -1
  181. package/dist/cjs/bq-textarea.cjs.entry.js +2 -4
  182. package/dist/cjs/bq-textarea.entry.cjs.js.map +1 -1
  183. package/dist/cjs/bq-toast.cjs.entry.js +2 -4
  184. package/dist/cjs/bq-toast.entry.cjs.js.map +1 -1
  185. package/dist/cjs/bq-tooltip.cjs.entry.js +2 -4
  186. package/dist/cjs/{index-tFN0ax76.js → index-B6fG32hZ.js} +39 -22
  187. package/dist/cjs/index-B6fG32hZ.js.map +1 -0
  188. package/dist/cjs/{index-CLoLF-_B.js → index-DMgUhnao.js} +25 -20
  189. package/dist/cjs/index-DMgUhnao.js.map +1 -0
  190. package/dist/cjs/index.cjs.js +0 -2
  191. package/dist/cjs/loader.cjs.js +1 -3
  192. package/dist/cjs/transition-C0S-pYqN.js.map +1 -1
  193. package/dist/collection/collection-manifest.json +1 -1
  194. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  195. package/dist/components/bq-accordion-group.js +1 -1
  196. package/dist/components/bq-accordion-group.js.map +1 -1
  197. package/dist/components/bq-accordion.js +1 -1
  198. package/dist/components/bq-accordion.js.map +1 -1
  199. package/dist/components/bq-alert.js +1 -1
  200. package/dist/components/bq-alert.js.map +1 -1
  201. package/dist/components/bq-avatar.js +1 -1
  202. package/dist/components/bq-avatar.js.map +1 -1
  203. package/dist/components/bq-badge.js +1 -1
  204. package/dist/components/bq-breadcrumb-item.js +1 -1
  205. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  206. package/dist/components/bq-breadcrumb.js +1 -1
  207. package/dist/components/bq-breadcrumb.js.map +1 -1
  208. package/dist/components/bq-button.js +1 -1
  209. package/dist/components/bq-card.js +1 -1
  210. package/dist/components/bq-card.js.map +1 -1
  211. package/dist/components/bq-checkbox.js +1 -1
  212. package/dist/components/bq-checkbox.js.map +1 -1
  213. package/dist/components/bq-date-picker.js +1 -1
  214. package/dist/components/bq-date-picker.js.map +1 -1
  215. package/dist/components/bq-dialog.js +1 -1
  216. package/dist/components/bq-dialog.js.map +1 -1
  217. package/dist/components/bq-divider.js +1 -1
  218. package/dist/components/bq-drawer.js +1 -1
  219. package/dist/components/bq-drawer.js.map +1 -1
  220. package/dist/components/bq-dropdown.js +1 -1
  221. package/dist/components/bq-empty-state.js +1 -1
  222. package/dist/components/bq-empty-state.js.map +1 -1
  223. package/dist/components/bq-icon.js +1 -1
  224. package/dist/components/bq-input.js +1 -1
  225. package/dist/components/bq-input.js.map +1 -1
  226. package/dist/components/bq-notification.js +1 -1
  227. package/dist/components/bq-notification.js.map +1 -1
  228. package/dist/components/bq-option-group.js +1 -1
  229. package/dist/components/bq-option-group.js.map +1 -1
  230. package/dist/components/bq-option-list.js +1 -1
  231. package/dist/components/bq-option.js +1 -1
  232. package/dist/components/bq-option.js.map +1 -1
  233. package/dist/components/bq-page-title.js +1 -1
  234. package/dist/components/bq-page-title.js.map +1 -1
  235. package/dist/components/bq-panel.js +1 -1
  236. package/dist/components/bq-progress.js +1 -1
  237. package/dist/components/bq-progress.js.map +1 -1
  238. package/dist/components/bq-radio-group.js +1 -1
  239. package/dist/components/bq-radio-group.js.map +1 -1
  240. package/dist/components/bq-radio.js +1 -1
  241. package/dist/components/bq-radio.js.map +1 -1
  242. package/dist/components/bq-select.js +1 -1
  243. package/dist/components/bq-select.js.map +1 -1
  244. package/dist/components/bq-side-menu-item.js +1 -1
  245. package/dist/components/bq-side-menu-item.js.map +1 -1
  246. package/dist/components/bq-side-menu.js +1 -1
  247. package/dist/components/bq-side-menu.js.map +1 -1
  248. package/dist/components/bq-slider.js +1 -1
  249. package/dist/components/bq-slider.js.map +1 -1
  250. package/dist/components/bq-spinner.js +1 -1
  251. package/dist/components/bq-spinner.js.map +1 -1
  252. package/dist/components/bq-status.js +1 -1
  253. package/dist/components/bq-status.js.map +1 -1
  254. package/dist/components/bq-step-item.js +1 -1
  255. package/dist/components/bq-step-item.js.map +1 -1
  256. package/dist/components/bq-steps.js +1 -1
  257. package/dist/components/bq-steps.js.map +1 -1
  258. package/dist/components/bq-switch.js +1 -1
  259. package/dist/components/bq-switch.js.map +1 -1
  260. package/dist/components/bq-tab-group.js +1 -1
  261. package/dist/components/bq-tab-group.js.map +1 -1
  262. package/dist/components/bq-tab.js +1 -1
  263. package/dist/components/bq-tab.js.map +1 -1
  264. package/dist/components/bq-tag.js +1 -1
  265. package/dist/components/bq-textarea.js +1 -1
  266. package/dist/components/bq-textarea.js.map +1 -1
  267. package/dist/components/bq-toast.js +1 -1
  268. package/dist/components/bq-toast.js.map +1 -1
  269. package/dist/components/bq-tooltip.js +1 -1
  270. package/dist/components/index.js +1 -1
  271. package/dist/components/{p-BIl7Vq5P.js → p--r87nWid.js} +2 -2
  272. package/dist/components/{p-BIl7Vq5P.js.map → p--r87nWid.js.map} +1 -1
  273. package/dist/components/{p-CjS2vgik.js → p-3U5U42sd.js} +2 -2
  274. package/dist/components/{p-CjS2vgik.js.map → p-3U5U42sd.js.map} +1 -1
  275. package/dist/components/{p-k2047NJf.js → p-5stK0dyx.js} +2 -2
  276. package/dist/components/{p-k2047NJf.js.map → p-5stK0dyx.js.map} +1 -1
  277. package/dist/components/{p-5er2o4Mn.js → p-CHy0sCco.js} +2 -2
  278. package/dist/components/{p-5er2o4Mn.js.map → p-CHy0sCco.js.map} +1 -1
  279. package/dist/components/p-C_mtknb1.js +6 -0
  280. package/dist/components/p-C_mtknb1.js.map +1 -0
  281. package/dist/components/{p-Bs3hKCXS.js → p-CeT8gvNG.js} +2 -2
  282. package/dist/components/{p-Bs3hKCXS.js.map → p-CeT8gvNG.js.map} +1 -1
  283. package/dist/components/{p-Bkf_oCvP.js → p-D5Ui9x2e.js} +2 -2
  284. package/dist/components/{p-Bkf_oCvP.js.map → p-D5Ui9x2e.js.map} +1 -1
  285. package/dist/components/{p-DE7kLeHf.js → p-D8zAe4nK.js} +2 -2
  286. package/dist/components/{p-DE7kLeHf.js.map → p-D8zAe4nK.js.map} +1 -1
  287. package/dist/components/{p-C4Jb3i-D.js → p-DX628oDu.js} +2 -2
  288. package/dist/components/{p-C4Jb3i-D.js.map → p-DX628oDu.js.map} +1 -1
  289. package/dist/components/p-DdvbF5yL.js.map +1 -1
  290. package/dist/components/{p-BPVTwD6U.js → p-DwLfHxB7.js} +2 -2
  291. package/dist/components/{p-BPVTwD6U.js.map → p-DwLfHxB7.js.map} +1 -1
  292. package/dist/components/{p-fQPjV9jm.js → p-eLopxgQr.js} +2 -2
  293. package/dist/components/p-eLopxgQr.js.map +1 -0
  294. package/dist/custom-elements.json +1259 -1259
  295. package/dist/esm/beeq.js +3 -5
  296. package/dist/esm/beeq.js.map +1 -1
  297. package/dist/esm/bq-accordion-group.entry.js +2 -4
  298. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  299. package/dist/esm/bq-accordion.entry.js +1 -3
  300. package/dist/esm/bq-alert.entry.js +2 -4
  301. package/dist/esm/bq-alert.entry.js.map +1 -1
  302. package/dist/esm/bq-avatar.entry.js +2 -4
  303. package/dist/esm/bq-avatar.entry.js.map +1 -1
  304. package/dist/esm/bq-badge.entry.js +1 -3
  305. package/dist/esm/bq-breadcrumb-item.entry.js +2 -4
  306. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  307. package/dist/esm/bq-breadcrumb.entry.js +2 -4
  308. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  309. package/dist/esm/bq-button.bq-icon.entry.js.map +1 -1
  310. package/dist/esm/bq-button_2.entry.js +2 -4
  311. package/dist/esm/bq-card.entry.js +2 -4
  312. package/dist/esm/bq-card.entry.js.map +1 -1
  313. package/dist/esm/bq-checkbox.entry.js +2 -4
  314. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  315. package/dist/esm/bq-date-picker.entry.js +2 -4
  316. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  317. package/dist/esm/bq-dialog.entry.js +2 -4
  318. package/dist/esm/bq-dialog.entry.js.map +1 -1
  319. package/dist/esm/bq-divider.entry.js +1 -3
  320. package/dist/esm/bq-drawer.entry.js +2 -4
  321. package/dist/esm/bq-drawer.entry.js.map +1 -1
  322. package/dist/esm/bq-dropdown.bq-panel.entry.js.map +1 -1
  323. package/dist/esm/bq-dropdown_2.entry.js +3 -5
  324. package/dist/esm/bq-empty-state.entry.js +2 -4
  325. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  326. package/dist/esm/bq-input.entry.js +2 -4
  327. package/dist/esm/bq-input.entry.js.map +1 -1
  328. package/dist/esm/bq-notification.entry.js +2 -4
  329. package/dist/esm/bq-notification.entry.js.map +1 -1
  330. package/dist/esm/bq-option-group.entry.js +2 -4
  331. package/dist/esm/bq-option-group.entry.js.map +1 -1
  332. package/dist/esm/bq-option-list.bq-tag.entry.js.map +1 -1
  333. package/dist/esm/bq-option-list_2.entry.js +3 -5
  334. package/dist/esm/bq-option.entry.js +1 -3
  335. package/dist/esm/bq-page-title.entry.js +2 -4
  336. package/dist/esm/bq-page-title.entry.js.map +1 -1
  337. package/dist/esm/bq-progress.entry.js +2 -4
  338. package/dist/esm/bq-progress.entry.js.map +1 -1
  339. package/dist/esm/bq-radio-group.entry.js +1 -3
  340. package/dist/esm/bq-radio.entry.js +1 -3
  341. package/dist/esm/bq-select.entry.js +2 -4
  342. package/dist/esm/bq-select.entry.js.map +1 -1
  343. package/dist/esm/bq-side-menu-item.entry.js +2 -4
  344. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  345. package/dist/esm/bq-side-menu.entry.js +1 -3
  346. package/dist/esm/bq-slider.entry.js +1 -3
  347. package/dist/esm/bq-spinner.entry.js +2 -4
  348. package/dist/esm/bq-spinner.entry.js.map +1 -1
  349. package/dist/esm/bq-status.entry.js +2 -4
  350. package/dist/esm/bq-status.entry.js.map +1 -1
  351. package/dist/esm/bq-step-item.entry.js +1 -3
  352. package/dist/esm/bq-steps.entry.js +2 -4
  353. package/dist/esm/bq-steps.entry.js.map +1 -1
  354. package/dist/esm/bq-switch.entry.js +2 -4
  355. package/dist/esm/bq-switch.entry.js.map +1 -1
  356. package/dist/esm/bq-tab-group.entry.js +2 -4
  357. package/dist/esm/bq-tab-group.entry.js.map +1 -1
  358. package/dist/esm/bq-tab.entry.js +2 -4
  359. package/dist/esm/bq-tab.entry.js.map +1 -1
  360. package/dist/esm/bq-textarea.entry.js +2 -4
  361. package/dist/esm/bq-textarea.entry.js.map +1 -1
  362. package/dist/esm/bq-toast.entry.js +2 -4
  363. package/dist/esm/bq-toast.entry.js.map +1 -1
  364. package/dist/esm/bq-tooltip.entry.js +2 -4
  365. package/dist/esm/{index-DDw-pDpy.js → index-B2Q_ACEf.js} +25 -20
  366. package/dist/esm/index-B2Q_ACEf.js.map +1 -0
  367. package/dist/esm/{index-y49NXy_H.js → index-C_mtknb1.js} +39 -22
  368. package/dist/esm/index-C_mtknb1.js.map +1 -0
  369. package/dist/esm/index.js +0 -2
  370. package/dist/esm/loader.js +2 -4
  371. package/dist/esm/transition-DdvbF5yL.js.map +1 -1
  372. package/dist/hydrate/index.js +53 -28
  373. package/dist/hydrate/index.mjs +53 -28
  374. package/dist/types/stencil-public-runtime.d.ts +23 -0
  375. package/package.json +4 -4
  376. package/dist/beeq/p-04745600.entry.js.map +0 -1
  377. package/dist/beeq/p-0deed5d1.entry.js.map +0 -1
  378. package/dist/beeq/p-1421f4a3.entry.js.map +0 -1
  379. package/dist/beeq/p-1c6ef374.entry.js.map +0 -1
  380. package/dist/beeq/p-1cd1ae48.entry.js.map +0 -1
  381. package/dist/beeq/p-2f008ed1.entry.js.map +0 -1
  382. package/dist/beeq/p-37a2fb82.entry.js.map +0 -1
  383. package/dist/beeq/p-3c7397cf.entry.js.map +0 -1
  384. package/dist/beeq/p-3dca7a14.entry.js.map +0 -1
  385. package/dist/beeq/p-3e8980ff.entry.js.map +0 -1
  386. package/dist/beeq/p-477f032f.entry.js.map +0 -1
  387. package/dist/beeq/p-48811a09.entry.js.map +0 -1
  388. package/dist/beeq/p-540d625a.entry.js +0 -6
  389. package/dist/beeq/p-540d625a.entry.js.map +0 -1
  390. package/dist/beeq/p-5ce77af6.entry.js.map +0 -1
  391. package/dist/beeq/p-60db3689.entry.js +0 -6
  392. package/dist/beeq/p-60db3689.entry.js.map +0 -1
  393. package/dist/beeq/p-6852a0b0.entry.js.map +0 -1
  394. package/dist/beeq/p-6a10175b.entry.js.map +0 -1
  395. package/dist/beeq/p-6d429afd.entry.js.map +0 -1
  396. package/dist/beeq/p-7063e5c2.entry.js.map +0 -1
  397. package/dist/beeq/p-78be94d2.entry.js.map +0 -1
  398. package/dist/beeq/p-8280145e.entry.js.map +0 -1
  399. package/dist/beeq/p-87430ad8.entry.js.map +0 -1
  400. package/dist/beeq/p-8eb8612b.entry.js.map +0 -1
  401. package/dist/beeq/p-9305e1a2.entry.js.map +0 -1
  402. package/dist/beeq/p-96f6c9ae.entry.js.map +0 -1
  403. package/dist/beeq/p-DDw-pDpy.js.map +0 -1
  404. package/dist/beeq/p-a9643899.entry.js.map +0 -1
  405. package/dist/beeq/p-b268b017.entry.js.map +0 -1
  406. package/dist/beeq/p-b520bdb8.entry.js.map +0 -1
  407. package/dist/beeq/p-ba12d135.entry.js.map +0 -1
  408. package/dist/beeq/p-c023718e.entry.js.map +0 -1
  409. package/dist/beeq/p-d0a16e94.entry.js.map +0 -1
  410. package/dist/beeq/p-d1dd36ca.entry.js.map +0 -1
  411. package/dist/beeq/p-dc4d2d77.entry.js.map +0 -1
  412. package/dist/beeq/p-dd896cd8.entry.js.map +0 -1
  413. package/dist/beeq/p-e7bd48a0.entry.js.map +0 -1
  414. package/dist/beeq/p-eb2cfa90.entry.js.map +0 -1
  415. package/dist/beeq/p-f12a127c.entry.js.map +0 -1
  416. package/dist/beeq/p-f8d5c1ab.entry.js.map +0 -1
  417. package/dist/beeq/p-fbc38c77.entry.js.map +0 -1
  418. package/dist/beeq/p-y49NXy_H.js +0 -6
  419. package/dist/beeq/p-y49NXy_H.js.map +0 -1
  420. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +0 -1
  421. package/dist/cjs/bq-accordion.cjs.entry.js.map +0 -1
  422. package/dist/cjs/bq-alert.cjs.entry.js.map +0 -1
  423. package/dist/cjs/bq-avatar.cjs.entry.js.map +0 -1
  424. package/dist/cjs/bq-badge.cjs.entry.js.map +0 -1
  425. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +0 -1
  426. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +0 -1
  427. package/dist/cjs/bq-button_2.cjs.entry.js.map +0 -1
  428. package/dist/cjs/bq-card.cjs.entry.js.map +0 -1
  429. package/dist/cjs/bq-checkbox.cjs.entry.js.map +0 -1
  430. package/dist/cjs/bq-date-picker.cjs.entry.js.map +0 -1
  431. package/dist/cjs/bq-dialog.cjs.entry.js.map +0 -1
  432. package/dist/cjs/bq-divider.cjs.entry.js.map +0 -1
  433. package/dist/cjs/bq-drawer.cjs.entry.js.map +0 -1
  434. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +0 -1
  435. package/dist/cjs/bq-empty-state.cjs.entry.js.map +0 -1
  436. package/dist/cjs/bq-input.cjs.entry.js.map +0 -1
  437. package/dist/cjs/bq-notification.cjs.entry.js.map +0 -1
  438. package/dist/cjs/bq-option-group.cjs.entry.js.map +0 -1
  439. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +0 -1
  440. package/dist/cjs/bq-option.cjs.entry.js.map +0 -1
  441. package/dist/cjs/bq-page-title.cjs.entry.js.map +0 -1
  442. package/dist/cjs/bq-progress.cjs.entry.js.map +0 -1
  443. package/dist/cjs/bq-radio-group.cjs.entry.js.map +0 -1
  444. package/dist/cjs/bq-radio.cjs.entry.js.map +0 -1
  445. package/dist/cjs/bq-select.cjs.entry.js.map +0 -1
  446. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +0 -1
  447. package/dist/cjs/bq-side-menu.cjs.entry.js.map +0 -1
  448. package/dist/cjs/bq-slider.cjs.entry.js.map +0 -1
  449. package/dist/cjs/bq-spinner.cjs.entry.js.map +0 -1
  450. package/dist/cjs/bq-status.cjs.entry.js.map +0 -1
  451. package/dist/cjs/bq-step-item.cjs.entry.js.map +0 -1
  452. package/dist/cjs/bq-steps.cjs.entry.js.map +0 -1
  453. package/dist/cjs/bq-switch.cjs.entry.js.map +0 -1
  454. package/dist/cjs/bq-tab-group.cjs.entry.js.map +0 -1
  455. package/dist/cjs/bq-tab.cjs.entry.js.map +0 -1
  456. package/dist/cjs/bq-textarea.cjs.entry.js.map +0 -1
  457. package/dist/cjs/bq-toast.cjs.entry.js.map +0 -1
  458. package/dist/cjs/bq-tooltip.cjs.entry.js.map +0 -1
  459. package/dist/cjs/index-CLoLF-_B.js.map +0 -1
  460. package/dist/cjs/index-tFN0ax76.js.map +0 -1
  461. package/dist/components/p-fQPjV9jm.js.map +0 -1
  462. package/dist/components/p-y49NXy_H.js +0 -6
  463. package/dist/components/p-y49NXy_H.js.map +0 -1
  464. package/dist/esm/bq-button_2.entry.js.map +0 -1
  465. package/dist/esm/bq-dropdown_2.entry.js.map +0 -1
  466. package/dist/esm/bq-option-list_2.entry.js.map +0 -1
  467. package/dist/esm/index-DDw-pDpy.js.map +0 -1
  468. package/dist/esm/index-y49NXy_H.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["bqOptionListCss","BqOptionList","ariaLabel","bqSelect","componentDidLoad","this","el","setAttribute","onBqSelect","event","target","item","isHTMLElement","isEventTargetChildOfElement","emit","value","render","h","key","class","part","TAG_SIZE","TAG_COLOR","TAG_VARIANT","iconSize","size","xsmall","small","medium","SIZE","textColor","color","typeError","typeGray","typeInfo","typeSuccess","typeWarning","variantOutline","variantFilled","COLORS","bqTagCss","BqTag","prefixElem","hasPrefix","border","clickable","disabled","hidden","removable","selected","variant","checkPropValues","validatePropValue","bqClose","bqOpen","bqBlur","bqClick","bqFocus","componentWillLoad","handleSlotChange","hide","handleHide","show","handleShow","isRemovable","ev","defaultPrevented","handleClick","isClickable","handleBlur","handleFocus","hasSlotContent","hasCustomColor","isHidden","undefined","includes","style","getColorCSSVariable","Host","active","onBlur","onClick","onFocus","tabindex","ref","spanElem","name","onSlotchange","appearance"],"sources":["../../packages/beeq/src/components/option-list/scss/bq-option-list.scss?tag=bq-option-list&encapsulation=shadow","../../packages/beeq/src/components/option-list/bq-option-list.tsx","../../packages/beeq/src/components/tag/bq-tag.types.ts","../../packages/beeq/src/components/tag/helper/index.ts","../../packages/beeq/src/components/tag/scss/bq-tag.scss?tag=bq-tag&encapsulation=shadow","../../packages/beeq/src/components/tag/bq-tag.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Option list styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-option-list.variables';\n\n:host {\n @apply block;\n}\n","import { Component, Element, Event, h, Listen, Prop } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { isEventTargetChildOfElement, isHTMLElement } from '../../shared/utils';\n\n/**\n * The option list component is a container for multiple option elements.\n * It allows to manage the appearance and size of all options at once.\n *\n * @example How to use it\n * ```html\n * <bq-option-list>\n * <bq-option value=\"football\">Football</bq-option>\n * <bq-option value=\"basketball\">Basketball</bq-option>\n * <bq-option value=\"tennis\">Tennis</bq-option>\n * </bq-option-list>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--default\n * @status stable\n *\n * @attr {string} aria-label - Aria label for the list.\n *\n * @slot - The option items\n *\n * @part base - The component's internal wrapper.\n *\n * @cssprop --bq-option-group--gapY-list - Option group gap between items Y axis\n */\n@Component({\n tag: 'bq-option-list',\n styleUrl: './scss/bq-option-list.scss',\n shadow: true,\n})\nexport class BqOptionList {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionListElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n // Prop lifecycle events\n // =======================\n\n /** Aria label for the list. */\n @Prop({ reflect: true }) ariaLabel: string = 'Options';\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when `bq-option` is selected (on click/enter press). */\n @Event() bqSelect: EventEmitter<{ value: string; item: HTMLBqOptionElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.el.setAttribute('role', 'listbox');\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { passive: true })\n @Listen('bqEnter', { passive: true })\n onBqSelect(event: CustomEvent<HTMLElement>) {\n const { target: item } = event;\n if (!isHTMLElement(item, 'bq-option') || !isEventTargetChildOfElement(event, this.el)) return;\n\n this.bqSelect.emit({ item, value: item.value });\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-option__list flex flex-col gap-y-[--bq-option-group--gapY-list]\" part=\"base\">\n <slot />\n </div>\n );\n }\n}\n","export const TAG_SIZE = ['xsmall', 'small', 'medium'] as const;\nexport type TTagSize = (typeof TAG_SIZE)[number];\n\nexport const TAG_COLOR = ['error', 'gray', 'info', 'success', 'warning'] as const;\nexport type TTagColor = (typeof TAG_COLOR)[number];\n\nexport const TAG_VARIANT = ['outline', 'filled'] as const;\nexport type TTagVariant = (typeof TAG_VARIANT)[number];\n\nexport const TAG_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TTagBorderRadius = (typeof TAG_BORDER_RADIUS)[number];\n","import { TAG_COLOR, TAG_SIZE, TAG_VARIANT, TTagColor, TTagSize, TTagVariant } from '../bq-tag.types';\n\n/**\n * Function to determine the icon size based on the provided tag size.\n *\n * @param {TTagSize} size - The size of the tag.\n * @returns {number} The corresponding icon size. If the provided size does not match any predefined sizes, the function returns the size for 'medium'.\n */\nexport const iconSize = (size: TTagSize): number => {\n const xsmall = TAG_SIZE[0];\n const small = TAG_SIZE[1];\n const medium = TAG_SIZE[2];\n\n const SIZE = {\n [xsmall]: 16,\n [small]: 20,\n [medium]: 24,\n };\n\n return SIZE[size] || SIZE[medium];\n};\n\n/**\n * Function to determine the tag text color scheme for a given tag type.\n *\n * @param {TTagType} color - The color of the tag.\n * @returns {Object} An object containing the color scheme for the given tag type. If the provided type does not match any predefined types, the function returns the color scheme for 'default'.\n */\nexport const textColor = (color: TTagColor): Partial<{ [K in TTagVariant]: string }> => {\n const typeError = TAG_COLOR[0];\n const typeGray = TAG_COLOR[1];\n const typeInfo = TAG_COLOR[2];\n const typeSuccess = TAG_COLOR[3];\n const typeWarning = TAG_COLOR[4];\n\n const variantOutline = TAG_VARIANT[0];\n const variantFilled = TAG_VARIANT[1];\n\n const COLORS = {\n [typeError]: {\n [variantOutline]: 'text--danger',\n [variantFilled]: 'text--alt',\n },\n [typeGray]: {\n [variantOutline]: 'text--primary',\n [variantFilled]: 'text--alt',\n },\n [typeInfo]: {\n [variantOutline]: 'text--brand',\n [variantFilled]: 'text--alt',\n },\n [typeSuccess]: {\n [variantOutline]: 'text--success',\n [variantFilled]: 'text--alt',\n },\n [typeWarning]: {\n [variantOutline]: 'text--warning',\n [variantFilled]: 'text--alt',\n },\n };\n\n return COLORS[color];\n};\n","/* -------------------------------------------------------------------------- */\n/* Tag styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-tag.variables';\n\n:host {\n @apply relative inline-block;\n}\n\n:host([removable][hidden]) {\n @apply hidden;\n}\n\n.bq-tag {\n @apply box-border inline-flex select-none flex-row items-center justify-center bg-[--bq-tag--background-color];\n @apply gap-[--bq-tag--medium-gap] font-medium leading-regular text-primary p-b-[--bq-tag--medium-padding-y] p-i-[--bq-tag--medium-padding-x];\n @apply rounded-[--bq-tag--border-radius] border-[length:--bq-tag--border-width] border-[color:--bq-tag--border-color];\n @apply transition-colors duration-300 ease-in-out;\n\n border-style: var(--bq-tag--border-style);\n}\n\n/* ---------------------------------- Size ---------------------------------- */\n\n.bq-tag__xsmall,\n.bq-tag__small {\n @apply gap-[--bq-tag--small-gap] p-b-[--bq-tag--small-padding-y] p-i-[--bq-tag--small-padding-x];\n\n /* Apply predefined border radius only if the border property have NO VALUE */\n &:not(.has-border) {\n @apply rounded-[--bq-tag--small-border-radius];\n }\n}\n\n/* --------------------------------- Action --------------------------------- */\n\n.bq-tag__default.is-clickable {\n @apply cursor-pointer;\n // Focus\n @apply focus-visible:focus;\n // Hover\n @apply hover:enabled:bg-[color-mix(in_srgb,_var(--bq-tag--background-color),_var(--bq-hover)_20%)];\n // Active/Selected\n @apply [&.active]:text-alt [&.active]:[--bq-tag--background-color:--bq-ui--brand];\n // Disabled\n @apply disabled:cursor-not-allowed disabled:border-none disabled:opacity-60;\n}\n\n/* ------------------------------ Color styles ------------------------------ */\n\n.bq-tag__error {\n &.bq-tag__filled {\n @apply bg-ui-danger text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-danger-alt text-danger [--bq-tag--border-color:--bq-stroke--danger];\n }\n}\n\n.bq-tag__gray {\n &.bq-tag__filled {\n @apply bg-ui-tertiary text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-primary text-primary [--bq-tag--border-color:--bq-stroke--tertiary];\n }\n}\n\n.bq-tag__info {\n &.bq-tag__filled {\n @apply bg-ui-brand text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-brand-alt text-brand [--bq-tag--border-color:--bq-stroke--brand];\n }\n}\n\n.bq-tag__success {\n &.bq-tag__filled {\n @apply bg-ui-success text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-success-alt text-success [--bq-tag--border-color:--bq-tag--border-success];\n }\n}\n\n.bq-tag__warning {\n &.bq-tag__filled {\n @apply bg-ui-warning text-alt;\n }\n\n &.bq-tag__outline {\n @apply border-warning bg-ui-warning-alt text-warning;\n }\n}\n\n/* ------------------------------ Close button ------------------------------ */\n\n.bq-tag__close::part(button) {\n @apply pointer-events-none border-0 bs-fit p-b-0 p-i-0;\n}\n\n/* --------------- Apply the right size to the bq-icon prefix --------------- */\n\n.bq-tag__prefix ::slotted(bq-icon) {\n --bq-icon--size: var(--bq-tag--icon-prefix-size) !important;\n}\n","import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { TAG_COLOR, TAG_SIZE, TAG_VARIANT } from './bq-tag.types';\nimport type { TTagBorderRadius, TTagColor, TTagSize, TTagVariant } from './bq-tag.types';\nimport { iconSize, textColor } from './helper';\nimport { getColorCSSVariable, hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * The Tag Component is a UI element used to label and categorize content within an application.\n * Tags are commonly used to label items with keywords or categories, making it easier to find and organize content.\n *\n * @example How to use it\n * ```html\n * <bq-tag color=\"success\" size=\"medium\" variant=\"filled\">Success</bq-tag>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/42f8c9-tag\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {string} border - The corner radius of the Tag (will override size's predefined border)\n * @attr {boolean} clickable - If `true`, the Tag can be clickable\n * @attr {\"error\" | \"gray\" | \"info\" | \"success\" | \"warning\"} color - The color style of the Tag\n * @attr {boolean} disabled - If `true`, the Tag will be disabled (only if clickable = `true`, no interaction allowed)\n * @attr {boolean} hidden - If `true`, the Tag component will hidden (only if removable = `true`)\n * @attr {boolean} removable - If `true`, the Tag component can be removed\n * @attr {boolean} selected - If `true`, the Tag is selected (only if clickable = `true`)\n * @attr {\"xsmall\" | \"small\" | \"medium\"} size - The size of the Tag component\n * @attr {\"outline\" | \"filled\"} variant - The variant of Tag to apply on top of the variant\n *\n * @method hide - Method to be called to remove the tag component\n * @method show - Method to be called to show the tag component\n *\n * @event bqClose - Callback handler to be called when the tag is close/hidden\n * @event bqOpen - Callback handler to be called when the tag is not open/shown\n * @event bqBlur - Handler to be called when tag loses focus\n * @event bqClick - Handler to be called when tag is clicked\n * @event bqFocus - Handler to be called when tag is focused\n *\n * @slot prefix - The prefix slot to add an icon or any other content before the text\n * @slot - The text content of the tag\n *\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM.\n * @part prefix - The `<span>` tag element that acts as prefix container (when icon exists in front of tag).\n * @part text - The `<div>` element containing the text of the tag component.\n * @part btn-close - The close button element to remove the tag component.\n *\n * @cssprop --bq-tag--background-color - Tag background color\n * @cssprop --bq-tag--border-color - Tag border color\n * @cssprop --bq-tag--border-radius - Tag border radius\n * @cssprop --bq-tag--border-style - Tag border style\n * @cssprop --bq-tag--border-width - Tag border width\n * @cssprop --bq-tag--small-border-radius - Tag small border radius\n * @cssprop --bq-tag--small-gap - Tag small gap between content\n * @cssprop --bq-tag--small-padding-x - Tag small padding horizontal\n * @cssprop --bq-tag--small-padding-y - Tag small padding vertical\n * @cssprop --bq-tag--medium-gap - Tag medium gap between content\n * @cssprop --bq-tag--medium-padding-x - Tag medium padding horizontal\n * @cssprop --bq-tag--medium-padding-y - Tag medium padding vertical\n */\n@Component({\n tag: 'bq-tag',\n styleUrl: './scss/bq-tag.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqTag {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqTagElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n\n // Public Property API\n // ========================\n\n /** The corner radius of the Tag (will override size's predefined border) */\n @Prop({ reflect: true }) border: TTagBorderRadius;\n\n /** If true, the Tag can be clickable */\n @Prop({ reflect: true }) clickable: boolean = false;\n\n /** The color style of the Tag */\n @Prop({ reflect: true }) color: TTagColor;\n\n /** If true, the Tag will be disabled (only if clickable = `true`, no interaction allowed) */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** If true, the Tag component will hidden (only if removable = `true`) */\n @Prop({ reflect: true, mutable: true }) hidden: boolean;\n\n /** If true, the Tag component can be removed */\n @Prop({ reflect: true }) removable: boolean = false;\n\n /** If true, the Tag is selected (only if clickable = `true`) */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /** The size of the Tag component */\n @Prop({ reflect: true }) size: TTagSize = 'medium';\n\n /** The variant of Tag to apply on top of the variant */\n @Prop({ reflect: true }) variant: TTagVariant = 'filled';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(TAG_SIZE, 'medium', this.el, 'size');\n validatePropValue(TAG_VARIANT, 'filled', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the tag is close/hidden */\n @Event() bqClose: EventEmitter;\n\n /** Callback handler to be called when the tag is not open/shown */\n @Event() bqOpen: EventEmitter;\n\n /** Handler to be called when tag loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqTagElement>;\n\n /** Handler to be called when tag is clicked */\n @Event() bqClick: EventEmitter<HTMLBqTagElement>;\n\n /** Handler to be called when tag is focused */\n @Event() bqFocus: EventEmitter<HTMLBqTagElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to remove the tag component */\n @Method()\n async hide(): Promise<void> {\n this.handleHide();\n }\n\n /** Method to be called to show the tag component */\n @Method()\n async show(): Promise<void> {\n this.handleShow();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = () => {\n if (!this.isRemovable) return;\n\n const ev = this.bqClose.emit(this.el);\n if (!ev.defaultPrevented) {\n this.hidden = true;\n }\n };\n\n private handleShow = () => {\n if (!this.isRemovable) return;\n\n const ev = this.bqOpen.emit(this.el);\n if (!ev.defaultPrevented) {\n this.hidden = false;\n }\n };\n\n private handleClick = () => {\n // If the tag is not clickable or the tag is disabled, we don't want to handle the click\n if (!this.isClickable || this.disabled) return;\n\n // Emit a click event on the element\n const ev = this.bqClick.emit(this.el);\n // If the event was not prevented, toggle the clickable state\n if (!ev.defaultPrevented) {\n this.selected = !this.selected;\n }\n };\n\n private handleBlur = () => {\n if (!this.isClickable) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (!this.isClickable) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n };\n\n private get isClickable(): boolean {\n return this.clickable && !this.color && !this.hasCustomColor && !this.removable;\n }\n\n private get isRemovable(): boolean {\n return this.removable && !this.isClickable;\n }\n\n private get isHidden(): boolean {\n return this.isRemovable && this.hidden;\n }\n\n private get hasCustomColor(): boolean {\n return this.color !== undefined ? !TAG_COLOR.includes(this.color) : false;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n '--bq-tag--icon-prefix-size': `${iconSize(this.size)}px`,\n ...(this.border && { '--bq-tag--border-radius': `var(--bq-radius--${this.border})` }),\n ...(this.color && { '--bq-tag--background-color': getColorCSSVariable(this.color) ?? this.color }),\n ...(this.hasCustomColor && { '--bq-text--primary': `var(--bq-text--alt)` }),\n };\n\n return (\n <Host style={style} aria-hidden={this.isHidden ? 'true' : 'false'} hidden={this.isHidden ? 'true' : 'false'}>\n <button\n class={{\n [`bq-tag bq-tag__${this.size}`]: true,\n [`bq-tag__${this.color || 'default'} bq-tag__${this.variant}`]: !this.hasCustomColor,\n 'is-clickable': this.isClickable,\n 'is-removable': this.removable,\n // Active/Selected state when clickable\n active: this.isClickable && this.selected,\n // Fixed border radius\n 'has-border': !!this.border,\n }}\n disabled={this.disabled}\n onBlur={this.handleBlur}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n tabindex={this.isClickable ? 0 : -1}\n part=\"wrapper\"\n >\n <span\n class={{ 'bq-tag__prefix inline-flex': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <div\n class={{\n 'text-xs': this.size === 'xsmall',\n 'text-s': this.size === 'small',\n 'text-m': this.size === 'medium',\n }}\n part=\"text\"\n >\n <slot />\n </div>\n {this.isRemovable && !this.disabled && (\n <bq-button class=\"bq-tag__close\" appearance=\"text\" size=\"small\" onClick={this.handleHide} part=\"btn-close\">\n <bq-icon\n size={iconSize(this.size)}\n name=\"x-circle\"\n color={this.color && !this.hasCustomColor ? textColor(this.color)[this.variant] : 'text--primary'}\n />\n </bq-button>\n )}\n </button>\n </Host>\n );\n }\n}\n"],"mappings":";;;;4QAAA,MAAMA,EAAkB,80mB,MCkCXC,EAAY,M,kFAoBEC,UAAoB,UAOpCC,SAMT,gBAAAC,GACEC,KAAKC,GAAGC,aAAa,OAAQ,U,CAQ/B,UAAAC,CAAWC,GACT,MAAQC,OAAQC,GAASF,EACzB,IAAKG,EAAcD,EAAM,eAAiBE,EAA4BJ,EAAOJ,KAAKC,IAAK,OAEvFD,KAAKF,SAASW,KAAK,CAAEH,OAAM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AgB3D,KAAKyC,UACzB7B,EAAA,aAAAC,IAAA,2CAAWC,MAAM,gBAAgBqE,WAAW,OAAO/D,KAAK,QAAQwD,QAAS5E,KAAKwD,WAAYzC,KAAK,aAC7FH,EACE,WAAAC,IAAA,2CAAAO,KAAMD,EAASnB,KAAKoB,MACpB6D,KAAK,WACLvD,MAAO1B,KAAK0B,QAAU1B,KAAKmE,eAAiB1C,EAAUzB,KAAK0B,OAAO1B,KAAK6C,SAAW,oB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["bqSideMenuCss","BqSideMenu","menuItemCssSelector","bodyCss","bodyCssExpand","bodyCssCollapse","menuElem","documentBody","appearance","collapse","size","onCollapsePropChange","this","handleCollapse","bqCollapse","emit","bqSelect","componentDidLoad","isClient","document","querySelector","classList","add","disconnectedCallback","cleanDocumentBodyClass","onMenuItemClick","event","target","item","isHTMLElement","menuItems","forEach","menuItem","active","disabled","toggleCollapse","slot","assignedElements","flatten","filter","el","tagName","toLowerCase","length","collapseDocumentBody","expandDocumentBody","remove","render","h","key","class","part","name","ref","navElem","role"],"sources":["../../packages/beeq/src/components/side-menu/scss/bq-side-menu.scss?tag=bq-side-menu&encapsulation=shadow","../../packages/beeq/src/components/side-menu/bq-side-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Side menu styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-side-menu.variables';\n\n:host {\n @apply flex overflow-hidden;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Aside container */\n/* -------------------------------------------------------------------------- */\n\n.bq-side-menu {\n @apply fixed flex h-dynamic-vh grow flex-col bg-[--bq-side-menu--bg-color] is-[--bq-side-menu--width] inset-bs-0 inset-is-0;\n @apply border-0 border-e-s border-solid border-[color:--bq-side-menu--border-color];\n @apply transition-[background-color,width] duration-150;\n @include hide-scrollbar;\n}\n\n.bq-side-menu.is-collapsed {\n @apply is-[--bq-side-menu--width-collapse];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Logo container */\n/* -------------------------------------------------------------------------- */\n\n.bq-side-menu--logo {\n @apply sticky top-0 z-[1] p-xs;\n @apply box-content flex items-center bg-[--bq-side-menu--bg-color] text-[color:--bq-side-menu--brand-color];\n}\n\n/* -------------------------------------------------------------------------- */\n/* APPEARANCE */\n/* -------------------------------------------------------------------------- */\n\n/**\n * The following change the default values of some CSS custom properties\n * to make it complain with the side menu appearance selected\n */\n\n:host([size='small']) {\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--paddingY: theme(space.s);\n }\n}\n\n:host([appearance='brand']) {\n --bq-focus: theme(stroke.alt);\n --bq-side-menu--bg-color: theme(backgroundColor.ui.brand);\n --bq-side-menu--brand-color: theme(stroke.inverse);\n --bq-side-menu--border-color: theme(stroke.brand);\n\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--bg-hover: color-mix(in srgb, var(--bq-ui--brand), var(--bq-hover) 20%);\n\n --bq-side-menu-item--text-default: theme(textColor.alt);\n --bq-side-menu-item--text-hover: theme(textColor.alt);\n }\n\n .bq-side-menu--footer ::slotted([slot='footer']) {\n --bq-ui--secondary: theme(colors.transparent);\n --bq-text--primary: theme(textColor.inverse);\n }\n}\n\n:host([appearance='inverse']) {\n --bq-side-menu--bg-color: theme(backgroundColor.ui.inverse);\n --bq-side-menu--brand-color: theme(stroke.inverse);\n --bq-side-menu--border-color: theme(backgroundColor.ui.inverse);\n\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--bg-hover: color-mix(in srgb, var(--bq-ui--inverse), var(--bq-hover) 20%);\n --bq-side-menu-item--bg-active: color-mix(in srgb, var(--bq-ui--alt), var(--bq-active) 20%);\n\n --bq-side-menu-item--text-default: theme(textColor.inverse);\n --bq-side-menu-item--text-hover: theme(textColor.inverse);\n --bq-side-menu-item--text-active: theme(textColor.primary);\n }\n\n .bq-side-menu--footer ::slotted([slot='footer']) {\n --bq-ui--secondary: theme(colors.transparent);\n --bq-text--primary: theme(textColor.inverse);\n }\n}\n","import { Component, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TSideMenuAppearance, TSideMenuSize } from './bq-side-menu.types';\nimport { isClient, isHTMLElement } from '../../shared/utils';\n\n/**\n *The default side menu serves as a versatile container for organizing and displaying navigation elements,\n * with default side menu items providing a clean and straightforward way to represent individual menu options.\n * Together, they form the foundation for building structured and intuitive side menu layouts.\n *\n * @example How to use it\n * ```html\n * <bq-side-menu>\n * <div slot=\"logo\">\n * <h1>Your Logo</h1>\n * </div>\n * <bq-side-menu-item active>\n * <bq-icon name=\"home\" slot=\"prefix\"></bq-icon>\n * Home\n * </bq-side-menu-item>\n * <bq-side-menu-item>\n * <bq-icon name=\"settings\" slot=\"prefix\"></bq-icon>\n * Settings\n * </bq-side-menu-item>\n * <bq-side-menu-item disabled>\n * <bq-icon name=\"help\" slot=\"prefix\"></bq-icon>\n * Help\n * </bq-side-menu-item>\n * </bq-side-menu>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/99822d-side-menu/b/09d7b1\n * @status stable\n *\n * @attr {\"brand\" | \"default\" | \"inverse\"} appearance - It sets a predefined appearance of the side menu.\n * @attr {boolean} collapse - If `true`, the container will reduce its width.\n * @attr {\"medium\" | \"small\"} - size - It sets the size of the navigation menu items.\n *\n * @method toggleCollapse - Method to be called to toggle the collapse state of the side menu.\n *\n * @event bqCollapse - Callback handler to be called when the Side menu changes its width from expanded to collapse and vice versa.\n * @event bqSelect - Callback handler to be called when the active/selected menu item changes.\n *\n * @slot logo - The section for displaying the logo or brand in the side menu.\n * @slot The main section that holds all menu items.\n * @slot footer - The section for adding footer content to the side menu.\n *\n * @part base - HTML `<aside>` root container\n * @part footer - HTML `<div>` element that holds the footer\n * @part logo - HTML `<div>` element that holds the logo\n * @part nav - HTML `<nav>` element that holds the navigation items\n *\n * @cssprop --bq-side-menu--bg-color - Side menu background color\n * @cssprop --bq-side-menu--brand-color - Side menu logo color\n * @cssprop --bq-side-menu--border-color - Side menu border color\n */\n@Component({\n tag: 'bq-side-menu',\n styleUrl: './scss/bq-side-menu.scss',\n shadow: true,\n})\nexport class BqSideMenu {\n // Own Properties\n // ====================\n\n private menuItemCssSelector = 'bq-side-menu-item';\n\n private bodyCss = 'bq-body--side-menu';\n private bodyCssExpand = 'bq-body--side-menu__expand';\n private bodyCssCollapse = 'bq-body--side-menu__collapse';\n\n private menuElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private documentBody: HTMLBodyElement;\n\n // Public Property API\n // ========================\n\n /** It sets a predefined appearance of the side menu */\n @Prop({ reflect: true }) appearance: TSideMenuAppearance = 'default';\n\n /** If true, the container will reduce its width */\n @Prop({ reflect: true }) collapse: boolean = false;\n\n /** It sets the size of the navigation menu items */\n @Prop({ reflect: true }) size: TSideMenuSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('collapse')\n onCollapsePropChange() {\n this.handleCollapse();\n this.bqCollapse.emit({ collapse: this.collapse });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the Side menu changes its width from expanded to collapse and vice versa */\n @Event() bqCollapse: EventEmitter<{ collapse: boolean }>;\n\n /** Callback handler to be called when the active/selected menu item changes */\n @Event() bqSelect: EventEmitter<HTMLBqSideMenuItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n if (!isClient()) return;\n\n this.documentBody = document.querySelector('body');\n this.documentBody.classList.add(this.bodyCss);\n this.handleCollapse();\n }\n\n disconnectedCallback() {\n this.cleanDocumentBodyClass();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { passive: true })\n onMenuItemClick(event: Event) {\n const { target: item } = event;\n if (!isHTMLElement(item, 'bq-side-menu-item')) return;\n\n this.menuItems.forEach(\n (menuItem: HTMLBqSideMenuItemElement) => (menuItem.active = !menuItem.disabled && menuItem === item),\n );\n this.bqSelect.emit(item);\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Toggle the collapse state of the side menu */\n @Method()\n async toggleCollapse() {\n this.collapse = !this.collapse;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get menuItems() {\n if (!this.menuElem) return [];\n\n const slot = this.menuElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === this.menuItemCssSelector,\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private handleCollapse = () => {\n if (!this.menuItems.length) return;\n\n this.menuItems.forEach((menuItem: HTMLBqSideMenuItemElement) => (menuItem.collapse = this.collapse));\n if (this.collapse) {\n this.collapseDocumentBody();\n } else {\n this.expandDocumentBody();\n }\n };\n\n private collapseDocumentBody = () => {\n if (!this.collapse) return;\n\n this.documentBody.classList.remove(this.bodyCssExpand);\n this.documentBody.classList.add(this.bodyCssCollapse);\n };\n\n private expandDocumentBody = () => {\n if (this.collapse) return;\n\n this.documentBody.classList.remove(this.bodyCssCollapse);\n this.documentBody.classList.add(this.bodyCssExpand);\n };\n\n private cleanDocumentBodyClass = () => {\n this.documentBody.classList.remove(this.bodyCss, this.bodyCssCollapse, this.bodyCssExpand);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <aside class={{ 'bq-side-menu overflow-y-auto': true, 'is-collapsed': this.collapse }} part=\"base\">\n {/* Company logo and name */}\n <div class={{ 'bq-side-menu--logo': true, 'is-collapsed': this.collapse }} part=\"logo\">\n <slot name=\"logo\" />\n </div>\n {/* Navigation content */}\n <nav\n class=\"bq-side-menu--nav flex flex-col gap-y-xs px-xs pt-xs2\"\n ref={(navElem) => (this.menuElem = navElem)}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"menu\"\n part=\"nav\"\n >\n <slot />\n </nav>\n {/* Footer */}\n <div\n class=\"bq-side-menu--footer sticky flex justify-center bg-[var(--bq-side-menu--bg-color)] p-xs inset-be-0 m-bs-[auto]\"\n part=\"footer\"\n >\n <slot name=\"footer\"></slot>\n </div>\n </aside>\n );\n }\n}\n"],"mappings":";;;;0HAAA,MAAMA,EAAgB,squB,MC8DTC,EAAU,M,+FAIbC,oBAAsB,oBAEtBC,QAAU,qBACVC,cAAgB,6BAChBC,gBAAkB,+BAElBC,SASSC,aAMQC,WAAkC,UAGlCC,SAAoB,MAGpBC,KAAsB,SAM/C,oBAAAC,GACEC,KAAKC,iBACLD,KAAKE,WAAWC,KAAK,CAAEN,SAAUG,KAAKH,U,CAQ/BK,WAGAE,SAMT,gBAAAC,GACE,IAAKC,IAAY,OAEjBN,KAAKL,aAAeY,SAASC,cAAc,QAC3CR,KAAKL,aAAac,UAAUC,IAAIV,KAAKT,SACrCS,KAAKC,gB,CAGP,oBAAAU,GACEX,KAAKY,wB,CAOP,eAAAC,CAAgBC,GACd,MAAQC,OAAQC,GAASF,EACzB,IAAKG,EAAcD,EAAM,qBAAsB,OAE/ChB,KAAKkB,UAAUC,SACZC,GAAyCA,EAASC,QAAUD,EAASE,UAAYF,IAAaJ,IAEjGhB,KAAKI,SAASD,KAAKa,E,CAYrB,oBAAMO,GACJvB,KAAKH,UAAYG,KAAKH,Q,CAQxB,aAAYqB,GACV,IAAKlB,KAAKN,SAAU,MAAO,GAE3B,MAAM8B,EAAOxB,KAAKN,SAASc,cAAc,QACzC,MAAO,IAAIgB,EAAKC,iBAAiB,CAAEC,QAAS,QAASC,QAClDC,GAAkCA,EAAGC,QAAQC,gBAAkB9B,KAAKV,qB,CAIjEW,eAAiB,KACvB,IAAKD,KAAKkB,UAAUa,OAAQ,OAE5B/B,KAAKkB,UAAUC,SAASC,GAAyCA,EAASvB,SAAWG,KAAKH,WAC1F,GAAIG,KAAKH,SAAU,CACjBG,KAAKgC,sB,KACA,CACLhC,KAAKiC,oB,GAIDD,qBAAuB,KAC7B,IAAKhC,KAAKH,SAAU,OAEpBG,KAAKL,aAAac,UAAUyB,OAAOlC,KAAKR,eACxCQ,KAAKL,aAAac,UAAUC,IAAIV,KAAKP,gBAAgB,EAG/CwC,mBAAqB,KAC3B,GAAIjC,KAAKH,SAAU,OAEnBG,KAAKL,aAAac,UAAUyB,OAAOlC,KAAKP,iBACxCO,KAAKL,aAAac,UAAUC,IAAIV,KAAKR,cAAc,EAG7CoB,uBAAyB,KAC/BZ,KAAKL,aAAac,UAAUyB,OAAOlC,KAAKT,QAASS,KAAKP,gBAAiBO,KAAKR,cAAc,EAO5F,MAAA2C,GACE,OACEC,EAAO,SAAAC,IAAA,2CAAAC,MAAO,CAAE,+BAAgC,KAAM,eAAgBtC,KAAKH,UAAY0C,KAAK,QAE1FH,EAAA,OAAAC,IAAA,2CAAKC,MAAO,CAAE,qBAAsB,KAAM,eAAgBtC,KAAKH,UAAY0C,KAAK,QAC9EH,EAAA,QAAAC,IAAA,2CAAMG,KAAK,UAGbJ,EAAA,OAAAC,IAAA,2CACEC,MAAM,wDACNG,IAAMC,GAAa1C,KAAKN,SAAWgD,EAEnCC,KAAK,OACLJ,KAAK,OAELH,EAAA,QAAAC,IAAA,8CAGFD,EAAA,OAAAC,IAAA,2CACEC,MAAM,iHACNC,KAAK,UAELH,EAAA,QAAAC,IAAA,2CAAMG,KAAK,Y","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["TOAST_TYPE","TOAST_PLACEMENT","bqToastCss","TOAST_PORTAL_SELECTOR","BqToast","autoDismissDebounce","toastPortal","isClient","document","querySelector","border","type","placement","hideIcon","open","time","checkPropValues","validatePropValue","this","el","classList","remove","add","handleTimeChange","cancel","Math","max","debounce","hide","handleOpenChange","bqHide","bqShow","connectedCallback","Object","assign","createElement","className","componentWillLoad","disconnectedCallback","onNotificationHide","removeChild","tagName","toLowerCase","error","DOMException","show","handleShow","handleHide","toast","parentElement","body","append","appendChild","requestAnimationFrame","ev","emit","defaultPrevented","iconName","typeMap","success","loading","alert","info","render","style","h","Host","key","class","hidden","role","part","name","size","slot","exportparts"],"sources":["../../packages/beeq/src/components/toast/bq-toast.types.ts","../../packages/beeq/src/components/toast/scss/bq-toast.scss?tag=bq-toast&encapsulation=shadow","../../packages/beeq/src/components/toast/bq-toast.tsx"],"sourcesContent":["export const TOAST_TYPE = ['info', 'success', 'alert', 'error', 'loading', 'custom'] as const;\nexport type TToastType = (typeof TOAST_TYPE)[number];\n\nexport const TOAST_PLACEMENT = [\n 'top-center',\n 'top-right',\n 'bottom-right',\n 'bottom-center',\n 'bottom-left',\n 'top-left',\n] as const;\nexport type TToastPlacement = (typeof TOAST_PLACEMENT)[number];\n\nexport const TOAST_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TToastBorderRadius = (typeof TOAST_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Toast styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-toast.variables';\n\n:host {\n @apply inline-block;\n}\n\n:host(.is-hidden) {\n @apply hidden;\n}\n\n.bq-toast {\n @include animation-slide-in;\n @apply flex items-center gap-[--bq-toast--gap] p-b-[--bq-toast--padding-y] p-i-[--bq-toast--padding-x];\n @apply rounded-[--bq-toast--border-radius] bg-[--bq-toast--background] shadow-[shadow:--bq-toast--box-shadow];\n @apply border-[length:--bq-toast--border-width] border-[color:--bq-toast--border-color];\n\n border-style: var(--bq-toast--border-style);\n}\n\n.bq-toast--icon {\n @apply flex;\n\n &.info {\n @apply text-[--bq-toast--icon-color-info];\n }\n\n &.success {\n @apply text-[--bq-toast--icon-color-success];\n }\n\n &.alert {\n @apply text-[--bq-toast--icon-color-alert];\n }\n\n &.error {\n @apply text-[--bq-toast--icon-color-error];\n }\n\n &.loading {\n @include animation-spin;\n @apply text-[--bq-toast--icon-color-loading];\n }\n\n &.custom {\n @apply text-[--bq-toast--icon-color-custom];\n }\n}\n","import { Component, Element, Event, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { TOAST_PLACEMENT, TOAST_TYPE } from './bq-toast.types';\nimport type { TToastBorderRadius, TToastPlacement, TToastType } from './bq-toast.types';\nimport { debounce, isClient, TDebounce, validatePropValue } from '../../shared/utils';\n\nconst TOAST_PORTAL_SELECTOR = 'bq-toast-portal';\n\n/**\n * Toasts are time-based components used to display short messages.\n * Commonly used for errors, confirmations, or progress updates.\n *\n * @example How to use it\n * ```html\n * <bq-toast type=\"info\">\n * This is a message\n * </bq-toast>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/83da51-toast\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"s\" | \"none\" | \"xs2\" | \"xs\" | \"m\" | \"l\" | \"full\"} border - The corder radius of the toast component\n * @attr {\"success\" | \"error\" | \"loading\" | \"alert\" | \"info\"} type - Type of toast\n * @attr {\"top-left\" | \"top-center\" | \"top-right\" | \"bottom-left\" | \"bottom-center\" | \"bottom-right\"} placement - Placement of toast\n * @attr {boolean} hide-icon - If true will hide toast icon\n * @attr {boolean} open - If true, the toast will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the toast will close itself\n *\n * @method show - Method to be called to show the toast component\n * @method hide - Method to be called to hide the toast component\n * @method toast - This method can be used to display toasts in a fixed-position element that allows for stacking multiple toasts vertically\n *\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 content to be displayed in the toast component.\n * @slot icon - The icon to be displayed in the toast component.\n *\n * @part wrapper - The component's internal wrapper inside the shadow DOM.\n * @part icon-info - The `<div>` container that holds the icon component.\n * @part base - The `<div>` container of the internal bq-icon component.\n * @part svg - The `<svg>` element of the internal bq-icon component.\n *\n * @cssprop --bq-toast--background - Toast background color\n * @cssprop --bq-toast--box-shadow - Toast box shadow\n * @cssprop --bq-toast--padding-y - Toast vertical padding\n * @cssprop --bq-toast--padding-x - Toast horizontal padding\n * @cssprop --bq-toast--gap - Toast distance between icon and text\n * @cssprop --bq-toast--border-radius - Toast border radius\n * @cssprop --bq-toast--border-color - Toast border color\n * @cssprop --bq-toast--border-style - Toast border style\n * @cssprop --bq-toast--border-width - Toast border width\n * @cssprop --bq-toast--icon-color-info - Toast icon color when type is 'info'\n * @cssprop --bq-toast--icon-color-success - Toast icon color when type is 'success'\n * @cssprop --bq-toast--icon-color-alert - Toast icon color when type is 'alert'\n * @cssprop --bq-toast--icon-color-error - Toast icon color when type is 'error'\n * @cssprop --bq-toast--icon-color-loading - Toast icon color when type is 'loading'\n * @cssprop --bq-toast--icon-color-custom - Toast icon color when type is 'custom'\n */\n@Component({\n tag: 'bq-toast',\n styleUrl: './scss/bq-toast.scss',\n shadow: true,\n})\nexport class BqToast {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqToastElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private toastPortal = isClient() ? document.querySelector(`.${TOAST_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** The corder radius of the toast component */\n @Prop({ reflect: true }) border: TToastBorderRadius = 's';\n\n /** Type of toast */\n @Prop({ reflect: true, mutable: true }) type: TToastType = 'info';\n\n /** Placement of toast */\n @Prop({ reflect: true, mutable: true }) placement: TToastPlacement = 'bottom-center';\n\n /** If true will hide toast icon */\n @Prop({ reflect: true, mutable: true }) hideIcon = false;\n\n /** If true, the toast will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the toast will close itself */\n @Prop({ reflect: true }) time: number = 3000;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n @Watch('placement')\n checkPropValues() {\n validatePropValue(TOAST_TYPE, 'default', this.el, 'type');\n validatePropValue(TOAST_PLACEMENT, 'bottom-center', this.el, 'placement');\n\n const { toastPortal } = this;\n toastPortal?.classList.remove(...TOAST_PLACEMENT);\n toastPortal?.classList.add(this.placement);\n }\n\n @Watch('time')\n handleTimeChange() {\n this.autoDismissDebounce?.cancel();\n\n this.time = Math.max(0, this.time);\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (this.open) {\n this.autoDismissDebounce?.();\n }\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<HTMLBqToastElement>;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow: EventEmitter<HTMLBqToastElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { toastPortal } = this;\n if (!toastPortal) {\n this.toastPortal = Object.assign(document.createElement('div'), { className: TOAST_PORTAL_SELECTOR });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeChange();\n this.handleOpenChange();\n }\n\n disconnectedCallback() {\n this.autoDismissDebounce?.cancel();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqHide')\n onNotificationHide() {\n try {\n const { toastPortal } = this;\n toastPortal?.removeChild(this.el);\n // Remove the toast portal from the DOM when there are no more toasts\n if (toastPortal?.querySelector(this.el.tagName.toLowerCase()) === null) {\n toastPortal?.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 show the toast component */\n @Method()\n async show(): Promise<void> {\n this.handleShow();\n }\n\n /** Method to be called to hide the toast component */\n @Method()\n async hide(): Promise<void> {\n this.handleHide();\n }\n\n /** This method can be used to display toasts in a fixed-position element that allows for stacking multiple toasts vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { toastPortal } = this;\n if (toastPortal?.parentElement === null) {\n document.body.append(toastPortal);\n }\n\n toastPortal?.appendChild(this.el);\n\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 handleShow = () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n }\n };\n\n private handleHide = () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = false;\n }\n };\n\n private get iconName() {\n const typeMap = {\n success: 'check-circle-bold',\n error: 'x-circle-bold',\n loading: 'spinner-gap-bold',\n alert: 'warning-bold',\n info: 'info-bold',\n };\n\n return typeMap[this.type] || 'info-bold';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-toast--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n style={style}\n class={{ 'is-hidden': !this.open }}\n aria-hidden={!this.open ? 'true' : 'false'}\n hidden={!this.open ? 'true' : 'false'}\n role=\"status\"\n >\n <output class=\"bq-toast\" part=\"wrapper\">\n <div class={{ [`bq-toast--icon ${this.type}`]: true, '!hidden': this.hideIcon }} part=\"icon\">\n <slot name=\"icon\">\n <bq-icon name={this.iconName} size=\"24\" slot=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n <slot />\n </output>\n </Host>\n );\n }\n}\n"],"mappings":";;;;oMAAO,MAAMA,EAAa,CAAC,OAAQ,UAAW,QAAS,QAAS,UAAW,UAGpE,MAAMC,EAAkB,CAC7B,aACA,YACA,eACA,gBACA,cACA,YCTF,MAAMC,EAAa,wqtBCOnB,MAAMC,EAAwB,kB,MA6DjBC,EAAO,M,mFAIVC,oB,wBAWSC,YAAcC,IAAaC,SAASC,cAAc,IAAIN,KAA2B,KAMzEO,OAA6B,IAGdC,KAAmB,OAGnBC,UAA6B,gBAG7BC,SAAW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BnC,KAAK2B,MAAM,G,CASPC,WAAa,KACnB,MAAMQ,EAAKpC,KAAKa,OAAOwB,KAAKrC,KAAKC,IACjC,IAAKmC,EAAGE,iBAAkB,CACxBtC,KAAKJ,KAAO,I,GAIRiC,WAAa,KACnB,MAAMO,EAAKpC,KAAKY,OAAOyB,KAAKrC,KAAKC,IACjC,IAAKmC,EAAGE,iBAAkB,CACxBtC,KAAKJ,KAAO,K,GAIhB,YAAY2C,GACV,MAAMC,EAAU,CACdC,QAAS,oBACThB,MAAO,gBACPiB,QAAS,mBACTC,MAAO,eACPC,KAAM,aAGR,OAAOJ,EAAQxC,KAAKP,OAAS,W,CAO/B,MAAAoD,GACE,MAAMC,EAAQ,IACR9C,KAAKR,QAAU,CAAE,4BAA6B,oBAAoBQ,KAAKR,YAG7E,OACEuD,EAACC,EAAI,CAAAC,IAAA,2CACHH,MAAOA,EACPI,MAAO,CAAE,aAAclD,KAAKJ,MACf,eAACI,KAAKJ,KAAO,OAAS,QACnCuD,QAASnD,KAAKJ,KAAO,OAAS,QAC9BwD,KAAK,UAELL,EAAA,UAAAE,IAAA,2CAAQC,MAAM,WAAWG,KAAK,WAC5BN,EAAK,OAAAE,IAAA,2CAAAC,MAAO,CAAE,CAAC,kBAAkBlD,KAAKP,QAAS,KAAM,UAAWO,KAAKL,UAAY0D,KAAK,QACpFN,EAAM,QAAAE,IAAA,2CAAAK,KAAK,QACTP,EAAA,WAAAE,IAAA,2CAASK,KAAMtD,KAAKuC,SAAUgB,KAAK,KAAKC,KAAK,OAAOC,YAAY,eAGpEV,EAAQ,QAAAE,IAAA,8C","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["bqSelectCss","BqSelect","helperTextElem","inputElem","labelElem","prefixElem","suffixElem","debounceQuery","debounceInput","fallbackInputId","internals","displayValue","hasHelperText","selectedOptions","hasLabel","hasPrefix","hasSuffix","hasValue","autofocus","clearButtonLabel","debounceTime","disableScrollLock","disabled","disableClear","distance","form","keepOpenOnSelect","name","maxTagsVisible","multiple","open","panelHeight","placeholder","placement","readonly","required","sameWidth","skidding","strategy","validationStatus","value","handleValueChange","isNil","this","setFormValue","undefined","syncItemsFromValue","stringToArray","join","String","bqBlur","bqClear","bqFocus","bqSelect","bqInput","connectedCallback","initMultipleValue","componentWillLoad","componentDidLoad","handleSlotChange","Array","isArray","options","filter","item","includes","formAssociatedCallback","role","ariaExpanded","formResetCallback","setValidity","clear","handleOpenChange","ev","composedPath","el","detail","stopOptionFocusBlurPropagation","isHTMLElement","target","stopPropagation","handleScrollEvent","resetOptionsVisibility","emit","reset","isDefined","from","JSON","parse","handleBlur","handleFocus","handleSelect","handleMultipleSelection","focus","selectedOptionsSet","Set","has","delete","add","map","handleSearchFilter","cancel","debounce","forEach","itemLabel","getOptionLabel","toLowerCase","hidden","handleInput","inputEvent","defaultPrevented","handleClearClick","handleTagRemove","hasSlotContent","length","syncSelectedOptionsState","option","updateDisplayLabel","lowerCaseValue","selected","checkedItem","find","innerText","trim","querySelectorAll","displayPlaceholder","displayTags","index","h","key","removable","size","variant","onBqClose","event","onClick","exportparts","part","hasClearIcon","render","labelId","class","id","htmlFor","ref","onSlotchange","slot","spanElem","autoComplete","autoCapitalize","readOnly","spellcheck","type","onBlur","onFocus","onInput","appearance","onBqClick","tabIndex","onBqSelect","divElem"],"sources":["../../packages/beeq/src/components/select/scss/bq-select.scss?tag=bq-select&encapsulation=shadow","../../packages/beeq/src/components/select/bq-select.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Select styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-select.variables';\n\n:host {\n @apply block w-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label and Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__label {\n @apply flex items-center m-be-[--bq-select--label-margin-bottom];\n @apply text-[length:--bq-select--label-text-size] text-[color:--bq-select--label-text-color];\n}\n\n.bq-select__helper-text {\n @apply text-[length:--bq-select--helper-text-size] text-[color:--bq-select--helper-text-color] m-bs-[--bq-select--helper-margin-top];\n}\n\n.bq-select__helper-text.validation-error {\n @apply text-danger;\n}\n\n.bq-select__helper-text.validation-success {\n @apply text-success;\n}\n\n.bq-select__helper-text.validation-warning {\n @apply text-warning;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Select input group control */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__dropdown:has(:focus-within, :focus-visible) {\n // The focus state will be controlled by the dropdown element\n // if any of its children has focus, the dropdown will set the focus state to the .bq-select__control\n .bq-select__control {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-select--border-color-focus);\n\n @apply focus border-[color:--bq-select--border-color-focus];\n }\n}\n\n.bq-select__control {\n @apply flex items-center transition-[border-color,box-shadow] is-full;\n // Border\n @apply rounded-[--bq-select--border-radius] border-[length:--bq-select--border-width] border-[color:--bq-select--border-color];\n // Padding\n @apply pe-[--bq-select--padding-end] ps-[--bq-select--padding-start] p-b-[var(--bq-select--paddingY)];\n // Text\n @apply select-none text-[length:--bq-select--text-size] text-[color:--bq-select--text-color] placeholder:text-[color:--bq-select--text-placeholder-color];\n // Hover\n @apply [&:not(.disabled):not(:focus-within)]:hover:border-hover-brand;\n\n border-style: var(--bq-select--border-style);\n\n // Enable clear button whenever the input group control is hovered or has focus\n &:not(.disabled):hover,\n &:not(.disabled):focus-within {\n .bq-select__control--clear {\n @apply inline-block;\n }\n }\n}\n\n.bq-select__control.disabled {\n @apply cursor-not-allowed opacity-60;\n}\n\n/* ------------------------------- Validation ------------------------------- */\n\n.bq-select__control.validation-error {\n @apply border-danger [&:not(.disabled):not(:focus-within)]:hover:border-hover-danger;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.danger);\n\n @apply border-active-danger;\n }\n}\n\n.bq-select__control.validation-success {\n @apply border-success [&:not(.disabled):not(:focus-within)]:hover:border-hover-success;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.success);\n\n @apply border-active-success;\n }\n}\n\n.bq-select__control.validation-warning {\n @apply border-warning [&:not(.disabled):not(:focus-within)]:hover:border-hover-warning;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.warning);\n\n @apply border-active-warning;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Native HTML Input */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--input {\n @apply flex-auto cursor-inherit select-none appearance-none bg-inherit font-inherit text-[length:inherit] text-inherit;\n @apply m-0 border-none p-0 min-bs-[var(--bq-select--icon-size)] min-is-0 focus:outline-none focus-visible:outline-none;\n\n box-shadow: none;\n font-weight: inherit;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Clear button */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--clear::part(button) {\n // Since the clear button is inside the input group control,\n // we need to reset the focus ring styles\n --bq-ring-width: initial;\n --bq-ring-offset-width: initial;\n --bq-ring-color-focus: initial;\n\n @apply rounded-xs border-none p-0 bs-auto;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Prefix and suffix */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--prefix,\n.bq-select__control--suffix {\n @apply pointer-events-none flex items-center text-[color:var(--bq-select--text-color)];\n}\n\n.bq-select__control--prefix {\n @apply me-[--bq-select--gap];\n}\n\n.bq-select__control--suffix {\n @apply ms-[--bq-select--gap] transition-transform duration-300 ease-in-out;\n}\n\n.bq-select__tags {\n @apply me-xs2 flex flex-1 gap-xs2;\n\n bq-tag,\n ::slotted(bq-tag) {\n @apply inline-flex;\n }\n\n bq-tag::part(text) {\n @apply text-nowrap leading-small;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Slotted and internal icons */\n/* -------------------------------------------------------------------------- */\n\nbq-icon,\n::slotted(bq-icon) {\n --bq-icon--size: var(--bq-select--icon-size) !important;\n}\n","import { AttachInternals, Component, Element, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport {\n debounce,\n hasSlotContent,\n isDefined,\n isHTMLElement,\n isNil,\n stringToArray,\n TDebounce,\n} from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\n\nexport type TSelectValue = string | string[];\n\n/**\n * The select input component lets users choose from a predefined list, commonly used in forms for easy data selection.\n *\n * @example How to use it\n * ```html\n * <bq-select placeholder=\"Placeholder\">\n * <label slot=\"label\">Select label</label>\n * <span slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n *\n * <bq-option value=\"1\">Option 1</bq-option>\n * <bq-option value=\"2\">Option 2</bq-option>\n * <bq-option value=\"3\">Option 3</bq-option>\n * </bq-select>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/41989d-select/b/09d7b1\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n * @dependency bq-option-list\n * @dependency bq-tag\n *\n * @attr {boolean} autofocus - If `true`, the Select input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Select input is disabled and cannot be interacted with.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Select panel and the input element.\n * @attr {string} form - The ID of the form that Select input field belongs to.\n * @attr {boolean} keep-open-on-select - If `true`, the Select panel will remain open after a selection is made.\n * @attr {number} max-tags-visible - The maximum number of tags to display when multiple selection is enabled.\n * @attr {boolean} multiple - If `true`, the Select input will allow multiple selections.\n * @attr {string} name - The Select input name.\n * @attr {boolean} open - If `true`, the Select panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Select panel.\n * @attr {string} placeholder - The Select input placeholder text value.\n * @attr {\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"} placement - Position of the Select panel.\n * @attr {boolean} readonly - If `true`, the Select input cannot be modified.\n * @attr {boolean} required - Indicates whether or not the Select input is required to be filled out before submitting the form.\n * @attr {boolean} same-width - Whether the panel should have the Select same width as the input element.\n * @attr {number} skidding - Represents the skidding between the Select panel and the input element.\n * @attr {\"absolute\" | \"fixed\"} strategy - Defines the strategy to position the Select panel.\n * @attr {\"error\" | \"success\" | \"warning\" | \"none\"} validation-status - The validation status of the Select input.\n * @attr {\"number\" | \"string\" | \"string[]\"} value - The select input value can be used to reset the field to a previous value.\n *\n * @method clear - Method to be called to clear the selected value.\n *\n * @event bqBlur - The callback handler is emitted when the Select input loses focus.\n * @event bqClear - The callback handler is emitted when the selected value has been cleared.\n * @event bqFocus - A callback handler is emitted when the Select input has received focus.\n * @event bqSelect - The callback handler is emitted when the selected value has changed.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot tags - The tags slot container.\n * @slot clear-icon - The clear icon slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input-outline - The input outline wrapper that holds the tags container and the native HTML input used under the hood.\n * @part helper-text - The helper text slot container.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The select panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n * @part tags - The tags container of the BqTags for multiple selection.\n * @part tag - The tag container of the BqTag for multiple selection.\n * @part tag__base - The base wrapper of the BqTag for multiple selection.\n * @part tag__prefix - The prefix slot container of the BqTag for multiple selection.\n * @part tag__text - The text slot container of the BqTag for multiple selection.\n * @part tag__btn-close - The close button of the BqTag for multiple selection.\n * @part option-list - The option list container.\n *\n * @cssprop --bq-select--background-color - Select background color\n * @cssprop --bq-select--border-color - Select border color\n * @cssprop --bq-select--border-color-focus - Select border color on focus\n * @cssprop --bq-select--border-color-disabled - Select border color when disabled\n * @cssprop --bq-select--border-radius - Select border radius\n * @cssprop --bq-select--border-width - Select border width\n * @cssprop --bq-select--border-style - Select border style\n * @cssprop --bq-select--gap - Gap between Select content and prefix/suffix\n * @cssprop --bq-select--helper-margin-top - Helper text margin top\n * @cssprop --bq-select--helper-text-color - Helper text color\n * @cssprop --bq-select--helper-text-size - Helper text size\n * @cssprop --bq-select--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-select--label-margin-bottom - Select label margin bottom\n * @cssprop --bq-select--label-text-color - Select label text color\n * @cssprop --bq-select--label-text-size - Select label text size\n * @cssprop --bq-select--padding-start - Select padding start\n * @cssprop --bq-select--padding-end - Select padding end\n * @cssprop --bq-select--paddingY - Select padding top and bottom\n * @cssprop --bq-select--text-color - Select text color\n * @cssprop --bq-select--text-size - Select text size\n * @cssprop --bq-select--text-placeholder-color - Select placeholder text color\n */\n@Component({\n tag: 'bq-select',\n styleUrl: './scss/bq-select.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSelect {\n // Own Properties\n // ====================\n\n private helperTextElem?: HTMLElement;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private debounceQuery: TDebounce<void>;\n private debounceInput: TDebounce<void>;\n\n private fallbackInputId = 'select';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSelectElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() displayValue?: string;\n @State() hasHelperText = false;\n @State() selectedOptions: HTMLBqOptionElement[] = [];\n\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If true, the Select input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * A value of 0 means no debouncing will occur.\n */\n @Prop({ reflect: true, mutable: true }) debounceTime? = 0;\n\n /** If true, the Select panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /**\n * Indicates whether the Select input is disabled or not.\n * If `true`, the Select is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** If true, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /** Represents the distance (gutter or margin) between the Select panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The ID of the form that the Select input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** If true, the Select panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** The Select input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** The maximum number of tags to display when multiple selection is enabled */\n @Prop({ mutable: true }) maxTagsVisible: number = 2;\n\n /** If true, the Select input will allow multiple selections. */\n @Prop({ reflect: true }) multiple?: boolean = false;\n\n /** If true, the Select panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Select panel. */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** The Select input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Select panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom';\n\n /** If true, the list of options cannot be filtered (searching won't be available) */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the Select input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Whether the panel should have the Select same width as the input element */\n @Prop({ reflect: true }) sameWidth?: boolean = true;\n\n /** Represents the skidding between the Select panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the Select panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value, it can be used to reset the field to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TSelectValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n // Early return for undefined/null values\n if (isNil(this.value)) {\n this.value = this.multiple ? [] : '';\n this.internals.setFormValue(undefined);\n this.syncItemsFromValue();\n return;\n }\n\n // Handle multiple selection mode\n if (this.multiple) {\n this.value = stringToArray(this.value);\n this.internals.setFormValue(this.value.join(','));\n this.syncItemsFromValue();\n\n return;\n }\n\n // Handle single selection mode\n this.value = String(this.value);\n this.internals.setFormValue(this.value);\n this.syncItemsFromValue();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the Select input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the Select input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has changed */\n @Event() bqSelect!: EventEmitter<{ value: string | number | string[]; item: HTMLBqOptionElement }>;\n\n /** Callback handler emitted when the Select input changes its value while typing */\n @Event() bqInput: EventEmitter<{ value: string | number | string[] }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.initMultipleValue();\n }\n\n componentWillLoad() {\n this.initMultipleValue();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n\n if (this.multiple && Array.isArray(this.value)) {\n this.selectedOptions = this.options.filter((item) => this.value.includes(item.value));\n }\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.internals.role = 'combobox';\n this.internals.ariaExpanded = this.open ? 'true' : 'false';\n }\n\n async formResetCallback() {\n if (isNil(this.value)) return;\n\n this.internals.setValidity({});\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n }\n\n @Listen('bqFocus', { capture: true })\n @Listen('bqBlur', { capture: true })\n stopOptionFocusBlurPropagation(ev: CustomEvent) {\n // Stop propagation of focus and blur events coming from the `bq-option` elements\n if (isHTMLElement(ev.target, 'bq-select')) return;\n\n ev.stopPropagation();\n }\n\n @Listen('scroll', { target: 'window', passive: true, capture: true })\n handleScrollEvent() {\n if (!this.open || this.disableScrollLock) return;\n\n // Close the panel when the scroll event is triggered.\n // This is useful for those cases where the floating panel is inside a scrollable container.\n // For example, a select inside a dialog, drawer, etc.\n // ⚠️ Notice that document body scroll lock is handled via the `scrollLock` utility.\n this.open = false;\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n const { multiple, inputElem, bqClear, el } = this;\n\n // Clear value and selected options\n this.value = '';\n this.selectedOptions = [];\n\n // Clear display value and input element if not multiple\n if (!multiple) {\n this.displayValue = '';\n inputElem.value = '';\n }\n\n // Update form value and reset options visibility\n this.resetOptionsVisibility();\n\n // Emit clear event\n bqClear.emit(el);\n }\n\n /**\n * Resets the Select input to a previous value.\n *\n * @param {TSelectValue} value - The value to reset the Select input to.\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async reset(value: TSelectValue): Promise<void> {\n if (isNil(value)) return;\n\n this.value = value;\n this.syncItemsFromValue();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private initMultipleValue = () => {\n if (!this.multiple || !isDefined(this.value)) return;\n\n this.value = Array.isArray(this.value) ? this.value : Array.from(JSON.parse(String(this.value)));\n };\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleSelect = (ev: CustomEvent<{ value: TSelectValue; item: HTMLBqOptionElement }>) => {\n if (this.disabled) return;\n\n if (this.multiple) {\n ev.stopPropagation();\n }\n\n const { value, item } = ev.detail;\n\n if (this.multiple) {\n this.handleMultipleSelection(item);\n // Clear the input value after selecting an item\n this.inputElem.value = '';\n // If multiple selection is enabled, emit the selected items array instead of relying on\n // the option list to emit the value of the selected item\n this.bqSelect.emit({ value: this.value, item });\n } else {\n this.value = value;\n }\n\n this.resetOptionsVisibility();\n this.inputElem.focus();\n };\n\n private handleMultipleSelection = (item: HTMLBqOptionElement) => {\n // Set has O(1) complexity for insertion, deletion, and search operations, compared to an Array's O(n)\n const selectedOptionsSet = new Set(this.selectedOptions);\n\n if (selectedOptionsSet.has(item)) {\n selectedOptionsSet.delete(item);\n } else {\n selectedOptionsSet.add(item);\n }\n\n this.selectedOptions = Array.from(selectedOptionsSet);\n this.value = this.selectedOptions.map((item) => item.value);\n };\n\n private handleSearchFilter = (value: string) => {\n if (this.disabled) return;\n\n this.debounceQuery?.cancel();\n\n if (!isDefined(value)) {\n this.clear();\n } else {\n this.debounceQuery = debounce(() => {\n this.options.forEach((item: HTMLBqOptionElement) => {\n const itemLabel = this.getOptionLabel(item).toLowerCase();\n item.hidden = !itemLabel.includes(value);\n });\n }, this.debounceTime);\n\n this.debounceQuery();\n }\n\n // The panel will close once a selection is made\n // so we need to make sure it's open when the user is typing and the query is not empty\n this.open = true;\n };\n\n private handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n const { value } = ev.target as HTMLInputElement;\n\n this.debounceInput?.cancel();\n\n this.debounceInput = debounce(() => {\n const inputEvent = this.bqInput.emit({ value });\n if (!inputEvent.defaultPrevented) {\n // Continue with search filtering only if the event wasn't prevented\n this.handleSearchFilter(value);\n }\n }, this.debounceTime);\n\n this.debounceInput();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n (async () => {\n await this.clear();\n })();\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleTagRemove = (item: HTMLBqOptionElement) => {\n if (this.disabled) return;\n\n this.handleMultipleSelection(item);\n this.bqSelect.emit({ value: this.value, item });\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private resetOptionsVisibility = () => {\n this.options.forEach((item: HTMLBqOptionElement) => (item.hidden = false));\n };\n\n private syncItemsFromValue = () => {\n const { internals, options, value } = this;\n if (!options.length) return;\n\n // Sync selected state of the BqOption elements\n this.syncSelectedOptionsState();\n\n if (this.multiple) {\n // Sync selected options for multiple selection mode\n this.selectedOptions = options.filter((option) => this.value?.includes(option.value));\n }\n\n // Always update display value and form value\n this.updateDisplayLabel();\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n /**\n * Syncs the selected state of the BqOption elements which value is included in the `value` property.\n * Notice that value can be a string or an array of strings.\n *\n * @private\n * @memberof BqSelect\n */\n private syncSelectedOptionsState = () => {\n const { options, multiple, value } = this;\n const lowerCaseValue = String(value).toLowerCase();\n\n options.forEach((option: HTMLBqOptionElement) => {\n if (multiple && Array.isArray(value)) {\n option.selected = value.includes(option.value);\n } else {\n option.selected = option.value.toLowerCase() === lowerCaseValue;\n }\n });\n };\n\n /**\n * Updates the display value of the input element based on the selected option.\n *\n * @private\n * @memberof BqSelect\n */\n private updateDisplayLabel = () => {\n const { value, options, inputElem } = this;\n\n const checkedItem = options.find((item) => item.value === value);\n const displayValue = checkedItem ? this.getOptionLabel(checkedItem) : '';\n\n this.displayValue = displayValue;\n if (inputElem) {\n inputElem.value = displayValue;\n }\n };\n\n private getOptionLabel = (item: HTMLBqOptionElement) => {\n if (!item) return '';\n return item.innerText.trim() ?? '';\n };\n\n private get options() {\n return Array.from(this.el.querySelectorAll('bq-option'));\n }\n\n private get displayPlaceholder() {\n // Hide the placeholder when multiple selection is enabled and there are selected items\n return this.multiple && this.selectedOptions.length !== 0 ? undefined : this.placeholder;\n }\n\n private get displayTags() {\n return this.selectedOptions.map((item, index) => {\n if (index < this.maxTagsVisible || this.maxTagsVisible < 0) {\n return (\n <bq-tag\n key={item.value}\n removable\n size=\"xsmall\"\n variant=\"filled\"\n onBqClose={(event) => {\n // NOTE: prevents triggering bqClose on parent\n event.stopPropagation();\n this.handleTagRemove(item);\n }}\n // Prevent the tag from closing the panel when clicked\n onClick={(ev: MouseEvent) => ev.stopPropagation()}\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n {this.getOptionLabel(item)}\n </bq-tag>\n );\n } else if (index === this.maxTagsVisible) {\n return (\n <bq-tag\n key=\"more\"\n size=\"xsmall\"\n variant=\"filled\"\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n +{this.selectedOptions.length - index}\n </bq-tag>\n );\n }\n\n return null;\n });\n }\n\n private get hasClearIcon() {\n if (this.disableClear || this.disabled) {\n return false;\n }\n\n if (this.multiple) {\n return this.selectedOptions.length > 0;\n }\n\n return isDefined(this.displayValue);\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-select\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-select__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select dropdown */}\n <bq-dropdown\n class=\"bq-select__dropdown w-full\"\n disableScrollLock={this.disableScrollLock}\n disabled={this.disabled}\n distance={this.distance}\n keepOpenOnSelect={this.keepOpenOnSelect}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-select__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <div class=\"flex flex-1 overflow-x-auto\" part=\"input-outline\">\n {/* Display selected values using BqTags for multiple selection */}\n {this.multiple && (\n <span class=\"bq-select__tags\" part=\"tags\">\n <slot name=\"tags\">{this.displayTags}</slot>\n </span>\n )}\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-select__control--input flex-grow is-full\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`bq-options-${this.name}`}\n aria-expanded={this.open ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.displayPlaceholder}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n role=\"combobox\"\n spellcheck={false}\n type=\"text\"\n value={this.displayValue}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n </div>\n {/* Clear Button */}\n {this.hasClearIcon && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-select__control--clear ms-[--bq-select--gap]\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n tabIndex={-1}\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class={{ 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }}\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"caret-down\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <bq-option-list\n id={`bq-options-${this.name}`}\n onBqSelect={this.handleSelect}\n aria-expanded={this.open ? 'true' : 'false'}\n exportparts=\"base:option-list\"\n role=\"listbox\"\n >\n <slot />\n </bq-option-list>\n </bq-dropdown>\n {/* Helper text */}\n <div\n class={{\n [`bq-select__helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem: HTMLDivElement) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"mappings":";;;;+RAAA,MAAMA,EAAc,mz7B,MCkIPC,EAAQ,M,qVAIXC,eACAC,UACAC,UACAC,WACAC,WAEAC,cACAC,cAEAC,gBAAkB,S,wBAMPC,UAMVC,aACAC,cAAgB,MAChBC,gBAAyC,GAEzCC,SAAW,MACXC,UAAY,MACZC,UAAY,MACZC,SAAW,MAMKC,UAGAC,iBAAoB,cAMLC,aAAgB,EAG/BC,kBAA8B,MAM9BC,SAAqB,MAGrBC,aAAgB,MAGhBC,SA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status","type","checkPropValues","validatePropValue","STEPS_SIZE","this","el","handleIconPrefix","bqClick","bqFocus","bqBlur","connectedCallback","componentWillLoad","componentDidLoad","handleFocus","emit","handleBlur","handleClick","async","isDisabled","isCurrent","clickEvent","defaultPrevented","stepsParent","closest","setCurrentStepItem","iconElem","querySelector","isHTMLElement","render","h","key","class","disabled","onClick","onFocus","onBlur","part","name","onSlotchange"],"sources":["../../packages/beeq/src/components/step-item/bq-step-item.types.ts","../../packages/beeq/src/components/step-item/scss/bq-step-item.scss?tag=bq-step-item&encapsulation=shadow","../../packages/beeq/src/components/step-item/bq-step-item.tsx"],"sourcesContent":["export const STEP_ITEM_STATUS = ['default', 'current', 'completed', 'error', 'disabled'] as const;\nexport type TStepItemStatus = (typeof STEP_ITEM_STATUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Step item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-step-item.variables';\n\n:host {\n --bq-icon--color: theme(stroke.icon.primary);\n // !Note: The use of the `bg-primary` is to avoid the divider to be visible behind the step item.\n @apply bg-primary;\n}\n\n.bq-step-item {\n @apply flex gap-s rounded-m border-none bg-transparent pe-[--bq-steps--gap] ps-0 p-b-xs2 focus-visible:focus hover:bg-hover-ui-secondary;\n @apply transition-colors duration-300;\n}\n\n.bq-step-item__prefix.dot,\n.bq-step-item__prefix.icon {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color);\n }\n\n &.current {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-current);\n }\n }\n\n &.completed {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-completed);\n }\n }\n\n &.error {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-error);\n }\n }\n\n &.disabled {\n ::slotted(bq-icon) {\n opacity: 0.6;\n }\n }\n}\n\n.bq-step-item__prefix.numeric {\n @apply flex items-center justify-center rounded-full;\n @apply bg-[--bq-step-item--prefix-num-bg-color] bs-[--bq-step-item--prefix-num-size] is-[--bq-step-item--prefix-num-size];\n @apply text-m font-semibold leading-regular text-primary;\n\n &.small {\n @apply text-s [--bq-step-item--prefix-num-size:--bq-spacing-l];\n }\n\n // Status\n\n &.current {\n @apply bg-[var(--bq-step-item--prefix-color-current)] text-alt;\n }\n\n &.completed {\n @apply bg-ui-success-alt text-success;\n }\n\n &.error {\n @apply bg-ui-danger-alt text-danger;\n }\n\n &.disabled {\n @apply opacity-60;\n }\n}\n\n.bq-step-item__content--description::slotted(*) {\n @apply text-s leading-regular opacity-60;\n}\n","import { Component, Element, Event, h, Prop, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { STEP_ITEM_STATUS } from './bq-step-item.types';\nimport type { TStepItemStatus } from './bq-step-item.types';\nimport { isHTMLElement, validatePropValue } from '../../shared/utils';\nimport { STEPS_SIZE } from '../steps/bq-steps.types';\nimport type { TStepsSize, TStepsType } from '../steps/bq-steps.types';\n\n/**\n * The Step Item Component is a UI element used to display a single step or stage in a process or task.\n * It should be used inside the Steps component.\n *\n * @example How to use it\n * ```html\n * <bq-step-item status=\"completed\">\n * <bq-icon slot=\"prefix\" name=\"check-circle\"></bq-icon>\n * <span>Title</span>\n * <span slot=\"description\">Description</span>\n * </bq-step-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @attr {\"small\" | \"medium\"} size - It defines prefix size\n * @attr {\"completed\" | \"current\" | \"error\" | \"default\" | \"disabled\"} status - It defines step item appearance based on its status\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - It defines the step item type used\n *\n * @event bqClick - Callback handler emitted when the step item is clicked\n *\n * @slot - The step item content\n * @slot prefix - The step item prefix\n * @slot description - The step item description\n *\n * @part base - The component's base wrapper.\n * @part title - The component's title.\n * @part description - The component's description.\n *\n * @cssprop --bq-step-item--prefix-color - Color of the prefix icon\n * @cssprop --bq-step-item--prefix-color-current - Color of the prefix icon when current\n * @cssprop --bq-step-item--prefix-color-completed - Color of the prefix icon when completed\n * @cssprop --bq-step-item--prefix-color-error - Color of the prefix icon when error\n * @cssprop --bq-step-item--prefix-num-size - Size of the prefix number\n * @cssprop --bq-step-item--prefix-num-bg-color - Background color of the prefix number\n */\n@Component({\n tag: 'bq-step-item',\n styleUrl: './scss/bq-step-item.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqStepItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStepItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines prefix size */\n @Prop({ reflect: true }) size?: TStepsSize = 'medium';\n\n /** It defines step item appearance based on its status */\n @Prop({ reflect: true, mutable: true }) status?: TStepItemStatus = 'default';\n\n /** It defines the step item type used */\n @Prop({ reflect: true }) type?: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('status')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEP_ITEM_STATUS, 'default', this.el, 'status');\n\n this.handleIconPrefix();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler triggered when the step item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqStepItemElement>;\n\n /** Callback handler triggered when the step item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqStepItemElement>;\n\n /** Callback handler triggered when the step item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqStepItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.checkPropValues();\n }\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleIconPrefix();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleClick = async () => {\n if (this.isDisabled || this.isCurrent) return;\n\n const clickEvent = this.bqClick.emit(this.el);\n if (clickEvent.defaultPrevented) return;\n\n const stepsParent = this.el.closest('bq-steps') as HTMLBqStepsElement;\n if (!stepsParent) return;\n\n await stepsParent.setCurrentStepItem(this.el);\n };\n\n private handleIconPrefix = () => {\n const iconElem = this.el.querySelector('[slot=\"prefix\"]');\n if (!iconElem || !isHTMLElement(iconElem, 'bq-icon')) return;\n\n iconElem.size = this.size === 'small' ? 24 : 32;\n };\n\n private get isDisabled(): boolean {\n return this.status === 'disabled';\n }\n\n private get isCurrent(): boolean {\n return this.status === 'current';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <button\n class={{\n 'bq-step-item': true,\n [`bq-step-item--${this.status}`]: true,\n 'pointer-events-none opacity-60': this.isDisabled,\n }}\n disabled={this.isDisabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n type=\"button\"\n part=\"base\"\n >\n <div class={`bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}`}>\n <slot name=\"prefix\" onSlotchange={this.handleIconPrefix} />\n </div>\n <div class=\"bq-step-item__content items-start text-start\">\n {/* TITLE */}\n <div\n class={{\n 'bq-step-item__content--title pe-xs3 text-m leading-regular text-primary': true,\n 'pointer-events-none': this.isDisabled,\n 'text-brand': this.isCurrent,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n {/* DESCRIPTION */}\n <div\n class={{\n 'bq-step-item__content--description text-s leading-regular text-secondary': true,\n 'opacity-60': this.isDisabled,\n }}\n part=\"description\"\n >\n <slot name=\"description\" />\n </div>\n </div>\n </button>\n );\n }\n}\n"],"mappings":";;;;gKAAO,MAAMA,EAAmB,CAAC,UAAW,UAAW,YAAa,QAAS,YCA7E,MAAM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KL,UAC1E8B,EAAM,QAAAC,IAAA,2CAAAO,KAAK,SAASC,aAAclC,KAAKE,oBAEzCuB,EAAK,OAAAC,IAAA,2CAAAC,MAAM,gDAETF,EAAA,OAAAC,IAAA,2CACEC,MAAO,CACL,0EAA2E,KAC3E,sBAAuB3B,KAAKc,WAC5B,aAAcd,KAAKe,WAErBiB,KAAK,SAELP,EAAA,QAAAC,IAAA,8CAGFD,EAAA,OAAAC,IAAA,2CACEC,MAAO,CACL,2EAA4E,KAC5E,aAAc3B,KAAKc,YAErBkB,KAAK,eAELP,EAAM,QAAAC,IAAA,2CAAAO,KAAK,kB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["RADIO_GROUP_ORIENTATION","bqRadioGroupCss","KEY_MAP","ArrowDown","ArrowRight","ArrowUp","ArrowLeft","BqRadioGroup","initialValue","debouncedBqChange","focusedBqRadio","radioElementsSet","Set","cachedRadioElements","internals","checkedRadio","tabIndex","backgroundOnHover","debounceTime","disabled","fieldset","name","orientation","required","requiredValidationMessage","value","handleDebounceTimeChange","MIN_DEBOUNCE_TIME","normalizedDebounceTime","Math","max","this","cancel","debounce","event","bqChange","emit","handleDisabledChange","updateRadioTabIndexes","handleGroupProperties","updateRadioProperties","checkPropValues","validatePropValue","el","handleRequiredChange","updateFormValidity","handleValueChange","newCheckedRadio","find","radio","target","undefined","bqBlur","componentWillLoad","setFormValue","updateCustomStates","disconnectedCallback","formAssociatedCallback","formResetCallback","onBqClick","isEventTargetChildOfElement","detail","requestAnimationFrame","defaultPrevented","updateRadioSelection","onBqKeyDown","direction","key","focusRadioInputSibling","onBqFocus","shouldStopPropagation","isDefined","stopPropagation","onBqBlur","isNil","initializeRadioElements","clear","querySelectorAll","forEach","add","Array","from","length","focusableRadio","checked","vFocus","forceDisabled","currentTarget","currentIndex","indexOf","nextElement","getNextElement","async","states","setValidity","firstRadio","valueMissing","getNativeInput","state","handleSlotChange","render","h","Host","tabindex","class","role","part","id","onSlotchange"],"sources":["../../packages/beeq/src/components/radio-group/bq-radio-group.types.ts","../../packages/beeq/src/components/radio-group/scss/bq-radio-group.scss?tag=bq-radio-group&encapsulation=shadow","../../packages/beeq/src/components/radio-group/bq-radio-group.tsx"],"sourcesContent":["export const RADIO_GROUP_ORIENTATION = ['horizontal', 'vertical'] as const;\nexport type TRadioGroupOrientation = (typeof RADIO_GROUP_ORIENTATION)[number];\n","/* -------------------------------------------------------------------------- */\n/* Radio group styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply inline-block;\n}\n\n.bq-radio-group {\n @apply m-b-0 m-i-0;\n\n &:not(.has-fieldset) {\n @apply border-0 m-b-0 m-i-0 p-b-0 p-i-0;\n }\n\n &--horizontal {\n @apply flex;\n }\n\n &--vertical {\n @apply flex flex-col;\n }\n}\n","import { AttachInternals, Component, Element, Event, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { RADIO_GROUP_ORIENTATION } from './bq-radio-group.types';\nimport type { TRadioGroupOrientation } from './bq-radio-group.types';\nimport {\n debounce,\n getNextElement,\n isDefined,\n isEventTargetChildOfElement,\n isNil,\n TDebounce,\n validatePropValue,\n} from '../../shared/utils';\n\nconst KEY_MAP = {\n ArrowDown: 'forward',\n ArrowRight: 'forward',\n ArrowUp: 'backward',\n ArrowLeft: 'backward',\n} as const;\n\ntype Direction = (typeof KEY_MAP)[keyof typeof KEY_MAP];\n\n/**\n * The radio group is a user interface component that groups radio buttons to enable a single selection within the group.\n *\n * @example How to use it\n * ```html\n * <bq-radio-group fieldset value=\"option1\">\n * <span slot=\"label\">radio group</span>\n * <bq-radio value=\"option1\">Radio option 1</bq-radio>\n * <bq-radio value=\"option2\">Radio option 2</bq-radio>\n * <bq-radio value=\"option3\">Radio option 3</bq-radio>\n * </bq-radio-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/9718e1-radio-button/b/09d7b1\n * @status stable\n *\n * @attr {boolean} background-on-hover - If `true`, the radio displays background on hover\n * @attr {number} debounce-time - A number representing the delay time (in milliseconds) that bqChange event handler gets triggered once the value change\n * @attr {boolean} disabled - If `true` radio inputs are disabled\n * @attr {boolean} fieldset - If `true` displays fieldset\n * @attr {string} name - Name of the HTML input form control. Submitted with the form as part of a name/value pair\n * @attr {\"horizontal\" | \"vertical\"} orientation - The display orientation of the radio inputs\n * @attr {boolean} required - If `true`, the radio group is required\n * @attr {string} required-validation-message - The native form validation message when the radio group is required\n * @attr {string} value - The display orientation of the radio inputs\n *\n * @method vClick - Simulate a click event on the native `<input>` HTML element used under the hood\n * @method vFocus - Sets focus on the native `<input>` HTML element used under the hood\n * @method vBlur - Remove focus from the native `<input>` HTML element used under the hood\n *\n * @event bqChange - Handler to be called when the radio state changes\n *\n * @slot - The bq-radio items to group\n * @slot label - The label content of radio group\n *\n * @part base - The component's internal wrapper of the radio components.\n * @part label - The `<legend>` element that holds the text content.\n * @part group - The `<div>` element that holds the radio inputs.\n */\n@Component({\n tag: 'bq-radio-group',\n styleUrl: './scss/bq-radio-group.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqRadioGroup {\n // Own Properties\n // ====================\n\n private initialValue?: string;\n private debouncedBqChange: TDebounce<{ value: string; target: HTMLBqRadioElement }>;\n private focusedBqRadio: HTMLBqRadioElement | null = null;\n private readonly radioElementsSet = new Set<HTMLBqRadioElement>();\n private cachedRadioElements: HTMLBqRadioElement[] = [];\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqRadioGroupElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() checkedRadio?: HTMLBqRadioElement;\n @State() tabIndex: '0' | '-1' = '0';\n\n // Public Property API\n // ========================\n\n /** If true, all radio inputs in the group will display a background on hover */\n @Prop({ reflect: true }) backgroundOnHover = false;\n\n /** A number representing the delay time (in milliseconds) that `bqChange` event handler gets triggered once the value change */\n @Prop({ reflect: true, mutable: true }) debounceTime = 0;\n\n /** If true radio inputs are disabled */\n @Prop({ reflect: true }) disabled = false;\n\n /** If true displays fieldset */\n @Prop({ reflect: true }) fieldset = false;\n\n /** Name of the HTML input form control. Submitted with the form as part of a name/value pair. */\n @Prop({ reflect: true }) name!: string;\n\n /** The display orientation of the radio inputs */\n @Prop({ reflect: true, mutable: true }) orientation: TRadioGroupOrientation = 'vertical';\n\n /** If true, the radio group is required */\n @Prop({ reflect: true }) required = false;\n\n /** The native form validation message when the radio group is required */\n @Prop({ reflect: true }) requiredValidationMessage?: string;\n\n /** A string representing the value of the radio. */\n @Prop({ reflect: true, mutable: true }) value?: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('debounceTime')\n handleDebounceTimeChange() {\n const MIN_DEBOUNCE_TIME = 0;\n const normalizedDebounceTime = Math.max(MIN_DEBOUNCE_TIME, this.debounceTime);\n\n if (normalizedDebounceTime !== this.debounceTime) {\n this.debounceTime = normalizedDebounceTime;\n }\n\n this.debouncedBqChange?.cancel();\n this.debouncedBqChange = debounce((event: { value: string; target: HTMLBqRadioElement }): void => {\n this.bqChange?.emit(event);\n }, this.debounceTime);\n }\n\n @Watch('disabled')\n handleDisabledChange() {\n this.tabIndex = this.disabled ? '-1' : '0';\n this.updateRadioTabIndexes();\n }\n\n @Watch('backgroundOnHover')\n @Watch('disabled')\n @Watch('name')\n @Watch('required')\n handleGroupProperties() {\n this.updateRadioProperties();\n }\n\n @Watch('orientation')\n checkPropValues() {\n validatePropValue(RADIO_GROUP_ORIENTATION, 'vertical', this.el, 'orientation');\n }\n\n @Watch('required')\n handleRequiredChange() {\n this.updateFormValidity();\n }\n\n @Watch('value')\n handleValueChange() {\n this.updateRadioProperties();\n this.updateFormValidity();\n\n // Find and update the checked radio based on the new value\n const newCheckedRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);\n if (newCheckedRadio) {\n this.checkedRadio = newCheckedRadio;\n this.debouncedBqChange?.({ value: this.value, target: newCheckedRadio });\n } else {\n this.checkedRadio = undefined;\n }\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the radio state changes */\n @Event() bqChange: EventEmitter<{ value: string; target: HTMLBqRadioElement }>;\n\n /** Handler to be called when the radio loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqRadioElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.handleDebounceTimeChange();\n this.internals.setFormValue(this.value ?? null);\n\n this.updateCustomStates();\n this.updateFormValidity();\n }\n\n disconnectedCallback() {\n this.debouncedBqChange?.cancel();\n }\n\n formAssociatedCallback() {\n this.internals.setFormValue(this.value ?? null);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n this.internals.setFormValue(this.value ?? null);\n this.updateFormValidity();\n this.updateCustomStates();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { capture: true })\n async onBqClick(event: CustomEvent<{ value: string; target: HTMLBqRadioElement }>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const { target, value } = event.detail;\n if (value === this.value) return;\n\n requestAnimationFrame(() => {\n if (event.defaultPrevented) return;\n this.updateRadioSelection(target);\n });\n }\n\n @Listen('bqKeyDown')\n onBqKeyDown(event: CustomEvent<{ key: string; target: HTMLBqRadioElement }>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const direction: Direction | undefined = KEY_MAP[event.detail.key];\n if (!direction) return;\n\n this.focusRadioInputSibling(event.detail.target, direction);\n }\n\n @Listen('bqFocus', { capture: true })\n onBqFocus(event: CustomEvent<HTMLBqRadioElement>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const shouldStopPropagation = isDefined(this.focusedBqRadio);\n this.focusedBqRadio = event.detail;\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n }\n\n @Listen('bqBlur', { capture: true })\n onBqBlur(event: CustomEvent<HTMLBqRadioElement>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n // NOTE: if focusedBqRadio is nil that means the event occured from this component\n if (isNil(this.focusedBqRadio)) return;\n\n event.stopPropagation();\n\n requestAnimationFrame(() => {\n if (this.focusedBqRadio !== event.detail) return;\n\n this.focusedBqRadio = null;\n this.bqBlur.emit(event.detail);\n });\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n /**\n * Initializes the radio elements set by querying the host element for `ds-radio` elements.\n * This is done to avoid re-querying the host element for radio elements on every change.\n */\n private initializeRadioElements = (): void => {\n this.radioElementsSet.clear();\n this.el.querySelectorAll('bq-radio').forEach((radio) => this.radioElementsSet.add(radio));\n // Caching the radio elements in an array for faster access and iteration\n this.cachedRadioElements = Array.from(this.radioElementsSet);\n // Set the tabIndex of the host element to -1 if there are no radio elements or the group is disabled, otherwise set it to 0\n this.tabIndex = this.cachedRadioElements.length === 0 || this.disabled ? '-1' : '0';\n // Set initial tabIndex for all radios\n this.updateRadioTabIndexes();\n };\n\n /**\n * Sets tabIndex for all radio elements based on current state\n * Handles all scenarios: disabled state, checked radio, value matching, fallback to first\n */\n private updateRadioTabIndexes = (): void => {\n if (this.cachedRadioElements.length === 0) return;\n\n // If disabled, all radios get tabIndex -1\n if (this.disabled) {\n this.cachedRadioElements.forEach((radio) => (radio.tabIndex = -1));\n return;\n }\n\n // Find which radio should be focusable\n let focusableRadio: HTMLBqRadioElement | undefined;\n\n // Priority 1: Currently checked radio\n focusableRadio = this.cachedRadioElements.find((radio) => radio.checked);\n\n // Priority 2: Radio matching current value\n if (!focusableRadio && this.value) {\n focusableRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);\n }\n\n // Priority 3: First enabled radio (fallback)\n if (!focusableRadio) {\n focusableRadio = this.cachedRadioElements.find((radio) => !radio.disabled);\n }\n\n // Apply tabIndex to all radios\n this.cachedRadioElements.forEach((radio) => {\n radio.tabIndex = radio === focusableRadio ? 0 : -1;\n });\n };\n\n /**\n * Updates the radio selection and focus.\n * @param target - The radio element to update.\n */\n private updateRadioSelection = (target: HTMLBqRadioElement): void => {\n // Only uncheck the previously checked radio if it's different\n if (this.checkedRadio && this.checkedRadio !== target) {\n this.checkedRadio.checked = false;\n this.checkedRadio.tabIndex = -1;\n }\n\n target.checked = true;\n target.tabIndex = 0;\n target.vFocus();\n\n this.checkedRadio = target;\n this.value = target.value;\n this.internals?.setFormValue(this.value ?? null);\n\n this.updateRadioTabIndexes();\n };\n\n /**\n * Synchronizes properties of child radio elements with the group's state.\n */\n private updateRadioProperties = (): void => {\n if (this.cachedRadioElements.length === 0) return;\n\n const { backgroundOnHover, disabled, name, required, value } = this;\n\n for (const radio of this.cachedRadioElements) {\n radio.backgroundOnHover = backgroundOnHover;\n radio.checked = value === radio.value;\n // This will allows us to force all radio elements to be disabled\n // while keeping the disabled state of the radio element if it was set individually by the user\n radio.forceDisabled = disabled;\n radio.name = name;\n radio.required = required;\n }\n };\n\n /**\n * Focuses the next/previous radio element in the group based on the current target.\n * Handles circular navigation and skips disabled elements.\n * @param currentTarget - The currently focused radio element\n * @param direction - The navigation direction ('forward' | 'backward')\n */\n private focusRadioInputSibling = (currentTarget: HTMLBqRadioElement, direction: Direction): void => {\n // If there is none or only one radio element, there will be no sibling to focus\n if (this.cachedRadioElements.length <= 1) return;\n\n const currentIndex = this.cachedRadioElements.indexOf(currentTarget);\n // If the index of the radio element target is not found, it means that it's not part of the group\n if (currentIndex === -1) return;\n\n const nextElement = getNextElement(this.cachedRadioElements, currentIndex, direction);\n this.updateRadioSelection(nextElement);\n };\n\n private updateFormValidity = async (): Promise<void> => {\n const { internals, required, requiredValidationMessage, value } = this;\n // Clear the validity state\n internals?.states.clear();\n\n if (!required || (required && !isNil(value))) {\n // If the radio group is not required or has a value, set the validity state to valid\n internals?.states.add('valid');\n internals?.setValidity({});\n return;\n }\n\n const firstRadio = this.cachedRadioElements[0];\n if (!firstRadio) return;\n // If the radio group is required and has no value, set the validity state to invalid\n internals?.states.add('invalid');\n // We need to pass the native input element to the setValidity method as anchor element\n internals?.setValidity(\n { valueMissing: true },\n requiredValidationMessage ?? 'Please select an option',\n await firstRadio.getNativeInput(),\n );\n };\n\n /**\n * Updates the custom states based on the component properties.\n * The custom states can be used to style the component based on the component properties.\n * The custom states are `disabled`, based on the component properties.\n */\n private updateCustomStates = (): void => {\n const states = new Set<string>();\n\n if (this.disabled) states.add('disabled');\n if (this.orientation) states.add(this.orientation);\n\n // Update states\n this.internals?.states.clear();\n states.forEach((state) => this.internals?.states.add(state));\n };\n\n private handleSlotChange = (): void => {\n this.initializeRadioElements();\n this.updateRadioProperties();\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host tabindex={this.tabIndex}>\n <fieldset\n class={{ 'bq-radio-group': true, 'has-fieldset': this.fieldset }}\n aria-controls=\"bq-radiogroup\"\n aria-labelledby=\"bq-radio-group__label\"\n aria-disabled={this.disabled}\n aria-required={this.required}\n disabled={this.disabled}\n role=\"radiogroup\"\n part=\"base\"\n >\n <legend part=\"label\">\n <slot id=\"bq-radiogroup__label\" name=\"label\" />\n </legend>\n <div class={`bq-radio-group--${this.orientation}`} part=\"group\">\n <slot id=\"bq-radiogroup\" onSlotchange={this.handleSlotChange} />\n </div>\n </fieldset>\n </Host>\n );\n }\n}\n"],"mappings":";;;;gTAAO,MAAMA,EAA0B,CAAC,aAAc,YCAtD,MAAMC,EAAkB,qomBCexB,MAAMC,EAAU,CACdC,UAAW,UACXC,WAAY,UACZC,QAAS,WACTC,UAAW,Y,MAoDAC,EAAY,M,wPAIfC,aACAC,kBACAC,eAA4C,KACnCC,iBAAmB,IAAIC,IAChCC,oBAA4C,GAKjCC,U,wBAOVC,aACAC,SAAuB,IAMPC,kBAAoB,MAGLC,aAAe,EAG9BC,SAAW,MAGXC,SAAW,MAGXC,KAGeC,YAAsC,WAGrDC,SAAW,MAGXC,0BAG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G,gBAAgBC,aAAc7E,KAAKoE,qB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["bqTextareaCss","BqTextarea","debounceBqInput","fallbackId","helperTextElem","labelElem","textarea","internals","hasHelperText","hasLabel","autocapitalize","autocomplete","autocorrect","autofocus","autoGrow","debounceTime","disabled","disableResize","form","formValidationMessage","maxlength","name","placeholder","readonly","required","rows","spellcheck","validationStatus","value","wrap","handleValueChange","this","length","substring","handleRequiredPropChange","updateFormValidity","bqBlur","bqChange","bqClear","bqFocus","bqInput","componentDidLoad","handleSlotChange","formAssociatedCallback","setFormValue","formResetCallback","clearSelection","numberOfCharacters","handleBlur","emit","el","handleFocus","handleChange","ev","isHTMLElement","target","handleInput","cancel","debounce","autoResize","inputElem","style","height","scrollHeight","hasSlotContent","isNil","undefined","states","clear","trim","add","setValidity","valueMissing","render","h","key","class","part","htmlFor","ref","label","onSlotchange","id","maxLength","readOnly","elem","onBlur","onChange","onFocus","onInput","span"],"sources":["../../packages/beeq/src/components/textarea/scss/bq-textarea.scss?tag=bq-textarea&encapsulation=shadow","../../packages/beeq/src/components/textarea/bq-textarea.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Textarea styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-textarea.variables';\n\n:host {\n @apply block is-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label */\n/* -------------------------------------------------------------------------- */\n\n.bq-textarea__label {\n @apply text-[length:--bq-textarea--label-text-size] text-[color:--bq-textarea--label-text-color] m-be-[--bq-textarea--label-margin-bottom];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Native HTML Textarea control */\n/* -------------------------------------------------------------------------- */\n\n.bq-textarea__input {\n @apply flex-auto resize-y bg-[--bq-textarea--background-color] bs-[inherit];\n // Border\n @apply rounded-[--bq-textarea--border-radius] border-[length:--bq-textarea--border-width] border-[color:--bq-textarea--border-color];\n // Padding\n @apply pe-[--bq-textarea--padding-end] ps-[--bq-textarea--padding-start] p-b-[--bq-textarea--paddingY];\n // Text\n @apply text-[length:--bq-textarea--text-size] text-[color:--bq-textarea--text-color] placeholder:text-[color:--bq-textarea--text-placeholder-color];\n // Transition\n @apply transition-colors ease-in-out;\n // Hover\n @apply [&:not([disabled]):not(:focus-within)]:hover:border-hover-brand;\n // Disabled\n @apply disabled:cursor-not-allowed disabled:opacity-60;\n // Focus\n &:not([disabled]):focus-within {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-textarea--border-color-focus);\n\n @apply focus border-[color:--bq-ring-color-focus];\n }\n}\n\n/* ------------------------------- Validations ------------------------------- */\n\n.bq-textarea__input.validation-error {\n @apply border-danger [&:not(.disabled):not(:focus-within)]:hover:border-hover-danger;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.danger);\n\n @apply border-active-danger;\n }\n}\n\n.bq-textarea__input.validation-success {\n @apply border-success [&:not(.disabled):not(:focus-within)]:hover:border-hover-success;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.success);\n\n @apply border-active-success;\n }\n}\n\n.bq-textarea__input.validation-warning {\n @apply border-warning [&:not(.disabled):not(:focus-within)]:hover:border-hover-warning;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.warning);\n\n @apply border-active-warning;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-textarea__helper {\n @apply text-[length:--bq-textarea--helper-text-size] text-[color:--bq-textarea--helper-text-color] m-bs-[--bq-textarea--helper-margin-top];\n}\n\n/* ------------------------------- Validations ------------------------------ */\n\n.bq-textarea__helper.validation-error {\n @apply text-danger;\n}\n\n.bq-textarea__helper.validation-success {\n @apply text-success;\n}\n\n.bq-textarea__helper.validation-warning {\n @apply text-warning;\n}\n\n/* ----------------------------- Helper counter ----------------------------- */\n\n/** Apply a disabled text color style to the textarea counter when the validation is none. */\n.bq-textarea__helper[class~='validation-none'] {\n .bq-textarea__helper--counter {\n @apply opacity-60;\n }\n}\n","import { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TTextareaAutoCapitalize, TTextareaWrap } from './bq-textarea.types';\nimport { debounce, hasSlotContent, isHTMLElement, isNil, TDebounce } from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\n\n/**\n * The Textarea component is a multi-line text input control that is often used in a form to collect user inputs like comments or reviews.\n *\n * @example How to use it\n * ```html\n * <bq-textarea maxlength=\"0\" name=\"textarea\" placeholder=\"Placeholder...\" rows=\"5\">\n * <label slot=\"label\">Label</label>\n * <span class=\"flex items-center gap-xs\" slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n * </bq-textarea>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/16792c-textarea\n * @status stable\n *\n * @attr {string} autocapitalize - Controls whether or not the textarea field should be capitalized and how.\n * @attr {string} autocomplete - Specifies whether or not the textarea field should have autocomplete enabled.\n * @attr {string} autocorrect - Controls whether or not the textarea field should have autocorrect enabled.\n * @attr {boolean} autofocus - If `true`, the textarea will be focused on component render.\n * @attr {boolean} auto-grow - If `true`, the textarea will automatically grow and shrink to fit its contents.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the textarea value changes.\n * @attr {boolean} disabled - If `true`, the user cannot interact with the textarea.\n * @attr {boolean} disable-resize - If `true`, it will block the user's ability to resize the textarea.\n * @attr {string} form - The ID of the form that the textarea field belongs to.\n * @attr {string} form-validation-message - The native form validation message.\n * @attr {number} maxlength - The maximum number of characters that can be entered into the textarea (`0`: no limit).\n * @attr {string} name - The name of the textarea element.\n * @attr {string} placeholder - The placeholder text to show when there is no value.\n * @attr {boolean} readonly - If `true`, the textarea field cannot be modified.\n * @attr {boolean} required - Indicates whether or not the textarea field is required to be filled out before submitting the form.\n * @attr {number} rows - The number of visible text lines for the control. It must be a positive integer.\n * @attr {boolean} spellcheck - If `true`, the textarea content may be checked for spelling errors.\n * @attr {\"error\" | \"none\" | \"success\" | \"warning\"} validation-status - The validation status of the textarea.\n * @attr {string} value - The value of the textarea. It can be used to reset the textarea to a previous value.\n * @attr {\"soft\" | \"hard\"} wrap - Specifies how the text in a text area is to be wrapped when submitted in a form.\n *\n * @event bqBlur - Handler to be called when the textarea loses focus.\n * @event bqChange - Handler to be called when the textarea value has changed and the textarea loses focus.\n * @event bqClear - Handler to be called when the textarea value has been cleared.\n * @event bqFocus - Handler to be called when the textarea has received focus.\n * @event bqInput - Handler to be called when the textarea value changes.\n *\n * @slot label - The textarea label.\n * @slot helper-text - The helper text.\n *\n * @part base - The component's base wrapper.\n * @part input - The textarea element.\n * @part label - The textarea label.\n * @part helper-info - The helper info container.\n * @part helper-text - The helper text.\n * @part helper-counter - The helper counter.\n *\n * @cssprop --bq-textarea--background-color - Textarea background color\n * @cssprop --bq-textarea--border-color - Textarea border color\n * @cssprop --bq-textarea--border-color-focus - Textarea border color on focus\n * @cssprop --bq-textarea--border-radius - Textarea border radius\n * @cssprop --bq-textarea--border-width - Textarea border width\n * @cssprop --bq-textarea--border-style - Textarea border style\n * @cssprop --bq-textarea--helper-margin-top - Textarea helper text margin top\n * @cssprop --bq-textarea--helper-text-color - Textarea helper text color\n * @cssprop --bq-textarea--helper-text-size - Textarea helper text size\n * @cssprop --bq-textarea--label-margin-bottom - Textarea label margin bottom\n * @cssprop --bq-textarea--label-text-color - Textarea label text color\n * @cssprop --bq-textarea--label-text-size - Textarea label text size\n * @cssprop --bq-textarea--paddingY - Textarea padding top and bottom\n * @cssprop --bq-textarea--padding-start - Textarea padding start\n * @cssprop --bq-textarea--padding-end - Textarea padding end\n * @cssprop --bq-textarea--text-color - Textarea text color\n * @cssprop --bq-textarea--text-size - Textarea text size\n * @cssprop --bq-textarea--text-placeholder-color - Textarea placeholder text color\n */\n@Component({\n tag: 'bq-textarea',\n styleUrl: './scss/bq-textarea.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqTextarea {\n // Own Properties\n // ====================\n\n private debounceBqInput: TDebounce<void>;\n private fallbackId = 'textarea';\n\n private helperTextElem?: HTMLElement;\n private labelElem?: HTMLLabelElement;\n private textarea: HTMLTextAreaElement;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqTextareaElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasHelperText = false;\n @State() private hasLabel = false;\n\n // Public Property API\n // ========================\n\n /**\n * Controls whether or not the textarea field should be capitalized and how.\n * Possible values are 'off', 'none', 'on', 'sentences', 'words', and 'characters'.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize\n */\n @Prop({ reflect: true }) autocapitalize: TTextareaAutoCapitalize = 'off';\n\n /**\n * Specifies whether or not the textarea field should have autocomplete enabled.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\n @Prop({ reflect: true }) autocomplete: string = 'off';\n\n /**\n * Controls whether or not the textarea field should have autocorrect enabled.\n * Possible values are 'on' and 'off'.\n */\n @Prop({ reflect: true }) autocorrect: 'on' | 'off' = 'off';\n\n /** If true, the textarea will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /**\n * If `true`, the textarea will automatically grow and shrink to fit its contents.\n * If `false`, the textarea will have a fixed height specified by the `rows` property.\n */\n @Prop({ reflect: true }) autoGrow: boolean = false;\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the textarea value changes.\n * A value of 0 means no debouncing will occur.\n */\n @Prop({ reflect: true, mutable: true }) debounceTime? = 0;\n\n /** If `true`, the user cannot interact with the textarea. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** If `true`, it will block the user's ability to resize the textarea. */\n @Prop({ reflect: true }) disableResize?: boolean = false;\n\n /** The ID of the form that the textarea field belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /**\n * The maximum number of characters that can be entered into the textarea (`0`: no limit).\n * When enabled, a character counter will be shown underneath the textarea.\n */\n @Prop({ reflect: true }) maxlength: number;\n\n /** The name of the textarea element. */\n @Prop({ reflect: true }) name!: string;\n\n /** The placeholder text to show when there is no value. */\n @Prop({ reflect: true }) placeholder!: string;\n\n /** If true, the textarea field cannot be modified. */\n @Prop({ reflect: true }) readonly?: boolean = false;\n\n /** Indicates whether or not the textarea field is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /** The number of visible text lines for the control. It must be a positive integer. */\n @Prop({ reflect: true }) rows: number = 5;\n\n /** If true, the textarea content may be checked for spelling errors. */\n @Prop({ reflect: true }) spellcheck: boolean = false;\n /**\n * The validation status of the textarea.\n *\n * @remarks\n * This property is used to indicate the validation status of the textarea. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The textarea has a validation error.\n * - `'warning'`: The textarea has a validation warning.\n * - `'success'`: The textarea has passed validation.\n */\n @Prop({ reflect: true, mutable: true }) validationStatus: TInputValidation = 'none';\n\n /** The value of the textarea. It can be used to reset the textarea to a previous value. */\n @Prop({ mutable: true }) value: string;\n\n /** Specifies how the text in a text area is to be wrapped when submitted in a form */\n @Prop({ reflect: true }) wrap: TTextareaWrap = 'soft';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n if (!this.textarea) return;\n if (!this.maxlength || this.value?.length < this.maxlength) return;\n // If the value is longer than the maxlength, we need to truncate it\n this.value = this.value?.substring(0, this.maxlength);\n this.textarea.value = this.value ?? '';\n }\n\n @Watch('required')\n handleRequiredPropChange() {\n this.updateFormValidity();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the textarea loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqTextareaElement>;\n\n /**\n * Callback handler emitted when the textarea value has changed and the textarea loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the textarea field and then clicks outside of the textarea field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqTextareaElement }>;\n\n /** Callback handler emitted when the textarea value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqTextareaElement>;\n\n /** Callback handler emitted when the textarea has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqTextareaElement>;\n\n /**\n * Callback handler emitted when the textarea value changes.\n * This handler is called whenever the user types or pastes text into the textarea field.\n */\n @Event() bqInput!: EventEmitter<{ value: string; el: HTMLBqTextareaElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.value);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n this.clearSelection();\n // Reset the form validity state\n this.setFormValue();\n this.updateFormValidity();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get numberOfCharacters() {\n if (!this.maxlength || !this.textarea) return 0;\n\n return this.value?.length;\n }\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'textarea')) return;\n this.value = ev.target.value;\n this.setFormValue(this.value);\n this.updateFormValidity();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n };\n\n private handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceBqInput?.cancel();\n\n if (!isHTMLElement(ev.target, 'textarea')) return;\n this.value = ev.target.value;\n\n this.debounceBqInput = debounce(() => {\n this.bqInput.emit({ value: this.value, el: this.el });\n }, this.debounceTime);\n this.debounceBqInput();\n\n this.autoResize();\n };\n\n private autoResize = () => {\n if (!this.autoGrow) return;\n\n const inputElem = this.textarea;\n if (!inputElem) return;\n\n inputElem.style.height = 'auto';\n inputElem.style.height = `${inputElem.scrollHeight}px`;\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private setFormValue = (value?: string) => {\n this.internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, textarea } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, textarea);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private clearSelection = () => {\n this.value = '';\n this.textarea.value = this.value;\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-textarea flex flex-auto flex-col\" part=\"base\">\n <label\n class={{ 'bq-textarea__label': true, '!hidden': !this.hasLabel }}\n htmlFor={this.name ?? this.fallbackId}\n aria-label={this.name ?? this.fallbackId}\n ref={(label: HTMLLabelElement) => (this.labelElem = label)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n <textarea\n id={this.name ?? this.fallbackId}\n class={{\n 'bq-textarea__input': true,\n 'resize-none': this.disableResize,\n [`validation-${this.validationStatus}`]: true,\n }}\n autocapitalize={this.autocapitalize}\n autocomplete={this.autocomplete}\n autocorrect={this.autocorrect}\n autofocus={this.autofocus}\n disabled={this.disabled}\n form={this.form}\n maxLength={this.maxlength > 0 ? this.maxlength : undefined}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n rows={this.rows}\n spellcheck={this.spellcheck}\n wrap={this.wrap}\n ref={(elem: HTMLTextAreaElement) => (this.textarea = elem)}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n part=\"input\"\n >\n {this.value}\n </textarea>\n <div\n class={{\n 'bq-textarea__helper flex items-center justify-between': true,\n [`validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText && !this.maxlength,\n }}\n part=\"helper-info\"\n >\n <span\n class=\"bq-textarea__helper--text\"\n ref={(span: HTMLElement) => (this.helperTextElem = span)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </span>\n <span\n class={{ 'bq-textarea__helper--counter [fontVariant:tabular-nums]': true, '!hidden': !this.maxlength }}\n part=\"helper-counter\"\n >\n {this.numberOfCharacters ?? 0}/{this.maxlength}\n </span>\n </div>\n </div>\n );\n }\n}\n"],"mappings":";;;;yMAAA,MAAMA,EAAgB,810B,MCwFTC,EAAU,M,qVAIbC,gBACAC,WAAa,WAEbC,eACAC,UACAC,SAKWC,U,wBAOFC,cAAgB,MAChBC,SAAW,MAUHC,eAA0C,MAM1CC,aAAuB,MAMvBC,YAA4B,MAG5BC,UAMAC,SAAoB,MAMLC,aAAgB,EAG/BC,SAAoB,MAGpBC,cAA0B,MAG1BC,KAGAC,sBAMAC,UAGAC,KAGAC,YAGAC,SAAqB,MAGrBC,SAAqB,MAGrBC,KAAe,EAGfC,WAAsB,MAWPC,iBAAqC,OAGpDC,MAGAC,KAAsB,OAM/C,iBAAAC,GACE,IAAKC,KAAKzB,SAAU,OACpB,IAAKyB,KAAKX,WAAaW,KAAKH,OAAOI,OAASD,KAAKX,UAAW,OAE5DW,KAAKH,MAAQG,KAAKH,OAAOK,UAAU,EAAGF,KAAKX,WAC3CW,KAAKzB,SAASsB,MAAQG,KAAKH,OAAS,E,CAItC,wBAAAM,GACEH,KAAKI,oB,CAQEC,OAMAC,SAGAC,QAGAC,QAMAC,QAMT,gBAAAC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X,UAAY8C,UACjD7C,KAAMU,KAAKV,KACXC,YAAaS,KAAKT,YAClB8D,SAAUrD,KAAKR,SACfC,SAAUO,KAAKP,SACfC,KAAMM,KAAKN,KACXC,WAAYK,KAAKL,WACjBG,KAAME,KAAKF,KACXkD,IAAMM,GAA+BtD,KAAKzB,SAAW+E,EACrDC,OAAQvD,KAAKiB,WACbuC,SAAUxD,KAAKqB,aACfoC,QAASzD,KAAKoB,YACdsC,QAAS1D,KAAKyB,YACdqB,KAAK,SAEJ9C,KAAKH,OAER8C,EAAA,OAAAC,IAAA,2CACEC,MAAO,CACL,wDAAyD,KACzD,CAAC,cAAc7C,KAAKJ,oBAAqB,KACzC,WAAYI,KAAKvB,gBAAkBuB,KAAKX,WAE1CyD,KAAK,eAELH,EACE,QAAAC,IAAA,2CAAAC,MAAM,4BACNG,IAAMW,GAAuB3D,KAAK3B,eAAiBsF,EACnDb,KAAK,eAELH,EAAM,QAAAC,IAAA,2CAAAtD,KAAK,cAAc4D,aAAclD,KAAKW,oBAE9CgC,EAAA,QAAAC,IAAA,2CACEC,MAAO,CAAE,0DAA2D,KAAM,WAAY7C,KAAKX,WAC3FyD,KAAK,kBAEJ9C,KAAKgB,oBAAsB,EAAC,IAAGhB,KAAKX,Y","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["bqSwitchCss","BqSwitch","labelElem","inputElem","prevCheckedValue","internals","hasLabel","backgroundOnHover","checked","disabled","formValidationMessage","fullWidth","innerLabel","justifyContent","name","required","reverseOrder","value","handleRequiredChange","this","updateFormValidity","bqChange","bqFocus","bqBlur","componentWillLoad","componentDidLoad","handleSlotChange","componentDidUpdate","emit","formAssociatedCallback","setFormValue","formResetCallback","removeAttribute","undefined","vClick","click","vFocus","focus","vBlur","blur","handleChange","setAttribute","handleOnFocus","el","handleOnBlur","slot","querySelector","isNil","getTextContent","recurse","length","states","clear","add","setValidity","valueMissing","render","hostStyle","labelCssClasses","h","Host","key","class","style","part","type","onBlur","onChange","onFocus","ref","input","role","color","title","span","onSlotchange"],"sources":["../../packages/beeq/src/components/switch/scss/bq-switch.scss?tag=bq-switch&encapsulation=shadow","../../packages/beeq/src/components/switch/bq-switch.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Switch styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-switch.variables';\n\n:host {\n @apply inline-block;\n}\n\n:host(.full-width) {\n @apply is-full;\n}\n\n.bq-switch {\n @apply flex cursor-pointer select-none items-center rounded-s transition-colors duration-300 p-b-2 p-i-2;\n\n justify-content: var(--bq-switch--justify-content);\n\n // Display background on hover (if enabled)\n &.has-background:not(.is-disabled):hover {\n @apply bg-hover-ui-primary;\n }\n\n &.is-disabled {\n @apply cursor-not-allowed opacity-60;\n }\n}\n\n.bq-switch--input:not(:disabled):focus,\n.bq-switch--input:not(:disabled):focus-visible {\n ~ .bq-switch--control {\n @apply focus;\n }\n}\n\n.bq-switch--control__dot {\n @apply absolute start-xs2 rounded-full bg-ui-primary bs-[--bq-switch--dot-size] is-[--bq-switch--dot-size];\n @apply group-[&.is-checked]:start-[calc(100%_-_var(--bq-switch--dot-size)_-_var(--bq-spacing-xs2))] group-[&.is-checked]:bg-[--bq-icon--alt];\n @apply transition-all duration-300;\n}\n\n.bq-switch--control__icon {\n --bq-icon--size: var(--bq-switch--dot-size) !important;\n\n &::part(base) {\n @apply flex;\n }\n}\n","import { AttachInternals, Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TSwitchInnerLabel, TSwitchJustifyContent } from './bq-switch.types';\nimport { getTextContent, isNil } from '../../shared/utils';\n\n/**\n * Toggle switches are digital on/off switches.\n * They should provide immediate results, giving users the freedom to control their preferences as needed.\n *\n * @example How to use it\n * ```html\n * <bq-switch inner-label=\"default\" justify-content=\"start\" name=\"bq-switch\" value=\"Switch value\">\n * Toggle me!\n * </bq-switch>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/49d9c9-switch\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {boolean} background-on-hover - If `true`, a background will be displayed on hover\n * @attr {boolean} checked - It indicates whether if the switch is `ON` by default (when the page loads)\n * @attr {boolean} disabled - If `true`, the switch control will be disabled and no interaction will be allowed\n * @attr {string} form-validation-message - The native form validation message\n * @attr {boolean} full-width - If `true`, the component will take the full width space available on the parent container\n * @attr {\"default\" | \"icon\"} inner-label - It indicates how to to display the on/off marks inside the control, with icons or none (default)\n * @attr {\"start\" | \"end\" | \"center\" | \"space-between\" | \"space-around\" | \"space-evenly\"} justify-content - It defines how to distribute the space between and around the control and the label text\n * @attr {string} name - Name of the form control. Submitted with the form as part of a name/value pair\n * @attr {boolean} required - If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted\n * @attr {boolean} reverse-order - If `true`, the order of the control and the label text will be changed\n * @attr {string} value - The input control's value, submitted as a name/value pair with form data\n *\n * @event bqChange - Handler to be called when the switch state changes\n * @event bqFocus - Handler to be called when the switch gets focus\n * @event bqBlur - Handler to be called when the switch loses focus\n *\n * @slot - The switch label text\n *\n * @part base - HTML `<label>` root container\n * @part control - HTML `<div>` element for the custom control\n * @part dot - HTML `<div>` element that acts as changing dot\n * @part icon-off - HTMLBqIcon `<pk-icon>` element used as the `OFF` mark inner label\n * @part icon-on - HTMLBqIcon `<pk-icon>` element used as the `ON` mark inner label\n * @part label - HTML `<span>` element that holds the label text\n *\n * @cssprop --bq-switch--height - Switch height\n * @cssprop --bq-switch--justify-content - Switch justify content\n * @cssprop --bq-switch--width - Switch width\n * @cssprop --bq-switch--dot-size - Switch dot size\n */\n@Component({\n tag: 'bq-switch',\n styleUrl: './scss/bq-switch.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSwitch {\n // Own Properties\n // ====================\n\n private labelElem: HTMLSpanElement;\n private inputElem: HTMLInputElement;\n private prevCheckedValue: boolean;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqSwitchElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasLabel = false;\n\n // Public Property API\n // ========================\n\n /** If true, a background will be displayed on hover */\n @Prop({ reflect: true }) backgroundOnHover?: boolean = false;\n\n /** It indicates whether if the switch is `ON` by default (when the page loads) */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n\n /** If true, the switch control will be disabled and no interaction will be allowed */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** The native form validation message */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** If true, the component will take the full width space available on the parent container */\n @Prop({ reflect: true }) fullWidth?: boolean = false;\n\n /** It indicates how to to display the on/off marks inside the control, with icons or none (default) */\n @Prop({ reflect: true }) innerLabel?: TSwitchInnerLabel = 'default';\n\n /**\n * It defines how to distribute the space between and around the control and the label text\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content)\n */\n @Prop({ reflect: true }) justifyContent?: TSwitchJustifyContent = 'start';\n\n /** Name of the form control. Submitted with the form as part of a name/value pair */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /** If true, the order of the control and the label text will be changed */\n @Prop({ reflect: true }) reverseOrder?: boolean = false;\n\n /** The input control's value, submitted as a name/value pair with form data. */\n @Prop({ reflect: true }) value?: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('required')\n handleRequiredChange() {\n this.updateFormValidity();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the switch state changes */\n @Event() bqChange: EventEmitter<{ checked: boolean }>;\n\n /** Handler to be called when the switch gets focus */\n @Event() bqFocus: EventEmitter<HTMLBqSwitchElement>;\n\n /** Handler to be called when the switch loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSwitchElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.prevCheckedValue = this.checked;\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n componentDidUpdate() {\n /**\n * We need to trigger the `bqChange` immediately after the first update happens\n * so the checked attribute get applied, otherwise, a delay will happen\n * between the event emits and when the checked attribute value gets reflected in the element host.\n */\n if (this.checked !== this.prevCheckedValue) {\n this.bqChange.emit({ checked: this.checked });\n this.prevCheckedValue = this.checked;\n }\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.checked);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n // Reset the form value and validity state\n this.checked = false;\n this.inputElem.removeAttribute('checked');\n this.internals?.setFormValue(undefined);\n this.updateFormValidity();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Simulate a click event on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.click()`.\n */\n @Method()\n async vClick() {\n this.inputElem?.click();\n }\n\n /**\n * Sets focus on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.focus()`.\n */\n @Method()\n async vFocus() {\n this.inputElem?.focus();\n }\n\n /**\n * Remove focus from the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.blur()`.\n */\n @Method()\n async vBlur() {\n this.inputElem?.blur();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleChange = () => {\n this.checked = !this.checked;\n this.inputElem.setAttribute('checked', `${this.checked}`);\n this.setFormValue(this.checked);\n this.updateFormValidity();\n };\n\n private handleOnFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleOnBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleSlotChange = () => {\n const slot = this.labelElem?.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.hasLabel = !!getTextContent(slot, { recurse: true }).length;\n };\n\n private setFormValue = (checked: boolean) => {\n const value = checked ? 'on' : undefined;\n // Set form value based on the checked state\n // Here we also pass the state of the component (2nd argument) as the state of the form control\n // Details: https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue\n this.internals?.setFormValue(value, `${this.checked}`);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, checked, inputElem } = this;\n // Clear the validity state\n internals?.states.clear();\n\n if (!(required && !checked)) {\n // If the switch component is not required or is checked, set the validity state to valid\n internals?.states.add('valid');\n internals?.setValidity({});\n return;\n }\n\n // Set validity state based on the required property and checked state\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const hostStyle = {\n ...(this.justifyContent && { '--bq-switch--justify-content': this.justifyContent }),\n };\n\n const labelCssClasses = {\n 'has-background': this.backgroundOnHover,\n 'is-checked': this.checked,\n 'is-disabled': this.disabled,\n 'flex-row-reverse': this.reverseOrder,\n };\n\n return (\n <Host class={{ 'full-width': this.fullWidth }} style={hostStyle}>\n <label class={{ 'bq-switch group': true, ...labelCssClasses }} part=\"base\">\n {/* Hidden native HTML input */}\n <input\n class=\"bq-switch--input peer sr-only !bs-[--bq-switch--dot-size] !is-[--bq-switch--width] peer-checked:invisible\"\n type=\"checkbox\"\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n name={!isNil(this.name) ? this.name : undefined}\n aria-label={this.name}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n onBlur={this.handleOnBlur}\n onChange={this.handleChange}\n onFocus={this.handleOnFocus}\n ref={(input) => (this.inputElem = input)}\n role=\"switch\"\n value={this.value}\n />\n {/* Control */}\n <div\n class=\"bq-switch--control relative box-border flex justify-between rounded-full bg-ui-tertiary transition duration-300 bs-[--bq-switch--height] is-[--bq-switch--width] p-b-xs2 p-i-xs2 group-[&.is-checked]:bg-ui-brand\"\n part=\"control\"\n >\n {this.innerLabel === 'icon' && (\n <bq-icon\n class=\"bq-switch--control__icon on\"\n name=\"check\"\n color=\"icon--alt\"\n role=\"img\"\n title=\"On\"\n part=\"icon-on\"\n />\n )}\n {this.innerLabel === 'icon' && (\n <bq-icon\n class=\"bq-switch--control__icon off\"\n name=\"x\"\n color=\"icon--inverse\"\n role=\"img\"\n title=\"Off\"\n part=\"icon-off\"\n />\n )}\n {/* Dot */}\n <div class=\"bq-switch--control__dot\" part=\"dot\" />\n </div>\n {/* Label */}\n <span\n class={{\n 'bq-switch--label text-m font-medium leading-regular text-primary transition-colors duration-300': true,\n 'ms-s': this.hasLabel && !this.reverseOrder,\n 'me-s': this.hasLabel && this.reverseOrder,\n }}\n ref={(span) => (this.labelElem = span)}\n part=\"label\"\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </label>\n </Host>\n );\n }\n}\n"],"mappings":";;;;wIAAA,MAAMA,EAAc,8kwB,MC4DPC,EAAQ,M,uRAIXC,UACAC,UACAC,iBAKWC,U,wBAOVC,SAAW,MAMKC,kBAA8B,MAGfC,QAAoB,MAGnCC,SAAqB,MAGrBC,sBAGAC,UAAsB,MAGtBC,WAAiC,UAMjCC,eAAyC,QAGzCC,KAGAC,SAAqB,MAGrBC,aAAyB,MAGzBC,MAMzB,oBAAAC,GACEC,KAAKC,oB,CAQEC,SAGAC,QAGAC,OAMT,iBAAAC,GACEL,KAAKf,iBAAmBe,KAAKX,O,CAG/B,gBAAAiB,GACEN,KAAKO,kB,CAGP,kBAAAC,GAME,GAAIR,KAAKX,UAAYW,KAAKf,iBAAkB,CAC1Ce,KAAKE,SAASO,KAAK,CAAEpB,QAASW,KAAKX,UACnCW,KAAKf,iBAAmBe,KAAKX,O,EAIjC,sBAAAqB,GACEV,KAAKW,aAAaX,KAAKX,SACvBW,KAAKC,oB,CAGP,iBAAAW,GAEEZ,KAAKX,QAAU,MACfW,KAAKhB,UAAU6B,gBAAgB,WAC/Bb,KAAKd,WAAWyB,aAAaG,WAC7Bd,KAAKC,oB,CAkBP,YAAMc,G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oD,MAAON,GACpDE,EAAA,SAAAE,IAAA,2CAAOC,MAAO,CAAE,kBAAmB,QAASJ,GAAmBM,KAAK,QAElEL,EACE,SAAAE,IAAA,2CAAAC,MAAM,4GACNG,KAAK,WACLzD,QAASW,KAAKX,QACdC,SAAUU,KAAKV,SACfM,SAAUI,KAAKJ,SACfD,MAAOiC,EAAM5B,KAAKL,MAAQK,KAAKL,KAAOmB,UAAS,aACnCd,KAAKL,KAAI,eACPK,KAAKX,QAAU,OAAS,QACvB,gBAAAW,KAAKV,SAAW,OAAS,QACxCyD,OAAQ/C,KAAKyB,aACbuB,SAAUhD,KAAKqB,aACf4B,QAASjD,KAAKuB,cACd2B,IAAMC,GAAWnD,KAAKhB,UAAYmE,EAClCC,KAAK,SACLtD,MAAOE,KAAKF,QAGd0C,EAAA,OAAAE,IAAA,2CACEC,MAAM,oNACNE,KAAK,WAEJ7C,KAAKP,aAAe,QACnB+C,EACE,WAAAE,IAAA,2CAAAC,MAAM,8BACNhD,KAAK,QACL0D,MAAM,YACND,KAAK,MACLE,MAAM,KACNT,KAAK,YAGR7C,KAAKP,aAAe,QACnB+C,EACE,WAAAE,IAAA,2CAAAC,MAAM,+BACNhD,KAAK,IACL0D,MAAM,gBACND,KAAK,MACLE,MAAM,MACNT,KAAK,aAITL,EAAK,OAAAE,IAAA,2CAAAC,MAAM,0BAA0BE,KAAK,SAG5CL,EAAA,QAAAE,IAAA,2CACEC,MAAO,CACL,kGAAmG,KACnG,OAAQ3C,KAAKb,WAAaa,KAAKH,aAC/B,OAAQG,KAAKb,UAAYa,KAAKH,cAEhCqD,IAAMK,GAAUvD,KAAKjB,UAAYwE,EACjCV,KAAK,SAELL,EAAM,QAAAE,IAAA,2CAAAc,aAAcxD,KAAKO,qB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["bqSideMenuItemCss","BqSideMenuItem","labelElem","textContent","active","collapse","disabled","bqBlur","bqFocus","bqClick","componentDidLoad","this","handleSlotChange","getTextContent","querySelector","handleBlur","ev","preventDefault","stopPropagation","emit","el","handleFocus","handleClick","menuItem","h","class","onBlur","onFocus","onClick","role","tabindex","slot","part","name","ref","onSlotchange","render","placement","exportparts"],"sources":["../../packages/beeq/src/components/side-menu-item/scss/bq-side-menu-item.scss?tag=bq-side-menu-item&encapsulation=shadow","../../packages/beeq/src/components/side-menu-item/bq-side-menu-item.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Side menu item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-side-menu-item.variables';\n\n:host {\n @apply flex;\n}\n\n.bq-side-menu__item {\n @apply flex flex-grow items-center gap-x-s rounded-s border-none px-[var(--bq-side-menu-item--paddingX)] py-[var(--bq-side-menu-item--paddingY)] no-underline transition-colors duration-150;\n\n // Default state\n @apply bg-[var(--bq-side-menu-item--bg-default)] text-m text-[color:var(--bq-side-menu-item--text-default)];\n\n // Focus state\n @apply [&:not(.disabled)]:focus-visible:focus;\n\n // Hover state\n @apply [&:not(.disabled)]:hover:cursor-pointer;\n @apply [&:not(.disabled,.active)]:hover:text-m [&:not(.disabled,.active)]:hover:bg-hover-ui-alt [&:not(.disabled,.active)]:hover:text-hover-primary;\n}\n\n.bq-side-menu__item.active {\n // Active state\n @apply bg-[var(--bq-side-menu-item--bg-active)] text-m text-[color:var(--bq-side-menu-item--text-active)];\n}\n\n.bq-side-menu__item.disabled {\n @apply opacity-60 hover:cursor-not-allowed;\n}\n\n.bq-side-menu__item.is-collapsed {\n @apply justify-center gap-0;\n\n .bq-side-menu__item--label,\n .bq-side-menu__item--suffix {\n @apply sr-only scale-0;\n }\n}\n\n.bq-side-menu__item--label,\n.bq-side-menu__item--suffix {\n @apply transition-all duration-300 ease-in-out;\n}\n","import { Component, Element, Event, h, Prop, State } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { getTextContent } from '../../shared/utils';\n\n/**\n * Represents the default side menu item for standard navigation elements, providing a clean and straightforward way to display menu options.\n *\n * @example How to use it\n * ```html\n * <bq-side-menu-item>\n * <bq-icon name=\"star-four\" slot=\"prefix\"></bq-icon>\n * Menu item\n * <bq-badge slot=\"suffix\">5</bq-badge>\n * </bq-side-menu-item>\n * ```\n * @documentation https://www.beeq.design/3d466e231/p/99822d-side-menu/b/09d7b1\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {boolean} active - If `true`, the menu item will be shown as active/selected.\n * @attr {boolean} collapse - If `true`, the item label and suffix will be hidden and the `width` will be reduced according to its parent.\n * @attr {boolean} disabled - If `true`, the menu item will be disabled (no interaction allowed).\n *\n * @event bqBlur - Handler to be called when the button loses focus.\n * @event bqClick - Handler to be called when the button gets focused.\n * @event bqFocus - Handler to be called when the button is clicked.\n *\n * @slot prefix - The prefix part of menu item.\n * @slot - The content of the menu item.\n * @slot suffix - The suffix part of menu item.\n *\n * @part base - The component wrapper container inside the shadow DOM\n * @part label - The label slot\n * @part prefix - The prefix slot\n * @part suffix - The suffix slot\n * @part panel - The `<div>` container that holds the tooltip content (when the side menu is collapsed)\n * @part trigger - The `<div>` container that holds the element which displays tooltip on hover (when the side menu is collapsed)\n *\n * @cssprop --bq-side-menu-item--bg-default - Side menu item default background color\n * @cssprop --bq-side-menu-item--bg-active - Side menu item active background color\n * @cssprop --bq-side-menu-item--text-default - Side menu item default text color\n * @cssprop --bq-side-menu-item--text-active - Side menu item active text color\n * @cssprop --bq-side-menu-item--paddingX - Side menu item vertical padding\n * @cssprop --bq-side-menu-item--paddingY - Side menu item horizontal padding\n */\n@Component({\n tag: 'bq-side-menu-item',\n styleUrl: './scss/bq-side-menu-item.scss',\n shadow: true,\n})\nexport class BqSideMenuItem {\n // Own Properties\n // ====================\n\n private labelElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSideMenuItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() textContent: string;\n\n // Public Property API\n // ========================\n\n /** If true, the menu item will be shown as active/selected. */\n @Prop() active: boolean = false;\n\n /** If true, the item label and suffix will be hidden and the `width` will be reduced according to its parent. */\n @Prop() collapse: boolean = false;\n\n /** If true, the menu item will be disabled (no interaction allowed) */\n @Prop() disabled: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSideMenuItemElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqSideMenuItemElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqSideMenuItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n if (!this.labelElem) return;\n this.textContent = getTextContent(this.labelElem.querySelector('slot'));\n };\n\n handleBlur = (ev: Event) => {\n if (this.disabled) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n handleFocus = (ev: Event) => {\n if (this.disabled) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n handleClick = (ev: Event) => {\n if (this.disabled || this.active) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n private menuItem = () => (\n <button\n class={{\n 'bq-side-menu__item': true,\n active: this.active,\n disabled: this.disabled,\n 'is-collapsed': this.collapse,\n }}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n aria-disabled={this.disabled ? 'true' : 'false'}\n role=\"menuitem\"\n tabindex={this.disabled ? -1 : 0}\n slot=\"trigger\"\n part=\"base\"\n >\n <div class=\"bq-side-menu__item--prefix flex items-center\" part=\"prefix\">\n <slot name=\"prefix\" />\n </div>\n <div\n class=\"bq-side-menu__item--label overflow-hidden text-ellipsis whitespace-nowrap\"\n ref={(labelElem) => (this.labelElem = labelElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"bq-side-menu__item--suffix ml-auto flex items-center\" part=\"suffix\">\n <slot name=\"suffix\" />\n </div>\n </button>\n );\n\n render() {\n return !this.collapse ? (\n this.menuItem()\n ) : (\n <bq-tooltip class=\"bq-side-menu__item--tooltip block\" placement=\"right\" exportparts=\"trigger, panel\">\n {this.textContent}\n {this.menuItem()}\n </bq-tooltip>\n );\n }\n}\n"],"mappings":";;;;6FAAA,MAAMA,EAAoB,i/vB,MCoDbC,EAAc,M,oHAIjBC,U,wBAWCC,YAMDC,OAAkB,MAGlBC,SAAoB,MAGpBC,SAAoB,MAUnBC,OAGAC,QAGAC,QAMT,gBAAAC,GACEC,KAAKC,kB,CAkBCA,iBAAmB,KACzB,IAAKD,KAAKT,UAAW,OACrBS,KAAKR,YAAcU,EAAeF,KAAKT,UAAUY,cAAc,QAAQ,EAGzEC,WAAcC,IACZ,GAAIL,KAAKL,SAAU,CACjBU,EAAGC,iBACHD,EAAGE,kBACH,M,CAGFP,KAAKJ,OAAOY,KAAKR,KAAKS,GAAG,EAG3BC,YAAeL,IACb,GAAIL,KAAKL,SAAU,CACjBU,EAAGC,iBACHD,EAAGE,kBACH,M,CAGFP,KAAKH,QAAQW,KAAKR,KAAKS,GAAG,EAG5BE,YAAeN,IACb,GAAIL,KAAKL,UAAYK,KAAKP,OAAQ,CAChCY,EAAGC,iBACHD,EAAGE,kBACH,M,CAGFP,KAAKF,QAAQU,KAAKR,KAAKS,GAAG,EAOpBG,SAAW,IACjBC,EAAA,UACEC,MAAO,CACL,qBAAsB,KACtBrB,OAAQO,KAAKP,OACbE,SAAUK,KAAKL,SACf,eAAgBK,KAAKN,UAEvBqB,OAAQf,KAAKI,WACbY,QAAShB,KAAKU,YACdO,QAASjB,KAAKW,YACC,gBAAAX,KAAKL,SAAW,OAAS,QACxCuB,KAAK,WACLC,SAAUnB,KAAKL,UAAW,EAAK,EAC/ByB,KAAK,UACLC,KAAK,QAELR,EAAA,OAAKC,MAAM,+CAA+CO,KAAK,UAC7DR,EAAA,QAAMS,KAAK,YAEbT,EAAA,OACEC,MAAM,4EACNS,IAAMhC,GAAeS,KAAKT,UAAYA,GAEtCsB,EAAA,QAAMW,aAAcxB,KAAKC,oBAE3BY,EAAA,OAAKC,MAAM,uDAAuDO,KAAK,UACrER,EAAA,QAAMS,KAAK,aAKjB,MAAAG,GACE,OAAQzB,KAAKN,SACXM,KAAKY,WAELC,EAAA,cAAYC,MAAM,oCAAoCY,UAAU,QAAQC,YAAY,kBACjF3B,KAAKR,YACLQ,KAAKY,W","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["DIALOG_SIZE","DIALOG_FOOTER_APPEARANCE","bqDialogCss","BqDialog","dialogElem","contentElem","footerElem","closeSlotElem","OPEN_CSS_CLASS","hasContent","hasFooter","border","disableBackdrop","disableCloseEscKeydown","disableCloseClickOutside","footerAppearance","hideCloseButton","open","size","checkPropValues","validatePropValue","this","el","handleOpenChange","handleOpen","handleClose","bqCancel","bqClose","bqOpen","bqAfterOpen","bqAfterClose","componentWillLoad","componentDidLoad","handleSlotChange","shadowRoot","querySelector","addEventListener","hide","disconnectedCallback","removeEventListener","handleMouseClick","event","button","rect","getBoundingClientRect","clientY","top","bottom","clientX","left","right","cancel","handleKeyDown","ev","isEscapeKey","key","preventDefault","show","emit","defaultPrevented","async","leave","close","handleTransitionEnd","classList","add","showModal","enter","remove","hasSlotContent","render","style","h","class","inert","undefined","ref","part","id","name","appearance","role","title","mainElem","onSlotchange"],"sources":["../../packages/beeq/src/components/dialog/bq-dialog.types.ts","../../packages/beeq/src/components/dialog/scss/bq-dialog.scss?tag=bq-dialog&encapsulation=shadow","../../packages/beeq/src/components/dialog/bq-dialog.tsx"],"sourcesContent":["export const DIALOG_SIZE = ['small', 'medium', 'large'] as const;\nexport type TDialogSize = (typeof DIALOG_SIZE)[number];\n\nexport const DIALOG_FOOTER_APPEARANCE = ['standard', 'highlight'] as const;\nexport type TDialogFooterAppearance = (typeof DIALOG_FOOTER_APPEARANCE)[number];\n\nexport const DIALOG_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TDialogBorderRadius = (typeof DIALOG_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Dialog styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-dialog.variables';\n\n:host {\n @apply invisible #{!important};\n}\n\n:host(.bq-dialog--open) {\n @apply visible #{!important};\n}\n\n/* --------------------------------- Dialog --------------------------------- */\n\n.bq-dialog {\n @apply fixed flex flex-col gap-[--bq-dialog--content-footer-gap] p-b-0 p-i-0;\n @apply bg-[--bq-dialog--background] text-[--bq-dialog--text-color] shadow-[shadow:--bq-dialog--box-shadow];\n @apply rounded-[--bq-dialog--border-radius] border-[length:--bq-dialog--border-width] border-[color:--bq-dialog--border-color];\n // If mobile resolution, dialog will be full width\n @apply is-[90vw];\n\n border-style: var(--bq-dialog--border-style);\n\n &.small {\n @apply sm:is-[--bq-dialog--width-small];\n }\n\n &.medium {\n @apply sm:is-[--bq-dialog--width-medium];\n }\n\n &.large {\n @apply sm:is-[--bq-dialog--width-large];\n }\n}\n\n/* ----------------------------- Dialog backdrop ---------------------------- */\n\n.bq-dialog::backdrop {\n @apply bg-[--bq-dialog--background-backdrop] opacity-0 transition-[opacity] duration-300 ease-in-out;\n}\n\n.bq-dialog[open]::backdrop {\n @apply opacity-60;\n}\n\n/* ------------------------------ Dialog header ----------------------------- */\n\n.bq-dialog--header {\n @apply sticky flex items-center gap-m p-b-[--bq-dialog--padding] p-be-0 p-i-[--bq-dialog--padding] inset-bs-0;\n}\n\n/* ------------------------------ Dialog footer ----------------------------- */\n\n.bq-dialog--footer {\n @apply sticky flex items-center justify-end gap-xs is-full p-b-[--bq-dialog--padding] p-bs-0 p-i-[--bq-dialog--padding] inset-bs-[100%];\n}\n\n/* --------------------------- Dialog close button -------------------------- */\n\n.bq-dialog--close {\n --bq-radius--m: theme(borderRadius.s);\n --bq-button--small-paddingX: theme(spacing.xs2);\n --bq-button--small-paddingY: theme(spacing.xs2);\n\n &::part(button) {\n @apply border-none;\n }\n}\n","import { Component, Element, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { DIALOG_FOOTER_APPEARANCE, DIALOG_SIZE } from './bq-dialog.types';\nimport type { TDialogBorderRadius, TDialogFooterAppearance, TDialogSize } from './bq-dialog.types';\nimport { enter, hasSlotContent, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Dialog component is used to display additional content or prompt a user for action.\n * It provides a way to display additional information, options, or controls in a separate, non-obstructive interface element.\n *\n * @example How to use it\n * ```html\n * <bq-dialog footer-appearance=\"standard\" border=\"m\" size=\"medium\">\n * <h5 class=\"bold flex items-center gap-s\" slot=\"title\">\n * <bq-icon name=\"info\" size=\"30\" color=\"text--accent\" role=\"img\" title=\"Info\"></bq-icon>\n * Title\n * </h5>\n * <p>\n * Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n * standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a\n * type specimen book.\n * </p>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"link\">Button</bq-button>\n * <bq-button variant=\"ghost\">Button</bq-button>\n * <bq-button variant=\"standard\" slot=\"footer\">Button</bq-button>\n * </div>\n * </bq-dialog>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/15b6fc-dialog\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {\"none\" | \"xs2\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"full\"} border - Border radius of the dialog component.\n * @attr {boolean} disable-backdrop - If true, the backdrop overlay won't be shown when the dialog opens.\n * @attr {boolean} disable-close-esc-keydown - If true, the dialog will not close when the [Esc] key is pressed.\n * @attr {boolean} disable-close-click-outside - If true, the dialog will not close when clicking on the backdrop overlay.\n * @attr {\"standard\" | \"highlight\"} footer-appearance - The appearance of the footer.\n * @attr {boolean} hide-close-button - If true, it hides the close button.\n * @attr {boolean} open - If true, the dialog will be shown as open.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the dialog.\n *\n * @method show - Open the dialog.\n * @method hide - Closes the dialog.\n * @method cancel - Dismiss or cancel the dialog.\n *\n * @event bqCancel - Callback handler emitted when the dialog has been canceled or dismissed.\n * @event bqClose - Callback handler emitted when the dialog will close.\n * @event bqOpen - Callback handler emitted when the dialog will open.\n * @event bqAfterOpen - Callback handler emitted when the dialog finish opening.\n * @event bqAfterClose - Callback handler emitted when the dialog finish closing.\n *\n * @slot title - The title content of the dialog.\n * @slot - The body content of the dialog.\n * @slot footer - The footer content of the dialog.\n * @slot button-close - The close button content of the dialog.\n *\n * @part body - The `<main>` that holds the dialog body content.\n * @part button-close - The button that closes the dialog on click.\n * @part content - The `<div>` container that holds the dialog title and body content.\n * @part dialog - The `<dialog>` wrapper container inside the shadow DOM.\n * @part footer - The `<footer>` that holds footer content.\n * @part header - The `<header>` that holds the icon, title, description and close button.\n * @part title - The `<div>` that holds the title content.\n *\n * @cssprop --bq-dialog--background - Dialog background color\n * @cssprop --bq-dialog--background-backdrop - Dialog backdrop background color\n * @cssprop --bq-dialog--box-shadow - Dialog box shadow\n * @cssprop --bq-dialog--border-color - Dialog border color\n * @cssprop --bq-dialog--border-style - Dialog border style\n * @cssprop --bq-dialog--border-width - Dialog border width\n * @cssprop --bq-dialog--border-radius - Dialog border radius\n * @cssprop --bq-dialog--padding - Dialog padding\n * @cssprop --bq-dialog--content-footer-gap - Dialog gap distance between content and footer elements\n * @cssprop --bq-dialog--title-body-gap - Dialog gap distance between title and body elements\n * @cssprop --bq-dialog--width-small - Dialog small width\n * @cssprop --bq-dialog--width-medium - Dialog medium width\n * @cssprop --bq-dialog--width-large - Dialog large width\n * @cssprop --bq-dialog-z-index - Dialog z-index applied when opened\n */\n@Component({\n tag: 'bq-dialog',\n styleUrl: './scss/bq-dialog.scss',\n shadow: true,\n})\nexport class BqDialog {\n // Own Properties\n // ====================\n\n private dialogElem: HTMLDialogElement;\n private contentElem: HTMLElement;\n private footerElem: HTMLElement;\n private closeSlotElem: HTMLElement;\n private OPEN_CSS_CLASS = 'bq-dialog--open';\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqDialogElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** Border radius of the dialog component */\n @Prop({ reflect: true }) border: TDialogBorderRadius = 'm';\n\n /** If true, the backdrop overlay won't be shown when the dialog opens */\n @Prop({ reflect: true }) disableBackdrop = false;\n\n /** If true, the dialog will not close when the [Esc] key is press */\n @Prop({ reflect: true }) disableCloseEscKeydown = false;\n\n /** If true, the dialog will not close when clicking on the backdrop overlay */\n @Prop({ reflect: true }) disableCloseClickOutside = false;\n\n /** The appearance of footer */\n @Prop({ reflect: true }) footerAppearance: TDialogFooterAppearance = 'standard';\n\n /** If true, it hides the close button */\n @Prop({ reflect: true }) hideCloseButton = false;\n\n /** If true, the dialog will be shown as open */\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n\n /** The size of the dialog */\n @Prop({ reflect: true, mutable: true }) size: TDialogSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n @Watch('footerAppearance')\n @Watch('size')\n checkPropValues() {\n validatePropValue(DIALOG_SIZE, 'large', this.el, 'size');\n validatePropValue(DIALOG_FOOTER_APPEARANCE, 'standard', this.el, 'footerAppearance');\n }\n\n @Watch('open')\n async handleOpenChange() {\n if (this.open) {\n await this.handleOpen();\n return;\n }\n\n await this.handleClose();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the dialog has been canceled or dismissed */\n @Event() bqCancel!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will close */\n @Event() bqClose!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will open */\n @Event() bqOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish opening */\n @Event() bqAfterOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish closing */\n @Event() bqAfterClose!: EventEmitter<void>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n this.handleOpenChange();\n\n this.closeSlotElem = this.el.shadowRoot.querySelector('slot[name=\"button-close\"]');\n this.closeSlotElem?.addEventListener('click', () => this.hide());\n }\n\n disconnectedCallback() {\n this.closeSlotElem?.removeEventListener('click', () => this.hide());\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.dialogElem || this.disableCloseClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.dialogElem.getBoundingClientRect();\n if (\n event.clientY < rect.top ||\n event.clientY > rect.bottom ||\n event.clientX < rect.left ||\n event.clientX > rect.right\n ) {\n await this.cancel();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(ev: KeyboardEvent) {\n const isEscapeKey = ev.key === 'Escape' || ev.key === 'Esc';\n if (!this.open || !this.dialogElem || !isEscapeKey) return;\n\n if (this.disableCloseEscKeydown) {\n ev.preventDefault();\n return;\n }\n\n await this.cancel();\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 /** Open the dialog */\n @Method()\n async show() {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n /** Closes the dialog */\n @Method()\n async hide() {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Dismiss or cancel the dialog */\n @Method()\n async cancel() {\n const ev = this.bqCancel.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleClose = async () => {\n if (!this.dialogElem) return;\n\n await leave(this.dialogElem);\n this.dialogElem.close();\n // Emit bqAfterClose event after the dialog is closed\n this.handleTransitionEnd();\n };\n\n private handleOpen = async () => {\n if (!this.dialogElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n // Show the dialog\n if (this.disableBackdrop) {\n this.dialogElem.show();\n } else {\n this.dialogElem.showModal();\n }\n await enter(this.dialogElem);\n // Emit bqAfterOpen event after the dialog is opened\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.contentElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-dialog--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <dialog\n style={style}\n class={{\n [`bq-dialog hidden ${this.size} m-auto focus-visible:outline-none`]: true,\n 'inset-be-[50%] inset-bs-[50%]': this.disableBackdrop,\n }}\n data-transition-enter=\"transition ease-in duration-300\"\n data-transition-enter-start=\"opacity-0 scale-90\"\n data-transition-enter-end=\"opacity-100 scale-100\"\n data-transition-leave=\"transition ease-out duration-300\"\n data-transition-leave-start=\"opacity-100 scale-100\"\n data-transition-leave-end=\"opacity-0 scale-90\"\n inert={this.open ? undefined : true}\n ref={(dialogElem) => (this.dialogElem = dialogElem)}\n aria-modal=\"true\"\n aria-labelledby=\"bq-dialog--title\"\n part=\"dialog\"\n >\n <main class=\"flex flex-col gap-[--bq-dialog--title-body-gap] overflow-hidden\" part=\"content\">\n <header class=\"bq-dialog--header\" part=\"header\">\n <div id=\"bq-dialog--title\" class=\"bq-dialog--title flex flex-1 items-center justify-between\" part=\"title\">\n <slot name=\"title\" />\n </div>\n <slot name=\"button-close\">\n {!this.hideCloseButton && (\n <bq-button class=\"bq-dialog--close\" appearance=\"text\" size=\"small\">\n <bq-icon class=\"cursor-pointer\" name=\"x\" role=\"img\" title=\"Close\" />\n </bq-button>\n )}\n </slot>\n </header>\n <div\n class={{\n '!hidden': !this.hasContent,\n 'overflow-y-auto p-i-[--bq-dialog--padding]': this.hasContent,\n '!p-be-[--bq-dialog--padding]': !this.hasFooter,\n }}\n ref={(mainElem) => (this.contentElem = mainElem)}\n part=\"body\"\n >\n <slot onSlotchange={this.handleSlotChange} />\n </div>\n </main>\n <footer\n class={{\n '!hidden': !this.hasFooter,\n 'bq-dialog--footer': this.hasFooter,\n 'bg-ui-alt !p-b-s': this.footerAppearance === 'highlight',\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </dialog>\n );\n }\n}\n"],"mappings":";;;;4KAAO,MAAMA,EAAc,CAAC,QAAS,SAAU,SAGxC,MAAMC,EAA2B,CAAC,WAAY,aCHrD,MAAMC,EAAc,+y0B,MCyFPC,EAAQ,M,sMAIXC,WACAC,YACAC,WACAC,cACAC,eAAiB,kB,wBAURC,WAAa,MACbC,UAAY,MAMJC,OAA8B,IAG9BC,gBAAkB,MAGlBC,uBAAyB,MAGzBC,yBAA2B,MAG3BC,iBAA4C,WAG5CC,gBAAkB,MAGHC,KAAgB,MAGhBC,KAAoB,SAM5D,eAAAC,GACEC,EAAkBpB,EAAa,QAASqB,KAAKC,GAAI,QACjDF,EAAkBnB,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