@beeq/core 1.8.3 → 1.8.4-beta.0

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 (420) 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-b0d168c8.entry.js → p-01b3d2a5.entry.js} +2 -2
  5. package/dist/beeq/p-01b3d2a5.entry.js.map +1 -0
  6. package/dist/beeq/{p-e655938a.entry.js → p-0ac37ff8.entry.js} +2 -2
  7. package/dist/beeq/{p-803269b3.entry.js → p-1a8f376a.entry.js} +2 -2
  8. package/dist/beeq/{p-15bf8ffd.entry.js → p-22188233.entry.js} +2 -2
  9. package/dist/beeq/p-22188233.entry.js.map +1 -0
  10. package/dist/beeq/{p-3806d9e3.entry.js → p-24135e46.entry.js} +2 -2
  11. package/dist/beeq/{p-90165aef.entry.js → p-260877e5.entry.js} +2 -2
  12. package/dist/beeq/{p-90165aef.entry.js.map → p-260877e5.entry.js.map} +1 -1
  13. package/dist/beeq/{p-d7ce7165.js → p-260d4ca0.js} +2 -2
  14. package/dist/beeq/{p-d7ce7165.js.map → p-260d4ca0.js.map} +1 -1
  15. package/dist/beeq/{p-dafa4162.entry.js → p-28adda86.entry.js} +2 -2
  16. package/dist/beeq/{p-dafa4162.entry.js.map → p-28adda86.entry.js.map} +1 -1
  17. package/dist/beeq/{p-e4dd6ff4.js → p-2b530ad4.js} +2 -2
  18. package/dist/beeq/{p-cb9fa154.entry.js → p-2f9fc4d4.entry.js} +2 -2
  19. package/dist/beeq/p-2f9fc4d4.entry.js.map +1 -0
  20. package/dist/beeq/{p-19ea2c90.entry.js → p-34f25f24.entry.js} +2 -2
  21. package/dist/beeq/p-34f25f24.entry.js.map +1 -0
  22. package/dist/beeq/{p-c42f9ac5.entry.js → p-38ee4c02.entry.js} +2 -2
  23. package/dist/beeq/{p-b7b3f7c6.entry.js → p-3f5865c0.entry.js} +2 -2
  24. package/dist/beeq/{p-9a7af424.entry.js → p-45bfda93.entry.js} +2 -2
  25. package/dist/beeq/p-4a5c07f9.js +7 -0
  26. package/dist/beeq/p-4a5c07f9.js.map +1 -0
  27. package/dist/beeq/{p-a4e11bbc.entry.js → p-4ddb6bdb.entry.js} +2 -2
  28. package/dist/beeq/p-4ddb6bdb.entry.js.map +1 -0
  29. package/dist/beeq/{p-19f5a833.entry.js → p-6195e6e5.entry.js} +2 -2
  30. package/dist/beeq/p-6195e6e5.entry.js.map +1 -0
  31. package/dist/beeq/{p-a8075be3.entry.js → p-63b4f8f9.entry.js} +2 -2
  32. package/dist/beeq/{p-4d21a49d.entry.js → p-648da701.entry.js} +2 -2
  33. package/dist/beeq/{p-3fe626f1.entry.js → p-6764f11f.entry.js} +2 -2
  34. package/dist/beeq/p-6764f11f.entry.js.map +1 -0
  35. package/dist/beeq/{p-b69f347d.entry.js → p-7478cf0a.entry.js} +2 -2
  36. package/dist/beeq/p-7478cf0a.entry.js.map +1 -0
  37. package/dist/beeq/{p-a8d64d1b.entry.js → p-7bb8664c.entry.js} +2 -2
  38. package/dist/beeq/{p-7585f825.entry.js → p-7ff775a3.entry.js} +2 -2
  39. package/dist/beeq/{p-5546f242.entry.js → p-801f7b25.entry.js} +2 -2
  40. package/dist/beeq/p-852225bc.js +6 -0
  41. package/dist/beeq/{p-ba1f9637.entry.js → p-8b63d8fc.entry.js} +2 -2
  42. package/dist/beeq/p-8b63d8fc.entry.js.map +1 -0
  43. package/dist/beeq/{p-e8f147c2.entry.js → p-8c011151.entry.js} +2 -2
  44. package/dist/beeq/p-8c011151.entry.js.map +1 -0
  45. package/dist/beeq/{p-70310ac8.entry.js → p-8d9f797d.entry.js} +2 -2
  46. package/dist/beeq/p-8d9f797d.entry.js.map +1 -0
  47. package/dist/beeq/{p-7efff703.entry.js → p-9a803ecf.entry.js} +2 -2
  48. package/dist/beeq/{p-b129db1a.entry.js → p-9eea4f4f.entry.js} +2 -2
  49. package/dist/beeq/{p-ed569a61.entry.js → p-a3c36d6c.entry.js} +2 -2
  50. package/dist/beeq/{p-bbaad491.entry.js → p-a620392e.entry.js} +2 -2
  51. package/dist/beeq/{p-66b6d69a.entry.js → p-a661454e.entry.js} +2 -2
  52. package/dist/beeq/{p-4500ffe5.entry.js → p-a7c4f022.entry.js} +2 -2
  53. package/dist/beeq/p-abda6f6c.entry.js +6 -0
  54. package/dist/beeq/p-abda6f6c.entry.js.map +1 -0
  55. package/dist/beeq/{p-65d67b85.entry.js → p-abf83b5c.entry.js} +2 -2
  56. package/dist/beeq/p-abf83b5c.entry.js.map +1 -0
  57. package/dist/beeq/{p-39a80765.entry.js → p-b044c5f6.entry.js} +2 -2
  58. package/dist/beeq/p-b044c5f6.entry.js.map +1 -0
  59. package/dist/beeq/{p-3f654a12.entry.js → p-b1ab6b7f.entry.js} +2 -2
  60. package/dist/beeq/{p-dbac0368.entry.js → p-b89dcf37.entry.js} +2 -2
  61. package/dist/beeq/p-b89dcf37.entry.js.map +1 -0
  62. package/dist/beeq/{p-f4e8ebd3.entry.js → p-ba8b92f1.entry.js} +2 -2
  63. package/dist/beeq/{p-8ed41b69.entry.js → p-bc1980d8.entry.js} +2 -2
  64. package/dist/beeq/{p-59a1b546.entry.js → p-c63ee3df.entry.js} +2 -2
  65. package/dist/beeq/p-c63ee3df.entry.js.map +1 -0
  66. package/dist/beeq/{p-ee1ecb6e.entry.js → p-f48c3ca7.entry.js} +2 -2
  67. package/dist/beeq.html-custom-data.json +169 -169
  68. package/dist/cjs/{assetsPath-32c4030b.js → assetsPath-95e7f5ab.js} +2 -2
  69. package/dist/cjs/{assetsPath-32c4030b.js.map → assetsPath-95e7f5ab.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 +9 -6
  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-d734f710.js} +13 -11
  130. package/dist/cjs/index-d734f710.js.map +1 -0
  131. package/dist/cjs/index.cjs.js +4 -4
  132. package/dist/cjs/{isDefined-5e8aae9d.js → isDefined-642f676a.js} +2 -2
  133. package/dist/cjs/{isDefined-5e8aae9d.js.map → isDefined-642f676a.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/empty-state/bq-empty-state.js +8 -7
  158. package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
  159. package/dist/collection/components/input/bq-input.js +8 -11
  160. package/dist/collection/components/input/bq-input.js.map +1 -1
  161. package/dist/collection/components/notification/bq-notification.js +6 -5
  162. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  163. package/dist/collection/components/option/bq-option.js +8 -7
  164. package/dist/collection/components/option/bq-option.js.map +1 -1
  165. package/dist/collection/components/page-title/bq-page-title.js +5 -2
  166. package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
  167. package/dist/collection/components/select/bq-select.js +7 -12
  168. package/dist/collection/components/select/bq-select.js.map +1 -1
  169. package/dist/collection/components/select/scss/bq-select.css +1 -1
  170. package/dist/collection/components/spinner/bq-spinner.js +6 -4
  171. package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
  172. package/dist/collection/components/tab/bq-tab.js +5 -2
  173. package/dist/collection/components/tab/bq-tab.js.map +1 -1
  174. package/dist/collection/components/tag/bq-tag.js +6 -3
  175. package/dist/collection/components/tag/bq-tag.js.map +1 -1
  176. package/dist/collection/components/textarea/bq-textarea.js +5 -6
  177. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  178. package/dist/collection/shared/utils/slot.js +2 -0
  179. package/dist/collection/shared/utils/slot.js.map +1 -1
  180. package/dist/components/bq-accordion-group.js +1 -1
  181. package/dist/components/bq-accordion.js +1 -1
  182. package/dist/components/bq-accordion.js.map +1 -1
  183. package/dist/components/bq-alert.js +1 -1
  184. package/dist/components/bq-alert.js.map +1 -1
  185. package/dist/components/bq-avatar.js +1 -1
  186. package/dist/components/bq-badge.js +1 -1
  187. package/dist/components/bq-breadcrumb-item.js +1 -1
  188. package/dist/components/bq-breadcrumb.js +1 -1
  189. package/dist/components/bq-breadcrumb.js.map +1 -1
  190. package/dist/components/bq-button.js +1 -1
  191. package/dist/components/bq-card.js +1 -1
  192. package/dist/components/bq-checkbox.js +1 -1
  193. package/dist/components/bq-date-picker.js +1 -1
  194. package/dist/components/bq-date-picker.js.map +1 -1
  195. package/dist/components/bq-dialog.js +1 -1
  196. package/dist/components/bq-dialog.js.map +1 -1
  197. package/dist/components/bq-divider.js +1 -1
  198. package/dist/components/bq-drawer.js +1 -1
  199. package/dist/components/bq-drawer.js.map +1 -1
  200. package/dist/components/bq-dropdown.js +1 -1
  201. package/dist/components/bq-empty-state.js +1 -1
  202. package/dist/components/bq-empty-state.js.map +1 -1
  203. package/dist/components/bq-icon.js +1 -1
  204. package/dist/components/bq-input.js +1 -1
  205. package/dist/components/bq-input.js.map +1 -1
  206. package/dist/components/bq-notification.js +1 -1
  207. package/dist/components/bq-notification.js.map +1 -1
  208. package/dist/components/bq-option-group.js +1 -1
  209. package/dist/components/bq-option-list.js +1 -1
  210. package/dist/components/bq-option.js +1 -1
  211. package/dist/components/bq-option.js.map +1 -1
  212. package/dist/components/bq-page-title.js +1 -1
  213. package/dist/components/bq-page-title.js.map +1 -1
  214. package/dist/components/bq-panel.js +1 -1
  215. package/dist/components/bq-progress.js +1 -1
  216. package/dist/components/bq-radio-group.js +1 -1
  217. package/dist/components/bq-radio.js +1 -1
  218. package/dist/components/bq-select.js +1 -1
  219. package/dist/components/bq-select.js.map +1 -1
  220. package/dist/components/bq-side-menu-item.js +1 -1
  221. package/dist/components/bq-side-menu.js +1 -1
  222. package/dist/components/bq-slider.js +1 -1
  223. package/dist/components/bq-spinner.js +1 -1
  224. package/dist/components/bq-spinner.js.map +1 -1
  225. package/dist/components/bq-status.js +1 -1
  226. package/dist/components/bq-step-item.js +1 -1
  227. package/dist/components/bq-steps.js +1 -1
  228. package/dist/components/bq-switch.js +1 -1
  229. package/dist/components/bq-tab-group.js +1 -1
  230. package/dist/components/bq-tab.js +1 -1
  231. package/dist/components/bq-tab.js.map +1 -1
  232. package/dist/components/bq-tag.js +1 -1
  233. package/dist/components/bq-textarea.js +1 -1
  234. package/dist/components/bq-textarea.js.map +1 -1
  235. package/dist/components/bq-toast.js +1 -1
  236. package/dist/components/bq-tooltip.js +1 -1
  237. package/dist/components/index.js +1 -1
  238. package/dist/components/{p-d7ce7165.js → p-260d4ca0.js} +2 -2
  239. package/dist/components/{p-d7ce7165.js.map → p-260d4ca0.js.map} +1 -1
  240. package/dist/components/{p-9a115ee5.js → p-263a1cc6.js} +2 -2
  241. package/dist/components/{p-5b34bd04.js → p-33faef06.js} +2 -2
  242. package/dist/components/p-46f7e0e3.js +6 -0
  243. package/dist/components/p-46f7e0e3.js.map +1 -0
  244. package/dist/components/{p-ac26ffcd.js → p-5c61f1f5.js} +2 -2
  245. package/dist/components/p-6078fd87.js +6 -0
  246. package/dist/components/{p-8d8eeb62.js → p-6478d24c.js} +2 -2
  247. package/dist/components/{p-f5588ccd.js → p-6c1e486c.js} +2 -2
  248. package/dist/components/p-6c1e486c.js.map +1 -0
  249. package/dist/components/{p-a02c6b73.js → p-71751caa.js} +2 -2
  250. package/dist/components/p-71751caa.js.map +1 -0
  251. package/dist/components/{p-b50adb19.js → p-8d04a487.js} +2 -2
  252. package/dist/components/p-a731ba87.js +6 -0
  253. package/dist/components/p-a731ba87.js.map +1 -0
  254. package/dist/components/{p-c58e0d87.js → p-f7c2d883.js} +2 -2
  255. package/dist/custom-elements.json +2790 -2857
  256. package/dist/esm/{assetsPath-57848212.js → assetsPath-060da522.js} +2 -2
  257. package/dist/esm/{assetsPath-57848212.js.map → assetsPath-060da522.js.map} +1 -1
  258. package/dist/esm/beeq.js +4 -4
  259. package/dist/esm/beeq.js.map +1 -1
  260. package/dist/esm/bq-accordion-group.entry.js +1 -1
  261. package/dist/esm/bq-accordion.entry.js +7 -8
  262. package/dist/esm/bq-accordion.entry.js.map +1 -1
  263. package/dist/esm/bq-alert.entry.js +8 -9
  264. package/dist/esm/bq-alert.entry.js.map +1 -1
  265. package/dist/esm/bq-avatar.entry.js +1 -1
  266. package/dist/esm/bq-badge.entry.js +8 -5
  267. package/dist/esm/bq-badge.entry.js.map +1 -1
  268. package/dist/esm/bq-breadcrumb-item.entry.js +2 -2
  269. package/dist/esm/bq-breadcrumb.entry.js +5 -2
  270. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  271. package/dist/esm/bq-button_2.entry.js +9 -6
  272. package/dist/esm/bq-button_2.entry.js.map +1 -1
  273. package/dist/esm/bq-card.entry.js +1 -1
  274. package/dist/esm/bq-checkbox.entry.js +1 -1
  275. package/dist/esm/bq-date-picker.entry.js +97 -17
  276. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  277. package/dist/esm/bq-dialog.entry.js +8 -9
  278. package/dist/esm/bq-dialog.entry.js.map +1 -1
  279. package/dist/esm/bq-divider.entry.js +2 -2
  280. package/dist/esm/bq-drawer.entry.js +9 -6
  281. package/dist/esm/bq-drawer.entry.js.map +1 -1
  282. package/dist/esm/bq-dropdown_2.entry.js +1 -1
  283. package/dist/esm/bq-empty-state.entry.js +10 -9
  284. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  285. package/dist/esm/bq-input.entry.js +11 -14
  286. package/dist/esm/bq-input.entry.js.map +1 -1
  287. package/dist/esm/bq-notification.entry.js +8 -7
  288. package/dist/esm/bq-notification.entry.js.map +1 -1
  289. package/dist/esm/bq-option-group.entry.js +1 -1
  290. package/dist/esm/bq-option-list_2.entry.js +8 -5
  291. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  292. package/dist/esm/bq-option.entry.js +10 -9
  293. package/dist/esm/bq-option.entry.js.map +1 -1
  294. package/dist/esm/bq-page-title.entry.js +7 -4
  295. package/dist/esm/bq-page-title.entry.js.map +1 -1
  296. package/dist/esm/bq-progress.entry.js +1 -1
  297. package/dist/esm/bq-radio-group.entry.js +1 -1
  298. package/dist/esm/bq-radio.entry.js +1 -1
  299. package/dist/esm/bq-select.entry.js +10 -15
  300. package/dist/esm/bq-select.entry.js.map +1 -1
  301. package/dist/esm/bq-side-menu-item.entry.js +2 -2
  302. package/dist/esm/bq-side-menu.entry.js +1 -1
  303. package/dist/esm/bq-slider.entry.js +1 -1
  304. package/dist/esm/bq-spinner.entry.js +8 -6
  305. package/dist/esm/bq-spinner.entry.js.map +1 -1
  306. package/dist/esm/bq-status.entry.js +1 -1
  307. package/dist/esm/bq-step-item.entry.js +1 -1
  308. package/dist/esm/bq-steps.entry.js +1 -1
  309. package/dist/esm/bq-switch.entry.js +2 -2
  310. package/dist/esm/bq-tab-group.entry.js +1 -1
  311. package/dist/esm/bq-tab.entry.js +7 -4
  312. package/dist/esm/bq-tab.entry.js.map +1 -1
  313. package/dist/esm/bq-textarea.entry.js +7 -8
  314. package/dist/esm/bq-textarea.entry.js.map +1 -1
  315. package/dist/esm/bq-toast.entry.js +1 -1
  316. package/dist/esm/bq-tooltip.entry.js +1 -1
  317. package/dist/esm/{index-59610291.js → index-46823bdb.js} +13 -11
  318. package/dist/esm/index-46823bdb.js.map +1 -0
  319. package/dist/esm/index.js +5 -5
  320. package/dist/esm/{isDefined-30b8b652.js → isDefined-8bdbf6b8.js} +2 -2
  321. package/dist/esm/{isDefined-30b8b652.js.map → isDefined-8bdbf6b8.js.map} +1 -1
  322. package/dist/esm/loader.js +3 -3
  323. package/dist/esm/{slot-58bfedb5.js → slot-be230a01.js} +3 -1
  324. package/dist/esm/slot-be230a01.js.map +1 -0
  325. package/dist/hydrate/index.js +225 -1282
  326. package/dist/hydrate/index.mjs +225 -1282
  327. package/dist/stencil.config.js +20 -17
  328. package/dist/stencil.config.js.map +1 -1
  329. package/dist/types/components/accordion/bq-accordion.d.ts +1 -2
  330. package/dist/types/components/alert/bq-alert.d.ts +1 -2
  331. package/dist/types/components/badge/bq-badge.d.ts +2 -1
  332. package/dist/types/components/breadcrumb/bq-breadcrumb.d.ts +1 -0
  333. package/dist/types/components/button/bq-button.d.ts +1 -0
  334. package/dist/types/components/date-picker/bq-date-picker.d.ts +3 -4
  335. package/dist/types/components/date-picker/bq-date-picker.types.d.ts +16 -0
  336. package/dist/types/components/date-picker/helper/callyLibrary.d.ts +11 -0
  337. package/dist/types/components/dialog/bq-dialog.d.ts +1 -2
  338. package/dist/types/components/drawer/bq-drawer.d.ts +1 -0
  339. package/dist/types/components/empty-state/bq-empty-state.d.ts +2 -2
  340. package/dist/types/components/input/bq-input.d.ts +2 -4
  341. package/dist/types/components/notification/bq-notification.d.ts +2 -2
  342. package/dist/types/components/option/bq-option.d.ts +2 -2
  343. package/dist/types/components/page-title/bq-page-title.d.ts +1 -0
  344. package/dist/types/components/select/bq-select.d.ts +1 -4
  345. package/dist/types/components/tab/bq-tab.d.ts +1 -0
  346. package/dist/types/components/tag/bq-tag.d.ts +1 -0
  347. package/dist/types/components/textarea/bq-textarea.d.ts +1 -2
  348. package/dist/types/global.d.ts +0 -10
  349. package/package.json +2 -3
  350. package/dist/beeq/p-15bf8ffd.entry.js.map +0 -1
  351. package/dist/beeq/p-19ea2c90.entry.js.map +0 -1
  352. package/dist/beeq/p-19f5a833.entry.js.map +0 -1
  353. package/dist/beeq/p-34611c2f.js +0 -6
  354. package/dist/beeq/p-34611c2f.js.map +0 -1
  355. package/dist/beeq/p-39a80765.entry.js.map +0 -1
  356. package/dist/beeq/p-3fe626f1.entry.js.map +0 -1
  357. package/dist/beeq/p-4a3784e1.js +0 -7
  358. package/dist/beeq/p-4a3784e1.js.map +0 -1
  359. package/dist/beeq/p-59a1b546.entry.js.map +0 -1
  360. package/dist/beeq/p-65d67b85.entry.js.map +0 -1
  361. package/dist/beeq/p-6bea33f4.entry.js +0 -6
  362. package/dist/beeq/p-6bea33f4.entry.js.map +0 -1
  363. package/dist/beeq/p-70310ac8.entry.js.map +0 -1
  364. package/dist/beeq/p-a4e11bbc.entry.js.map +0 -1
  365. package/dist/beeq/p-b0d168c8.entry.js.map +0 -1
  366. package/dist/beeq/p-b69f347d.entry.js.map +0 -1
  367. package/dist/beeq/p-ba1f9637.entry.js.map +0 -1
  368. package/dist/beeq/p-cb9fa154.entry.js.map +0 -1
  369. package/dist/beeq/p-cf923c68.js +0 -6
  370. package/dist/beeq/p-dbac0368.entry.js.map +0 -1
  371. package/dist/beeq/p-e8f147c2.entry.js.map +0 -1
  372. package/dist/cjs/cally-1bde2e82.js +0 -1162
  373. package/dist/cjs/cally-1bde2e82.js.map +0 -1
  374. package/dist/cjs/index-0c8d249a.js.map +0 -1
  375. package/dist/cjs/slot-2fee189a.js.map +0 -1
  376. package/dist/components/p-34611c2f.js +0 -6
  377. package/dist/components/p-34611c2f.js.map +0 -1
  378. package/dist/components/p-37483f1c.js +0 -6
  379. package/dist/components/p-37483f1c.js.map +0 -1
  380. package/dist/components/p-6e0c7ab4.js +0 -6
  381. package/dist/components/p-a02c6b73.js.map +0 -1
  382. package/dist/components/p-d16482dc.js +0 -6
  383. package/dist/components/p-d16482dc.js.map +0 -1
  384. package/dist/components/p-f5588ccd.js.map +0 -1
  385. package/dist/esm/cally-49a83be1.js +0 -1157
  386. package/dist/esm/cally-49a83be1.js.map +0 -1
  387. package/dist/esm/index-59610291.js.map +0 -1
  388. package/dist/esm/slot-58bfedb5.js.map +0 -1
  389. /package/dist/beeq/{p-e655938a.entry.js.map → p-0ac37ff8.entry.js.map} +0 -0
  390. /package/dist/beeq/{p-803269b3.entry.js.map → p-1a8f376a.entry.js.map} +0 -0
  391. /package/dist/beeq/{p-3806d9e3.entry.js.map → p-24135e46.entry.js.map} +0 -0
  392. /package/dist/beeq/{p-e4dd6ff4.js.map → p-2b530ad4.js.map} +0 -0
  393. /package/dist/beeq/{p-c42f9ac5.entry.js.map → p-38ee4c02.entry.js.map} +0 -0
  394. /package/dist/beeq/{p-b7b3f7c6.entry.js.map → p-3f5865c0.entry.js.map} +0 -0
  395. /package/dist/beeq/{p-9a7af424.entry.js.map → p-45bfda93.entry.js.map} +0 -0
  396. /package/dist/beeq/{p-a8075be3.entry.js.map → p-63b4f8f9.entry.js.map} +0 -0
  397. /package/dist/beeq/{p-4d21a49d.entry.js.map → p-648da701.entry.js.map} +0 -0
  398. /package/dist/beeq/{p-a8d64d1b.entry.js.map → p-7bb8664c.entry.js.map} +0 -0
  399. /package/dist/beeq/{p-7585f825.entry.js.map → p-7ff775a3.entry.js.map} +0 -0
  400. /package/dist/beeq/{p-5546f242.entry.js.map → p-801f7b25.entry.js.map} +0 -0
  401. /package/dist/beeq/{p-cf923c68.js.map → p-852225bc.js.map} +0 -0
  402. /package/dist/beeq/{p-7efff703.entry.js.map → p-9a803ecf.entry.js.map} +0 -0
  403. /package/dist/beeq/{p-b129db1a.entry.js.map → p-9eea4f4f.entry.js.map} +0 -0
  404. /package/dist/beeq/{p-ed569a61.entry.js.map → p-a3c36d6c.entry.js.map} +0 -0
  405. /package/dist/beeq/{p-bbaad491.entry.js.map → p-a620392e.entry.js.map} +0 -0
  406. /package/dist/beeq/{p-66b6d69a.entry.js.map → p-a661454e.entry.js.map} +0 -0
  407. /package/dist/beeq/{p-4500ffe5.entry.js.map → p-a7c4f022.entry.js.map} +0 -0
  408. /package/dist/beeq/{p-3f654a12.entry.js.map → p-b1ab6b7f.entry.js.map} +0 -0
  409. /package/dist/beeq/{p-f4e8ebd3.entry.js.map → p-ba8b92f1.entry.js.map} +0 -0
  410. /package/dist/beeq/{p-8ed41b69.entry.js.map → p-bc1980d8.entry.js.map} +0 -0
  411. /package/dist/beeq/{p-ee1ecb6e.entry.js.map → p-f48c3ca7.entry.js.map} +0 -0
  412. /package/dist/components/{p-9a115ee5.js.map → p-263a1cc6.js.map} +0 -0
  413. /package/dist/components/{p-5b34bd04.js.map → p-33faef06.js.map} +0 -0
  414. /package/dist/components/{p-ac26ffcd.js.map → p-5c61f1f5.js.map} +0 -0
  415. /package/dist/components/{p-6e0c7ab4.js.map → p-6078fd87.js.map} +0 -0
  416. /package/dist/components/{p-8d8eeb62.js.map → p-6478d24c.js.map} +0 -0
  417. /package/dist/components/{p-b50adb19.js.map → p-8d04a487.js.map} +0 -0
  418. /package/dist/components/{p-c58e0d87.js.map → p-f7c2d883.js.map} +0 -0
  419. /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/packages/beeq/.stencil/packages/beeq/stencil.config.d.ts +0 -0
  420. /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/packages/beeq/.stencil/tailwind.config.d.ts +0 -0
@@ -0,0 +1,73 @@
1
+ /*!
2
+ * Built by Endavans
3
+ * © https://beeq.design - Apache 2 License.
4
+ */
5
+ /* -------------------------------------------------------------------------- */
6
+ /* Cally Library loader helper */
7
+ /* -------------------------------------------------------------------------- */
8
+ const CALLY_SCRIPT_ATTRIBUTE = 'data-cally-library';
9
+ //❗ Make sure to update the version here when the library releases a new version
10
+ const CALLY_LIB_VERSION = '0.8.0';
11
+ /**
12
+ * ❗ Make sure to update the hash here if the `CALLY_LIB_VERSION` is updated
13
+ * This hash is used to ensure the integrity of the library when loading it
14
+ * from a CDN.
15
+ * @see https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
16
+ */
17
+ const CALLY_LIB_HASH = 'sha384-giuY/f8D3+ehgOTmQMr4HvrreOITDmvXsZuDCJ1csQ+3dURHA24NqRd8lkSI6uGF';
18
+ let isLibraryLoaded = false;
19
+ /**
20
+ * Checks if the Cally library is already loaded in the document
21
+ * @returns {boolean} True if the library is loaded
22
+ */
23
+ export const isCallyLibraryLoaded = () => {
24
+ // This might be a bit redundant, but it's a sanity check to ensure the library is actually loaded
25
+ return isLibraryLoaded || document.querySelector(`script[${CALLY_SCRIPT_ATTRIBUTE}]`) !== null;
26
+ };
27
+ /**
28
+ * Loads the Cally library for the date picker component
29
+ * @throws {Error} If the library fails to load
30
+ * @return {Promise<void>}
31
+ */
32
+ export const loadCallyLibrary = async () => {
33
+ if (isCallyLibraryLoaded())
34
+ return;
35
+ try {
36
+ await loadScript({
37
+ type: 'module',
38
+ src: `https://unpkg.com/cally@${CALLY_LIB_VERSION}/dist/cally.js`,
39
+ attributes: {
40
+ [CALLY_SCRIPT_ATTRIBUTE]: '',
41
+ crossOrigin: 'anonymous',
42
+ integrity: CALLY_LIB_HASH,
43
+ },
44
+ });
45
+ isLibraryLoaded = true;
46
+ }
47
+ catch (error) {
48
+ isLibraryLoaded = false;
49
+ throw new Error(`Failed to load the cally library: ${error instanceof Error ? error.message : 'Unknown error'}`);
50
+ }
51
+ };
52
+ /**
53
+ * Helper function to load a script with given configuration
54
+ * @param {Object} config - Script configuration
55
+ * @param {string} config.type - The type of the script
56
+ * @param {string} config.src - The source URL of the script
57
+ * @param {Object} [config.attributes] - Additional attributes to set on the script element
58
+ * @returns {Promise<void>}
59
+ */
60
+ const loadScript = ({ type, src, attributes = {} }) => {
61
+ return new Promise((resolve, reject) => {
62
+ const script = document.createElement('script');
63
+ script.type = type;
64
+ script.src = src;
65
+ script.onload = () => resolve();
66
+ script.onerror = (error) => reject(new Error(`Failed to load script: ${src}, ${error instanceof Error ? error.message : 'Unknown error'}`));
67
+ Object.entries(attributes).forEach(([key, value]) => {
68
+ script.setAttribute(key, value);
69
+ });
70
+ document.head.appendChild(script);
71
+ });
72
+ };
73
+ //# sourceMappingURL=callyLibrary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callyLibrary.js","sourceRoot":"","sources":["../../../../../../../src/components/date-picker/helper/callyLibrary.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAEhF,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AACpD,gFAAgF;AAChF,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAClC;;;;;GAKG;AACH,MAAM,cAAc,GAAG,yEAAyE,CAAC;AAEjG,IAAI,eAAe,GAAG,KAAK,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAY,EAAE;IAChD,kGAAkG;IAClG,OAAO,eAAe,IAAI,QAAQ,CAAC,aAAa,CAAC,UAAU,sBAAsB,GAAG,CAAC,KAAK,IAAI,CAAC;AACjG,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,IAAmB,EAAE;IACxD,IAAI,oBAAoB,EAAE;QAAE,OAAO;IAEnC,IAAI,CAAC;QACH,MAAM,UAAU,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,2BAA2B,iBAAiB,gBAAgB;YACjE,UAAU,EAAE;gBACV,CAAC,sBAAsB,CAAC,EAAE,EAAE;gBAC5B,WAAW,EAAE,WAAW;gBACxB,SAAS,EAAE,cAAc;aAC1B;SACF,CAAC,CAAC;QAEH,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAe,GAAG,KAAK,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,qCAAqC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;IACnH,CAAC;AACH,CAAC,CAAC;AAQF;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,EAAE,EAAgB,EAAiB,EAAE;IACjF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;QACnB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;QAEjB,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE,CAChC,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,GAAG,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;QAElH,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAClD,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Cally Library loader helper */\n/* -------------------------------------------------------------------------- */\n\nconst CALLY_SCRIPT_ATTRIBUTE = 'data-cally-library';\n//❗ Make sure to update the version here when the library releases a new version\nconst CALLY_LIB_VERSION = '0.8.0';\n/**\n * ❗ Make sure to update the hash here if the `CALLY_LIB_VERSION` is updated\n * This hash is used to ensure the integrity of the library when loading it\n * from a CDN.\n * @see https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity\n */\nconst CALLY_LIB_HASH = 'sha384-giuY/f8D3+ehgOTmQMr4HvrreOITDmvXsZuDCJ1csQ+3dURHA24NqRd8lkSI6uGF';\n\nlet isLibraryLoaded = false;\n\n/**\n * Checks if the Cally library is already loaded in the document\n * @returns {boolean} True if the library is loaded\n */\nexport const isCallyLibraryLoaded = (): boolean => {\n // This might be a bit redundant, but it's a sanity check to ensure the library is actually loaded\n return isLibraryLoaded || document.querySelector(`script[${CALLY_SCRIPT_ATTRIBUTE}]`) !== null;\n};\n\n/**\n * Loads the Cally library for the date picker component\n * @throws {Error} If the library fails to load\n * @return {Promise<void>}\n */\nexport const loadCallyLibrary = async (): Promise<void> => {\n if (isCallyLibraryLoaded()) return;\n\n try {\n await loadScript({\n type: 'module',\n src: `https://unpkg.com/cally@${CALLY_LIB_VERSION}/dist/cally.js`,\n attributes: {\n [CALLY_SCRIPT_ATTRIBUTE]: '',\n crossOrigin: 'anonymous',\n integrity: CALLY_LIB_HASH,\n },\n });\n\n isLibraryLoaded = true;\n } catch (error) {\n isLibraryLoaded = false;\n throw new Error(`Failed to load the cally library: ${error instanceof Error ? error.message : 'Unknown error'}`);\n }\n};\n\ninterface ScriptConfig {\n type: string;\n src: string;\n attributes?: Record<string, string>;\n}\n\n/**\n * Helper function to load a script with given configuration\n * @param {Object} config - Script configuration\n * @param {string} config.type - The type of the script\n * @param {string} config.src - The source URL of the script\n * @param {Object} [config.attributes] - Additional attributes to set on the script element\n * @returns {Promise<void>}\n */\nconst loadScript = ({ type, src, attributes = {} }: ScriptConfig): Promise<void> => {\n return new Promise<void>((resolve, reject) => {\n const script = document.createElement('script');\n script.type = type;\n script.src = src;\n\n script.onload = () => resolve();\n script.onerror = (error: Event) =>\n reject(new Error(`Failed to load script: ${src}, ${error instanceof Error ? error.message : 'Unknown error'}`));\n\n Object.entries(attributes).forEach(([key, value]) => {\n script.setAttribute(key, value);\n });\n\n document.head.appendChild(script);\n });\n};\n"]}
@@ -149,6 +149,7 @@ export class BqDialog {
149
149
  this.checkPropValues();
150
150
  }
151
151
  componentDidLoad() {
152
+ this.handleSlotChange();
152
153
  this.handleOpenChange();
153
154
  this.closeSlotElem = this.el.shadowRoot.querySelector('slot[name="button-close"]');
154
155
  this.closeSlotElem?.addEventListener('click', () => this.hide());
@@ -246,10 +247,8 @@ export class BqDialog {
246
247
  this.bqAfterClose.emit();
247
248
  this.el.classList.remove(this.OPEN_CSS_CLASS);
248
249
  };
249
- handleContentSlotChange = () => {
250
+ handleSlotChange = () => {
250
251
  this.hasContent = hasSlotContent(this.contentElem);
251
- };
252
- handleFooterSlotChange = () => {
253
252
  this.hasFooter = hasSlotContent(this.footerElem, 'footer');
254
253
  };
255
254
  // render() function
@@ -259,18 +258,18 @@ export class BqDialog {
259
258
  const style = {
260
259
  ...(this.border && { '--bq-dialog--border-radius': `var(--bq-radius--${this.border})` }),
261
260
  };
262
- return (h("dialog", { key: '3cd44a424a5e44fc3a74b8d2c3f56f1d489760d6', style: style, class: {
261
+ return (h("dialog", { key: '135ba080be5d1283779bab5563f72f5e840781ef', style: style, class: {
263
262
  [`bq-dialog hidden ${this.size} m-auto focus-visible:outline-none`]: true,
264
263
  'inset-be-[50%] inset-bs-[50%]': this.disableBackdrop,
265
- }, "data-transition-enter": "transition ease-in duration-300", "data-transition-enter-start": "opacity-0 scale-90", "data-transition-enter-end": "opacity-100 scale-100", "data-transition-leave": "transition ease-out duration-300", "data-transition-leave-start": "opacity-100 scale-100", "data-transition-leave-end": "opacity-0 scale-90", inert: this.open ? undefined : true, ref: (dialogElem) => (this.dialogElem = dialogElem), "aria-modal": "true", "aria-labelledby": "bq-dialog--title", part: "dialog" }, h("main", { key: 'c967e58afe1dc96623506cbc86ee414b1043a263', class: "flex flex-col gap-[--bq-dialog--title-body-gap] overflow-hidden", part: "content" }, h("header", { key: '17135bc61996c8896ec713a1331d7e1ff21e48a1', class: "bq-dialog--header", part: "header" }, h("div", { key: 'a31dda76fe4a33da03a7e8ef3883c6b2a6c85dcf', id: "bq-dialog--title", class: "bq-dialog--title flex flex-1 items-center justify-between", part: "title" }, h("slot", { key: 'eb4199ff50b409cb8b1435e54199b137248f9cb8', name: "title" })), h("slot", { key: '81cbc62aae11a6cb1eb23a16516157cfb904689d', name: "button-close" }, !this.hideCloseButton && (h("bq-button", { key: '8f79cf67625472520c7d5025bef8bf37d00a0c17', class: "bq-dialog--close", appearance: "text", size: "small" }, h("bq-icon", { key: 'eb6c9f7186e1d68294bb2bbfab73848d804a443c', class: "cursor-pointer", name: "x", role: "img", title: "Close" }))))), h("div", { key: '7f103bd3befe76498d33727930311a70bc6ceac6', class: {
264
+ }, "data-transition-enter": "transition ease-in duration-300", "data-transition-enter-start": "opacity-0 scale-90", "data-transition-enter-end": "opacity-100 scale-100", "data-transition-leave": "transition ease-out duration-300", "data-transition-leave-start": "opacity-100 scale-100", "data-transition-leave-end": "opacity-0 scale-90", inert: this.open ? undefined : true, ref: (dialogElem) => (this.dialogElem = dialogElem), "aria-modal": "true", "aria-labelledby": "bq-dialog--title", part: "dialog" }, h("main", { key: 'f24799fddd755cf16ceee241946ad87719a28769', class: "flex flex-col gap-[--bq-dialog--title-body-gap] overflow-hidden", part: "content" }, h("header", { key: 'caca1dffb20724b200bf368f3b6b8e50ca3fbaad', class: "bq-dialog--header", part: "header" }, h("div", { key: 'c859333b1df5ec270cbb0484b7d74257283eba7b', id: "bq-dialog--title", class: "bq-dialog--title flex flex-1 items-center justify-between", part: "title" }, h("slot", { key: '6efb1aa83bf4e37efdbdfb4b7d0580b8c6c068f5', name: "title" })), h("slot", { key: '86cb87c4074a571b18bdc2033a8395f8ce0af484', name: "button-close" }, !this.hideCloseButton && (h("bq-button", { key: 'f9fface9461e62501a7770024ca3b599f8ce0e10', class: "bq-dialog--close", appearance: "text", size: "small" }, h("bq-icon", { key: 'c68d894a421ced27a57fd5bdf40638082d224f56', class: "cursor-pointer", name: "x", role: "img", title: "Close" }))))), h("div", { key: '5b58345eb77b8c1d21439a7eb36ff17cc0e5932e', class: {
266
265
  '!hidden': !this.hasContent,
267
266
  'overflow-y-auto p-i-[--bq-dialog--padding]': this.hasContent,
268
267
  '!p-be-[--bq-dialog--padding]': !this.hasFooter,
269
- }, ref: (mainElem) => (this.contentElem = mainElem), part: "body" }, h("slot", { key: '09f66573a12a920560fca112333c817fba366bef', onSlotchange: this.handleContentSlotChange }))), h("footer", { key: 'a44d7e507c56d6c1de5535e77658a24de8361b57', class: {
268
+ }, ref: (mainElem) => (this.contentElem = mainElem), part: "body" }, h("slot", { key: '266d2c5b892814dd0b253ce83ee03df849263a0f', onSlotchange: this.handleSlotChange }))), h("footer", { key: '1ce0fbcc5213ebb56e18d03e22c498f44674eef4', class: {
270
269
  '!hidden': !this.hasFooter,
271
270
  'bq-dialog--footer': this.hasFooter,
272
271
  'bg-ui-alt !p-b-s': this.footerAppearance === 'highlight',
273
- }, ref: (footerElem) => (this.footerElem = footerElem), part: "footer" }, h("slot", { key: '7bbd41828e3c30a3a35916b448fb48e65d4e0d63', name: "footer", onSlotchange: this.handleFooterSlotChange }))));
272
+ }, ref: (footerElem) => (this.footerElem = footerElem), part: "footer" }, h("slot", { key: '7cfba4b2c8dd4512fed61e81304b4e9bec317ad9', name: "footer", onSlotchange: this.handleSlotChange }))));
274
273
  }
275
274
  static get is() { return "bq-dialog"; }
276
275
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-dialog.js","sourceRoot":"","sources":["../../../../../../src/components/dialog/bq-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport {\n DIALOG_FOOTER_APPEARANCE,\n DIALOG_SIZE,\n TDialogBorderRadius,\n TDialogFooterAppearance,\n TDialogSize,\n} from './bq-dialog.types';\nimport { enter, hasSlotContent, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Dialog component is used to display additional content or prompt a user for action.\n * It provides a way to display additional information, options, or controls in a separate, non-obstructive interface element.\n *\n * @example How to use it\n * ```html\n * <bq-dialog footer-appearance=\"standard\" border=\"m\" size=\"medium\">\n * <h5 class=\"bold flex items-center gap-s\" slot=\"title\">\n * <bq-icon name=\"info\" size=\"30\" color=\"text--accent\" role=\"img\" title=\"Info\"></bq-icon>\n * Title\n * </h5>\n * <p>\n * Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n * standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a\n * type specimen book.\n * </p>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"link\">Button</bq-button>\n * <bq-button variant=\"ghost\">Button</bq-button>\n * <bq-button variant=\"standard\" slot=\"footer\">Button</bq-button>\n * </div>\n * </bq-dialog>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/15b6fc-dialog\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {\"none\" | \"xs2\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"full\"} border - Border radius of the dialog component.\n * @attr {boolean} disable-backdrop - If true, the backdrop overlay won't be shown when the dialog opens.\n * @attr {boolean} disable-close-esc-keydown - If true, the dialog will not close when the [Esc] key is pressed.\n * @attr {boolean} disable-close-click-outside - If true, the dialog will not close when clicking on the backdrop overlay.\n * @attr {\"standard\" | \"highlight\"} footer-appearance - The appearance of the footer.\n * @attr {boolean} hide-close-button - If true, it hides the close button.\n * @attr {boolean} open - If true, the dialog will be shown as open.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the dialog.\n *\n * @method show - Open the dialog.\n * @method hide - Closes the dialog.\n * @method cancel - Dismiss or cancel the dialog.\n *\n * @event bqCancel - Callback handler emitted when the dialog has been canceled or dismissed.\n * @event bqClose - Callback handler emitted when the dialog will close.\n * @event bqOpen - Callback handler emitted when the dialog will open.\n * @event bqAfterOpen - Callback handler emitted when the dialog finish opening.\n * @event bqAfterClose - Callback handler emitted when the dialog finish closing.\n *\n * @slot title - The title content of the dialog.\n * @slot - The body content of the dialog.\n * @slot footer - The footer content of the dialog.\n * @slot button-close - The close button content of the dialog.\n *\n * @part body - The `<main>` that holds the dialog body content.\n * @part button-close - The button that closes the dialog on click.\n * @part content - The `<div>` container that holds the dialog title and body content.\n * @part dialog - The `<dialog>` wrapper container inside the shadow DOM.\n * @part footer - The `<footer>` that holds footer content.\n * @part header - The `<header>` that holds the icon, title, description and close button.\n * @part title - The `<div>` that holds the title content.\n *\n * @cssprop --bq-dialog--background - Dialog background color\n * @cssprop --bq-dialog--background-backdrop - Dialog backdrop background color\n * @cssprop --bq-dialog--box-shadow - Dialog box shadow\n * @cssprop --bq-dialog--border-color - Dialog border color\n * @cssprop --bq-dialog--border-style - Dialog border style\n * @cssprop --bq-dialog--border-width - Dialog border width\n * @cssprop --bq-dialog--border-radius - Dialog border radius\n * @cssprop --bq-dialog--padding - Dialog padding\n * @cssprop --bq-dialog--content-footer-gap - Dialog gap distance between content and footer elements\n * @cssprop --bq-dialog--title-body-gap - Dialog gap distance between title and body elements\n * @cssprop --bq-dialog--width-small - Dialog small width\n * @cssprop --bq-dialog--width-medium - Dialog medium width\n * @cssprop --bq-dialog--width-large - Dialog large width\n * @cssprop --bq-dialog-z-index - Dialog z-index applied when opened\n */\n@Component({\n tag: 'bq-dialog',\n styleUrl: './scss/bq-dialog.scss',\n shadow: true,\n})\nexport class BqDialog {\n // Own Properties\n // ====================\n\n private dialogElem: HTMLDialogElement;\n private contentElem: HTMLElement;\n private footerElem: HTMLElement;\n private closeSlotElem: HTMLElement;\n private OPEN_CSS_CLASS = 'bq-dialog--open';\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqDialogElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** Border radius of the dialog component */\n @Prop({ reflect: true }) border: TDialogBorderRadius = 'm';\n\n /** If true, the backdrop overlay won't be shown when the dialog opens */\n @Prop({ reflect: true }) disableBackdrop = false;\n\n /** If true, the dialog will not close when the [Esc] key is press */\n @Prop({ reflect: true }) disableCloseEscKeydown = false;\n\n /** If true, the dialog will not close when clicking on the backdrop overlay */\n @Prop({ reflect: true }) disableCloseClickOutside = false;\n\n /** The appearance of footer */\n @Prop({ reflect: true }) footerAppearance: TDialogFooterAppearance = 'standard';\n\n /** If true, it hides the close button */\n @Prop({ reflect: true }) hideCloseButton = false;\n\n /** If true, the dialog will be shown as open */\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n\n /** The size of the dialog */\n @Prop({ reflect: true, mutable: true }) size: TDialogSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n @Watch('footerAppearance')\n @Watch('size')\n checkPropValues() {\n validatePropValue(DIALOG_SIZE, 'large', this.el, 'size');\n validatePropValue(DIALOG_FOOTER_APPEARANCE, 'standard', this.el, 'footerAppearance');\n }\n\n @Watch('open')\n async handleOpenChange() {\n if (this.open) {\n await this.handleOpen();\n return;\n }\n\n await this.handleClose();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the dialog has been canceled or dismissed */\n @Event() bqCancel!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will close */\n @Event() bqClose!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will open */\n @Event() bqOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish opening */\n @Event() bqAfterOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish closing */\n @Event() bqAfterClose!: EventEmitter<void>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleOpenChange();\n this.closeSlotElem = this.el.shadowRoot.querySelector('slot[name=\"button-close\"]');\n this.closeSlotElem?.addEventListener('click', () => this.hide());\n }\n\n disconnectedCallback() {\n this.closeSlotElem?.removeEventListener('click', () => this.hide());\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.dialogElem || this.disableCloseClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.dialogElem.getBoundingClientRect();\n if (\n event.clientY < rect.top ||\n event.clientY > rect.bottom ||\n event.clientX < rect.left ||\n event.clientX > rect.right\n ) {\n await this.cancel();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(ev: KeyboardEvent) {\n const isEscapeKey = ev.key === 'Escape' || ev.key === 'Esc';\n if (!this.open || !this.dialogElem || !isEscapeKey) return;\n\n if (this.disableCloseEscKeydown) {\n ev.preventDefault();\n return;\n }\n\n await this.cancel();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Open the dialog */\n @Method()\n async show() {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n /** Closes the dialog */\n @Method()\n async hide() {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Dismiss or cancel the dialog */\n @Method()\n async cancel() {\n const ev = this.bqCancel.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleClose = async () => {\n if (!this.dialogElem) return;\n\n await leave(this.dialogElem);\n this.dialogElem.close();\n // Emit bqAfterClose event after the dialog is closed\n this.handleTransitionEnd();\n };\n\n private handleOpen = async () => {\n if (!this.dialogElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n // Show the dialog\n if (this.disableBackdrop) {\n this.dialogElem.show();\n } else {\n this.dialogElem.showModal();\n }\n await enter(this.dialogElem);\n // Emit bqAfterOpen event after the dialog is opened\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private handleContentSlotChange = () => {\n this.hasContent = hasSlotContent(this.contentElem);\n };\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-dialog--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <dialog\n style={style}\n class={{\n [`bq-dialog hidden ${this.size} m-auto focus-visible:outline-none`]: true,\n 'inset-be-[50%] inset-bs-[50%]': this.disableBackdrop,\n }}\n data-transition-enter=\"transition ease-in duration-300\"\n data-transition-enter-start=\"opacity-0 scale-90\"\n data-transition-enter-end=\"opacity-100 scale-100\"\n data-transition-leave=\"transition ease-out duration-300\"\n data-transition-leave-start=\"opacity-100 scale-100\"\n data-transition-leave-end=\"opacity-0 scale-90\"\n inert={this.open ? undefined : true}\n ref={(dialogElem) => (this.dialogElem = dialogElem)}\n aria-modal=\"true\"\n aria-labelledby=\"bq-dialog--title\"\n part=\"dialog\"\n >\n <main class=\"flex flex-col gap-[--bq-dialog--title-body-gap] overflow-hidden\" part=\"content\">\n <header class=\"bq-dialog--header\" part=\"header\">\n <div id=\"bq-dialog--title\" class=\"bq-dialog--title flex flex-1 items-center justify-between\" part=\"title\">\n <slot name=\"title\" />\n </div>\n <slot name=\"button-close\">\n {!this.hideCloseButton && (\n <bq-button class=\"bq-dialog--close\" appearance=\"text\" size=\"small\">\n <bq-icon class=\"cursor-pointer\" name=\"x\" role=\"img\" title=\"Close\" />\n </bq-button>\n )}\n </slot>\n </header>\n <div\n class={{\n '!hidden': !this.hasContent,\n 'overflow-y-auto p-i-[--bq-dialog--padding]': this.hasContent,\n '!p-be-[--bq-dialog--padding]': !this.hasFooter,\n }}\n ref={(mainElem) => (this.contentElem = mainElem)}\n part=\"body\"\n >\n <slot onSlotchange={this.handleContentSlotChange} />\n </div>\n </main>\n <footer\n class={{\n '!hidden': !this.hasFooter,\n 'bq-dialog--footer': this.hasFooter,\n 'bg-ui-alt !p-b-s': this.footerAppearance === 'highlight',\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </footer>\n </dialog>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-dialog.js","sourceRoot":"","sources":["../../../../../../src/components/dialog/bq-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE/G,OAAO,EACL,wBAAwB,EACxB,WAAW,GAIZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Watch } from '@stencil/core';\n\nimport {\n DIALOG_FOOTER_APPEARANCE,\n DIALOG_SIZE,\n TDialogBorderRadius,\n TDialogFooterAppearance,\n TDialogSize,\n} from './bq-dialog.types';\nimport { enter, hasSlotContent, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Dialog component is used to display additional content or prompt a user for action.\n * It provides a way to display additional information, options, or controls in a separate, non-obstructive interface element.\n *\n * @example How to use it\n * ```html\n * <bq-dialog footer-appearance=\"standard\" border=\"m\" size=\"medium\">\n * <h5 class=\"bold flex items-center gap-s\" slot=\"title\">\n * <bq-icon name=\"info\" size=\"30\" color=\"text--accent\" role=\"img\" title=\"Info\"></bq-icon>\n * Title\n * </h5>\n * <p>\n * Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n * standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a\n * type specimen book.\n * </p>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"link\">Button</bq-button>\n * <bq-button variant=\"ghost\">Button</bq-button>\n * <bq-button variant=\"standard\" slot=\"footer\">Button</bq-button>\n * </div>\n * </bq-dialog>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/15b6fc-dialog\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {\"none\" | \"xs2\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"full\"} border - Border radius of the dialog component.\n * @attr {boolean} disable-backdrop - If true, the backdrop overlay won't be shown when the dialog opens.\n * @attr {boolean} disable-close-esc-keydown - If true, the dialog will not close when the [Esc] key is pressed.\n * @attr {boolean} disable-close-click-outside - If true, the dialog will not close when clicking on the backdrop overlay.\n * @attr {\"standard\" | \"highlight\"} footer-appearance - The appearance of the footer.\n * @attr {boolean} hide-close-button - If true, it hides the close button.\n * @attr {boolean} open - If true, the dialog will be shown as open.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the dialog.\n *\n * @method show - Open the dialog.\n * @method hide - Closes the dialog.\n * @method cancel - Dismiss or cancel the dialog.\n *\n * @event bqCancel - Callback handler emitted when the dialog has been canceled or dismissed.\n * @event bqClose - Callback handler emitted when the dialog will close.\n * @event bqOpen - Callback handler emitted when the dialog will open.\n * @event bqAfterOpen - Callback handler emitted when the dialog finish opening.\n * @event bqAfterClose - Callback handler emitted when the dialog finish closing.\n *\n * @slot title - The title content of the dialog.\n * @slot - The body content of the dialog.\n * @slot footer - The footer content of the dialog.\n * @slot button-close - The close button content of the dialog.\n *\n * @part body - The `<main>` that holds the dialog body content.\n * @part button-close - The button that closes the dialog on click.\n * @part content - The `<div>` container that holds the dialog title and body content.\n * @part dialog - The `<dialog>` wrapper container inside the shadow DOM.\n * @part footer - The `<footer>` that holds footer content.\n * @part header - The `<header>` that holds the icon, title, description and close button.\n * @part title - The `<div>` that holds the title content.\n *\n * @cssprop --bq-dialog--background - Dialog background color\n * @cssprop --bq-dialog--background-backdrop - Dialog backdrop background color\n * @cssprop --bq-dialog--box-shadow - Dialog box shadow\n * @cssprop --bq-dialog--border-color - Dialog border color\n * @cssprop --bq-dialog--border-style - Dialog border style\n * @cssprop --bq-dialog--border-width - Dialog border width\n * @cssprop --bq-dialog--border-radius - Dialog border radius\n * @cssprop --bq-dialog--padding - Dialog padding\n * @cssprop --bq-dialog--content-footer-gap - Dialog gap distance between content and footer elements\n * @cssprop --bq-dialog--title-body-gap - Dialog gap distance between title and body elements\n * @cssprop --bq-dialog--width-small - Dialog small width\n * @cssprop --bq-dialog--width-medium - Dialog medium width\n * @cssprop --bq-dialog--width-large - Dialog large width\n * @cssprop --bq-dialog-z-index - Dialog z-index applied when opened\n */\n@Component({\n tag: 'bq-dialog',\n styleUrl: './scss/bq-dialog.scss',\n shadow: true,\n})\nexport class BqDialog {\n // Own Properties\n // ====================\n\n private dialogElem: HTMLDialogElement;\n private contentElem: HTMLElement;\n private footerElem: HTMLElement;\n private closeSlotElem: HTMLElement;\n private OPEN_CSS_CLASS = 'bq-dialog--open';\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqDialogElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** Border radius of the dialog component */\n @Prop({ reflect: true }) border: TDialogBorderRadius = 'm';\n\n /** If true, the backdrop overlay won't be shown when the dialog opens */\n @Prop({ reflect: true }) disableBackdrop = false;\n\n /** If true, the dialog will not close when the [Esc] key is press */\n @Prop({ reflect: true }) disableCloseEscKeydown = false;\n\n /** If true, the dialog will not close when clicking on the backdrop overlay */\n @Prop({ reflect: true }) disableCloseClickOutside = false;\n\n /** The appearance of footer */\n @Prop({ reflect: true }) footerAppearance: TDialogFooterAppearance = 'standard';\n\n /** If true, it hides the close button */\n @Prop({ reflect: true }) hideCloseButton = false;\n\n /** If true, the dialog will be shown as open */\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n\n /** The size of the dialog */\n @Prop({ reflect: true, mutable: true }) size: TDialogSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n @Watch('footerAppearance')\n @Watch('size')\n checkPropValues() {\n validatePropValue(DIALOG_SIZE, 'large', this.el, 'size');\n validatePropValue(DIALOG_FOOTER_APPEARANCE, 'standard', this.el, 'footerAppearance');\n }\n\n @Watch('open')\n async handleOpenChange() {\n if (this.open) {\n await this.handleOpen();\n return;\n }\n\n await this.handleClose();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the dialog has been canceled or dismissed */\n @Event() bqCancel!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will close */\n @Event() bqClose!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will open */\n @Event() bqOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish opening */\n @Event() bqAfterOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish closing */\n @Event() bqAfterClose!: EventEmitter<void>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n this.handleOpenChange();\n\n this.closeSlotElem = this.el.shadowRoot.querySelector('slot[name=\"button-close\"]');\n this.closeSlotElem?.addEventListener('click', () => this.hide());\n }\n\n disconnectedCallback() {\n this.closeSlotElem?.removeEventListener('click', () => this.hide());\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.dialogElem || this.disableCloseClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.dialogElem.getBoundingClientRect();\n if (\n event.clientY < rect.top ||\n event.clientY > rect.bottom ||\n event.clientX < rect.left ||\n event.clientX > rect.right\n ) {\n await this.cancel();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(ev: KeyboardEvent) {\n const isEscapeKey = ev.key === 'Escape' || ev.key === 'Esc';\n if (!this.open || !this.dialogElem || !isEscapeKey) return;\n\n if (this.disableCloseEscKeydown) {\n ev.preventDefault();\n return;\n }\n\n await this.cancel();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Open the dialog */\n @Method()\n async show() {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n /** Closes the dialog */\n @Method()\n async hide() {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Dismiss or cancel the dialog */\n @Method()\n async cancel() {\n const ev = this.bqCancel.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleClose = async () => {\n if (!this.dialogElem) return;\n\n await leave(this.dialogElem);\n this.dialogElem.close();\n // Emit bqAfterClose event after the dialog is closed\n this.handleTransitionEnd();\n };\n\n private handleOpen = async () => {\n if (!this.dialogElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n // Show the dialog\n if (this.disableBackdrop) {\n this.dialogElem.show();\n } else {\n this.dialogElem.showModal();\n }\n await enter(this.dialogElem);\n // Emit bqAfterOpen event after the dialog is opened\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.contentElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-dialog--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <dialog\n style={style}\n class={{\n [`bq-dialog hidden ${this.size} m-auto focus-visible:outline-none`]: true,\n 'inset-be-[50%] inset-bs-[50%]': this.disableBackdrop,\n }}\n data-transition-enter=\"transition ease-in duration-300\"\n data-transition-enter-start=\"opacity-0 scale-90\"\n data-transition-enter-end=\"opacity-100 scale-100\"\n data-transition-leave=\"transition ease-out duration-300\"\n data-transition-leave-start=\"opacity-100 scale-100\"\n data-transition-leave-end=\"opacity-0 scale-90\"\n inert={this.open ? undefined : true}\n ref={(dialogElem) => (this.dialogElem = dialogElem)}\n aria-modal=\"true\"\n aria-labelledby=\"bq-dialog--title\"\n part=\"dialog\"\n >\n <main class=\"flex flex-col gap-[--bq-dialog--title-body-gap] overflow-hidden\" part=\"content\">\n <header class=\"bq-dialog--header\" part=\"header\">\n <div id=\"bq-dialog--title\" class=\"bq-dialog--title flex flex-1 items-center justify-between\" part=\"title\">\n <slot name=\"title\" />\n </div>\n <slot name=\"button-close\">\n {!this.hideCloseButton && (\n <bq-button class=\"bq-dialog--close\" appearance=\"text\" size=\"small\">\n <bq-icon class=\"cursor-pointer\" name=\"x\" role=\"img\" title=\"Close\" />\n </bq-button>\n )}\n </slot>\n </header>\n <div\n class={{\n '!hidden': !this.hasContent,\n 'overflow-y-auto p-i-[--bq-dialog--padding]': this.hasContent,\n '!p-be-[--bq-dialog--padding]': !this.hasFooter,\n }}\n ref={(mainElem) => (this.contentElem = mainElem)}\n part=\"body\"\n >\n <slot onSlotchange={this.handleSlotChange} />\n </div>\n </main>\n <footer\n class={{\n '!hidden': !this.hasFooter,\n 'bq-dialog--footer': this.hasFooter,\n 'bg-ui-alt !p-b-s': this.footerAppearance === 'highlight',\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </dialog>\n );\n }\n}\n"]}
@@ -150,6 +150,9 @@ export class BqDrawer {
150
150
  // !TO BE REMOVED: Delete this once the deprecated `placement` property is removed
151
151
  this.handlePlacementChange();
152
152
  }
153
+ componentDidLoad() {
154
+ this.handleFooterSlotChange();
155
+ }
153
156
  // Listeners
154
157
  // ==============
155
158
  async handleMouseClick(event) {
@@ -232,20 +235,20 @@ export class BqDrawer {
232
235
  // Always the last one in the class.
233
236
  // ===================================
234
237
  render() {
235
- return (h(Host, { key: 'a716a127c60de5db3e25edb6f7c9aaed4fa3d7e5' }, this.enableBackdrop && (h("div", { key: '2c35713184b02bdc5cb7a144a7f50acd0eabf17f', class: {
238
+ return (h(Host, { key: '83f55f61d6f3dff26d4b9f8f987734839de4135e' }, this.enableBackdrop && (h("div", { key: '89a05f0693053eda89e5d11c420113d33fb95cc8', class: {
236
239
  'fixed inset-0 block bg-[--bq-drawer--backgroundBackdrop] opacity-0 transition-opacity duration-300': true,
237
240
  'pointer-events-none': !this.open,
238
241
  'opacity-60': this.open,
239
- }, tabIndex: -1, part: "backdrop" })), h("div", { key: '5b81a5bdc905b0e1c9d021e19d8cc71d99603aca', class: {
242
+ }, tabIndex: -1, part: "backdrop" })), h("div", { key: '200019ad3a62c5bd13566773a5313cfb537b9e82', class: {
240
243
  [`bq-drawer transition-all duration-300 ease-in-out ${this.position || this.placement}`]: true,
241
244
  '-start-[--bq-drawer--width]': this.isPositionStart,
242
245
  '-end-[--bq-drawer--width]': this.isPositionEnd,
243
246
  'start-0': this.open && this.isPositionStart,
244
247
  'end-0': this.open && this.isPositionEnd,
245
- }, ref: (div) => (this.drawerElem = div), "aria-hidden": !this.open ? 'true' : 'false', "aria-labelledby": "bq-drawer__title", "aria-modal": "true", hidden: !this.open, part: "panel", role: "dialog" }, h("header", { key: '8991fce74864f75efe643ce271cd3b7706232665', class: "flex items-center", part: "header" }, h("h2", { key: 'ee292cd20857dc02423e5b46e7ecd43c0da616ca', class: "flex-1 items-center justify-between font-bold leading-regular text-primary", id: "bq-drawer__title", part: "title" }, h("slot", { key: '9a40f9bd02d3b62a6ab30813805332586928bb60', name: "title" })), h("div", { key: '89e7788a9eabfa538185b8e1fefb3d85cb20126b', class: "flex", part: "button-close" }, h("bq-button", { key: '58e2bff54395943c2847fa242b27f15ae4fad323', class: "[&::part(button)]:rounded-s [&::part(button)]:border-0 [&::part(button)]:bs-fit [&::part(button)]:p-b-0 [&::part(button)]:p-i-0 [&::part(label)]:inline-flex", appearance: "text", size: "small", slot: "button-close", exportparts: "button:button-close__btn,label:button-close__label", onClick: this.hide.bind(this) }, h("slot", { key: 'cf80701a3b3937074cd2bf1da198c0278d2c0eb9', name: "button-close" }, h("bq-icon", { key: '1273bcaf86c227666bf9138d00d4262f29c4959e', name: "x-bold", role: "img", title: "Close" }))))), h("main", { key: 'b880d52a3f611d1ea23eca2b671a1c06035c44b7', class: "block flex-auto overflow-auto", part: "body" }, h("slot", { key: 'aab010203250eb15cfed94597a678324525f52e7' })), h("footer", { key: '6fb62993cf08d45046549d5ad11d0a01d307371a', class: {
248
+ }, ref: (div) => (this.drawerElem = div), "aria-hidden": !this.open ? 'true' : 'false', "aria-labelledby": "bq-drawer__title", "aria-modal": "true", hidden: !this.open, part: "panel", role: "dialog" }, h("header", { key: '96652eb3fa91d9a2caf5604c0aa1eeaa17cc81b8', class: "flex items-center", part: "header" }, h("h2", { key: 'eec5cb333c9c58b2c4609e512109bef8eb605bab', class: "flex-1 items-center justify-between font-bold leading-regular text-primary", id: "bq-drawer__title", part: "title" }, h("slot", { key: 'cd3aefa705728a68f9a3ac0ce58277db770cd78d', name: "title" })), h("div", { key: 'cc790b9b739a73fae4cbefb378292149f3a79ecf', class: "flex", part: "button-close" }, h("bq-button", { key: 'ccbc79f015a5bc9ffd3aa39a4cabbf1277004631', class: "[&::part(button)]:rounded-s [&::part(button)]:border-0 [&::part(button)]:bs-fit [&::part(button)]:p-b-0 [&::part(button)]:p-i-0 [&::part(label)]:inline-flex", appearance: "text", size: "small", slot: "button-close", exportparts: "button:button-close__btn,label:button-close__label", onClick: this.hide.bind(this) }, h("slot", { key: '3d90fc7cdd1f8b91193ef5bd1021b2c6985c6779', name: "button-close" }, h("bq-icon", { key: '4c0ece9db83f3c2195978e32210470415cca3e5b', name: "x-bold", role: "img", title: "Close" }))))), h("main", { key: '090963d8e845305fa269fdd81c9c102182c32ba6', class: "block flex-auto overflow-auto", part: "body" }, h("slot", { key: 'bc60fa850c87710ca6e6b2a14adcf2039f7362d2' })), h("footer", { key: '9c7ed47e5c88b4e3307766974d062c9ed8813b56', class: {
246
249
  block: true,
247
250
  '!hidden': !this.hasFooter,
248
- }, ref: (footerElem) => (this.footerElem = footerElem), part: "footer" }, h("slot", { key: 'ade83c02ad4c9992e951b7a1dc68c9c83d0ae378', name: "footer-divider" }, h("bq-divider", { key: '4192ca556fd8564ab9fc5cc20a324edcc21d3df3', class: "mb-m block", dashed: true })), h("slot", { key: '0cdbcef8d62e5f8ca1d9414dbc46b69de79a0e54', name: "footer", onSlotchange: this.handleFooterSlotChange })))));
251
+ }, ref: (footerElem) => (this.footerElem = footerElem), part: "footer" }, h("slot", { key: 'f9daf2a58ff77d1b71210a5157fad68578c7d8ae', name: "footer-divider" }, h("bq-divider", { key: '8869f1229d7f979d80089d1556b3739a96d3f55d', class: "mb-m block", dashed: true })), h("slot", { key: '4253a7b31cdeceafbf3cc60d9459271a5831cc7d', name: "footer", onSlotchange: this.handleFooterSlotChange })))));
249
252
  }
250
253
  static get is() { return "bq-drawer"; }
251
254
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-drawer.js","sourceRoot":"","sources":["../../../../../../src/components/drawer/bq-drawer.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,gBAAgB,EAAE,gBAAgB,EAAqC,MAAM,mBAAmB,CAAC;AAC1G,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAMH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,UAAU,CAAc;IACxB,UAAU,CAAiB;IAC3B,cAAc,GAAG,iBAAiB,CAAC;IAE3C,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IAEpC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEzB,SAAS,GAAG,KAAK,CAAC;IAC1B,OAAO,GAAY,KAAK,CAAC;IAElC,sBAAsB;IACtB,2BAA2B;IAE3B,wEAAwE;IAC/C,cAAc,GAAG,KAAK,CAAC;IAEhD,yEAAyE;IAChD,mBAAmB,GAAG,KAAK,CAAC;IAErD,uEAAuE;IAC9C,UAAU,GAAG,KAAK,CAAC;IAE5C,kDAAkD;IACV,IAAI,CAAU;IAEtD,qDAAqD;IACb,SAAS,GAAqB,OAAO,CAAC;IAE9E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { DRAWER_PLACEMENT, DRAWER_POSITIONS, TDrawerPlacement, TDrawerPosition } from './bq-drawer.types';\nimport { enter, hasSlotContent, isNil, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Drawer component provides a sliding panel interface commonly used for navigation or presenting additional content without taking up significant screen space.\n *\n * @example How to use it\n * ```html\n * <bq-drawer position=\"end\">\n * <div class=\"flex gap-xs\" slot=\"title\">Title</div>\n * <div class=\"...\">\n * Content\n * </div>\n * <div class=\"flex flex-1 justify-center gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" block=\"\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" block=\"\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-drawer>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/871139-drawer\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n * @dependency bq-divider\n *\n * @attr {boolean} enable-backdrop - If true, the backdrop overlay will be shown when the drawer opens.\n * @attr {boolean} close-on-click-outside - If true, the drawer will not close when clicking outside the panel.\n * @attr {boolean} close-on-esc - If true, the drawer will not close when the [Esc] key is pressed.\n * @attr {boolean} open - If true, the drawer component will be shown.\n * @attr {\"start\" | \"end\"} position - Defines the position of the drawer.\n *\n * @method show - Method to be called to show the drawer component.\n * @method hide - Method to be called to hide the drawer component.\n *\n * @event bqClose - Callback handler to be called when the drawer is closed.\n * @event bqOpen - Callback handler to be called when the drawer is opened.\n * @event bqAfterOpen - Callback handler to be called after the drawer has been opened.\n * @event bqAfterClose - Callback handler to be called after the drawer has been closed.\n *\n * @slot title - The title content of the drawer.\n * @slot - The body content of the drawer.\n * @slot footer - The footer content of the drawer.\n * @slot button-close - The close button content of the drawer.\n * @slot footer-divider - The footer divider content of the drawer.\n *\n * @part backdrop - The `<div>` that holds the backdrop overlay.\n * @part button-close - The BqButton that closes the drawer.\n * @part button-close__btn - The native button used under the hood that closes the drawer.\n * @part button-close__label - The text inside the native button that closes the drawer.\n * @part panel - The `<div>` that holds the drawer entire content.\n * @part header - The `<header>` that holds the icon, title, and close button.\n * @part title - The `<div>` that holds the title content.\n * @part body - The `<main>` that holds the drawer body content.\n * @part footer - The `<footer>` that holds footer content.\n *\n * @cssprop --bq-drawer--backgroundBackdrop - Background color of the backdrop\n * @cssprop --bq-drawer--gap - Gap between the drawer and the viewport\n * @cssprop --bq-drawer--width - Width of the drawer\n * @cssprop --bq-drawer--paddingX - Padding left and right of the drawer\n * @cssprop --bq-drawer--paddingY - Padding top and bottom of the drawer\n * @cssprop --bq-drawer--zIndex - Z-index of the drawer component\n */\n@Component({\n tag: 'bq-drawer',\n styleUrl: './scss/bq-drawer.scss',\n shadow: true,\n})\nexport class BqDrawer {\n // Own Properties\n // ====================\n\n private footerElem: HTMLElement;\n private drawerElem: HTMLDivElement;\n private OPEN_CSS_CLASS = 'bq-drawer--open';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDrawerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasFooter = false;\n @State() hasIcon: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the backdrop overlay will be shown when the drawer opens */\n @Prop({ reflect: true }) enableBackdrop = false;\n\n /** If true, the drawer will not close when clicking outside the panel */\n @Prop({ reflect: true }) closeOnClickOutside = false;\n\n /** If true, the dialog will not close when the [Esc] key is pressed */\n @Prop({ reflect: true }) closeOnEsc = false;\n\n /** If true, the drawer component will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** @deprecated Defines the position of the drawer */\n @Prop({ reflect: true, mutable: true }) placement: TDrawerPlacement = 'right';\n\n /** Defines the position of the drawer */\n @Prop({ reflect: true, mutable: true }) position: TDrawerPosition = 'end';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n async handleOpenChange() {\n if (!this.open) {\n await this.handleAfterHide();\n return;\n }\n\n await this.handleAfterShow();\n }\n\n /**\n * !TO BE REMOVED: Delete this `@Watch()` once the deprecated `placement` property is removed\n * We need to maintain retro-compatibility with the deprecated `placement` property\n */\n @Watch('placement')\n handlePlacementChange() {\n if (!isNil(this.placement)) {\n console.warn(\n `❗️ [bq-drawer]: the 'placement' prop is deprecated and it will be removed in the future. Please use 'position' instead.`,\n );\n }\n validatePropValue(DRAWER_PLACEMENT, 'right', this.el, 'placement');\n // Sync 'position' property\n const synPositionMap = {\n right: 'end',\n left: 'start',\n };\n this.position = (synPositionMap[this.placement] as TDrawerPosition) || this.position;\n }\n\n @Watch('position')\n handlePositionChange() {\n validatePropValue(DRAWER_POSITIONS, 'start', this.el, 'position');\n /**\n * Sync 'placement' property\n * !TO BE REMOVED: Delete the code below once the deprecated `placement` property is removed\n */\n const syncPlacementMap = {\n end: 'right',\n start: 'left',\n };\n this.placement = (syncPlacementMap[this.position] as TDrawerPlacement) || this.placement;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the drawer is closed */\n @Event() bqClose!: EventEmitter;\n\n /** Callback handler to be called when the drawer is opened */\n @Event() bqOpen!: EventEmitter;\n\n /** Callback handler to be called after the drawer has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the drawer has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handlePositionChange();\n // !TO BE REMOVED: Delete this once the deprecated `placement` property is removed\n this.handlePlacementChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.drawerElem || this.closeOnClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.drawerElem.getBoundingClientRect();\n if (event.clientX < rect.left || event.clientX > rect.right) {\n await this.hide();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(event: KeyboardEvent) {\n if (!this.open) return;\n if (!this.drawerElem || this.closeOnEsc || !(event.key === 'Escape' || event.key === 'Esc')) return;\n\n await this.hide();\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 drawer component */\n @Method()\n async hide(): Promise<void> {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Method to be called to show the drawer component */\n @Method()\n async show(): Promise<void> {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private handleAfterHide = async () => {\n if (!this.drawerElem) return;\n\n await leave(this.drawerElem);\n this.handleTransitionEnd();\n };\n\n private handleAfterShow = async () => {\n if (!this.drawerElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n await enter(this.drawerElem);\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private get isPositionStart() {\n // !TO BE REMOVED: `placement` is deprecated and will be removed in the future\n return this.position === 'start' || this.placement === 'left';\n }\n\n private get isPositionEnd() {\n // !TO BE REMOVED: `placement` is deprecated and will be removed in the future\n return this.position === 'end' || this.placement === 'right';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n {/* BACKDROP */}\n {this.enableBackdrop && (\n <div\n class={{\n 'fixed inset-0 block bg-[--bq-drawer--backgroundBackdrop] opacity-0 transition-opacity duration-300':\n true,\n 'pointer-events-none': !this.open,\n 'opacity-60': this.open,\n }}\n tabIndex={-1}\n part=\"backdrop\"\n />\n )}\n {/* DRAWER PANEL */}\n <div\n class={{\n [`bq-drawer transition-all duration-300 ease-in-out ${this.position || this.placement}`]: true,\n '-start-[--bq-drawer--width]': this.isPositionStart,\n '-end-[--bq-drawer--width]': this.isPositionEnd,\n 'start-0': this.open && this.isPositionStart,\n 'end-0': this.open && this.isPositionEnd,\n }}\n ref={(div) => (this.drawerElem = div)}\n aria-hidden={!this.open ? 'true' : 'false'}\n aria-labelledby=\"bq-drawer__title\"\n aria-modal=\"true\"\n hidden={!this.open}\n part=\"panel\"\n role=\"dialog\"\n >\n <header class=\"flex items-center\" part=\"header\">\n <h2\n class=\"flex-1 items-center justify-between font-bold leading-regular text-primary\"\n id=\"bq-drawer__title\"\n part=\"title\"\n >\n <slot name=\"title\" />\n </h2>\n <div class=\"flex\" part=\"button-close\">\n <bq-button\n class=\"[&::part(button)]:rounded-s [&::part(button)]:border-0 [&::part(button)]:bs-fit [&::part(button)]:p-b-0 [&::part(button)]:p-i-0 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n slot=\"button-close\"\n exportparts=\"button:button-close__btn,label:button-close__label\"\n onClick={this.hide.bind(this)}\n >\n <slot name=\"button-close\">\n <bq-icon name=\"x-bold\" role=\"img\" title=\"Close\" />\n </slot>\n </bq-button>\n </div>\n </header>\n <main class=\"block flex-auto overflow-auto\" part=\"body\">\n <slot />\n </main>\n <footer\n class={{\n block: true,\n '!hidden': !this.hasFooter,\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer-divider\">\n <bq-divider class=\"mb-m block\" dashed />\n </slot>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </footer>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-drawer.js","sourceRoot":"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watch } from '@stencil/core';\n\nimport { DRAWER_PLACEMENT, DRAWER_POSITIONS, TDrawerPlacement, TDrawerPosition } from './bq-drawer.types';\nimport { enter, hasSlotContent, isNil, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Drawer component provides a sliding panel interface commonly used for navigation or presenting additional content without taking up significant screen space.\n *\n * @example How to use it\n * ```html\n * <bq-drawer position=\"end\">\n * <div class=\"flex gap-xs\" slot=\"title\">Title</div>\n * <div class=\"...\">\n * Content\n * </div>\n * <div class=\"flex flex-1 justify-center gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" block=\"\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" block=\"\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-drawer>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/871139-drawer\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n * @dependency bq-divider\n *\n * @attr {boolean} enable-backdrop - If true, the backdrop overlay will be shown when the drawer opens.\n * @attr {boolean} close-on-click-outside - If true, the drawer will not close when clicking outside the panel.\n * @attr {boolean} close-on-esc - If true, the drawer will not close when the [Esc] key is pressed.\n * @attr {boolean} open - If true, the drawer component will be shown.\n * @attr {\"start\" | \"end\"} position - Defines the position of the drawer.\n *\n * @method show - Method to be called to show the drawer component.\n * @method hide - Method to be called to hide the drawer component.\n *\n * @event bqClose - Callback handler to be called when the drawer is closed.\n * @event bqOpen - Callback handler to be called when the drawer is opened.\n * @event bqAfterOpen - Callback handler to be called after the drawer has been opened.\n * @event bqAfterClose - Callback handler to be called after the drawer has been closed.\n *\n * @slot title - The title content of the drawer.\n * @slot - The body content of the drawer.\n * @slot footer - The footer content of the drawer.\n * @slot button-close - The close button content of the drawer.\n * @slot footer-divider - The footer divider content of the drawer.\n *\n * @part backdrop - The `<div>` that holds the backdrop overlay.\n * @part button-close - The BqButton that closes the drawer.\n * @part button-close__btn - The native button used under the hood that closes the drawer.\n * @part button-close__label - The text inside the native button that closes the drawer.\n * @part panel - The `<div>` that holds the drawer entire content.\n * @part header - The `<header>` that holds the icon, title, and close button.\n * @part title - The `<div>` that holds the title content.\n * @part body - The `<main>` that holds the drawer body content.\n * @part footer - The `<footer>` that holds footer content.\n *\n * @cssprop --bq-drawer--backgroundBackdrop - Background color of the backdrop\n * @cssprop --bq-drawer--gap - Gap between the drawer and the viewport\n * @cssprop --bq-drawer--width - Width of the drawer\n * @cssprop --bq-drawer--paddingX - Padding left and right of the drawer\n * @cssprop --bq-drawer--paddingY - Padding top and bottom of the drawer\n * @cssprop --bq-drawer--zIndex - Z-index of the drawer component\n */\n@Component({\n tag: 'bq-drawer',\n styleUrl: './scss/bq-drawer.scss',\n shadow: true,\n})\nexport class BqDrawer {\n // Own Properties\n // ====================\n\n private footerElem: HTMLElement;\n private drawerElem: HTMLDivElement;\n private OPEN_CSS_CLASS = 'bq-drawer--open';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDrawerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasFooter = false;\n @State() hasIcon: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the backdrop overlay will be shown when the drawer opens */\n @Prop({ reflect: true }) enableBackdrop = false;\n\n /** If true, the drawer will not close when clicking outside the panel */\n @Prop({ reflect: true }) closeOnClickOutside = false;\n\n /** If true, the dialog will not close when the [Esc] key is pressed */\n @Prop({ reflect: true }) closeOnEsc = false;\n\n /** If true, the drawer component will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** @deprecated Defines the position of the drawer */\n @Prop({ reflect: true, mutable: true }) placement: TDrawerPlacement = 'right';\n\n /** Defines the position of the drawer */\n @Prop({ reflect: true, mutable: true }) position: TDrawerPosition = 'end';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n async handleOpenChange() {\n if (!this.open) {\n await this.handleAfterHide();\n return;\n }\n\n await this.handleAfterShow();\n }\n\n /**\n * !TO BE REMOVED: Delete this `@Watch()` once the deprecated `placement` property is removed\n * We need to maintain retro-compatibility with the deprecated `placement` property\n */\n @Watch('placement')\n handlePlacementChange() {\n if (!isNil(this.placement)) {\n console.warn(\n `❗️ [bq-drawer]: the 'placement' prop is deprecated and it will be removed in the future. Please use 'position' instead.`,\n );\n }\n validatePropValue(DRAWER_PLACEMENT, 'right', this.el, 'placement');\n // Sync 'position' property\n const synPositionMap = {\n right: 'end',\n left: 'start',\n };\n this.position = (synPositionMap[this.placement] as TDrawerPosition) || this.position;\n }\n\n @Watch('position')\n handlePositionChange() {\n validatePropValue(DRAWER_POSITIONS, 'start', this.el, 'position');\n /**\n * Sync 'placement' property\n * !TO BE REMOVED: Delete the code below once the deprecated `placement` property is removed\n */\n const syncPlacementMap = {\n end: 'right',\n start: 'left',\n };\n this.placement = (syncPlacementMap[this.position] as TDrawerPlacement) || this.placement;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the drawer is closed */\n @Event() bqClose!: EventEmitter;\n\n /** Callback handler to be called when the drawer is opened */\n @Event() bqOpen!: EventEmitter;\n\n /** Callback handler to be called after the drawer has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the drawer has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handlePositionChange();\n // !TO BE REMOVED: Delete this once the deprecated `placement` property is removed\n this.handlePlacementChange();\n }\n\n componentDidLoad() {\n this.handleFooterSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.drawerElem || this.closeOnClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.drawerElem.getBoundingClientRect();\n if (event.clientX < rect.left || event.clientX > rect.right) {\n await this.hide();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(event: KeyboardEvent) {\n if (!this.open) return;\n if (!this.drawerElem || this.closeOnEsc || !(event.key === 'Escape' || event.key === 'Esc')) return;\n\n await this.hide();\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 drawer component */\n @Method()\n async hide(): Promise<void> {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Method to be called to show the drawer component */\n @Method()\n async show(): Promise<void> {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private handleAfterHide = async () => {\n if (!this.drawerElem) return;\n\n await leave(this.drawerElem);\n this.handleTransitionEnd();\n };\n\n private handleAfterShow = async () => {\n if (!this.drawerElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n await enter(this.drawerElem);\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private get isPositionStart() {\n // !TO BE REMOVED: `placement` is deprecated and will be removed in the future\n return this.position === 'start' || this.placement === 'left';\n }\n\n private get isPositionEnd() {\n // !TO BE REMOVED: `placement` is deprecated and will be removed in the future\n return this.position === 'end' || this.placement === 'right';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n {/* BACKDROP */}\n {this.enableBackdrop && (\n <div\n class={{\n 'fixed inset-0 block bg-[--bq-drawer--backgroundBackdrop] opacity-0 transition-opacity duration-300':\n true,\n 'pointer-events-none': !this.open,\n 'opacity-60': this.open,\n }}\n tabIndex={-1}\n part=\"backdrop\"\n />\n )}\n {/* DRAWER PANEL */}\n <div\n class={{\n [`bq-drawer transition-all duration-300 ease-in-out ${this.position || this.placement}`]: true,\n '-start-[--bq-drawer--width]': this.isPositionStart,\n '-end-[--bq-drawer--width]': this.isPositionEnd,\n 'start-0': this.open && this.isPositionStart,\n 'end-0': this.open && this.isPositionEnd,\n }}\n ref={(div) => (this.drawerElem = div)}\n aria-hidden={!this.open ? 'true' : 'false'}\n aria-labelledby=\"bq-drawer__title\"\n aria-modal=\"true\"\n hidden={!this.open}\n part=\"panel\"\n role=\"dialog\"\n >\n <header class=\"flex items-center\" part=\"header\">\n <h2\n class=\"flex-1 items-center justify-between font-bold leading-regular text-primary\"\n id=\"bq-drawer__title\"\n part=\"title\"\n >\n <slot name=\"title\" />\n </h2>\n <div class=\"flex\" part=\"button-close\">\n <bq-button\n class=\"[&::part(button)]:rounded-s [&::part(button)]:border-0 [&::part(button)]:bs-fit [&::part(button)]:p-b-0 [&::part(button)]:p-i-0 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n slot=\"button-close\"\n exportparts=\"button:button-close__btn,label:button-close__label\"\n onClick={this.hide.bind(this)}\n >\n <slot name=\"button-close\">\n <bq-icon name=\"x-bold\" role=\"img\" title=\"Close\" />\n </slot>\n </bq-button>\n </div>\n </header>\n <main class=\"block flex-auto overflow-auto\" part=\"body\">\n <slot />\n </main>\n <footer\n class={{\n block: true,\n '!hidden': !this.hasFooter,\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer-divider\">\n <bq-divider class=\"mb-m block\" dashed />\n </slot>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </footer>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -62,6 +62,9 @@ export class BqEmptyState {
62
62
  componentWillLoad() {
63
63
  this.checkPropValues();
64
64
  }
65
+ componentDidLoad() {
66
+ this.handleSlotChange();
67
+ }
65
68
  // Listeners
66
69
  // ==============
67
70
  // Public methods API
@@ -74,10 +77,8 @@ export class BqEmptyState {
74
77
  // Internal business logic.
75
78
  // These methods cannot be called from the host element.
76
79
  // =======================================================
77
- handleContentSlotChange = () => {
80
+ handleSlotChange = () => {
78
81
  this.hasBody = hasSlotContent(this.bodyElem, 'body');
79
- };
80
- handleFooterSlotChange = () => {
81
82
  this.hasFooter = hasSlotContent(this.footerElem, 'footer');
82
83
  };
83
84
  get iconSize() {
@@ -87,11 +88,11 @@ export class BqEmptyState {
87
88
  // Always the last one in the class.
88
89
  // ===================================
89
90
  render() {
90
- return (h("div", { key: '265bf294dfd83d5d1d28c4f5d25320aa75111ec1', class: "inline-flex flex-col items-center", part: "wrapper" }, h("div", { key: '35bc5ede6393064956829c70edabf1199c8c98df', class: {
91
+ return (h("div", { key: '8079680edf3b14a5b0473a13498dc045d25c492d', class: "inline-flex flex-col items-center", part: "wrapper" }, h("div", { key: '457990eadb0f908e56ae1e2eeaca85966d2a66d3', class: {
91
92
  'm-be-m': this.size === 'small',
92
93
  'm-be-xl': this.size === 'medium',
93
94
  'm-be-xxl': this.size === 'large',
94
- }, part: "thumbnail" }, h("slot", { key: '07844c7da5e149500859d2ee07cd31b68d72d8d6', name: "thumbnail" }, h("bq-icon", { key: 'f4fc24936461d81288d48cbae35ef41480776238', size: this.iconSize, name: "database", part: "icon", exportparts: "base,svg" }))), h("div", { key: '448dc648e7a419b9c53e38c7257a0ef1cfbd6fee', class: {
95
+ }, part: "thumbnail" }, h("slot", { key: '64563d3d5a40fdb24cc4d468a9ad63f777468fb9', name: "thumbnail" }, h("bq-icon", { key: 'f9aa9c6a33dc6922aae4e18349c64ebb371b6fb2', size: this.iconSize, name: "database", part: "icon", exportparts: "base,svg" }))), h("div", { key: '3b73f8bf763d8f7afa54e41a759843b71159f022', class: {
95
96
  'font-bold leading-regular text-primary': true,
96
97
  'text-m': this.size === 'small',
97
98
  'text-l': this.size === 'medium',
@@ -99,7 +100,7 @@ export class BqEmptyState {
99
100
  'm-be-xs': this.size === 'small' && this.hasBody,
100
101
  'm-be-m': this.size === 'medium' && this.hasBody,
101
102
  'm-be-l': this.size === 'large' && this.hasBody,
102
- }, part: "title" }, h("slot", { key: 'fbb8d58e6d6507403f14bd8aae04cd6345cfde9a' })), h("div", { key: '907ebb451f780278be93ef765aae23a073e381ff', class: {
103
+ }, part: "title" }, h("slot", { key: '1abd1a911fbcb6cc8d239ce94529a5081546a37f' })), h("div", { key: '920c6e7ff233b5cddd32c844987e3d8aa37d0bec', class: {
103
104
  'font-normal leading-regular': true,
104
105
  'text-s': this.size === 'small',
105
106
  'text-m': this.size === 'medium',
@@ -107,7 +108,7 @@ export class BqEmptyState {
107
108
  'm-be-m': this.size === 'small' && this.hasFooter,
108
109
  'm-be-l': this.size === 'medium' && this.hasFooter,
109
110
  'm-be-xl': this.size === 'large' && this.hasFooter,
110
- }, ref: (div) => (this.bodyElem = div), part: "body" }, h("slot", { key: '15ae662e06daa9b8d1c62c43b4165083a5ba3b64', name: "body", onSlotchange: this.handleContentSlotChange })), h("div", { key: '10a192b571932ff950ee923480eb2f5cf07ec433', class: "flex items-start gap-xs", ref: (div) => (this.footerElem = div), part: "footer" }, h("slot", { key: '8370de211d144a29d54ebda8f5af447c4fddaaff', name: "footer", onSlotchange: this.handleFooterSlotChange }))));
111
+ }, ref: (div) => (this.bodyElem = div), part: "body" }, h("slot", { key: 'f7894e5c291a05262dbade42dafccc223a6ac0e6', name: "body", onSlotchange: this.handleSlotChange })), h("div", { key: '0603bdaa963924bf8ef99640fcd695c5a03ff533', class: "flex items-start gap-xs", ref: (div) => (this.footerElem = div), part: "footer" }, h("slot", { key: '26faa3a234103e25234ae8d28e07dd4747566e30', name: "footer", onSlotchange: this.handleSlotChange }))));
111
112
  }
112
113
  static get is() { return "bq-empty-state"; }
113
114
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-empty-state.js","sourceRoot":"","sources":["../../../../../../src/components/empty-state/bq-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA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A6B,EAAE,IAAI;oBACnC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;oBAC/B,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;oBAChC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;oBAC/B,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,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,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,QAAQ;oBAChC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;oBAC/B,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,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,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"; }