@beeq/core 1.8.3 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/dist/beeq/beeq.esm.js +1 -1
  2. package/dist/beeq/beeq.esm.js.map +1 -1
  3. package/dist/beeq/index.esm.js +1 -1
  4. package/dist/beeq/{p-b69f347d.entry.js → p-0338b2f9.entry.js} +2 -2
  5. package/dist/beeq/p-0338b2f9.entry.js.map +1 -0
  6. package/dist/beeq/{p-3806d9e3.entry.js → p-0b0a2c8a.entry.js} +2 -2
  7. package/dist/beeq/{p-803269b3.entry.js → p-0ee91951.entry.js} +2 -2
  8. package/dist/beeq/{p-3f654a12.entry.js → p-11f54320.entry.js} +2 -2
  9. package/dist/beeq/{p-66b6d69a.entry.js → p-1694f242.entry.js} +2 -2
  10. package/dist/beeq/{p-9a7af424.entry.js → p-21ef028f.entry.js} +2 -2
  11. package/dist/beeq/{p-7585f825.entry.js → p-226f3647.entry.js} +2 -2
  12. package/dist/beeq/{p-d7ce7165.js → p-260d4ca0.js} +2 -2
  13. package/dist/beeq/{p-d7ce7165.js.map → p-260d4ca0.js.map} +1 -1
  14. package/dist/beeq/{p-c42f9ac5.entry.js → p-2f55e11f.entry.js} +2 -2
  15. package/dist/beeq/{p-ee1ecb6e.entry.js → p-3ac6d599.entry.js} +2 -2
  16. package/dist/beeq/{p-a4e11bbc.entry.js → p-402449b6.entry.js} +2 -2
  17. package/dist/beeq/p-402449b6.entry.js.map +1 -0
  18. package/dist/beeq/{p-dbac0368.entry.js → p-4757fa1e.entry.js} +2 -2
  19. package/dist/beeq/p-4757fa1e.entry.js.map +1 -0
  20. package/dist/beeq/{p-3fe626f1.entry.js → p-49b40ec5.entry.js} +2 -2
  21. package/dist/beeq/p-49b40ec5.entry.js.map +1 -0
  22. package/dist/beeq/{p-a8075be3.entry.js → p-4fc0cf41.entry.js} +2 -2
  23. package/dist/beeq/{p-19f5a833.entry.js → p-5837a0ea.entry.js} +2 -2
  24. package/dist/beeq/p-5837a0ea.entry.js.map +1 -0
  25. package/dist/beeq/{p-dafa4162.entry.js → p-5e4edb8a.entry.js} +2 -2
  26. package/dist/beeq/{p-dafa4162.entry.js.map → p-5e4edb8a.entry.js.map} +1 -1
  27. package/dist/beeq/{p-7efff703.entry.js → p-5fe65f50.entry.js} +2 -2
  28. package/dist/beeq/{p-e8f147c2.entry.js → p-68944624.entry.js} +2 -2
  29. package/dist/beeq/p-68944624.entry.js.map +1 -0
  30. package/dist/beeq/{p-cb9fa154.entry.js → p-6aaa20c9.entry.js} +2 -2
  31. package/dist/beeq/p-6aaa20c9.entry.js.map +1 -0
  32. package/dist/beeq/{p-59a1b546.entry.js → p-6bc7c1e5.entry.js} +2 -2
  33. package/dist/beeq/p-6bc7c1e5.entry.js.map +1 -0
  34. package/dist/beeq/{p-bbaad491.entry.js → p-730ed434.entry.js} +2 -2
  35. package/dist/beeq/{p-4d21a49d.entry.js → p-7af08445.entry.js} +2 -2
  36. package/dist/beeq/{p-15bf8ffd.entry.js → p-7cfca18b.entry.js} +2 -2
  37. package/dist/beeq/p-7cfca18b.entry.js.map +1 -0
  38. package/dist/beeq/{p-ba1f9637.entry.js → p-7d161e60.entry.js} +2 -2
  39. package/dist/beeq/p-7d161e60.entry.js.map +1 -0
  40. package/dist/beeq/{p-19ea2c90.entry.js → p-7dda6cb9.entry.js} +2 -2
  41. package/dist/beeq/p-7dda6cb9.entry.js.map +1 -0
  42. package/dist/beeq/{p-5546f242.entry.js → p-85d7bc6c.entry.js} +2 -2
  43. package/dist/beeq/{p-4500ffe5.entry.js → p-93a3bcb5.entry.js} +2 -2
  44. package/dist/beeq/{p-90165aef.entry.js → p-96684c94.entry.js} +2 -2
  45. package/dist/beeq/{p-90165aef.entry.js.map → p-96684c94.entry.js.map} +1 -1
  46. package/dist/beeq/p-9ecdbeec.js +6 -0
  47. package/dist/beeq/p-a035d288.js +6 -0
  48. package/dist/beeq/{p-b129db1a.entry.js → p-a0b2db0b.entry.js} +2 -2
  49. package/dist/beeq/p-a52f0ff0.entry.js +6 -0
  50. package/dist/beeq/p-a52f0ff0.entry.js.map +1 -0
  51. package/dist/beeq/{p-f4e8ebd3.entry.js → p-a902a347.entry.js} +2 -2
  52. package/dist/beeq/{p-70310ac8.entry.js → p-aeb28fb3.entry.js} +2 -2
  53. package/dist/beeq/p-aeb28fb3.entry.js.map +1 -0
  54. package/dist/beeq/{p-b0d168c8.entry.js → p-af9c9769.entry.js} +2 -2
  55. package/dist/beeq/p-af9c9769.entry.js.map +1 -0
  56. package/dist/beeq/{p-b7b3f7c6.entry.js → p-b4ae4315.entry.js} +2 -2
  57. package/dist/beeq/p-c05c50bf.js +7 -0
  58. package/dist/beeq/p-c05c50bf.js.map +1 -0
  59. package/dist/beeq/{p-e655938a.entry.js → p-d04883ab.entry.js} +2 -2
  60. package/dist/beeq/{p-a8d64d1b.entry.js → p-d4676bbd.entry.js} +2 -2
  61. package/dist/beeq/{p-39a80765.entry.js → p-e29c46f5.entry.js} +2 -2
  62. package/dist/beeq/p-e29c46f5.entry.js.map +1 -0
  63. package/dist/beeq/{p-8ed41b69.entry.js → p-e827f88d.entry.js} +2 -2
  64. package/dist/beeq/{p-65d67b85.entry.js → p-f7e3eff3.entry.js} +2 -2
  65. package/dist/beeq/p-f7e3eff3.entry.js.map +1 -0
  66. package/dist/beeq/{p-ed569a61.entry.js → p-f85f1705.entry.js} +2 -2
  67. package/dist/beeq.html-custom-data.json +59 -59
  68. package/dist/cjs/{assetsPath-32c4030b.js → assetsPath-bff6e1f9.js} +2 -2
  69. package/dist/cjs/{assetsPath-32c4030b.js.map → assetsPath-bff6e1f9.js.map} +1 -1
  70. package/dist/cjs/beeq.cjs.js +3 -3
  71. package/dist/cjs/beeq.cjs.js.map +1 -1
  72. package/dist/cjs/bq-accordion-group.cjs.entry.js +1 -1
  73. package/dist/cjs/bq-accordion.cjs.entry.js +7 -8
  74. package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
  75. package/dist/cjs/bq-alert.cjs.entry.js +8 -9
  76. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  77. package/dist/cjs/bq-avatar.cjs.entry.js +1 -1
  78. package/dist/cjs/bq-badge.cjs.entry.js +8 -5
  79. package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
  80. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +2 -2
  81. package/dist/cjs/bq-breadcrumb.cjs.entry.js +5 -2
  82. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  83. package/dist/cjs/bq-button_2.cjs.entry.js +9 -6
  84. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  85. package/dist/cjs/bq-card.cjs.entry.js +1 -1
  86. package/dist/cjs/bq-checkbox.cjs.entry.js +1 -1
  87. package/dist/cjs/bq-date-picker.cjs.entry.js +97 -17
  88. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  89. package/dist/cjs/bq-dialog.cjs.entry.js +8 -9
  90. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  91. package/dist/cjs/bq-divider.cjs.entry.js +2 -2
  92. package/dist/cjs/bq-drawer.cjs.entry.js +10 -7
  93. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  94. package/dist/cjs/bq-dropdown_2.cjs.entry.js +1 -1
  95. package/dist/cjs/bq-empty-state.cjs.entry.js +10 -9
  96. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  97. package/dist/cjs/bq-input.cjs.entry.js +11 -14
  98. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  99. package/dist/cjs/bq-notification.cjs.entry.js +8 -7
  100. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  101. package/dist/cjs/bq-option-group.cjs.entry.js +1 -1
  102. package/dist/cjs/bq-option-list_2.cjs.entry.js +8 -5
  103. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  104. package/dist/cjs/bq-option.cjs.entry.js +10 -9
  105. package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
  106. package/dist/cjs/bq-page-title.cjs.entry.js +7 -4
  107. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  108. package/dist/cjs/bq-progress.cjs.entry.js +1 -1
  109. package/dist/cjs/bq-radio-group.cjs.entry.js +1 -1
  110. package/dist/cjs/bq-radio.cjs.entry.js +1 -1
  111. package/dist/cjs/bq-select.cjs.entry.js +10 -15
  112. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  113. package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
  114. package/dist/cjs/bq-side-menu.cjs.entry.js +1 -1
  115. package/dist/cjs/bq-slider.cjs.entry.js +1 -1
  116. package/dist/cjs/bq-spinner.cjs.entry.js +8 -6
  117. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  118. package/dist/cjs/bq-status.cjs.entry.js +1 -1
  119. package/dist/cjs/bq-step-item.cjs.entry.js +1 -1
  120. package/dist/cjs/bq-steps.cjs.entry.js +1 -1
  121. package/dist/cjs/bq-switch.cjs.entry.js +2 -2
  122. package/dist/cjs/bq-tab-group.cjs.entry.js +1 -1
  123. package/dist/cjs/bq-tab.cjs.entry.js +7 -4
  124. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  125. package/dist/cjs/bq-textarea.cjs.entry.js +7 -8
  126. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  127. package/dist/cjs/bq-toast.cjs.entry.js +1 -1
  128. package/dist/cjs/bq-tooltip.cjs.entry.js +1 -1
  129. package/dist/cjs/{index-0c8d249a.js → index-6fcc2c3c.js} +56 -20
  130. package/dist/cjs/index-6fcc2c3c.js.map +1 -0
  131. package/dist/cjs/index.cjs.js +4 -4
  132. package/dist/cjs/{isDefined-5e8aae9d.js → isDefined-237b1214.js} +2 -2
  133. package/dist/cjs/{isDefined-5e8aae9d.js.map → isDefined-237b1214.js.map} +1 -1
  134. package/dist/cjs/loader.cjs.js +2 -2
  135. package/dist/cjs/{slot-2fee189a.js → slot-c3eeb29f.js} +3 -1
  136. package/dist/cjs/slot-c3eeb29f.js.map +1 -0
  137. package/dist/collection/collection-manifest.json +1 -1
  138. package/dist/collection/components/accordion/bq-accordion.js +5 -6
  139. package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
  140. package/dist/collection/components/alert/bq-alert.js +6 -7
  141. package/dist/collection/components/alert/bq-alert.js.map +1 -1
  142. package/dist/collection/components/badge/bq-badge.js +6 -3
  143. package/dist/collection/components/badge/bq-badge.js.map +1 -1
  144. package/dist/collection/components/breadcrumb/bq-breadcrumb.js +4 -1
  145. package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
  146. package/dist/collection/components/button/bq-button.js +5 -2
  147. package/dist/collection/components/button/bq-button.js.map +1 -1
  148. package/dist/collection/components/date-picker/bq-date-picker.js +27 -14
  149. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  150. package/dist/collection/components/date-picker/bq-date-picker.types.js.map +1 -1
  151. package/dist/collection/components/date-picker/helper/callyLibrary.js +73 -0
  152. package/dist/collection/components/date-picker/helper/callyLibrary.js.map +1 -0
  153. package/dist/collection/components/dialog/bq-dialog.js +6 -7
  154. package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
  155. package/dist/collection/components/drawer/bq-drawer.js +7 -4
  156. package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
  157. package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
  158. package/dist/collection/components/empty-state/bq-empty-state.js +8 -7
  159. package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
  160. package/dist/collection/components/input/bq-input.js +8 -11
  161. package/dist/collection/components/input/bq-input.js.map +1 -1
  162. package/dist/collection/components/notification/bq-notification.js +6 -5
  163. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  164. package/dist/collection/components/option/bq-option.js +8 -7
  165. package/dist/collection/components/option/bq-option.js.map +1 -1
  166. package/dist/collection/components/page-title/bq-page-title.js +5 -2
  167. package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
  168. package/dist/collection/components/select/bq-select.js +6 -11
  169. package/dist/collection/components/select/bq-select.js.map +1 -1
  170. package/dist/collection/components/select/scss/bq-select.css +1 -1
  171. package/dist/collection/components/spinner/bq-spinner.js +6 -4
  172. package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
  173. package/dist/collection/components/tab/bq-tab.js +5 -2
  174. package/dist/collection/components/tab/bq-tab.js.map +1 -1
  175. package/dist/collection/components/tag/bq-tag.js +6 -3
  176. package/dist/collection/components/tag/bq-tag.js.map +1 -1
  177. package/dist/collection/components/textarea/bq-textarea.js +5 -6
  178. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  179. package/dist/collection/shared/utils/slot.js +2 -0
  180. package/dist/collection/shared/utils/slot.js.map +1 -1
  181. package/dist/components/bq-accordion-group.js +1 -1
  182. package/dist/components/bq-accordion.js +1 -1
  183. package/dist/components/bq-accordion.js.map +1 -1
  184. package/dist/components/bq-alert.js +1 -1
  185. package/dist/components/bq-alert.js.map +1 -1
  186. package/dist/components/bq-avatar.js +1 -1
  187. package/dist/components/bq-badge.js +1 -1
  188. package/dist/components/bq-breadcrumb-item.js +1 -1
  189. package/dist/components/bq-breadcrumb.js +1 -1
  190. package/dist/components/bq-breadcrumb.js.map +1 -1
  191. package/dist/components/bq-button.js +1 -1
  192. package/dist/components/bq-card.js +1 -1
  193. package/dist/components/bq-checkbox.js +1 -1
  194. package/dist/components/bq-date-picker.js +1 -1
  195. package/dist/components/bq-date-picker.js.map +1 -1
  196. package/dist/components/bq-dialog.js +1 -1
  197. package/dist/components/bq-dialog.js.map +1 -1
  198. package/dist/components/bq-divider.js +1 -1
  199. package/dist/components/bq-drawer.js +1 -1
  200. package/dist/components/bq-drawer.js.map +1 -1
  201. package/dist/components/bq-dropdown.js +1 -1
  202. package/dist/components/bq-empty-state.js +1 -1
  203. package/dist/components/bq-empty-state.js.map +1 -1
  204. package/dist/components/bq-icon.js +1 -1
  205. package/dist/components/bq-input.js +1 -1
  206. package/dist/components/bq-input.js.map +1 -1
  207. package/dist/components/bq-notification.js +1 -1
  208. package/dist/components/bq-notification.js.map +1 -1
  209. package/dist/components/bq-option-group.js +1 -1
  210. package/dist/components/bq-option-list.js +1 -1
  211. package/dist/components/bq-option.js +1 -1
  212. package/dist/components/bq-option.js.map +1 -1
  213. package/dist/components/bq-page-title.js +1 -1
  214. package/dist/components/bq-page-title.js.map +1 -1
  215. package/dist/components/bq-panel.js +1 -1
  216. package/dist/components/bq-progress.js +1 -1
  217. package/dist/components/bq-radio-group.js +1 -1
  218. package/dist/components/bq-radio.js +1 -1
  219. package/dist/components/bq-select.js +1 -1
  220. package/dist/components/bq-select.js.map +1 -1
  221. package/dist/components/bq-side-menu-item.js +1 -1
  222. package/dist/components/bq-side-menu.js +1 -1
  223. package/dist/components/bq-slider.js +1 -1
  224. package/dist/components/bq-spinner.js +1 -1
  225. package/dist/components/bq-spinner.js.map +1 -1
  226. package/dist/components/bq-status.js +1 -1
  227. package/dist/components/bq-step-item.js +1 -1
  228. package/dist/components/bq-steps.js +1 -1
  229. package/dist/components/bq-switch.js +1 -1
  230. package/dist/components/bq-tab-group.js +1 -1
  231. package/dist/components/bq-tab.js +1 -1
  232. package/dist/components/bq-tab.js.map +1 -1
  233. package/dist/components/bq-tag.js +1 -1
  234. package/dist/components/bq-textarea.js +1 -1
  235. package/dist/components/bq-textarea.js.map +1 -1
  236. package/dist/components/bq-toast.js +1 -1
  237. package/dist/components/bq-tooltip.js +1 -1
  238. package/dist/components/index.js +1 -1
  239. package/dist/components/{p-c58e0d87.js → p-1629a472.js} +2 -2
  240. package/dist/components/{p-ac26ffcd.js → p-242345e1.js} +2 -2
  241. package/dist/components/{p-d7ce7165.js → p-260d4ca0.js} +2 -2
  242. package/dist/components/{p-d7ce7165.js.map → p-260d4ca0.js.map} +1 -1
  243. package/dist/components/{p-a02c6b73.js → p-2aab0744.js} +2 -2
  244. package/dist/components/p-2aab0744.js.map +1 -0
  245. package/dist/components/p-39d794c1.js +6 -0
  246. package/dist/components/{p-5b34bd04.js → p-51027528.js} +2 -2
  247. package/dist/components/p-66fcce92.js +6 -0
  248. package/dist/components/p-66fcce92.js.map +1 -0
  249. package/dist/components/{p-8d8eeb62.js → p-afef286d.js} +2 -2
  250. package/dist/components/{p-f5588ccd.js → p-b5306ce3.js} +2 -2
  251. package/dist/components/p-b5306ce3.js.map +1 -0
  252. package/dist/components/{p-b50adb19.js → p-dfb2cbb5.js} +2 -2
  253. package/dist/components/p-f0fcfdea.js +6 -0
  254. package/dist/components/p-f0fcfdea.js.map +1 -0
  255. package/dist/components/{p-9a115ee5.js → p-fd965589.js} +2 -2
  256. package/dist/custom-elements.json +724 -791
  257. package/dist/esm/{assetsPath-57848212.js → assetsPath-14f18f9a.js} +2 -2
  258. package/dist/esm/{assetsPath-57848212.js.map → assetsPath-14f18f9a.js.map} +1 -1
  259. package/dist/esm/beeq.js +4 -4
  260. package/dist/esm/beeq.js.map +1 -1
  261. package/dist/esm/bq-accordion-group.entry.js +1 -1
  262. package/dist/esm/bq-accordion.entry.js +7 -8
  263. package/dist/esm/bq-accordion.entry.js.map +1 -1
  264. package/dist/esm/bq-alert.entry.js +8 -9
  265. package/dist/esm/bq-alert.entry.js.map +1 -1
  266. package/dist/esm/bq-avatar.entry.js +1 -1
  267. package/dist/esm/bq-badge.entry.js +8 -5
  268. package/dist/esm/bq-badge.entry.js.map +1 -1
  269. package/dist/esm/bq-breadcrumb-item.entry.js +2 -2
  270. package/dist/esm/bq-breadcrumb.entry.js +5 -2
  271. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  272. package/dist/esm/bq-button_2.entry.js +9 -6
  273. package/dist/esm/bq-button_2.entry.js.map +1 -1
  274. package/dist/esm/bq-card.entry.js +1 -1
  275. package/dist/esm/bq-checkbox.entry.js +1 -1
  276. package/dist/esm/bq-date-picker.entry.js +97 -17
  277. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  278. package/dist/esm/bq-dialog.entry.js +8 -9
  279. package/dist/esm/bq-dialog.entry.js.map +1 -1
  280. package/dist/esm/bq-divider.entry.js +2 -2
  281. package/dist/esm/bq-drawer.entry.js +10 -7
  282. package/dist/esm/bq-drawer.entry.js.map +1 -1
  283. package/dist/esm/bq-dropdown_2.entry.js +1 -1
  284. package/dist/esm/bq-empty-state.entry.js +10 -9
  285. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  286. package/dist/esm/bq-input.entry.js +11 -14
  287. package/dist/esm/bq-input.entry.js.map +1 -1
  288. package/dist/esm/bq-notification.entry.js +8 -7
  289. package/dist/esm/bq-notification.entry.js.map +1 -1
  290. package/dist/esm/bq-option-group.entry.js +1 -1
  291. package/dist/esm/bq-option-list_2.entry.js +8 -5
  292. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  293. package/dist/esm/bq-option.entry.js +10 -9
  294. package/dist/esm/bq-option.entry.js.map +1 -1
  295. package/dist/esm/bq-page-title.entry.js +7 -4
  296. package/dist/esm/bq-page-title.entry.js.map +1 -1
  297. package/dist/esm/bq-progress.entry.js +1 -1
  298. package/dist/esm/bq-radio-group.entry.js +1 -1
  299. package/dist/esm/bq-radio.entry.js +1 -1
  300. package/dist/esm/bq-select.entry.js +10 -15
  301. package/dist/esm/bq-select.entry.js.map +1 -1
  302. package/dist/esm/bq-side-menu-item.entry.js +2 -2
  303. package/dist/esm/bq-side-menu.entry.js +1 -1
  304. package/dist/esm/bq-slider.entry.js +1 -1
  305. package/dist/esm/bq-spinner.entry.js +8 -6
  306. package/dist/esm/bq-spinner.entry.js.map +1 -1
  307. package/dist/esm/bq-status.entry.js +1 -1
  308. package/dist/esm/bq-step-item.entry.js +1 -1
  309. package/dist/esm/bq-steps.entry.js +1 -1
  310. package/dist/esm/bq-switch.entry.js +2 -2
  311. package/dist/esm/bq-tab-group.entry.js +1 -1
  312. package/dist/esm/bq-tab.entry.js +7 -4
  313. package/dist/esm/bq-tab.entry.js.map +1 -1
  314. package/dist/esm/bq-textarea.entry.js +7 -8
  315. package/dist/esm/bq-textarea.entry.js.map +1 -1
  316. package/dist/esm/bq-toast.entry.js +1 -1
  317. package/dist/esm/bq-tooltip.entry.js +1 -1
  318. package/dist/esm/{index-59610291.js → index-4e4c39e8.js} +56 -20
  319. package/dist/esm/index-4e4c39e8.js.map +1 -0
  320. package/dist/esm/index.js +5 -5
  321. package/dist/esm/{isDefined-30b8b652.js → isDefined-7a919d19.js} +2 -2
  322. package/dist/esm/{isDefined-30b8b652.js.map → isDefined-7a919d19.js.map} +1 -1
  323. package/dist/esm/loader.js +3 -3
  324. package/dist/esm/{slot-58bfedb5.js → slot-be230a01.js} +3 -1
  325. package/dist/esm/slot-be230a01.js.map +1 -0
  326. package/dist/hydrate/index.d.ts +22 -5
  327. package/dist/hydrate/index.js +674 -1297
  328. package/dist/hydrate/index.mjs +674 -1297
  329. package/dist/stencil.config.js +20 -17
  330. package/dist/stencil.config.js.map +1 -1
  331. package/dist/types/components/accordion/bq-accordion.d.ts +1 -2
  332. package/dist/types/components/alert/bq-alert.d.ts +1 -2
  333. package/dist/types/components/badge/bq-badge.d.ts +2 -1
  334. package/dist/types/components/breadcrumb/bq-breadcrumb.d.ts +1 -0
  335. package/dist/types/components/button/bq-button.d.ts +1 -0
  336. package/dist/types/components/date-picker/bq-date-picker.d.ts +3 -4
  337. package/dist/types/components/date-picker/bq-date-picker.types.d.ts +16 -0
  338. package/dist/types/components/date-picker/helper/callyLibrary.d.ts +11 -0
  339. package/dist/types/components/dialog/bq-dialog.d.ts +1 -2
  340. package/dist/types/components/drawer/bq-drawer.d.ts +1 -0
  341. package/dist/types/components/empty-state/bq-empty-state.d.ts +2 -2
  342. package/dist/types/components/input/bq-input.d.ts +2 -4
  343. package/dist/types/components/notification/bq-notification.d.ts +2 -2
  344. package/dist/types/components/option/bq-option.d.ts +2 -2
  345. package/dist/types/components/page-title/bq-page-title.d.ts +1 -0
  346. package/dist/types/components/select/bq-select.d.ts +1 -4
  347. package/dist/types/components/tab/bq-tab.d.ts +1 -0
  348. package/dist/types/components/tag/bq-tag.d.ts +1 -0
  349. package/dist/types/components/textarea/bq-textarea.d.ts +1 -2
  350. package/dist/types/global.d.ts +0 -10
  351. package/package.json +2 -3
  352. package/dist/beeq/p-15bf8ffd.entry.js.map +0 -1
  353. package/dist/beeq/p-19ea2c90.entry.js.map +0 -1
  354. package/dist/beeq/p-19f5a833.entry.js.map +0 -1
  355. package/dist/beeq/p-34611c2f.js +0 -6
  356. package/dist/beeq/p-34611c2f.js.map +0 -1
  357. package/dist/beeq/p-39a80765.entry.js.map +0 -1
  358. package/dist/beeq/p-3fe626f1.entry.js.map +0 -1
  359. package/dist/beeq/p-4a3784e1.js +0 -7
  360. package/dist/beeq/p-4a3784e1.js.map +0 -1
  361. package/dist/beeq/p-59a1b546.entry.js.map +0 -1
  362. package/dist/beeq/p-65d67b85.entry.js.map +0 -1
  363. package/dist/beeq/p-6bea33f4.entry.js +0 -6
  364. package/dist/beeq/p-6bea33f4.entry.js.map +0 -1
  365. package/dist/beeq/p-70310ac8.entry.js.map +0 -1
  366. package/dist/beeq/p-a4e11bbc.entry.js.map +0 -1
  367. package/dist/beeq/p-b0d168c8.entry.js.map +0 -1
  368. package/dist/beeq/p-b69f347d.entry.js.map +0 -1
  369. package/dist/beeq/p-ba1f9637.entry.js.map +0 -1
  370. package/dist/beeq/p-cb9fa154.entry.js.map +0 -1
  371. package/dist/beeq/p-cf923c68.js +0 -6
  372. package/dist/beeq/p-dbac0368.entry.js.map +0 -1
  373. package/dist/beeq/p-e4dd6ff4.js +0 -6
  374. package/dist/beeq/p-e8f147c2.entry.js.map +0 -1
  375. package/dist/cjs/cally-1bde2e82.js +0 -1162
  376. package/dist/cjs/cally-1bde2e82.js.map +0 -1
  377. package/dist/cjs/index-0c8d249a.js.map +0 -1
  378. package/dist/cjs/slot-2fee189a.js.map +0 -1
  379. package/dist/components/p-34611c2f.js +0 -6
  380. package/dist/components/p-34611c2f.js.map +0 -1
  381. package/dist/components/p-37483f1c.js +0 -6
  382. package/dist/components/p-37483f1c.js.map +0 -1
  383. package/dist/components/p-6e0c7ab4.js +0 -6
  384. package/dist/components/p-a02c6b73.js.map +0 -1
  385. package/dist/components/p-d16482dc.js +0 -6
  386. package/dist/components/p-d16482dc.js.map +0 -1
  387. package/dist/components/p-f5588ccd.js.map +0 -1
  388. package/dist/esm/cally-49a83be1.js +0 -1157
  389. package/dist/esm/cally-49a83be1.js.map +0 -1
  390. package/dist/esm/index-59610291.js.map +0 -1
  391. package/dist/esm/slot-58bfedb5.js.map +0 -1
  392. /package/dist/beeq/{p-3806d9e3.entry.js.map → p-0b0a2c8a.entry.js.map} +0 -0
  393. /package/dist/beeq/{p-803269b3.entry.js.map → p-0ee91951.entry.js.map} +0 -0
  394. /package/dist/beeq/{p-3f654a12.entry.js.map → p-11f54320.entry.js.map} +0 -0
  395. /package/dist/beeq/{p-66b6d69a.entry.js.map → p-1694f242.entry.js.map} +0 -0
  396. /package/dist/beeq/{p-9a7af424.entry.js.map → p-21ef028f.entry.js.map} +0 -0
  397. /package/dist/beeq/{p-7585f825.entry.js.map → p-226f3647.entry.js.map} +0 -0
  398. /package/dist/beeq/{p-c42f9ac5.entry.js.map → p-2f55e11f.entry.js.map} +0 -0
  399. /package/dist/beeq/{p-ee1ecb6e.entry.js.map → p-3ac6d599.entry.js.map} +0 -0
  400. /package/dist/beeq/{p-a8075be3.entry.js.map → p-4fc0cf41.entry.js.map} +0 -0
  401. /package/dist/beeq/{p-7efff703.entry.js.map → p-5fe65f50.entry.js.map} +0 -0
  402. /package/dist/beeq/{p-bbaad491.entry.js.map → p-730ed434.entry.js.map} +0 -0
  403. /package/dist/beeq/{p-4d21a49d.entry.js.map → p-7af08445.entry.js.map} +0 -0
  404. /package/dist/beeq/{p-5546f242.entry.js.map → p-85d7bc6c.entry.js.map} +0 -0
  405. /package/dist/beeq/{p-4500ffe5.entry.js.map → p-93a3bcb5.entry.js.map} +0 -0
  406. /package/dist/beeq/{p-e4dd6ff4.js.map → p-9ecdbeec.js.map} +0 -0
  407. /package/dist/beeq/{p-cf923c68.js.map → p-a035d288.js.map} +0 -0
  408. /package/dist/beeq/{p-b129db1a.entry.js.map → p-a0b2db0b.entry.js.map} +0 -0
  409. /package/dist/beeq/{p-f4e8ebd3.entry.js.map → p-a902a347.entry.js.map} +0 -0
  410. /package/dist/beeq/{p-b7b3f7c6.entry.js.map → p-b4ae4315.entry.js.map} +0 -0
  411. /package/dist/beeq/{p-e655938a.entry.js.map → p-d04883ab.entry.js.map} +0 -0
  412. /package/dist/beeq/{p-a8d64d1b.entry.js.map → p-d4676bbd.entry.js.map} +0 -0
  413. /package/dist/beeq/{p-8ed41b69.entry.js.map → p-e827f88d.entry.js.map} +0 -0
  414. /package/dist/beeq/{p-ed569a61.entry.js.map → p-f85f1705.entry.js.map} +0 -0
  415. /package/dist/components/{p-c58e0d87.js.map → p-1629a472.js.map} +0 -0
  416. /package/dist/components/{p-ac26ffcd.js.map → p-242345e1.js.map} +0 -0
  417. /package/dist/components/{p-6e0c7ab4.js.map → p-39d794c1.js.map} +0 -0
  418. /package/dist/components/{p-5b34bd04.js.map → p-51027528.js.map} +0 -0
  419. /package/dist/components/{p-8d8eeb62.js.map → p-afef286d.js.map} +0 -0
  420. /package/dist/components/{p-b50adb19.js.map → p-dfb2cbb5.js.map} +0 -0
  421. /package/dist/components/{p-9a115ee5.js.map → p-fd965589.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"bq-empty-state.js","sourceRoot":"","sources":["../../../../../../src/components/empty-state/bq-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAmB,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;A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AAI,CAAC,SAAS;oBACjD,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS;oBAClD,SAAS,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,SAAS;iBACnD,EACD,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,MAAM;gBAEX,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,uBAAuB,GAAI,CAC5D;YACN,4DAAK,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EAAE,IAAI,EAAC,QAAQ;gBACvF,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,sBAAsB,GAAI,CAC7D,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { EMPTY_STATE_SIZE, SIZE_TO_VALUE_MAP, TEmptyStateSize } from './bq-empty-state.types';\nimport { hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * An Empty State is a UI component displayed when there is no data or content available, often used in dynamic or inactive application states.\n *\n * @example How to use it\n * ```html\n * <bq-empty-state size=\"medium\">Title</bq-empty-state>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/673ae0-empty-state/b/09d7b1\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"large\" | \"medium\" | \"small\"} size - The size of the empty state component\n *\n * @slot thumbnail - The element that wraps the thumbnail element\n * @slot body - The content to be displayed after the thumbnail section\n * @slot footer - The content to be displayed after the body section as footer\n *\n * @part body - The container `<div>` that wraps the alert description content\n * @part footer - The container `<div>` that wraps the alert footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon size based on the empty state size (small, medium, large)\n * @part thumbnail - The container `<div>` that wraps the thumbnail element\n * @part title - The container `<div>` that wraps the empty state title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n */\n\n@Component({\n tag: 'bq-empty-state',\n styleUrl: './scss/bq-empty-state.scss',\n shadow: true,\n})\nexport class BqEmptyState {\n // Own Properties\n // ====================\n\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqEmptyStateElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasBody = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** The size of the empty state component */\n @Prop({ reflect: true, mutable: true }) size: TEmptyStateSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n checkPropValues() {\n validatePropValue(EMPTY_STATE_SIZE, 'medium', this.el, 'size');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n // 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 handleContentSlotChange = () => {\n this.hasBody = hasSlotContent(this.bodyElem, 'body');\n };\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconSize(): number {\n return SIZE_TO_VALUE_MAP[this.size] || SIZE_TO_VALUE_MAP.medium;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"inline-flex flex-col items-center\" part=\"wrapper\">\n <div\n class={{\n 'm-be-m': this.size === 'small',\n 'm-be-xl': this.size === 'medium',\n 'm-be-xxl': this.size === 'large',\n }}\n part=\"thumbnail\"\n >\n <slot name=\"thumbnail\">\n <bq-icon size={this.iconSize} name=\"database\" part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n <div\n class={{\n 'font-bold leading-regular text-primary': true,\n 'text-m': this.size === 'small',\n 'text-l': this.size === 'medium',\n 'text-xxl2': this.size === 'large',\n 'm-be-xs': this.size === 'small' && this.hasBody,\n 'm-be-m': this.size === 'medium' && this.hasBody,\n 'm-be-l': this.size === 'large' && this.hasBody,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n <div\n class={{\n 'font-normal leading-regular': true,\n 'text-s': this.size === 'small',\n 'text-m': this.size === 'medium',\n 'text-l': this.size === 'large',\n 'm-be-m': this.size === 'small' && this.hasFooter,\n 'm-be-l': this.size === 'medium' && this.hasFooter,\n 'm-be-xl': this.size === 'large' && this.hasFooter,\n }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleContentSlotChange} />\n </div>\n <div class=\"flex items-start gap-xs\" ref={(div) => (this.footerElem = div)} part=\"footer\">\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-empty-state.js","sourceRoot":"","sources":["../../../../../../src/components/empty-state/bq-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAmB,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,MAAM,OAAO,YAAY;IACvB,iBAAiB;IACjB,uBAAuB;IAEf,QAAQ,CAAiB;IACzB,UAAU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IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,SAAS;iBACnD,EACD,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,MAAM;gBAEX,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACrD;YACN,4DAAK,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EAAE,IAAI,EAAC,QAAQ;gBACvF,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { EMPTY_STATE_SIZE, SIZE_TO_VALUE_MAP, TEmptyStateSize } from './bq-empty-state.types';\nimport { hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * An Empty State is a UI component displayed when there is no data or content available, often used in dynamic or inactive application states.\n *\n * @example How to use it\n * ```html\n * <bq-empty-state size=\"medium\">Title</bq-empty-state>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/673ae0-empty-state/b/09d7b1\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"large\" | \"medium\" | \"small\"} size - The size of the empty state component\n *\n * @slot thumbnail - The element that wraps the thumbnail element\n * @slot body - The content to be displayed after the thumbnail section\n * @slot footer - The content to be displayed after the body section as footer\n *\n * @part body - The container `<div>` that wraps the alert description content\n * @part footer - The container `<div>` that wraps the alert footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon size based on the empty state size (small, medium, large)\n * @part thumbnail - The container `<div>` that wraps the thumbnail element\n * @part title - The container `<div>` that wraps the empty state title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n */\n\n@Component({\n tag: 'bq-empty-state',\n styleUrl: './scss/bq-empty-state.scss',\n shadow: true,\n})\nexport class BqEmptyState {\n // Own Properties\n // ====================\n\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqEmptyStateElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasBody = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** The size of the empty state component */\n @Prop({ reflect: true, mutable: true }) size: TEmptyStateSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n checkPropValues() {\n validatePropValue(EMPTY_STATE_SIZE, 'medium', this.el, 'size');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\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 this.hasBody = hasSlotContent(this.bodyElem, 'body');\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconSize(): number {\n return SIZE_TO_VALUE_MAP[this.size] || SIZE_TO_VALUE_MAP.medium;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"inline-flex flex-col items-center\" part=\"wrapper\">\n <div\n class={{\n 'm-be-m': this.size === 'small',\n 'm-be-xl': this.size === 'medium',\n 'm-be-xxl': this.size === 'large',\n }}\n part=\"thumbnail\"\n >\n <slot name=\"thumbnail\">\n <bq-icon size={this.iconSize} name=\"database\" part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n <div\n class={{\n 'font-bold leading-regular text-primary': true,\n 'text-m': this.size === 'small',\n 'text-l': this.size === 'medium',\n 'text-xxl2': this.size === 'large',\n 'm-be-xs': this.size === 'small' && this.hasBody,\n 'm-be-m': this.size === 'medium' && this.hasBody,\n 'm-be-l': this.size === 'large' && this.hasBody,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n <div\n class={{\n 'font-normal leading-regular': true,\n 'text-s': this.size === 'small',\n 'text-m': this.size === 'medium',\n 'text-l': this.size === 'large',\n 'm-be-m': this.size === 'small' && this.hasFooter,\n 'm-be-l': this.size === 'medium' && this.hasFooter,\n 'm-be-xl': this.size === 'large' && this.hasFooter,\n }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"flex items-start gap-xs\" ref={(div) => (this.footerElem = div)} part=\"footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"]}
@@ -242,6 +242,9 @@ export class BqInput {
242
242
  componentWillLoad() {
243
243
  this.handleValueChange();
244
244
  }
245
+ componentDidLoad() {
246
+ this.handleSlotChange();
247
+ }
245
248
  formAssociatedCallback() {
246
249
  this.setFormValue(this.value?.toString());
247
250
  this.updateFormValidity();
@@ -335,35 +338,29 @@ export class BqInput {
335
338
  internals?.states.add('valid');
336
339
  internals?.setValidity({});
337
340
  };
338
- handleLabelSlotChange = () => {
341
+ handleSlotChange = () => {
339
342
  this.hasLabel = hasSlotContent(this.labelElem);
340
- };
341
- handlePrefixSlotChange = () => {
342
343
  this.hasPrefix = hasSlotContent(this.prefixElem);
343
- };
344
- handleSuffixSlotChange = () => {
345
344
  this.hasSuffix = hasSlotContent(this.suffixElem);
346
- };
347
- handleHelperTextSlotChange = () => {
348
345
  this.hasHelperText = hasSlotContent(this.helperTextElem);
349
346
  };
350
347
  // render() function
351
348
  // Always the last one in the class.
352
349
  // ===================================
353
350
  render() {
354
- return (h("div", { key: '9023d1623163d781145e9f165c10b1801579d7bb', class: "bq-input", part: "base" }, h("label", { key: 'c041591b62aab8cbb8669bf4e320e9559288502d', class: { 'bq-input--label': true, '!hidden': !this.hasLabel }, "aria-label": this.name || this.fallbackInputId, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: 'b6305dd60716d998e9e21a6cabb3de991278b1c5', name: "label", onSlotchange: this.handleLabelSlotChange })), h("div", { key: '1ea760cc4a6d4ef461b92f9d72e4f5805095986b', class: {
351
+ return (h("div", { key: '06d75e4f4b97a56a82bb65e12964a3145f9125f8', class: "bq-input", part: "base" }, h("label", { key: '94da163f41a793ca32bed52d2beea1bc77b0fad3', class: { 'bq-input--label': true, '!hidden': !this.hasLabel }, "aria-label": this.name || this.fallbackInputId, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: '718baa52ff256316635cae1152530ef543fb18f2', name: "label", onSlotchange: this.handleSlotChange })), h("div", { key: '7804a6c214b7c97f451c5922c96b0e760d674e45', class: {
355
352
  'bq-input--control': true,
356
353
  [`validation-${this.validationStatus}`]: true,
357
354
  disabled: this.disabled,
358
- }, part: "control" }, h("span", { key: '7834d239f2973659d5525aa0a543071ef5947839', class: { 'bq-input--control__prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: '9cbe4b1892c9b1aca36f63bd2f74d5f96bcd4869', name: "prefix", onSlotchange: this.handlePrefixSlotChange })), h("input", { key: '66d643d8c337f767fe774671f4eb31521b6000a6', id: this.name || this.fallbackInputId, class: "bq-input--control__input", "aria-disabled": this.disabled ? 'true' : 'false', autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, disabled: this.disabled, form: this.form, inputMode: this.inputmode, max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, ref: (inputElem) => (this.inputElem = inputElem), readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, part: "input",
355
+ }, part: "control" }, h("span", { key: '91153e73b8eac7c242f7e69e26e4ad7058e156ea', class: { 'bq-input--control__prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: '102a395e2f99045f4ebbc0545e5032bf4741942f', name: "prefix", onSlotchange: this.handleSlotChange })), h("input", { key: '5948e42eae296b60801ed0e34c52a2a2e95228b7', id: this.name || this.fallbackInputId, class: "bq-input--control__input", "aria-disabled": this.disabled ? 'true' : 'false', autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, disabled: this.disabled, form: this.form, inputMode: this.inputmode, max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, ref: (inputElem) => (this.inputElem = inputElem), readOnly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, part: "input",
359
356
  // Events
360
357
  onBlur: this.handleBlur, onChange: this.handleChange, onFocus: this.handleFocus, onInput: this.handleInput }), this.hasValue && !this.disabled && !this.disableClear && (
361
358
  // The clear button will be visible as long as the input has a value
362
359
  // and the parent group is hovered or has focus-within
363
- h("bq-button", { key: 'd89714264727c3b92dc1eaa99f777a286a34bb84', class: "bq-input--control__clear ms-[--bq-input--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: 'c48db6791f3445ef798239a4aa6fd6b2a287c495', name: "clear-icon" }, h("bq-icon", { key: 'e40f03460ade9ca04c70a9e17efd90002672f63b', name: "x-circle", class: "flex" })))), h("span", { key: 'e1b7a2e3bbdb6d3dbc51b06953e0d710096a66fc', class: { 'bq-input--control__suffix': true, '!hidden': !this.hasSuffix }, ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '1b03b915ed6732190bd9def47f4529045487b706', name: "suffix", onSlotchange: this.handleSuffixSlotChange }))), h("div", { key: 'ff4e0fe9f59a9aa79989b91f953f793d9c2d22ca', class: {
360
+ h("bq-button", { key: '2ab84b5d5dd1f310200b57ecc9cc5b2abb45c23b', class: "bq-input--control__clear ms-[--bq-input--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: '405769418413ba2dea6552ddb5873c1c5ebd96da', name: "clear-icon" }, h("bq-icon", { key: 'bf68ccc644aaade33a77989f7af40e13df74d0b0', name: "x-circle", class: "flex" })))), h("span", { key: '71c317f38f180750bdb31751dfe85c948828e16e', class: { 'bq-input--control__suffix': true, '!hidden': !this.hasSuffix }, ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '114ed51ceed5e9051010777895de8571c184505c', name: "suffix", onSlotchange: this.handleSlotChange }))), h("div", { key: '589c32953462110944489d0b1203563b4c8dc4b6', class: {
364
361
  [`bq-input--helper-text validation-${this.validationStatus}`]: true,
365
362
  '!hidden': !this.hasHelperText,
366
- }, ref: (divElem) => (this.helperTextElem = divElem), part: "helper-text" }, h("slot", { key: '07b7efcfce1484d15315050eac7c77d6fcb0b8ad', name: "helper-text", onSlotchange: this.handleHelperTextSlotChange }))));
363
+ }, ref: (divElem) => (this.helperTextElem = divElem), part: "helper-text" }, h("slot", { key: 'fa39cc056750e8e58a428b9cd4812819d73ff8d1', name: "helper-text", onSlotchange: this.handleSlotChange }))));
367
364
  }
368
365
  static get is() { return "bq-input"; }
369
366
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-input.js","sourceRoot":"","sources":["../../../../../../src/components/input/bq-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,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4DACE,KAAK,EAAE;oBACL,CAAC,oCAAoC,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,IAAI;oBACnE,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa;iBAC/B,EACD,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,EACjD,IAAI,EAAC,aAAa;gBAElB,6DAAM,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,0BAA0B,GAAI,CACtE,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TInputType, TInputValidation, TInputValue } from './bq-input.types';\nimport { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, TDebounce } from '../../shared/utils';\n\n/**\n * The Input component is a fundamental user interface element that allows users to input data by typing it into a text field.\n * It is commonly used in web and mobile applications for various purposes, such as collecting user information, search inputs, and login forms.\n *\n * @example How to use it\n * ```html\n * <bq-input name=\"username\" label=\"Username\" placeholder=\"Enter your username\"></bq-input>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/980362-input\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {string} autocapitalize - Controls whether or not the input field should be capitalized and how.\n * @attr {string} autocomplete - Specifies whether or not the input field should have autocomplete enabled.\n * @attr {string} autocorrect - Controls whether or not the input field should have autocorrect enabled.\n * @attr {boolean} autofocus - If true, the 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} disabled - Indicates whether the input is disabled or not.\n * @attr {boolean} disable-clear - If true, the clear button won't be displayed.\n * @attr {string} form - The ID of the form that the input field belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {string} inputmode - The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * @attr {number | string} max - The maximum value that the input field can accept.\n * @attr {number} maxlength - The maximum number of characters that the input field can accept.\n * @attr {number | string} min - The minimum value that the input field can accept.\n * @attr {number} minlength - The minimum number of characters that the input field can accept.\n * @attr {string} name - The input field name.\n * @attr {string} pattern - Specifies a regular expression the form control's value should match.\n * @attr {string} placeholder - The input placeholder text value.\n * @attr {boolean} readonly - If true, the input field cannot be modified.\n * @attr {boolean} required - Indicates whether or not the input field is required to be filled out before submitting the form.\n * @attr {number | 'any'} step - A number that specifies the granularity that the value must adhere to.\n * @attr {string} type - The type attribute specifies the type of input field to display.\n * @attr {'none' | 'error' | 'warning' | 'success'} validation-status - The validation status of the input.\n * @attr {string | number | string[]} value - The input value, it can be used to reset the input to a previous value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n * @event bqInput - Callback handler emitted when the input value changes.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n * @slot clear-icon - The clear icon 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 helper-text - The helper text slot container.\n * @part label - The label slot container.\n * @part input - The native HTML input element used under the hood.\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-input--background-color - Input background color\n * @cssprop --bq-input--border-color - Input border color\n * @cssprop --bq-input--border-color-focus - Input border color on focus\n * @cssprop --bq-input--border-radius - Input border radius\n * @cssprop --bq-input--border-width - Input border width\n * @cssprop --bq-input--border-style - Input border style\n * @cssprop --bq-input--gap - Gap between input content and prefix/suffix\n * @cssprop --bq-input--helper-margin-top - Helper text margin top\n * @cssprop --bq-input--helper-text-color - Helper text color\n * @cssprop --bq-input--helper-text-size - Helper text size\n * @cssprop --bq-input--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-input--label-margin-bottom - Input label margin bottom\n * @cssprop --bq-input--label-text-color - Input label text color\n * @cssprop --bq-input--label-text-size - Input label text size\n * @cssprop --bq-input--padding-start - Input padding start\n * @cssprop --bq-input--padding-end - Input padding end\n * @cssprop --bq-input--paddingY - Input padding top and bottom\n * @cssprop --bq-input--text-color - Input text color\n * @cssprop --bq-input--text-size - Input text size\n * @cssprop --bq-input--text-placeholder-color - Input placeholder text color\n */\n@Component({\n tag: 'bq-input',\n styleUrl: './scss/bq-input.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqInput {\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 debounceBqInput: TDebounce<void>;\n private fallbackInputId = 'input';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqInputElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasHelperText = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /**\n * Controls whether or not the input 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: string = 'off';\n\n /**\n * Specifies whether or not the input 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 input 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 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 /**\n * Indicates whether the input is disabled or not.\n * If `true`, the input 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 /** The ID of the form that the input field belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /**\n * The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * This allows a browser to display an appropriate virtual keyboard while editing.\n * Possible values are 'none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url', and 'date'.\n */\n @Prop() inputmode?: string;\n\n /**\n * The maximum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) max?: number | string;\n\n /** The maximum number of characters that the input field can accept. */\n @Prop({ reflect: true }) maxlength: number;\n\n /**\n * The minimum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) min?: number | string;\n\n /** The minimum number of characters that the input field can accept. */\n @Prop({ reflect: true }) minlength: number;\n\n /** The input field name. */\n @Prop({ reflect: true }) name!: string;\n\n /**\n * Specifies a regular expression the form control's value should match.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern\n */\n @Prop({ reflect: true }) pattern?: string;\n\n /** The input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** If true, the input field cannot be modified. */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the input field is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /**\n * A number that specifies the granularity that the value must adhere to.\n * Valid for date, month, week, time, datetime-local, number, and range.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n */\n @Prop({ reflect: true }) step: number | 'any';\n\n /**\n * The type attribute specifies the type of input field to display.\n * Possible values are 'text', 'password', 'email', 'number', 'tel', 'search', 'url', and more.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n */\n @Prop({ reflect: true }) type: TInputType = 'text';\n\n /**\n * The validation status of the input.\n *\n * @remarks\n * This property is used to indicate the validation status of the 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 input value, it can be used to reset the input to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TInputValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { internals, value } = this;\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n this.internals.setFormValue(value.join(','));\n return;\n }\n\n this.hasValue = isDefined(value);\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqInputElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value changes.\n * This handler is called whenever the user types or pastes text into the input field.\n */\n @Event() bqInput!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.value?.toString());\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.handleClear();\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 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 handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceBqInput?.cancel();\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.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\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.value) : ev.target.value;\n // Update form value and validity\n this.setFormValue(`${this.value}`);\n this.updateFormValidity();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n };\n\n private handleClear = () => {\n if (this.disabled) return;\n\n const { inputElem, setFormValue, updateFormValidity } = this;\n // Clear input element value\n inputElem.value = '';\n this.value = inputElem.value;\n // Set form value to empty string abd update validity\n setFormValue(this.value);\n updateFormValidity();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n ev.stopPropagation();\n this.handleClear();\n\n const { bqClear, bqChange, bqInput, el, inputElem } = this;\n // Emit events\n bqClear.emit(el);\n bqInput.emit({ value: this.value, el });\n bqChange.emit({ value: this.value, el });\n // Refocus input element\n inputElem.focus();\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, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\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 handleLabelSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n };\n\n private handlePrefixSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem);\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private handleHelperTextSlotChange = () => {\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-input\" part=\"base\">\n {/* Label */}\n <label\n class={{ 'bq-input--label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleLabelSlotChange} />\n </label>\n {/* Input control group */}\n <div\n class={{\n 'bq-input--control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-input--control__prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handlePrefixSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-input--control__input\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n disabled={this.disabled}\n form={this.form}\n inputMode={this.inputmode}\n max={this.max}\n maxLength={this.maxlength}\n min={this.min}\n minLength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n ref={(inputElem) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={this.value}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\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-input--control__clear ms-[--bq-input--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\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-input--control__suffix': true, '!hidden': !this.hasSuffix }}\n ref={(spanElem) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange} />\n </span>\n </div>\n {/* Helper text */}\n <div\n class={{\n [`bq-input--helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleHelperTextSlotChange} />\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-input.js","sourceRoot":"","sources":["../../../../../../src/components/input/bq-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGhH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAa,MAAM,oBAAoB,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AASH,MAAM,OAAO,OAAO;IAClB,iBAAiB;IACjB,uBAAuB;IAEf,cAAc,CAAe;IAC7B,SAAS,CAAoB;IAC7B,SAAS,CAAe;IACxB,UAAU,CAAe;IACzB,UAAU,CAAe;IAEzB,eAAe,CAAkB;IACjC,eAAe,GAAG,OAAO,CAAC;IAElC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAsB;IAChB,SAAS,CAAoB;IAEhD,oBAAoB;IACpB,wCAAwC;IACxC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TInputType, TInputValidation, TInputValue } from './bq-input.types';\nimport { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, TDebounce } from '../../shared/utils';\n\n/**\n * The Input component is a fundamental user interface element that allows users to input data by typing it into a text field.\n * It is commonly used in web and mobile applications for various purposes, such as collecting user information, search inputs, and login forms.\n *\n * @example How to use it\n * ```html\n * <bq-input name=\"username\" label=\"Username\" placeholder=\"Enter your username\"></bq-input>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/980362-input\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {string} autocapitalize - Controls whether or not the input field should be capitalized and how.\n * @attr {string} autocomplete - Specifies whether or not the input field should have autocomplete enabled.\n * @attr {string} autocorrect - Controls whether or not the input field should have autocorrect enabled.\n * @attr {boolean} autofocus - If true, the 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} disabled - Indicates whether the input is disabled or not.\n * @attr {boolean} disable-clear - If true, the clear button won't be displayed.\n * @attr {string} form - The ID of the form that the input field belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {string} inputmode - The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * @attr {number | string} max - The maximum value that the input field can accept.\n * @attr {number} maxlength - The maximum number of characters that the input field can accept.\n * @attr {number | string} min - The minimum value that the input field can accept.\n * @attr {number} minlength - The minimum number of characters that the input field can accept.\n * @attr {string} name - The input field name.\n * @attr {string} pattern - Specifies a regular expression the form control's value should match.\n * @attr {string} placeholder - The input placeholder text value.\n * @attr {boolean} readonly - If true, the input field cannot be modified.\n * @attr {boolean} required - Indicates whether or not the input field is required to be filled out before submitting the form.\n * @attr {number | 'any'} step - A number that specifies the granularity that the value must adhere to.\n * @attr {string} type - The type attribute specifies the type of input field to display.\n * @attr {'none' | 'error' | 'warning' | 'success'} validation-status - The validation status of the input.\n * @attr {string | number | string[]} value - The input value, it can be used to reset the input to a previous value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n * @event bqInput - Callback handler emitted when the input value changes.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n * @slot clear-icon - The clear icon 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 helper-text - The helper text slot container.\n * @part label - The label slot container.\n * @part input - The native HTML input element used under the hood.\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-input--background-color - Input background color\n * @cssprop --bq-input--border-color - Input border color\n * @cssprop --bq-input--border-color-focus - Input border color on focus\n * @cssprop --bq-input--border-radius - Input border radius\n * @cssprop --bq-input--border-width - Input border width\n * @cssprop --bq-input--border-style - Input border style\n * @cssprop --bq-input--gap - Gap between input content and prefix/suffix\n * @cssprop --bq-input--helper-margin-top - Helper text margin top\n * @cssprop --bq-input--helper-text-color - Helper text color\n * @cssprop --bq-input--helper-text-size - Helper text size\n * @cssprop --bq-input--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-input--label-margin-bottom - Input label margin bottom\n * @cssprop --bq-input--label-text-color - Input label text color\n * @cssprop --bq-input--label-text-size - Input label text size\n * @cssprop --bq-input--padding-start - Input padding start\n * @cssprop --bq-input--padding-end - Input padding end\n * @cssprop --bq-input--paddingY - Input padding top and bottom\n * @cssprop --bq-input--text-color - Input text color\n * @cssprop --bq-input--text-size - Input text size\n * @cssprop --bq-input--text-placeholder-color - Input placeholder text color\n */\n@Component({\n tag: 'bq-input',\n styleUrl: './scss/bq-input.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqInput {\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 debounceBqInput: TDebounce<void>;\n private fallbackInputId = 'input';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqInputElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasHelperText = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /**\n * Controls whether or not the input 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: string = 'off';\n\n /**\n * Specifies whether or not the input 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 input 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 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 /**\n * Indicates whether the input is disabled or not.\n * If `true`, the input 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 /** The ID of the form that the input field belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /**\n * The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * This allows a browser to display an appropriate virtual keyboard while editing.\n * Possible values are 'none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url', and 'date'.\n */\n @Prop() inputmode?: string;\n\n /**\n * The maximum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) max?: number | string;\n\n /** The maximum number of characters that the input field can accept. */\n @Prop({ reflect: true }) maxlength: number;\n\n /**\n * The minimum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) min?: number | string;\n\n /** The minimum number of characters that the input field can accept. */\n @Prop({ reflect: true }) minlength: number;\n\n /** The input field name. */\n @Prop({ reflect: true }) name!: string;\n\n /**\n * Specifies a regular expression the form control's value should match.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern\n */\n @Prop({ reflect: true }) pattern?: string;\n\n /** The input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** If true, the input field cannot be modified. */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the input field is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /**\n * A number that specifies the granularity that the value must adhere to.\n * Valid for date, month, week, time, datetime-local, number, and range.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n */\n @Prop({ reflect: true }) step: number | 'any';\n\n /**\n * The type attribute specifies the type of input field to display.\n * Possible values are 'text', 'password', 'email', 'number', 'tel', 'search', 'url', and more.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n */\n @Prop({ reflect: true }) type: TInputType = 'text';\n\n /**\n * The validation status of the input.\n *\n * @remarks\n * This property is used to indicate the validation status of the 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 input value, it can be used to reset the input to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TInputValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { internals, value } = this;\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n this.internals.setFormValue(value.join(','));\n return;\n }\n\n this.hasValue = isDefined(value);\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqInputElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value changes.\n * This handler is called whenever the user types or pastes text into the input field.\n */\n @Event() bqInput!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.value?.toString());\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.handleClear();\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 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 handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceBqInput?.cancel();\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.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\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.value) : ev.target.value;\n // Update form value and validity\n this.setFormValue(`${this.value}`);\n this.updateFormValidity();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n };\n\n private handleClear = () => {\n if (this.disabled) return;\n\n const { inputElem, setFormValue, updateFormValidity } = this;\n // Clear input element value\n inputElem.value = '';\n this.value = inputElem.value;\n // Set form value to empty string abd update validity\n setFormValue(this.value);\n updateFormValidity();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n ev.stopPropagation();\n this.handleClear();\n\n const { bqClear, bqChange, bqInput, el, inputElem } = this;\n // Emit events\n bqClear.emit(el);\n bqInput.emit({ value: this.value, el });\n bqChange.emit({ value: this.value, el });\n // Refocus input element\n inputElem.focus();\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, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\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 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 // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-input\" part=\"base\">\n {/* Label */}\n <label\n class={{ 'bq-input--label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Input control group */}\n <div\n class={{\n 'bq-input--control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-input--control__prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-input--control__input\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n disabled={this.disabled}\n form={this.form}\n inputMode={this.inputmode}\n max={this.max}\n maxLength={this.maxlength}\n min={this.min}\n minLength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n ref={(inputElem) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={this.value}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\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-input--control__clear ms-[--bq-input--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\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-input--control__suffix': true, '!hidden': !this.hasSuffix }}\n ref={(spanElem) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n {/* Helper text */}\n <div\n class={{\n [`bq-input--helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"]}
@@ -159,6 +159,9 @@ export class BqNotification {
159
159
  this.checkPropValues();
160
160
  this.handleTimeout();
161
161
  }
162
+ componentDidLoad() {
163
+ this.handleSlotChange();
164
+ }
162
165
  // Listeners
163
166
  // ==============
164
167
  afterNotificationClose() {
@@ -234,10 +237,8 @@ export class BqNotification {
234
237
  }
235
238
  this.bqAfterClose.emit();
236
239
  };
237
- handleContentSlotChange = () => {
240
+ handleSlotChange = () => {
238
241
  this.hasContent = hasSlotContent(this.bodyElem);
239
- };
240
- handleFooterSlotChange = () => {
241
242
  this.hasFooter = hasSlotContent(this.footerElem, 'footer');
242
243
  };
243
244
  get iconName() {
@@ -255,11 +256,11 @@ export class BqNotification {
255
256
  const style = {
256
257
  ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),
257
258
  };
258
- return (h(Host, { key: '2650add1fa99bd69535bd30104e2eb39a945c967', style: style, class: { 'is-hidden': !this.open }, "aria-hidden": !this.open ? 'true' : 'false', hidden: !this.open ? 'true' : 'false', role: "alert" }, h("div", { key: '8bbc9847de675c420b41aeb61a580dfa59fc9280', class: "bq-notification", "data-transition-enter": "transform transition ease-out duration-300", "data-transition-enter-start": "translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s", "data-transition-enter-end": "translate-y-0 opacity-100 sm:translate-x-0", "data-transition-leave": "transform transition ease-in duration-100", "data-transition-leave-start": "translate-y-0 opacity-100 sm:translate-x-0", "data-transition-leave-end": "-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s", ref: (div) => (this.notificationElem = div), part: "wrapper" }, !this.disableClose && (h("bq-button", { key: 'b836effc6fe0d8f974d37836f7192d00d655210a', class: "notification--close absolute inset-ie-5 [&::part(label)]:inline-flex", appearance: "text", size: "small", onClick: () => this.hide(), part: "btn-close" }, h("slot", { key: '8208ca708644e421fcf216f6cb134fcfa80cb60f', name: "btn-close" }, h("bq-icon", { key: '3c07397a897a0a8fd0eed830325c70022fa669d5', name: "x" })))), h("div", { key: '35c94b234638f4105bebcbb3be802c28c221bbfe', class: {
259
+ return (h(Host, { key: '1f8560524774c7b1f4c3ff3cf002d3f041068043', style: style, class: { 'is-hidden': !this.open }, "aria-hidden": !this.open ? 'true' : 'false', hidden: !this.open ? 'true' : 'false', role: "alert" }, h("div", { key: 'dd80b267f778f781434d59ca8483e93d18c74d82', class: "bq-notification", "data-transition-enter": "transform transition ease-out duration-300", "data-transition-enter-start": "translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s", "data-transition-enter-end": "translate-y-0 opacity-100 sm:translate-x-0", "data-transition-leave": "transform transition ease-in duration-100", "data-transition-leave-start": "translate-y-0 opacity-100 sm:translate-x-0", "data-transition-leave-end": "-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s", ref: (div) => (this.notificationElem = div), part: "wrapper" }, !this.disableClose && (h("bq-button", { key: '0afa5d4db7f4fef15195cf45c34b7e6887ab3b41', class: "notification--close absolute inset-ie-5 [&::part(label)]:inline-flex", appearance: "text", size: "small", onClick: () => this.hide(), part: "btn-close" }, h("slot", { key: 'd8d8731f75b42b662a51fe725297afdfd7df8ca0', name: "btn-close" }, h("bq-icon", { key: '93c11d8edaea4ac0e842f982209905f3e73adb60', name: "x" })))), h("div", { key: '35f5ab94ccefdae7a5072b4ba5c1f94ad8baf465', class: {
259
260
  '!hidden': this.hideIcon,
260
261
  [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)
261
262
  'notification--icon me-xs flex text-left align-top': true,
262
- }, part: "icon-outline" }, h("slot", { key: '603df85433112e13771def15455877e9700d3fc6', name: "icon" }, h("bq-icon", { key: 'a7ba9d2ca363d4c245896f3fd87c0dccce4d0ae0', name: this.iconName, part: "icon", exportparts: "base,svg" }))), h("div", { key: '83ba51fbf7d4bb1561fea50d806f1a5efdf5f1a6', class: "flex flex-col items-start gap-[--bq-notification--content-footer-gap]", part: "main" }, h("div", { key: '90c404cc807664c902b3ba9617d591a80be41ccd', class: "flex flex-col gap-[--bq-notification--title-body-gap]", part: "content" }, h("div", { key: 'bf9b8fe6ede6507cd5cd9bf9a206571129720be8', class: "title-font font-semibold leading-regular", part: "title" }, h("slot", { key: '4af5738c85c0ddc31d636f7593ff3b8b56ed4578' })), h("div", { key: '6e87f96b2a73e71b79977a0194d010e17ef4d28e', class: { 'text-s leading-regular': true, '!hidden': !this.hasContent }, ref: (div) => (this.bodyElem = div), part: "body" }, h("slot", { key: 'f396b07256089ba728683662896eed31f58b1147', name: "body", onSlotchange: this.handleContentSlotChange }))), h("div", { key: 'a57f3307a355e569223e0b2b5f29e9bf9b8b8c5d', class: { 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }, ref: (div) => (this.footerElem = div), part: "footer" }, h("slot", { key: '8f1394b03af99f30f0d59a4a9abd6a7a697aa899', name: "footer", onSlotchange: this.handleFooterSlotChange }))))));
263
+ }, part: "icon-outline" }, h("slot", { key: '6088b9a4daa401a9d11ee931e0de11e20a19d42a', name: "icon" }, h("bq-icon", { key: '4b6b8707b2adf52e9dc2fac69b84764d71133aac', name: this.iconName, part: "icon", exportparts: "base,svg" }))), h("div", { key: 'cd57d881aab69a0e15312f0ccab002bc5e992882', class: "flex flex-col items-start gap-[--bq-notification--content-footer-gap]", part: "main" }, h("div", { key: 'ec9d1a1005b1205ea4bf9d258a31dea47d047f70', class: "flex flex-col gap-[--bq-notification--title-body-gap]", part: "content" }, h("div", { key: 'df9b09af2f9f5fc790529f3d417cd9f8d3938bee', class: "title-font font-semibold leading-regular", part: "title" }, h("slot", { key: '11c3a061cda410e1009f0382cfeaa89309e803cc' })), h("div", { key: '2b4143c61f85324f583a3bbe782cd66bd7099dfa', class: { 'text-s leading-regular': true, '!hidden': !this.hasContent }, ref: (div) => (this.bodyElem = div), part: "body" }, h("slot", { key: 'f62a344f6364ad914b8c90373f1fceb33a279cd1', name: "body", onSlotchange: this.handleSlotChange }))), h("div", { key: 'ce802eab827e72247a95755f35b8e990797ac1a8', class: { 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }, ref: (div) => (this.footerElem = div), part: "footer" }, h("slot", { key: '78de405fe36b779616e2cf7591b166a0705f4964', name: "footer", onSlotchange: this.handleSlotChange }))))));
263
264
  }
264
265
  static get is() { return "bq-notification"; }
265
266
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-notification.js","sourceRoot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AsB,GAAI,CAC7D,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { NOTIFICATION_TYPE, TNotificationBorderRadius, TNotificationType } from './bq-notification.types';\nimport { debounce, enter, hasSlotContent, isClient, leave, TDebounce, validatePropValue } from '../../shared/utils';\n\nconst NOTIFICATION_PORTAL_SELECTOR = 'bq-notification-portal';\n\n/**\n * The Notification component is a user interface element used to provide information or alerts to users in a non-intrusive manner.\n *\n * @example How to use it\n * ```html\n * <bq-notification border=\"s\" time=\"3000\" type=\"info\">\n * Title\n * <span slot=\"body\">\n * This is some description text text\n * <a class=\"bq-link\" href=\"https://example.com\">Link</a>\n * </span>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-notification>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/945cb6-notification\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {boolean} auto-dismiss - If true, the notification will automatically hide after the specified amount of time\n * @attr {string} border - The corder radius of the notification component\n * @attr {boolean} disable-close - If true, the close button at the top right of the notification won't be shown\n * @attr {boolean} hide-icon - If true, the notification icon won't be shown\n * @attr {boolean} open - If true, the notification will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the notification will close itself. Only valid if `auto-dismiss=\"true\"`\n * @attr {string} type - Type of Notification\n *\n * @event bqAfterClose - Callback handler to be called after the notification has been closed\n * @event bqAfterOpen - Callback handler to be called after the notification has been opened\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The notification title content\n * @slot body - The notification description content\n * @slot footer - The notification footer content\n * @slot icon - The icon to be displayed in the notification\n * @slot btn-close - The close button of the notification\n *\n * @part base - The `<div>` container of the predefined bq-icon component.\n * @part body - The container `<div>` that wraps the notification description content\n * @part btn-close - The `bq-button` used to close the notification\n * @part content - The container `<div>` that wraps all the notification content (title, description, footer)\n * @part footer - The container `<div>` that wraps the notification footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon based on the notification type\n * @part icon-outline - The container `<div>` that wraps the icon element\n * @part main - The container `<div>` that wraps the notification main content (title, description)\n * @part svg - The `<svg>` element of the predefined bq-icon component.\n * @part title - The container `<div>` that wraps the notification title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-notification--background - The notification background color\n * @cssprop --bq-notification--box-shadow - The notification box shadow\n * @cssprop --bq-notification--border-color - The notification border color\n * @cssprop --bq-notification--border-radius - The notification border radius\n * @cssprop --bq-notification--border-style - The notification border style\n * @cssprop --bq-notification--border-width - The notification border width\n * @cssprop --bq-notification--content-footer-gap - The notification content and footer gap\n * @cssprop --bq-notification--title-body-gap - The notification title and body gap\n * @cssprop --bq-notification--icon-color-error - The notification icon color for error type\n * @cssprop --bq-notification--icon-color-info - The notification icon color for info type\n * @cssprop --bq-notification--icon-color-neutral - The notification icon color for neutral type\n * @cssprop --bq-notification--icon-color-success - The notification icon color for success type\n * @cssprop --bq-notification--icon-color-warning - The notification icon color for warning type\n * @cssprop --bq-notification--padding - The notification padding\n * @cssprop --bq-notification--min-width - The notification min width\n */\n@Component({\n tag: 'bq-notification',\n styleUrl: './scss/bq-notification.scss',\n shadow: true,\n})\nexport class BqNotification {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n private notificationElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqNotificationElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n @State() private notificationPortal = isClient() ? document.querySelector(`.${NOTIFICATION_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** If true, the notification will automatically hide after the specified amount of time */\n @Prop({ reflect: true }) autoDismiss: boolean;\n\n /** The corder radius of the notification component */\n @Prop({ reflect: true }) border: TNotificationBorderRadius = 's';\n\n /** If true, the close button at the top right of the notification won't be shown */\n @Prop({ reflect: true }) disableClose: boolean;\n\n /** If true, the notification icon won't be shown */\n @Prop({ reflect: true }) hideIcon: boolean;\n\n /** If true, the notification will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the notification will close itself. Only valid if `autoDismiss=\"true\"` */\n @Prop({ reflect: true }) time: number = 3000;\n\n /** Type of Notification */\n @Prop({ reflect: true }) type: TNotificationType = 'info';\n\n // Prop lifecycle events\n // =======================\n @Watch('autoDismiss')\n @Watch('time')\n handleTimeout() {\n this.autoDismissDebounce?.cancel();\n if (!this.autoDismiss) return;\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n // Make sure to autodismiss the notification if the `auto-dismiss` value changed while open\n if (this.open) this.autoDismissDebounce();\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (!(this.autoDismiss && this.open)) return;\n this.autoDismissDebounce();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(NOTIFICATION_TYPE, 'info', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide!: EventEmitter;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow!: EventEmitter;\n\n /** Callback handler to be called after the notification has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the notification has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (!notificationPortal) {\n this.notificationPortal = Object.assign(document.createElement('div'), {\n className: NOTIFICATION_PORTAL_SELECTOR,\n });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeout();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqAfterClose')\n afterNotificationClose() {\n try {\n const { notificationPortal } = this;\n notificationPortal.removeChild(this.el);\n // Remove the notification portal from the DOM when there are no more notifications\n if (notificationPortal.querySelector(this.el.tagName.toLowerCase()) === null) {\n notificationPortal.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to hide the notification component */\n @Method()\n async hide(): Promise<void> {\n await this.handleHide();\n }\n\n /** Method to be called to show the notification component */\n @Method()\n async show(): Promise<void> {\n await this.handleShow();\n }\n\n /** This method can be used to display notifications in a fixed-position element that allows for stacking multiple notifications vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (notificationPortal?.parentElement === null) {\n document.body.append(notificationPortal);\n }\n\n notificationPortal?.appendChild(this.el);\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = async () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n await leave(this.notificationElem);\n this.open = false;\n this.handleTransitionEnd();\n }\n };\n\n private handleShow = async () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n await enter(this.notificationElem);\n this.handleTransitionEnd();\n }\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n };\n\n private handleContentSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n };\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconName(): string {\n const typeMap = {\n error: 'x-circle',\n success: 'check-circle',\n warning: 'warning-circle',\n };\n\n return typeMap[this.type] || 'info';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n style={style}\n class={{ 'is-hidden': !this.open }}\n aria-hidden={!this.open ? 'true' : 'false'}\n hidden={!this.open ? 'true' : 'false'}\n role=\"alert\"\n >\n <div\n class=\"bq-notification\"\n data-transition-enter=\"transform transition ease-out duration-300\"\n data-transition-enter-start=\"translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-enter-end=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave=\"transform transition ease-in duration-100\"\n data-transition-leave-start=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave-end=\"-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n ref={(div) => (this.notificationElem = div)}\n part=\"wrapper\"\n >\n {/* CLOSE BUTTON */}\n {!this.disableClose && (\n <bq-button\n class=\"notification--close absolute inset-ie-5 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n onClick={() => this.hide()}\n part=\"btn-close\"\n >\n <slot name=\"btn-close\">\n <bq-icon name=\"x\" />\n </slot>\n </bq-button>\n )}\n {/* ICON */}\n <div\n class={{\n '!hidden': this.hideIcon,\n [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)\n 'notification--icon me-xs flex text-left align-top': true,\n }}\n part=\"icon-outline\"\n >\n <slot name=\"icon\">\n <bq-icon name={this.iconName} part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n {/* MAIN */}\n <div class=\"flex flex-col items-start gap-[--bq-notification--content-footer-gap]\" part=\"main\">\n <div class=\"flex flex-col gap-[--bq-notification--title-body-gap]\" part=\"content\">\n {/* TITLE */}\n <div class=\"title-font font-semibold leading-regular\" part=\"title\">\n <slot />\n </div>\n {/* BODY */}\n <div\n class={{ 'text-s leading-regular': true, '!hidden': !this.hasContent }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleContentSlotChange} />\n </div>\n </div>\n {/* FOOTER */}\n <div\n class={{ 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }}\n ref={(div) => (this.footerElem = div)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-notification.js","sourceRoot":"","sources":["../../../../../../src/components/notification/bq-notification.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAErH,OAAO,EAAE,iBAAiB,EAAgD,MAAM,yBAAyB,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEpH,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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watch } from '@stencil/core';\n\nimport { NOTIFICATION_TYPE, TNotificationBorderRadius, TNotificationType } from './bq-notification.types';\nimport { debounce, enter, hasSlotContent, isClient, leave, TDebounce, validatePropValue } from '../../shared/utils';\n\nconst NOTIFICATION_PORTAL_SELECTOR = 'bq-notification-portal';\n\n/**\n * The Notification component is a user interface element used to provide information or alerts to users in a non-intrusive manner.\n *\n * @example How to use it\n * ```html\n * <bq-notification border=\"s\" time=\"3000\" type=\"info\">\n * Title\n * <span slot=\"body\">\n * This is some description text text\n * <a class=\"bq-link\" href=\"https://example.com\">Link</a>\n * </span>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-notification>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/945cb6-notification\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {boolean} auto-dismiss - If true, the notification will automatically hide after the specified amount of time\n * @attr {string} border - The corder radius of the notification component\n * @attr {boolean} disable-close - If true, the close button at the top right of the notification won't be shown\n * @attr {boolean} hide-icon - If true, the notification icon won't be shown\n * @attr {boolean} open - If true, the notification will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the notification will close itself. Only valid if `auto-dismiss=\"true\"`\n * @attr {string} type - Type of Notification\n *\n * @event bqAfterClose - Callback handler to be called after the notification has been closed\n * @event bqAfterOpen - Callback handler to be called after the notification has been opened\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The notification title content\n * @slot body - The notification description content\n * @slot footer - The notification footer content\n * @slot icon - The icon to be displayed in the notification\n * @slot btn-close - The close button of the notification\n *\n * @part base - The `<div>` container of the predefined bq-icon component.\n * @part body - The container `<div>` that wraps the notification description content\n * @part btn-close - The `bq-button` used to close the notification\n * @part content - The container `<div>` that wraps all the notification content (title, description, footer)\n * @part footer - The container `<div>` that wraps the notification footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon based on the notification type\n * @part icon-outline - The container `<div>` that wraps the icon element\n * @part main - The container `<div>` that wraps the notification main content (title, description)\n * @part svg - The `<svg>` element of the predefined bq-icon component.\n * @part title - The container `<div>` that wraps the notification title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-notification--background - The notification background color\n * @cssprop --bq-notification--box-shadow - The notification box shadow\n * @cssprop --bq-notification--border-color - The notification border color\n * @cssprop --bq-notification--border-radius - The notification border radius\n * @cssprop --bq-notification--border-style - The notification border style\n * @cssprop --bq-notification--border-width - The notification border width\n * @cssprop --bq-notification--content-footer-gap - The notification content and footer gap\n * @cssprop --bq-notification--title-body-gap - The notification title and body gap\n * @cssprop --bq-notification--icon-color-error - The notification icon color for error type\n * @cssprop --bq-notification--icon-color-info - The notification icon color for info type\n * @cssprop --bq-notification--icon-color-neutral - The notification icon color for neutral type\n * @cssprop --bq-notification--icon-color-success - The notification icon color for success type\n * @cssprop --bq-notification--icon-color-warning - The notification icon color for warning type\n * @cssprop --bq-notification--padding - The notification padding\n * @cssprop --bq-notification--min-width - The notification min width\n */\n@Component({\n tag: 'bq-notification',\n styleUrl: './scss/bq-notification.scss',\n shadow: true,\n})\nexport class BqNotification {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n private notificationElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqNotificationElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n @State() private notificationPortal = isClient() ? document.querySelector(`.${NOTIFICATION_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** If true, the notification will automatically hide after the specified amount of time */\n @Prop({ reflect: true }) autoDismiss: boolean;\n\n /** The corder radius of the notification component */\n @Prop({ reflect: true }) border: TNotificationBorderRadius = 's';\n\n /** If true, the close button at the top right of the notification won't be shown */\n @Prop({ reflect: true }) disableClose: boolean;\n\n /** If true, the notification icon won't be shown */\n @Prop({ reflect: true }) hideIcon: boolean;\n\n /** If true, the notification will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the notification will close itself. Only valid if `autoDismiss=\"true\"` */\n @Prop({ reflect: true }) time: number = 3000;\n\n /** Type of Notification */\n @Prop({ reflect: true }) type: TNotificationType = 'info';\n\n // Prop lifecycle events\n // =======================\n @Watch('autoDismiss')\n @Watch('time')\n handleTimeout() {\n this.autoDismissDebounce?.cancel();\n if (!this.autoDismiss) return;\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n // Make sure to autodismiss the notification if the `auto-dismiss` value changed while open\n if (this.open) this.autoDismissDebounce();\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (!(this.autoDismiss && this.open)) return;\n this.autoDismissDebounce();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(NOTIFICATION_TYPE, 'info', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide!: EventEmitter;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow!: EventEmitter;\n\n /** Callback handler to be called after the notification has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the notification has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (!notificationPortal) {\n this.notificationPortal = Object.assign(document.createElement('div'), {\n className: NOTIFICATION_PORTAL_SELECTOR,\n });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeout();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqAfterClose')\n afterNotificationClose() {\n try {\n const { notificationPortal } = this;\n notificationPortal.removeChild(this.el);\n // Remove the notification portal from the DOM when there are no more notifications\n if (notificationPortal.querySelector(this.el.tagName.toLowerCase()) === null) {\n notificationPortal.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to hide the notification component */\n @Method()\n async hide(): Promise<void> {\n await this.handleHide();\n }\n\n /** Method to be called to show the notification component */\n @Method()\n async show(): Promise<void> {\n await this.handleShow();\n }\n\n /** This method can be used to display notifications in a fixed-position element that allows for stacking multiple notifications vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (notificationPortal?.parentElement === null) {\n document.body.append(notificationPortal);\n }\n\n notificationPortal?.appendChild(this.el);\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = async () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n await leave(this.notificationElem);\n this.open = false;\n this.handleTransitionEnd();\n }\n };\n\n private handleShow = async () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n await enter(this.notificationElem);\n this.handleTransitionEnd();\n }\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconName(): string {\n const typeMap = {\n error: 'x-circle',\n success: 'check-circle',\n warning: 'warning-circle',\n };\n\n return typeMap[this.type] || 'info';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n style={style}\n class={{ 'is-hidden': !this.open }}\n aria-hidden={!this.open ? 'true' : 'false'}\n hidden={!this.open ? 'true' : 'false'}\n role=\"alert\"\n >\n <div\n class=\"bq-notification\"\n data-transition-enter=\"transform transition ease-out duration-300\"\n data-transition-enter-start=\"translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-enter-end=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave=\"transform transition ease-in duration-100\"\n data-transition-leave-start=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave-end=\"-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n ref={(div) => (this.notificationElem = div)}\n part=\"wrapper\"\n >\n {/* CLOSE BUTTON */}\n {!this.disableClose && (\n <bq-button\n class=\"notification--close absolute inset-ie-5 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n onClick={() => this.hide()}\n part=\"btn-close\"\n >\n <slot name=\"btn-close\">\n <bq-icon name=\"x\" />\n </slot>\n </bq-button>\n )}\n {/* ICON */}\n <div\n class={{\n '!hidden': this.hideIcon,\n [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)\n 'notification--icon me-xs flex text-left align-top': true,\n }}\n part=\"icon-outline\"\n >\n <slot name=\"icon\">\n <bq-icon name={this.iconName} part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n {/* MAIN */}\n <div class=\"flex flex-col items-start gap-[--bq-notification--content-footer-gap]\" part=\"main\">\n <div class=\"flex flex-col gap-[--bq-notification--title-body-gap]\" part=\"content\">\n {/* TITLE */}\n <div class=\"title-font font-semibold leading-regular\" part=\"title\">\n <slot />\n </div>\n {/* BODY */}\n <div\n class={{ 'text-s leading-regular': true, '!hidden': !this.hasContent }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* FOOTER */}\n <div\n class={{ 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }}\n ref={(div) => (this.footerElem = div)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -89,6 +89,9 @@ export class BqOption {
89
89
  // Component lifecycle events
90
90
  // Ordered by their natural call order
91
91
  // =====================================
92
+ componentDidLoad() {
93
+ this.handleSlotChange();
94
+ }
92
95
  // Listeners
93
96
  // ==============
94
97
  onKeyDown(event) {
@@ -130,10 +133,8 @@ export class BqOption {
130
133
  }
131
134
  this.bqClick.emit(this.el);
132
135
  };
133
- onSlotChange = () => {
136
+ handleSlotChange = () => {
134
137
  this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');
135
- };
136
- handleSuffixSlotChange = () => {
137
138
  this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');
138
139
  };
139
140
  get isDisabledOrHidden() {
@@ -143,17 +144,17 @@ export class BqOption {
143
144
  // Always the last one in the class.
144
145
  // ===================================
145
146
  render() {
146
- return (h(Host, { key: '111e5f9f885cc2b4e72988b4336577dc9a9ff310', "aria-disabled": this.isDisabledOrHidden ? 'true' : 'false', "aria-hidden": this.hidden ? 'true' : 'false', "aria-selected": this.selected ? 'true' : 'false', role: "option" }, h("div", { key: 'f55ebb3262011d0857d718687b981a3e76852595', class: {
147
+ return (h(Host, { key: '1be886ea81c2b09fc6731e921995a46725aa3e8e', "aria-disabled": this.isDisabledOrHidden ? 'true' : 'false', "aria-hidden": this.hidden ? 'true' : 'false', "aria-selected": this.selected ? 'true' : 'false', role: "option" }, h("div", { key: '258189fbd1bbf931a6555539d28d210a64a12d7f', class: {
147
148
  'bq-option': true,
148
149
  disabled: this.disabled,
149
150
  active: !this.disabled && this.selected,
150
- }, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.onClick, tabindex: this.isDisabledOrHidden ? '-1' : '0', role: "button", part: "base" }, h("span", { key: 'cb72f8d0f1a4c42188458c38fb3ef112feb35d58', class: {
151
+ }, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.onClick, tabindex: this.isDisabledOrHidden ? '-1' : '0', role: "button", part: "base" }, h("span", { key: '8910e42ffb4125d63d7086ffb5d035e43c3cd35a', class: {
151
152
  'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,
152
153
  '!hidden': !this.hasPrefix,
153
- }, ref: (elem) => (this.prefixElem = elem), part: "prefix" }, h("slot", { key: '7b62ef547b0021dced85263bd7e18bfa2738c836', name: "prefix", onSlotchange: this.onSlotChange })), h("span", { key: '0845fd7a5cf81b3b5551c0de7c1017d9defe88a1', class: "bq-option__label", part: "label" }, h("slot", { key: '17bb75965e6a889f91f8364854f0f79cedf484af' })), h("span", { key: 'b02bbf7a1ae422584c64651bbce0705fb0f78fc3', class: {
154
+ }, ref: (elem) => (this.prefixElem = elem), part: "prefix" }, h("slot", { key: 'b5cdce62eb2299b741b9c575b97c0c702ef2ad5e', name: "prefix", onSlotchange: this.handleSlotChange })), h("span", { key: '6e204cf745ed9c2585167483ba1293f628ef1e5a', class: "bq-option__label", part: "label" }, h("slot", { key: '7c9fc96ce28239d0d1fc6fd68089083725e0f621' })), h("span", { key: 'ef52e125bff41a4226ac2d302cd85a8093ff4b83', class: {
154
155
  'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,
155
156
  '!hidden': !this.hasSuffix,
156
- }, ref: (elem) => (this.suffixElem = elem), part: "suffix" }, h("slot", { key: '064f7e9855b4acdf8bb40bcc46c497df96dfa201', name: "suffix", onSlotchange: this.handleSuffixSlotChange })))));
157
+ }, ref: (elem) => (this.suffixElem = elem), part: "suffix" }, h("slot", { key: '45042b8677df77b8216e9d68e56094bd1fb1aa55', name: "suffix", onSlotchange: this.handleSlotChange })))));
157
158
  }
158
159
  static get is() { return "bq-option"; }
159
160
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-option.js","sourceRoot":"","sources":["../../../../../../src/components/option/bq-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,UAAU,CAAc;IACxB,UAAU,CAAc;IAEhC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IAEpC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEjC,SAAS,GAAY,KAAK,CAAC;IAC3B,SAAS,GAAY,KAAK,CAAC;IAEpC,sBAAsB;IACtB,2BAA2B;IAE3B,qCAAqC;IACZ,MAAM,GAAY,KAAK,CAAC;IAEjD,uCAAuC;IACd,QAAQ,GAAa,KAAK,CAAC;IAEpD,sFAAsF;IAC7D,KAAK,CAAU;IAExC,kDAAkD;IACzB,QAAQ,GAAY,KAAK,CAAC;IAEnD,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,iDAAiD;IACxC,MAAM,CAAoC;IAEnD,gDAAgD;IACvC,OAAO,CAAoC;IAEpD,gDAAgD;IACvC,OAAO,CAAoC;IAEpD,8CAA8C;IACrC,OAAO,CAAoC;IAEpD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,YAAY;IACZ,iBAAiB;IAGjB,SAAS,CAAC,KAAoB;QAC5B,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;YAAE,OAAO;QAClC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,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;oBACzC,8DAAQ,CACH;gBACP,6DACE,KAAK,EAAE;wBACL,uEAAuE,EAAE,IAAI;wBAC7E,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS;qBAC3B,EACD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ;oBAEb,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,sBAAsB,GAAI,CAC5D,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * An option refers to a specific choice that appears in a list of selectable items that can be opened or closed by the user.\n * It can be an element of the navigation system that allows users to select different sections or pages within an application or it can be used within a dropdown list.\n *\n * @example How to use it\n * ```html\n * <bq-option value=\"user\">\n * <span>User profile</span>\n * <bq-icon slot=\"suffix\" name=\"user\"></bq-icon>\n * </bq-option>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--with-option-group\n * @status stable\n *\n * @attr {boolean} disabled - If true, the option is disabled.\n * @attr {boolean} hidden - If true, the option is hidden.\n * @attr {string} value - A string representing the value of the option. Can be used to identify the item.\n * @attr {boolean} selected - If true, the option is selected and active.\n *\n * @event bqBlur - Handler to be called when item loses focus.\n * @event bqFocus - Handler to be called when item is focused.\n * @event bqClick - Handler to be called when item is clicked.\n * @event bqEnter - Handler to be called on enter key press.\n *\n * @slot prefix - The prefix content to be displayed before the label.\n * @slot - The label content to be displayed.\n *\n * @part base - The component's internal wrapper.\n * @part label - The `span` element in which the label text is displayed.\n * @part prefix - The `span` element in which the prefix is displayed (generally `bq-icon`).\n * @part suffix - The `span` element in which the suffix is displayed (generally `bq-icon`).\n *\n * @cssprop --bq-option--background - background color\n * @cssprop --bq-option--font-size - font size\n * @cssprop --bq-option--border-color - border color\n * @cssprop --bq-option--border-style - border style\n * @cssprop --bq-option--border-width - border width\n * @cssprop --bq-option--border-radius - border radius\n * @cssprop --bq-option--box-shadow - box shadow\n * @cssprop --bq-option--gap-start - gap space between prefix and label\n * @cssprop --bq-option--gap-end - gap space between label and suffix\n * @cssprop --bq-option--paddingY - padding Y axis\n * @cssprop --bq-option--padding-start - option label padding start\n * @cssprop --bq-option--padding-end - option label padding end\n */\n@Component({\n tag: 'bq-option',\n styleUrl: './scss/bq-option.scss',\n shadow: true,\n})\nexport class BqOption {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasPrefix: boolean = false;\n @State() hasSuffix: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the option is hidden. */\n @Prop({ reflect: true }) hidden: boolean = false;\n\n /** If true, the option is disabled. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** A string representing the value of the option. Can be used to identify the item */\n @Prop({ reflect: true }) value?: string;\n\n /** If true, the option is selected and active. */\n @Prop({ reflect: true }) selected: 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 item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called on enter key press */\n @Event() bqEnter: EventEmitter<HTMLBqOptionElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n @Listen('keydown')\n onKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return;\n this.bqEnter.emit(this.el);\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 onBlur = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n private onClick = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n private onSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private get isDisabledOrHidden() {\n return this.disabled || this.hidden;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host\n aria-disabled={this.isDisabledOrHidden ? 'true' : 'false'}\n aria-hidden={this.hidden ? 'true' : 'false'}\n aria-selected={this.selected ? 'true' : 'false'}\n role=\"option\"\n >\n <div\n class={{\n 'bq-option': true,\n disabled: this.disabled,\n active: !this.disabled && this.selected,\n }}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n tabindex={this.isDisabledOrHidden ? '-1' : '0'}\n role=\"button\"\n part=\"base\"\n >\n <span\n class={{\n 'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,\n '!hidden': !this.hasPrefix,\n }}\n ref={(elem) => (this.prefixElem = elem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.onSlotChange} />\n </span>\n <span class=\"bq-option__label\" part=\"label\">\n <slot />\n </span>\n <span\n class={{\n 'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,\n '!hidden': !this.hasSuffix,\n }}\n ref={(elem) => (this.suffixElem = elem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange} />\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-option.js","sourceRoot":"","sources":["../../../../../../src/components/option/bq-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,UAAU,CAAc;IACxB,UAAU,CAAc;IAEhC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IAEpC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEjC,SAAS,GAAY,KAAK,CAAC;IAC3B,SAAS,GAAY,KAAK,CAAC;IAEpC,sBAAsB;IACtB,2BAA2B;IAE3B,qCAAqC;IACZ,MAAM,GAAY,KAAK,CAAC;IAEjD,uCAAuC;IACd,QAAQ,GAAa,KAAK,CAAC;IAEpD,sFAAsF;IAC7D,KAAK,CAAU;IAExC,kDAAkD;IACzB,QAAQ,GAAY,KAAK,CAAC;IAEnD,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,iDAAiD;IACxC,MAAM,CAAoC;IAEnD,gDA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,EAAE,IAAI;wBACvE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS;qBAC3B,EACD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ;oBAEb,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACP,6DAAM,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO;oBACzC,8DAAQ,CACH;gBACP,6DACE,KAAK,EAAE;wBACL,uEAAuE,EAAE,IAAI;wBAC7E,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS;qBAC3B,EACD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ;oBAEb,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * An option refers to a specific choice that appears in a list of selectable items that can be opened or closed by the user.\n * It can be an element of the navigation system that allows users to select different sections or pages within an application or it can be used within a dropdown list.\n *\n * @example How to use it\n * ```html\n * <bq-option value=\"user\">\n * <span>User profile</span>\n * <bq-icon slot=\"suffix\" name=\"user\"></bq-icon>\n * </bq-option>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--with-option-group\n * @status stable\n *\n * @attr {boolean} disabled - If true, the option is disabled.\n * @attr {boolean} hidden - If true, the option is hidden.\n * @attr {string} value - A string representing the value of the option. Can be used to identify the item.\n * @attr {boolean} selected - If true, the option is selected and active.\n *\n * @event bqBlur - Handler to be called when item loses focus.\n * @event bqFocus - Handler to be called when item is focused.\n * @event bqClick - Handler to be called when item is clicked.\n * @event bqEnter - Handler to be called on enter key press.\n *\n * @slot prefix - The prefix content to be displayed before the label.\n * @slot - The label content to be displayed.\n *\n * @part base - The component's internal wrapper.\n * @part label - The `span` element in which the label text is displayed.\n * @part prefix - The `span` element in which the prefix is displayed (generally `bq-icon`).\n * @part suffix - The `span` element in which the suffix is displayed (generally `bq-icon`).\n *\n * @cssprop --bq-option--background - background color\n * @cssprop --bq-option--font-size - font size\n * @cssprop --bq-option--border-color - border color\n * @cssprop --bq-option--border-style - border style\n * @cssprop --bq-option--border-width - border width\n * @cssprop --bq-option--border-radius - border radius\n * @cssprop --bq-option--box-shadow - box shadow\n * @cssprop --bq-option--gap-start - gap space between prefix and label\n * @cssprop --bq-option--gap-end - gap space between label and suffix\n * @cssprop --bq-option--paddingY - padding Y axis\n * @cssprop --bq-option--padding-start - option label padding start\n * @cssprop --bq-option--padding-end - option label padding end\n */\n@Component({\n tag: 'bq-option',\n styleUrl: './scss/bq-option.scss',\n shadow: true,\n})\nexport class BqOption {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasPrefix: boolean = false;\n @State() hasSuffix: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the option is hidden. */\n @Prop({ reflect: true }) hidden: boolean = false;\n\n /** If true, the option is disabled. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** A string representing the value of the option. Can be used to identify the item */\n @Prop({ reflect: true }) value?: string;\n\n /** If true, the option is selected and active. */\n @Prop({ reflect: true }) selected: 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 item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called on enter key press */\n @Event() bqEnter: EventEmitter<HTMLBqOptionElement>;\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 @Listen('keydown')\n onKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return;\n this.bqEnter.emit(this.el);\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 onBlur = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n private onClick = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private get isDisabledOrHidden() {\n return this.disabled || this.hidden;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host\n aria-disabled={this.isDisabledOrHidden ? 'true' : 'false'}\n aria-hidden={this.hidden ? 'true' : 'false'}\n aria-selected={this.selected ? 'true' : 'false'}\n role=\"option\"\n >\n <div\n class={{\n 'bq-option': true,\n disabled: this.disabled,\n active: !this.disabled && this.selected,\n }}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n tabindex={this.isDisabledOrHidden ? '-1' : '0'}\n role=\"button\"\n part=\"base\"\n >\n <span\n class={{\n 'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,\n '!hidden': !this.hasPrefix,\n }}\n ref={(elem) => (this.prefixElem = elem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-option__label\" part=\"label\">\n <slot />\n </span>\n <span\n class={{\n 'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,\n '!hidden': !this.hasSuffix,\n }}\n ref={(elem) => (this.suffixElem = elem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -75,6 +75,9 @@ export class BqPageTitle {
75
75
  // Component lifecycle events
76
76
  // Ordered by their natural call order
77
77
  // =====================================
78
+ componentDidLoad() {
79
+ this.handleSlotChange();
80
+ }
78
81
  // Listeners
79
82
  // ==============
80
83
  // Public methods API
@@ -96,10 +99,10 @@ export class BqPageTitle {
96
99
  // Always the last one in the class.
97
100
  // ===================================
98
101
  render() {
99
- return (h("div", { key: 'c4d1a08e8a052f9293831561f67d7e345147859f', class: "flex gap-xs p-b-[--paddingY] [border-block-end:--subtitle-borderBlockEnd]", part: "base" }, h("div", { key: '18e265a6a9c87c40b84036cabbe76b33f2efa9a6', class: { flex: true, '!hidden': !this.haveBackNavigation }, ref: (divElem) => (this.backNavigationElem = divElem), part: "back" }, h("slot", { key: '5e227d23db44861682a9ca96798b170fb6c9dc52', name: "back", onSlotchange: this.handleSlotChange })), h("div", { key: 'ca1fbdc400f3879658a5f98d4fc170c082a5037b', class: "flex flex-grow flex-col gap-xs", part: "content" }, h("div", { key: '0c92799ce40b29ee270b94a0d904b2100d337ea0', class: "flex items-center gap-xs", part: "title-suffix" }, h("h1", { key: 'fac3a8519e5a5acb523765849d8ebb8c9635ce38', class: "title-font text-[length:--title-textSize] font-[--title-fontWeight] leading-[--title-lineHeight] text-[color:--title-textColor]", part: "title" }, h("slot", { key: '5272214c1c719881a67ae4da3022c947df93de18' })), h("div", { key: 'f08b1eef3f42e8626b32eebc68ef9cf57830f1be', class: { 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }, ref: (divElem) => (this.suffixElem = divElem), part: "suffix" }, h("slot", { key: '536e9958f5de6177ee85fe4a041379f1951ec7ee', name: "suffix", onSlotchange: this.handleSlotChange }))), h("div", { key: '4848aad227a705aa2d015daef1f5a50bcb918ecc', class: {
102
+ return (h("div", { key: '234aa6eeb328738441f3545b61257ec3a14c51cf', class: "flex gap-xs p-b-[--paddingY] [border-block-end:--subtitle-borderBlockEnd]", part: "base" }, h("div", { key: '867d26e55922753a1ff3d9b9f15167299621d49b', class: { flex: true, '!hidden': !this.haveBackNavigation }, ref: (divElem) => (this.backNavigationElem = divElem), part: "back" }, h("slot", { key: '61eb7494f390391b228a899227bf0680f448ba40', name: "back", onSlotchange: this.handleSlotChange })), h("div", { key: 'b57edbfbdbea5f00109e24f44ba6a6a2a0b8f3d8', class: "flex flex-grow flex-col gap-xs", part: "content" }, h("div", { key: 'c28bc08aa42afce9dea80be4766b41f8d52462db', class: "flex items-center gap-xs", part: "title-suffix" }, h("h1", { key: 'a0e1bd317189dc33a6deb4fd7d76c2aec3c6fa51', class: "title-font text-[length:--title-textSize] font-[--title-fontWeight] leading-[--title-lineHeight] text-[color:--title-textColor]", part: "title" }, h("slot", { key: '24ff8fc569dc979b33e8bc8e02574f78e66fb450' })), h("div", { key: '3c0538de7c6829880a5110568cbb16ccc1645dd4', class: { 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }, ref: (divElem) => (this.suffixElem = divElem), part: "suffix" }, h("slot", { key: '78dca26a8830e20704d7076344e7633792987aa3', name: "suffix", onSlotchange: this.handleSlotChange }))), h("div", { key: '85ebbeb207db40c0a276ab6b0640151189287fdb', class: {
100
103
  'title-font text-[length:--subtitle-textSize] font-[--subtitle-fontWeight] leading-[--title-lineHeight] text-[color:--subtitle-textColor]': true,
101
104
  hidden: !this.hasSubTitle,
102
- }, ref: (divElem) => (this.subTitleElem = divElem), part: "sub-title" }, h("slot", { key: 'aa2c7e2fefc9426ffdcae65f74fc0731b8a70925', name: "sub-title", onSlotchange: this.handleSlotChange })))));
105
+ }, ref: (divElem) => (this.subTitleElem = divElem), part: "sub-title" }, h("slot", { key: '7e4aa79164d537dba69db069cd760897a92bdf95', name: "sub-title", onSlotchange: this.handleSlotChange })))));
103
106
  }
104
107
  static get is() { return "bq-page-title"; }
105
108
  static get encapsulation() { return "shadow"; }