@six-group/ui-library 4.2.1 → 4.2.3

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 (395) hide show
  1. package/dist/cjs/{form-control-73ff961d.js → form-control-de259450.js} +2 -2
  2. package/dist/cjs/{form-control-73ff961d.js.map → form-control-de259450.js.map} +1 -1
  3. package/dist/cjs/{index-b288f7d9.js → index-1f707a55.js} +455 -9
  4. package/dist/cjs/index-1f707a55.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/six-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/six-avatar.cjs.entry.js +2 -2
  8. package/dist/cjs/six-badge.cjs.entry.js +3 -3
  9. package/dist/cjs/six-button.cjs.entry.js +5 -4
  10. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  11. package/dist/cjs/six-card.cjs.entry.js +2 -2
  12. package/dist/cjs/six-checkbox_2.cjs.entry.js +7 -7
  13. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/six-datepicker.cjs.entry.js +13 -11
  15. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  16. package/dist/cjs/six-details.cjs.entry.js +4 -4
  17. package/dist/cjs/six-dialog.cjs.entry.js +3 -3
  18. package/dist/cjs/six-drawer.cjs.entry.js +3 -3
  19. package/dist/cjs/six-dropdown_2.cjs.entry.js +1 -1
  20. package/dist/cjs/six-error-page.cjs.entry.js +2 -2
  21. package/dist/cjs/six-error.cjs.entry.js +2 -2
  22. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  23. package/dist/cjs/six-file-list.cjs.entry.js +2 -2
  24. package/dist/cjs/six-file-upload.cjs.entry.js +29 -6
  25. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  26. package/dist/cjs/six-footer.cjs.entry.js +2 -2
  27. package/dist/cjs/six-group-label.cjs.entry.js +3 -3
  28. package/dist/cjs/six-header.cjs.entry.js +22 -15
  29. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  30. package/dist/cjs/six-icon-button.cjs.entry.js +4 -4
  31. package/dist/cjs/six-icon.cjs.entry.js +3 -3
  32. package/dist/cjs/six-input.cjs.entry.js +5 -5
  33. package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
  34. package/dist/cjs/six-language-switcher.cjs.entry.js +8 -4
  35. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  36. package/dist/cjs/six-layout-grid.cjs.entry.js +2 -2
  37. package/dist/cjs/six-main-container.cjs.entry.js +2 -2
  38. package/dist/cjs/six-menu-divider.cjs.entry.js +2 -2
  39. package/dist/cjs/six-menu-label.cjs.entry.js +2 -2
  40. package/dist/cjs/six-picto.cjs.entry.js +2 -2
  41. package/dist/cjs/six-progress-bar.cjs.entry.js +3 -3
  42. package/dist/cjs/six-progress-ring.cjs.entry.js +2 -2
  43. package/dist/cjs/six-radio.cjs.entry.js +3 -3
  44. package/dist/cjs/six-range.cjs.entry.js +4 -4
  45. package/dist/cjs/six-root.cjs.entry.js +2 -2
  46. package/dist/cjs/six-search-field.cjs.entry.js +2 -2
  47. package/dist/cjs/six-select.cjs.entry.js +57 -31
  48. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +2 -2
  50. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-sidebar-item.cjs.entry.js +3 -3
  52. package/dist/cjs/six-sidebar.cjs.entry.js +3 -3
  53. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  54. package/dist/cjs/six-stage-indicator.cjs.entry.js +1 -1
  55. package/dist/cjs/six-switch.cjs.entry.js +4 -4
  56. package/dist/cjs/six-tab-group.cjs.entry.js +3 -3
  57. package/dist/cjs/six-tab-panel.cjs.entry.js +2 -2
  58. package/dist/cjs/six-tab.cjs.entry.js +3 -3
  59. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  60. package/dist/cjs/six-tag.cjs.entry.js +3 -3
  61. package/dist/cjs/six-textarea.cjs.entry.js +4 -4
  62. package/dist/cjs/six-tile.cjs.entry.js +4 -4
  63. package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
  64. package/dist/cjs/six-tooltip.cjs.entry.js +3 -3
  65. package/dist/cjs/ui-library.cjs.js +2 -2
  66. package/dist/collection/assets/TRADEMARKS.md +3 -3
  67. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  68. package/dist/collection/components/six-badge/six-badge.js +2 -2
  69. package/dist/collection/components/six-button/six-button.css +17 -0
  70. package/dist/collection/components/six-button/six-button.js +5 -4
  71. package/dist/collection/components/six-button/six-button.js.map +1 -1
  72. package/dist/collection/components/six-card/six-card.js +1 -1
  73. package/dist/collection/components/six-checkbox/six-checkbox.css +2 -0
  74. package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
  75. package/dist/collection/components/six-datepicker/six-datepicker.js +12 -10
  76. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  77. package/dist/collection/components/six-details/six-details.js +3 -3
  78. package/dist/collection/components/six-dialog/six-dialog.js +2 -2
  79. package/dist/collection/components/six-drawer/six-drawer.js +2 -2
  80. package/dist/collection/components/six-error/six-error.js +1 -1
  81. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  82. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  83. package/dist/collection/components/six-file-upload/six-file-upload.css +3 -0
  84. package/dist/collection/components/six-file-upload/six-file-upload.js +66 -5
  85. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  86. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +114 -6
  87. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
  88. package/dist/collection/components/six-footer/six-footer.js +1 -1
  89. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  90. package/dist/collection/components/six-header/six-header.css +9 -0
  91. package/dist/collection/components/six-header/six-header.js +38 -13
  92. package/dist/collection/components/six-header/six-header.js.map +1 -1
  93. package/dist/collection/components/six-icon/six-icon.js +2 -2
  94. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  95. package/dist/collection/components/six-input/six-input.js +3 -3
  96. package/dist/collection/components/six-language-switcher/six-language-switcher.css +4 -0
  97. package/dist/collection/components/six-language-switcher/six-language-switcher.js +6 -2
  98. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  99. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +12 -12
  100. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -1
  101. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  102. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  103. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  104. package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
  105. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  106. package/dist/collection/components/six-picto/six-picto.js +1 -1
  107. package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
  108. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  109. package/dist/collection/components/six-radio/six-radio.js +2 -2
  110. package/dist/collection/components/six-range/six-range.js +2 -2
  111. package/dist/collection/components/six-root/six-root.js +1 -1
  112. package/dist/collection/components/six-search-field/six-search-field.js +1 -1
  113. package/dist/collection/components/six-select/six-select.js +22 -29
  114. package/dist/collection/components/six-select/six-select.js.map +1 -1
  115. package/dist/collection/components/six-select/test/util.spec.js +23 -1
  116. package/dist/collection/components/six-select/test/util.spec.js.map +1 -1
  117. package/dist/collection/components/six-select/util.js +24 -0
  118. package/dist/collection/components/six-select/util.js.map +1 -1
  119. package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
  120. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  121. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +1 -0
  122. package/dist/collection/components/six-switch/six-switch.js +2 -2
  123. package/dist/collection/components/six-tab/six-tab.js +2 -2
  124. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  125. package/dist/collection/components/six-tab-group/six-tab-group.js +2 -2
  126. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  127. package/dist/collection/components/six-tag/six-tag.js +2 -2
  128. package/dist/collection/components/six-textarea/six-textarea.js +2 -2
  129. package/dist/collection/components/six-tile/six-tile.js +3 -3
  130. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  131. package/dist/components/six-avatar.js +1 -1
  132. package/dist/components/six-badge.js +2 -2
  133. package/dist/components/six-button2.js +4 -3
  134. package/dist/components/six-button2.js.map +1 -1
  135. package/dist/components/six-card.js +1 -1
  136. package/dist/components/six-checkbox2.js +3 -3
  137. package/dist/components/six-checkbox2.js.map +1 -1
  138. package/dist/components/six-datepicker.js +12 -10
  139. package/dist/components/six-datepicker.js.map +1 -1
  140. package/dist/components/six-details2.js +3 -3
  141. package/dist/components/six-dialog.js +2 -2
  142. package/dist/components/six-drawer.js +2 -2
  143. package/dist/components/six-error-page.js +1 -1
  144. package/dist/components/six-error2.js +1 -1
  145. package/dist/components/six-file-list.js +1 -1
  146. package/dist/components/six-file-upload.js +40 -8
  147. package/dist/components/six-file-upload.js.map +1 -1
  148. package/dist/components/six-footer.js +1 -1
  149. package/dist/components/six-group-label.js +1 -1
  150. package/dist/components/six-header.js +22 -14
  151. package/dist/components/six-header.js.map +1 -1
  152. package/dist/components/six-icon-button2.js +3 -3
  153. package/dist/components/six-icon2.js +2 -2
  154. package/dist/components/six-input2.js +3 -3
  155. package/dist/components/six-language-switcher.js +7 -3
  156. package/dist/components/six-language-switcher.js.map +1 -1
  157. package/dist/components/six-layout-grid.js +1 -1
  158. package/dist/components/six-main-container.js +1 -1
  159. package/dist/components/six-menu-divider.js +1 -1
  160. package/dist/components/six-menu-item2.js +2 -2
  161. package/dist/components/six-menu-label.js +1 -1
  162. package/dist/components/six-picto2.js +1 -1
  163. package/dist/components/six-progress-bar.js +2 -2
  164. package/dist/components/six-progress-ring.js +1 -1
  165. package/dist/components/six-radio.js +2 -2
  166. package/dist/components/six-range.js +2 -2
  167. package/dist/components/six-root.js +1 -1
  168. package/dist/components/six-search-field.js +1 -1
  169. package/dist/components/six-select.js +55 -29
  170. package/dist/components/six-select.js.map +1 -1
  171. package/dist/components/six-sidebar-item-group.js +1 -1
  172. package/dist/components/six-sidebar-item-group.js.map +1 -1
  173. package/dist/components/six-sidebar-item.js +2 -2
  174. package/dist/components/six-sidebar.js +2 -2
  175. package/dist/components/six-switch.js +2 -2
  176. package/dist/components/six-tab-group.js +2 -2
  177. package/dist/components/six-tab-panel.js +1 -1
  178. package/dist/components/six-tab.js +2 -2
  179. package/dist/components/six-tab.js.map +1 -1
  180. package/dist/components/six-tag.js +2 -2
  181. package/dist/components/six-textarea.js +2 -2
  182. package/dist/components/six-tile.js +3 -3
  183. package/dist/components/six-tooltip2.js +2 -2
  184. package/dist/components.json +108 -10
  185. package/dist/esm/{form-control-40c37714.js → form-control-30c5bd8b.js} +2 -2
  186. package/dist/esm/{form-control-40c37714.js.map → form-control-30c5bd8b.js.map} +1 -1
  187. package/dist/esm/{index-52a755dc.js → index-5390c1d6.js} +455 -9
  188. package/dist/esm/index-5390c1d6.js.map +1 -0
  189. package/dist/esm/loader.js +3 -3
  190. package/dist/esm/six-alert.entry.js +1 -1
  191. package/dist/esm/six-avatar.entry.js +2 -2
  192. package/dist/esm/six-badge.entry.js +3 -3
  193. package/dist/esm/six-button.entry.js +5 -4
  194. package/dist/esm/six-button.entry.js.map +1 -1
  195. package/dist/esm/six-card.entry.js +2 -2
  196. package/dist/esm/six-checkbox_2.entry.js +7 -7
  197. package/dist/esm/six-checkbox_2.entry.js.map +1 -1
  198. package/dist/esm/six-datepicker.entry.js +13 -11
  199. package/dist/esm/six-datepicker.entry.js.map +1 -1
  200. package/dist/esm/six-details.entry.js +4 -4
  201. package/dist/esm/six-dialog.entry.js +3 -3
  202. package/dist/esm/six-drawer.entry.js +3 -3
  203. package/dist/esm/six-dropdown_2.entry.js +1 -1
  204. package/dist/esm/six-error-page.entry.js +2 -2
  205. package/dist/esm/six-error.entry.js +2 -2
  206. package/dist/esm/six-file-list-item.entry.js +1 -1
  207. package/dist/esm/six-file-list.entry.js +2 -2
  208. package/dist/esm/six-file-upload.entry.js +29 -6
  209. package/dist/esm/six-file-upload.entry.js.map +1 -1
  210. package/dist/esm/six-footer.entry.js +2 -2
  211. package/dist/esm/six-group-label.entry.js +3 -3
  212. package/dist/esm/six-header.entry.js +22 -15
  213. package/dist/esm/six-header.entry.js.map +1 -1
  214. package/dist/esm/six-icon-button.entry.js +4 -4
  215. package/dist/esm/six-icon.entry.js +3 -3
  216. package/dist/esm/six-input.entry.js +5 -5
  217. package/dist/esm/six-item-picker.entry.js +1 -1
  218. package/dist/esm/six-language-switcher.entry.js +8 -4
  219. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  220. package/dist/esm/six-layout-grid.entry.js +2 -2
  221. package/dist/esm/six-main-container.entry.js +2 -2
  222. package/dist/esm/six-menu-divider.entry.js +2 -2
  223. package/dist/esm/six-menu-label.entry.js +2 -2
  224. package/dist/esm/six-picto.entry.js +2 -2
  225. package/dist/esm/six-progress-bar.entry.js +3 -3
  226. package/dist/esm/six-progress-ring.entry.js +2 -2
  227. package/dist/esm/six-radio.entry.js +3 -3
  228. package/dist/esm/six-range.entry.js +4 -4
  229. package/dist/esm/six-root.entry.js +2 -2
  230. package/dist/esm/six-search-field.entry.js +2 -2
  231. package/dist/esm/six-select.entry.js +57 -31
  232. package/dist/esm/six-select.entry.js.map +1 -1
  233. package/dist/esm/six-sidebar-item-group.entry.js +2 -2
  234. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  235. package/dist/esm/six-sidebar-item.entry.js +3 -3
  236. package/dist/esm/six-sidebar.entry.js +3 -3
  237. package/dist/esm/six-spinner.entry.js +1 -1
  238. package/dist/esm/six-stage-indicator.entry.js +1 -1
  239. package/dist/esm/six-switch.entry.js +4 -4
  240. package/dist/esm/six-tab-group.entry.js +3 -3
  241. package/dist/esm/six-tab-panel.entry.js +2 -2
  242. package/dist/esm/six-tab.entry.js +3 -3
  243. package/dist/esm/six-tab.entry.js.map +1 -1
  244. package/dist/esm/six-tag.entry.js +3 -3
  245. package/dist/esm/six-textarea.entry.js +4 -4
  246. package/dist/esm/six-tile.entry.js +4 -4
  247. package/dist/esm/six-timepicker.entry.js +1 -1
  248. package/dist/esm/six-tooltip.entry.js +3 -3
  249. package/dist/esm/ui-library.js +3 -3
  250. package/dist/types/components/six-button/six-button.d.ts +1 -1
  251. package/dist/types/components/six-file-upload/six-file-upload.d.ts +8 -0
  252. package/dist/types/components/six-header/six-header.d.ts +3 -1
  253. package/dist/types/components/six-select/six-select.d.ts +0 -1
  254. package/dist/types/components/six-select/util.d.ts +2 -0
  255. package/dist/types/components.d.ts +40 -2
  256. package/dist/ui-library/assets/TRADEMARKS.md +3 -3
  257. package/dist/ui-library/p-030fa1fa.entry.js +2 -0
  258. package/dist/ui-library/{p-29b75db4.entry.js → p-03d1b956.entry.js} +2 -2
  259. package/dist/ui-library/{p-45960b56.entry.js → p-047d02ad.entry.js} +2 -2
  260. package/dist/ui-library/p-05eb1bab.js +3 -0
  261. package/dist/ui-library/p-05eb1bab.js.map +1 -0
  262. package/dist/ui-library/{p-50dbe99f.entry.js → p-060069d4.entry.js} +2 -2
  263. package/dist/ui-library/{p-3827f9e0.entry.js → p-06ba653e.entry.js} +2 -2
  264. package/dist/ui-library/{p-3e9324c8.entry.js → p-07c8de65.entry.js} +2 -2
  265. package/dist/ui-library/p-0fb3fb30.entry.js +2 -0
  266. package/dist/ui-library/{p-8dff4dcb.entry.js.map → p-0fb3fb30.entry.js.map} +1 -1
  267. package/dist/ui-library/p-14e5fccc.entry.js +2 -0
  268. package/dist/ui-library/p-14e5fccc.entry.js.map +1 -0
  269. package/dist/ui-library/p-189602e4.entry.js +2 -0
  270. package/dist/ui-library/{p-a2a6aaea.entry.js → p-19560508.entry.js} +2 -2
  271. package/dist/ui-library/p-21074819.entry.js +2 -0
  272. package/dist/ui-library/p-21074819.entry.js.map +1 -0
  273. package/dist/ui-library/{p-8938e9bd.entry.js → p-2386627e.entry.js} +2 -2
  274. package/dist/ui-library/p-2c25cb61.entry.js +2 -0
  275. package/dist/ui-library/p-2c25cb61.entry.js.map +1 -0
  276. package/dist/ui-library/{p-756f4acf.entry.js → p-32e421a3.entry.js} +2 -2
  277. package/dist/ui-library/p-32e421a3.entry.js.map +1 -0
  278. package/dist/ui-library/p-3603dd96.entry.js +2 -0
  279. package/dist/ui-library/{p-52c04973.entry.js → p-39ff5f61.entry.js} +2 -2
  280. package/dist/ui-library/{p-5f810571.entry.js → p-3b5a76ea.entry.js} +2 -2
  281. package/dist/ui-library/{p-724d0458.entry.js → p-419ed003.entry.js} +2 -2
  282. package/dist/ui-library/{p-21002de1.entry.js → p-45003bae.entry.js} +2 -2
  283. package/dist/ui-library/{p-93ab2efc.entry.js → p-4963f03c.entry.js} +2 -2
  284. package/dist/ui-library/{p-03900e17.entry.js → p-4d89932f.entry.js} +2 -2
  285. package/dist/ui-library/{p-aa99a393.js → p-605bdd81.js} +2 -2
  286. package/dist/ui-library/p-63acceb6.entry.js +2 -0
  287. package/dist/ui-library/{p-80476b0f.entry.js.map → p-63acceb6.entry.js.map} +1 -1
  288. package/dist/ui-library/{p-c948cf70.entry.js → p-6888b9ee.entry.js} +2 -2
  289. package/dist/ui-library/{p-8644f970.entry.js → p-6f9153be.entry.js} +2 -2
  290. package/dist/ui-library/{p-e798314b.entry.js → p-7561b336.entry.js} +2 -2
  291. package/dist/ui-library/p-7c18b8ca.entry.js +2 -0
  292. package/dist/ui-library/p-82bd8781.entry.js +2 -0
  293. package/dist/ui-library/p-82bd8781.entry.js.map +1 -0
  294. package/dist/ui-library/p-89db9a8b.entry.js +2 -0
  295. package/dist/ui-library/{p-7a9dcb16.entry.js → p-8f1d3461.entry.js} +2 -2
  296. package/dist/ui-library/p-8fb96142.entry.js +2 -0
  297. package/dist/ui-library/p-8fb96142.entry.js.map +1 -0
  298. package/dist/ui-library/p-96d441e9.entry.js +2 -0
  299. package/dist/ui-library/p-96d441e9.entry.js.map +1 -0
  300. package/dist/ui-library/{p-8f307b55.entry.js → p-9bc1639b.entry.js} +2 -2
  301. package/dist/ui-library/p-9cb83369.entry.js +2 -0
  302. package/dist/ui-library/{p-d717a2f2.entry.js → p-a398e3eb.entry.js} +2 -2
  303. package/dist/ui-library/{p-19a1d34c.entry.js → p-a7e2f511.entry.js} +2 -2
  304. package/dist/ui-library/{p-7fc0bf6b.entry.js → p-a8863197.entry.js} +2 -2
  305. package/dist/ui-library/{p-9426a37b.entry.js → p-a9e009af.entry.js} +2 -2
  306. package/dist/ui-library/{p-01853739.entry.js → p-ac00076d.entry.js} +2 -2
  307. package/dist/ui-library/{p-803915da.entry.js → p-b4bc4915.entry.js} +2 -2
  308. package/dist/ui-library/{p-7562d5f5.entry.js → p-b5acf54d.entry.js} +2 -2
  309. package/dist/ui-library/{p-acc487ec.entry.js → p-b60c20aa.entry.js} +2 -2
  310. package/dist/ui-library/p-c1d68730.entry.js +2 -0
  311. package/dist/ui-library/p-c1d68730.entry.js.map +1 -0
  312. package/dist/ui-library/{p-d55db23a.entry.js → p-c35a7cef.entry.js} +2 -2
  313. package/dist/ui-library/{p-e43e5e45.entry.js → p-c62893e5.entry.js} +2 -2
  314. package/dist/ui-library/{p-f8572492.entry.js → p-c6464bfe.entry.js} +2 -2
  315. package/dist/ui-library/{p-f8572492.entry.js.map → p-c6464bfe.entry.js.map} +1 -1
  316. package/dist/ui-library/{p-49e5d8bb.entry.js → p-cf109cbf.entry.js} +2 -2
  317. package/dist/ui-library/{p-6c96b62e.entry.js → p-d07b549f.entry.js} +2 -2
  318. package/dist/ui-library/{p-7a722a13.entry.js → p-d42f1ea9.entry.js} +2 -2
  319. package/dist/ui-library/p-fe37dadf.entry.js +2 -0
  320. package/dist/ui-library/{p-38a9a590.entry.js → p-fe89a7c4.entry.js} +2 -2
  321. package/dist/ui-library/ui-library.esm.js +1 -1
  322. package/dist/ui-library/ui-library.esm.js.map +1 -1
  323. package/package.json +2 -2
  324. package/dist/cjs/index-b288f7d9.js.map +0 -1
  325. package/dist/collection/components/six-header/assets/six-logo.svg +0 -1
  326. package/dist/collection/components/six-header/test/six-header.spec.js +0 -177
  327. package/dist/collection/components/six-header/test/six-header.spec.js.map +0 -1
  328. package/dist/esm/index-52a755dc.js.map +0 -1
  329. package/dist/ui-library/assets/six-logo.svg +0 -1
  330. package/dist/ui-library/p-0a094514.entry.js +0 -2
  331. package/dist/ui-library/p-0cca70c0.entry.js +0 -2
  332. package/dist/ui-library/p-0cca70c0.entry.js.map +0 -1
  333. package/dist/ui-library/p-19ca3bd1.entry.js +0 -2
  334. package/dist/ui-library/p-19ca3bd1.entry.js.map +0 -1
  335. package/dist/ui-library/p-1f1224ae.entry.js +0 -2
  336. package/dist/ui-library/p-338205f4.entry.js +0 -2
  337. package/dist/ui-library/p-338205f4.entry.js.map +0 -1
  338. package/dist/ui-library/p-3eed2287.entry.js +0 -2
  339. package/dist/ui-library/p-4af73ea9.entry.js +0 -2
  340. package/dist/ui-library/p-4af73ea9.entry.js.map +0 -1
  341. package/dist/ui-library/p-756f4acf.entry.js.map +0 -1
  342. package/dist/ui-library/p-775e6891.entry.js +0 -2
  343. package/dist/ui-library/p-775e6891.entry.js.map +0 -1
  344. package/dist/ui-library/p-80476b0f.entry.js +0 -2
  345. package/dist/ui-library/p-8dff4dcb.entry.js +0 -2
  346. package/dist/ui-library/p-a2b8aca7.entry.js +0 -2
  347. package/dist/ui-library/p-ba7424b3.entry.js +0 -2
  348. package/dist/ui-library/p-be0c0ec9.entry.js +0 -2
  349. package/dist/ui-library/p-be0c0ec9.entry.js.map +0 -1
  350. package/dist/ui-library/p-d7739200.entry.js +0 -2
  351. package/dist/ui-library/p-e3766acb.entry.js +0 -2
  352. package/dist/ui-library/p-f1bb5648.entry.js +0 -2
  353. package/dist/ui-library/p-f1bb5648.entry.js.map +0 -1
  354. package/dist/ui-library/p-f93d8a4e.js +0 -3
  355. package/dist/ui-library/p-f93d8a4e.js.map +0 -1
  356. /package/dist/ui-library/{p-3eed2287.entry.js.map → p-030fa1fa.entry.js.map} +0 -0
  357. /package/dist/ui-library/{p-29b75db4.entry.js.map → p-03d1b956.entry.js.map} +0 -0
  358. /package/dist/ui-library/{p-45960b56.entry.js.map → p-047d02ad.entry.js.map} +0 -0
  359. /package/dist/ui-library/{p-50dbe99f.entry.js.map → p-060069d4.entry.js.map} +0 -0
  360. /package/dist/ui-library/{p-3827f9e0.entry.js.map → p-06ba653e.entry.js.map} +0 -0
  361. /package/dist/ui-library/{p-3e9324c8.entry.js.map → p-07c8de65.entry.js.map} +0 -0
  362. /package/dist/ui-library/{p-d7739200.entry.js.map → p-189602e4.entry.js.map} +0 -0
  363. /package/dist/ui-library/{p-a2a6aaea.entry.js.map → p-19560508.entry.js.map} +0 -0
  364. /package/dist/ui-library/{p-8938e9bd.entry.js.map → p-2386627e.entry.js.map} +0 -0
  365. /package/dist/ui-library/{p-a2b8aca7.entry.js.map → p-3603dd96.entry.js.map} +0 -0
  366. /package/dist/ui-library/{p-52c04973.entry.js.map → p-39ff5f61.entry.js.map} +0 -0
  367. /package/dist/ui-library/{p-5f810571.entry.js.map → p-3b5a76ea.entry.js.map} +0 -0
  368. /package/dist/ui-library/{p-724d0458.entry.js.map → p-419ed003.entry.js.map} +0 -0
  369. /package/dist/ui-library/{p-21002de1.entry.js.map → p-45003bae.entry.js.map} +0 -0
  370. /package/dist/ui-library/{p-93ab2efc.entry.js.map → p-4963f03c.entry.js.map} +0 -0
  371. /package/dist/ui-library/{p-03900e17.entry.js.map → p-4d89932f.entry.js.map} +0 -0
  372. /package/dist/ui-library/{p-aa99a393.js.map → p-605bdd81.js.map} +0 -0
  373. /package/dist/ui-library/{p-c948cf70.entry.js.map → p-6888b9ee.entry.js.map} +0 -0
  374. /package/dist/ui-library/{p-8644f970.entry.js.map → p-6f9153be.entry.js.map} +0 -0
  375. /package/dist/ui-library/{p-e798314b.entry.js.map → p-7561b336.entry.js.map} +0 -0
  376. /package/dist/ui-library/{p-e3766acb.entry.js.map → p-7c18b8ca.entry.js.map} +0 -0
  377. /package/dist/ui-library/{p-ba7424b3.entry.js.map → p-89db9a8b.entry.js.map} +0 -0
  378. /package/dist/ui-library/{p-7a9dcb16.entry.js.map → p-8f1d3461.entry.js.map} +0 -0
  379. /package/dist/ui-library/{p-8f307b55.entry.js.map → p-9bc1639b.entry.js.map} +0 -0
  380. /package/dist/ui-library/{p-0a094514.entry.js.map → p-9cb83369.entry.js.map} +0 -0
  381. /package/dist/ui-library/{p-d717a2f2.entry.js.map → p-a398e3eb.entry.js.map} +0 -0
  382. /package/dist/ui-library/{p-19a1d34c.entry.js.map → p-a7e2f511.entry.js.map} +0 -0
  383. /package/dist/ui-library/{p-7fc0bf6b.entry.js.map → p-a8863197.entry.js.map} +0 -0
  384. /package/dist/ui-library/{p-9426a37b.entry.js.map → p-a9e009af.entry.js.map} +0 -0
  385. /package/dist/ui-library/{p-01853739.entry.js.map → p-ac00076d.entry.js.map} +0 -0
  386. /package/dist/ui-library/{p-803915da.entry.js.map → p-b4bc4915.entry.js.map} +0 -0
  387. /package/dist/ui-library/{p-7562d5f5.entry.js.map → p-b5acf54d.entry.js.map} +0 -0
  388. /package/dist/ui-library/{p-acc487ec.entry.js.map → p-b60c20aa.entry.js.map} +0 -0
  389. /package/dist/ui-library/{p-d55db23a.entry.js.map → p-c35a7cef.entry.js.map} +0 -0
  390. /package/dist/ui-library/{p-e43e5e45.entry.js.map → p-c62893e5.entry.js.map} +0 -0
  391. /package/dist/ui-library/{p-49e5d8bb.entry.js.map → p-cf109cbf.entry.js.map} +0 -0
  392. /package/dist/ui-library/{p-6c96b62e.entry.js.map → p-d07b549f.entry.js.map} +0 -0
  393. /package/dist/ui-library/{p-7a722a13.entry.js.map → p-d42f1ea9.entry.js.map} +0 -0
  394. /package/dist/ui-library/{p-1f1224ae.entry.js.map → p-fe37dadf.entry.js.map} +0 -0
  395. /package/dist/ui-library/{p-38a9a590.entry.js.map → p-fe89a7c4.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{h as t,r as e,c as i,g as s}from"./p-f93d8a4e.js";import{E as r}from"./p-8bfb4bfc.js";import{D as o,d as n,a}from"./p-a1502802.js";import{h}from"./p-0cebf1d2.js";import{m as l,c as d,a as c,b as u}from"./p-f136a6b2.js";const p=t=>typeof t==="string";const m=t=>t==null;const b={en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsShortGrouped:[["Jan","Feb","Mar","Apr"],["May","Jun","Jul","Aug"],["Sep","Oct","Nov","Dec"]],weekdays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysMin:["Mo","Tu","We","Th","Fr","Sa","Su"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],monthsShortGrouped:[["Jan.","Feb.","März","Apr."],["Mai","Juni","Juli","Aug."],["Sep.","Okt.","Nov.","Dez."]],weekdays:["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],weekdaysShort:["Mo.","Di.","Mi.","Do.","Fr.","Sa.","So."],weekdaysMin:["Mo","Di","Mi","Do","Fr","Sa","So"]},fr:{months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthsShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],monthsShortGrouped:[["janv.","févr.","mars","avr."],["mai","juin","juil.","août"],["sept.","oct.","nov.","déc."]],weekdays:["lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],weekdaysShort:["lun.","mar.","mer.","jeu.","ven.","sam.","dim."],weekdaysMin:["lu","ma","me","je","ve","sa","di"]},it:{months:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],monthsShort:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],monthsShortGrouped:[["gen","feb","mar","apr"],["mag","giu","lug","ago"],["set","ott","nov","dic"]],weekdays:["lunedì","martedì","mercoledì","giovedì","venerdì","sabato","domenica"],weekdaysShort:["lun","mar","mer","gio","ven","sab","dom"],weekdaysMin:["lu","ma","me","gi","ve","sa","do"]},es:{months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthsShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],monthsShortGrouped:[["ene","feb","mar","abr"],["may","jun","jul","ago"],["sep","oct","nov","dic"]],weekdays:["lunes","martes","miércoles","jueves","viernes","sábado","domingo"],weekdaysShort:["lun","mar","mié","jue","vie","sáb","dom"],weekdaysMin:["lu","ma","mi","ju","vi","sa","do"]}};const y=()=>new Date;const f=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate());const v=t=>t instanceof Date&&!isNaN(t.getTime())&&new Date(t).toString()!=="Invalid Date";const k=t=>{if(t&&v(t)){return t.getFullYear()}throw new Error("Not a valid date")};const g=t=>{if(t&&v(t)){return t.getMonth()}throw new Error("Not a valid date")};const w=t=>{if(t&&v(t)){return t.getDate()}throw new Error("Not a valid date")};const x=t=>{if(t&&v(t)){return t.getHours()}throw new Error("Not a valid date")};const _=t=>{if(t&&v(t)){return t.getMinutes()}throw new Error("Not a valid date")};const M=t=>{if(t&&v(t)){return t.getSeconds()}throw new Error("Not a valid date")};const D=t=>{const e=[6,0,1,2,3,4,5];const i=new Date(t);i.setDate(i.getDate()-e[i.getDay()]);return i};const j=(t,e)=>(t===null||t===void 0?void 0:t.getFullYear())===(e===null||e===void 0?void 0:e.getFullYear());const S=(t,e)=>j(t,e)&&(t===null||t===void 0?void 0:t.getMonth())===(e===null||e===void 0?void 0:e.getMonth());const C=(t,e)=>S(t,e)&&(t===null||t===void 0?void 0:t.getDate())===(e===null||e===void 0?void 0:e.getDate());const O=(t,e)=>C(D(t),D(e));const z=(t,e)=>{if(!p(t)||!p(e)){return false}if(t.length<6||e.length<6){return false}const{day:i,month:s}=U(t,e);if(i>31||s>11||i<=0||s<0){return false}const r=X(t,e);if(m(r)){return false}return r.toString()!=="Invalid Date"};const F=(t,e,i)=>{if(!t){return true}if(e&&t<e){return false}if(i&&i<t){return false}return true};const J=(t,e,i,s=2)=>{const r=s-1;const o=e.charAt(t+r)===i;const n=t+r<e.length;return n&&o};const N=(t,e)=>{let i=String(t);while(i.length<e){i="0"+i}return i};const A=(t,e)=>{if(t==null){return""}let i="";for(let s=0;s<e.length;s++){switch(e.charAt(s)){case"d":if(J(s,e,"d")){i+=N(t.getDate(),2);s++}else{i+=String(t.getDate())}break;case"m":if(J(s,e,"m")){i+=N(t.getMonth()+1,2);s++}else{i+=String(t.getMonth()+1)}break;case"y":if(J(s,e,"y",4)){s+=3;i+=t.getFullYear()}else{i+=(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;s++}break;case"h":if(J(s,e,"h")){i+=N(t.getHours(),2);s++}else{i+=String(t.getHours())}break;case"M":if(J(s,e,"M")){i+=N(t.getMinutes(),2);s++}else{i+=String(t.getMinutes())}break;case"s":if(J(s,e,"s")){i+=N(t.getSeconds(),2);s++}else{i+=String(t.getSeconds())}break;default:i+=e.charAt(s)}}return i};const E=/(\[[^\[]*\])|(mm|dd|yyyy|yy|hh|MM|ss|.)/g;const T=/\d\d/;const G=/\d{4}/;const P=/[^0-9]/g;const B="year";const I="month";const L="day";const Y="hour";const H="minute";const W="second";const q={};const R=(t,e,i)=>{const s=Array.isArray(t)?t:[t];let r;if(typeof i==="string"){r=t=>{const e=parseInt(t,10);return{[i]:e}}}else{r=i}s.forEach((t=>{q[t]=[e,r]}))};R("yy",T,(t=>{const e=(new Date).getFullYear();const i=Math.floor(e/100);let s=parseInt(t,10);s=(s>68?i-1:i)*100+s;return{[B]:s}}));R("yyyy",G,B);R("mm",T,(t=>({[I]:parseInt(t,10)-1})));R("dd",T,L);R("hh",T,Y);R("MM",T,H);R("ss",T,W);const V=(t,e=new Date)=>{const i=[0,0,1,0,0,0];const s=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()];let r=true;for(let e=0;e<7;e++){if(t[e]===undefined){i[e]=r?s[e]:i[e]}else{i[e]=t[e];r=false}}return i};const $=(t,e,i,s,r,o)=>{if(!(t<100&&t>=0)){return new Date(t,e,i,s,r,o)}const n=new Date(t+400,e,i,s,r,o);if(isFinite(n.getFullYear())){n.setFullYear(t)}return n};const K=(t,e)=>{const i=e.match(E);if(!i){throw new Error}const{length:s}=i;let r={};for(let e=0;e<s;e+=1){const s=i[e];const o=q[s];if(!o){const e=s.replace(/^\[|\]$/g,"");if(t.indexOf(e)===0){t=t.substr(e.length)}else{throw new Error("not match")}}else{const e=o[0];const i=o[1];const s=(e.exec(t)||[])[0];const n=i(s);r=Object.assign(Object.assign({},r),n);t=t.replace(s,"")}}return r};const Q=(t,e)=>{if(t.length===e.length){return t}const i=t.match(P)[0];return t.split(i).map((t=>t.length===1?"0"+t:t)).join(i)};const U=(t,e)=>{const i=Q(t,e);return K(i,e)};const X=(t,e)=>{try{const{backupDate:i=new Date}={};const{year:s,month:r,day:o,hour:n,minute:a,second:h,date:l}=U(t,e);if(l!=null){return l}const d=[s,r,o,n,a,h];const c=V(d,i);return $(...c)}catch(t){return new Date(NaN)}};const Z=t=>{const{firstDateOfBox:e,allowedDates:i,dateFormat:s,selectedDate:r,minDate:o,maxDate:n,pointerDate:a}=t;const h=new Date(e);const l=new Date(e);let d=[];do{let t=[];do{t=[...t,{date:new Date(l),display:A(l,s),dateString:A(l,s),label:w(l).toString(),isToday:C(l,y()),isSelected:r&&C(l,r),isDisabled:!i(l)||!F(l,o,n),isOutdated:a.month!==l.getMonth()||!F(l,o,n)}];l.setDate(l.getDate()+1)}while(O(l,h));d=[...d,t];h.setDate(h.getDate()+7)}while(S(new Date(a.year,a.month,a.day),l));return d};function tt(t,e){const i=5;return[...Array(e).keys()].map((i=>i+t-Math.floor(e/2))).reduce(((t,e,s)=>{if(s%i===0){t.push([])}t[t.length-1].push(e);return t}),[])}var et;(function(t){t["DDMMYYY_DOT"]="dd.mm.yyyy";t["YYYYMMDD_DASH"]="yyyy-mm-dd";t["DDMMYYYY_DASH"]="dd-mm-yyyy";t["DDMMYYYY_SLASH"]="dd/mm/yyyy";t["YYYYMMDD_SLASH"]="yyyy/mm/dd";t["DDMMYY_DOT"]="dd.mm.yy";t["YYMMDD_DASH"]="yy-mm-dd";t["DDMMYY_DASH"]="dd-mm-yy";t["DDMMYY_SLASH"]="dd/mm/yy";t["YYMMDD_SLASH"]="yy/mm/dd";t["DDMMYYY_DOT_TIME"]="dd.mm.yyyy hh:MM:ss";t["YYYYMMDD_DASH_TIME"]="yyyy-mm-dd hh:MM:ss";t["DDMMYYYY_DASH_TIME"]="dd-mm-yyyy hh:MM:ss";t["DDMMYYYY_SLASH_TIME"]="dd/mm/yyyy hh:MM:ss";t["YYYYMMDD_SLASH_TIME"]="yyyy/mm/dd hh:MM:ss";t["DDMMYY_DOT_TIME"]="dd.mm.yy hh:MM:ss";t["YYMMDD_DASH_TIME"]="yy-mm-dd hh:MM:ss";t["DDMMYY_DASH_TIME"]="dd-mm-yy hh:MM:ss";t["DDMMYY_SLASH_TIME"]="dd/mm/yy hh:MM:ss";t["YYMMDD_SLASH_TIME"]="yy/mm/dd hh:MM:ss"})(et||(et={}));const it=e=>{const i=e.locale;const s=t=>i.monthsShort[y().getMonth()]===t;const r=t=>{var s;return((s=e.selectedDate)===null||s===void 0?void 0:s.getMonth())===i.monthsShort.findIndex((e=>e===t))};return t("table",{class:"datepicker-table",part:"month-selection"},t("tbody",null,i.monthsShortGrouped.map((i=>t("tr",{class:"datepicker-table__row"},i.map((i=>t("td",{onClick:()=>e.onClickMonthCell(i),class:{"datepicker-table__cell":true,"datepicker-table__cell--is-today":s(i),"datepicker-table__cell--is-selected":r(i)}},i))))))))};const st=e=>t("table",{class:"datepicker-table",part:"day-selection"},t("thead",{part:"weekday-header"},e.locale.weekdaysMin.map((e=>t("th",{class:"datepicker__cell"},e)))),t("tbody",null,e.calendarGrid.map((i=>t("tr",{class:"datepicker-table__row"},i.map((i=>t("td",{"data-date":i.dateString,onClick:()=>e.onClickDateCell(i),class:{"datepicker-table__cell":true,"datepicker-table__cell--is-today":i.isToday,"datepicker-table__cell--is-selected":i.isSelected,"datepicker-table__cell--is-outdated":i.isOutdated,"datepicker-table__cell--is-disabled":i.isDisabled,"datepicker-table__cell--is-selectable":!i.isDisabled}},i.label))))))));const rt=e=>t("table",{class:"datepicker-table",part:"year-selection"},t("tbody",null,e.yearSelection.map((i=>t("tr",{class:"datepicker-table__row"},i.map((i=>{var s;return t("td",{onClick:()=>e.onClickYearCell(i),class:{"datepicker-table__cell":true,"datepicker-table__cell--is-today":y().getFullYear()===i,"datepicker-table__cell--is-selected":((s=e.selectedDate)===null||s===void 0?void 0:s.getFullYear())===i}},i)})))))));const ot=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;font-family:var(--six-font-family)}.datepicker__container{position:relative}.datepicker__popup{min-width:400px;background-color:white;padding:0.5em 0.5em 1.5em;box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);user-select:none;position:absolute;z-index:var(--six-z-index-dropdown);right:0;left:0}.datepicker__popup--is-up{bottom:100%;min-height:382px}.datepicker__popup--is-inline{position:initial;box-shadow:none;border:1px solid var(--six-color-web-rock-400)}.datepicker-header{display:flex;justify-content:space-between;border-bottom:1px solid var(--six-color-web-rock-400);padding:0.5em;margin-bottom:1em}.datepicker-header svg{fill:var(--six-color-web-rock-900);stroke:none}.datepicker-header__btn{cursor:pointer;width:2.5em;height:2.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center}.datepicker-header__btn:hover{background-color:var(--six-color-web-rock-100);border-radius:100%}.datepicker-header__label{display:flex}.datepicker-header__label>div{cursor:pointer;padding:0.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center}.datepicker-header__label>div:hover{background-color:var(--six-color-web-rock-100)}.datepicker-table{width:100%}.datepicker-table__cell{text-align:center;width:2.5rem;height:2.5rem;cursor:pointer}.datepicker-table__cell:hover{background-color:var(--six-color-web-rock-100)}.datepicker-table__cell--is-today{border:1px solid var(--six-color-web-rock-400)}.datepicker-table__cell--is-selected{background-color:var(--six-color-red);color:var(--six-color-white)}.datepicker-table__cell--is-disabled{background-color:var(--six-color-web-rock-200);cursor:initial}.datepicker-table__cell--is-disabled:hover{background-color:var(--six-color-web-rock-200)}.datepicker-table__cell--is-outdated{color:var(--six-color-web-rock-400)}.datepicker-clear{display:inline-flex;align-items:center;font-size:inherit;color:var(--six-input-icon-color);border:none;background:none;padding:0;transition:var(--six-transition-fast) color;cursor:pointer}.datepicker-clear:hover{color:var(--six-input-icon-color-hover)}.datepicker-clear:focus{outline:none}.datepicker-clear--right{right:0;position:absolute}.datepicker-clear--left{right:35px;position:absolute}.input--empty .datepicker-clear{visibility:hidden}.prefix{cursor:pointer}.prefix--right{right:0;display:inline-flex;position:absolute;font-size:inherit;color:var(--six-input-icon-color);border:none;background:none;margin-right:var(--six-input-spacing-medium);transition:var(--six-transition-fast) color}six-timepicker::part(popup){border:none;padding:0.5em 0.5em 0;min-height:0}";const nt=ot;const at=25;const ht=400;var lt;(function(t){t["DAY"]="day";t["MONTH"]="month";t["YEAR"]="year"})(lt||(lt={}));const dt=class{constructor(t){e(this,t);this.sixSelect=i(this,"six-datepicker-select",7);this.sixClear=i(this,"six-datepicker-clear",7);this.sixBlur=i(this,"six-datepicker-blur",7);this.eventListeners=new r;this.previousUnit=()=>{if(this.selectionMode===lt.DAY){this.previousMonth()}else if(this.selectionMode===lt.MONTH){this.previousYear()}else if(this.selectionMode===lt.YEAR){this.previousYearGroup()}};this.nextUnit=()=>{if(this.selectionMode===lt.DAY){this.nextMonth()}else if(this.selectionMode===lt.MONTH){this.nextYear()}else if(this.selectionMode===lt.YEAR){this.nextYearGroup()}};this.handleDocumentKeyDown=t=>{var e;const i=t;if(this.open&&i.key==="Escape"){i.stopPropagation();this.closePopup();void((e=this.inputElement)===null||e===void 0?void 0:e.setFocus())}if(i.key==="Tab"){this.closePopup()}};this.handleDocumentMouseDown=t=>{const e=t.composedPath();if(!e.includes(this.container)){this.closePopup();return}};this.handleClearClick=async t=>{t.stopPropagation();await this.select(undefined);this.sixClear.emit()};this.onTimepickerChange=t=>{const e=t.detail.value;const i=new Date;if(this.selectedDate!=null){i.setFullYear(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate())}if(e!=null){const t=e.hours;const s=e.minutes;const r=e.seconds;if(t!=null){i.setHours(t,s,r)}}this.updateValue(i);this.updatePointerDates()};this.onClickDateCell=t=>{if(!t.isDisabled){void this.select(t.dateString)}};this.onClickMonthCell=t=>{const e=b[this.locale].monthsShort.findIndex((e=>e===t));this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{month:e});this.selectionMode=lt.DAY};this.onClickYearCell=t=>{this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:t});this.selectionMode=lt.DAY};this.handleInputChange=t=>{if(this.inputElement==null){return}t.stopPropagation();const e=this.inputElement.value;if(!z(e,this.dateFormat)){return}const i=X(e,this.dateFormat);if(i===undefined){return}this.updateIfChanged(i);const s=e.replace(/[^\d]/g,"");if(s.length>=6){const t=X(e,this.dateFormat);const i=A(t,this.dateFormat);if(z(i,this.dateFormat)){this.selectedDate=X(i,this.dateFormat);this.updatePointerDates();this.updateValue(this.selectedDate)}}};this.handleOnBlur=t=>{var e,i;if(((e=this.inputElement)===null||e===void 0?void 0:e.value)===""&&v(this.value)){this.value=undefined;this.sixSelect.emit(this.value)}t.stopPropagation();const s=(i=this.inputElement)===null||i===void 0?void 0:i.value;const r=X(s,this.dateFormat);const o=A(this.value,this.dateFormat);if(this.inputElement!=null&&r!=null&&s!==o){this.inputElement.value=o}this.sixBlur.emit(this.value)};this.pointerDate=dt.getCurrentDateAsPointer();this.selectionMode=lt.DAY;this.isDropDownContentUp=false;this.type="date";this.locale="en";this.open=false;this.inline=false;this.readonly=false;this.disabled=false;this.allowedDates=()=>true;this.min=undefined;this.max=undefined;this.closeOnSelect=this.type==="date";this.placement=undefined;this.size="medium";this.required=false;this.defaultDate=undefined;this.placeholder=undefined;this.value=undefined;this.label="";this.errorText="";this.errorTextCount=undefined;this.invalid=false;this.containingElement=undefined;this.dateFormat=et.DDMMYYY_DOT;this.debounce=o;this.name="";this.clearable=false;this.iconPosition="left";this.hoist=false}debounceChanged(){this.sixSelect=n(this.sixSelect,this.debounce)}valueChanged(){if(this.value!=null&&!v(this.value)){console.warn("invalid date value: ",this.value);this.value=undefined;this.sixSelect.emit(this.value)}this.selectedDate=this.value;this.updatePointerDates()}async resizeHandler(){this.updateDropdownDirection();this.moveOpenHoistedPopup();this.adjustPopupPosition()}async scrollHandler(){this.updateDropdownDirection();this.moveOpenHoistedPopup()}moveOpenHoistedPopup(){l(this.hoist,this.open,this.popup,this.inputElement,this.wrapper,ht)}get container(){return this.containingElement||this.host}get firstDateOfBox(){const t=new Date(this.pointerDate.year,this.pointerDate.month,1);return D(t)}async setFocus(t){var e;(e=this.inputElement)===null||e===void 0?void 0:e.setFocus(t)}get calendarGrid(){return Z({firstDateOfBox:this.firstDateOfBox,allowedDates:this.allowedDates,dateFormat:this.dateFormat,locale:this.locale,selectedDate:this.selectedDate,minDate:this.min,maxDate:this.max,pointerDate:this.pointerDate})}updateDropdownDirection(){if(this.inputElement==null||this.wrapper==null){return}this.isDropDownContentUp=d(this.inputElement,this.wrapper,ht)}getMonthStringForIndex(t){return b[this.locale].months[t]}previousYear(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-1})}previousYearGroup(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-at})}previousMonth(){if(this.pointerDate.month===0){this.pointerDate={year:this.pointerDate.year-1,month:11,day:1,hours:0,minutes:0,seconds:0}}else{this.pointerDate={year:this.pointerDate.year,month:this.pointerDate.month-1,day:1,hours:0,minutes:0,seconds:0}}}nextMonth(){if(this.pointerDate.month===11){this.pointerDate={year:this.pointerDate.year+1,month:0,day:1,hours:0,minutes:0,seconds:0}}else{this.pointerDate={year:this.pointerDate.year,month:this.pointerDate.month+1,day:1,hours:0,minutes:0,seconds:0}}}nextYear(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+1})}nextYearGroup(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+at})}openCalendar(){if(!this.open&&!this.disabled){this.open=true;this.setupEventListenersForOpenPopup()}}setupEventListenersForOpenPopup(){this.eventListeners.add(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.add(document,"mousedown",this.handleDocumentMouseDown)}closePopup(){if(this.inline){return}this.open=false;this.eventListeners.remove(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.remove(document,"mousedown",this.handleDocumentMouseDown);this.selectionMode=lt.DAY}updatePointerDates(){const t=this.getPointerDate();if(this.differsFromPointerDate(t)){this.pointerDate={year:k(t),month:g(t),day:w(t),hours:x(t),minutes:_(t),seconds:M(t)}}}differsFromPointerDate(t){return this.pointerDate.day!==w(t)||this.pointerDate.month!==g(t)||this.pointerDate.year!==k(t)||this.pointerDate.hours!==x(t)||this.pointerDate.minutes!==_(t)||this.pointerDate.seconds!==M(t)}getPointerDate(){if(this.selectedDate!==undefined&&this.selectedDate!==null){return this.selectedDate}if(this.defaultDate==null){return this.type==="date"?f(y()):y()}else{return X(this.defaultDate,this.dateFormat)}}updateValue(t){this.updateIfChanged(t)}updateIfChanged(t){var e;if(((e=this.value)===null||e===void 0?void 0:e.getTime())===(t===null||t===void 0?void 0:t.getTime())){return}this.value=t;this.sixSelect.emit(this.value)}async select(t){if(t==null){this.updateValue(undefined)}else{const e=X(t,this.dateFormat);e===null||e===void 0?void 0:e.setHours(this.pointerDate.hours,this.pointerDate.minutes,this.pointerDate.seconds);this.updateValue(e)}this.updatePointerDates();if(this.closeOnSelect){this.closePopup()}}componentWillLoad(){this.selectedDate=this.value;this.updatePointerDates();this.updateValue(this.value);if(this.inline){this.open=true}if(this.open){this.setupEventListenersForOpenPopup()}}componentDidLoad(){if(this.inputElement!=null){this.eventListeners.add(this.inputElement,"six-input-input",a(this.handleInputChange,this.debounce));this.eventListeners.add(this.inputElement,"six-input-blur",this.handleOnBlur)}}componentDidRender(){this.adjustPopupPosition()}renderHeader(){return t("header",{class:"datepicker-header",part:"header"},t("div",{class:"datepicker-header__btn prev",onClick:this.previousUnit},t("svg",{viewBox:"0 5 13 13",width:"14",height:"23"},t("path",{d:"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}))),t("div",{class:"datepicker-header__label"},this.selectionMode===lt.DAY&&t("div",{onClick:()=>this.selectionMode=lt.MONTH},t("span",{class:"datepicker-header__label-month"},this.getMonthStringForIndex(this.pointerDate.month)),t("span",null,t("svg",{viewBox:"-3 -4 24 24",width:"20",height:"20"},t("polyline",{points:"6 9 12 15 18 9"})))),this.selectionMode!==lt.YEAR&&t("div",{onClick:()=>this.selectionMode=lt.YEAR},t("span",{class:"datepicker-header__label-year"},this.pointerDate.year),t("span",null,t("svg",{viewBox:"-3 -4 24 24",width:"20",height:"20"},t("polyline",{points:"6 9 12 15 18 9"})))),this.selectionMode===lt.YEAR&&t("div",null,this.pointerDate.year-Math.floor(at/2)," –"," ",this.pointerDate.year+Math.floor(at/2))),t("div",{class:"datepicker-header__btn next",onClick:this.nextUnit},t("svg",{viewBox:"5 5 13 13",width:"14",height:"23"},t("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}))))}renderBody(){switch(this.selectionMode){case lt.DAY:return t(st,{locale:b[this.locale],calendarGrid:this.calendarGrid,onClickDateCell:this.onClickDateCell});case lt.MONTH:return t(it,{locale:b[this.locale],selectedDate:this.selectedDate,onClickMonthCell:this.onClickMonthCell});case lt.YEAR:return t(rt,{selectedDate:this.selectedDate,yearSelection:tt(this.pointerDate.year,at),onClickYearCell:this.onClickYearCell})}}renderCustomIcon(){const e=h(this.host,"custom-icon")?t("slot",{name:"custom-icon"}):t("six-icon",{size:this.size==="large"?"medium":this.size},"today");return t("span",{slot:"prefix",part:"icon",class:{prefix:true,"prefix--right":this.iconPosition==="right"}},e)}renderClearable(){return this.clearable&&t("button",{slot:"suffix",class:{"datepicker-clear":true,"datepicker-clear--right":this.iconPosition==="left","datepicker-clear--left":this.iconPosition==="right"},type:"button",onClick:this.handleClearClick,tabindex:"-1"},t("six-icon",{size:"small"},"clear"))}render(){var e,i,s;this.adjustPopupPosition();return t("div",{key:"dbe321672b79845093aa8c3186be30cb5819f09d",ref:t=>this.wrapper=t,class:"datepicker__container"},t("six-input",{key:"9ba0be60aaacd602d68d298aedcd0694302ba553",part:"base",value:A(this.value,this.dateFormat),ref:t=>this.inputElement=t,placeholder:this.placeholder,readonly:this.readonly,disabled:this.disabled,name:this.name,label:this.label,required:this.required,errorText:this.errorText,errorTextCount:this.errorTextCount,invalid:this.invalid,onClick:()=>this.openCalendar(),size:this.size,class:{"input--empty":this.value==null}},this.renderCustomIcon(),this.renderClearable(),h(this.host,"label")?t("span",{slot:"label"},t("slot",{name:"label"})):null,h(this.host,"error-text")?t("span",{slot:"error-text"},t("slot",{name:"error-text"})):null),this.open&&t("div",{part:"popup",ref:t=>this.popup=t,class:{datepicker__popup:true,"datepicker__popup--is-up":this.placement!=null?this.placement==="top":this.isDropDownContentUp,"datepicker__popup--is-inline":this.inline}},this.renderHeader(),this.renderBody(),this.type==="date-time"&&t("six-timepicker",{inline:true,"onSix-timepicker-change-debounced":t=>this.onTimepickerChange(t),value:((e=this.selectedDate)===null||e===void 0?void 0:e.getHours())+":"+((i=this.selectedDate)===null||i===void 0?void 0:i.getMinutes())+":"+((s=this.selectedDate)===null||s===void 0?void 0:s.getSeconds())}),t("div",{class:"datepicker__footer"},t("slot",null))))}adjustPopupPosition(){c(this.hoist,this.popup,this.inputElement,this.wrapper,ht,(t=>this.isDropDownContentUp=t));u(this.popup)}connectedCallback(){this.eventListeners.forward("six-datepicker-select","change",this.host);this.eventListeners.forward("six-datepicker-blur","blur",this.host)}disconnectedCallback(){this.eventListeners.removeAll()}static getCurrentDateAsPointer(){return{year:k(y()),month:g(y()),day:w(y()),hours:x(y()),minutes:_(y()),seconds:M(y())}}get host(){return s(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"]}}};dt.style=nt;export{dt as six_datepicker};
2
- //# sourceMappingURL=p-756f4acf.entry.js.map
1
+ import{h as t,r as e,c as i,g as s}from"./p-05eb1bab.js";import{E as r}from"./p-8bfb4bfc.js";import{D as o,d as n,a}from"./p-a1502802.js";import{h}from"./p-0cebf1d2.js";import{m as l,c as d,a as c,b as u}from"./p-f136a6b2.js";const p=t=>typeof t==="string";const m=t=>t==null;const b={en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsShortGrouped:[["Jan","Feb","Mar","Apr"],["May","Jun","Jul","Aug"],["Sep","Oct","Nov","Dec"]],weekdays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysMin:["Mo","Tu","We","Th","Fr","Sa","Su"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],monthsShortGrouped:[["Jan.","Feb.","März","Apr."],["Mai","Juni","Juli","Aug."],["Sep.","Okt.","Nov.","Dez."]],weekdays:["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],weekdaysShort:["Mo.","Di.","Mi.","Do.","Fr.","Sa.","So."],weekdaysMin:["Mo","Di","Mi","Do","Fr","Sa","So"]},fr:{months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthsShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],monthsShortGrouped:[["janv.","févr.","mars","avr."],["mai","juin","juil.","août"],["sept.","oct.","nov.","déc."]],weekdays:["lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],weekdaysShort:["lun.","mar.","mer.","jeu.","ven.","sam.","dim."],weekdaysMin:["lu","ma","me","je","ve","sa","di"]},it:{months:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],monthsShort:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],monthsShortGrouped:[["gen","feb","mar","apr"],["mag","giu","lug","ago"],["set","ott","nov","dic"]],weekdays:["lunedì","martedì","mercoledì","giovedì","venerdì","sabato","domenica"],weekdaysShort:["lun","mar","mer","gio","ven","sab","dom"],weekdaysMin:["lu","ma","me","gi","ve","sa","do"]},es:{months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthsShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],monthsShortGrouped:[["ene","feb","mar","abr"],["may","jun","jul","ago"],["sep","oct","nov","dic"]],weekdays:["lunes","martes","miércoles","jueves","viernes","sábado","domingo"],weekdaysShort:["lun","mar","mié","jue","vie","sáb","dom"],weekdaysMin:["lu","ma","mi","ju","vi","sa","do"]}};const y=()=>new Date;const f=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate());const v=t=>t instanceof Date&&!isNaN(t.getTime())&&new Date(t).toString()!=="Invalid Date";const k=t=>{if(t&&v(t)){return t.getFullYear()}throw new Error("Not a valid date")};const g=t=>{if(t&&v(t)){return t.getMonth()}throw new Error("Not a valid date")};const w=t=>{if(t&&v(t)){return t.getDate()}throw new Error("Not a valid date")};const x=t=>{if(t&&v(t)){return t.getHours()}throw new Error("Not a valid date")};const _=t=>{if(t&&v(t)){return t.getMinutes()}throw new Error("Not a valid date")};const M=t=>{if(t&&v(t)){return t.getSeconds()}throw new Error("Not a valid date")};const D=t=>{const e=[6,0,1,2,3,4,5];const i=new Date(t);i.setDate(i.getDate()-e[i.getDay()]);return i};const j=(t,e)=>(t===null||t===void 0?void 0:t.getFullYear())===(e===null||e===void 0?void 0:e.getFullYear());const S=(t,e)=>j(t,e)&&(t===null||t===void 0?void 0:t.getMonth())===(e===null||e===void 0?void 0:e.getMonth());const C=(t,e)=>S(t,e)&&(t===null||t===void 0?void 0:t.getDate())===(e===null||e===void 0?void 0:e.getDate());const O=(t,e)=>C(D(t),D(e));const z=(t,e)=>{if(!p(t)||!p(e)){return false}if(t.length<6||e.length<6){return false}const{day:i,month:s}=U(t,e);if(i>31||s>11||i<=0||s<0){return false}const r=X(t,e);if(m(r)){return false}return r.toString()!=="Invalid Date"};const F=(t,e,i)=>{if(!t){return true}if(e&&t<e){return false}if(i&&i<t){return false}return true};const J=(t,e,i,s=2)=>{const r=s-1;const o=e.charAt(t+r)===i;const n=t+r<e.length;return n&&o};const N=(t,e)=>{let i=String(t);while(i.length<e){i="0"+i}return i};const A=(t,e)=>{if(t==null){return""}let i="";for(let s=0;s<e.length;s++){switch(e.charAt(s)){case"d":if(J(s,e,"d")){i+=N(t.getDate(),2);s++}else{i+=String(t.getDate())}break;case"m":if(J(s,e,"m")){i+=N(t.getMonth()+1,2);s++}else{i+=String(t.getMonth()+1)}break;case"y":if(J(s,e,"y",4)){s+=3;i+=t.getFullYear()}else{i+=(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;s++}break;case"h":if(J(s,e,"h")){i+=N(t.getHours(),2);s++}else{i+=String(t.getHours())}break;case"M":if(J(s,e,"M")){i+=N(t.getMinutes(),2);s++}else{i+=String(t.getMinutes())}break;case"s":if(J(s,e,"s")){i+=N(t.getSeconds(),2);s++}else{i+=String(t.getSeconds())}break;default:i+=e.charAt(s)}}return i};const E=/(\[[^\[]*\])|(mm|dd|yyyy|yy|hh|MM|ss|.)/g;const T=/\d\d/;const G=/\d{4}/;const P=/[^0-9]/g;const B="year";const I="month";const L="day";const Y="hour";const H="minute";const W="second";const q={};const R=(t,e,i)=>{const s=Array.isArray(t)?t:[t];let r;if(typeof i==="string"){r=t=>{const e=parseInt(t,10);return{[i]:e}}}else{r=i}s.forEach((t=>{q[t]=[e,r]}))};R("yy",T,(t=>{const e=(new Date).getFullYear();const i=Math.floor(e/100);let s=parseInt(t,10);s=(s>68?i-1:i)*100+s;return{[B]:s}}));R("yyyy",G,B);R("mm",T,(t=>({[I]:parseInt(t,10)-1})));R("dd",T,L);R("hh",T,Y);R("MM",T,H);R("ss",T,W);const V=(t,e=new Date)=>{const i=[0,0,1,0,0,0];const s=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()];let r=true;for(let e=0;e<7;e++){if(t[e]===undefined){i[e]=r?s[e]:i[e]}else{i[e]=t[e];r=false}}return i};const $=(t,e,i,s,r,o)=>{if(!(t<100&&t>=0)){return new Date(t,e,i,s,r,o)}const n=new Date(t+400,e,i,s,r,o);if(isFinite(n.getFullYear())){n.setFullYear(t)}return n};const K=(t,e)=>{const i=e.match(E);if(!i){throw new Error}const{length:s}=i;let r={};for(let e=0;e<s;e+=1){const s=i[e];const o=q[s];if(!o){const e=s.replace(/^\[|\]$/g,"");if(t.indexOf(e)===0){t=t.substr(e.length)}else{throw new Error("not match")}}else{const e=o[0];const i=o[1];const s=(e.exec(t)||[])[0];const n=i(s);r=Object.assign(Object.assign({},r),n);t=t.replace(s,"")}}return r};const Q=(t,e)=>{if(t.length===e.length){return t}const i=t.match(P)[0];return t.split(i).map((t=>t.length===1?"0"+t:t)).join(i)};const U=(t,e)=>{const i=Q(t,e);return K(i,e)};const X=(t,e)=>{try{const{backupDate:i=new Date}={};const{year:s,month:r,day:o,hour:n,minute:a,second:h,date:l}=U(t,e);if(l!=null){return l}const d=[s,r,o,n,a,h];const c=V(d,i);return $(...c)}catch(t){return new Date(NaN)}};const Z=t=>{const{firstDateOfBox:e,allowedDates:i,dateFormat:s,selectedDate:r,minDate:o,maxDate:n,pointerDate:a}=t;const h=new Date(e);const l=new Date(e);let d=[];do{let t=[];do{t=[...t,{date:new Date(l),display:A(l,s),dateString:A(l,s),label:w(l).toString(),isToday:C(l,y()),isSelected:r&&C(l,r),isDisabled:!i(l)||!F(l,o,n),isOutdated:a.month!==l.getMonth()||!F(l,o,n)}];l.setDate(l.getDate()+1)}while(O(l,h));d=[...d,t];h.setDate(h.getDate()+7)}while(S(new Date(a.year,a.month,a.day),l));return d};function tt(t,e){const i=5;return[...Array(e).keys()].map((i=>i+t-Math.floor(e/2))).reduce(((t,e,s)=>{if(s%i===0){t.push([])}t[t.length-1].push(e);return t}),[])}var et;(function(t){t["DDMMYYY_DOT"]="dd.mm.yyyy";t["YYYYMMDD_DASH"]="yyyy-mm-dd";t["DDMMYYYY_DASH"]="dd-mm-yyyy";t["DDMMYYYY_SLASH"]="dd/mm/yyyy";t["YYYYMMDD_SLASH"]="yyyy/mm/dd";t["DDMMYY_DOT"]="dd.mm.yy";t["YYMMDD_DASH"]="yy-mm-dd";t["DDMMYY_DASH"]="dd-mm-yy";t["DDMMYY_SLASH"]="dd/mm/yy";t["YYMMDD_SLASH"]="yy/mm/dd";t["DDMMYYY_DOT_TIME"]="dd.mm.yyyy hh:MM:ss";t["YYYYMMDD_DASH_TIME"]="yyyy-mm-dd hh:MM:ss";t["DDMMYYYY_DASH_TIME"]="dd-mm-yyyy hh:MM:ss";t["DDMMYYYY_SLASH_TIME"]="dd/mm/yyyy hh:MM:ss";t["YYYYMMDD_SLASH_TIME"]="yyyy/mm/dd hh:MM:ss";t["DDMMYY_DOT_TIME"]="dd.mm.yy hh:MM:ss";t["YYMMDD_DASH_TIME"]="yy-mm-dd hh:MM:ss";t["DDMMYY_DASH_TIME"]="dd-mm-yy hh:MM:ss";t["DDMMYY_SLASH_TIME"]="dd/mm/yy hh:MM:ss";t["YYMMDD_SLASH_TIME"]="yy/mm/dd hh:MM:ss"})(et||(et={}));const it=e=>{const i=e.locale;const s=t=>i.monthsShort[y().getMonth()]===t;const r=t=>{var s;return((s=e.selectedDate)===null||s===void 0?void 0:s.getMonth())===i.monthsShort.findIndex((e=>e===t))};return t("table",{class:"datepicker-table",part:"month-selection"},t("tbody",null,i.monthsShortGrouped.map((i=>t("tr",{class:"datepicker-table__row"},i.map((i=>t("td",{onClick:()=>e.onClickMonthCell(i),class:{"datepicker-table__cell":true,"datepicker-table__cell--is-today":s(i),"datepicker-table__cell--is-selected":r(i)}},i))))))))};const st=e=>t("table",{class:"datepicker-table",part:"day-selection"},t("thead",{part:"weekday-header"},e.locale.weekdaysMin.map((e=>t("th",{class:"datepicker__cell"},e)))),t("tbody",null,e.calendarGrid.map((i=>t("tr",{class:"datepicker-table__row"},i.map((i=>t("td",{"data-date":i.dateString,onClick:()=>e.onClickDateCell(i),class:{"datepicker-table__cell":true,"datepicker-table__cell--is-today":i.isToday,"datepicker-table__cell--is-selected":i.isSelected,"datepicker-table__cell--is-outdated":i.isOutdated,"datepicker-table__cell--is-disabled":i.isDisabled,"datepicker-table__cell--is-selectable":!i.isDisabled}},i.label))))))));const rt=e=>t("table",{class:"datepicker-table",part:"year-selection"},t("tbody",null,e.yearSelection.map((i=>t("tr",{class:"datepicker-table__row"},i.map((i=>{var s;return t("td",{onClick:()=>e.onClickYearCell(i),class:{"datepicker-table__cell":true,"datepicker-table__cell--is-today":y().getFullYear()===i,"datepicker-table__cell--is-selected":((s=e.selectedDate)===null||s===void 0?void 0:s.getFullYear())===i}},i)})))))));const ot=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;font-family:var(--six-font-family)}.datepicker__container{position:relative}.datepicker__popup{min-width:400px;background-color:white;padding:0.5em 0.5em 1.5em;box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);user-select:none;position:absolute;z-index:var(--six-z-index-dropdown);right:0;left:0}.datepicker__popup--is-up{bottom:100%;min-height:382px}.datepicker__popup--is-inline{position:initial;box-shadow:none;border:1px solid var(--six-color-web-rock-400)}.datepicker-header{display:flex;justify-content:space-between;border-bottom:1px solid var(--six-color-web-rock-400);padding:0.5em;margin-bottom:1em}.datepicker-header svg{fill:var(--six-color-web-rock-900);stroke:none}.datepicker-header__btn{cursor:pointer;width:2.5em;height:2.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center}.datepicker-header__btn:hover{background-color:var(--six-color-web-rock-100);border-radius:100%}.datepicker-header__label{display:flex}.datepicker-header__label>div{cursor:pointer;padding:0.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center}.datepicker-header__label>div:hover{background-color:var(--six-color-web-rock-100)}.datepicker-table{width:100%}.datepicker-table__cell{text-align:center;width:2.5rem;height:2.5rem;cursor:pointer}.datepicker-table__cell:hover{background-color:var(--six-color-web-rock-100)}.datepicker-table__cell--is-today{border:1px solid var(--six-color-web-rock-400)}.datepicker-table__cell--is-selected{background-color:var(--six-color-red);color:var(--six-color-white)}.datepicker-table__cell--is-disabled{background-color:var(--six-color-web-rock-200);cursor:initial}.datepicker-table__cell--is-disabled:hover{background-color:var(--six-color-web-rock-200)}.datepicker-table__cell--is-outdated{color:var(--six-color-web-rock-400)}.datepicker-clear{display:inline-flex;align-items:center;font-size:inherit;color:var(--six-input-icon-color);border:none;background:none;padding:0;transition:var(--six-transition-fast) color;cursor:pointer}.datepicker-clear:hover{color:var(--six-input-icon-color-hover)}.datepicker-clear:focus{outline:none}.datepicker-clear--right{right:0;position:absolute}.datepicker-clear--left{right:35px;position:absolute}.input--empty .datepicker-clear{visibility:hidden}.prefix{cursor:pointer}.prefix--right{right:0;display:inline-flex;position:absolute;font-size:inherit;color:var(--six-input-icon-color);border:none;background:none;margin-right:var(--six-input-spacing-medium);transition:var(--six-transition-fast) color}six-timepicker::part(popup){border:none;padding:0.5em 0.5em 0;min-height:0}";const nt=ot;const at=25;const ht=400;var lt;(function(t){t["DAY"]="day";t["MONTH"]="month";t["YEAR"]="year"})(lt||(lt={}));const dt=class{constructor(t){e(this,t);this.sixSelect=i(this,"six-datepicker-select",7);this.sixClear=i(this,"six-datepicker-clear",7);this.sixBlur=i(this,"six-datepicker-blur",7);this.eventListeners=new r;this.previousUnit=()=>{if(this.selectionMode===lt.DAY){this.previousMonth()}else if(this.selectionMode===lt.MONTH){this.previousYear()}else if(this.selectionMode===lt.YEAR){this.previousYearGroup()}};this.nextUnit=()=>{if(this.selectionMode===lt.DAY){this.nextMonth()}else if(this.selectionMode===lt.MONTH){this.nextYear()}else if(this.selectionMode===lt.YEAR){this.nextYearGroup()}};this.handleDocumentKeyDown=t=>{var e;const i=t;if(this.open&&i.key==="Escape"){i.stopPropagation();this.closePopup();void((e=this.inputElement)===null||e===void 0?void 0:e.setFocus())}if(i.key==="Tab"){this.closePopup()}};this.handleDocumentMouseDown=t=>{const e=t.composedPath();if(!e.includes(this.container)){this.closePopup();return}};this.handleClearClick=async t=>{t.stopPropagation();await this.select(undefined);this.sixClear.emit()};this.onTimepickerChange=t=>{const e=t.detail.value;const i=new Date;if(this.selectedDate!=null){i.setFullYear(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate())}if(e!=null){const t=e.hours;const s=e.minutes;const r=e.seconds;if(t!=null){i.setHours(t,s,r)}}this.updateValue(i);this.updatePointerDates()};this.onClickDateCell=t=>{if(!t.isDisabled){void this.select(t.dateString)}};this.onClickMonthCell=t=>{const e=b[this.locale].monthsShort.findIndex((e=>e===t));this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{month:e});this.selectionMode=lt.DAY};this.onClickYearCell=t=>{this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:t});this.selectionMode=lt.DAY};this.handleInputChange=t=>{if(this.inputElement==null){return}t.stopPropagation();const e=this.inputElement.value;if(!z(e,this.dateFormat)){return}const i=X(e,this.dateFormat);if(i===undefined){return}this.updateIfChanged(i);const s=e.replace(/[^\d]/g,"");if(s.length>=6){const t=X(e,this.dateFormat);const i=A(t,this.dateFormat);if(z(i,this.dateFormat)){this.selectedDate=X(i,this.dateFormat);this.updatePointerDates();this.updateValue(this.selectedDate)}}};this.handleOnBlur=t=>{var e,i,s;t.stopPropagation();if(((e=this.inputElement)===null||e===void 0?void 0:e.value)===""&&v(this.value)){this.value=undefined;this.sixSelect.emit(this.value)}const r=X((i=this.inputElement)===null||i===void 0?void 0:i.value,this.dateFormat);if(v(r)&&((s=this.value)===null||s===void 0?void 0:s.getTime())!==(r===null||r===void 0?void 0:r.getTime())){this.value=r}if(this.inputElement!=null){this.inputElement.value=A(this.value,this.dateFormat)}this.sixBlur.emit(this.value)};this.pointerDate=dt.getCurrentDateAsPointer();this.selectionMode=lt.DAY;this.isDropDownContentUp=false;this.type="date";this.locale="en";this.open=false;this.inline=false;this.readonly=false;this.disabled=false;this.allowedDates=()=>true;this.min=undefined;this.max=undefined;this.closeOnSelect=this.type==="date";this.placement=undefined;this.size="medium";this.required=false;this.defaultDate=undefined;this.placeholder=undefined;this.value=undefined;this.label="";this.errorText="";this.errorTextCount=undefined;this.invalid=false;this.containingElement=undefined;this.dateFormat=et.DDMMYYY_DOT;this.debounce=o;this.name="";this.clearable=false;this.iconPosition="left";this.hoist=false}debounceChanged(){this.sixSelect=n(this.sixSelect,this.debounce)}valueChanged(){if(this.value!=null&&!v(this.value)){console.warn("invalid date value: ",this.value);this.value=undefined;this.sixSelect.emit(this.value)}this.selectedDate=this.value;this.updatePointerDates()}async resizeHandler(){this.updateDropdownDirection();this.moveOpenHoistedPopup();this.adjustPopupPosition()}async scrollHandler(){this.updateDropdownDirection();this.moveOpenHoistedPopup()}moveOpenHoistedPopup(){l(this.hoist,this.open,this.popup,this.inputElement,this.wrapper,ht)}get container(){return this.containingElement||this.host}get firstDateOfBox(){const t=new Date(this.pointerDate.year,this.pointerDate.month,1);return D(t)}async setFocus(t){var e;(e=this.inputElement)===null||e===void 0?void 0:e.setFocus(t)}get calendarGrid(){return Z({firstDateOfBox:this.firstDateOfBox,allowedDates:this.allowedDates,dateFormat:this.dateFormat,locale:this.locale,selectedDate:this.selectedDate,minDate:this.min,maxDate:this.max,pointerDate:this.pointerDate})}updateDropdownDirection(){if(this.inputElement==null||this.wrapper==null){return}this.isDropDownContentUp=d(this.inputElement,this.wrapper,ht)}getMonthStringForIndex(t){return b[this.locale].months[t]}previousYear(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-1})}previousYearGroup(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-at})}previousMonth(){if(this.pointerDate.month===0){this.pointerDate={year:this.pointerDate.year-1,month:11,day:1,hours:0,minutes:0,seconds:0}}else{this.pointerDate={year:this.pointerDate.year,month:this.pointerDate.month-1,day:1,hours:0,minutes:0,seconds:0}}}nextMonth(){if(this.pointerDate.month===11){this.pointerDate={year:this.pointerDate.year+1,month:0,day:1,hours:0,minutes:0,seconds:0}}else{this.pointerDate={year:this.pointerDate.year,month:this.pointerDate.month+1,day:1,hours:0,minutes:0,seconds:0}}}nextYear(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+1})}nextYearGroup(){this.pointerDate=Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+at})}openCalendar(){if(!this.open&&!this.disabled){this.open=true;this.setupEventListenersForOpenPopup()}}setupEventListenersForOpenPopup(){this.eventListeners.add(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.add(document,"mousedown",this.handleDocumentMouseDown)}closePopup(){if(this.inline){return}this.open=false;this.eventListeners.remove(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.remove(document,"mousedown",this.handleDocumentMouseDown);this.selectionMode=lt.DAY}updatePointerDates(){const t=this.getPointerDate();if(this.differsFromPointerDate(t)){this.pointerDate={year:k(t),month:g(t),day:w(t),hours:x(t),minutes:_(t),seconds:M(t)}}}differsFromPointerDate(t){return this.pointerDate.day!==w(t)||this.pointerDate.month!==g(t)||this.pointerDate.year!==k(t)||this.pointerDate.hours!==x(t)||this.pointerDate.minutes!==_(t)||this.pointerDate.seconds!==M(t)}getPointerDate(){if(this.selectedDate!==undefined&&this.selectedDate!==null){return this.selectedDate}if(this.defaultDate==null){return this.type==="date"?f(y()):y()}else{return X(this.defaultDate,this.dateFormat)}}updateValue(t){this.updateIfChanged(t)}updateIfChanged(t){var e;if(((e=this.value)===null||e===void 0?void 0:e.getTime())===(t===null||t===void 0?void 0:t.getTime())){return}this.value=t;this.sixSelect.emit(this.value)}async select(t){if(t==null){this.updateValue(undefined)}else{const e=X(t,this.dateFormat);e===null||e===void 0?void 0:e.setHours(this.pointerDate.hours,this.pointerDate.minutes,this.pointerDate.seconds);this.updateValue(e)}this.updatePointerDates();if(this.closeOnSelect){this.closePopup()}}componentWillLoad(){this.selectedDate=this.value;this.updatePointerDates();this.updateValue(this.value);if(this.inline){this.open=true}if(this.open){this.setupEventListenersForOpenPopup()}}componentDidLoad(){if(this.inputElement!=null){this.eventListeners.add(this.inputElement,"six-input-input",a(this.handleInputChange,this.debounce));this.eventListeners.add(this.inputElement,"six-input-blur",this.handleOnBlur)}}componentDidRender(){this.adjustPopupPosition()}renderHeader(){return t("header",{class:"datepicker-header",part:"header"},t("div",{class:"datepicker-header__btn prev",onClick:this.previousUnit},t("svg",{viewBox:"0 5 13 13",width:"14",height:"23"},t("path",{d:"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}))),t("div",{class:"datepicker-header__label"},this.selectionMode===lt.DAY&&t("div",{onClick:()=>this.selectionMode=lt.MONTH},t("span",{class:"datepicker-header__label-month"},this.getMonthStringForIndex(this.pointerDate.month)),t("span",null,t("svg",{viewBox:"-3 -4 24 24",width:"20",height:"20"},t("polyline",{points:"6 9 12 15 18 9"})))),this.selectionMode!==lt.YEAR&&t("div",{onClick:()=>this.selectionMode=lt.YEAR},t("span",{class:"datepicker-header__label-year"},this.pointerDate.year),t("span",null,t("svg",{viewBox:"-3 -4 24 24",width:"20",height:"20"},t("polyline",{points:"6 9 12 15 18 9"})))),this.selectionMode===lt.YEAR&&t("div",null,this.pointerDate.year-Math.floor(at/2)," –"," ",this.pointerDate.year+Math.floor(at/2))),t("div",{class:"datepicker-header__btn next",onClick:this.nextUnit},t("svg",{viewBox:"5 5 13 13",width:"14",height:"23"},t("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}))))}renderBody(){switch(this.selectionMode){case lt.DAY:return t(st,{locale:b[this.locale],calendarGrid:this.calendarGrid,onClickDateCell:this.onClickDateCell});case lt.MONTH:return t(it,{locale:b[this.locale],selectedDate:this.selectedDate,onClickMonthCell:this.onClickMonthCell});case lt.YEAR:return t(rt,{selectedDate:this.selectedDate,yearSelection:tt(this.pointerDate.year,at),onClickYearCell:this.onClickYearCell})}}renderCustomIcon(){const e=h(this.host,"custom-icon")?t("slot",{name:"custom-icon"}):t("six-icon",{size:this.size==="large"?"medium":this.size},"today");return t("span",{slot:"prefix",part:"icon",class:{prefix:true,"prefix--right":this.iconPosition==="right"}},e)}renderClearable(){return this.clearable&&t("button",{slot:"suffix",class:{"datepicker-clear":true,"datepicker-clear--right":this.iconPosition==="left","datepicker-clear--left":this.iconPosition==="right"},type:"button",onClick:this.handleClearClick,tabindex:"-1"},t("six-icon",{size:"small"},"clear"))}render(){var e,i,s;this.adjustPopupPosition();return t("div",{key:"8459cda3520ec482fd64237553bb19771c58a845",ref:t=>this.wrapper=t,class:"datepicker__container"},t("six-input",{key:"a14b8687952ec15b0148b348bac92eb23e5f7e05",part:"base",value:A(this.value,this.dateFormat),ref:t=>this.inputElement=t,placeholder:this.placeholder,readonly:this.readonly,disabled:this.disabled,name:this.name,label:this.label,required:this.required,errorText:this.errorText,errorTextCount:this.errorTextCount,invalid:this.invalid,onClick:()=>this.openCalendar(),size:this.size,class:{"input--empty":this.value==null}},this.renderCustomIcon(),this.renderClearable(),h(this.host,"label")?t("span",{slot:"label"},t("slot",{name:"label"})):null,h(this.host,"error-text")?t("span",{slot:"error-text"},t("slot",{name:"error-text"})):null),this.open&&t("div",{part:"popup",ref:t=>this.popup=t,class:{datepicker__popup:true,"datepicker__popup--is-up":this.placement!=null?this.placement==="top":this.isDropDownContentUp,"datepicker__popup--is-inline":this.inline}},this.renderHeader(),this.renderBody(),this.type==="date-time"&&t("six-timepicker",{debounce:this.debounce,inline:true,"onSix-timepicker-change-debounced":t=>this.onTimepickerChange(t),value:((e=this.selectedDate)===null||e===void 0?void 0:e.getHours())+":"+((i=this.selectedDate)===null||i===void 0?void 0:i.getMinutes())+":"+((s=this.selectedDate)===null||s===void 0?void 0:s.getSeconds())}),t("div",{class:"datepicker__footer"},t("slot",null))))}adjustPopupPosition(){c(this.hoist,this.popup,this.inputElement,this.wrapper,ht,(t=>this.isDropDownContentUp=t));u(this.popup)}connectedCallback(){this.eventListeners.forward("six-datepicker-select","change",this.host);this.eventListeners.forward("six-datepicker-blur","blur",this.host)}disconnectedCallback(){this.eventListeners.removeAll()}static getCurrentDateAsPointer(){return{year:k(y()),month:g(y()),day:w(y()),hours:x(y()),minutes:_(y()),seconds:M(y())}}get host(){return s(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"]}}};dt.style=nt;export{dt as six_datepicker};
2
+ //# sourceMappingURL=p-32e421a3.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isString","value","isNil","i18nDate","en","months","monthsShort","monthsShortGrouped","weekdays","weekdaysShort","weekdaysMin","de","fr","it","es","now","Date","removeTime","date","getFullYear","getMonth","getDate","isValidDate","isNaN","getTime","toString","year","Error","month","day","hours","getHours","minutes","getMinutes","seconds","getSeconds","getFirstDayOfTheWeek","weekdayDiff","setDate","getDay","isSameYear","a","b","isSameMonth","isSameDay","isSameWeek","isValidDateString","datestring","format","length","getDateParts","toDate","isInRange","minDate","maxDate","lookAhead","iFormat","match","increment","followingCharacterMatches","charAt","hasProperLength","formatNumber","len","num","String","formatDate","output","FORMATTING_TOKENS","TWO_NUMERICS_REGEX","FOUR_NUMERICS_REGEX","NON_NUMERIC_REGEX","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","parseFlags","addParseFlag","token","regex","callback","tokens","Array","isArray","func","input","parseInt","forEach","key","cent","Math","floor","getFullInputArray","backupDate","result","backupArr","useBackup","i","undefined","createDate","hour","minute","second","isFinite","setFullYear","makeParser","dateString","mark","parseTo","word","replace","indexOf","substr","parser","exec","obj","Object","assign","getCleanDateString","dirtyDateString","separator","split","map","s","join","inputArray","e","NaN","createCalendarGrid","calendarGridArguments","firstDateOfBox","allowedDates","dateFormat","selectedDate","pointerDate","weekDatePointer","dayDatePointer","calendar","row","display","label","isToday","isSelected","isDisabled","isOutdated","rangeAround","number","range","itemsPerGroup","keys","n","reduce","curr","item","index","push","SixDateFormats","MonthSelection","monthSelectionParams","locale","isSelectedMonth","_a","findIndex","m","h","class","part","onClick","onClickMonthCell","DaySelection","daySelectionParams","weekday","calendarGrid","cell","onClickDateCell","YearSelection","yearSelectionParams","yearSelection","onClickYearCell","sixDatepickerCss","SixDatepickerStyle0","NUMBER_OF_YEARS_SHOWN","MIN_POPUP_HEIGHT","SelectionMode","SixDatepicker","this","eventListeners","EventListeners","previousUnit","selectionMode","previousMonth","previousYear","previousYearGroup","nextUnit","nextMonth","nextYear","nextYearGroup","handleDocumentKeyDown","event","keyboardEvent","open","stopPropagation","closePopup","inputElement","setFocus","handleDocumentMouseDown","path","composedPath","includes","container","handleClearClick","async","select","sixClear","emit","onTimepickerChange","sixTimepickerChange","time","detail","newDate","setHours","updateValue","updatePointerDates","selectedMonth","monthShort","handleInputChange","inputValue","inputValueDate","updateIfChanged","datesOnly","dateAsString","handleOnBlur","sixSelect","currentDate","_b","_c","sixBlur","getCurrentDateAsPointer","type","DDMMYYY_DOT","DEFAULT_DEBOUNCE_FAST","debounceChanged","debounceEvent","debounce","valueChanged","console","warn","resizeHandler","updateDropdownDirection","moveOpenHoistedPopup","adjustPopupPosition","scrollHandler","movePopup","hoist","popup","wrapper","containingElement","host","options","min","max","isDropDownContentUp","calcIsDropDownContentUp","getMonthStringForIndex","openCalendar","disabled","setupEventListenersForOpenPopup","add","document","inline","remove","getPointerDate","differsFromPointerDate","defaultDate","closeOnSelect","componentWillLoad","componentDidLoad","componentDidRender","renderHeader","viewBox","width","height","d","points","renderBody","renderCustomIcon","icon","hasSlot","name","size","slot","prefix","iconPosition","renderClearable","clearable","tabindex","render","ref","el","placeholder","readonly","required","errorText","errorTextCount","invalid","datepicker__popup","placement","adjustPopupForHoisting","isUp","adjustPopupForSmallScreens","connectedCallback","forward","disconnectedCallback","removeAll"],"sources":["src/utils/type-check.ts","src/utils/date-util.ts","src/components/six-datepicker/six-date-formats.tsx","src/components/six-datepicker/components/month-selection.tsx","src/components/six-datepicker/components/day-selection.tsx","src/components/six-datepicker/components/year-selection.tsx","src/components/six-datepicker/six-datepicker.scss?tag=six-datepicker&encapsulation=shadow","src/components/six-datepicker/six-datepicker.tsx"],"sourcesContent":["export const isString = (value: unknown): value is string => typeof value === 'string';\n\n// only use '==' instead of '===' to also catch undefined and void\nexport const isNil = (value: unknown): value is undefined | null => value == null;\n\nexport const isDate = (value: unknown): value is Date => value instanceof Date;\n","/* eslint-disable */\n// @ts-nocheck\n\nimport { isDate, isNil, isString } from './type-check';\nimport { SixDateFormats } from '../components/six-datepicker/six-date-formats';\nimport { CalendarCell } from '../components/six-datepicker/six-datepicker';\n\nexport type DateLocale = typeof i18nDate.en;\nexport const i18nDate = {\n en: {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n monthsShortGrouped: [\n ['Jan', 'Feb', 'Mar', 'Apr'],\n ['May', 'Jun', 'Jul', 'Aug'],\n ['Sep', 'Oct', 'Nov', 'Dec'],\n ],\n weekdays: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],\n weekdaysShort: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n weekdaysMin: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],\n },\n de: {\n months: [\n 'Januar',\n 'Februar',\n 'März',\n 'April',\n 'Mai',\n 'Juni',\n 'Juli',\n 'August',\n 'September',\n 'Oktober',\n 'November',\n 'Dezember',\n ],\n monthsShort: ['Jan.', 'Feb.', 'März', 'Apr.', 'Mai', 'Juni', 'Juli', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Dez.'],\n monthsShortGrouped: [\n ['Jan.', 'Feb.', 'März', 'Apr.'],\n ['Mai', 'Juni', 'Juli', 'Aug.'],\n ['Sep.', 'Okt.', 'Nov.', 'Dez.'],\n ],\n weekdays: ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'],\n weekdaysShort: ['Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.', 'So.'],\n weekdaysMin: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],\n },\n fr: {\n months: [\n 'janvier',\n 'février',\n 'mars',\n 'avril',\n 'mai',\n 'juin',\n 'juillet',\n 'août',\n 'septembre',\n 'octobre',\n 'novembre',\n 'décembre',\n ],\n monthsShort: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],\n monthsShortGrouped: [\n ['janv.', 'févr.', 'mars', 'avr.'],\n ['mai', 'juin', 'juil.', 'août'],\n ['sept.', 'oct.', 'nov.', 'déc.'],\n ],\n weekdays: ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'],\n weekdaysShort: ['lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.', 'dim.'],\n weekdaysMin: ['lu', 'ma', 'me', 'je', 've', 'sa', 'di'],\n },\n it: {\n months: [\n 'gennaio',\n 'febbraio',\n 'marzo',\n 'aprile',\n 'maggio',\n 'giugno',\n 'luglio',\n 'agosto',\n 'settembre',\n 'ottobre',\n 'novembre',\n 'dicembre',\n ],\n monthsShort: ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'],\n monthsShortGrouped: [\n ['gen', 'feb', 'mar', 'apr'],\n ['mag', 'giu', 'lug', 'ago'],\n ['set', 'ott', 'nov', 'dic'],\n ],\n weekdays: ['lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato', 'domenica'],\n weekdaysShort: ['lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom'],\n weekdaysMin: ['lu', 'ma', 'me', 'gi', 've', 'sa', 'do'],\n },\n es: {\n months: [\n 'enero',\n 'febrero',\n 'marzo',\n 'abril',\n 'mayo',\n 'junio',\n 'julio',\n 'agosto',\n 'septiembre',\n 'octubre',\n 'noviembre',\n 'diciembre',\n ],\n monthsShort: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],\n monthsShortGrouped: [\n ['ene', 'feb', 'mar', 'abr'],\n ['may', 'jun', 'jul', 'ago'],\n ['sep', 'oct', 'nov', 'dic'],\n ],\n weekdays: ['lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado', 'domingo'],\n weekdaysShort: ['lun', 'mar', 'mié', 'jue', 'vie', 'sáb', 'dom'],\n weekdaysMin: ['lu', 'ma', 'mi', 'ju', 'vi', 'sa', 'do'],\n },\n};\n\n/**\n * Returns a JS Date instance of the exact moment\n *\n * ```typescript\n * const date = now()\n * // Wed Mar 10 2021 20:30:32 GMT+0100 (Central European Standard Time)\n * ```\n */\nexport const now = () => new Date();\n\nexport const removeTime = (date: Date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());\n\nexport const pad = (value: number) => String(value).padStart(2, '0');\n\n/**\n * Returns `true` if the given date is valid\n */\nexport const isValidDate = (value: unknown): boolean => {\n return value instanceof Date && !isNaN(value.getTime()) && new Date(value).toString() !== 'Invalid Date';\n};\n\n/**\n * Returns the year number of the given date\n *\n * ```typescript\n * year(new Date(2020, 0, 1)) // 2020\n * ```\n */\nexport const year = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getFullYear();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the month number of the given date\n *\n * ```typescript\n * month(new Date(2020, 0, 1)) // 0\n * ```\n */\nexport const month = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getMonth();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the day number of the given date\n *\n * ```typescript\n * day(new Date(2020, 0, 1)) // 1\n * ```\n */\nexport const day = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getDate();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the hours of the given date\n */\nexport const hours = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getHours();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the minutes of the given date\n */\nexport const minutes = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getMinutes();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the seconds of the given date\n */\nexport const seconds = (date: Date | undefined): number => {\n if (date && isValidDate(date)) {\n return date.getSeconds();\n }\n throw new Error('Not a valid date');\n};\n\n/**\n * Returns the first day of the week of the given date.\n */\nexport const getFirstDayOfTheWeek = (date: Date) => {\n const weekdayDiff = [6, 0, 1, 2, 3, 4, 5];\n const day = new Date(date);\n day.setDate(day.getDate() - weekdayDiff[day.getDay()]);\n return day;\n};\n\n/**\n * Returns `true` when the year of the dates are the same\n */\nexport const isSameYear = (a: Date | undefined, b: Date | undefined) => a?.getFullYear() === b?.getFullYear();\n\n/**\n * Returns `true` when the month of the dates are the same\n */\nexport const isSameMonth = (a: Date | undefined, b: Date | undefined) =>\n isSameYear(a, b) && a?.getMonth() === b?.getMonth();\n\n/**\n * Returns `true` when the day of the dates are the same\n */\nexport const isSameDay = (a: Date | undefined, b: Date | undefined) =>\n isSameMonth(a, b) && a?.getDate() === b?.getDate();\n\n/**\n * Returns `true` when the week of the dates are the same\n */\nexport const isSameWeek = (a: Date, b: Date) => isSameDay(getFirstDayOfTheWeek(a), getFirstDayOfTheWeek(b));\n\nconst localDatetime = (date: Date) => new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n\n/**\n * Returns the ISO string `yyyy-mm-dd` of the given date\n *\n * ```typescript\n * isoString(new Date(2020, 0, 13)) // '2020-01-13'\n * ```\n */\nexport const isoString = (date: Date | undefined): string => {\n if (isNil(date) || Date.toString() === 'Invalid Date') {\n return '';\n }\n\n return `${year(date)}-${pad(month(date) + 1)}-${pad(day(date))}`;\n};\n\n/**\n * Returns the ISO string `yyyy-mm-dd` of the given parameters year, month and day\n *\n * ```typescript\n * newDateString(2020, 0, 13) // '2020-01-13'\n * or\n * newDateString(new Date(2020, 0, 13)) // '2020-01-13'\n * ```\n */\nexport const newDateString = (yearOrDate: Date | number, month?: number, day?: number): string => {\n let date;\n if (isDate(yearOrDate)) {\n date = localDatetime(yearOrDate);\n } else {\n date = new Date(Date.UTC(yearOrDate, (month as number) - 1, day as number));\n }\n\n return isoString(date);\n};\n\n/**\n * Returns `true` if the given datestring is valid\n */\nexport const isValidDateString = (datestring: string | undefined, format: string) => {\n if (!isString(datestring) || !isString(format)) {\n return false;\n }\n\n if (datestring.length < 6 || format.length < 6) {\n return false;\n }\n\n const { day, month } = getDateParts(datestring, format);\n\n if (day > 31 || month > 11 || day <= 0 || month < 0) {\n return false;\n }\n\n const date = toDate(datestring, format);\n\n if (isNil(date)) {\n return false;\n }\n\n return date.toString() !== 'Invalid Date';\n};\n\n/**\n * Returns `true` when the given date is not smaller than the minDate and not bigger than the maxDate.\n *\n * ```typescript\n * isInRange(new Date(2020, 1, 1), new Date(2020, 0, 1), new Date(2020, 2, 1)) // true\n * ```\n */\nexport const isInRange = (date: Date | undefined, minDate: Date | undefined, maxDate: Date | undefined): boolean => {\n if (!date) {\n return true;\n }\n\n if (minDate && date < minDate) {\n return false;\n }\n\n if (maxDate && maxDate < date) {\n return false;\n }\n\n return true;\n};\n\nconst validateTwoDates = (\n first: any,\n second: Date | string | undefined,\n validateFn: (irst: Date, second: Date) => boolean\n) => {\n if (isNil(first) && isNil(second)) {\n return false;\n }\n\n const _first: Date = new Date(first as string | Date);\n const _second: Date = new Date(second as string | Date);\n\n if (!isValidDate(_first) || !isValidDate(_second)) {\n return false;\n }\n\n return validateFn(_first, _second);\n};\n\n/**\n * Returns `true` when the given date is not smaller than the before date.\n *\n * ```typescript\n * isBefore(new Date(2020, 1, 1), new Date(2020, 3, 1)) // true\n * ```\n */\nexport const isBefore = (date: any, beforeDate: Date | string | undefined): boolean =>\n validateTwoDates(date, beforeDate, (first, second) => first < second);\n\n/**\n * Returns `true` when the given date is not smaller than the before date.\n *\n * ```typescript\n * isAfter(new Date(2020, 5, 1), new Date(2020, 3, 1)) // true\n * ```\n */\nexport const isAfter = (date: any, afterDate: Date | string | undefined): boolean =>\n validateTwoDates(date, afterDate, (first, second) => first > second);\n\n/**\n * Increases the year of a date and retunrs the result\n *\n * ```typescript\n * increaseYear(new Date(2020, 0, 1), 1) // 2021\n * ```\n */\nexport const increaseYear = (date: Date, years: number): number => year(date) + years;\n\n/**\n * Decreases the year of a date and retunrs the result\n *\n * ```typescript\n * decreaseYear(new Date(2020, 0, 1), 1) // 2019\n * ```\n */\nexport const decreaseYear = (date: Date, years: number): number => year(date) - years;\n\nconst lookAhead = (iFormat: number, format: string, match: string, length = 2) => {\n const increment = length - 1;\n const followingCharacterMatches = format.charAt(iFormat + increment) === match;\n const hasProperLength = iFormat + increment < format.length;\n return hasProperLength && followingCharacterMatches;\n};\n\nconst formatNumber = (value, len) => {\n let num = String(value);\n\n while (num.length < len) {\n num = '0' + num;\n }\n\n return num;\n};\n\nexport const formatDate = (date: Date | undefined | null, format: string): string => {\n if (date == null) {\n return '';\n }\n\n let output = '';\n\n for (let iFormat = 0; iFormat < format.length; iFormat++) {\n switch (format.charAt(iFormat)) {\n case 'd':\n if (lookAhead(iFormat, format, 'd')) {\n output += formatNumber(date.getDate(), 2);\n iFormat++;\n } else {\n output += String(date.getDate());\n }\n break;\n case 'm':\n if (lookAhead(iFormat, format, 'm')) {\n output += formatNumber(date.getMonth() + 1, 2);\n iFormat++;\n } else {\n output += String(date.getMonth() + 1);\n }\n break;\n case 'y':\n if (lookAhead(iFormat, format, 'y', 4)) {\n iFormat += 3;\n output += date.getFullYear();\n } else {\n output += (date.getFullYear() % 100 < 10 ? '0' : '') + (date.getFullYear() % 100);\n iFormat++;\n }\n break;\n case 'h':\n if (lookAhead(iFormat, format, 'h')) {\n output += formatNumber(date.getHours(), 2);\n iFormat++;\n } else {\n output += String(date.getHours());\n }\n break;\n case 'M':\n if (lookAhead(iFormat, format, 'M')) {\n output += formatNumber(date.getMinutes(), 2);\n iFormat++;\n } else {\n output += String(date.getMinutes());\n }\n break;\n case 's':\n if (lookAhead(iFormat, format, 's')) {\n output += formatNumber(date.getSeconds(), 2);\n iFormat++;\n } else {\n output += String(date.getSeconds());\n }\n break;\n default:\n output += format.charAt(iFormat);\n }\n }\n return output;\n};\n\nconst daylightSavingAdjust = (date): Date => {\n if (!date) {\n return null;\n }\n\n date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\n return date;\n};\n\nconst getDaysCountInMonth = (month: number, year: number) =>\n 32 - daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\nexport const parseDate = (value: any, format: string, locale: string): Date => {\n if (format == null || value == null) {\n throw 'Invalid arguments';\n }\n\n value = typeof value === 'object' ? value.toString() : value + '';\n if (value === '') {\n return null;\n }\n\n let iFormat;\n let dim;\n let extra;\n let iValue = 0;\n let shortYearCutoff = 100;\n let year = -1;\n let month = -1;\n let day = -1;\n let doy = -1;\n let literal = false;\n let date: Date;\n let lookAhead = (match: string, len = 2) => {\n const increment = len - 1;\n let matches = iFormat + increment < format.length && format.charAt(iFormat + increment) === match;\n if (matches) {\n iFormat += increment;\n }\n return matches;\n };\n let getNumber = (match, len = 2) => {\n let isDoubled = lookAhead(match, len),\n size = match === '@' ? 14 : match === '!' ? 20 : match === 'y' && isDoubled ? 4 : match === 'o' ? 3 : 2,\n minSize = match === 'y' ? size : 1,\n digits = new RegExp('^\\\\d{' + minSize + ',' + size + '}'),\n num = value.substring(iValue).match(digits);\n if (!num) {\n throw 'Missing number at position ' + iValue;\n }\n iValue += num[0].length;\n return parseInt(num[0], 10);\n };\n let getName = (match, shortNames, longNames) => {\n let index = -1;\n let arr = lookAhead(match) ? longNames : shortNames;\n let names = [];\n\n for (let i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n names.sort((a, b) => {\n return -(a[1].length - b[1].length);\n });\n\n for (let i = 0; i < names.length; i++) {\n let name = names[i][1];\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[i][0];\n iValue += name.length;\n break;\n }\n }\n\n if (index !== -1) {\n return index + 1;\n } else {\n throw 'Unknown name at position ' + iValue;\n }\n };\n let checkLiteral = () => {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw 'Unexpected literal at position ' + iValue;\n }\n iValue++;\n };\n\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n } else {\n checkLiteral();\n }\n } else {\n switch (format.charAt(iFormat)) {\n case 'd':\n day = getNumber('d');\n break;\n case 'D':\n getName('D', i18nDate[locale].weekdaysShort, i18nDate[locale].weekdays);\n break;\n case 'm':\n month = getNumber('m');\n break;\n case 'M':\n month = getName('M', i18nDate[locale].monthsShort, i18nDate[locale].months);\n break;\n case 'y':\n year = getNumber('y', 4);\n break;\n default:\n checkLiteral();\n }\n }\n }\n\n if (iValue < value.length) {\n extra = value.substr(iValue);\n if (!/^\\s+/.test(extra)) {\n throw 'Extra/unparsed characters found in date: ' + extra;\n }\n }\n\n if (year === -1) {\n year = new Date().getFullYear();\n } else if (year < 100) {\n year += new Date().getFullYear() - (new Date().getFullYear() % 100) + (year <= shortYearCutoff ? 0 : -100);\n }\n\n if (doy > -1) {\n month = 1;\n day = doy;\n do {\n dim = getDaysCountInMonth(year, month - 1);\n if (day <= dim) {\n break;\n }\n month++;\n day -= dim;\n } while (true);\n }\n\n date = daylightSavingAdjust(new Date(year, month - 1, day));\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw 'Invalid date'; // E.g. 31/02/00\n }\n\n return date;\n};\n\nconst FORMATTING_TOKENS = /(\\[[^\\[]*\\])|(mm|dd|yyyy|yy|hh|MM|ss|.)/g;\n\nconst TWO_NUMERICS_REGEX = /\\d\\d/; // 00 - 99\nconst FOUR_NUMERICS_REGEX = /\\d{4}/; // 0000 - 9999\nconst NON_NUMERIC_REGEX = /[^0-9]/g;\n\nconst YEAR = 'year';\nconst MONTH = 'month';\nconst DAY = 'day';\nconst HOUR = 'hour';\nconst MINUTE = 'minute';\nconst SECOND = 'second';\n\ninterface ParseFlagMark {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n date: Date;\n}\n\ntype ParseFlagCallBackReturn = any;\n\ntype ParseFlagRegExp = RegExp | ((locale: any) => RegExp);\ntype ParseFlagCallBack = (input: string) => ParseFlagCallBackReturn;\n\ninterface ParseFlag {\n [key: string]: [ParseFlagRegExp, ParseFlagCallBack];\n}\n\nconst parseFlags: ParseFlag = {};\n\nconst addParseFlag = (token: string | string[], regex: ParseFlagRegExp, callback) => {\n const tokens = Array.isArray(token) ? token : [token];\n let func: ParseFlagCallBack;\n if (typeof callback === 'string') {\n func = (input) => {\n const value = parseInt(input, 10);\n return { [callback]: value };\n };\n } else {\n func = callback;\n }\n tokens.forEach((key) => {\n parseFlags[key] = [regex, func];\n });\n};\n\naddParseFlag('yy', TWO_NUMERICS_REGEX, (input) => {\n const year = new Date().getFullYear();\n const cent = Math.floor(year / 100);\n let value = parseInt(input, 10);\n value = (value > 68 ? cent - 1 : cent) * 100 + value;\n return { [YEAR]: value };\n});\naddParseFlag('yyyy', FOUR_NUMERICS_REGEX, YEAR);\naddParseFlag('mm', TWO_NUMERICS_REGEX, (input) => ({ [MONTH]: parseInt(input, 10) - 1 }));\naddParseFlag('dd', TWO_NUMERICS_REGEX, DAY);\naddParseFlag('hh', TWO_NUMERICS_REGEX, HOUR);\naddParseFlag('MM', TWO_NUMERICS_REGEX, MINUTE);\naddParseFlag('ss', TWO_NUMERICS_REGEX, SECOND);\n\ntype DateArgs = [number, number, number, number, number, number];\n\nconst getFullInputArray = (input: Array<number | undefined>, backupDate = new Date()) => {\n const result: DateArgs = [0, 0, 1, 0, 0, 0];\n const backupArr = [\n backupDate.getFullYear(),\n backupDate.getMonth(),\n backupDate.getDate(),\n backupDate.getHours(),\n backupDate.getMinutes(),\n backupDate.getSeconds(),\n ];\n\n let useBackup = true;\n for (let i = 0; i < 7; i++) {\n if (input[i] === undefined) {\n result[i] = useBackup ? backupArr[i] : result[i];\n } else {\n result[i] = input[i]!;\n useBackup = false;\n }\n }\n return result;\n};\n\nconst createDate = (year: number, month: number, day: number, hour: number, minute: number, second: number): Date => {\n if (!(year < 100 && year >= 0)) {\n return new Date(year, month, day, hour, minute, second);\n }\n\n const date = new Date(year + 400, month, day, hour, minute, second);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(year);\n }\n return date;\n};\n\nconst makeParser = (dateString: string, format: string) => {\n const tokens = format.match(FORMATTING_TOKENS);\n if (!tokens) {\n throw new Error();\n }\n const { length } = tokens;\n let mark: Partial<ParseFlagMark> = {};\n for (let i = 0; i < length; i += 1) {\n const token = tokens[i];\n const parseTo = parseFlags[token];\n if (!parseTo) {\n const word = token.replace(/^\\[|\\]$/g, '');\n if (dateString.indexOf(word) === 0) {\n dateString = dateString.substr(word.length);\n } else {\n throw new Error('not match');\n }\n } else {\n const regex = parseTo[0] as RegExp;\n const parser = parseTo[1];\n const value = (regex.exec(dateString) || [])[0];\n const obj = parser(value);\n mark = { ...mark, ...obj };\n dateString = dateString.replace(value, '');\n }\n }\n return mark;\n};\n\nconst getCleanDateString = (dirtyDateString: string, format: string) => {\n if (dirtyDateString.length === format.length) {\n return dirtyDateString;\n }\n\n const separator = dirtyDateString.match(NON_NUMERIC_REGEX)[0];\n\n // pad signle digits to follow supported dateformats\n return dirtyDateString\n .split(separator)\n .map((s) => (s.length === 1 ? '0' + s : s))\n .join(separator);\n};\n\nconst getDateParts: (dirtyDateString: string, format: string) => Partial<ParseFlagMark> = (\n dirtyDateString: string,\n format: string\n) => {\n const dateString = getCleanDateString(dirtyDateString, format);\n\n return makeParser(dateString, format);\n};\n\nexport const toDate = (dirtyDateString: string | undefined, format: string): Date | undefined => {\n try {\n const { backupDate = new Date() } = {};\n const { year, month, day, hour, minute, second, date } = getDateParts(dirtyDateString, format);\n if (date != null) {\n return date;\n }\n const inputArray = [year, month, day, hour, minute, second];\n const result = getFullInputArray(inputArray, backupDate);\n return createDate(...result);\n } catch (e) {\n return new Date(NaN);\n }\n};\n\nexport interface PointerDate {\n year: number;\n month: number;\n day: number;\n hours: number;\n minutes: number;\n seconds: number;\n}\n\nexport interface CalendarGridArgs {\n firstDateOfBox: Date;\n minDate?: Date;\n maxDate?: Date;\n dateFormat: SixDateFormats;\n pointerDate: { month: number; year: number; day: number };\n allowedDates: (date: Date) => boolean;\n locale: 'en' | 'de' | 'fr' | 'it' | 'es';\n selectedDate?: Date;\n}\n\nexport const createCalendarGrid: (calendarGridArguments: CalendarGridArgs) => CalendarCell[][] = (\n calendarGridArguments: CalendarGridArgs\n) => {\n const { firstDateOfBox, allowedDates, dateFormat, selectedDate, minDate, maxDate, pointerDate } =\n calendarGridArguments;\n\n const weekDatePointer = new Date(firstDateOfBox);\n const dayDatePointer = new Date(firstDateOfBox);\n\n let calendar: CalendarCell[][] = [];\n\n do {\n let row: CalendarCell[] = [];\n do {\n row = [\n ...row,\n {\n date: new Date(dayDatePointer),\n display: formatDate(dayDatePointer, dateFormat),\n dateString: formatDate(dayDatePointer, dateFormat),\n label: day(dayDatePointer).toString(),\n isToday: isSameDay(dayDatePointer, now()),\n isSelected: selectedDate && isSameDay(dayDatePointer, selectedDate),\n isDisabled: !allowedDates(dayDatePointer) || !isInRange(dayDatePointer, minDate, maxDate),\n isOutdated: pointerDate.month !== dayDatePointer.getMonth() || !isInRange(dayDatePointer, minDate, maxDate),\n },\n ];\n dayDatePointer.setDate(dayDatePointer.getDate() + 1);\n } while (isSameWeek(dayDatePointer, weekDatePointer));\n calendar = [...calendar, row];\n weekDatePointer.setDate(weekDatePointer.getDate() + 7);\n } while (isSameMonth(new Date(pointerDate.year, pointerDate.month, pointerDate.day), dayDatePointer));\n return calendar;\n};\n\n/**\n * Returns a range of numbers around the given number grouped into buckets of 5.\n * @param number the given number around which you want to get the other numbers\n * @param range range of numbers to include in the result\n */\nexport function rangeAround(number: number, range: number): number[][] {\n const itemsPerGroup = 5;\n return [...Array(range).keys()]\n .map((n) => n + number - Math.floor(range / 2))\n .reduce((curr, item, index) => {\n if (index % itemsPerGroup === 0) {\n curr.push([]);\n }\n curr[curr.length - 1].push(item);\n return curr;\n }, [] as number[][]);\n}\n","// eslint-disable-next-line @stencil-community/ban-exported-const-enums\nexport enum SixDateFormats {\n DDMMYYY_DOT = 'dd.mm.yyyy',\n YYYYMMDD_DASH = 'yyyy-mm-dd',\n DDMMYYYY_DASH = 'dd-mm-yyyy',\n DDMMYYYY_SLASH = 'dd/mm/yyyy',\n YYYYMMDD_SLASH = 'yyyy/mm/dd',\n DDMMYY_DOT = 'dd.mm.yy',\n YYMMDD_DASH = 'yy-mm-dd',\n DDMMYY_DASH = 'dd-mm-yy',\n DDMMYY_SLASH = 'dd/mm/yy',\n YYMMDD_SLASH = 'yy/mm/dd',\n\n DDMMYYY_DOT_TIME = 'dd.mm.yyyy hh:MM:ss',\n YYYYMMDD_DASH_TIME = 'yyyy-mm-dd hh:MM:ss',\n DDMMYYYY_DASH_TIME = 'dd-mm-yyyy hh:MM:ss',\n DDMMYYYY_SLASH_TIME = 'dd/mm/yyyy hh:MM:ss',\n YYYYMMDD_SLASH_TIME = 'yyyy/mm/dd hh:MM:ss',\n DDMMYY_DOT_TIME = 'dd.mm.yy hh:MM:ss',\n YYMMDD_DASH_TIME = 'yy-mm-dd hh:MM:ss',\n DDMMYY_DASH_TIME = 'dd-mm-yy hh:MM:ss',\n DDMMYY_SLASH_TIME = 'dd/mm/yy hh:MM:ss',\n YYMMDD_SLASH_TIME = 'yy/mm/dd hh:MM:ss',\n}\n","import { h } from '@stencil/core';\nimport { DateLocale, now } from '../../../utils/date-util';\n\ninterface MonthSelectionParams {\n locale: DateLocale;\n selectedDate?: Date;\n onClickMonthCell: (month: string) => void;\n}\nexport const MonthSelection = (monthSelectionParams: MonthSelectionParams) => {\n const locale = monthSelectionParams.locale;\n const isToday = (value: string) => locale.monthsShort[now().getMonth()] === value;\n\n const isSelectedMonth = (value: string) =>\n monthSelectionParams.selectedDate?.getMonth() === locale.monthsShort.findIndex((m) => m === value);\n\n return (\n <table class=\"datepicker-table\" part=\"month-selection\">\n <tbody>\n {locale.monthsShortGrouped.map((row: string[]) => (\n <tr class=\"datepicker-table__row\">\n {row.map((month) => (\n <td\n onClick={() => monthSelectionParams.onClickMonthCell(month)}\n class={{\n 'datepicker-table__cell': true,\n 'datepicker-table__cell--is-today': isToday(month),\n 'datepicker-table__cell--is-selected': isSelectedMonth(month),\n }}\n >\n {month}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","import { h } from '@stencil/core';\nimport { DateLocale } from '../../../utils/date-util';\nimport { CalendarCell } from '../six-datepicker';\n\ninterface DaySelectionParams {\n locale: DateLocale;\n calendarGrid: CalendarCell[][];\n onClickDateCell: (cell: CalendarCell) => void;\n}\nexport const DaySelection = (daySelectionParams: DaySelectionParams) => {\n return (\n <table class=\"datepicker-table\" part=\"day-selection\">\n <thead part=\"weekday-header\">\n {daySelectionParams.locale.weekdaysMin.map((weekday) => (\n <th class=\"datepicker__cell\">{weekday}</th>\n ))}\n </thead>\n <tbody>\n {daySelectionParams.calendarGrid.map((row) => (\n <tr class=\"datepicker-table__row\">\n {row.map((cell) => (\n <td\n data-date={cell.dateString}\n onClick={() => daySelectionParams.onClickDateCell(cell)}\n class={{\n 'datepicker-table__cell': true,\n 'datepicker-table__cell--is-today': cell.isToday,\n 'datepicker-table__cell--is-selected': cell.isSelected,\n 'datepicker-table__cell--is-outdated': cell.isOutdated,\n 'datepicker-table__cell--is-disabled': cell.isDisabled,\n 'datepicker-table__cell--is-selectable': !cell.isDisabled,\n }}\n >\n {cell.label}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","import { now } from '../../../utils/date-util';\nimport { h } from '@stencil/core';\n\ninterface YearSelectionParams {\n selectedDate?: Date;\n yearSelection: number[][];\n onClickYearCell: (year: number) => void;\n}\nexport const YearSelection = (yearSelectionParams: YearSelectionParams) => {\n return (\n <table class=\"datepicker-table\" part=\"year-selection\">\n <tbody>\n {yearSelectionParams.yearSelection.map((row) => (\n <tr class=\"datepicker-table__row\">\n {row.map((year) => (\n <td\n onClick={() => yearSelectionParams.onClickYearCell(year)}\n class={{\n 'datepicker-table__cell': true,\n 'datepicker-table__cell--is-today': now().getFullYear() === year,\n 'datepicker-table__cell--is-selected': yearSelectionParams.selectedDate?.getFullYear() === year,\n }}\n >\n {year}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n","@import 'src/global/component';\n\n:host {\n display: block;\n font-family: var(--six-font-family);\n}\n\n.datepicker {\n &__container {\n position: relative;\n }\n\n &__popup {\n min-width: 400px;\n background-color: white;\n padding: 0.5em 0.5em 1.5em;\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%);\n user-select: none;\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n right: 0;\n left: 0;\n\n &--is-up {\n bottom: 100%;\n // fix problem where you would need to jump around with the cursor when switching months and\n // its a dropup since not all months have the same height\n min-height: 382px;\n }\n\n &--is-inline {\n position: initial;\n box-shadow: none;\n border: 1px solid var(--six-color-web-rock-400);\n }\n }\n}\n\n.datepicker-header {\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid var(--six-color-web-rock-400);\n padding: 0.5em;\n margin-bottom: 1em;\n\n & svg {\n fill: var(--six-color-web-rock-900);\n stroke: none;\n }\n\n &__btn {\n cursor: pointer;\n width: 2.5em;\n height: 2.5em;\n display: flex;\n vertical-align: middle;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n border-radius: 100%;\n }\n }\n\n &__label {\n display: flex;\n\n & > div {\n cursor: pointer;\n padding: 0.5em;\n display: flex;\n vertical-align: middle;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n }\n }\n }\n}\n\n.datepicker-table {\n width: 100%;\n\n &__cell {\n text-align: center;\n width: 2.5rem;\n height: 2.5rem;\n cursor: pointer;\n\n &:hover {\n background-color: var(--six-color-web-rock-100);\n }\n\n &--is-today {\n border: 1px solid var(--six-color-web-rock-400);\n }\n\n &--is-selected {\n background-color: var(--six-color-red);\n color: var(--six-color-white);\n }\n\n &--is-disabled {\n background-color: var(--six-color-web-rock-200);\n cursor: initial;\n\n &:hover {\n background-color: var(--six-color-web-rock-200);\n }\n }\n\n &--is-outdated {\n color: var(--six-color-web-rock-400);\n }\n }\n}\n\n// Clearable\n.datepicker-clear {\n display: inline-flex;\n align-items: center;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n padding: 0;\n transition: var(--six-transition-fast) color;\n cursor: pointer;\n\n &:hover {\n color: var(--six-input-icon-color-hover);\n }\n\n &:focus {\n outline: none;\n }\n\n &--right {\n right: 0;\n position: absolute;\n }\n\n &--left {\n right: 35px;\n position: absolute;\n }\n}\n\n.input--empty .datepicker-clear {\n visibility: hidden;\n}\n\n// Icon position\n.prefix {\n cursor: pointer;\n\n &--right {\n right: 0;\n display: inline-flex;\n position: absolute;\n font-size: inherit;\n color: var(--six-input-icon-color);\n border: none;\n background: none;\n margin-right: var(--six-input-spacing-medium);\n transition: var(--six-transition-fast) color;\n }\n}\n\n// time-picker\nsix-timepicker::part(popup) {\n border: none;\n padding: 0.5em 0.5em 0;\n min-height: 0;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport {\n createCalendarGrid,\n day,\n formatDate,\n getFirstDayOfTheWeek,\n hours,\n i18nDate,\n isValidDate,\n isValidDateString,\n minutes,\n month,\n now,\n PointerDate,\n rangeAround,\n removeTime,\n seconds,\n toDate,\n year,\n} from '../../utils/date-util';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, debounceEvent, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixDateFormats } from './six-date-formats';\nimport { MonthSelection } from './components/month-selection';\nimport { DaySelection } from './components/day-selection';\nimport { YearSelection } from './components/year-selection';\nimport { SixTimepickerChange } from '../six-timepicker/six-timepicker';\nimport {\n adjustPopupForHoisting,\n adjustPopupForSmallScreens,\n calcIsDropDownContentUp,\n movePopup,\n} from '../../utils/popup';\n\nconst NUMBER_OF_YEARS_SHOWN = 25;\n\nconst MIN_POPUP_HEIGHT = 400;\n\nexport type SixDatepickerSelectPayload = Date | undefined | null;\n\nexport interface CalendarCell {\n date: Date;\n dateString: string;\n display: string;\n isDisabled: boolean;\n isOutdated: boolean;\n isSelected: boolean;\n isToday: boolean;\n label: string;\n}\n\nenum SelectionMode {\n DAY = 'day',\n MONTH = 'month',\n YEAR = 'year',\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define a footer for the date picker.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n */\n@Component({\n tag: 'six-datepicker',\n styleUrl: 'six-datepicker.scss',\n shadow: true,\n})\nexport class SixDatepicker {\n private eventListeners = new EventListeners();\n private inputElement?: HTMLSixInputElement;\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private selectedDate?: Date;\n\n @Element() host!: HTMLSixDatepickerElement;\n\n @State() private pointerDate = SixDatepicker.getCurrentDateAsPointer();\n @State() selectionMode: SelectionMode = SelectionMode.DAY;\n @State() isDropDownContentUp = false;\n\n /**\n * Set the type.\n */\n @Prop() type: 'date' | 'date-time' = 'date';\n\n /**\n * The language used to render the weekdays and months.\n */\n @Prop() locale: 'en' | 'de' | 'fr' | 'it' | 'es' = 'en';\n\n /** Indicates whether or not the calendar dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether or not the calendar should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a date via the component in the popup, but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Callback to determine which date in the datepicker should be selectable.\n * the callback function will get a datestring as an argument, e.g. '2021-07-04'\n *\n * Usage e.g.:\n * const datepicker = document.getElementById('allowed-date-picker');\n * datepicker.allowedDates = datestring => parseInt(datestring.split('-')[2], 10) % 2 === 0;\n */\n @Prop() allowedDates: (date: Date) => boolean = () => true;\n\n /**\n * The minimum datetime allowed. Value must be a date object\n */\n @Prop() min?: Date;\n\n /**\n * The maximum datetime allowed. Value must be a date object\n */\n @Prop() max?: Date;\n\n /**\n * Closes the datepicker dropdown after selection\n */\n @Prop() closeOnSelect = this.type === 'date';\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Datepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The date to defines where the datepicker popup starts. The prop accepts ISO 8601 date strings (YYYY-MM-DD).\n */\n @Prop() defaultDate?: string;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /**\n * The value of the form field, which accepts a date object.\n */\n @Prop({ mutable: true }) value?: Date;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /** Define the dateFormat. Valid formats are:\n * 'dd.mm.yyyy'\n * 'yyyy-mm-dd'\n * 'dd-mm-yyyy'\n * 'dd/mm/yyyy'\n * 'yyyy/mm/dd'\n * 'dd.mm.yy'\n * 'yy-mm-dd'\n * 'dd-mm-yy'\n * 'dd/mm/yy'\n * 'yy/mm/dd'\n * */\n @Prop() dateFormat: SixDateFormats = SixDateFormats.DDMMYYY_DOT;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `dateChange` event after each keystroke.\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.sixSelect = debounceEvent(this.sixSelect, this.debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n if (this.value != null && !isValidDate(this.value)) {\n console.warn('invalid date value: ', this.value);\n this.value = undefined;\n this.sixSelect.emit(this.value);\n }\n this.selectedDate = this.value;\n this.updatePointerDates();\n }\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-select' }) sixSelect!: EventEmitter<SixDatepickerSelectPayload>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-datepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when a option got selected.\n */\n @Event({ eventName: 'six-datepicker-blur' }) sixBlur!: EventEmitter<SixDatepickerSelectPayload>;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.updateDropdownDirection();\n this.moveOpenHoistedPopup();\n this.adjustPopupPosition();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.updateDropdownDirection();\n this.moveOpenHoistedPopup();\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n get container() {\n return this.containingElement || this.host;\n }\n\n get firstDateOfBox(): Date {\n const date = new Date(this.pointerDate.year, this.pointerDate.month, 1);\n return getFirstDayOfTheWeek(date);\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n get calendarGrid() {\n return createCalendarGrid({\n firstDateOfBox: this.firstDateOfBox,\n allowedDates: this.allowedDates,\n dateFormat: this.dateFormat,\n locale: this.locale,\n selectedDate: this.selectedDate,\n minDate: this.min,\n maxDate: this.max,\n pointerDate: this.pointerDate,\n });\n }\n\n private updateDropdownDirection() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n this.isDropDownContentUp = calcIsDropDownContentUp(this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private getMonthStringForIndex(index: number) {\n return i18nDate[this.locale].months[index];\n }\n\n private previousUnit = () => {\n if (this.selectionMode === SelectionMode.DAY) {\n this.previousMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.previousYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.previousYearGroup();\n }\n };\n\n private previousYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - 1 };\n }\n\n private previousYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - NUMBER_OF_YEARS_SHOWN };\n }\n\n private previousMonth() {\n if (this.pointerDate.month === 0) {\n this.pointerDate = { year: this.pointerDate.year - 1, month: 11, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month - 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextUnit = () => {\n if (this.selectionMode === SelectionMode.DAY) {\n this.nextMonth();\n } else if (this.selectionMode === SelectionMode.MONTH) {\n this.nextYear();\n } else if (this.selectionMode === SelectionMode.YEAR) {\n this.nextYearGroup();\n }\n };\n\n private nextMonth() {\n if (this.pointerDate.month === 11) {\n this.pointerDate = { year: this.pointerDate.year + 1, month: 0, day: 1, hours: 0, minutes: 0, seconds: 0 };\n } else {\n this.pointerDate = {\n year: this.pointerDate.year,\n month: this.pointerDate.month + 1,\n day: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n };\n }\n }\n\n private nextYear() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + 1 };\n }\n\n private nextYearGroup() {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + NUMBER_OF_YEARS_SHOWN };\n }\n\n private openCalendar() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.setupEventListenersForOpenPopup();\n }\n }\n\n private setupEventListenersForOpenPopup() {\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (this.open && keyboardEvent.key === 'Escape') {\n keyboardEvent.stopPropagation();\n this.closePopup();\n void this.inputElement?.setFocus();\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n this.closePopup();\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = async (event: MouseEvent) => {\n event.stopPropagation();\n await this.select(undefined);\n this.sixClear.emit();\n };\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n this.selectionMode = SelectionMode.DAY;\n }\n\n private updatePointerDates() {\n const date = this.getPointerDate();\n if (this.differsFromPointerDate(date)) {\n this.pointerDate = {\n year: year(date),\n month: month(date),\n day: day(date),\n hours: hours(date),\n minutes: minutes(date),\n seconds: seconds(date),\n };\n }\n }\n\n private differsFromPointerDate(date?: Date): boolean {\n return (\n this.pointerDate.day !== day(date) ||\n this.pointerDate.month !== month(date) ||\n this.pointerDate.year !== year(date) ||\n this.pointerDate.hours !== hours(date) ||\n this.pointerDate.minutes !== minutes(date) ||\n this.pointerDate.seconds !== seconds(date)\n );\n }\n\n private getPointerDate(): Date | undefined {\n if (this.selectedDate !== undefined && this.selectedDate !== null) {\n return this.selectedDate;\n }\n if (this.defaultDate == null) {\n return this.type === 'date' ? removeTime(now()) : now();\n } else {\n return toDate(this.defaultDate, this.dateFormat);\n }\n }\n\n private updateValue(newDate?: Date) {\n this.updateIfChanged(newDate);\n }\n\n private updateIfChanged(newDate?: Date) {\n if (this.value?.getTime() === newDate?.getTime()) {\n return;\n }\n this.value = newDate;\n this.sixSelect.emit(this.value);\n }\n\n /**\n * Selects an option\n */\n @Method()\n async select(datestring?: string) {\n if (datestring == null) {\n this.updateValue(undefined);\n } else {\n const newDate = toDate(datestring, this.dateFormat);\n newDate?.setHours(this.pointerDate.hours, this.pointerDate.minutes, this.pointerDate.seconds);\n this.updateValue(newDate);\n }\n\n this.updatePointerDates();\n\n if (this.closeOnSelect) {\n this.closePopup();\n }\n }\n\n private onTimepickerChange = (sixTimepickerChange: CustomEvent<SixTimepickerChange>) => {\n const time = sixTimepickerChange.detail.value;\n const newDate = new Date();\n\n if (this.selectedDate != null) {\n newDate.setFullYear(this.selectedDate.getFullYear(), this.selectedDate.getMonth(), this.selectedDate.getDate());\n }\n\n if (time != null) {\n const hours = time.hours;\n const minutes = time.minutes;\n const seconds = time.seconds;\n if (hours != null) {\n newDate.setHours(hours, minutes, seconds);\n }\n }\n\n this.updateValue(newDate);\n this.updatePointerDates();\n };\n\n private onClickDateCell = (cell: CalendarCell) => {\n if (!cell.isDisabled) {\n void this.select(cell.dateString);\n }\n };\n\n private onClickMonthCell = (selectedMonth: string) => {\n const month = i18nDate[this.locale].monthsShort.findIndex((monthShort) => monthShort === selectedMonth);\n this.pointerDate = { ...this.pointerDate, month };\n this.selectionMode = SelectionMode.DAY;\n };\n\n private onClickYearCell = (year: number) => {\n this.pointerDate = { ...this.pointerDate, year };\n this.selectionMode = SelectionMode.DAY;\n };\n\n private handleInputChange = (event: Event) => {\n if (this.inputElement == null) {\n return;\n }\n event.stopPropagation();\n\n const inputValue = this.inputElement.value;\n if (!isValidDateString(inputValue, this.dateFormat)) {\n return;\n }\n\n const inputValueDate = toDate(inputValue, this.dateFormat);\n\n if (inputValueDate === undefined) {\n return;\n }\n\n this.updateIfChanged(inputValueDate);\n const datesOnly = inputValue.replace(/[^\\d]/g, '');\n if (datesOnly.length >= 6) {\n const date = toDate(inputValue, this.dateFormat);\n const dateAsString = formatDate(date, this.dateFormat);\n if (isValidDateString(dateAsString, this.dateFormat)) {\n this.selectedDate = toDate(dateAsString, this.dateFormat);\n this.updatePointerDates();\n this.updateValue(this.selectedDate);\n }\n }\n };\n\n private handleOnBlur = (event: Event) => {\n event.stopPropagation();\n\n // clear the value if the user deleted the date\n if (this.inputElement?.value === '' && isValidDate(this.value)) {\n this.value = undefined;\n this.sixSelect.emit(this.value);\n }\n\n const currentDate = toDate(this.inputElement?.value, this.dateFormat);\n if (isValidDate(currentDate) && this.value?.getTime() !== currentDate?.getTime()) {\n // Set the value if the input field's value has changed. This can happen if the blur occurs\n // before the change event had a chance to fire due to its debouncing.\n this.value = currentDate;\n }\n if (this.inputElement != null) {\n this.inputElement.value = formatDate(this.value, this.dateFormat);\n }\n this.sixBlur.emit(this.value);\n };\n\n componentWillLoad() {\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.updateValue(this.value);\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.setupEventListenersForOpenPopup();\n }\n }\n\n componentDidLoad() {\n if (this.inputElement != null) {\n this.eventListeners.add(this.inputElement, 'six-input-input', debounce(this.handleInputChange, this.debounce));\n this.eventListeners.add(this.inputElement, 'six-input-blur', this.handleOnBlur);\n }\n }\n\n componentDidRender() {\n this.adjustPopupPosition();\n }\n\n private renderHeader() {\n return (\n <header class=\"datepicker-header\" part=\"header\">\n <div class=\"datepicker-header__btn prev\" onClick={this.previousUnit}>\n <svg viewBox=\"0 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z\" />\n </svg>\n </div>\n\n <div class=\"datepicker-header__label\">\n {this.selectionMode === SelectionMode.DAY && (\n <div onClick={() => (this.selectionMode = SelectionMode.MONTH)}>\n <span class=\"datepicker-header__label-month\">{this.getMonthStringForIndex(this.pointerDate.month)}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode !== SelectionMode.YEAR && (\n <div onClick={() => (this.selectionMode = SelectionMode.YEAR)}>\n <span class=\"datepicker-header__label-year\">{this.pointerDate.year}</span>\n <span>\n <svg viewBox=\"-3 -4 24 24\" width=\"20\" height=\"20\">\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n </div>\n )}\n\n {this.selectionMode === SelectionMode.YEAR && (\n <div>\n {this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2)} –{' '}\n {this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2)}\n </div>\n )}\n </div>\n\n <div class=\"datepicker-header__btn next\" onClick={this.nextUnit}>\n <svg viewBox=\"5 5 13 13\" width=\"14\" height=\"23\">\n <path d=\"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z\" />\n </svg>\n </div>\n </header>\n );\n }\n\n private renderBody() {\n switch (this.selectionMode) {\n case SelectionMode.DAY:\n return (\n <DaySelection\n locale={i18nDate[this.locale]}\n calendarGrid={this.calendarGrid}\n onClickDateCell={this.onClickDateCell}\n />\n );\n case SelectionMode.MONTH:\n return (\n <MonthSelection\n locale={i18nDate[this.locale]}\n selectedDate={this.selectedDate}\n onClickMonthCell={this.onClickMonthCell}\n />\n );\n case SelectionMode.YEAR:\n return (\n <YearSelection\n selectedDate={this.selectedDate}\n yearSelection={rangeAround(this.pointerDate.year, NUMBER_OF_YEARS_SHOWN)}\n onClickYearCell={this.onClickYearCell}\n />\n );\n }\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>today</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n 'datepicker-clear': true,\n 'datepicker-clear--right': this.iconPosition === 'left',\n 'datepicker-clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n render() {\n this.adjustPopupPosition();\n\n return (\n <div ref={(el) => (this.wrapper = el)} class=\"datepicker__container\">\n <six-input\n part=\"base\"\n value={formatDate(this.value, this.dateFormat)}\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n name={this.name}\n label={this.label}\n required={this.required}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n invalid={this.invalid}\n onClick={() => this.openCalendar()}\n size={this.size}\n class={{ 'input--empty': this.value == null }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\"></slot>\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n part=\"popup\"\n ref={(el) => (this.popup = el)}\n class={{\n datepicker__popup: true,\n 'datepicker__popup--is-up': this.placement != null ? this.placement === 'top' : this.isDropDownContentUp,\n 'datepicker__popup--is-inline': this.inline,\n }}\n >\n {this.renderHeader()}\n {this.renderBody()}\n {this.type === 'date-time' && (\n <six-timepicker\n debounce={this.debounce}\n inline={true}\n onSix-timepicker-change-debounced={(event) => this.onTimepickerChange(event)}\n value={\n this.selectedDate?.getHours() +\n ':' +\n this.selectedDate?.getMinutes() +\n ':' +\n this.selectedDate?.getSeconds()\n }\n ></six-timepicker>\n )}\n <div class=\"datepicker__footer\">\n <slot />\n </div>\n </div>\n )}\n </div>\n );\n }\n\n private adjustPopupPosition() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n adjustPopupForSmallScreens(this.popup);\n }\n\n connectedCallback() {\n this.eventListeners.forward('six-datepicker-select', 'change', this.host);\n this.eventListeners.forward('six-datepicker-blur', 'blur', this.host);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private static getCurrentDateAsPointer(): PointerDate {\n return {\n year: year(now()),\n month: month(now()),\n day: day(now()),\n hours: hours(now()),\n minutes: minutes(now()),\n seconds: seconds(now()),\n };\n }\n}\n"],"mappings":"kOAAO,MAAMA,EAAYC,UAA2CA,IAAU,SAGvE,MAAMC,EAASD,GAA8CA,GAAS,KCKtE,MAAME,EAAW,CACtBC,GAAI,CACFC,OAAQ,CACN,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,YAEFC,YAAa,CAAC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OAC3FC,mBAAoB,CAClB,CAAC,MAAO,MAAO,MAAO,OACtB,CAAC,MAAO,MAAO,MAAO,OACtB,CAAC,MAAO,MAAO,MAAO,QAExBC,SAAU,CAAC,SAAU,UAAW,YAAa,WAAY,SAAU,WAAY,UAC/EC,cAAe,CAAC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OAC1DC,YAAa,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,OAEpDC,GAAI,CACFN,OAAQ,CACN,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,YAEFC,YAAa,CAAC,OAAQ,OAAQ,OAAQ,OAAQ,MAAO,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QACrGC,mBAAoB,CAClB,CAAC,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AAsF,GACNyD,EACE1H,KAAKoE,MACLpE,KAAKqE,MACLrE,KAAKkB,aACLlB,KAAKsE,QACLzE,IACC8H,GAAU3H,KAAK4E,oBAAsB+C,IAExCC,EAA2B5H,KAAKqE,M,CAGlC,iBAAAwD,GACE7H,KAAKC,eAAe6H,QAAQ,wBAAyB,SAAU9H,KAAKwE,MACpExE,KAAKC,eAAe6H,QAAQ,sBAAuB,OAAQ9H,KAAKwE,K,CAGlE,oBAAAuD,GACE/H,KAAKC,eAAe+H,W,CAGd,8BAAO5E,GACb,MAAO,CACLrN,KAAMA,EAAKX,KACXa,MAAOA,EAAMb,KACbc,IAAKA,EAAId,KACTe,MAAOA,EAAMf,KACbiB,QAASA,EAAQjB,KACjBmB,QAASA,EAAQnB,K"}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as r}from"./p-05eb1bab.js";const s=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.six-footer{color:var(--six-color-web-rock-900);padding:var(--six-spacing-x-small) 0;text-align:center;width:100%;background-color:var(--six-footer-background-color);box-shadow:var(--six-shadow-medium-top)}";const e=s;const t=class{constructor(r){o(this,r)}render(){return r("footer",{key:"3208d35f8c2cec42795d713465cb1488ec2d4e57",class:"six-footer"},r("slot",{key:"8f9854ed0e213425ea459947635993a1e6b29d54"}))}};t.style=e;export{t as six_footer};
2
+ //# sourceMappingURL=p-3603dd96.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as i}from"./p-f93d8a4e.js";const t=".six-error-page__title{display:flex;justify-content:center;font-size:var(--six-font-size-xx-large);font-weight:bold;margin-bottom:var(--six-spacing-large)}.six-error-page__description>*{text-align:center}.six-error-page__icon-container{display:flex;justify-content:center}.six-error-page__icon::part(icon){background-color:var(--six-color-web-rock-300)}";const n=t;const r={403:{en:"Access Denied",de:"Kein Zugriff"},404:{en:"Not Found",de:"Seite nicht gefunden"},500:{en:"Ooops!",de:"Ups!"}};const s={403:{en:["You don’t have permission to access this page. ","Please contact an administrator or click the SIX logo on top left."],de:["Sie haben keine Zugriffsberechtigung auf diese Seite.","Bitte wenden Sie sich an einen Administrator oder klicken Sie auf das SIX-Logo oben links."]},404:{en:["We have not found the page you requested.","Please click the SIX logo on top left."],de:["Wir haben die angeforderte Seite nicht gefunden.","Bitte klicken Sie auf das SIX-Logo oben links."]},500:{en:["Sorry, we messed up! We try to fix this.","Please click the SIX logo on top left."],de:["Sorry, das war unser Fehler! Wir versuchen das zu beheben.","Bitte klicken Sie auf das SIX-Logo oben links."]}};const o=class{constructor(i){e(this,i);this.errorCode=undefined;this.language="en";this.customTitle=undefined;this.customDescription=undefined;this.customIcon=undefined}getIconName(){if(this.customIcon!=null){return this.customIcon}if(this.errorCode==null){return}if(this.errorCode===403){return"lock"}if(this.errorCode===404){return"find-in-page"}if(this.errorCode===500){return"sentiment-dissatisfied"}}getErrorTitle(){if(this.customTitle!=null){return this.customTitle}if(this.errorCode==null){return}return r[this.errorCode][this.language]}getErrorDescription(){var e;if(this.errorCode==null&&this.customDescription==null){return}const t=(e=this.getDescriptions())!==null&&e!==void 0?e:[];return t.map((e=>i("div",null,e)))}getDescriptions(){if(this.customDescription!==undefined){return this.customDescription}if(this.errorCode==null){return}return s[this.errorCode][this.language]}render(){return i("div",{key:"ed449c11128a99a7ff01033a272fde353836427a",part:"container"},i("div",{key:"d8d429ea654b7c456f04056ce4559fc06ce19097",class:"six-error-page__icon-container",part:"icon-container"},i("six-picto",{key:"a3acb3bba824b6488144e92405b4b90a13a8d668",size:"4xl",class:"six-error-page__icon",part:"icon"},this.getIconName())),i("div",{key:"3208af509a702f9dc675eab9c5124465eb39a0bb",class:"six-error-page__title",part:"title"},this.getErrorTitle()),i("div",{key:"28f883358e09da5c67b056defacaf89f43dfdcee",class:"six-error-page__description",part:"description"},this.getErrorDescription()))}};o.style=n;export{o as six_error_page};
2
- //# sourceMappingURL=p-52c04973.entry.js.map
1
+ import{r as e,h as i}from"./p-05eb1bab.js";const t=".six-error-page__title{display:flex;justify-content:center;font-size:var(--six-font-size-xx-large);font-weight:bold;margin-bottom:var(--six-spacing-large)}.six-error-page__description>*{text-align:center}.six-error-page__icon-container{display:flex;justify-content:center}.six-error-page__icon::part(icon){background-color:var(--six-color-web-rock-300)}";const n=t;const r={403:{en:"Access Denied",de:"Kein Zugriff"},404:{en:"Not Found",de:"Seite nicht gefunden"},500:{en:"Ooops!",de:"Ups!"}};const s={403:{en:["You don’t have permission to access this page. ","Please contact an administrator or click the SIX logo on top left."],de:["Sie haben keine Zugriffsberechtigung auf diese Seite.","Bitte wenden Sie sich an einen Administrator oder klicken Sie auf das SIX-Logo oben links."]},404:{en:["We have not found the page you requested.","Please click the SIX logo on top left."],de:["Wir haben die angeforderte Seite nicht gefunden.","Bitte klicken Sie auf das SIX-Logo oben links."]},500:{en:["Sorry, we messed up! We try to fix this.","Please click the SIX logo on top left."],de:["Sorry, das war unser Fehler! Wir versuchen das zu beheben.","Bitte klicken Sie auf das SIX-Logo oben links."]}};const o=class{constructor(i){e(this,i);this.errorCode=undefined;this.language="en";this.customTitle=undefined;this.customDescription=undefined;this.customIcon=undefined}getIconName(){if(this.customIcon!=null){return this.customIcon}if(this.errorCode==null){return}if(this.errorCode===403){return"lock"}if(this.errorCode===404){return"find-in-page"}if(this.errorCode===500){return"sentiment-dissatisfied"}}getErrorTitle(){if(this.customTitle!=null){return this.customTitle}if(this.errorCode==null){return}return r[this.errorCode][this.language]}getErrorDescription(){var e;if(this.errorCode==null&&this.customDescription==null){return}const t=(e=this.getDescriptions())!==null&&e!==void 0?e:[];return t.map((e=>i("div",null,e)))}getDescriptions(){if(this.customDescription!==undefined){return this.customDescription}if(this.errorCode==null){return}return s[this.errorCode][this.language]}render(){return i("div",{key:"480b7593df8c54c64e63fb4218d8f9ab41cc1e0a",part:"container"},i("div",{key:"9842ad416849c357952fb90009a8311058e803e4",class:"six-error-page__icon-container",part:"icon-container"},i("six-picto",{key:"d4ff368cbab362f49baa76217bf0bef0ce4d77c9",size:"4xl",class:"six-error-page__icon",part:"icon"},this.getIconName())),i("div",{key:"270eabc20c8974d788b10ccf144204db5bad0d75",class:"six-error-page__title",part:"title"},this.getErrorTitle()),i("div",{key:"e005a5ef17a1ec204a6b1704568ba19993c774a9",class:"six-error-page__description",part:"description"},this.getErrorDescription()))}};o.style=n;export{o as six_error_page};
2
+ //# sourceMappingURL=p-39ff5f61.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r,h as i}from"./p-f93d8a4e.js";const s=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--track-color:var(--six-progress-track-color);--indicator-color:var(--six-progress-indicator-color);--stroke-width:2px;display:inline-flex}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.six-spinner{width:auto;height:auto;position:relative}.six-spinner .six-spinner__container{margin:0;transform:translateX(0)}.six-spinner .six-spinner__container svg{transform:translateX(0)}.six-spinner__container{position:relative;margin:0 auto;top:calc(50% - 20px);z-index:1}.six-spinner__container,.six-spinner__container svg{width:40px;height:40px;display:block;transform:translateX(40px)}.six-spinner path{stroke-dashoffset:70px;stroke-dasharray:70, 444;-webkit-animation:six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;animation:six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite}@-webkit-keyframes six-spinner{to{stroke-dashoffset:-444}}@keyframes six-spinner{to{stroke-dashoffset:-444}}";const e=s;const n=class{constructor(i){r(this,i);this.six=false}renderSIXLogo(){return i("span",{class:"six-spinner","aria-busy":"true","aria-live":"polite"},i("div",{class:"six-spinner__container"},i("svg",{viewBox:"0 0 40 40",part:"svg"},i("path",{fill:"none",stroke:"#de3919","stroke-width":"5","stroke-linecap":"round",d:"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42"}))))}renderSimple(){return i("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}render(){return this.six?this.renderSIXLogo():this.renderSimple()}};n.style=e;export{n as six_spinner};
2
- //# sourceMappingURL=p-5f810571.entry.js.map
1
+ import{r,h as i}from"./p-05eb1bab.js";const s=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--track-color:var(--six-progress-track-color);--indicator-color:var(--six-progress-indicator-color);--stroke-width:2px;display:inline-flex}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.six-spinner{width:auto;height:auto;position:relative}.six-spinner .six-spinner__container{margin:0;transform:translateX(0)}.six-spinner .six-spinner__container svg{transform:translateX(0)}.six-spinner__container{position:relative;margin:0 auto;top:calc(50% - 20px);z-index:1}.six-spinner__container,.six-spinner__container svg{width:40px;height:40px;display:block;transform:translateX(40px)}.six-spinner path{stroke-dashoffset:70px;stroke-dasharray:70, 444;-webkit-animation:six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;animation:six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite}@-webkit-keyframes six-spinner{to{stroke-dashoffset:-444}}@keyframes six-spinner{to{stroke-dashoffset:-444}}";const e=s;const n=class{constructor(i){r(this,i);this.six=false}renderSIXLogo(){return i("span",{class:"six-spinner","aria-busy":"true","aria-live":"polite"},i("div",{class:"six-spinner__container"},i("svg",{viewBox:"0 0 40 40",part:"svg"},i("path",{fill:"none",stroke:"#de3919","stroke-width":"5","stroke-linecap":"round",d:"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42"}))))}renderSimple(){return i("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}render(){return this.six?this.renderSIXLogo():this.renderSimple()}};n.style=e;export{n as six_spinner};
2
+ //# sourceMappingURL=p-3b5a76ea.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,g as s}from"./p-f93d8a4e.js";import{I as n,a as r}from"./p-862d474e.js";import{D as h,b as o,a as l}from"./p-a1502802.js";import{E as c}from"./p-8bfb4bfc.js";const u=".item_picker__container{width:2.5em;display:flex;flex-wrap:wrap;justify-content:center}.item_picker__container:focus-visible{outline:var(--six-focus-ring);outline-offset:0}.item_picker__content{font-size:1.5rem}.item_picker__btn{cursor:pointer;width:2.5em;height:2.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--six-color-web-rock-500)}.item_picker__btn:hover{background-color:var(--six-color-web-rock-100);border-radius:100%}.item_picker__btn:active{color:var(--six-color-web-rock-400)}.item_picker__btn--disabled{color:var(--six-color-web-rock-300);cursor:not-allowed}.item_picker__btn--disabled:hover{background-color:initial}.item_picker__btn--disabled:active{color:var(--six-color-web-rock-300)}.item_picker__btn:focus-visible{outline:var(--six-focus-ring);outline-offset:0}";const a=u;const d="ABCDEFGHIJKLMNOPQRSTUVWXYZ";const m=[...d].flatMap((t=>[t,t.toLowerCase()]));const b={alphabet:m,letterIndexes:Object.fromEntries(m.map(((t,e)=>[t,e])))};const p={alphabet:[...d].flatMap((t=>[t])),letterIndexes:Object.fromEntries([...d].map(((t,e)=>[t,e])))};const f={alphabet:[...d.toLowerCase()].flatMap((t=>[t])),letterIndexes:Object.fromEntries([...d.toLowerCase()].map(((t,e)=>[t,e])))};const g=t=>Object.fromEntries([...t].map(((t,e)=>[t,e])));const x=`[SIX-ITEM-PICKER]`;const I=(t,e)=>t-e;const v=(t,e)=>t+e;const _="debounced-item-picker";const N=class{constructor(i){t(this,i);this.sixChange=e(this,"six-item-picker-change",7);this.sixChangeDebounced=e(this,"six-item-picker-change-debounced",7);this.eventListeners=new c;this.handleSixItemPickerChangeDebounced=()=>{this.sixChangeDebounced.emit(this.value)};this.value="";this.type=n.NUMBER;this.min=undefined;this.max=undefined;this.roundtrip=true;this.step=1;this.items=undefined;this.padded=false;this.paddingLength=2;this.paddingChar="0";this.paddingDirection=r.BEFORE;this.timeout=h;this.interval=o;this.debounce=h;this._items=[];this._itemIndexes={}}handleValueChange(){this.setup()}debounceChanged(){this.eventListeners.removeByIdentifier(_);this.eventListeners.add(this.host,"six-item-picker-change",l(this.handleSixItemPickerChangeDebounced,this.debounce),_)}handleSetChange(){this.setup();this.min=this._items[0];this.max=this.getLastStringItem()}componentWillLoad(){this.setup()}componentDidLoad(){this.eventListeners.add(this.host,"six-item-picker-change",l(this.handleSixItemPickerChangeDebounced,this.debounce),_)}disconnectedCallback(){this.eventListeners.removeAll()}setup(){if(this.isNumber()){this.setupNumberItems()}else{this.setUpStringItems()}}setupNumberItems(){var t;if(this.isInvalidNumber()){console.warn(`${x} Expected number but value is not a number: "${this.value}"`);console.info(`${x} Will set value to either minimum or if not provided to zero.`);this.value=(t=this.min)!==null&&t!==void 0?t:0}}setUpStringItems(){this._items=this.getStringItems();this._itemIndexes=this.getItemIndexes();const t=this._items.find((t=>String(t)===String(this.value)))===undefined;if(t){console.warn(`${x} Expected item from item set but value was not found in set: "${this.value}"`);console.info(`${x} Will set value to either minimum or if not provided to "${this._items[0]}".`);this.value=this._items[0]}if(this.min===undefined){if(!this.roundtrip){console.warn(`${x} Expected a min value`);console.info(`${x} Will set min value to ${this._items[0]}`)}this.min=this._items[0]}if(this.max===undefined){const t=this.getLastStringItem();if(!this.roundtrip){console.warn(`${x} Expected a min value if roundtrip is enabled`);console.info(`${x} Will set min value to ${t}`)}this.max=t}}getLastStringItem(){return this._items[this._items.length-1]}getStringItems(){switch(this.type){case n.NUMBER:console.warn(`${x}: unexpected type ${this.type}`);return[];case n.LETTER:return b.alphabet;case n.CAPITAL_LETTER:return p.alphabet;case n.LOWER_LETTER:return f.alphabet;case n.CUSTOM:if(this.items==null||this.items.length===0){console.warn(`${x}: no items defined for type ${this.type}`);return[]}return this.items}}getItemIndexes(){switch(this.type){case n.NUMBER:console.warn(`${x}: unexpected type ${this.type}`);return{};case n.LETTER:return b.letterIndexes;case n.CAPITAL_LETTER:return p.letterIndexes;case n.LOWER_LETTER:return f.letterIndexes;case n.CUSTOM:return g(this._items)}}previousItem(){if(this.isNumber()){this.previousNumber()}else{this.previousStringItem()}this.sixChange.emit(this.value)}previousNumber(){this.changeValue({isNextItemAllowed:()=>!this.isPreviousNumberDisabled(),getNextItem:()=>Number(this.value)-this.step,getRoundtripItem:()=>Number(this.max),isRoundtripPossible:()=>this.max===undefined&&this.roundtrip})}previousStringItem(){const t=String(this.value);const e=String(this.min);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)>this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(I),getRoundtripItem:()=>String(this.max),isRoundtripPossible:()=>this.max==null&&this.roundtrip})}nextItem(){if(this.isNumber()){this.nextNumber()}else{this.nextStringItem()}this.sixChange.emit(this.value)}nextNumber(){this.changeValue({isNextItemAllowed:()=>!this.isNextNumberDisabled(),getNextItem:()=>Number(this.value)+this.step,getRoundtripItem:()=>Number(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}getStringItemIndex(t){return this._itemIndexes[t]}nextStringItem(){const t=String(this.value);const e=String(this.max);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)<this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(v),getRoundtripItem:()=>String(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}getNextItemByOperation(t,e=this.step){const i=String(this.value);const s=t(this.getStringItemIndex(i),e);const n=this._items.length;const r=(s%n+n)%n;return this._items[r]}changeValue(t){if(t.isNextItemAllowed()){this.value=t.getNextItem();return}if(t.isRoundtripPossible()){console.error(`${x} Item picker is expected to perform a roundtrip, but either max or min value is missing so a roundtrip is not possible`);return}if(this.roundtrip){this.value=t.getRoundtripItem();return}console.warn(`${x} Roundtrip is not allowed, but was still triggered, please report this issue to the developer of six-item-picker`);this.sixChange.emit(this.value)}isNumber(){return this.type===n.NUMBER}isInvalidNumber(){return this.value===""||isNaN(this.value)}isNextDisabled(){if(this.roundtrip){return false}if(this.isNumber()){return this.isNextNumberDisabled()}else{return this._itemIndexes[String(this.value)]+this.step>this._itemIndexes[String(this.max)]}}isNextNumberDisabled(){var t;return Number(this.value)+this.step>Number((t=this.max)!==null&&t!==void 0?t:Infinity)}isPrevDisabled(){if(this.roundtrip){return false}if(this.isNumber()){return this.isPreviousNumberDisabled()}else{return this._itemIndexes[String(this.value)]-this.step<this._itemIndexes[String(this.min)]}}isPreviousNumberDisabled(){var t;return Number(this.value)-this.step<Number((t=this.min)!==null&&t!==void 0?t:-Infinity)}onMouseDownNext(){if(this.isNextDisabled()){return}this.nextItem();this._timeoutNext=setTimeout((()=>{this._intervalNext=setInterval((()=>{this.nextItem()}),this.interval)}),this.timeout)}onMouseUpNext(){clearTimeout(this._timeoutNext);clearInterval(this._intervalNext)}onMouseDownPrev(){if(this.isPrevDisabled()){return}this.previousItem();this._timeoutPrev=setTimeout((()=>{this._intervalPrev=setInterval((()=>{this.previousItem()}),this.interval)}),this.timeout)}onMouseUpPrev(){clearTimeout(this._timeoutPrev);clearInterval(this._intervalPrev)}getFormattedValue(){if(this.value===undefined||this.value===null){return this.value}if(!this.padded){return this.value}if(this.paddingDirection===r.BEFORE){return String(this.value).padStart(this.paddingLength,this.paddingChar)}else if(this.paddingDirection===r.AFTER){return String(this.value).padEnd(this.paddingLength,this.paddingChar)}return this.value}handleKeyPress(t){if(t.key==="Enter"){t.preventDefault();if(t.target===this.upButton){this.nextItem()}else if(t.target===this.downButton){this.previousItem()}}else if(t.key==="ArrowUp"){t.preventDefault();this.nextItem()}else if(t.key==="ArrowDown"){t.preventDefault();this.previousItem()}else if(t.key==="PageUp"){t.preventDefault();this.pageUp()}else if(t.key==="PageDown"){t.preventDefault();this.pageDown()}else if(t.key==="Home"){t.preventDefault();this.goToMin()}else if(t.key==="End"){t.preventDefault();this.goToMax()}}pageUp(){if(this.isNumber()){this.changeValue({isNextItemAllowed:()=>!this.isNextNumberDisabled(),getNextItem:()=>Number(this.value)+5*this.step,getRoundtripItem:()=>Number(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}else{const t=String(this.value);const e=String(this.min);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)>this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(v,5),getRoundtripItem:()=>String(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}}pageDown(){if(this.isNumber()){this.changeValue({isNextItemAllowed:()=>!this.isPreviousNumberDisabled(),getNextItem:()=>Number(this.value)-5*this.step,getRoundtripItem:()=>Number(this.max),isRoundtripPossible:()=>this.max===undefined&&this.roundtrip})}else{const t=String(this.value);const e=String(this.max);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)<this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(I,5),getRoundtripItem:()=>String(this.max),isRoundtripPossible:()=>this.max==null&&this.roundtrip})}}goToMin(){var t;if(this.isNumber()){this.value=(t=this.min)!==null&&t!==void 0?t:0}else{this.value=this._items[0]}this.sixChange.emit(this.value)}goToMax(){var t;if(this.isNumber()){this.value=(t=this.max)!==null&&t!==void 0?t:Infinity}else{this.value=this.getLastStringItem()}this.sixChange.emit(this.value)}render(){return i("div",{key:"773e773a55e33b7486a7d2928ad605c6efadf119",part:"container",class:"item_picker__container",onKeyDown:t=>this.handleKeyPress(t),tabindex:"0"},i("div",{key:"3cb5fd7c07ea6b0b8778be5b316ba0d788b900be",ref:t=>this.upButton=t,part:"up",class:{item_picker__btn:true,"item_picker__btn--disabled":this.isNextDisabled()},onMouseDown:()=>this.onMouseDownNext(),onMouseUp:()=>this.onMouseUpNext(),tabindex:"-1"},i("six-icon",{key:"606bfc7a65c8b5312a952bc9bb85324c95111d17",size:"large"},"expand_less")),i("div",{key:"181dec86bb4b8d9762595b38f719af4c8a91ea42",part:"content",class:"item_picker__content"},this.getFormattedValue()),i("div",{key:"195fefb352bbb5d202b3357e429959f4c887d357",ref:t=>this.downButton=t,part:"down",class:{item_picker__btn:true,"item_picker__btn--disabled":this.isPrevDisabled()},onMouseDown:()=>this.onMouseDownPrev(),onMouseUp:()=>this.onMouseUpPrev(),tabindex:"-1"},i("six-icon",{key:"525c90105edea5208737b49c8b2831498c326197",size:"large"},"expand_more")))}get host(){return s(this)}static get watchers(){return{value:["handleValueChange"],debounce:["debounceChanged"],items:["handleSetChange"]}}};N.style=a;export{N as six_item_picker};
2
- //# sourceMappingURL=p-724d0458.entry.js.map
1
+ import{r as t,c as e,h as i,g as s}from"./p-05eb1bab.js";import{I as n,a as r}from"./p-862d474e.js";import{D as h,b as o,a as l}from"./p-a1502802.js";import{E as c}from"./p-8bfb4bfc.js";const u=".item_picker__container{width:2.5em;display:flex;flex-wrap:wrap;justify-content:center}.item_picker__container:focus-visible{outline:var(--six-focus-ring);outline-offset:0}.item_picker__content{font-size:1.5rem}.item_picker__btn{cursor:pointer;width:2.5em;height:2.5em;display:flex;vertical-align:middle;align-items:center;justify-content:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--six-color-web-rock-500)}.item_picker__btn:hover{background-color:var(--six-color-web-rock-100);border-radius:100%}.item_picker__btn:active{color:var(--six-color-web-rock-400)}.item_picker__btn--disabled{color:var(--six-color-web-rock-300);cursor:not-allowed}.item_picker__btn--disabled:hover{background-color:initial}.item_picker__btn--disabled:active{color:var(--six-color-web-rock-300)}.item_picker__btn:focus-visible{outline:var(--six-focus-ring);outline-offset:0}";const a=u;const d="ABCDEFGHIJKLMNOPQRSTUVWXYZ";const m=[...d].flatMap((t=>[t,t.toLowerCase()]));const b={alphabet:m,letterIndexes:Object.fromEntries(m.map(((t,e)=>[t,e])))};const p={alphabet:[...d].flatMap((t=>[t])),letterIndexes:Object.fromEntries([...d].map(((t,e)=>[t,e])))};const f={alphabet:[...d.toLowerCase()].flatMap((t=>[t])),letterIndexes:Object.fromEntries([...d.toLowerCase()].map(((t,e)=>[t,e])))};const g=t=>Object.fromEntries([...t].map(((t,e)=>[t,e])));const x=`[SIX-ITEM-PICKER]`;const I=(t,e)=>t-e;const v=(t,e)=>t+e;const _="debounced-item-picker";const N=class{constructor(i){t(this,i);this.sixChange=e(this,"six-item-picker-change",7);this.sixChangeDebounced=e(this,"six-item-picker-change-debounced",7);this.eventListeners=new c;this.handleSixItemPickerChangeDebounced=()=>{this.sixChangeDebounced.emit(this.value)};this.value="";this.type=n.NUMBER;this.min=undefined;this.max=undefined;this.roundtrip=true;this.step=1;this.items=undefined;this.padded=false;this.paddingLength=2;this.paddingChar="0";this.paddingDirection=r.BEFORE;this.timeout=h;this.interval=o;this.debounce=h;this._items=[];this._itemIndexes={}}handleValueChange(){this.setup()}debounceChanged(){this.eventListeners.removeByIdentifier(_);this.eventListeners.add(this.host,"six-item-picker-change",l(this.handleSixItemPickerChangeDebounced,this.debounce),_)}handleSetChange(){this.setup();this.min=this._items[0];this.max=this.getLastStringItem()}componentWillLoad(){this.setup()}componentDidLoad(){this.eventListeners.add(this.host,"six-item-picker-change",l(this.handleSixItemPickerChangeDebounced,this.debounce),_)}disconnectedCallback(){this.eventListeners.removeAll()}setup(){if(this.isNumber()){this.setupNumberItems()}else{this.setUpStringItems()}}setupNumberItems(){var t;if(this.isInvalidNumber()){console.warn(`${x} Expected number but value is not a number: "${this.value}"`);console.info(`${x} Will set value to either minimum or if not provided to zero.`);this.value=(t=this.min)!==null&&t!==void 0?t:0}}setUpStringItems(){this._items=this.getStringItems();this._itemIndexes=this.getItemIndexes();const t=this._items.find((t=>String(t)===String(this.value)))===undefined;if(t){console.warn(`${x} Expected item from item set but value was not found in set: "${this.value}"`);console.info(`${x} Will set value to either minimum or if not provided to "${this._items[0]}".`);this.value=this._items[0]}if(this.min===undefined){if(!this.roundtrip){console.warn(`${x} Expected a min value`);console.info(`${x} Will set min value to ${this._items[0]}`)}this.min=this._items[0]}if(this.max===undefined){const t=this.getLastStringItem();if(!this.roundtrip){console.warn(`${x} Expected a min value if roundtrip is enabled`);console.info(`${x} Will set min value to ${t}`)}this.max=t}}getLastStringItem(){return this._items[this._items.length-1]}getStringItems(){switch(this.type){case n.NUMBER:console.warn(`${x}: unexpected type ${this.type}`);return[];case n.LETTER:return b.alphabet;case n.CAPITAL_LETTER:return p.alphabet;case n.LOWER_LETTER:return f.alphabet;case n.CUSTOM:if(this.items==null||this.items.length===0){console.warn(`${x}: no items defined for type ${this.type}`);return[]}return this.items}}getItemIndexes(){switch(this.type){case n.NUMBER:console.warn(`${x}: unexpected type ${this.type}`);return{};case n.LETTER:return b.letterIndexes;case n.CAPITAL_LETTER:return p.letterIndexes;case n.LOWER_LETTER:return f.letterIndexes;case n.CUSTOM:return g(this._items)}}previousItem(){if(this.isNumber()){this.previousNumber()}else{this.previousStringItem()}this.sixChange.emit(this.value)}previousNumber(){this.changeValue({isNextItemAllowed:()=>!this.isPreviousNumberDisabled(),getNextItem:()=>Number(this.value)-this.step,getRoundtripItem:()=>Number(this.max),isRoundtripPossible:()=>this.max===undefined&&this.roundtrip})}previousStringItem(){const t=String(this.value);const e=String(this.min);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)>this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(I),getRoundtripItem:()=>String(this.max),isRoundtripPossible:()=>this.max==null&&this.roundtrip})}nextItem(){if(this.isNumber()){this.nextNumber()}else{this.nextStringItem()}this.sixChange.emit(this.value)}nextNumber(){this.changeValue({isNextItemAllowed:()=>!this.isNextNumberDisabled(),getNextItem:()=>Number(this.value)+this.step,getRoundtripItem:()=>Number(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}getStringItemIndex(t){return this._itemIndexes[t]}nextStringItem(){const t=String(this.value);const e=String(this.max);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)<this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(v),getRoundtripItem:()=>String(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}getNextItemByOperation(t,e=this.step){const i=String(this.value);const s=t(this.getStringItemIndex(i),e);const n=this._items.length;const r=(s%n+n)%n;return this._items[r]}changeValue(t){if(t.isNextItemAllowed()){this.value=t.getNextItem();return}if(t.isRoundtripPossible()){console.error(`${x} Item picker is expected to perform a roundtrip, but either max or min value is missing so a roundtrip is not possible`);return}if(this.roundtrip){this.value=t.getRoundtripItem();return}console.warn(`${x} Roundtrip is not allowed, but was still triggered, please report this issue to the developer of six-item-picker`);this.sixChange.emit(this.value)}isNumber(){return this.type===n.NUMBER}isInvalidNumber(){return this.value===""||isNaN(this.value)}isNextDisabled(){if(this.roundtrip){return false}if(this.isNumber()){return this.isNextNumberDisabled()}else{return this._itemIndexes[String(this.value)]+this.step>this._itemIndexes[String(this.max)]}}isNextNumberDisabled(){var t;return Number(this.value)+this.step>Number((t=this.max)!==null&&t!==void 0?t:Infinity)}isPrevDisabled(){if(this.roundtrip){return false}if(this.isNumber()){return this.isPreviousNumberDisabled()}else{return this._itemIndexes[String(this.value)]-this.step<this._itemIndexes[String(this.min)]}}isPreviousNumberDisabled(){var t;return Number(this.value)-this.step<Number((t=this.min)!==null&&t!==void 0?t:-Infinity)}onMouseDownNext(){if(this.isNextDisabled()){return}this.nextItem();this._timeoutNext=setTimeout((()=>{this._intervalNext=setInterval((()=>{this.nextItem()}),this.interval)}),this.timeout)}onMouseUpNext(){clearTimeout(this._timeoutNext);clearInterval(this._intervalNext)}onMouseDownPrev(){if(this.isPrevDisabled()){return}this.previousItem();this._timeoutPrev=setTimeout((()=>{this._intervalPrev=setInterval((()=>{this.previousItem()}),this.interval)}),this.timeout)}onMouseUpPrev(){clearTimeout(this._timeoutPrev);clearInterval(this._intervalPrev)}getFormattedValue(){if(this.value===undefined||this.value===null){return this.value}if(!this.padded){return this.value}if(this.paddingDirection===r.BEFORE){return String(this.value).padStart(this.paddingLength,this.paddingChar)}else if(this.paddingDirection===r.AFTER){return String(this.value).padEnd(this.paddingLength,this.paddingChar)}return this.value}handleKeyPress(t){if(t.key==="Enter"){t.preventDefault();if(t.target===this.upButton){this.nextItem()}else if(t.target===this.downButton){this.previousItem()}}else if(t.key==="ArrowUp"){t.preventDefault();this.nextItem()}else if(t.key==="ArrowDown"){t.preventDefault();this.previousItem()}else if(t.key==="PageUp"){t.preventDefault();this.pageUp()}else if(t.key==="PageDown"){t.preventDefault();this.pageDown()}else if(t.key==="Home"){t.preventDefault();this.goToMin()}else if(t.key==="End"){t.preventDefault();this.goToMax()}}pageUp(){if(this.isNumber()){this.changeValue({isNextItemAllowed:()=>!this.isNextNumberDisabled(),getNextItem:()=>Number(this.value)+5*this.step,getRoundtripItem:()=>Number(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}else{const t=String(this.value);const e=String(this.min);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)>this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(v,5),getRoundtripItem:()=>String(this.min),isRoundtripPossible:()=>this.min===undefined&&this.roundtrip})}}pageDown(){if(this.isNumber()){this.changeValue({isNextItemAllowed:()=>!this.isPreviousNumberDisabled(),getNextItem:()=>Number(this.value)-5*this.step,getRoundtripItem:()=>Number(this.max),isRoundtripPossible:()=>this.max===undefined&&this.roundtrip})}else{const t=String(this.value);const e=String(this.max);this.changeValue({isNextItemAllowed:()=>e===undefined||this.getStringItemIndex(t)<this.getStringItemIndex(e),getNextItem:()=>this.getNextItemByOperation(I,5),getRoundtripItem:()=>String(this.max),isRoundtripPossible:()=>this.max==null&&this.roundtrip})}}goToMin(){var t;if(this.isNumber()){this.value=(t=this.min)!==null&&t!==void 0?t:0}else{this.value=this._items[0]}this.sixChange.emit(this.value)}goToMax(){var t;if(this.isNumber()){this.value=(t=this.max)!==null&&t!==void 0?t:Infinity}else{this.value=this.getLastStringItem()}this.sixChange.emit(this.value)}render(){return i("div",{key:"773e773a55e33b7486a7d2928ad605c6efadf119",part:"container",class:"item_picker__container",onKeyDown:t=>this.handleKeyPress(t),tabindex:"0"},i("div",{key:"3cb5fd7c07ea6b0b8778be5b316ba0d788b900be",ref:t=>this.upButton=t,part:"up",class:{item_picker__btn:true,"item_picker__btn--disabled":this.isNextDisabled()},onMouseDown:()=>this.onMouseDownNext(),onMouseUp:()=>this.onMouseUpNext(),tabindex:"-1"},i("six-icon",{key:"606bfc7a65c8b5312a952bc9bb85324c95111d17",size:"large"},"expand_less")),i("div",{key:"181dec86bb4b8d9762595b38f719af4c8a91ea42",part:"content",class:"item_picker__content"},this.getFormattedValue()),i("div",{key:"195fefb352bbb5d202b3357e429959f4c887d357",ref:t=>this.downButton=t,part:"down",class:{item_picker__btn:true,"item_picker__btn--disabled":this.isPrevDisabled()},onMouseDown:()=>this.onMouseDownPrev(),onMouseUp:()=>this.onMouseUpPrev(),tabindex:"-1"},i("six-icon",{key:"525c90105edea5208737b49c8b2831498c326197",size:"large"},"expand_more")))}get host(){return s(this)}static get watchers(){return{value:["handleValueChange"],debounce:["debounceChanged"],items:["handleSetChange"]}}};N.style=a;export{N as six_item_picker};
2
+ //# sourceMappingURL=p-419ed003.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as e,h as s,g as t}from"./p-f93d8a4e.js";import{f as a}from"./p-06ba4450.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--hide-duration:var(--six-transition-medium);--hide-timing-function:ease;--show-duration:var(--six-transition-medium);--show-timing-function:ease;--horizontal-padding:var(--six-spacing-medium);font-family:var(--six-font-family);display:block}.details{border:solid var(--six-border-width) var(--six-input-border-color);border-radius:var(--six-border-radius-medium);color:var(--six-details-color);overflow-anchor:none;font-size:var(--six-input-font-size-medium)}.details:hover:not(.details--disabled):not(.details--open){border-color:var(--six-input-border-color-hover)}.details.inline{border:none;color:var(--six-sidebar-color)}.details.inline:hover{background-color:var(--six-sidebar-hover-background-color)}.details.inline.details--open{background-color:var(--six-color-web-rock-50)}.details.inline.details--open:hover{border:none;box-shadow:none}.details.inline.details--open>.details__header{color:var(--six-sidebar-color);font-weight:var(--six-font-weight-bold);background-color:var(--six-sidebar-header-background-color)}.details--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);color:var(--six-input-color-disabled)}.details__header{display:flex;align-items:center;border-radius:inherit;padding:var(--six-spacing-medium) var(--horizontal-padding);user-select:none;cursor:pointer}.details__header:focus{outline:none}.details--disabled .details__header{cursor:not-allowed;border-width:1px}.details--disabled .details__header:focus{outline:none;box-shadow:none}.details__summary{flex:1 1 auto;display:flex;align-items:center}.details__summary-icon{flex:0 0 auto;display:flex;align-items:center;font-size:1.2em;transition:var(--six-transition-medium) transform ease}.details--open .details__summary-icon--animate{transform:rotate(-180deg)}.details__body{height:0;overflow:hidden;transition-property:height;transition-duration:var(--hide-duration);transition-timing-function:var(--hide-timing-function)}.details--open .details__body{transition-duration:var(--show-duration);transition-timing-function:var(--show-timing-function)}.details__content{padding:var(--six-spacing-medium)}";const o=r;let n=0;const d=class{constructor(s){i(this,s);this.sixShow=e(this,"six-details-show",7);this.sixAfterShow=e(this,"six-details-after-show",7);this.sixHide=e(this,"six-details-hide",7);this.sixAfterHide=e(this,"six-details-after-hide",7);this.componentId=`details-${++n}`;this.isVisible=false;this.handleBodyTransitionEnd=i=>{if(this.body==null)return;const e=i.target;if(i.propertyName==="height"&&e.classList.contains("details__body")){this.body.style.overflow=this.open?"visible":"hidden";this.body.style.height=this.open?"auto":"0";this.open?this.sixAfterShow.emit():this.sixAfterHide.emit();this.body.hidden=!this.open}};this.handleSummaryClick=()=>{var i;if(!this.disabled&&(this.hasContent||this.selectableEmpty)){this.open?this.hide():this.show();(i=this.header)===null||i===void 0?void 0:i.focus()}};this.handleSummaryKeyDown=i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.open?this.hide():this.show()}if(i.key==="ArrowUp"||i.key==="ArrowLeft"){i.preventDefault();this.hide()}if(i.key==="ArrowDown"||i.key==="ArrowRight"){i.preventDefault();this.show()}};this.animateSummaryIcon=true;this.open=false;this.summary="";this.summaryIcon=undefined;this.summaryIconSize="inherit";this.disabled=false;this.inline=false;this.selectableEmpty=false;this.hasContent=true}handleOpenChange(){if(this.body!=null){this.open?this.show():this.hide()}}componentDidLoad(){if(this.details==null||this.body==null)return;a.observe(this.details);this.body.hidden=!this.open;if(this.open){this.show()}}disconnectedCallback(){if(this.details!=null){a.unobserve(this.details)}}async show(){if(this.isVisible||this.body==null)return;const i=this.sixShow.emit();if(i.defaultPrevented){this.open=false;return}this.body.hidden=false;if(this.body.scrollHeight===0){this.body.style.height="auto";this.body.style.overflow="visible"}else{this.body.style.height=`${this.body.scrollHeight}px`;this.body.style.overflow="hidden"}this.isVisible=true;this.open=true}async hide(){if(!this.isVisible||this.body==null)return;const i=this.body;const e=this.sixHide.emit();if(e.defaultPrevented){this.open=true;return}i.style.height=`${i.scrollHeight}px`;i.style.overflow="hidden";requestAnimationFrame((()=>{i.style.height="0"}));this.isVisible=false;this.open=false}render(){const i=this.hasContent&&(this.summaryIcon||"expand_more");return s("div",{key:"58eeb02d474d605bebac61cc029c73f33efe9e31",ref:i=>this.details=i,part:"base",class:{details:true,"details--open":this.open,"details--disabled":this.disabled,inline:this.inline}},s("header",{key:"a9cca84f0aa99b2c5b686b1714dcdfca5bd4f6e2",ref:i=>this.header=i,part:"header",id:`${this.componentId}-header`,class:"details__header",role:"button","aria-expanded":this.open?"true":"false","aria-controls":`${this.componentId}-content`,"aria-disabled":this.disabled?"true":"false",tabIndex:this.disabled?-1:0,onClick:this.handleSummaryClick,onKeyDown:this.handleSummaryKeyDown},s("div",{key:"b4b15e84ab0a6849bfe71a502727ec214687777e",part:"summary",class:"details__summary"},s("slot",{key:"c5435e8b47d1dc3f61bfb463b85611d931b80737",name:"summary"},this.summary)),s("span",{key:"fee0e1d47ccad7f0ee624c6c6f2dd9bd849ac012",part:"summary-icon",class:{"details__summary-icon":true,"details__summary-icon--animate":this.animateSummaryIcon}},s("slot",{key:"9ec80c6ce7c32b1bfebbc71903c3ad5dbb3e4a41",name:"summary-icon",onSlotchange:()=>this.animateSummaryIcon=false},i&&s("six-icon",{size:this.summaryIconSize},i)))),s("div",{key:"df65733e6719bceaf2822b380bca5b986858dde9",ref:i=>this.body=i,class:"details__body",onTransitionEnd:this.handleBodyTransitionEnd},s("div",{key:"d173e3f8a8649a0d926cf7c185fcde8b602892ae",part:"content",id:`${this.componentId}-content`,class:"details__content",role:"region","aria-labelledby":`${this.componentId}-header`},s("slot",{key:"5e9d99ee58ce51dc64ded7a0000287616a479677"}))))}get host(){return t(this)}static get watchers(){return{open:["handleOpenChange"]}}};d.style=o;export{d as six_details};
2
- //# sourceMappingURL=p-21002de1.entry.js.map
1
+ import{r as i,c as s,h as t,g as e}from"./p-05eb1bab.js";import{f as a}from"./p-06ba4450.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--hide-duration:var(--six-transition-medium);--hide-timing-function:ease;--show-duration:var(--six-transition-medium);--show-timing-function:ease;--horizontal-padding:var(--six-spacing-medium);font-family:var(--six-font-family);display:block}.details{border:solid var(--six-border-width) var(--six-input-border-color);border-radius:var(--six-border-radius-medium);color:var(--six-details-color);overflow-anchor:none;font-size:var(--six-input-font-size-medium)}.details:hover:not(.details--disabled):not(.details--open){border-color:var(--six-input-border-color-hover)}.details.inline{border:none;color:var(--six-sidebar-color)}.details.inline:hover{background-color:var(--six-sidebar-hover-background-color)}.details.inline.details--open{background-color:var(--six-color-web-rock-50)}.details.inline.details--open:hover{border:none;box-shadow:none}.details.inline.details--open>.details__header{color:var(--six-sidebar-color);font-weight:var(--six-font-weight-bold);background-color:var(--six-sidebar-header-background-color)}.details--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);color:var(--six-input-color-disabled)}.details__header{display:flex;align-items:center;border-radius:inherit;padding:var(--six-spacing-medium) var(--horizontal-padding);user-select:none;cursor:pointer}.details__header:focus{outline:none}.details--disabled .details__header{cursor:not-allowed;border-width:1px}.details--disabled .details__header:focus{outline:none;box-shadow:none}.details__summary{flex:1 1 auto;display:flex;align-items:center}.details__summary-icon{flex:0 0 auto;display:flex;align-items:center;font-size:1.2em;transition:var(--six-transition-medium) transform ease}.details--open .details__summary-icon--animate{transform:rotate(-180deg)}.details__body{height:0;overflow:hidden;transition-property:height;transition-duration:var(--hide-duration);transition-timing-function:var(--hide-timing-function)}.details--open .details__body{transition-duration:var(--show-duration);transition-timing-function:var(--show-timing-function)}.details__content{padding:var(--six-spacing-medium)}";const o=r;let n=0;const d=class{constructor(t){i(this,t);this.sixShow=s(this,"six-details-show",7);this.sixAfterShow=s(this,"six-details-after-show",7);this.sixHide=s(this,"six-details-hide",7);this.sixAfterHide=s(this,"six-details-after-hide",7);this.componentId=`details-${++n}`;this.isVisible=false;this.handleBodyTransitionEnd=i=>{if(this.body==null)return;const s=i.target;if(i.propertyName==="height"&&s.classList.contains("details__body")){this.body.style.overflow=this.open?"visible":"hidden";this.body.style.height=this.open?"auto":"0";this.open?this.sixAfterShow.emit():this.sixAfterHide.emit();this.body.hidden=!this.open}};this.handleSummaryClick=()=>{var i;if(!this.disabled&&(this.hasContent||this.selectableEmpty)){this.open?this.hide():this.show();(i=this.header)===null||i===void 0?void 0:i.focus()}};this.handleSummaryKeyDown=i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.open?this.hide():this.show()}if(i.key==="ArrowUp"||i.key==="ArrowLeft"){i.preventDefault();this.hide()}if(i.key==="ArrowDown"||i.key==="ArrowRight"){i.preventDefault();this.show()}};this.animateSummaryIcon=true;this.open=false;this.summary="";this.summaryIcon=undefined;this.summaryIconSize="inherit";this.disabled=false;this.inline=false;this.selectableEmpty=false;this.hasContent=true}handleOpenChange(){if(this.body!=null){this.open?this.show():this.hide()}}componentDidLoad(){if(this.details==null||this.body==null)return;a.observe(this.details);this.body.hidden=!this.open;if(this.open){this.show()}}disconnectedCallback(){if(this.details!=null){a.unobserve(this.details)}}async show(){if(this.isVisible||this.body==null)return;const i=this.sixShow.emit();if(i.defaultPrevented){this.open=false;return}this.body.hidden=false;if(this.body.scrollHeight===0){this.body.style.height="auto";this.body.style.overflow="visible"}else{this.body.style.height=`${this.body.scrollHeight}px`;this.body.style.overflow="hidden"}this.isVisible=true;this.open=true}async hide(){if(!this.isVisible||this.body==null)return;const i=this.body;const s=this.sixHide.emit();if(s.defaultPrevented){this.open=true;return}i.style.height=`${i.scrollHeight}px`;i.style.overflow="hidden";requestAnimationFrame((()=>{i.style.height="0"}));this.isVisible=false;this.open=false}render(){const i=this.hasContent&&(this.summaryIcon||"expand_more");return t("div",{key:"a7db8466d2b7f32e0a3e908c12dad21cbd7266c8",ref:i=>this.details=i,part:"base",class:{details:true,"details--open":this.open,"details--disabled":this.disabled,inline:this.inline}},t("header",{key:"cb47aca6b6147c899725ce56da28baa6330a6413",ref:i=>this.header=i,part:"header",id:`${this.componentId}-header`,class:"details__header",role:"button","aria-expanded":this.open?"true":"false","aria-controls":`${this.componentId}-content`,"aria-disabled":this.disabled?"true":"false",tabIndex:this.disabled?-1:0,onClick:this.handleSummaryClick,onKeyDown:this.handleSummaryKeyDown},t("div",{key:"059d8efb1a0464787b8b9042aad7fa4e7d757171",part:"summary",class:"details__summary"},t("slot",{key:"010f1d8278f54820960de15d83aade89bc958d49",name:"summary"},this.summary)),t("span",{key:"31b45cf46db64de0db5a1fa8b30feaa6418ca5da",part:"summary-icon",class:{"details__summary-icon":true,"details__summary-icon--animate":this.animateSummaryIcon}},t("slot",{key:"21738c04a28de850aaa49f5e575cfda54139c0db",name:"summary-icon",onSlotchange:()=>this.animateSummaryIcon=false},i&&t("six-icon",{size:this.summaryIconSize},i)))),t("div",{key:"94d8cadeb6c9310178a9307058eead981b736b9f",ref:i=>this.body=i,class:"details__body",onTransitionEnd:this.handleBodyTransitionEnd},t("div",{key:"541deb7e8d5514bfa0916b117a492daf953cbe2f",part:"content",id:`${this.componentId}-content`,class:"details__content",role:"region","aria-labelledby":`${this.componentId}-header`},t("slot",{key:"83ddbbdb2c470a31798bbcd4bb436bf93cb90791"}))))}get host(){return e(this)}static get watchers(){return{open:["handleOpenChange"]}}};d.style=o;export{d as six_details};
2
+ //# sourceMappingURL=p-45003bae.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as s,h as e}from"./p-f93d8a4e.js";const a=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.menu-label{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);color:var(--six-input-label-color);padding:var(--six-spacing-xx-small) var(--six-spacing-small);user-select:none}";const o=a;const i=class{constructor(e){s(this,e)}render(){return e("div",{key:"c6c5d6cccd54d6fbdbdf2a561165fbb22547976e",part:"base",class:"menu-label"},e("slot",{key:"33bf6b17abe001e11677c5fbae1573dcd84280f1"}))}};i.style=o;export{i as six_menu_label};
2
- //# sourceMappingURL=p-93ab2efc.entry.js.map
1
+ import{r as e,h as s}from"./p-05eb1bab.js";const a=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.menu-label{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);color:var(--six-input-label-color);padding:var(--six-spacing-xx-small) var(--six-spacing-small);user-select:none}";const o=a;const i=class{constructor(s){e(this,s)}render(){return s("div",{key:"5183d165a877bd2ca0c25d4ff61d55200b66132d",part:"base",class:"menu-label"},s("slot",{key:"5adecf55a82a78de5eee401aeec442f7e60e0874"}))}};i.style=o;export{i as six_menu_label};
2
+ //# sourceMappingURL=p-4963f03c.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as o,h as i}from"./p-f93d8a4e.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:grid}.center-content{display:grid;align-self:center;justify-self:center;grid-gap:5px;grid-auto-flow:column}.align-item{margin:auto}.indicator,.indicator--acceptance,.indicator--etu,.indicator--dev,.indicator--itu{font-family:var(--six-font-family);font-size:14px;font-weight:var(--six-font-weight-bold);display:grid;align-content:center;width:100%;height:24px}.indicator--itu{background-color:var(--six-color-success-600);color:var(--six-color-web-rock-900)}.indicator--dev{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.indicator--etu{background-color:var(--six-color-action-600);color:var(--six-color-white)}.indicator--acceptance{background-color:var(--six-color-warning-800);color:var(--six-color-web-rock-900)}";const t=r;const c=class{constructor(i){o(this,i);this.stage=null}render(){return this.stage==null||this.stage=="PROD"?null:i("div",{class:`indicator--${this.stage.toLowerCase()}`},i("div",{class:"center-content"},i("six-icon",{class:"align-item",size:"small"},"error_outline"),i("span",{class:"align-item"},i("slot",null))))}};c.style=t;export{c as six_stage_indicator};
2
- //# sourceMappingURL=p-03900e17.entry.js.map
1
+ import{r as o,h as i}from"./p-05eb1bab.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:grid}.center-content{display:grid;align-self:center;justify-self:center;grid-gap:5px;grid-auto-flow:column}.align-item{margin:auto}.indicator,.indicator--acceptance,.indicator--etu,.indicator--dev,.indicator--itu{font-family:var(--six-font-family);font-size:14px;font-weight:var(--six-font-weight-bold);display:grid;align-content:center;width:100%;height:24px}.indicator--itu{background-color:var(--six-color-success-600);color:var(--six-color-web-rock-900)}.indicator--dev{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.indicator--etu{background-color:var(--six-color-action-600);color:var(--six-color-white)}.indicator--acceptance{background-color:var(--six-color-warning-800);color:var(--six-color-web-rock-900)}";const t=r;const c=class{constructor(i){o(this,i);this.stage=null}render(){return this.stage==null||this.stage=="PROD"?null:i("div",{class:`indicator--${this.stage.toLowerCase()}`},i("div",{class:"center-content"},i("six-icon",{class:"align-item",size:"small"},"error_outline"),i("span",{class:"align-item"},i("slot",null))))}};c.style=t;export{c as six_stage_indicator};
2
+ //# sourceMappingURL=p-4d89932f.entry.js.map
@@ -1,2 +1,2 @@
1
- import{h as l}from"./p-f93d8a4e.js";const r=(r,o)=>{var e,t,a,n,s,i,d,f;const m=(Array.isArray(r.errorText)?r.errorText:[r.errorText]).filter((l=>l!=null&&l.trim()!==""));const c=r.label!=null&&r.label.trim()!==""?true:(e=r.hasLabelSlot)!==null&&e!==void 0?e:false;const u=r.helpText!=null&&r.helpText.trim()!==""?true:(t=r.hasHelpTextSlot)!==null&&t!==void 0?t:false;const v=(m.length>0||((a=r.hasErrorTextSlot)!==null&&a!==void 0?a:false))&&((n=r.displayError)!==null&&n!==void 0?n:false);return l("div",{part:"form-control",class:{"form-control":true,"form-control--small":r.size==="small","form-control--medium":r.size==="medium","form-control--large":r.size==="large","form-control--has-label":c,"form-control--has-help-text":u,"form-control--has-error-text":v,"form-control--disabled":(s=r.disabled)!==null&&s!==void 0?s:false,"form-control--invalid":((i=r.displayError)!==null&&i!==void 0?i:false)&&!r.disabled}},l("label",{part:"label",id:r.labelId,class:{"form-control__label":true,"form-control__label__required":(d=r.required)!==null&&d!==void 0?d:false},htmlFor:r.inputId,"aria-hidden":c?"false":"true",onClick:r.onLabelClick},l("slot",{name:"label"},r.label)),l("div",{class:"form-control__input"},o),l("div",{part:"error-text",id:r.errorTextId,class:"form-control__error-text","aria-hidden":v?"false":"true"},l("slot",{name:"error-text"},m.slice(0,(f=r.errorTextCount)!==null&&f!==void 0?f:1).map((r=>l("six-error",null,r))))),l("div",{part:"help-text",id:r.helpTextId,class:"form-control__help-text","aria-hidden":u?"false":"true"},l("slot",{name:"help-text"},r.helpText)))};export{r as F};
2
- //# sourceMappingURL=p-aa99a393.js.map
1
+ import{h as l}from"./p-05eb1bab.js";const r=(r,o)=>{var e,t,a,n,s,i,d,m;const c=(Array.isArray(r.errorText)?r.errorText:[r.errorText]).filter((l=>l!=null&&l.trim()!==""));const f=r.label!=null&&r.label.trim()!==""?true:(e=r.hasLabelSlot)!==null&&e!==void 0?e:false;const u=r.helpText!=null&&r.helpText.trim()!==""?true:(t=r.hasHelpTextSlot)!==null&&t!==void 0?t:false;const v=(c.length>0||((a=r.hasErrorTextSlot)!==null&&a!==void 0?a:false))&&((n=r.displayError)!==null&&n!==void 0?n:false);return l("div",{part:"form-control",class:{"form-control":true,"form-control--small":r.size==="small","form-control--medium":r.size==="medium","form-control--large":r.size==="large","form-control--has-label":f,"form-control--has-help-text":u,"form-control--has-error-text":v,"form-control--disabled":(s=r.disabled)!==null&&s!==void 0?s:false,"form-control--invalid":((i=r.displayError)!==null&&i!==void 0?i:false)&&!r.disabled}},l("label",{part:"label",id:r.labelId,class:{"form-control__label":true,"form-control__label__required":(d=r.required)!==null&&d!==void 0?d:false},htmlFor:r.inputId,"aria-hidden":f?"false":"true",onClick:r.onLabelClick},l("slot",{name:"label"},r.label)),l("div",{class:"form-control__input"},o),l("div",{part:"error-text",id:r.errorTextId,class:"form-control__error-text","aria-hidden":v?"false":"true"},l("slot",{name:"error-text"},c.slice(0,(m=r.errorTextCount)!==null&&m!==void 0?m:1).map((r=>l("six-error",null,r))))),l("div",{part:"help-text",id:r.helpTextId,class:"form-control__help-text","aria-hidden":u?"false":"true"},l("slot",{name:"help-text"},r.helpText)))};export{r as F};
2
+ //# sourceMappingURL=p-605bdd81.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,h as r}from"./p-05eb1bab.js";const s=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--track-color:var(--six-progress-track-color);--indicator-color:var(--six-progress-indicator-color);display:inline-flex}.progress-ring{display:inline-flex;align-items:center;justify-content:center;position:relative}.progress-ring__image{transform:rotate(-90deg);transform-origin:50% 50%}.progress-ring__track{stroke:var(--track-color)}.progress-ring__indicator{stroke:var(--indicator-color);transition:0.35s stroke-dashoffset, 0.35s stroke}.progress-ring__label{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;user-select:none;font-family:var(--six-font-family)}";const t=s;const i=class{constructor(r){e(this,r);this.size=128;this.strokeWidth=4;this.percentage=0}handlePercentageChange(){this.updateProgress()}componentDidLoad(){this.updateProgress()}updateProgress(){var e;if(((e=this.indicator)===null||e===void 0?void 0:e.r)==null)return;const r=this.indicator.r.baseVal.value;const s=r*2*Math.PI;const t=s-this.percentage/100*s;this.indicator.style.strokeDasharray=`${s} ${s}`;this.indicator.style.strokeDashoffset=`${t}`}render(){return r("div",{key:"e502ccf39d3b246d03122b446949ee8380e1a2fa",part:"base",class:"progress-ring"},r("svg",{key:"d37581863e5a67e9f8a9cd058954581ee7e86a4a",class:"progress-ring__image",width:this.size,height:this.size},r("circle",{key:"022eeb124e217d93479cf7ead2cabb9169b9afd4",class:"progress-ring__track","stroke-width":this.strokeWidth,"stroke-linecap":"round",fill:"transparent",r:this.size/2-this.strokeWidth*2,cx:this.size/2,cy:this.size/2}),r("circle",{key:"bc0fbfc9f1c872243ae2169d6412db47fb554e19",ref:e=>this.indicator=e,class:"progress-ring__indicator","stroke-width":this.strokeWidth,"stroke-linecap":"round",fill:"transparent",r:this.size/2-this.strokeWidth*2,cx:this.size/2,cy:this.size/2})),r("span",{key:"9320211edc9c0b9b24124ffc7ffdac9d6d2f86a7",part:"label",class:"progress-ring__label"},r("slot",{key:"e7c3ce7e12a7691e461b73e6cbd2912dde27ac75"})))}static get watchers(){return{percentage:["handlePercentageChange"]}}};i.style=t;export{i as six_progress_ring};
2
+ //# sourceMappingURL=p-63acceb6.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["sixProgressRingCss","SixProgressRingStyle0","SixProgressRing","handlePercentageChange","this","updateProgress","componentDidLoad","_a","indicator","r","radius","baseVal","value","circumference","Math","PI","offset","percentage","style","strokeDasharray","strokeDashoffset","render","h","key","part","class","width","size","height","strokeWidth","fill","cx","cy","ref","el"],"sources":["src/components/six-progress-ring/six-progress-ring.scss?tag=six-progress-ring&encapsulation=shadow","src/components/six-progress-ring/six-progress-ring.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The track color.\n * @prop --indicator-color: The indicator color.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n\n display: inline-flex;\n}\n\n.progress-ring {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n}\n\n.progress-ring__image {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n}\n\n.progress-ring__track {\n stroke: var(--track-color);\n}\n\n.progress-ring__indicator {\n stroke: var(--indicator-color);\n transition: 0.35s stroke-dashoffset, 0.35s stroke;\n}\n\n.progress-ring__label {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n user-select: none;\n font-family: var(--six-font-family);\n}\n","import { Component, h, Prop, Watch } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - A label to show inside the ring.\n *\n * @part base - The component's base wrapper.\n * @part label - The progress ring label.\n */\n\n@Component({\n tag: 'six-progress-ring',\n styleUrl: 'six-progress-ring.scss',\n shadow: true,\n})\nexport class SixProgressRing {\n private indicator?: SVGCircleElement;\n\n /** The size of the progress ring in pixels. */\n @Prop() size = 128;\n\n /** The stroke width of the progress ring in pixels. */\n @Prop() strokeWidth = 4;\n\n /** The current progress percentage, 0 - 100. */\n @Prop() percentage = 0;\n\n @Watch('percentage')\n handlePercentageChange() {\n this.updateProgress();\n }\n\n componentDidLoad() {\n this.updateProgress();\n }\n\n private updateProgress() {\n if (this.indicator?.r == null) return;\n\n const radius = this.indicator.r.baseVal.value;\n const circumference = radius * 2 * Math.PI;\n const offset = circumference - (this.percentage / 100) * circumference;\n\n this.indicator.style.strokeDasharray = `${circumference} ${circumference}`;\n this.indicator.style.strokeDashoffset = `${offset}`;\n }\n\n render() {\n return (\n <div part=\"base\" class=\"progress-ring\">\n <svg class=\"progress-ring__image\" width={this.size} height={this.size}>\n <circle\n class=\"progress-ring__track\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n\n <circle\n ref={(el) => (this.indicator = el as SVGCircleElement)}\n class=\"progress-ring__indicator\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n </svg>\n\n <span part=\"label\" class=\"progress-ring__label\">\n <slot />\n </span>\n </div>\n );\n }\n}\n"],"mappings":"sCAAA,MAAMA,EAAqB,mvBAC3B,MAAAC,EAAeD,E,MCkBFE,EAAe,M,mCAIX,I,iBAGO,E,gBAGD,C,CAGrB,sBAAAC,GACEC,KAAKC,gB,CAGP,gBAAAC,GACEF,KAAKC,gB,CAGC,cAAAA,G,MACN,KAAIE,EAAAH,KAAKI,aAAS,MAAAD,SAAA,SAAAA,EAAEE,IAAK,KAAM,OAE/B,MAAMC,EAASN,KAAKI,UAAUC,EAAEE,QAAQC,MACxC,MAAMC,EAAgBH,EAAS,EAAII,KAAKC,GACxC,MAAMC,EAASH,EAAiBT,KAAKa,WAAa,IAAOJ,EAEzDT,KAAKI,UAAUU,MAAMC,gBAAkB,GAAGN,KAAiBA,IAC3DT,KAAKI,UAAUU,MAAME,iBAAmB,GAAGJ,G,CAG7C,MAAAK,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,KAAK,OAAOC,MAAM,iBACrBH,EAAA,OAAAC,IAAA,2CAAKE,MAAM,uBAAuBC,MAAOtB,KAAKuB,KAAMC,OAAQxB,KAAKuB,MAC/DL,EAAA,UAAAC,IAAA,2CACEE,MAAM,uBAAsB,eACdrB,KAAKyB,YAAW,iBACf,QACfC,KAAK,cACLrB,EAAGL,KAAKuB,KAAO,EAAIvB,KAAKyB,YAAc,EACtCE,GAAI3B,KAAKuB,KAAO,EAChBK,GAAI5B,KAAKuB,KAAO,IAGlBL,EAAA,UAAAC,IAAA,2CACEU,IAAMC,GAAQ9B,KAAKI,UAAY0B,EAC/BT,MAAM,2BAA0B,eAClBrB,KAAKyB,YAAW,iBACf,QACfC,KAAK,cACLrB,EAAGL,KAAKuB,KAAO,EAAIvB,KAAKyB,YAAc,EACtCE,GAAI3B,KAAKuB,KAAO,EAChBK,GAAI5B,KAAKuB,KAAO,KAIpBL,EAAA,QAAAC,IAAA,2CAAMC,KAAK,QAAQC,MAAM,wBACvBH,EAAA,QAAAC,IAAA,8C"}
1
+ {"version":3,"names":["sixProgressRingCss","SixProgressRingStyle0","SixProgressRing","handlePercentageChange","this","updateProgress","componentDidLoad","_a","indicator","r","radius","baseVal","value","circumference","Math","PI","offset","percentage","style","strokeDasharray","strokeDashoffset","render","h","key","part","class","width","size","height","strokeWidth","fill","cx","cy","ref","el"],"sources":["src/components/six-progress-ring/six-progress-ring.scss?tag=six-progress-ring&encapsulation=shadow","src/components/six-progress-ring/six-progress-ring.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The track color.\n * @prop --indicator-color: The indicator color.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n\n display: inline-flex;\n}\n\n.progress-ring {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n}\n\n.progress-ring__image {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n}\n\n.progress-ring__track {\n stroke: var(--track-color);\n}\n\n.progress-ring__indicator {\n stroke: var(--indicator-color);\n transition: 0.35s stroke-dashoffset, 0.35s stroke;\n}\n\n.progress-ring__label {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n user-select: none;\n font-family: var(--six-font-family);\n}\n","import { Component, h, Prop, Watch } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - A label to show inside the ring.\n *\n * @part base - The component's base wrapper.\n * @part label - The progress ring label.\n */\n\n@Component({\n tag: 'six-progress-ring',\n styleUrl: 'six-progress-ring.scss',\n shadow: true,\n})\nexport class SixProgressRing {\n private indicator?: SVGCircleElement;\n\n /** The size of the progress ring in pixels. */\n @Prop() size = 128;\n\n /** The stroke width of the progress ring in pixels. */\n @Prop() strokeWidth = 4;\n\n /** The current progress percentage, 0 - 100. */\n @Prop() percentage = 0;\n\n @Watch('percentage')\n handlePercentageChange() {\n this.updateProgress();\n }\n\n componentDidLoad() {\n this.updateProgress();\n }\n\n private updateProgress() {\n if (this.indicator?.r == null) return;\n\n const radius = this.indicator.r.baseVal.value;\n const circumference = radius * 2 * Math.PI;\n const offset = circumference - (this.percentage / 100) * circumference;\n\n this.indicator.style.strokeDasharray = `${circumference} ${circumference}`;\n this.indicator.style.strokeDashoffset = `${offset}`;\n }\n\n render() {\n return (\n <div part=\"base\" class=\"progress-ring\">\n <svg class=\"progress-ring__image\" width={this.size} height={this.size}>\n <circle\n class=\"progress-ring__track\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n\n <circle\n ref={(el) => (this.indicator = el as SVGCircleElement)}\n class=\"progress-ring__indicator\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size /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