@beeq/core 1.8.0-beta.2 → 1.8.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/dist/beeq/beeq.css +1 -1
  2. package/dist/beeq/beeq.esm.js +4 -4
  3. package/dist/beeq/beeq.esm.js.map +1 -1
  4. package/dist/beeq/index.esm.js +6 -6
  5. package/dist/beeq/{p-0c42c08a.js → p-01df4baa.js} +38 -23
  6. package/dist/beeq/p-01df4baa.js.map +1 -0
  7. package/dist/beeq/{p-7c06dfec.entry.js → p-03749fbf.entry.js} +74 -66
  8. package/dist/beeq/{p-7c06dfec.entry.js.map → p-03749fbf.entry.js.map} +1 -1
  9. package/dist/beeq/p-03e23dca.entry.js +105 -0
  10. package/dist/beeq/{p-600e7c38.entry.js.map → p-03e23dca.entry.js.map} +1 -1
  11. package/dist/beeq/{p-513bab02.js → p-0fce4de9.js} +2 -2
  12. package/dist/beeq/{p-951ba558.js → p-1defeea3.js} +19 -19
  13. package/dist/beeq/{p-951ba558.js.map → p-1defeea3.js.map} +1 -1
  14. package/dist/beeq/p-27974392.entry.js +197 -0
  15. package/dist/beeq/p-27974392.entry.js.map +1 -0
  16. package/dist/beeq/p-2b2d8b0c.entry.js +114 -0
  17. package/dist/beeq/{p-37466506.entry.js.map → p-2b2d8b0c.entry.js.map} +1 -1
  18. package/dist/beeq/p-3e3fd7b5.entry.js +87 -0
  19. package/dist/beeq/{p-12dbc6ac.entry.js.map → p-3e3fd7b5.entry.js.map} +1 -1
  20. package/dist/beeq/{p-0ebe73ef.entry.js → p-3ed73068.entry.js} +42 -38
  21. package/dist/beeq/{p-0ebe73ef.entry.js.map → p-3ed73068.entry.js.map} +1 -1
  22. package/dist/beeq/p-5a12011a.entry.js +161 -0
  23. package/dist/beeq/{p-e7d75b87.entry.js.map → p-5a12011a.entry.js.map} +1 -1
  24. package/dist/beeq/{p-0ab0b58d.js → p-5a9a73a0.js} +2 -1
  25. package/dist/beeq/p-5a9a73a0.js.map +1 -0
  26. package/dist/beeq/{p-4dd962a7.entry.js → p-5d51cadd.entry.js} +63 -46
  27. package/dist/beeq/{p-4dd962a7.entry.js.map → p-5d51cadd.entry.js.map} +1 -1
  28. package/dist/beeq/p-5d8d6717.entry.js +190 -0
  29. package/dist/beeq/{p-ceb3bb9a.entry.js.map → p-5d8d6717.entry.js.map} +1 -1
  30. package/dist/beeq/p-5fcbf15f.entry.js +158 -0
  31. package/dist/beeq/{p-ae94b9f8.entry.js.map → p-5fcbf15f.entry.js.map} +1 -1
  32. package/dist/beeq/p-60ab652b.entry.js +102 -0
  33. package/dist/beeq/{p-900d4e78.entry.js.map → p-60ab652b.entry.js.map} +1 -1
  34. package/dist/beeq/p-7695fc8d.entry.js +215 -0
  35. package/dist/beeq/p-7695fc8d.entry.js.map +1 -0
  36. package/dist/beeq/p-7aa47927.entry.js +215 -0
  37. package/dist/beeq/p-7aa47927.entry.js.map +1 -0
  38. package/dist/beeq/p-7ea146b8.entry.js +184 -0
  39. package/dist/beeq/p-7ea146b8.entry.js.map +1 -0
  40. package/dist/beeq/p-818cd6d7.entry.js +244 -0
  41. package/dist/beeq/{p-19df76ba.entry.js.map → p-818cd6d7.entry.js.map} +1 -1
  42. package/dist/beeq/p-89665044.entry.js +349 -0
  43. package/dist/beeq/p-89665044.entry.js.map +1 -0
  44. package/dist/beeq/p-8b6fc3ef.entry.js +135 -0
  45. package/dist/beeq/p-8b6fc3ef.entry.js.map +1 -0
  46. package/dist/beeq/p-908c57e9.entry.js +84 -0
  47. package/dist/beeq/{p-41033fe6.entry.js.map → p-908c57e9.entry.js.map} +1 -1
  48. package/dist/beeq/p-98de0101.entry.js +146 -0
  49. package/dist/beeq/p-98de0101.entry.js.map +1 -0
  50. package/dist/beeq/p-a84d4562.js +64 -0
  51. package/dist/beeq/p-a84d4562.js.map +1 -0
  52. package/dist/beeq/p-a94d15f9.entry.js +156 -0
  53. package/dist/beeq/{p-7089c66a.entry.js.map → p-a94d15f9.entry.js.map} +1 -1
  54. package/dist/beeq/p-ac0d84a6.entry.js +122 -0
  55. package/dist/beeq/{p-5eab4f55.entry.js.map → p-ac0d84a6.entry.js.map} +1 -1
  56. package/dist/beeq/p-b877d662.entry.js +412 -0
  57. package/dist/beeq/p-b877d662.entry.js.map +1 -0
  58. package/dist/beeq/p-bb14b231.entry.js +460 -0
  59. package/dist/beeq/p-bb14b231.entry.js.map +1 -0
  60. package/dist/beeq/{p-4a3d8532.entry.js → p-bc60faa1.entry.js} +21 -15
  61. package/dist/beeq/{p-4a3d8532.entry.js.map → p-bc60faa1.entry.js.map} +1 -1
  62. package/dist/beeq/p-be746e37.entry.js +269 -0
  63. package/dist/beeq/p-be746e37.entry.js.map +1 -0
  64. package/dist/beeq/{p-38d4bd8a.js → p-c78ae3c2.js} +270 -226
  65. package/dist/beeq/p-c78ae3c2.js.map +1 -0
  66. package/dist/beeq/p-cb917e68.entry.js +177 -0
  67. package/dist/beeq/p-cb917e68.entry.js.map +1 -0
  68. package/dist/beeq/p-cdd5b425.entry.js +274 -0
  69. package/dist/beeq/{p-734853f9.entry.js.map → p-cdd5b425.entry.js.map} +1 -1
  70. package/dist/beeq/p-d2f682a9.entry.js +530 -0
  71. package/dist/beeq/p-d2f682a9.entry.js.map +1 -0
  72. package/dist/beeq/{p-d7a88b16.js → p-d7ce7165.js} +6 -7
  73. package/dist/beeq/p-d7ce7165.js.map +1 -0
  74. package/dist/beeq/p-d8f7bf11.entry.js +272 -0
  75. package/dist/beeq/p-d8f7bf11.entry.js.map +1 -0
  76. package/dist/beeq/p-d9bcaeed.entry.js +320 -0
  77. package/dist/beeq/p-d9bcaeed.entry.js.map +1 -0
  78. package/dist/beeq/p-e06c8398.entry.js +294 -0
  79. package/dist/beeq/p-e06c8398.entry.js.map +1 -0
  80. package/dist/beeq/{p-11eaeb5d.entry.js → p-e6911710.entry.js} +116 -81
  81. package/dist/beeq/p-e6911710.entry.js.map +1 -0
  82. package/dist/beeq/p-f11a3beb.entry.js +90 -0
  83. package/dist/beeq/{p-4fc098bb.entry.js.map → p-f11a3beb.entry.js.map} +1 -1
  84. package/dist/beeq/{p-2ef721e1.entry.js → p-f1d6a960.entry.js} +59 -49
  85. package/dist/beeq/p-f1d6a960.entry.js.map +1 -0
  86. package/dist/beeq/p-f350516b.entry.js +154 -0
  87. package/dist/beeq/p-f350516b.entry.js.map +1 -0
  88. package/dist/beeq/p-f5d59aba.entry.js +136 -0
  89. package/dist/beeq/p-f5d59aba.entry.js.map +1 -0
  90. package/dist/beeq/p-f5eb8fff.entry.js +336 -0
  91. package/dist/beeq/p-f5eb8fff.entry.js.map +1 -0
  92. package/dist/beeq/p-f69d2900.entry.js +269 -0
  93. package/dist/beeq/p-f69d2900.entry.js.map +1 -0
  94. package/dist/beeq/p-fe57aa48.entry.js +135 -0
  95. package/dist/beeq/p-fe57aa48.entry.js.map +1 -0
  96. package/dist/cjs/{assetsPath-7ead23b7.js → assetsPath-6ac8935a.js} +9 -33
  97. package/dist/cjs/assetsPath-6ac8935a.js.map +1 -0
  98. package/dist/cjs/beeq.cjs.js +3 -3
  99. package/dist/cjs/beeq.cjs.js.map +1 -1
  100. package/dist/cjs/bq-accordion-group.cjs.entry.js +4 -4
  101. package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -1
  102. package/dist/cjs/bq-accordion.cjs.entry.js +84 -48
  103. package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
  104. package/dist/cjs/bq-alert.cjs.entry.js +58 -43
  105. package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
  106. package/dist/cjs/bq-avatar.cjs.entry.js +41 -40
  107. package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
  108. package/dist/cjs/bq-badge.cjs.entry.js +43 -42
  109. package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
  110. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +40 -29
  111. package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -1
  112. package/dist/cjs/bq-breadcrumb.cjs.entry.js +46 -30
  113. package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
  114. package/dist/cjs/bq-button_2.cjs.entry.js +105 -86
  115. package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
  116. package/dist/cjs/bq-card.cjs.entry.js +4 -4
  117. package/dist/cjs/bq-card.cjs.entry.js.map +1 -1
  118. package/dist/cjs/bq-checkbox.cjs.entry.js +64 -54
  119. package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
  120. package/dist/cjs/bq-date-picker.cjs.entry.js +161 -140
  121. package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
  122. package/dist/cjs/bq-dialog.cjs.entry.js +72 -50
  123. package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
  124. package/dist/cjs/bq-divider.cjs.entry.js +24 -21
  125. package/dist/cjs/bq-divider.cjs.entry.js.map +1 -1
  126. package/dist/cjs/bq-drawer.cjs.entry.js +49 -34
  127. package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
  128. package/dist/cjs/bq-dropdown_2.cjs.entry.js +44 -34
  129. package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
  130. package/dist/cjs/bq-empty-state.cjs.entry.js +26 -22
  131. package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
  132. package/dist/cjs/bq-input.cjs.entry.js +117 -90
  133. package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
  134. package/dist/cjs/bq-notification.cjs.entry.js +63 -48
  135. package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
  136. package/dist/cjs/bq-option-group.cjs.entry.js +3 -3
  137. package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -1
  138. package/dist/cjs/bq-option-list_2.cjs.entry.js +74 -54
  139. package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
  140. package/dist/cjs/bq-option.cjs.entry.js +62 -45
  141. package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
  142. package/dist/cjs/bq-page-title.cjs.entry.js +37 -32
  143. package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
  144. package/dist/cjs/bq-progress.cjs.entry.js +4 -4
  145. package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
  146. package/dist/cjs/bq-radio-group.cjs.entry.js +13 -7
  147. package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -1
  148. package/dist/cjs/bq-radio.cjs.entry.js +43 -37
  149. package/dist/cjs/bq-radio.cjs.entry.js.map +1 -1
  150. package/dist/cjs/bq-select.cjs.entry.js +186 -168
  151. package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
  152. package/dist/cjs/bq-side-menu-item.cjs.entry.js +69 -55
  153. package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
  154. package/dist/cjs/bq-side-menu.cjs.entry.js +47 -32
  155. package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -1
  156. package/dist/cjs/bq-slider.cjs.entry.js +161 -145
  157. package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
  158. package/dist/cjs/bq-spinner.cjs.entry.js +53 -51
  159. package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
  160. package/dist/cjs/bq-status.cjs.entry.js +4 -4
  161. package/dist/cjs/bq-status.cjs.entry.js.map +1 -1
  162. package/dist/cjs/bq-step-item.cjs.entry.js +16 -11
  163. package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -1
  164. package/dist/cjs/bq-steps.cjs.entry.js +13 -10
  165. package/dist/cjs/bq-steps.cjs.entry.js.map +1 -1
  166. package/dist/cjs/bq-switch.cjs.entry.js +44 -32
  167. package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
  168. package/dist/cjs/bq-tab-group.cjs.entry.js +65 -57
  169. package/dist/cjs/bq-tab-group.cjs.entry.js.map +1 -1
  170. package/dist/cjs/bq-tab.cjs.entry.js +44 -33
  171. package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
  172. package/dist/cjs/bq-textarea.cjs.entry.js +81 -58
  173. package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
  174. package/dist/cjs/bq-toast.cjs.entry.js +44 -37
  175. package/dist/cjs/bq-toast.cjs.entry.js.map +1 -1
  176. package/dist/cjs/bq-tooltip.cjs.entry.js +46 -42
  177. package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
  178. package/dist/cjs/{cssVariables-7139f0c6.js → cssVariables-a0e1e906.js} +3 -1
  179. package/dist/cjs/cssVariables-a0e1e906.js.map +1 -0
  180. package/dist/cjs/{debounce-f94a239b.js → debounce-1f7e1176.js} +3 -3
  181. package/dist/cjs/debounce-1f7e1176.js.map +1 -0
  182. package/dist/cjs/{index-1d3aac65.js → index-34edf639.js} +29 -14
  183. package/dist/cjs/index-34edf639.js.map +1 -0
  184. package/dist/cjs/{index-e4c116b6.js → index-fc7876d6.js} +63 -19
  185. package/dist/cjs/index-fc7876d6.js.map +1 -0
  186. package/dist/cjs/index.cjs.js +5 -5
  187. package/dist/cjs/{isDefined-a9dd6d5b.js → isDefined-ee0026ed.js} +2 -2
  188. package/dist/cjs/{isDefined-a9dd6d5b.js.map → isDefined-ee0026ed.js.map} +1 -1
  189. package/dist/cjs/loader.cjs.js +2 -2
  190. package/dist/cjs/{slot-dd6f7db9.js → slot-2fee189a.js} +3 -4
  191. package/dist/{beeq/p-d7a88b16.js.map → cjs/slot-2fee189a.js.map} +1 -1
  192. package/dist/collection/_storybook/foundation/helper/index.js +3 -3
  193. package/dist/collection/_storybook/foundation/helper/index.js.map +1 -1
  194. package/dist/collection/collection-manifest.json +2 -2
  195. package/dist/collection/components/accordion/bq-accordion.js +72 -39
  196. package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
  197. package/dist/collection/components/accordion/helper/index.js +10 -4
  198. package/dist/collection/components/accordion/helper/index.js.map +1 -1
  199. package/dist/collection/components/accordion/scss/bq-accordion.css +1 -1
  200. package/dist/collection/components/accordion-group/bq-accordion-group.js +5 -0
  201. package/dist/collection/components/accordion-group/bq-accordion-group.js.map +1 -1
  202. package/dist/collection/components/accordion-group/scss/bq-accordion-group.css +1 -1
  203. package/dist/collection/components/alert/bq-alert.js +55 -37
  204. package/dist/collection/components/alert/bq-alert.js.map +1 -1
  205. package/dist/collection/components/alert/scss/bq-alert.css +1 -1
  206. package/dist/collection/components/avatar/bq-avatar.js +40 -36
  207. package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
  208. package/dist/collection/components/avatar/scss/bq-avatar.css +1 -1
  209. package/dist/collection/components/badge/bq-badge.js +40 -36
  210. package/dist/collection/components/badge/bq-badge.js.map +1 -1
  211. package/dist/collection/components/badge/scss/bq-badge.css +1 -1
  212. package/dist/collection/components/breadcrumb/bq-breadcrumb.js +45 -26
  213. package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
  214. package/dist/collection/components/breadcrumb/scss/bq-breadcrumb.css +1 -1
  215. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +40 -24
  216. package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
  217. package/dist/collection/components/breadcrumb-item/scss/bq-breadcrumb-item.css +1 -1
  218. package/dist/collection/components/button/bq-button.js +57 -41
  219. package/dist/collection/components/button/bq-button.js.map +1 -1
  220. package/dist/collection/components/button/scss/bq-button.css +1 -1
  221. package/dist/collection/components/card/bq-card.js +5 -0
  222. package/dist/collection/components/card/bq-card.js.map +1 -1
  223. package/dist/collection/components/card/scss/bq-card.css +1 -1
  224. package/dist/collection/components/checkbox/bq-checkbox.js +63 -50
  225. package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
  226. package/dist/collection/components/checkbox/scss/bq-checkbox.css +1 -1
  227. package/dist/collection/components/date-picker/bq-date-picker.js +158 -134
  228. package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
  229. package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
  230. package/dist/collection/components/dialog/bq-dialog.js +70 -45
  231. package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
  232. package/dist/collection/components/dialog/scss/bq-dialog.css +1 -1
  233. package/dist/collection/components/divider/bq-divider.js +21 -15
  234. package/dist/collection/components/divider/bq-divider.js.map +1 -1
  235. package/dist/collection/components/divider/scss/bq-divider.css +1 -1
  236. package/dist/collection/components/drawer/bq-drawer.js +47 -29
  237. package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
  238. package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
  239. package/dist/collection/components/dropdown/bq-dropdown.js +34 -23
  240. package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
  241. package/dist/collection/components/empty-state/bq-empty-state.js +25 -18
  242. package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
  243. package/dist/collection/components/icon/bq-icon.js +41 -37
  244. package/dist/collection/components/icon/bq-icon.js.map +1 -1
  245. package/dist/collection/components/icon/helper/request.js +2 -0
  246. package/dist/collection/components/icon/helper/request.js.map +1 -1
  247. package/dist/collection/components/icon/scss/bq-icon.css +1 -1
  248. package/dist/collection/components/input/bq-input.js +113 -83
  249. package/dist/collection/components/input/bq-input.js.map +1 -1
  250. package/dist/collection/components/input/scss/bq-input.css +1 -1
  251. package/dist/collection/components/notification/bq-notification.js +60 -42
  252. package/dist/collection/components/notification/bq-notification.js.map +1 -1
  253. package/dist/collection/components/notification/scss/bq-notification.css +1 -1
  254. package/dist/collection/components/option/bq-option.js +60 -40
  255. package/dist/collection/components/option/bq-option.js.map +1 -1
  256. package/dist/collection/components/option/scss/bq-option.css +1 -1
  257. package/dist/collection/components/option-group/bq-option-group.js +5 -0
  258. package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
  259. package/dist/collection/components/option-group/scss/bq-option-group.css +1 -1
  260. package/dist/collection/components/option-list/bq-option-list.js +10 -0
  261. package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
  262. package/dist/collection/components/option-list/scss/bq-option-list.css +1 -1
  263. package/dist/collection/components/page-title/bq-page-title.js +35 -27
  264. package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
  265. package/dist/collection/components/page-title/scss/bq-page-title.css +1 -1
  266. package/dist/collection/components/panel/bq-panel.js +11 -6
  267. package/dist/collection/components/panel/bq-panel.js.map +1 -1
  268. package/dist/collection/components/panel/scss/bq-panel.css +1 -1
  269. package/dist/collection/components/progress/bq-progress.js +5 -0
  270. package/dist/collection/components/progress/bq-progress.js.map +1 -1
  271. package/dist/collection/components/progress/scss/bq-progress.css +1 -1
  272. package/dist/collection/components/radio/bq-radio.js +43 -34
  273. package/dist/collection/components/radio/bq-radio.js.map +1 -1
  274. package/dist/collection/components/radio/scss/bq-radio.css +1 -1
  275. package/dist/collection/components/radio-group/bq-radio-group.js +12 -3
  276. package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
  277. package/dist/collection/components/select/bq-select.js +182 -161
  278. package/dist/collection/components/select/bq-select.js.map +1 -1
  279. package/dist/collection/components/select/scss/bq-select.css +1 -1
  280. package/dist/collection/components/side-menu/bq-side-menu.js +44 -29
  281. package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
  282. package/dist/collection/components/side-menu/scss/bq-side-menu.css +1 -1
  283. package/dist/collection/components/side-menu-item/bq-side-menu-item.js +68 -51
  284. package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
  285. package/dist/collection/components/side-menu-item/scss/bq-side-menu-item.css +1 -1
  286. package/dist/collection/components/slider/bq-slider.js +159 -140
  287. package/dist/collection/components/slider/bq-slider.js.map +1 -1
  288. package/dist/collection/components/slider/scss/bq-slider.css +1 -1
  289. package/dist/collection/components/spinner/bq-spinner.js +51 -46
  290. package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
  291. package/dist/collection/components/spinner/scss/bq-spinner.css +1 -1
  292. package/dist/collection/components/status/bq-status.js +5 -0
  293. package/dist/collection/components/status/bq-status.js.map +1 -1
  294. package/dist/collection/components/status/scss/bq-status.css +1 -1
  295. package/dist/collection/components/step-item/bq-step-item.js +17 -7
  296. package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
  297. package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
  298. package/dist/collection/components/steps/bq-steps.js +12 -6
  299. package/dist/collection/components/steps/bq-steps.js.map +1 -1
  300. package/dist/collection/components/steps/scss/bq-steps.css +1 -1
  301. package/dist/collection/components/switch/bq-switch.js +42 -27
  302. package/dist/collection/components/switch/bq-switch.js.map +1 -1
  303. package/dist/collection/components/switch/scss/bq-switch.css +1 -1
  304. package/dist/collection/components/tab/bq-tab.js +42 -28
  305. package/dist/collection/components/tab/bq-tab.js.map +1 -1
  306. package/dist/collection/components/tab/scss/bq-tab.css +1 -1
  307. package/dist/collection/components/tab-group/bq-tab-group.js +64 -53
  308. package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
  309. package/dist/collection/components/tag/bq-tag.js +64 -46
  310. package/dist/collection/components/tag/bq-tag.js.map +1 -1
  311. package/dist/collection/components/tag/scss/bq-tag.css +1 -1
  312. package/dist/collection/components/textarea/bq-textarea.js +78 -52
  313. package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
  314. package/dist/collection/components/textarea/scss/bq-textarea.css +1 -1
  315. package/dist/collection/components/toast/bq-toast.js +42 -32
  316. package/dist/collection/components/toast/bq-toast.js.map +1 -1
  317. package/dist/collection/components/toast/scss/bq-toast.css +1 -1
  318. package/dist/collection/components/tooltip/bq-tooltip.js +45 -38
  319. package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
  320. package/dist/collection/components/tooltip/scss/bq-tooltip.css +1 -1
  321. package/dist/collection/index.js +0 -1
  322. package/dist/collection/index.js.map +1 -1
  323. package/dist/collection/services/libraries/floating-ui/index.js +4 -0
  324. package/dist/collection/services/libraries/floating-ui/index.js.map +1 -1
  325. package/dist/collection/shared/utils/assetsPath.js +8 -32
  326. package/dist/collection/shared/utils/assetsPath.js.map +1 -1
  327. package/dist/collection/shared/utils/cssVariables.js +2 -0
  328. package/dist/collection/shared/utils/cssVariables.js.map +1 -1
  329. package/dist/collection/shared/utils/debounce.js +2 -2
  330. package/dist/collection/shared/utils/debounce.js.map +1 -1
  331. package/dist/collection/shared/utils/slot.js +2 -3
  332. package/dist/collection/shared/utils/slot.js.map +1 -1
  333. package/dist/components/assetsPath.js +8 -32
  334. package/dist/components/assetsPath.js.map +1 -1
  335. package/dist/components/bq-accordion-group.js +2 -2
  336. package/dist/components/bq-accordion-group.js.map +1 -1
  337. package/dist/components/bq-accordion.js +81 -45
  338. package/dist/components/bq-accordion.js.map +1 -1
  339. package/dist/components/bq-alert.js +54 -39
  340. package/dist/components/bq-alert.js.map +1 -1
  341. package/dist/components/bq-avatar.js +39 -38
  342. package/dist/components/bq-avatar.js.map +1 -1
  343. package/dist/components/bq-badge2.js +39 -38
  344. package/dist/components/bq-badge2.js.map +1 -1
  345. package/dist/components/bq-breadcrumb-item.js +37 -26
  346. package/dist/components/bq-breadcrumb-item.js.map +1 -1
  347. package/dist/components/bq-breadcrumb.js +44 -28
  348. package/dist/components/bq-breadcrumb.js.map +1 -1
  349. package/dist/components/bq-button2.js +56 -43
  350. package/dist/components/bq-button2.js.map +1 -1
  351. package/dist/components/bq-card.js +2 -2
  352. package/dist/components/bq-card.js.map +1 -1
  353. package/dist/components/bq-checkbox.js +62 -52
  354. package/dist/components/bq-checkbox.js.map +1 -1
  355. package/dist/components/bq-date-picker.js +157 -136
  356. package/dist/components/bq-date-picker.js.map +1 -1
  357. package/dist/components/bq-dialog.js +69 -47
  358. package/dist/components/bq-dialog.js.map +1 -1
  359. package/dist/components/bq-divider2.js +20 -17
  360. package/dist/components/bq-divider2.js.map +1 -1
  361. package/dist/components/bq-drawer.js +46 -31
  362. package/dist/components/bq-drawer.js.map +1 -1
  363. package/dist/components/bq-dropdown2.js +32 -24
  364. package/dist/components/bq-dropdown2.js.map +1 -1
  365. package/dist/components/bq-empty-state.js +23 -19
  366. package/dist/components/bq-empty-state.js.map +1 -1
  367. package/dist/components/bq-icon2.js +44 -38
  368. package/dist/components/bq-icon2.js.map +1 -1
  369. package/dist/components/bq-input.js +112 -85
  370. package/dist/components/bq-input.js.map +1 -1
  371. package/dist/components/bq-notification.js +59 -44
  372. package/dist/components/bq-notification.js.map +1 -1
  373. package/dist/components/bq-option-group.js +2 -2
  374. package/dist/components/bq-option-group.js.map +1 -1
  375. package/dist/components/bq-option-list2.js +7 -2
  376. package/dist/components/bq-option-list2.js.map +1 -1
  377. package/dist/components/bq-option.js +59 -42
  378. package/dist/components/bq-option.js.map +1 -1
  379. package/dist/components/bq-page-title.js +34 -29
  380. package/dist/components/bq-page-title.js.map +1 -1
  381. package/dist/components/bq-panel2.js +10 -8
  382. package/dist/components/bq-panel2.js.map +1 -1
  383. package/dist/components/bq-progress.js +2 -2
  384. package/dist/components/bq-progress.js.map +1 -1
  385. package/dist/components/bq-radio-group.js +10 -4
  386. package/dist/components/bq-radio-group.js.map +1 -1
  387. package/dist/components/bq-radio.js +43 -37
  388. package/dist/components/bq-radio.js.map +1 -1
  389. package/dist/components/bq-select.js +181 -163
  390. package/dist/components/bq-select.js.map +1 -1
  391. package/dist/components/bq-side-menu-item.js +67 -53
  392. package/dist/components/bq-side-menu-item.js.map +1 -1
  393. package/dist/components/bq-side-menu.js +45 -30
  394. package/dist/components/bq-side-menu.js.map +1 -1
  395. package/dist/components/bq-slider.js +158 -142
  396. package/dist/components/bq-slider.js.map +1 -1
  397. package/dist/components/bq-spinner.js +49 -47
  398. package/dist/components/bq-spinner.js.map +1 -1
  399. package/dist/components/bq-status.js +2 -2
  400. package/dist/components/bq-status.js.map +1 -1
  401. package/dist/components/bq-step-item.js +14 -9
  402. package/dist/components/bq-step-item.js.map +1 -1
  403. package/dist/components/bq-steps.js +11 -8
  404. package/dist/components/bq-steps.js.map +1 -1
  405. package/dist/components/bq-switch.js +41 -29
  406. package/dist/components/bq-switch.js.map +1 -1
  407. package/dist/components/bq-tab-group.js +62 -54
  408. package/dist/components/bq-tab-group.js.map +1 -1
  409. package/dist/components/bq-tab.js +41 -30
  410. package/dist/components/bq-tab.js.map +1 -1
  411. package/dist/components/bq-tag2.js +63 -48
  412. package/dist/components/bq-tag2.js.map +1 -1
  413. package/dist/components/bq-textarea.js +77 -54
  414. package/dist/components/bq-textarea.js.map +1 -1
  415. package/dist/components/bq-toast.js +41 -34
  416. package/dist/components/bq-toast.js.map +1 -1
  417. package/dist/components/bq-tooltip2.js +44 -40
  418. package/dist/components/bq-tooltip2.js.map +1 -1
  419. package/dist/components/cssVariables.js +2 -0
  420. package/dist/components/cssVariables.js.map +1 -1
  421. package/dist/components/debounce.js +2 -2
  422. package/dist/components/debounce.js.map +1 -1
  423. package/dist/components/index2.js +62 -18
  424. package/dist/components/index2.js.map +1 -1
  425. package/dist/components/slot.js +2 -3
  426. package/dist/components/slot.js.map +1 -1
  427. package/dist/esm/{assetsPath-c02b0e16.js → assetsPath-e2f1ceb9.js} +9 -33
  428. package/dist/esm/assetsPath-e2f1ceb9.js.map +1 -0
  429. package/dist/esm/beeq.js +4 -4
  430. package/dist/esm/beeq.js.map +1 -1
  431. package/dist/esm/bq-accordion-group.entry.js +4 -4
  432. package/dist/esm/bq-accordion-group.entry.js.map +1 -1
  433. package/dist/esm/bq-accordion.entry.js +84 -48
  434. package/dist/esm/bq-accordion.entry.js.map +1 -1
  435. package/dist/esm/bq-alert.entry.js +58 -43
  436. package/dist/esm/bq-alert.entry.js.map +1 -1
  437. package/dist/esm/bq-avatar.entry.js +41 -40
  438. package/dist/esm/bq-avatar.entry.js.map +1 -1
  439. package/dist/esm/bq-badge.entry.js +43 -42
  440. package/dist/esm/bq-badge.entry.js.map +1 -1
  441. package/dist/esm/bq-breadcrumb-item.entry.js +40 -29
  442. package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
  443. package/dist/esm/bq-breadcrumb.entry.js +46 -30
  444. package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
  445. package/dist/esm/bq-button_2.entry.js +105 -86
  446. package/dist/esm/bq-button_2.entry.js.map +1 -1
  447. package/dist/esm/bq-card.entry.js +4 -4
  448. package/dist/esm/bq-card.entry.js.map +1 -1
  449. package/dist/esm/bq-checkbox.entry.js +64 -54
  450. package/dist/esm/bq-checkbox.entry.js.map +1 -1
  451. package/dist/esm/bq-date-picker.entry.js +161 -140
  452. package/dist/esm/bq-date-picker.entry.js.map +1 -1
  453. package/dist/esm/bq-dialog.entry.js +72 -50
  454. package/dist/esm/bq-dialog.entry.js.map +1 -1
  455. package/dist/esm/bq-divider.entry.js +24 -21
  456. package/dist/esm/bq-divider.entry.js.map +1 -1
  457. package/dist/esm/bq-drawer.entry.js +49 -34
  458. package/dist/esm/bq-drawer.entry.js.map +1 -1
  459. package/dist/esm/bq-dropdown_2.entry.js +44 -34
  460. package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
  461. package/dist/esm/bq-empty-state.entry.js +26 -22
  462. package/dist/esm/bq-empty-state.entry.js.map +1 -1
  463. package/dist/esm/bq-input.entry.js +117 -90
  464. package/dist/esm/bq-input.entry.js.map +1 -1
  465. package/dist/esm/bq-notification.entry.js +63 -48
  466. package/dist/esm/bq-notification.entry.js.map +1 -1
  467. package/dist/esm/bq-option-group.entry.js +3 -3
  468. package/dist/esm/bq-option-group.entry.js.map +1 -1
  469. package/dist/esm/bq-option-list_2.entry.js +74 -54
  470. package/dist/esm/bq-option-list_2.entry.js.map +1 -1
  471. package/dist/esm/bq-option.entry.js +62 -45
  472. package/dist/esm/bq-option.entry.js.map +1 -1
  473. package/dist/esm/bq-page-title.entry.js +37 -32
  474. package/dist/esm/bq-page-title.entry.js.map +1 -1
  475. package/dist/esm/bq-progress.entry.js +4 -4
  476. package/dist/esm/bq-progress.entry.js.map +1 -1
  477. package/dist/esm/bq-radio-group.entry.js +13 -7
  478. package/dist/esm/bq-radio-group.entry.js.map +1 -1
  479. package/dist/esm/bq-radio.entry.js +43 -37
  480. package/dist/esm/bq-radio.entry.js.map +1 -1
  481. package/dist/esm/bq-select.entry.js +186 -168
  482. package/dist/esm/bq-select.entry.js.map +1 -1
  483. package/dist/esm/bq-side-menu-item.entry.js +69 -55
  484. package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
  485. package/dist/esm/bq-side-menu.entry.js +47 -32
  486. package/dist/esm/bq-side-menu.entry.js.map +1 -1
  487. package/dist/esm/bq-slider.entry.js +161 -145
  488. package/dist/esm/bq-slider.entry.js.map +1 -1
  489. package/dist/esm/bq-spinner.entry.js +53 -51
  490. package/dist/esm/bq-spinner.entry.js.map +1 -1
  491. package/dist/esm/bq-status.entry.js +4 -4
  492. package/dist/esm/bq-status.entry.js.map +1 -1
  493. package/dist/esm/bq-step-item.entry.js +16 -11
  494. package/dist/esm/bq-step-item.entry.js.map +1 -1
  495. package/dist/esm/bq-steps.entry.js +13 -10
  496. package/dist/esm/bq-steps.entry.js.map +1 -1
  497. package/dist/esm/bq-switch.entry.js +44 -32
  498. package/dist/esm/bq-switch.entry.js.map +1 -1
  499. package/dist/esm/bq-tab-group.entry.js +65 -57
  500. package/dist/esm/bq-tab-group.entry.js.map +1 -1
  501. package/dist/esm/bq-tab.entry.js +44 -33
  502. package/dist/esm/bq-tab.entry.js.map +1 -1
  503. package/dist/esm/bq-textarea.entry.js +81 -58
  504. package/dist/esm/bq-textarea.entry.js.map +1 -1
  505. package/dist/esm/bq-toast.entry.js +44 -37
  506. package/dist/esm/bq-toast.entry.js.map +1 -1
  507. package/dist/esm/bq-tooltip.entry.js +46 -42
  508. package/dist/esm/bq-tooltip.entry.js.map +1 -1
  509. package/dist/esm/{cssVariables-5ffccc29.js → cssVariables-23e3ca0d.js} +3 -1
  510. package/dist/esm/cssVariables-23e3ca0d.js.map +1 -0
  511. package/dist/esm/{debounce-c82e3da1.js → debounce-3e72f418.js} +3 -3
  512. package/dist/esm/debounce-3e72f418.js.map +1 -0
  513. package/dist/esm/{index-f69556fe.js → index-033f1efb.js} +29 -15
  514. package/dist/esm/index-033f1efb.js.map +1 -0
  515. package/dist/esm/{index-136429a6.js → index-1618c78b.js} +63 -19
  516. package/dist/esm/index-1618c78b.js.map +1 -0
  517. package/dist/esm/index.js +6 -6
  518. package/dist/esm/{isDefined-1e676215.js → isDefined-650befc3.js} +2 -2
  519. package/dist/esm/{isDefined-1e676215.js.map → isDefined-650befc3.js.map} +1 -1
  520. package/dist/esm/loader.js +3 -3
  521. package/dist/esm/{slot-179d109d.js → slot-58bfedb5.js} +3 -4
  522. package/dist/esm/slot-58bfedb5.js.map +1 -0
  523. package/dist/hydrate/index.d.ts +10 -4
  524. package/dist/hydrate/index.js +3778 -1946
  525. package/dist/hydrate/index.mjs +3778 -1946
  526. package/dist/types/_storybook/foundation/helper/index.d.ts +1 -3
  527. package/dist/types/components/radio/bq-radio.d.ts +0 -5
  528. package/dist/types/index.d.ts +1 -1
  529. package/dist/types/shared/utils/assetsPath.d.ts +1 -10
  530. package/dist/types/shared/utils/cssVariables.d.ts +1 -1
  531. package/dist/types/stencil-public-runtime.d.ts +4 -0
  532. package/package.json +4 -4
  533. package/dist/beeq/p-026222c6.entry.js +0 -309
  534. package/dist/beeq/p-026222c6.entry.js.map +0 -1
  535. package/dist/beeq/p-04d98ed3.entry.js +0 -257
  536. package/dist/beeq/p-04d98ed3.entry.js.map +0 -1
  537. package/dist/beeq/p-05685544.entry.js +0 -121
  538. package/dist/beeq/p-05685544.entry.js.map +0 -1
  539. package/dist/beeq/p-0ab0b58d.js.map +0 -1
  540. package/dist/beeq/p-0c42c08a.js.map +0 -1
  541. package/dist/beeq/p-11eaeb5d.entry.js.map +0 -1
  542. package/dist/beeq/p-12dbc6ac.entry.js +0 -87
  543. package/dist/beeq/p-19df76ba.entry.js +0 -220
  544. package/dist/beeq/p-2ef721e1.entry.js.map +0 -1
  545. package/dist/beeq/p-37466506.entry.js +0 -103
  546. package/dist/beeq/p-377c70d1.entry.js +0 -173
  547. package/dist/beeq/p-377c70d1.entry.js.map +0 -1
  548. package/dist/beeq/p-38d4bd8a.js.map +0 -1
  549. package/dist/beeq/p-3dd0e436.entry.js +0 -130
  550. package/dist/beeq/p-3dd0e436.entry.js.map +0 -1
  551. package/dist/beeq/p-41033fe6.entry.js +0 -84
  552. package/dist/beeq/p-43e4fcdb.entry.js +0 -173
  553. package/dist/beeq/p-43e4fcdb.entry.js.map +0 -1
  554. package/dist/beeq/p-4a235cd2.entry.js +0 -258
  555. package/dist/beeq/p-4a235cd2.entry.js.map +0 -1
  556. package/dist/beeq/p-4eccc020.entry.js +0 -203
  557. package/dist/beeq/p-4eccc020.entry.js.map +0 -1
  558. package/dist/beeq/p-4fc098bb.entry.js +0 -90
  559. package/dist/beeq/p-5eab4f55.entry.js +0 -117
  560. package/dist/beeq/p-600e7c38.entry.js +0 -102
  561. package/dist/beeq/p-7089c66a.entry.js +0 -156
  562. package/dist/beeq/p-734853f9.entry.js +0 -259
  563. package/dist/beeq/p-7774eec3.entry.js +0 -135
  564. package/dist/beeq/p-7774eec3.entry.js.map +0 -1
  565. package/dist/beeq/p-7b9ff03f.entry.js +0 -437
  566. package/dist/beeq/p-7b9ff03f.entry.js.map +0 -1
  567. package/dist/beeq/p-900d4e78.entry.js +0 -102
  568. package/dist/beeq/p-911e07b7.entry.js +0 -513
  569. package/dist/beeq/p-911e07b7.entry.js.map +0 -1
  570. package/dist/beeq/p-924ebf7d.entry.js +0 -394
  571. package/dist/beeq/p-924ebf7d.entry.js.map +0 -1
  572. package/dist/beeq/p-9aa18e2f.entry.js +0 -303
  573. package/dist/beeq/p-9aa18e2f.entry.js.map +0 -1
  574. package/dist/beeq/p-ae94b9f8.entry.js +0 -144
  575. package/dist/beeq/p-b38e8c5a.entry.js +0 -208
  576. package/dist/beeq/p-b38e8c5a.entry.js.map +0 -1
  577. package/dist/beeq/p-b4278945.entry.js +0 -195
  578. package/dist/beeq/p-b4278945.entry.js.map +0 -1
  579. package/dist/beeq/p-b48545b6.entry.js +0 -248
  580. package/dist/beeq/p-b48545b6.entry.js.map +0 -1
  581. package/dist/beeq/p-c907de72.entry.js +0 -145
  582. package/dist/beeq/p-c907de72.entry.js.map +0 -1
  583. package/dist/beeq/p-ceb3bb9a.entry.js +0 -187
  584. package/dist/beeq/p-d3008f60.entry.js +0 -279
  585. package/dist/beeq/p-d3008f60.entry.js.map +0 -1
  586. package/dist/beeq/p-e5afdf8c.js +0 -87
  587. package/dist/beeq/p-e5afdf8c.js.map +0 -1
  588. package/dist/beeq/p-e7d75b87.entry.js +0 -144
  589. package/dist/beeq/p-f00abfb8.entry.js +0 -145
  590. package/dist/beeq/p-f00abfb8.entry.js.map +0 -1
  591. package/dist/beeq/p-f8663855.entry.js +0 -329
  592. package/dist/beeq/p-f8663855.entry.js.map +0 -1
  593. package/dist/cjs/assetsPath-7ead23b7.js.map +0 -1
  594. package/dist/cjs/cssVariables-7139f0c6.js.map +0 -1
  595. package/dist/cjs/debounce-f94a239b.js.map +0 -1
  596. package/dist/cjs/index-1d3aac65.js.map +0 -1
  597. package/dist/cjs/index-e4c116b6.js.map +0 -1
  598. package/dist/cjs/slot-dd6f7db9.js.map +0 -1
  599. package/dist/esm/assetsPath-c02b0e16.js.map +0 -1
  600. package/dist/esm/cssVariables-5ffccc29.js.map +0 -1
  601. package/dist/esm/debounce-c82e3da1.js.map +0 -1
  602. package/dist/esm/index-136429a6.js.map +0 -1
  603. package/dist/esm/index-f69556fe.js.map +0 -1
  604. package/dist/esm/slot-179d109d.js.map +0 -1
  605. /package/dist/beeq/{p-513bab02.js.map → p-0fce4de9.js.map} +0 -0
@@ -45,137 +45,6 @@ import { hasSlotContent, isDefined, isEventTargetChildOfElement, isHTMLElement,
45
45
  */
46
46
  export class BqDatePicker {
47
47
  constructor() {
48
- this.fallbackInputId = 'date-picker';
49
- // Export parts of the calendar-month component
50
- this.COMMON_EXPORT_PARTS = 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';
51
- this.BUTTON_EXPORT_PARTS = 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';
52
- // Local methods
53
- // Internal business logic.
54
- // These methods cannot be called from the host element.
55
- // =======================================================
56
- this.handleBlur = () => {
57
- if (this.disabled)
58
- return;
59
- this.bqBlur.emit(this.el);
60
- };
61
- this.handleFocus = () => {
62
- if (this.disabled)
63
- return;
64
- this.bqFocus.emit(this.el);
65
- };
66
- this.setFocusedDate = () => {
67
- if (!this.callyElem)
68
- return;
69
- // We need to set the focused date in the calendar component via a ref
70
- // because it doesn't work when passed as a prop (the Cally element does not re-render)
71
- this.callyElem.focusedDate = this.value
72
- ? this.formatFocusedDate(this.value)
73
- : new Date().toLocaleDateString('fr-CA');
74
- };
75
- this.handleChange = (ev) => {
76
- if (this.disabled)
77
- return;
78
- if (!isHTMLElement(ev.target, 'input'))
79
- return;
80
- const dateValue = new Date(ev.target.value);
81
- if (!isNaN(dateValue.getTime())) {
82
- // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale
83
- this.value = dateValue.toLocaleDateString('fr-CA');
84
- this.displayDate = this.formatDisplayValue(this.value);
85
- this.bqChange.emit({ value: this.value, el: this.el });
86
- }
87
- };
88
- this.handleCalendarChange = (ev) => {
89
- const { value } = ev.target;
90
- this.value = value;
91
- this.displayDate = this.formatDisplayValue(this.value);
92
- this.inputElem.value = this.displayDate;
93
- this.inputElem.focus();
94
- this.bqChange.emit({ value: this.value, el: this.el });
95
- this.open = this.type === 'multi';
96
- };
97
- this.handleCalendarRangeStart = (ev) => {
98
- this.hasRangeEnd = false;
99
- this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');
100
- };
101
- this.handleCalendarRangeEnd = () => {
102
- this.hasRangeEnd = true;
103
- };
104
- this.handleClearClick = (ev) => {
105
- if (this.disabled)
106
- return;
107
- this.inputElem.value = '';
108
- this.value = this.inputElem.value;
109
- this.hasRangeEnd = false;
110
- this.bqClear.emit(this.el);
111
- this.bqChange.emit({ value: this.value, el: this.el });
112
- this.inputElem.focus();
113
- ev.stopPropagation();
114
- };
115
- this.handleLabelSlotChange = () => {
116
- this.hasLabel = hasSlotContent(this.labelElem);
117
- };
118
- this.handlePrefixSlotChange = () => {
119
- this.hasPrefix = hasSlotContent(this.prefixElem);
120
- };
121
- this.handleSuffixSlotChange = () => {
122
- this.hasSuffix = hasSlotContent(this.suffixElem);
123
- };
124
- this.generateCalendarMonth = (offset, className = '') => {
125
- return (h("calendar-month", { offset: offset, class: className, exportparts: `${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}` }));
126
- };
127
- /**
128
- * Generates an array of JSX.Element representing calendar months.
129
- *
130
- * If the type of the date picker is 'range' or 'multi' and the number of months is specified,
131
- * it generates an array of calendar months with the specified length. Each month will have an offset
132
- * and a class name based on its position in the array. The offset is used to determine the month to display,
133
- * and the class name is used for responsive design.
134
- *
135
- * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,
136
- * it generates an array with a single calendar month.
137
- *
138
- * @returns {JSX.Element[]} An array of JSX.Element representing calendar months.
139
- */
140
- this.generateCalendarMonths = () => {
141
- if (this.type === 'range' || (this.type === 'multi' && this.months)) {
142
- return Array.from({ length: this.months }, (_, i) => {
143
- const offset = i > 0 ? i : undefined;
144
- const className = offset ? 'hidden sm:block' : '';
145
- return this.generateCalendarMonth(offset, className);
146
- });
147
- }
148
- return [this.generateCalendarMonth()];
149
- };
150
- /**
151
- * Extracts and returns the first date part from a given string.
152
- * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value
153
- * should be the focused date in the calendar.
154
- *
155
- * @param value - The value to be processed, can be a string.
156
- * @returns The extracted last date portion of the value.
157
- */
158
- this.formatFocusedDate = (value) => {
159
- if (!value)
160
- return;
161
- const dateRegex = /\b\d{4}-\d{2}-\d{2}\b/;
162
- const match = dateRegex.exec(value);
163
- return match ? match[0] : null;
164
- };
165
- this.formatDisplayValue = (value) => {
166
- if (!value)
167
- return;
168
- const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);
169
- if (this.type === 'range') {
170
- const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));
171
- return dateFormatter.formatRange(start, end);
172
- }
173
- if (this.type === 'multi') {
174
- const dates = value.split(' ').map((dateStr) => new Date(dateStr));
175
- return dates.map((date) => dateFormatter.format(date)).join(', ');
176
- }
177
- return dateFormatter.format(new Date(value));
178
- };
179
48
  this.focusedDate = undefined;
180
49
  this.displayDate = undefined;
181
50
  this.hasLabel = false;
@@ -215,6 +84,20 @@ export class BqDatePicker {
215
84
  this.validationStatus = 'none';
216
85
  this.value = undefined;
217
86
  }
87
+ // Own Properties
88
+ // ====================
89
+ callyElem;
90
+ inputElem;
91
+ labelElem;
92
+ prefixElem;
93
+ suffixElem;
94
+ fallbackInputId = 'date-picker';
95
+ // Export parts of the calendar-month component
96
+ COMMON_EXPORT_PARTS = 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';
97
+ BUTTON_EXPORT_PARTS = 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';
98
+ // Reference to host HTML element
99
+ // ===================================
100
+ el;
218
101
  // Prop lifecycle events
219
102
  // =======================
220
103
  handleValueChange() {
@@ -229,6 +112,20 @@ export class BqDatePicker {
229
112
  checkPropValues() {
230
113
  validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');
231
114
  }
115
+ // Events section
116
+ // Requires JSDocs for public API documentation
117
+ // ==============================================
118
+ /** Callback handler emitted when the input loses focus */
119
+ bqBlur;
120
+ /**
121
+ * Callback handler emitted when the input value has changed and the input loses focus.
122
+ * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.
123
+ */
124
+ bqChange;
125
+ /** Callback handler emitted when the input value has been cleared */
126
+ bqClear;
127
+ /** Callback handler emitted when the input has received focus */
128
+ bqFocus;
232
129
  // Component lifecycle events
233
130
  // Ordered by their natural call order
234
131
  // =====================================
@@ -277,6 +174,133 @@ export class BqDatePicker {
277
174
  this.value = undefined;
278
175
  this.bqClear.emit(this.el);
279
176
  }
177
+ // Local methods
178
+ // Internal business logic.
179
+ // These methods cannot be called from the host element.
180
+ // =======================================================
181
+ handleBlur = () => {
182
+ if (this.disabled)
183
+ return;
184
+ this.bqBlur.emit(this.el);
185
+ };
186
+ handleFocus = () => {
187
+ if (this.disabled)
188
+ return;
189
+ this.bqFocus.emit(this.el);
190
+ };
191
+ setFocusedDate = () => {
192
+ if (!this.callyElem)
193
+ return;
194
+ // We need to set the focused date in the calendar component via a ref
195
+ // because it doesn't work when passed as a prop (the Cally element does not re-render)
196
+ this.callyElem.focusedDate = this.value
197
+ ? this.formatFocusedDate(this.value)
198
+ : new Date().toLocaleDateString('fr-CA');
199
+ };
200
+ handleChange = (ev) => {
201
+ if (this.disabled)
202
+ return;
203
+ if (!isHTMLElement(ev.target, 'input'))
204
+ return;
205
+ const dateValue = new Date(ev.target.value);
206
+ if (!isNaN(dateValue.getTime())) {
207
+ // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale
208
+ this.value = dateValue.toLocaleDateString('fr-CA');
209
+ this.displayDate = this.formatDisplayValue(this.value);
210
+ this.bqChange.emit({ value: this.value, el: this.el });
211
+ }
212
+ };
213
+ handleCalendarChange = (ev) => {
214
+ const { value } = ev.target;
215
+ this.value = value;
216
+ this.displayDate = this.formatDisplayValue(this.value);
217
+ this.inputElem.value = this.displayDate;
218
+ this.inputElem.focus();
219
+ this.bqChange.emit({ value: this.value, el: this.el });
220
+ this.open = this.type === 'multi';
221
+ };
222
+ handleCalendarRangeStart = (ev) => {
223
+ this.hasRangeEnd = false;
224
+ this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');
225
+ };
226
+ handleCalendarRangeEnd = () => {
227
+ this.hasRangeEnd = true;
228
+ };
229
+ handleClearClick = (ev) => {
230
+ if (this.disabled)
231
+ return;
232
+ this.inputElem.value = '';
233
+ this.value = this.inputElem.value;
234
+ this.hasRangeEnd = false;
235
+ this.bqClear.emit(this.el);
236
+ this.bqChange.emit({ value: this.value, el: this.el });
237
+ this.inputElem.focus();
238
+ ev.stopPropagation();
239
+ };
240
+ handleLabelSlotChange = () => {
241
+ this.hasLabel = hasSlotContent(this.labelElem);
242
+ };
243
+ handlePrefixSlotChange = () => {
244
+ this.hasPrefix = hasSlotContent(this.prefixElem);
245
+ };
246
+ handleSuffixSlotChange = () => {
247
+ this.hasSuffix = hasSlotContent(this.suffixElem);
248
+ };
249
+ generateCalendarMonth = (offset, className = '') => {
250
+ return (h("calendar-month", { offset: offset, class: className, exportparts: `${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}` }));
251
+ };
252
+ /**
253
+ * Generates an array of JSX.Element representing calendar months.
254
+ *
255
+ * If the type of the date picker is 'range' or 'multi' and the number of months is specified,
256
+ * it generates an array of calendar months with the specified length. Each month will have an offset
257
+ * and a class name based on its position in the array. The offset is used to determine the month to display,
258
+ * and the class name is used for responsive design.
259
+ *
260
+ * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,
261
+ * it generates an array with a single calendar month.
262
+ *
263
+ * @returns {JSX.Element[]} An array of JSX.Element representing calendar months.
264
+ */
265
+ generateCalendarMonths = () => {
266
+ if (this.type === 'range' || (this.type === 'multi' && this.months)) {
267
+ return Array.from({ length: this.months }, (_, i) => {
268
+ const offset = i > 0 ? i : undefined;
269
+ const className = offset ? 'hidden sm:block' : '';
270
+ return this.generateCalendarMonth(offset, className);
271
+ });
272
+ }
273
+ return [this.generateCalendarMonth()];
274
+ };
275
+ /**
276
+ * Extracts and returns the first date part from a given string.
277
+ * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value
278
+ * should be the focused date in the calendar.
279
+ *
280
+ * @param value - The value to be processed, can be a string.
281
+ * @returns The extracted last date portion of the value.
282
+ */
283
+ formatFocusedDate = (value) => {
284
+ if (!value)
285
+ return;
286
+ const dateRegex = /\b\d{4}-\d{2}-\d{2}\b/;
287
+ const match = dateRegex.exec(value);
288
+ return match ? match[0] : null;
289
+ };
290
+ formatDisplayValue = (value) => {
291
+ if (!value)
292
+ return;
293
+ const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);
294
+ if (this.type === 'range') {
295
+ const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));
296
+ return dateFormatter.formatRange(start, end);
297
+ }
298
+ if (this.type === 'multi') {
299
+ const dates = value.split(' ').map((dateStr) => new Date(dateStr));
300
+ return dates.map((date) => dateFormatter.format(date)).join(', ');
301
+ }
302
+ return dateFormatter.format(new Date(value));
303
+ };
280
304
  get CalendarType() {
281
305
  const componentTypes = {
282
306
  single: 'calendar-date',
@@ -292,16 +316,16 @@ export class BqDatePicker {
292
316
  render() {
293
317
  const CallyCalendar = this.CalendarType;
294
318
  const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;
295
- return (h("div", { key: 'fecf008fc4d06999e00cf4c3934d74938532d6f2', class: "bq-date-picker", part: "base" }, h("label", { key: 'ab11a1942cede1e3836f1d86eb3fb0ac24fc77d3', id: labelId, class: { 'bq-date-picker__label': true, '!hidden': !this.hasLabel }, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: 'b75db64c81c3dfd2226df35f58026d4775dbed2f', name: "label", onSlotchange: this.handleLabelSlotChange })), h("bq-dropdown", { key: '71752bf4e50266bc147baeb569ebf8d3f8f2f207', class: "bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto", disabled: this.disabled, distance: this.distance, open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy, exportparts: "panel" }, h("div", { key: '5853ebcb6485229e4167cf7f99f75b6d8ead2710', class: {
319
+ return (h("div", { key: 'fecf008fc4d06999e00cf4c3934d74938532d6f2', class: "bq-date-picker", part: "base" }, h("label", { key: '1d90b1bea164099d02a6f89565812b6a6a8a8b4f', id: labelId, class: { 'bq-date-picker__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: 'e87e7ba439ab6815aa511c77804cc1534b33f077', name: "label", onSlotchange: this.handleLabelSlotChange })), h("bq-dropdown", { key: '3133b6b891614878c705587ffc60c930f1f1289d', class: "bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto", disabled: this.disabled, distance: this.distance, open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy, exportparts: "panel" }, h("div", { key: '22acc32aebfa68babf19daff7b9996c44b8a6493', class: {
296
320
  'bq-date-picker__control': true,
297
321
  [`validation-${this.validationStatus}`]: true,
298
322
  disabled: this.disabled,
299
- }, part: "control", slot: "trigger" }, h("span", { key: '52b07c3b06a9480bd39f8f8b511c0b3054d687cf', class: { 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: '8eeaf0d8035ca316bb7c2b1b5ea721d0ab9ab317', name: "prefix", onSlotchange: this.handlePrefixSlotChange })), h("input", { key: '449f61eb69d9f1f46939afcc12473237587c068d', id: this.name || this.fallbackInputId, class: "bq-date-picker__control--input", autoComplete: "off", autoCapitalize: "off", autoFocus: this.autofocus, "aria-disabled": this.disabled ? 'true' : 'false', "aria-controls": `${this.name}`, "aria-haspopup": "dialog", disabled: this.disabled, form: this.form, name: this.name, placeholder: this.placeholder, readonly: this.type !== 'single', ref: (inputElem) => (this.inputElem = inputElem), required: this.required, spellcheck: false, type: "text", value: this.displayDate, part: "input",
323
+ }, part: "control", slot: "trigger" }, h("span", { key: '4eedc11f668fd443ed43203c7351822578b57965', class: { 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: 'a68aadcbf45fe56a97b214ef1de89956db7a30f5', name: "prefix", onSlotchange: this.handlePrefixSlotChange })), h("input", { key: 'a76ac38f10cc2f5e0c9d0662d3bc1da8ac017234', id: this.name || this.fallbackInputId, class: "bq-date-picker__control--input", autoComplete: "off", autoCapitalize: "off", "aria-disabled": this.disabled ? 'true' : 'false', "aria-controls": `${this.name}`, "aria-haspopup": "dialog", disabled: this.disabled, form: this.form, name: this.name, placeholder: this.placeholder, readonly: this.type !== 'single', ref: (inputElem) => (this.inputElem = inputElem), required: this.required, spellcheck: false, type: "text", value: this.displayDate, part: "input",
300
324
  // Events
301
325
  onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange }), this.hasValue && !this.disabled && !this.disableClear && (
302
326
  // The clear button will be visible as long as the input has a value
303
327
  // and the parent group is hovered or has focus-within
304
- h("bq-button", { key: 'e9b6e9caa5963cc15f409b2f31e5e493e371faa4', class: "bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: '15b9fe8a47f8f66dabdadd94f8ee418af9201099', name: "clear-icon" }, h("bq-icon", { key: '484c1487afcacff0106762c3164c8e899dcbbcc2', weight: "bold", name: "x-circle", class: "flex" })))), h("span", { key: '1271ff097377b4d1ff6235987263b9114e530f7c', class: "bq-date-picker__control--suffix", ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '6569c007c099181c93143196e01bda1ca4000beb', name: "suffix", onSlotchange: this.handleSuffixSlotChange }, h("bq-icon", { key: 'e19a6f41916e9769b31c4a216afd8b518e2a2daa', name: "calendar-blank", weight: "bold", class: "flex" })))), h(CallyCalendar, { key: 'c91c4a4f22cbd99b5ab0531fe9855f8aac1392d9', isDateDisallowed: this.isDateDisallowed, locale: this.locale, value: this.value, min: this.min, max: this.max, months: this.months, tentative: this.tentative, pageBy: this.monthsPerView, firstDayOfWeek: this.firstDayOfWeek, showOutsideDays: this.showOutsideDays, onChange: this.handleCalendarChange, onRangestart: this.handleCalendarRangeStart, onRangeend: this.handleCalendarRangeEnd, exportparts: "container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading", ref: (elem) => (this.callyElem = elem) }, h("bq-icon", { key: 'db268d2998ab2f1db543abe8cf664219f3548325', color: "text--primary", slot: "previous", name: "caret-left", label: "Previous" }), h("bq-icon", { key: '10729aabe0db0ecad80b42d5cac5bf7a4a85dc0a', color: "text--primary", slot: "next", name: "caret-right", label: "Next" }), h("div", { key: 'da502880f63e84097ce052d8739ce8a52230dfd9', class: "flex flex-wrap justify-center gap-[--bq-spacing-m]" }, this.generateCalendarMonths())))));
328
+ h("bq-button", { key: '959a737f939b2edb28e6f3ba49a2a2f2a7737ea0', class: "bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: '268726c361f74822b7a203745a41d6c03a4592db', name: "clear-icon" }, h("bq-icon", { key: 'f9342e15716577e3129ea09d6b9c3f99b39223a9', weight: "bold", name: "x-circle", class: "flex" })))), h("span", { key: '7c1a5096ebee64156a6c76efd9c34f01f70ed6f6', class: "bq-date-picker__control--suffix", ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: 'ba3d95b9b94398ca0a0e88647ff5ef6f9dc2538d', name: "suffix", onSlotchange: this.handleSuffixSlotChange }, h("bq-icon", { key: '38cf9be76e35e5b02141a5e0d6a938aebbff39b0', name: "calendar-blank", weight: "bold", class: "flex" })))), h(CallyCalendar, { key: '8cdb5f879e00437a8f36d61dcd8a0d9f1d85a47d', isDateDisallowed: this.isDateDisallowed, locale: this.locale, value: this.value, min: this.min, max: this.max, months: this.months, tentative: this.tentative, pageBy: this.monthsPerView, firstDayOfWeek: this.firstDayOfWeek, showOutsideDays: this.showOutsideDays, onChange: this.handleCalendarChange, onRangestart: this.handleCalendarRangeStart, onRangeend: this.handleCalendarRangeEnd, exportparts: "container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading", ref: (elem) => (this.callyElem = elem) }, h("bq-icon", { key: 'e0313d7bd9c231b4cea839549a27489d0e1d35dc', color: "text--primary", slot: "previous", name: "caret-left", label: "Previous" }), h("bq-icon", { key: '5d03ea06201aef51de86cf75c631c38a92e9cef7', color: "text--primary", slot: "next", name: "caret-right", label: "Next" }), h("div", { key: '16d28cdca9784a6f96cf1f6182df03028f34c0d6', class: "flex flex-wrap justify-center gap-[--bq-spacing-m]" }, this.generateCalendarMonths())))));
305
329
  }
306
330
  static get is() { return "bq-date-picker"; }
307
331
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"bq-date-picker.js","sourceRoot":"","sources":["../../../../../../src/components/date-picker/bq-date-picker.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;AAG/G,OAAO,EAAE,gBAAgB,EAA+B,MAAM,wBAAwB,CAAC;AAEvF,OAAO,EACL,cAAc,EACd,SAAS,EACT,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAQH,MAAM,OAAO,YAAY;;QAUf,oBAAe,GAAG,aAAa,CAAC;QAExC,+CAA+C;QAC9B,wBAAmB,GAClC,wGAAwG,CAAC;QAC1F,wBAAmB,GAClC,0KAA0K,CAAC;QAkO7K,gBAAgB;QAChB,2BAA2B;QAC3B,wDAAwD;QACxD,0DAA0D;QAElD,eAAU,GAAG,GAAG,EAAE;YACxB,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,CAAC,CAAC;QAEM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { CalendarDate } from 'cally';\n\nimport { DATE_PICKER_TYPE, DaysOfWeek, TDatePickerType } from './bq-date-picker.types';\nimport { Placement } from '../../services/interfaces';\nimport {\n hasSlotContent,\n isDefined,\n isEventTargetChildOfElement,\n isHTMLElement,\n validatePropValue,\n} from '../../shared/utils';\nimport { TInputValidation } from '../input/bq-input.types';\n\n/**\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The date picker panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n\n// Parts from the Cally library for calendar-date and calendar-range components:\n * @part calendar__container - The container for the entire component.\n * @part calendar__header - The container for heading and button's.\n * @part calendar__button - Any button within the component.\n * @part calendar__previous - The previous page button.\n * @part calendar__next - The next page button.\n * @part calendar__disabled - A button that is disabled due to min/max.\n * @part calendar__heading - The heading containing the month and year.\n\n// Parts specific to the calendar-month component:\n * @part calendar__heading - The heading that labels the month.\n * @part calendar__table - The <table> element.\n * @part calendar__tr - Any row within the table.\n * @part calendar__head - The table's header row.\n * @part calendar__week - The table's body rows.\n * @part calendar__th - The table's header cells.\n * @part calendar__td - The table's body cells.\n * @part calendar__button - Any button used in the component.\n * @part calendar__day - The buttons corresponding to each day in the grid.\n * @part calendar__selected - Any days which are selected.\n * @part calendar__today - Today's day.\n * @part calendar__disallowed - Any day that has been disallowed via isDateDisallowed.\n * @part calendar__outside - Any days which are outside the current month.\n * @part calendar__range-start - The day at the start of a date range.\n * @part calendar__range-end - The day at the end of a date range.\n * @part calendar__range-inner - Any days between the start and end of a date range.\n */\n@Component({\n tag: 'bq-date-picker',\n styleUrl: './scss/bq-date-picker.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqDatePicker {\n // Own Properties\n // ====================\n\n private callyElem?: InstanceType<typeof CalendarDate>;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private fallbackInputId = 'date-picker';\n\n // Export parts of the calendar-month component\n private readonly COMMON_EXPORT_PARTS =\n 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';\n private readonly BUTTON_EXPORT_PARTS =\n 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDatePickerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() focusedDate: string;\n @State() displayDate: string;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasRangeEnd = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If `true`, the Date picker input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /** If `true`, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /**\n * Indicates whether the Date picker input is disabled or not.\n * If `true`, the Date picker is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The first day of the week, where Sunday is 0, Monday is 1, etc */\n @Prop({ reflect: true }) firstDayOfWeek?: DaysOfWeek = 1;\n\n /** The options to use when formatting the displayed value.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n @Prop() formatOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n };\n\n /** The ID of the form that the Date picker input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** A function that takes a date and returns true if the date should not be selectable */\n @Prop({ reflect: true }) isDateDisallowed?: (date: Date) => boolean;\n\n /** The locale for formatting dates. If not set, will use the browser's locale.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n */\n @Prop({ reflect: true }) locale: Intl.LocalesArgument = 'en-GB';\n\n /** The latest date that can be selected */\n @Prop({ reflect: true }) max?: string;\n\n /** The earliest date that can be selected */\n @Prop({ reflect: true }) min?: string;\n\n /** Number of months to show when range is `true` */\n @Prop({ reflect: true }) months: number;\n\n /**\n * Specifies how the next/previous buttons should navigate the calendar.\n * - single: The buttons will navigate by a single month at a time.\n * - months: The buttons will navigate by the number of months displayed per view.\n */\n @Prop({ reflect: true }) monthsPerView: 'single' | 'months' = 'single';\n\n /** The Date picker input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, the Date picker panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Date picker panel. */\n @Prop({ reflect: true, mutable: true }) panelHeight?: string = 'auto';\n\n /** The Date picker input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Date picker panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-end';\n\n /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Represents the skidding between the Date picker panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Whether to show days outside the month */\n @Prop({ reflect: true }) showOutsideDays: boolean = false;\n\n /** Defines the strategy to position the Date picker panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /** The date that is tentatively selected e.g. the start of a range selection */\n @Prop({ reflect: true, mutable: true }) tentative?: string;\n\n /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */\n @Prop({ reflect: true }) type: TDatePickerType = 'single';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n * All dates are expected in ISO-8601 format (YYYY-MM-DD). */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n if (Array.isArray(this.value)) {\n this.hasValue = this.value.some((val) => val.length > 0);\n return;\n }\n\n this.hasValue = isDefined(this.value);\n this.displayDate = this.formatDisplayValue(this.value);\n\n this.setFocusedDate();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqDatePickerElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqDatePickerElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqDatePickerElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqDatePickerElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.handleValueChange();\n }\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n this.setFocusedDate();\n }\n\n @Listen('click', { target: 'body', capture: true })\n handleClickOutside(ev: MouseEvent) {\n const { open, type, hasRangeEnd } = this;\n if (!open || type !== 'range' || ev.button !== 0) return;\n if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd) return;\n if (isEventTargetChildOfElement(ev, this.el)) return;\n\n if (!hasRangeEnd) {\n this.tentative = undefined;\n this.hasRangeEnd = false;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqInput\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n this.value = undefined;\n\n this.bqClear.emit(this.el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private setFocusedDate = () => {\n if (!this.callyElem) return;\n // We need to set the focused date in the calendar component via a ref\n // because it doesn't work when passed as a prop (the Cally element does not re-render)\n this.callyElem.focusedDate = this.value\n ? this.formatFocusedDate(this.value)\n : new Date().toLocaleDateString('fr-CA');\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'input')) return;\n\n const dateValue = new Date(ev.target.value);\n if (!isNaN(dateValue.getTime())) {\n // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale\n this.value = dateValue.toLocaleDateString('fr-CA');\n this.displayDate = this.formatDisplayValue(this.value);\n this.bqChange.emit({ value: this.value, el: this.el });\n }\n };\n\n private handleCalendarChange = (ev: Event) => {\n const { value } = ev.target as unknown as { value: string };\n\n this.value = value;\n this.displayDate = this.formatDisplayValue(this.value);\n this.inputElem.value = this.displayDate;\n this.inputElem.focus();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n\n this.open = this.type === 'multi';\n };\n\n private handleCalendarRangeStart = (ev: CustomEvent) => {\n this.hasRangeEnd = false;\n this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');\n };\n\n private handleCalendarRangeEnd = () => {\n this.hasRangeEnd = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n if (this.disabled) return;\n\n this.inputElem.value = '';\n this.value = this.inputElem.value;\n this.hasRangeEnd = false;\n\n this.bqClear.emit(this.el);\n this.bqChange.emit({ value: this.value, el: this.el });\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleLabelSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n };\n\n private handlePrefixSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem);\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private generateCalendarMonth = (offset?: number, className = ''): JSX.Element => {\n return (\n <calendar-month\n offset={offset}\n class={className}\n exportparts={`${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}`}\n />\n );\n };\n\n /**\n * Generates an array of JSX.Element representing calendar months.\n *\n * If the type of the date picker is 'range' or 'multi' and the number of months is specified,\n * it generates an array of calendar months with the specified length. Each month will have an offset\n * and a class name based on its position in the array. The offset is used to determine the month to display,\n * and the class name is used for responsive design.\n *\n * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,\n * it generates an array with a single calendar month.\n *\n * @returns {JSX.Element[]} An array of JSX.Element representing calendar months.\n */\n private generateCalendarMonths = (): JSX.Element[] => {\n if (this.type === 'range' || (this.type === 'multi' && this.months)) {\n return Array.from({ length: this.months }, (_, i) => {\n const offset = i > 0 ? i : undefined;\n const className = offset ? 'hidden sm:block' : '';\n return this.generateCalendarMonth(offset, className);\n });\n }\n\n return [this.generateCalendarMonth()];\n };\n\n /**\n * Extracts and returns the first date part from a given string.\n * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value\n * should be the focused date in the calendar.\n *\n * @param value - The value to be processed, can be a string.\n * @returns The extracted last date portion of the value.\n */\n private formatFocusedDate = (value: string): string | null => {\n if (!value) return;\n\n const dateRegex = /\\b\\d{4}-\\d{2}-\\d{2}\\b/;\n const match = dateRegex.exec(value);\n return match ? match[0] : null;\n };\n\n private formatDisplayValue = (value: string): string | undefined => {\n if (!value) return;\n\n const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);\n\n if (this.type === 'range') {\n const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));\n return dateFormatter.formatRange(start, end);\n }\n\n if (this.type === 'multi') {\n const dates = value.split(' ').map((dateStr) => new Date(dateStr));\n return dates.map((date) => dateFormatter.format(date)).join(', ');\n }\n\n return dateFormatter.format(new Date(value));\n };\n\n private get CalendarType() {\n const componentTypes = {\n single: 'calendar-date',\n multi: 'calendar-multi',\n range: 'calendar-range',\n } as const;\n\n // Return the corresponding component type, based on the type prop value\n return componentTypes[this.type] || componentTypes.single;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const CallyCalendar = this.CalendarType;\n const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-date-picker\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-date-picker__label': true, '!hidden': !this.hasLabel }}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleLabelSlotChange} />\n </label>\n {/* Select date picker dropdown */}\n <bq-dropdown\n class=\"bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto\"\n disabled={this.disabled}\n distance={this.distance}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-date-picker__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handlePrefixSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-date-picker__control--input\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n autoFocus={this.autofocus}\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`${this.name}`}\n aria-haspopup=\"dialog\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.type !== 'single'}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n required={this.required}\n spellcheck={false}\n type=\"text\"\n value={this.displayDate}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onChange={this.handleChange}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n >\n <slot name=\"clear-icon\">\n <bq-icon weight=\"bold\" name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class=\"bq-date-picker__control--suffix\"\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange}>\n <bq-icon name=\"calendar-blank\" weight=\"bold\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <CallyCalendar\n isDateDisallowed={this.isDateDisallowed}\n locale={this.locale as string}\n value={this.value}\n min={this.min}\n max={this.max}\n months={this.months}\n tentative={this.tentative}\n pageBy={this.monthsPerView}\n firstDayOfWeek={this.firstDayOfWeek}\n showOutsideDays={this.showOutsideDays}\n onChange={this.handleCalendarChange}\n onRangestart={this.handleCalendarRangeStart}\n onRangeend={this.handleCalendarRangeEnd}\n exportparts=\"container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading\"\n ref={(elem) => (this.callyElem = elem as InstanceType<typeof CalendarDate>)}\n >\n <bq-icon color=\"text--primary\" slot=\"previous\" name=\"caret-left\" label=\"Previous\" />\n <bq-icon color=\"text--primary\" slot=\"next\" name=\"caret-right\" label=\"Next\" />\n\n <div class=\"flex flex-wrap justify-center gap-[--bq-spacing-m]\">{this.generateCalendarMonths()}</div>\n </CallyCalendar>\n </bq-dropdown>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"bq-date-picker.js","sourceRoot":"","sources":["../../../../../../src/components/date-picker/bq-date-picker.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;AAG/G,OAAO,EAAE,gBAAgB,EAA+B,MAAM,wBAAwB,CAAC;AAEvF,OAAO,EACL,cAAc,EACd,SAAS,EACT,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAQH,MAAM,OAAO,YAAY;;;;wBA6BH,KAAK;yBACJ,KAAK;2BACH,KAAK;yBACP,KAAK;wBACN,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AO,CACvF,CACJ,CACV,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { CalendarDate } from 'cally';\n\nimport { DATE_PICKER_TYPE, DaysOfWeek, TDatePickerType } from './bq-date-picker.types';\nimport { Placement } from '../../services/interfaces';\nimport {\n hasSlotContent,\n isDefined,\n isEventTargetChildOfElement,\n isHTMLElement,\n validatePropValue,\n} from '../../shared/utils';\nimport { TInputValidation } from '../input/bq-input.types';\n\n/**\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The date picker panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n\n// Parts from the Cally library for calendar-date and calendar-range components:\n * @part calendar__container - The container for the entire component.\n * @part calendar__header - The container for heading and button's.\n * @part calendar__button - Any button within the component.\n * @part calendar__previous - The previous page button.\n * @part calendar__next - The next page button.\n * @part calendar__disabled - A button that is disabled due to min/max.\n * @part calendar__heading - The heading containing the month and year.\n\n// Parts specific to the calendar-month component:\n * @part calendar__heading - The heading that labels the month.\n * @part calendar__table - The <table> element.\n * @part calendar__tr - Any row within the table.\n * @part calendar__head - The table's header row.\n * @part calendar__week - The table's body rows.\n * @part calendar__th - The table's header cells.\n * @part calendar__td - The table's body cells.\n * @part calendar__button - Any button used in the component.\n * @part calendar__day - The buttons corresponding to each day in the grid.\n * @part calendar__selected - Any days which are selected.\n * @part calendar__today - Today's day.\n * @part calendar__disallowed - Any day that has been disallowed via isDateDisallowed.\n * @part calendar__outside - Any days which are outside the current month.\n * @part calendar__range-start - The day at the start of a date range.\n * @part calendar__range-end - The day at the end of a date range.\n * @part calendar__range-inner - Any days between the start and end of a date range.\n */\n@Component({\n tag: 'bq-date-picker',\n styleUrl: './scss/bq-date-picker.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqDatePicker {\n // Own Properties\n // ====================\n\n private callyElem?: InstanceType<typeof CalendarDate>;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private fallbackInputId = 'date-picker';\n\n // Export parts of the calendar-month component\n private readonly COMMON_EXPORT_PARTS =\n 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';\n private readonly BUTTON_EXPORT_PARTS =\n 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDatePickerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() focusedDate: string;\n @State() displayDate: string;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasRangeEnd = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If `true`, the Date picker input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /** If `true`, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /**\n * Indicates whether the Date picker input is disabled or not.\n * If `true`, the Date picker is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The first day of the week, where Sunday is 0, Monday is 1, etc */\n @Prop({ reflect: true }) firstDayOfWeek?: DaysOfWeek = 1;\n\n /** The options to use when formatting the displayed value.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n @Prop() formatOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n };\n\n /** The ID of the form that the Date picker input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** A function that takes a date and returns true if the date should not be selectable */\n @Prop({ reflect: true }) isDateDisallowed?: (date: Date) => boolean;\n\n /** The locale for formatting dates. If not set, will use the browser's locale.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n */\n @Prop({ reflect: true }) locale: Intl.LocalesArgument = 'en-GB';\n\n /** The latest date that can be selected */\n @Prop({ reflect: true }) max?: string;\n\n /** The earliest date that can be selected */\n @Prop({ reflect: true }) min?: string;\n\n /** Number of months to show when range is `true` */\n @Prop({ reflect: true }) months: number;\n\n /**\n * Specifies how the next/previous buttons should navigate the calendar.\n * - single: The buttons will navigate by a single month at a time.\n * - months: The buttons will navigate by the number of months displayed per view.\n */\n @Prop({ reflect: true }) monthsPerView: 'single' | 'months' = 'single';\n\n /** The Date picker input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, the Date picker panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Date picker panel. */\n @Prop({ reflect: true, mutable: true }) panelHeight?: string = 'auto';\n\n /** The Date picker input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Date picker panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-end';\n\n /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Represents the skidding between the Date picker panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Whether to show days outside the month */\n @Prop({ reflect: true }) showOutsideDays: boolean = false;\n\n /** Defines the strategy to position the Date picker panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /** The date that is tentatively selected e.g. the start of a range selection */\n @Prop({ reflect: true, mutable: true }) tentative?: string;\n\n /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */\n @Prop({ reflect: true }) type: TDatePickerType = 'single';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n * All dates are expected in ISO-8601 format (YYYY-MM-DD). */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n if (Array.isArray(this.value)) {\n this.hasValue = this.value.some((val) => val.length > 0);\n return;\n }\n\n this.hasValue = isDefined(this.value);\n this.displayDate = this.formatDisplayValue(this.value);\n\n this.setFocusedDate();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqDatePickerElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqDatePickerElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqDatePickerElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqDatePickerElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.handleValueChange();\n }\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n this.setFocusedDate();\n }\n\n @Listen('click', { target: 'body', capture: true })\n handleClickOutside(ev: MouseEvent) {\n const { open, type, hasRangeEnd } = this;\n if (!open || type !== 'range' || ev.button !== 0) return;\n if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd) return;\n if (isEventTargetChildOfElement(ev, this.el)) return;\n\n if (!hasRangeEnd) {\n this.tentative = undefined;\n this.hasRangeEnd = false;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqInput\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n this.value = undefined;\n\n this.bqClear.emit(this.el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private setFocusedDate = () => {\n if (!this.callyElem) return;\n // We need to set the focused date in the calendar component via a ref\n // because it doesn't work when passed as a prop (the Cally element does not re-render)\n this.callyElem.focusedDate = this.value\n ? this.formatFocusedDate(this.value)\n : new Date().toLocaleDateString('fr-CA');\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'input')) return;\n\n const dateValue = new Date(ev.target.value);\n if (!isNaN(dateValue.getTime())) {\n // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale\n this.value = dateValue.toLocaleDateString('fr-CA');\n this.displayDate = this.formatDisplayValue(this.value);\n this.bqChange.emit({ value: this.value, el: this.el });\n }\n };\n\n private handleCalendarChange = (ev: Event) => {\n const { value } = ev.target as unknown as { value: string };\n\n this.value = value;\n this.displayDate = this.formatDisplayValue(this.value);\n this.inputElem.value = this.displayDate;\n this.inputElem.focus();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n\n this.open = this.type === 'multi';\n };\n\n private handleCalendarRangeStart = (ev: CustomEvent) => {\n this.hasRangeEnd = false;\n this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');\n };\n\n private handleCalendarRangeEnd = () => {\n this.hasRangeEnd = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n if (this.disabled) return;\n\n this.inputElem.value = '';\n this.value = this.inputElem.value;\n this.hasRangeEnd = false;\n\n this.bqClear.emit(this.el);\n this.bqChange.emit({ value: this.value, el: this.el });\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleLabelSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n };\n\n private handlePrefixSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem);\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private generateCalendarMonth = (offset?: number, className = ''): JSX.Element => {\n return (\n <calendar-month\n offset={offset}\n class={className}\n exportparts={`${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}`}\n />\n );\n };\n\n /**\n * Generates an array of JSX.Element representing calendar months.\n *\n * If the type of the date picker is 'range' or 'multi' and the number of months is specified,\n * it generates an array of calendar months with the specified length. Each month will have an offset\n * and a class name based on its position in the array. The offset is used to determine the month to display,\n * and the class name is used for responsive design.\n *\n * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,\n * it generates an array with a single calendar month.\n *\n * @returns {JSX.Element[]} An array of JSX.Element representing calendar months.\n */\n private generateCalendarMonths = (): JSX.Element[] => {\n if (this.type === 'range' || (this.type === 'multi' && this.months)) {\n return Array.from({ length: this.months }, (_, i) => {\n const offset = i > 0 ? i : undefined;\n const className = offset ? 'hidden sm:block' : '';\n return this.generateCalendarMonth(offset, className);\n });\n }\n\n return [this.generateCalendarMonth()];\n };\n\n /**\n * Extracts and returns the first date part from a given string.\n * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value\n * should be the focused date in the calendar.\n *\n * @param value - The value to be processed, can be a string.\n * @returns The extracted last date portion of the value.\n */\n private formatFocusedDate = (value: string): string | null => {\n if (!value) return;\n\n const dateRegex = /\\b\\d{4}-\\d{2}-\\d{2}\\b/;\n const match = dateRegex.exec(value);\n return match ? match[0] : null;\n };\n\n private formatDisplayValue = (value: string): string | undefined => {\n if (!value) return;\n\n const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);\n\n if (this.type === 'range') {\n const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));\n return dateFormatter.formatRange(start, end);\n }\n\n if (this.type === 'multi') {\n const dates = value.split(' ').map((dateStr) => new Date(dateStr));\n return dates.map((date) => dateFormatter.format(date)).join(', ');\n }\n\n return dateFormatter.format(new Date(value));\n };\n\n private get CalendarType() {\n const componentTypes = {\n single: 'calendar-date',\n multi: 'calendar-multi',\n range: 'calendar-range',\n } as const;\n\n // Return the corresponding component type, based on the type prop value\n return componentTypes[this.type] || componentTypes.single;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const CallyCalendar = this.CalendarType;\n const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-date-picker\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-date-picker__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleLabelSlotChange} />\n </label>\n {/* Select date picker dropdown */}\n <bq-dropdown\n class=\"bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto\"\n disabled={this.disabled}\n distance={this.distance}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-date-picker__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handlePrefixSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-date-picker__control--input\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`${this.name}`}\n aria-haspopup=\"dialog\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.type !== 'single'}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n required={this.required}\n spellcheck={false}\n type=\"text\"\n value={this.displayDate}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onChange={this.handleChange}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n >\n <slot name=\"clear-icon\">\n <bq-icon weight=\"bold\" name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class=\"bq-date-picker__control--suffix\"\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange}>\n <bq-icon name=\"calendar-blank\" weight=\"bold\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <CallyCalendar\n isDateDisallowed={this.isDateDisallowed}\n locale={this.locale as string}\n value={this.value}\n min={this.min}\n max={this.max}\n months={this.months}\n tentative={this.tentative}\n pageBy={this.monthsPerView}\n firstDayOfWeek={this.firstDayOfWeek}\n showOutsideDays={this.showOutsideDays}\n onChange={this.handleCalendarChange}\n onRangestart={this.handleCalendarRangeStart}\n onRangeend={this.handleCalendarRangeEnd}\n exportparts=\"container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading\"\n ref={(elem) => (this.callyElem = elem as InstanceType<typeof CalendarDate>)}\n >\n <bq-icon color=\"text--primary\" slot=\"previous\" name=\"caret-left\" label=\"Previous\" />\n <bq-icon color=\"text--primary\" slot=\"next\" name=\"caret-right\" label=\"Next\" />\n\n <div class=\"flex flex-wrap justify-center gap-[--bq-spacing-m]\">{this.generateCalendarMonths()}</div>\n </CallyCalendar>\n </bq-dropdown>\n </div>\n );\n }\n}\n"]}