@six-group/ui-library 0.0.0-insider.cd0cd0d → 0.0.0-insider.d82aaa2

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 (763) hide show
  1. package/README.md +9 -0
  2. package/dist/cjs/{event-listeners-b835dfae.js → event-listeners-fdfe838c.js} +1 -1
  3. package/dist/cjs/event-listeners-fdfe838c.js.map +1 -0
  4. package/dist/cjs/{execution-control-45c84c46.js → execution-control-b4707294.js} +1 -1
  5. package/dist/cjs/execution-control-b4707294.js.map +1 -0
  6. package/dist/cjs/{focus-visible-e0d93a95.js → focus-visible-ae2470dd.js} +1 -1
  7. package/dist/cjs/focus-visible-ae2470dd.js.map +1 -0
  8. package/dist/cjs/{form-8cbd4e0e.js → form-2df8c5bb.js} +1 -1
  9. package/dist/{esm/form-0b9c11cd.js.map → cjs/form-2df8c5bb.js.map} +1 -1
  10. package/dist/cjs/{form-control-8df00a52.js → form-control-d369af14.js} +2 -2
  11. package/dist/cjs/form-control-d369af14.js.map +1 -0
  12. package/dist/cjs/{index-2f6daa5b.js → index-900437fc.js} +396 -54
  13. package/dist/cjs/index-900437fc.js.map +1 -0
  14. package/dist/cjs/index.cjs.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +3 -12
  16. package/dist/cjs/loader.cjs.js.map +1 -1
  17. package/dist/cjs/{modal-21350fb5.js → modal-d5f074c7.js} +1 -1
  18. package/dist/cjs/modal-d5f074c7.js.map +1 -0
  19. package/dist/cjs/{popover-8885d50f.js → popover-2df7e154.js} +1 -1
  20. package/dist/{esm/popover-2e72e7d8.js.map → cjs/popover-2df7e154.js.map} +1 -1
  21. package/dist/cjs/{popup-44836aaf.js → popup-f1d9910f.js} +1 -1
  22. package/dist/cjs/popup-f1d9910f.js.map +1 -0
  23. package/dist/cjs/{scroll-76e6f5d7.js → scroll-03678de1.js} +1 -1
  24. package/dist/cjs/scroll-03678de1.js.map +1 -0
  25. package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
  26. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
  27. package/dist/cjs/six-alert.cjs.entry.js +1 -1
  28. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  29. package/dist/cjs/six-avatar.cjs.entry.js +1 -1
  30. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  32. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-button.cjs.entry.js +3 -3
  34. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-card.cjs.entry.js +1 -1
  36. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-checkbox.cjs.entry.js +6 -14
  38. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-datepicker.cjs.entry.js +8 -6
  40. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-details.cjs.entry.js +2 -2
  42. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-dialog.cjs.entry.js +4 -4
  44. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-drawer.cjs.entry.js +4 -4
  46. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  47. package/dist/cjs/six-dropdown_2.cjs.entry.js +5 -5
  48. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  50. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  52. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  54. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
  56. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  58. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-group-label.cjs.entry.js +3 -3
  60. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-header.cjs.entry.js +3 -3
  62. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-icon-button.cjs.entry.js +2 -2
  64. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-input.cjs.entry.js +6 -6
  68. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-item-picker.cjs.entry.js +6 -6
  70. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  72. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  74. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  76. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  78. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-menu-item.cjs.entry.js +2 -2
  80. package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -1
  81. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  82. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  83. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  84. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
  86. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
  88. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-radio.cjs.entry.js +11 -19
  90. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-range.cjs.entry.js +4 -4
  92. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-root.cjs.entry.js +1 -1
  94. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-search-field.cjs.entry.js +3 -3
  96. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  97. package/dist/cjs/six-select.cjs.entry.js +12 -11
  98. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  99. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +2 -2
  100. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
  102. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  103. package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
  104. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  105. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  106. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  107. package/dist/cjs/six-switch.cjs.entry.js +6 -4
  108. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  109. package/dist/cjs/six-tab-group.cjs.entry.js +3 -3
  110. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  111. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  112. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  113. package/dist/cjs/six-tab.cjs.entry.js +1 -1
  114. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  115. package/dist/cjs/six-tag.cjs.entry.js +2 -2
  116. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  117. package/dist/cjs/six-textarea.cjs.entry.js +4 -4
  118. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  119. package/dist/cjs/six-tile.cjs.entry.js +2 -2
  120. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  121. package/dist/cjs/six-timepicker.cjs.entry.js +6 -6
  122. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  123. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  124. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  125. package/dist/cjs/{slot-bccbdb59.js → slot-6e6a400f.js} +1 -1
  126. package/dist/cjs/slot-6e6a400f.js.map +1 -0
  127. package/dist/cjs/{types-64878648.js → types-47199040.js} +1 -1
  128. package/dist/cjs/types-47199040.js.map +1 -0
  129. package/dist/cjs/ui-library.cjs.js +3 -6
  130. package/dist/cjs/ui-library.cjs.js.map +1 -1
  131. package/dist/collection/collection-manifest.json +54 -54
  132. package/dist/collection/components/six-alert/six-alert.js +15 -8
  133. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  134. package/dist/collection/components/six-alert/test/six-alert.spec.js +25 -0
  135. package/dist/collection/components/six-alert/test/six-alert.spec.js.map +1 -0
  136. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  137. package/dist/collection/components/six-avatar/test/six-avatar.spec.js +26 -0
  138. package/dist/collection/components/six-avatar/test/six-avatar.spec.js.map +1 -0
  139. package/dist/collection/components/six-badge/six-badge.js +1 -1
  140. package/dist/collection/components/six-badge/test/six-badge.spec.js +20 -0
  141. package/dist/collection/components/six-badge/test/six-badge.spec.js.map +1 -0
  142. package/dist/collection/components/six-button/six-button.js +13 -8
  143. package/dist/collection/components/six-button/six-button.js.map +1 -1
  144. package/dist/collection/components/six-button/test/six-button.spec.js +69 -0
  145. package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -0
  146. package/dist/collection/components/six-card/six-card.js +1 -1
  147. package/dist/collection/components/six-card/test/six-card.spec.js +18 -0
  148. package/dist/collection/components/six-card/test/six-card.spec.js.map +1 -0
  149. package/dist/collection/components/six-checkbox/six-checkbox.js +18 -36
  150. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  151. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js +79 -0
  152. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js.map +1 -0
  153. package/dist/collection/components/six-datepicker/components/day-selection.js +1 -1
  154. package/dist/collection/components/six-datepicker/components/month-selection.js +2 -2
  155. package/dist/collection/components/six-datepicker/components/year-selection.js +2 -2
  156. package/dist/collection/components/six-datepicker/six-datepicker.js +37 -23
  157. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  158. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js +26 -0
  159. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js.map +1 -0
  160. package/dist/collection/components/six-details/six-details.js +14 -8
  161. package/dist/collection/components/six-details/six-details.js.map +1 -1
  162. package/dist/collection/components/six-details/test/six-details.spec.js +36 -0
  163. package/dist/collection/components/six-details/test/six-details.spec.js.map +1 -0
  164. package/dist/collection/components/six-dialog/six-dialog.js +21 -13
  165. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  166. package/dist/collection/components/six-dialog/test/six-dialog.spec.js +34 -0
  167. package/dist/collection/components/six-dialog/test/six-dialog.spec.js.map +1 -0
  168. package/dist/collection/components/six-drawer/six-drawer.js +21 -13
  169. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  170. package/dist/collection/components/six-drawer/test/six-drawer.spec.js +34 -0
  171. package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -0
  172. package/dist/collection/components/six-dropdown/six-dropdown.js +30 -18
  173. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  174. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +122 -0
  175. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -0
  176. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  177. package/dist/collection/components/six-error-page/test/six-error-page.spec.js +240 -0
  178. package/dist/collection/components/six-error-page/test/six-error-page.spec.js.map +1 -0
  179. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  180. package/dist/collection/components/six-file-list/test/six-file-list.spec.js +67 -0
  181. package/dist/collection/components/six-file-list/test/six-file-list.spec.js.map +1 -0
  182. package/dist/collection/components/six-file-list-item/six-file-list-item.js +5 -3
  183. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  184. package/dist/collection/components/six-file-list-item/test/six-file-list-item.spec.js +169 -0
  185. package/dist/collection/components/six-file-list-item/test/six-file-list-item.spec.js.map +1 -0
  186. package/dist/collection/components/six-file-upload/six-file-upload.js +5 -3
  187. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  188. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +103 -0
  189. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -0
  190. package/dist/collection/components/six-footer/six-footer.js +1 -1
  191. package/dist/collection/components/six-footer/test/six-footer.spec.js +21 -0
  192. package/dist/collection/components/six-footer/test/six-footer.spec.js.map +1 -0
  193. package/dist/collection/components/six-group-label/six-group-label.js +3 -3
  194. package/dist/collection/components/six-group-label/test/six-group-label.spec.js +43 -0
  195. package/dist/collection/components/six-group-label/test/six-group-label.spec.js.map +1 -0
  196. package/dist/collection/components/six-header/six-header.js +19 -11
  197. package/dist/collection/components/six-header/six-header.js.map +1 -1
  198. package/dist/collection/components/six-header/test/six-header.spec.js +133 -0
  199. package/dist/collection/components/six-header/test/six-header.spec.js.map +1 -0
  200. package/dist/collection/components/six-icon/six-icon.js +1 -1
  201. package/dist/collection/components/six-icon/test/six-icon.spec.js +20 -0
  202. package/dist/collection/components/six-icon/test/six-icon.spec.js.map +1 -0
  203. package/dist/collection/components/six-icon-button/six-icon-button.js +2 -2
  204. package/dist/collection/components/six-icon-button/test/six-icon-button.spec.js +23 -0
  205. package/dist/collection/components/six-icon-button/test/six-icon-button.spec.js.map +1 -0
  206. package/dist/collection/components/six-input/six-input.css +1 -1
  207. package/dist/collection/components/six-input/six-input.js +27 -16
  208. package/dist/collection/components/six-input/six-input.js.map +1 -1
  209. package/dist/collection/components/six-input/test/six-input.spec.js +37 -0
  210. package/dist/collection/components/six-input/test/six-input.spec.js.map +1 -0
  211. package/dist/collection/components/six-item-picker/six-item-picker.js +14 -10
  212. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  213. package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js +90 -0
  214. package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js.map +1 -0
  215. package/dist/collection/components/six-language-switcher/six-language-switcher.js +5 -3
  216. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  217. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +196 -0
  218. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -0
  219. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  220. package/dist/collection/components/six-layout-grid/test/six-layout-grid.spec.js +18 -0
  221. package/dist/collection/components/six-layout-grid/test/six-layout-grid.spec.js.map +1 -0
  222. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  223. package/dist/collection/components/six-main-container/test/six-main-container.spec.js +22 -0
  224. package/dist/collection/components/six-main-container/test/six-main-container.spec.js.map +1 -0
  225. package/dist/collection/components/six-menu/six-menu.js +12 -8
  226. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  227. package/dist/collection/components/six-menu/test/six-menu.spec.js +93 -0
  228. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -0
  229. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  230. package/dist/collection/components/six-menu-divider/test/six-menu-divider.spec.js +18 -0
  231. package/dist/collection/components/six-menu-divider/test/six-menu-divider.spec.js.map +1 -0
  232. package/dist/collection/components/six-menu-item/six-menu-item.js +10 -6
  233. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  234. package/dist/collection/components/six-menu-item/test/six-menu-item.spec.js +33 -0
  235. package/dist/collection/components/six-menu-item/test/six-menu-item.spec.js.map +1 -0
  236. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  237. package/dist/collection/components/six-menu-label/test/six-menu-label.spec.js +20 -0
  238. package/dist/collection/components/six-menu-label/test/six-menu-label.spec.js.map +1 -0
  239. package/dist/collection/components/six-picto/six-picto.js +1 -1
  240. package/dist/collection/components/six-picto/test/six-picto.spec.js +33 -0
  241. package/dist/collection/components/six-picto/test/six-picto.spec.js.map +1 -0
  242. package/dist/collection/components/six-progress-bar/six-progress-bar.js +1 -1
  243. package/dist/collection/components/six-progress-bar/test/six-progress-bar.spec.js +24 -0
  244. package/dist/collection/components/six-progress-bar/test/six-progress-bar.spec.js.map +1 -0
  245. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  246. package/dist/collection/components/six-progress-ring/test/six-progress-ring.spec.js +26 -0
  247. package/dist/collection/components/six-progress-ring/test/six-progress-ring.spec.js.map +1 -0
  248. package/dist/collection/components/six-radio/six-radio.js +23 -41
  249. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  250. package/dist/collection/components/six-radio/test/six-radio.spec.js +63 -0
  251. package/dist/collection/components/six-radio/test/six-radio.spec.js.map +1 -0
  252. package/dist/collection/components/six-range/six-range.js +16 -10
  253. package/dist/collection/components/six-range/six-range.js.map +1 -1
  254. package/dist/collection/components/six-range/test/six-range.spec.js +32 -0
  255. package/dist/collection/components/six-range/test/six-range.spec.js.map +1 -0
  256. package/dist/collection/components/six-root/six-root.js +5 -3
  257. package/dist/collection/components/six-root/six-root.js.map +1 -1
  258. package/dist/collection/components/six-root/test/six-root.spec.js +43 -0
  259. package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -0
  260. package/dist/collection/components/six-search-field/six-search-field.js +5 -4
  261. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  262. package/dist/collection/components/six-search-field/test/six-search-field.spec.js +22 -0
  263. package/dist/collection/components/six-search-field/test/six-search-field.spec.js.map +1 -0
  264. package/dist/collection/components/six-select/six-select.css +6 -9
  265. package/dist/collection/components/six-select/six-select.js +24 -17
  266. package/dist/collection/components/six-select/six-select.js.map +1 -1
  267. package/dist/collection/components/six-select/test/six-select.spec.js +82 -0
  268. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -0
  269. package/dist/collection/components/six-select/test/util.spec.js +81 -0
  270. package/dist/collection/components/six-select/test/util.spec.js.map +1 -0
  271. package/dist/collection/components/six-sidebar/six-sidebar.js +26 -14
  272. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  273. package/dist/collection/components/six-sidebar/test/six-sidebar.spec.js +22 -0
  274. package/dist/collection/components/six-sidebar/test/six-sidebar.spec.js.map +1 -0
  275. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +1 -1
  276. package/dist/collection/components/six-sidebar-item/test/six-sidebar-item.spec.js +50 -0
  277. package/dist/collection/components/six-sidebar-item/test/six-sidebar-item.spec.js.map +1 -0
  278. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +2 -2
  279. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +53 -0
  280. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -0
  281. package/dist/collection/components/six-spinner/six-spinner.js +1 -1
  282. package/dist/collection/components/six-spinner/test/six-spinner.spec.js +37 -0
  283. package/dist/collection/components/six-spinner/test/six-spinner.spec.js.map +1 -0
  284. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +3 -2
  285. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js.map +1 -1
  286. package/dist/collection/components/six-stage-indicator/test/six-stage-indicator.spec.js +117 -0
  287. package/dist/collection/components/six-stage-indicator/test/six-stage-indicator.spec.js.map +1 -0
  288. package/dist/collection/components/six-switch/six-switch.js +14 -8
  289. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  290. package/dist/collection/components/six-switch/test/six-switch.spec.js +69 -0
  291. package/dist/collection/components/six-switch/test/six-switch.spec.js.map +1 -0
  292. package/dist/collection/components/six-tab/six-tab.js +9 -5
  293. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  294. package/dist/collection/components/six-tab/test/six-tab.spec.js +20 -0
  295. package/dist/collection/components/six-tab/test/six-tab.spec.js.map +1 -0
  296. package/dist/collection/components/six-tab-group/six-tab-group.js +10 -7
  297. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  298. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +45 -0
  299. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +1 -0
  300. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  301. package/dist/collection/components/six-tab-panel/test/six-tab-panel.spec.js +20 -0
  302. package/dist/collection/components/six-tab-panel/test/six-tab-panel.spec.js.map +1 -0
  303. package/dist/collection/components/six-tag/six-tag.css +6 -0
  304. package/dist/collection/components/six-tag/six-tag.js +3 -2
  305. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  306. package/dist/collection/components/six-tag/test/six-tag.spec.js +42 -0
  307. package/dist/collection/components/six-tag/test/six-tag.spec.js.map +1 -0
  308. package/dist/collection/components/six-textarea/six-textarea.js +24 -14
  309. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  310. package/dist/collection/components/six-textarea/test/six-textarea.spec.js +117 -0
  311. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -0
  312. package/dist/collection/components/six-tile/six-tile.js +10 -6
  313. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  314. package/dist/collection/components/six-tile/test/six-tile.spec.js +69 -0
  315. package/dist/collection/components/six-tile/test/six-tile.spec.js.map +1 -0
  316. package/dist/collection/components/six-timepicker/six-timepicker.js +19 -13
  317. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  318. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js +496 -0
  319. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -0
  320. package/dist/collection/components/six-tooltip/six-tooltip.js +14 -8
  321. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  322. package/dist/collection/components/six-tooltip/test/six-tooltip.spec.js +28 -0
  323. package/dist/collection/components/six-tooltip/test/six-tooltip.spec.js.map +1 -0
  324. package/dist/collection/functional-components/form-control/form-control.js +1 -1
  325. package/dist/collection/utils/date-util.js +1 -1
  326. package/dist/collection/utils/date-util.spec.js +995 -0
  327. package/dist/collection/utils/date-util.spec.js.map +1 -0
  328. package/dist/collection/utils/event-listeners.js.map +1 -1
  329. package/dist/collection/utils/popover.js +1 -1
  330. package/dist/collection/utils/scroll.js +1 -1
  331. package/dist/collection/utils/scroll.spec.js +122 -0
  332. package/dist/collection/utils/scroll.spec.js.map +1 -0
  333. package/dist/collection/utils/time.util.spec.js +368 -0
  334. package/dist/collection/utils/time.util.spec.js.map +1 -0
  335. package/dist/collection/wrappers/set-attributes/set-attributes.js +1 -1
  336. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +16 -0
  337. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +1 -0
  338. package/dist/components/event-listeners.js.map +1 -1
  339. package/dist/components/execution-control.js.map +1 -1
  340. package/dist/components/focus-visible.js.map +1 -1
  341. package/dist/components/form-control.js.map +1 -1
  342. package/dist/components/form.js.map +1 -1
  343. package/dist/components/index.js.map +1 -1
  344. package/dist/components/modal.js.map +1 -1
  345. package/dist/components/popover.js.map +1 -1
  346. package/dist/components/scroll.js.map +1 -1
  347. package/dist/components/set-attributes2.js.map +1 -1
  348. package/dist/components/six-alert.js.map +1 -1
  349. package/dist/components/six-avatar.js.map +1 -1
  350. package/dist/components/six-badge.js.map +1 -1
  351. package/dist/components/six-button.js.map +1 -1
  352. package/dist/components/six-card.js.map +1 -1
  353. package/dist/components/six-checkbox.js +3 -12
  354. package/dist/components/six-checkbox.js.map +1 -1
  355. package/dist/components/six-datepicker.js +3 -1
  356. package/dist/components/six-datepicker.js.map +1 -1
  357. package/dist/components/six-details2.js.map +1 -1
  358. package/dist/components/six-dialog.js.map +1 -1
  359. package/dist/components/six-drawer.js.map +1 -1
  360. package/dist/components/six-dropdown2.js.map +1 -1
  361. package/dist/components/six-error-page.js.map +1 -1
  362. package/dist/components/six-file-list-item.js.map +1 -1
  363. package/dist/components/six-file-list.js.map +1 -1
  364. package/dist/components/six-file-upload.js.map +1 -1
  365. package/dist/components/six-footer.js.map +1 -1
  366. package/dist/components/six-group-label.js.map +1 -1
  367. package/dist/components/six-header.js.map +1 -1
  368. package/dist/components/six-icon-button2.js.map +1 -1
  369. package/dist/components/six-icon2.js.map +1 -1
  370. package/dist/components/six-input2.js +1 -1
  371. package/dist/components/six-input2.js.map +1 -1
  372. package/dist/components/six-item-picker2.js +2 -2
  373. package/dist/components/six-item-picker2.js.map +1 -1
  374. package/dist/components/six-language-switcher.js.map +1 -1
  375. package/dist/components/six-layout-grid.js.map +1 -1
  376. package/dist/components/six-main-container.js.map +1 -1
  377. package/dist/components/six-menu-divider.js.map +1 -1
  378. package/dist/components/six-menu-item2.js.map +1 -1
  379. package/dist/components/six-menu-label.js.map +1 -1
  380. package/dist/components/six-menu2.js.map +1 -1
  381. package/dist/components/six-picto2.js.map +1 -1
  382. package/dist/components/six-progress-bar.js.map +1 -1
  383. package/dist/components/six-progress-ring.js.map +1 -1
  384. package/dist/components/six-radio.js +10 -19
  385. package/dist/components/six-radio.js.map +1 -1
  386. package/dist/components/six-range.js.map +1 -1
  387. package/dist/components/six-root.js.map +1 -1
  388. package/dist/components/six-search-field.js.map +1 -1
  389. package/dist/components/six-select.js +7 -6
  390. package/dist/components/six-select.js.map +1 -1
  391. package/dist/components/six-sidebar-item-group.js.map +1 -1
  392. package/dist/components/six-sidebar-item.js.map +1 -1
  393. package/dist/components/six-sidebar.js.map +1 -1
  394. package/dist/components/six-spinner2.js.map +1 -1
  395. package/dist/components/six-stage-indicator2.js.map +1 -1
  396. package/dist/components/six-switch.js +3 -1
  397. package/dist/components/six-switch.js.map +1 -1
  398. package/dist/components/six-tab-group.js.map +1 -1
  399. package/dist/components/six-tab-panel.js.map +1 -1
  400. package/dist/components/six-tab.js.map +1 -1
  401. package/dist/components/six-tag2.js +1 -1
  402. package/dist/components/six-tag2.js.map +1 -1
  403. package/dist/components/six-textarea.js.map +1 -1
  404. package/dist/components/six-tile.js.map +1 -1
  405. package/dist/components/six-timepicker2.js.map +1 -1
  406. package/dist/components/six-tooltip2.js.map +1 -1
  407. package/dist/components/slot.js.map +1 -1
  408. package/dist/components.d.ts +361 -88
  409. package/dist/components.json +3710 -78
  410. package/dist/esm/{event-listeners-535f3ad1.js → event-listeners-f6e5b0ab.js} +1 -1
  411. package/dist/esm/event-listeners-f6e5b0ab.js.map +1 -0
  412. package/dist/esm/{execution-control-72cc50f4.js → execution-control-e0892a05.js} +1 -1
  413. package/dist/esm/execution-control-e0892a05.js.map +1 -0
  414. package/dist/esm/{focus-visible-fa7129a0.js → focus-visible-fc6ac671.js} +1 -1
  415. package/dist/esm/focus-visible-fc6ac671.js.map +1 -0
  416. package/dist/esm/{form-0b9c11cd.js → form-81252534.js} +1 -1
  417. package/dist/esm/form-81252534.js.map +1 -0
  418. package/dist/esm/{form-control-785c5f79.js → form-control-32cb533f.js} +2 -2
  419. package/dist/esm/form-control-32cb533f.js.map +1 -0
  420. package/dist/esm/{index-5c0f6628.js → index-8a74f992.js} +396 -54
  421. package/dist/esm/index-8a74f992.js.map +1 -0
  422. package/dist/esm/index.js.map +1 -1
  423. package/dist/esm/loader.js +4 -13
  424. package/dist/esm/loader.js.map +1 -1
  425. package/dist/esm/{modal-b1d96441.js → modal-7d32e141.js} +1 -1
  426. package/dist/esm/modal-7d32e141.js.map +1 -0
  427. package/dist/esm/{popover-2e72e7d8.js → popover-136d1f73.js} +1 -1
  428. package/dist/esm/popover-136d1f73.js.map +1 -0
  429. package/dist/esm/{popup-678b8592.js → popup-7f89a001.js} +1 -1
  430. package/dist/esm/popup-7f89a001.js.map +1 -0
  431. package/dist/esm/{scroll-180b53fd.js → scroll-3fb087a2.js} +1 -1
  432. package/dist/esm/scroll-3fb087a2.js.map +1 -0
  433. package/dist/esm/set-attributes_2.entry.js +1 -1
  434. package/dist/esm/set-attributes_2.entry.js.map +1 -1
  435. package/dist/esm/six-alert.entry.js +1 -1
  436. package/dist/esm/six-alert.entry.js.map +1 -1
  437. package/dist/esm/six-avatar.entry.js +1 -1
  438. package/dist/esm/six-avatar.entry.js.map +1 -1
  439. package/dist/esm/six-badge.entry.js +1 -1
  440. package/dist/esm/six-badge.entry.js.map +1 -1
  441. package/dist/esm/six-button.entry.js +3 -3
  442. package/dist/esm/six-button.entry.js.map +1 -1
  443. package/dist/esm/six-card.entry.js +1 -1
  444. package/dist/esm/six-card.entry.js.map +1 -1
  445. package/dist/esm/six-checkbox.entry.js +6 -14
  446. package/dist/esm/six-checkbox.entry.js.map +1 -1
  447. package/dist/esm/six-datepicker.entry.js +8 -6
  448. package/dist/esm/six-datepicker.entry.js.map +1 -1
  449. package/dist/esm/six-details.entry.js +2 -2
  450. package/dist/esm/six-details.entry.js.map +1 -1
  451. package/dist/esm/six-dialog.entry.js +4 -4
  452. package/dist/esm/six-dialog.entry.js.map +1 -1
  453. package/dist/esm/six-drawer.entry.js +4 -4
  454. package/dist/esm/six-drawer.entry.js.map +1 -1
  455. package/dist/esm/six-dropdown_2.entry.js +5 -5
  456. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  457. package/dist/esm/six-error-page.entry.js +1 -1
  458. package/dist/esm/six-error-page.entry.js.map +1 -1
  459. package/dist/esm/six-file-list-item.entry.js +1 -1
  460. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  461. package/dist/esm/six-file-list.entry.js +1 -1
  462. package/dist/esm/six-file-list.entry.js.map +1 -1
  463. package/dist/esm/six-file-upload.entry.js +1 -1
  464. package/dist/esm/six-file-upload.entry.js.map +1 -1
  465. package/dist/esm/six-footer.entry.js +1 -1
  466. package/dist/esm/six-footer.entry.js.map +1 -1
  467. package/dist/esm/six-group-label.entry.js +3 -3
  468. package/dist/esm/six-group-label.entry.js.map +1 -1
  469. package/dist/esm/six-header.entry.js +3 -3
  470. package/dist/esm/six-header.entry.js.map +1 -1
  471. package/dist/esm/six-icon-button.entry.js +2 -2
  472. package/dist/esm/six-icon-button.entry.js.map +1 -1
  473. package/dist/esm/six-icon.entry.js +1 -1
  474. package/dist/esm/six-icon.entry.js.map +1 -1
  475. package/dist/esm/six-input.entry.js +6 -6
  476. package/dist/esm/six-input.entry.js.map +1 -1
  477. package/dist/esm/six-item-picker.entry.js +6 -6
  478. package/dist/esm/six-item-picker.entry.js.map +1 -1
  479. package/dist/esm/six-language-switcher.entry.js +1 -1
  480. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  481. package/dist/esm/six-layout-grid.entry.js +1 -1
  482. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  483. package/dist/esm/six-main-container.entry.js +1 -1
  484. package/dist/esm/six-main-container.entry.js.map +1 -1
  485. package/dist/esm/six-menu-divider.entry.js +1 -1
  486. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  487. package/dist/esm/six-menu-item.entry.js +2 -2
  488. package/dist/esm/six-menu-item.entry.js.map +1 -1
  489. package/dist/esm/six-menu-label.entry.js +1 -1
  490. package/dist/esm/six-menu-label.entry.js.map +1 -1
  491. package/dist/esm/six-picto.entry.js +1 -1
  492. package/dist/esm/six-picto.entry.js.map +1 -1
  493. package/dist/esm/six-progress-bar.entry.js +1 -1
  494. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  495. package/dist/esm/six-progress-ring.entry.js +1 -1
  496. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  497. package/dist/esm/six-radio.entry.js +11 -19
  498. package/dist/esm/six-radio.entry.js.map +1 -1
  499. package/dist/esm/six-range.entry.js +4 -4
  500. package/dist/esm/six-range.entry.js.map +1 -1
  501. package/dist/esm/six-root.entry.js +1 -1
  502. package/dist/esm/six-root.entry.js.map +1 -1
  503. package/dist/esm/six-search-field.entry.js +3 -3
  504. package/dist/esm/six-search-field.entry.js.map +1 -1
  505. package/dist/esm/six-select.entry.js +12 -11
  506. package/dist/esm/six-select.entry.js.map +1 -1
  507. package/dist/esm/six-sidebar-item-group.entry.js +2 -2
  508. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  509. package/dist/esm/six-sidebar-item.entry.js +1 -1
  510. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  511. package/dist/esm/six-sidebar.entry.js +2 -2
  512. package/dist/esm/six-sidebar.entry.js.map +1 -1
  513. package/dist/esm/six-spinner.entry.js +1 -1
  514. package/dist/esm/six-spinner.entry.js.map +1 -1
  515. package/dist/esm/six-switch.entry.js +6 -4
  516. package/dist/esm/six-switch.entry.js.map +1 -1
  517. package/dist/esm/six-tab-group.entry.js +3 -3
  518. package/dist/esm/six-tab-group.entry.js.map +1 -1
  519. package/dist/esm/six-tab-panel.entry.js +1 -1
  520. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  521. package/dist/esm/six-tab.entry.js +1 -1
  522. package/dist/esm/six-tab.entry.js.map +1 -1
  523. package/dist/esm/six-tag.entry.js +2 -2
  524. package/dist/esm/six-tag.entry.js.map +1 -1
  525. package/dist/esm/six-textarea.entry.js +4 -4
  526. package/dist/esm/six-textarea.entry.js.map +1 -1
  527. package/dist/esm/six-tile.entry.js +2 -2
  528. package/dist/esm/six-tile.entry.js.map +1 -1
  529. package/dist/esm/six-timepicker.entry.js +6 -6
  530. package/dist/esm/six-timepicker.entry.js.map +1 -1
  531. package/dist/esm/six-tooltip.entry.js +2 -2
  532. package/dist/esm/six-tooltip.entry.js.map +1 -1
  533. package/dist/esm/{slot-2e64df19.js → slot-ad36df3a.js} +1 -1
  534. package/dist/esm/slot-ad36df3a.js.map +1 -0
  535. package/dist/esm/{types-4b10b413.js → types-59b455aa.js} +1 -1
  536. package/dist/esm/types-59b455aa.js.map +1 -0
  537. package/dist/esm/ui-library.js +4 -7
  538. package/dist/esm/ui-library.js.map +1 -1
  539. package/dist/types/components/six-checkbox/six-checkbox.d.ts +0 -4
  540. package/dist/types/components/six-radio/six-radio.d.ts +0 -5
  541. package/dist/types/components.d.ts +0 -8
  542. package/dist/types/stencil-public-runtime.d.ts +15 -2
  543. package/dist/types/utils/event-listeners.d.ts +3 -3
  544. package/dist/ui-library/index.esm.js.map +1 -1
  545. package/dist/ui-library/p-02981b91.entry.js +2 -0
  546. package/dist/ui-library/p-02981b91.entry.js.map +1 -0
  547. package/dist/ui-library/{p-25a3bf57.js → p-0f510624.js} +1 -1
  548. package/dist/ui-library/p-0f510624.js.map +1 -0
  549. package/dist/ui-library/{p-0b2c6348.js → p-0fdb185d.js} +1 -1
  550. package/dist/ui-library/p-0fdb185d.js.map +1 -0
  551. package/dist/ui-library/{p-a844cb72.entry.js → p-1256cc0a.entry.js} +2 -2
  552. package/dist/ui-library/p-1256cc0a.entry.js.map +1 -0
  553. package/dist/ui-library/{p-e8feb81f.entry.js → p-13b43e04.entry.js} +2 -2
  554. package/dist/ui-library/p-13b43e04.entry.js.map +1 -0
  555. package/dist/ui-library/{p-d87a6f4d.js → p-15559d38.js} +1 -1
  556. package/dist/ui-library/p-15559d38.js.map +1 -0
  557. package/dist/ui-library/{p-502ff3d3.entry.js → p-19ed7a4c.entry.js} +2 -2
  558. package/dist/ui-library/p-19ed7a4c.entry.js.map +1 -0
  559. package/dist/ui-library/{p-97323ad7.entry.js → p-1d5ee1a0.entry.js} +2 -2
  560. package/dist/ui-library/p-1d5ee1a0.entry.js.map +1 -0
  561. package/dist/ui-library/{p-eb8f05a9.js → p-1f18768a.js} +1 -1
  562. package/dist/ui-library/p-1f18768a.js.map +1 -0
  563. package/dist/ui-library/{p-b4547fb5.entry.js → p-21b3b321.entry.js} +2 -2
  564. package/dist/ui-library/p-21b3b321.entry.js.map +1 -0
  565. package/dist/ui-library/p-264d4ea8.entry.js +2 -0
  566. package/dist/ui-library/p-264d4ea8.entry.js.map +1 -0
  567. package/dist/ui-library/{p-778cf804.entry.js → p-29ac3d7d.entry.js} +2 -2
  568. package/dist/ui-library/p-29ac3d7d.entry.js.map +1 -0
  569. package/dist/ui-library/{p-92ca6a84.entry.js → p-314b2096.entry.js} +2 -2
  570. package/dist/ui-library/p-314b2096.entry.js.map +1 -0
  571. package/dist/ui-library/{p-66180e89.entry.js → p-330a4988.entry.js} +2 -2
  572. package/dist/ui-library/p-330a4988.entry.js.map +1 -0
  573. package/dist/ui-library/{p-21859bca.entry.js → p-346f9557.entry.js} +2 -2
  574. package/dist/ui-library/p-346f9557.entry.js.map +1 -0
  575. package/dist/ui-library/{p-03a145f5.entry.js → p-37557787.entry.js} +2 -2
  576. package/dist/ui-library/p-37557787.entry.js.map +1 -0
  577. package/dist/ui-library/{p-baa03951.entry.js → p-3cc5addb.entry.js} +2 -2
  578. package/dist/ui-library/p-3cc5addb.entry.js.map +1 -0
  579. package/dist/ui-library/{p-87032e26.entry.js → p-3d9de119.entry.js} +2 -2
  580. package/dist/ui-library/p-3d9de119.entry.js.map +1 -0
  581. package/dist/ui-library/{p-ef3936e5.entry.js → p-411ed539.entry.js} +2 -2
  582. package/dist/ui-library/p-411ed539.entry.js.map +1 -0
  583. package/dist/ui-library/{p-c5cdba08.entry.js → p-4705a51e.entry.js} +2 -2
  584. package/dist/ui-library/p-4705a51e.entry.js.map +1 -0
  585. package/dist/ui-library/{p-dc3f5996.entry.js → p-4abed9df.entry.js} +2 -2
  586. package/dist/ui-library/p-4abed9df.entry.js.map +1 -0
  587. package/dist/ui-library/{p-0cc08e91.js → p-5654e4c7.js} +1 -1
  588. package/dist/ui-library/p-5654e4c7.js.map +1 -0
  589. package/dist/ui-library/{p-0fe78f9b.js → p-59210f0b.js} +1 -1
  590. package/dist/ui-library/p-59210f0b.js.map +1 -0
  591. package/dist/ui-library/{p-28be55f0.entry.js → p-5af44076.entry.js} +2 -2
  592. package/dist/ui-library/p-5af44076.entry.js.map +1 -0
  593. package/dist/ui-library/{p-18e9f8b8.entry.js → p-5d6b7353.entry.js} +2 -2
  594. package/dist/ui-library/p-5d6b7353.entry.js.map +1 -0
  595. package/dist/ui-library/{p-097cced4.entry.js → p-613283a7.entry.js} +2 -2
  596. package/dist/ui-library/p-613283a7.entry.js.map +1 -0
  597. package/dist/ui-library/p-6153045b.js +3 -0
  598. package/dist/ui-library/p-6153045b.js.map +1 -0
  599. package/dist/ui-library/{p-e19a6c95.entry.js → p-6197fe2f.entry.js} +2 -2
  600. package/dist/ui-library/p-6197fe2f.entry.js.map +1 -0
  601. package/dist/ui-library/{p-8cf72af6.js → p-698bb2c8.js} +1 -1
  602. package/dist/ui-library/p-698bb2c8.js.map +1 -0
  603. package/dist/ui-library/{p-9337cdd6.entry.js → p-72254eef.entry.js} +2 -2
  604. package/dist/ui-library/p-72254eef.entry.js.map +1 -0
  605. package/dist/ui-library/{p-912092c0.entry.js → p-724875b0.entry.js} +2 -2
  606. package/dist/ui-library/p-724875b0.entry.js.map +1 -0
  607. package/dist/ui-library/{p-dd3c76f1.entry.js → p-7afafb9d.entry.js} +2 -2
  608. package/dist/ui-library/p-7afafb9d.entry.js.map +1 -0
  609. package/dist/ui-library/{p-60621dc6.js → p-7d95def3.js} +1 -1
  610. package/dist/ui-library/p-7d95def3.js.map +1 -0
  611. package/dist/ui-library/{p-63703ba3.entry.js → p-7e3ad38a.entry.js} +2 -2
  612. package/dist/ui-library/p-7e3ad38a.entry.js.map +1 -0
  613. package/dist/ui-library/{p-71035abf.entry.js → p-83864cfe.entry.js} +2 -2
  614. package/dist/ui-library/p-83864cfe.entry.js.map +1 -0
  615. package/dist/ui-library/{p-445ba5b8.entry.js → p-878226a0.entry.js} +2 -2
  616. package/dist/ui-library/p-878226a0.entry.js.map +1 -0
  617. package/dist/ui-library/{p-4d408fb4.js → p-8c0971e0.js} +1 -1
  618. package/dist/ui-library/p-8c0971e0.js.map +1 -0
  619. package/dist/ui-library/{p-afcbe9da.entry.js → p-91b51800.entry.js} +2 -2
  620. package/dist/ui-library/p-91b51800.entry.js.map +1 -0
  621. package/dist/ui-library/{p-f0dd77e1.entry.js → p-95fbdd0b.entry.js} +2 -2
  622. package/dist/ui-library/p-95fbdd0b.entry.js.map +1 -0
  623. package/dist/ui-library/{p-9461417e.entry.js → p-99e24daf.entry.js} +2 -2
  624. package/dist/ui-library/p-99e24daf.entry.js.map +1 -0
  625. package/dist/ui-library/{p-ba74863a.js → p-9ace84c7.js} +1 -1
  626. package/dist/ui-library/p-9ace84c7.js.map +1 -0
  627. package/dist/ui-library/{p-d6798d35.entry.js → p-9b354f5d.entry.js} +2 -2
  628. package/dist/ui-library/p-9b354f5d.entry.js.map +1 -0
  629. package/dist/ui-library/{p-3929b0af.entry.js → p-9c1be3fb.entry.js} +2 -2
  630. package/dist/ui-library/p-9c1be3fb.entry.js.map +1 -0
  631. package/dist/ui-library/p-9f0b43f9.entry.js +2 -0
  632. package/dist/ui-library/p-9f0b43f9.entry.js.map +1 -0
  633. package/dist/ui-library/{p-cdcde4cd.entry.js → p-a0f290d0.entry.js} +2 -2
  634. package/dist/ui-library/p-a0f290d0.entry.js.map +1 -0
  635. package/dist/ui-library/{p-09779e47.entry.js → p-a55c7258.entry.js} +2 -2
  636. package/dist/ui-library/p-a55c7258.entry.js.map +1 -0
  637. package/dist/ui-library/{p-6d75f216.entry.js → p-a6a9ee96.entry.js} +2 -2
  638. package/dist/ui-library/p-a6a9ee96.entry.js.map +1 -0
  639. package/dist/ui-library/{p-73597d13.entry.js → p-ac099e6b.entry.js} +2 -2
  640. package/dist/ui-library/p-ac099e6b.entry.js.map +1 -0
  641. package/dist/ui-library/{p-bd8f8eef.entry.js → p-ae601a0f.entry.js} +2 -2
  642. package/dist/ui-library/p-ae601a0f.entry.js.map +1 -0
  643. package/dist/ui-library/{p-dcd7c547.entry.js → p-b351f889.entry.js} +2 -2
  644. package/dist/ui-library/p-b351f889.entry.js.map +1 -0
  645. package/dist/ui-library/p-b550a258.entry.js +2 -0
  646. package/dist/ui-library/p-b550a258.entry.js.map +1 -0
  647. package/dist/ui-library/{p-b3bff992.entry.js → p-bf87464b.entry.js} +2 -2
  648. package/dist/ui-library/p-bf87464b.entry.js.map +1 -0
  649. package/dist/ui-library/{p-72ca96e1.entry.js → p-c03ebf7d.entry.js} +2 -2
  650. package/dist/ui-library/p-c03ebf7d.entry.js.map +1 -0
  651. package/dist/ui-library/{p-a1d4f6cf.entry.js → p-cd67da3d.entry.js} +2 -2
  652. package/dist/ui-library/p-cd67da3d.entry.js.map +1 -0
  653. package/dist/ui-library/{p-5a34c93e.entry.js → p-cdaed936.entry.js} +2 -2
  654. package/dist/ui-library/p-cdaed936.entry.js.map +1 -0
  655. package/dist/ui-library/{p-724e154d.entry.js → p-d367f4f9.entry.js} +2 -2
  656. package/dist/ui-library/p-d367f4f9.entry.js.map +1 -0
  657. package/dist/ui-library/{p-2761f908.js → p-d42c2025.js} +2 -2
  658. package/dist/ui-library/p-d42c2025.js.map +1 -0
  659. package/dist/ui-library/{p-820c23f0.entry.js → p-dfed33c5.entry.js} +2 -2
  660. package/dist/ui-library/p-dfed33c5.entry.js.map +1 -0
  661. package/dist/ui-library/{p-686b12ec.entry.js → p-ed381ad9.entry.js} +2 -2
  662. package/dist/ui-library/p-ed381ad9.entry.js.map +1 -0
  663. package/dist/ui-library/{p-a49ae60a.entry.js → p-ee8342e1.entry.js} +2 -2
  664. package/dist/ui-library/p-ee8342e1.entry.js.map +1 -0
  665. package/dist/ui-library/{p-8e0b6b7e.entry.js → p-ee950ce2.entry.js} +2 -2
  666. package/dist/ui-library/p-ee950ce2.entry.js.map +1 -0
  667. package/dist/ui-library/{p-087fdd96.entry.js → p-ff90ffd1.entry.js} +2 -2
  668. package/dist/ui-library/p-ff90ffd1.entry.js.map +1 -0
  669. package/dist/ui-library/ui-library.esm.js +1 -1
  670. package/dist/ui-library/ui-library.esm.js.map +1 -1
  671. package/loader/index.d.ts +1 -1
  672. package/package.json +7 -7
  673. package/dist/cjs/event-listeners-b835dfae.js.map +0 -1
  674. package/dist/cjs/execution-control-45c84c46.js.map +0 -1
  675. package/dist/cjs/focus-visible-e0d93a95.js.map +0 -1
  676. package/dist/cjs/form-8cbd4e0e.js.map +0 -1
  677. package/dist/cjs/form-control-8df00a52.js.map +0 -1
  678. package/dist/cjs/index-2f6daa5b.js.map +0 -1
  679. package/dist/cjs/modal-21350fb5.js.map +0 -1
  680. package/dist/cjs/popover-8885d50f.js.map +0 -1
  681. package/dist/cjs/popup-44836aaf.js.map +0 -1
  682. package/dist/cjs/scroll-76e6f5d7.js.map +0 -1
  683. package/dist/cjs/slot-bccbdb59.js.map +0 -1
  684. package/dist/cjs/types-64878648.js.map +0 -1
  685. package/dist/esm/event-listeners-535f3ad1.js.map +0 -1
  686. package/dist/esm/execution-control-72cc50f4.js.map +0 -1
  687. package/dist/esm/focus-visible-fa7129a0.js.map +0 -1
  688. package/dist/esm/form-control-785c5f79.js.map +0 -1
  689. package/dist/esm/index-5c0f6628.js.map +0 -1
  690. package/dist/esm/modal-b1d96441.js.map +0 -1
  691. package/dist/esm/polyfills/css-shim.js +0 -1
  692. package/dist/esm/popup-678b8592.js.map +0 -1
  693. package/dist/esm/scroll-180b53fd.js.map +0 -1
  694. package/dist/esm/slot-2e64df19.js.map +0 -1
  695. package/dist/esm/types-4b10b413.js.map +0 -1
  696. package/dist/ui-library/p-0108fe92.entry.js +0 -2
  697. package/dist/ui-library/p-0108fe92.entry.js.map +0 -1
  698. package/dist/ui-library/p-03a145f5.entry.js.map +0 -1
  699. package/dist/ui-library/p-087fdd96.entry.js.map +0 -1
  700. package/dist/ui-library/p-09779e47.entry.js.map +0 -1
  701. package/dist/ui-library/p-097cced4.entry.js.map +0 -1
  702. package/dist/ui-library/p-0b2c6348.js.map +0 -1
  703. package/dist/ui-library/p-0cc08e91.js.map +0 -1
  704. package/dist/ui-library/p-0fe78f9b.js.map +0 -1
  705. package/dist/ui-library/p-18e9f8b8.entry.js.map +0 -1
  706. package/dist/ui-library/p-21859bca.entry.js.map +0 -1
  707. package/dist/ui-library/p-25a3bf57.js.map +0 -1
  708. package/dist/ui-library/p-2761f908.js.map +0 -1
  709. package/dist/ui-library/p-28be55f0.entry.js.map +0 -1
  710. package/dist/ui-library/p-3929b0af.entry.js.map +0 -1
  711. package/dist/ui-library/p-445ba5b8.entry.js.map +0 -1
  712. package/dist/ui-library/p-4d408fb4.js.map +0 -1
  713. package/dist/ui-library/p-502ff3d3.entry.js.map +0 -1
  714. package/dist/ui-library/p-5a34c93e.entry.js.map +0 -1
  715. package/dist/ui-library/p-60621dc6.js.map +0 -1
  716. package/dist/ui-library/p-63703ba3.entry.js.map +0 -1
  717. package/dist/ui-library/p-66180e89.entry.js.map +0 -1
  718. package/dist/ui-library/p-686b12ec.entry.js.map +0 -1
  719. package/dist/ui-library/p-6d75f216.entry.js.map +0 -1
  720. package/dist/ui-library/p-71035abf.entry.js.map +0 -1
  721. package/dist/ui-library/p-724e154d.entry.js.map +0 -1
  722. package/dist/ui-library/p-72ca96e1.entry.js.map +0 -1
  723. package/dist/ui-library/p-73597d13.entry.js.map +0 -1
  724. package/dist/ui-library/p-778cf804.entry.js.map +0 -1
  725. package/dist/ui-library/p-820c23f0.entry.js.map +0 -1
  726. package/dist/ui-library/p-87032e26.entry.js.map +0 -1
  727. package/dist/ui-library/p-8cf72af6.js.map +0 -1
  728. package/dist/ui-library/p-8e0b6b7e.entry.js.map +0 -1
  729. package/dist/ui-library/p-912092c0.entry.js.map +0 -1
  730. package/dist/ui-library/p-92ca6a84.entry.js.map +0 -1
  731. package/dist/ui-library/p-9337cdd6.entry.js.map +0 -1
  732. package/dist/ui-library/p-9461417e.entry.js.map +0 -1
  733. package/dist/ui-library/p-97323ad7.entry.js.map +0 -1
  734. package/dist/ui-library/p-a1d4f6cf.entry.js.map +0 -1
  735. package/dist/ui-library/p-a49ae60a.entry.js.map +0 -1
  736. package/dist/ui-library/p-a844cb72.entry.js.map +0 -1
  737. package/dist/ui-library/p-ac4f4d45.js +0 -3
  738. package/dist/ui-library/p-ac4f4d45.js.map +0 -1
  739. package/dist/ui-library/p-afcbe9da.entry.js.map +0 -1
  740. package/dist/ui-library/p-b3bff992.entry.js.map +0 -1
  741. package/dist/ui-library/p-b4547fb5.entry.js.map +0 -1
  742. package/dist/ui-library/p-ba74863a.js.map +0 -1
  743. package/dist/ui-library/p-baa03951.entry.js.map +0 -1
  744. package/dist/ui-library/p-bd8f8eef.entry.js.map +0 -1
  745. package/dist/ui-library/p-c57f16af.entry.js +0 -2
  746. package/dist/ui-library/p-c57f16af.entry.js.map +0 -1
  747. package/dist/ui-library/p-c5cdba08.entry.js.map +0 -1
  748. package/dist/ui-library/p-c87810b0.entry.js +0 -2
  749. package/dist/ui-library/p-c87810b0.entry.js.map +0 -1
  750. package/dist/ui-library/p-cdcde4cd.entry.js.map +0 -1
  751. package/dist/ui-library/p-d6798d35.entry.js.map +0 -1
  752. package/dist/ui-library/p-d87a6f4d.js.map +0 -1
  753. package/dist/ui-library/p-dc3f5996.entry.js.map +0 -1
  754. package/dist/ui-library/p-dcd7c547.entry.js.map +0 -1
  755. package/dist/ui-library/p-dd3c76f1.entry.js.map +0 -1
  756. package/dist/ui-library/p-e07b3f0c.entry.js +0 -2
  757. package/dist/ui-library/p-e07b3f0c.entry.js.map +0 -1
  758. package/dist/ui-library/p-e19a6c95.entry.js.map +0 -1
  759. package/dist/ui-library/p-e8feb81f.entry.js.map +0 -1
  760. package/dist/ui-library/p-eb8f05a9.js.map +0 -1
  761. package/dist/ui-library/p-ef3936e5.entry.js.map +0 -1
  762. package/dist/ui-library/p-f0dd77e1.entry.js.map +0 -1
  763. package/readme.md +0 -156
@@ -1 +0,0 @@
1
- {"version":3,"names":["FormControl","props","children","hasLabel","label","trim","_a","hasLabelSlot","hasHelpText","helpText","_b","hasHelpTextSlot","h","part","class","size","_c","displayError","_d","disabled","_e","id","labelId","_f","required","htmlFor","inputId","onClick","onLabelClick","name","errorTextId","errorText","helpTextId"],"sources":["./src/functional-components/form-control/form-control.tsx"],"sourcesContent":["import { h, VNode } from '@stencil/core';\n\nexport interface FormControlProps {\n /** The input id, used to map the input to the label */\n inputId: string;\n\n /** The size of the form control */\n size: 'small' | 'medium' | 'large';\n\n /** The label id, used to map the label to the input */\n labelId?: string;\n\n /** The label text (if the label slot isn't used) */\n label?: string;\n\n /** Whether a label slot has been provided. */\n hasLabelSlot?: boolean;\n\n /** The help text id, used to map the input to the help text */\n helpTextId?: string;\n\n /** The help text (if the help-text slot isn't used) */\n helpText?: string;\n\n /** Whether a help text slot has been provided. */\n hasHelpTextSlot?: boolean;\n\n /** The error text id, used to map the input to the help text */\n errorTextId?: string;\n\n /** The error text */\n errorText?: string;\n\n /** Set to true to disable the input. */\n disabled?: boolean;\n\n /** Set if the value is required. */\n required?: boolean;\n\n /** Set if the error text is displayed. */\n displayError?: boolean;\n\n /** A function that gets called when the label is clicked. */\n onLabelClick?: (event: MouseEvent) => void;\n}\n\nconst FormControl = (props: FormControlProps, children: VNode[]) => {\n const hasLabel = props.label != null && props.label.trim() !== '' ? true : props.hasLabelSlot ?? false;\n const hasHelpText = props.helpText != null && props.helpText.trim() !== '' ? true : props.hasHelpTextSlot ?? false;\n\n return (\n <div\n part=\"form-control\"\n class={{\n 'form-control': true,\n 'form-control--small': props.size === 'small',\n 'form-control--medium': props.size === 'medium',\n 'form-control--large': props.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-error-text': props.displayError ?? false,\n 'form-control--disabled': props.disabled ?? false,\n 'form-control--invalid': (props.displayError ?? false) && !props.disabled,\n }}\n >\n <label\n part=\"label\"\n id={props.labelId}\n class={{\n 'form-control__label': true,\n 'form-control__label__required': props.required ?? false,\n }}\n htmlFor={props.inputId}\n aria-hidden={hasLabel ? 'false' : 'true'}\n onClick={props.onLabelClick}\n >\n <slot name=\"label\">{props.label}</slot>\n </label>\n\n <div class=\"form-control__input\">{children}</div>\n\n <div\n part=\"error-text\"\n id={props.errorTextId}\n class=\"form-control__error-text\"\n aria-hidden={props.displayError ? 'false' : 'true'}\n >\n {props.errorText}\n </div>\n\n <div\n part=\"help-text\"\n id={props.helpTextId}\n class=\"form-control__help-text\"\n aria-hidden={hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">{props.helpText}</slot>\n </div>\n </div>\n );\n};\n\nexport default FormControl;\n"],"mappings":"0CA8CMA,EAAc,CAACC,EAAyBC,K,gBAC5C,MAAMC,EAAWF,EAAMG,OAAS,MAAQH,EAAMG,MAAMC,SAAW,GAAK,MAAOC,EAAAL,EAAMM,gBAAY,MAAAD,SAAA,EAAAA,EAAI,MACjG,MAAME,EAAcP,EAAMQ,UAAY,MAAQR,EAAMQ,SAASJ,SAAW,GAAK,MAAOK,EAAAT,EAAMU,mBAAe,MAAAD,SAAA,EAAAA,EAAI,MAE7G,OACEE,EAAA,OACEC,KAAK,eACLC,MAAO,CACL,eAAgB,KAChB,sBAAuBb,EAAMc,OAAS,QACtC,uBAAwBd,EAAMc,OAAS,SACvC,sBAAuBd,EAAMc,OAAS,QACtC,0BAA2BZ,EAC3B,8BAA+BK,EAC/B,gCAAgCQ,EAAAf,EAAMgB,gBAAY,MAAAD,SAAA,EAAAA,EAAI,MACtD,0BAA0BE,EAAAjB,EAAMkB,YAAQ,MAAAD,SAAA,EAAAA,EAAI,MAC5C,0BAA0BE,EAAAnB,EAAMgB,gBAAY,MAAAG,SAAA,EAAAA,EAAI,SAAWnB,EAAMkB,WAGnEP,EAAA,SACEC,KAAK,QACLQ,GAAIpB,EAAMqB,QACVR,MAAO,CACL,sBAAuB,KACvB,iCAAiCS,EAAAtB,EAAMuB,YAAQ,MAAAD,SAAA,EAAAA,EAAI,OAErDE,QAASxB,EAAMyB,QAAO,cACTvB,EAAW,QAAU,OAClCwB,QAAS1B,EAAM2B,cAEfhB,EAAA,QAAMiB,KAAK,SAAS5B,EAAMG,QAG5BQ,EAAA,OAAKE,MAAM,uBAAuBZ,GAElCU,EAAA,OACEC,KAAK,aACLQ,GAAIpB,EAAM6B,YACVhB,MAAM,2BAA0B,cACnBb,EAAMgB,aAAe,QAAU,QAE3ChB,EAAM8B,WAGTnB,EAAA,OACEC,KAAK,YACLQ,GAAIpB,EAAM+B,WACVlB,MAAM,0BAAyB,cAClBN,EAAc,QAAU,QAErCI,EAAA,QAAMiB,KAAK,aAAa5B,EAAMQ,WAE5B,S"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixFileListItemCss","SixFileListItem","this","downloadFile","nodownload","downloadEvent","emit","fileId","identifier","name","removeFile","nodelete","removeEvent","render","h","class","onClick","date","size","Math","round"],"sources":["./src/components/six-file-list-item/six-file-list-item.scss?tag=six-file-list-item&encapsulation=shadow","./src/components/six-file-list-item/six-file-list-item.tsx"],"sourcesContent":[".six-files-list-item {\n padding-bottom: 0.5rem;\n\n &__name {\n color: var(--six-color-action-600);\n cursor: pointer;\n\n &--disabled {\n cursor: inherit;\n color: var(--six-color-web-rock-500);\n }\n\n &:hover:not(&--disabled) {\n color: var(--six-color-action-500);\n }\n }\n\n &__date {\n padding-left: 1rem;\n color: var(--six-color-web-rock-600);\n }\n\n &__size {\n padding-left: 1rem;\n color: var(--six-color-web-rock-600);\n }\n\n &__icon {\n padding-left: 0.5rem;\n display: inline-block;\n transform: translateY(-1px);\n cursor: pointer;\n color: var(--six-color-web-rock-600);\n\n &--disabled {\n cursor: not-allowed;\n color: var(--six-color-web-rock-500);\n }\n\n &:hover:not(&--disabled) {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\n\nexport interface SixFileListDownloadPayload {\n fileId: string;\n name: string;\n}\n\nexport interface SixFileListRemovePayload {\n fileId: string;\n name: string;\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n */\n@Component({\n tag: 'six-file-list-item',\n styleUrl: 'six-file-list-item.scss',\n shadow: true,\n})\nexport class SixFileListItem {\n /** An id to clearly identify the file */\n @Prop({ reflect: true }) identifier = '';\n\n /** The filename */\n @Prop({ reflect: true }) name = '';\n\n /** The date when the file was uploaded */\n @Prop({ reflect: true }) date = '';\n\n /** The file size. This number will be divided by 1024 to show the filesize in KB */\n @Prop({ reflect: true }) size?: number;\n\n /** Set to true if you don't want to allow to download this file */\n @Prop({ reflect: true }) nodownload = false;\n\n /** Set to true if you don't want to allow to delete this file */\n @Prop({ reflect: true }) nodelete = false;\n\n /** Triggered on file download. */\n @Event({ eventName: 'six-file-list-item-download' }) downloadEvent!: EventEmitter<SixFileListDownloadPayload>;\n\n /** Triggered on file remove. */\n @Event({ eventName: 'six-file-list-item-remove' }) removeEvent!: EventEmitter<SixFileListRemovePayload>;\n\n private downloadFile = () => {\n if (this.nodownload) {\n return;\n }\n\n this.downloadEvent.emit({ fileId: this.identifier, name: this.name });\n };\n\n private removeFile = () => {\n if (this.nodelete) {\n return;\n }\n\n this.removeEvent.emit({ fileId: this.identifier, name: this.name });\n };\n\n render() {\n return (\n <div class=\"six-files-list-item\">\n <span\n class={{\n 'six-files-list-item__name': true,\n 'six-files-list-item__name--disabled': this.nodownload,\n }}\n onClick={this.downloadFile}\n >\n {this.name}\n </span>\n <span class=\"six-files-list-item__date\">{this.date}</span>\n {this.size != null && <span class=\"six-files-list-item__size\">{Math.round(this.size / 1024)} KB</span>}\n <six-icon\n class={{\n 'six-files-list-item__icon': true,\n 'six-files-list-item__icon--disabled': this.nodelete,\n }}\n size=\"small\"\n onClick={this.removeFile}\n >\n delete\n </six-icon>\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,8zB,MCsBdC,EAAe,M,2IAyBlBC,KAAAC,aAAe,KACrB,GAAID,KAAKE,WAAY,CACnB,M,CAGFF,KAAKG,cAAcC,KAAK,CAAEC,OAAQL,KAAKM,WAAYC,KAAMP,KAAKO,MAAO,EAG/DP,KAAAQ,WAAa,KACnB,GAAIR,KAAKS,SAAU,CACjB,M,CAGFT,KAAKU,YAAYN,KAAK,CAAEC,OAAQL,KAAKM,WAAYC,KAAMP,KAAKO,MAAO,E,gBApC/B,G,UAGN,G,UAGA,G,oCAMM,M,cAGF,K,CAwBpCI,SACE,OACEC,EAAA,OAAKC,MAAM,uBACTD,EAAA,QACEC,MAAO,CACL,4BAA6B,KAC7B,sCAAuCb,KAAKE,YAE9CY,QAASd,KAAKC,cAEbD,KAAKO,MAERK,EAAA,QAAMC,MAAM,6BAA6Bb,KAAKe,MAC7Cf,KAAKgB,MAAQ,MAAQJ,EAAA,QAAMC,MAAM,6BAA6BI,KAAKC,MAAMlB,KAAKgB,KAAO,MAAK,OAC3FJ,EAAA,YACEC,MAAO,CACL,4BAA6B,KAC7B,sCAAuCb,KAAKS,UAE9CO,KAAK,QACLF,QAASd,KAAKQ,YAAU,U"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixMenuItemCss","SixMenuItem","connectedCallback","this","handleBlur","bind","handleFocus","handleMouseEnter","handleMouseLeave","async","options","_a","menuItem","focus","blur","getTextLabel","Promise","resolve","getTextContent","defaultSlot","hasFocus","setFocus","removeFocus","render","h","ref","el","part","class","checked","disabled","role","tabIndex","undefined","onFocus","onBlur","onMouseEnter","onMouseLeave","name","size"],"sources":["./src/components/six-menu-item/six-menu-item.scss?tag=six-menu-item&encapsulation=shadow","./src/components/six-menu-item/six-menu-item.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n text-align: left;\n color: var(--six-input-color);\n border-radius: var(--six-border-radius-medium);\n padding: var(--six-spacing-medium) var(--six-spacing-medium);\n transition: var(--six-transition-fast) fill;\n user-select: none;\n white-space: nowrap;\n cursor: pointer;\n\n &.menu-item--focused:not(.menu-item--disabled) {\n outline: none;\n background-color: var(--six-menu-item-background-color);\n }\n\n &.menu-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n .menu-item__label {\n flex: 1 1 auto;\n align-self: center;\n }\n\n .menu-item__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:last-child) {\n margin-right: 0.5em;\n }\n }\n\n .menu-item__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:first-child) {\n margin-left: 0.5em;\n }\n }\n\n .menu-item__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: var(--six-spacing-small);\n visibility: hidden;\n font-size: inherit;\n }\n}\n\n.menu-item--checked .menu-item__check {\n visibility: visible;\n}\n","import { Component, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\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 - The menu item's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @part base - The component's base wrapper.\n * @part checked-icon - The container that wraps the checked icon.\n * @part prefix - The prefix container.\n * @part label - The menu item label.\n * @part suffix - The suffix container.\n */\n\n@Component({\n tag: 'six-menu-item',\n styleUrl: 'six-menu-item.scss',\n shadow: true,\n})\nexport class SixMenuItem {\n private menuItem?: HTMLElement;\n private defaultSlot?: HTMLSlotElement;\n\n @State() hasFocus = false;\n\n /** Set to true to draw the item in a checked state. */\n @Prop({ reflect: true }) checked = false;\n\n /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the menu item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.menuItem?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.menuItem?.blur();\n }\n\n /** Returns a text label based on the contents of the menu item's default slot. */\n @Method()\n getTextLabel() {\n return Promise.resolve(getTextContent(this.defaultSlot));\n }\n\n private handleBlur() {\n this.hasFocus = false;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n }\n\n private handleMouseEnter() {\n return this.setFocus();\n }\n\n private handleMouseLeave() {\n return this.removeFocus();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuItem = el)}\n part=\"base\"\n class={{\n 'menu-item': true,\n 'menu-item--checked': this.checked,\n 'menu-item--disabled': this.disabled,\n 'menu-item--focused': this.hasFocus,\n }}\n role=\"menuitem\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-checked={this.checked ? 'true' : 'false'}\n tabIndex={!this.disabled ? 0 : undefined}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n <span part=\"prefix\" class=\"menu-item__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <span part=\"label\" class=\"menu-item__label\">\n <slot ref={(el) => (this.defaultSlot = el as HTMLSlotElement)} />\n </span>\n\n <span part=\"suffix\" class=\"menu-item__suffix\">\n <slot name=\"suffix\" />\n </span>\n\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <six-icon size=\"small\" aria-hidden=\"true\">\n check\n </six-icon>\n </span>\n </div>\n );\n }\n}\n"],"mappings":"+EAAA,MAAMA,EAAiB,64C,MCyBVC,EAAW,M,uCAIF,M,aAGe,M,WAGF,G,cAGG,K,CAEpCC,oBACEC,KAAKC,WAAaD,KAAKC,WAAWC,KAAKF,MACvCA,KAAKG,YAAcH,KAAKG,YAAYD,KAAKF,MACzCA,KAAKI,iBAAmBJ,KAAKI,iBAAiBF,KAAKF,MACnDA,KAAKK,iBAAmBL,KAAKK,iBAAiBH,KAAKF,K,CAKrDM,eAAeC,G,OACbC,EAAAR,KAAKS,YAAQ,MAAAD,SAAA,SAAAA,EAAEE,MAAMH,E,CAKvBD,oB,OACEE,EAAAR,KAAKS,YAAQ,MAAAD,SAAA,SAAAA,EAAEG,M,CAKjBC,eACE,OAAOC,QAAQC,QAAQC,EAAef,KAAKgB,a,CAGrCf,aACND,KAAKiB,SAAW,K,CAGVd,cACNH,KAAKiB,SAAW,I,CAGVb,mBACN,OAAOJ,KAAKkB,U,CAGNb,mBACN,OAAOL,KAAKmB,a,CAGdC,SACE,OACEC,EAAA,OACEC,IAAMC,GAAQvB,KAAKS,SAAWc,EAC9BC,KAAK,OACLC,MAAO,CACL,YAAa,KACb,qBAAsBzB,KAAK0B,QAC3B,sBAAuB1B,KAAK2B,SAC5B,qBAAsB3B,KAAKiB,UAE7BW,KAAK,WAAU,gBACA5B,KAAK2B,SAAW,OAAS,QAAO,eACjC3B,KAAK0B,QAAU,OAAS,QACtCG,UAAW7B,KAAK2B,SAAW,EAAIG,UAC/BC,QAAS/B,KAAKG,YACd6B,OAAQhC,KAAKC,WACbgC,aAAcjC,KAAKI,iBACnB8B,aAAclC,KAAKK,kBAEnBgB,EAAA,QAAMG,KAAK,SAASC,MAAM,qBACxBJ,EAAA,QAAMc,KAAK,YAGbd,EAAA,QAAMG,KAAK,QAAQC,MAAM,oBACvBJ,EAAA,QAAMC,IAAMC,GAAQvB,KAAKgB,YAAcO,KAGzCF,EAAA,QAAMG,KAAK,SAASC,MAAM,qBACxBJ,EAAA,QAAMc,KAAK,YAGbd,EAAA,QAAMG,KAAK,eAAeC,MAAM,oBAC9BJ,EAAA,YAAUe,KAAK,QAAO,cAAa,QAAM,U"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixAvatarCss","SixAvatar","this","handleImageError","hasError","render","h","part","class","avatar","shape","role","alt","tabIndex","initials","name","image","src","onError"],"sources":["./src/components/six-avatar/six-avatar.scss?tag=six-avatar&encapsulation=shadow","./src/components/six-avatar/six-avatar.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --size: The size of the avatar.\n */\n:host {\n display: inline-block;\n\n --size: 2rem;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n background-color: var(--six-avatar-background-color);\n font-family: var(--six-font-sans);\n font-size: calc(var(--size) * 0.5);\n font-weight: var(--six-font-weight-normal);\n color: var(--six-avatar-color);\n overflow: hidden;\n user-select: none;\n vertical-align: middle;\n cursor: pointer;\n outline: none;\n\n &:hover {\n box-shadow: var(--six-elevation-4dp);\n }\n}\n\n.avatar--circle {\n border-radius: var(--six-border-radius-circle);\n}\n\n.avatar--rounded {\n border-radius: var(--six-border-radius-medium);\n}\n\n.avatar--square {\n border-radius: 0;\n}\n\n.avatar__icon {\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}\n\n.avatar__initials {\n line-height: 1;\n text-transform: uppercase;\n}\n\n.avatar__image {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n","import { Component, h, Prop, State } 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 icon - The default icon to use when no image or initials are present.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the avatar icon.\n * @part initials - The container that wraps the avatar initials.\n * @part image - The avatar image.\n */\n@Component({\n tag: 'six-avatar',\n styleUrl: 'six-avatar.scss',\n shadow: true,\n})\nexport class SixAvatar {\n @State() hasError = false;\n\n /** The image source to use for the avatar. */\n @Prop() image = '';\n\n /** Alternative text for the image. */\n @Prop() alt = '';\n\n /** Initials to use as a fallback when no image is available (1-2 characters max recommended). */\n @Prop() initials = '';\n\n /** The shape of the avatar. */\n @Prop() shape: 'circle' | 'square' | 'rounded' = 'circle';\n\n private handleImageError = () => {\n this.hasError = true;\n };\n\n render() {\n return (\n <div\n part=\"base\"\n class={{\n avatar: true,\n 'avatar--circle': this.shape === 'circle',\n 'avatar--rounded': this.shape === 'rounded',\n 'avatar--square': this.shape === 'square',\n }}\n role=\"image\"\n aria-label={this.alt}\n tabIndex={0}\n >\n {this.initials === '' && (\n <div part=\"icon\" class=\"avatar__icon\">\n <slot name=\"icon\">\n <six-icon>person</six-icon>\n </slot>\n </div>\n )}\n\n {this.initials && (\n <div part=\"initials\" class=\"avatar__initials\">\n {this.initials}\n </div>\n )}\n\n {this.image && !this.hasError && (\n <img part=\"image\" class=\"avatar__image\" src={this.image} onError={this.handleImageError} />\n )}\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAe,w/B,MCoBRC,EAAS,M,yBAeZC,KAAAC,iBAAmB,KACzBD,KAAKE,SAAW,IAAI,E,cAfF,M,WAGJ,G,SAGF,G,cAGK,G,WAG8B,Q,CAMjDC,SACE,OACEC,EAAA,OACEC,KAAK,OACLC,MAAO,CACLC,OAAQ,KACR,iBAAkBP,KAAKQ,QAAU,SACjC,kBAAmBR,KAAKQ,QAAU,UAClC,iBAAkBR,KAAKQ,QAAU,UAEnCC,KAAK,QAAO,aACAT,KAAKU,IACjBC,SAAU,GAETX,KAAKY,WAAa,IACjBR,EAAA,OAAKC,KAAK,OAAOC,MAAM,gBACrBF,EAAA,QAAMS,KAAK,QACTT,EAAA,4BAKLJ,KAAKY,UACJR,EAAA,OAAKC,KAAK,WAAWC,MAAM,oBACxBN,KAAKY,UAITZ,KAAKc,QAAUd,KAAKE,UACnBE,EAAA,OAAKC,KAAK,QAAQC,MAAM,gBAAgBS,IAAKf,KAAKc,MAAOE,QAAShB,KAAKC,mB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["submitForm","element","form","closest","fakeButton","document","createElement","type","style","display","appendChild","click","remove"],"sources":["./src/utils/form.ts"],"sourcesContent":["export function submitForm(element: HTMLElement) {\n const form = element.closest('form');\n if (form != null) {\n // Calling form.submit() would bypass the submit event and constraint validation.\n // To prevent this, we inject a native submit button into the form, \"click\" it,\n // then remove it to simulate a standard form submission.\n const fakeButton = document.createElement('button');\n fakeButton.type = 'submit';\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n}\n"],"mappings":"SAAgBA,EAAWC,GACzB,MAAMC,EAAOD,EAAQE,QAAQ,QAC7B,GAAID,GAAQ,KAAM,CAIhB,MAAME,EAAaC,SAASC,cAAc,UAC1CF,EAAWG,KAAO,SAClBH,EAAWI,MAAMC,QAAU,OAC3BP,EAAKQ,YAAYN,GACjBA,EAAWO,QACXP,EAAWQ,Q,CAEf,Q"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixDialogCss","hasPreventScroll","isPreventScrollSupported","id","SixDialog","this","componentId","willShow","willHide","handleCloseClick","hide","handleKeyDown","event","key","handleOverlayClick","sixOverlayDismiss","emit","defaultPrevented","handleSlotChange","hasFooter","hasSlot","host","handleTransitionEnd","target","propertyName","classList","contains","isVisible","open","sixAfterShow","sixAfterHide","handleOpenChange","show","connectedCallback","modal","Modal","onFocusOut","_a","panel","focus","componentWillLoad","disconnectedCallback","unlockBodyScrolling","async","dialog","sixShow","activate","lockBodyScrolling","requestAnimationFrame","sixInitialFocus","preventScroll","addEventListener","once","sixHide","deactivate","render","h","ref","el","part","class","onKeyDown","onTransitionEnd","onClick","role","noHeader","label","tabIndex","name","String","fromCharCode","exportparts","onSlotchange"],"sources":["./src/components/six-dialog/six-dialog.scss?tag=six-dialog&encapsulation=shadow","./src/components/six-dialog/six-dialog.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --width: The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.\n */\n:host {\n --width: 31rem;\n\n display: contents;\n}\n\n.dialog {\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: var(--six-z-index-dialog);\n color: var(--six-color-web-rock-900);\n\n &:not(.dialog--visible) {\n @include hidden;\n }\n}\n\n.dialog__panel {\n display: flex;\n flex-direction: column;\n z-index: 2;\n width: var(--width);\n max-width: calc(100% - var(--six-spacing-xx-large));\n max-height: calc(100% - var(--six-spacing-xx-large));\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--six-shadow-x-large);\n opacity: 0;\n transform: scale(0.8);\n transition: var(--six-transition-medium) opacity, var(--six-transition-medium) transform;\n\n &:focus {\n outline: none;\n }\n}\n\n// Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone)\n@media screen and (max-width: 420px) {\n .dialog__panel {\n max-height: 80vh;\n }\n}\n\n.dialog--open .dialog__panel {\n display: flex;\n opacity: 1;\n transform: none;\n}\n\n.dialog__header {\n flex: 0 0 auto;\n display: flex;\n}\n\n.dialog__title {\n flex: 1 1 auto;\n font-size: var(--six-font-size-x-large);\n font-weight: var(--six-font-weight-bold);\n line-height: var(--six-line-height-dense);\n padding: var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small);\n}\n\n.dialog__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-x-large);\n padding: 0 var(--six-spacing-x-small);\n}\n\n.dialog__body {\n flex: 1 1 auto;\n padding: var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.dialog__footer {\n flex: 0 0 auto;\n text-align: right;\n padding: var(--six-spacing-large);\n\n ::slotted(six-button:not(:first-of-type)) {\n margin-left: var(--six-spacing-xx-small);\n }\n}\n\n.dialog:not(.dialog--has-footer) .dialog__footer {\n display: none;\n}\n\n.dialog__overlay {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--six-overlay-background-color);\n opacity: 0;\n transition: var(--six-transition-medium) opacity;\n}\n\n.dialog--open .dialog__overlay {\n opacity: 0.8;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport { isPreventScrollSupported } from '../../utils/support';\nimport Modal from '../../utils/modal';\nimport { EmptyPayload } from '../../utils/types';\n\nconst hasPreventScroll = isPreventScrollSupported();\n\nlet id = 0;\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 - The dialog's content.\n * @slot label - The dialog's label. Alternatively, you can use the label prop.\n * @slot footer - The dialog's footer, usually one or more buttons representing various options.\n *\n * @part base - The component's base wrapper.\n * @part overlay - The overlay.\n * @part panel - The dialog panel (where the dialog and its content is rendered).\n * @part header - The dialog header.\n * @part title - The dialog title.\n * @part close-button - The close button.\n * @part body - The dialog body.\n * @part footer - The dialog footer.\n *\n */\n@Component({\n tag: 'six-dialog',\n styleUrl: 'six-dialog.scss',\n shadow: true,\n})\nexport class SixDialog {\n private componentId = `dialog-${++id}`;\n private dialog?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDialogElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the dialog is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility.\n */\n @Prop() label = '';\n\n /**\n * Set to true to disable the header. This will also remove the default close button, so please ensure you provide an\n * easy, accessible way for users to dismiss the dialog.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the dialog opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dialog-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog opens and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dialog closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dialog-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog closes and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the dialog opens and the panel gains focus. Calling `event.preventDefault()` will prevent focus and\n * allow you to set it on a different element in the dialog, such as an input or button.\n */\n @Event({ eventName: 'six-dialog-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the dialog from closing. */\n @Event({ eventName: 'six-dialog-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => this.panel?.focus(),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the dialog */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.dialog == null) {\n return;\n }\n const panel = this.panel;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n this.modal.activate();\n\n lockBodyScrolling(this.host);\n\n if (this.open) {\n if (hasPreventScroll) {\n // Wait for the next frame before setting initial focus so the dialog is technically visible\n requestAnimationFrame(() => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus({ preventScroll: true });\n }\n });\n } else {\n // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to\n // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its\n // out of view initially.\n //\n // Fiddle: https://jsfiddle.net/g6buoafq/1/\n // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583\n //\n this.dialog.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the dialog */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'opacity' && target.classList.contains('dialog__panel')) {\n this.isVisible = this.open;\n this.willShow = false;\n this.willHide = false;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n };\n\n render() {\n return (\n <div\n ref={(el) => (this.dialog = el)}\n part=\"base\"\n class={{\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--visible': this.isVisible,\n 'dialog--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"dialog__overlay\" onClick={this.handleOverlayClick} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dialog__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-label={this.noHeader ? this.label : null}\n aria-labelledby={!this.noHeader ? `${this.componentId}-title` : null}\n tabIndex={0}\n >\n {!this.noHeader && (\n <header part=\"header\" class=\"dialog__header\">\n <span part=\"title\" class=\"dialog__title\" id={`${this.componentId}-title`}>\n <slot name=\"label\">\n {/* If there's no label, use an invisible character to prevent the heading from collapsing */}\n {this.label || String.fromCharCode(65279)}\n </slot>\n </span>\n <six-icon-button\n exportparts=\"base:close-button\"\n class=\"dialog__close\"\n name=\"close\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"dialog__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"mLAAA,MAAMA,EAAe,kkECOrB,MAAMC,EAAmBC,IAEzB,IAAIC,EAAK,E,MA2BIC,EAAS,M,2UACZC,KAAAC,YAAc,YAAYH,IAI1BE,KAAAE,SAAW,MACXF,KAAAG,SAAW,MA2IXH,KAAAI,iBAAmB,KACzBJ,KAAKK,MAAM,EAGLL,KAAAM,cAAiBC,IACvB,GAAIA,EAAMC,MAAQ,SAAU,CAC1BR,KAAKK,M,GAIDL,KAAAS,mBAAqB,KAC3B,MAAMC,EAAoBV,KAAKU,kBAAkBC,OAEjD,IAAKD,EAAkBE,iBAAkB,CACvCZ,KAAKK,M,GAIDL,KAAAa,iBAAmB,KACzBb,KAAKc,UAAYC,EAAQf,KAAKgB,KAAM,SAAS,EAGvChB,KAAAiB,oBAAuBV,IAC7B,MAAMW,EAASX,EAAMW,OAGrB,GAAIX,EAAMY,eAAiB,WAAaD,EAAOE,UAAUC,SAAS,iBAAkB,CAClFrB,KAAKsB,UAAYtB,KAAKuB,KACtBvB,KAAKE,SAAW,MAChBF,KAAKG,SAAW,MAChBH,KAAKuB,KAAOvB,KAAKwB,aAAab,OAASX,KAAKyB,aAAad,M,kBArKxC,M,eACA,M,UAG0B,M,WAM/B,G,cAMG,K,CAGnBe,mBACE1B,KAAKuB,KAAOvB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XZ,EAAoBrC,KAAKgB,K,CAqC3BkC,SACE,OACEC,EAAA,OACEC,IAAMC,GAAQrD,KAAKuC,OAASc,EAC5BC,KAAK,OACLC,MAAO,CACLhB,OAAQ,KACR,eAAgBvC,KAAKuB,KACrB,kBAAmBvB,KAAKsB,UACxB,qBAAsBtB,KAAKc,WAE7B0C,UAAWxD,KAAKM,cAChBmD,gBAAiBzD,KAAKiB,qBAEtBkC,EAAA,OAAKG,KAAK,UAAUC,MAAM,kBAAkBG,QAAS1D,KAAKS,qBAE1D0C,EAAA,OACEC,IAAMC,GAAQrD,KAAKiC,MAAQoB,EAC3BC,KAAK,QACLC,MAAM,gBACNI,KAAK,SAAQ,aACF,OAAM,cACJ3D,KAAKuB,KAAO,QAAU,OAAM,aAC7BvB,KAAK4D,SAAW5D,KAAK6D,MAAQ,KAAI,mBAC3B7D,KAAK4D,SAAW,GAAG5D,KAAKC,oBAAsB,KAChE6D,SAAU,IAER9D,KAAK4D,UACLT,EAAA,UAAQG,KAAK,SAASC,MAAM,kBAC1BJ,EAAA,QAAMG,KAAK,QAAQC,MAAM,gBAAgBzD,GAAI,GAAGE,KAAKC,qBACnDkD,EAAA,QAAMY,KAAK,SAER/D,KAAK6D,OAASG,OAAOC,aAAa,SAGvCd,EAAA,mBACEe,YAAY,oBACZX,MAAM,gBACNQ,KAAK,QACLL,QAAS1D,KAAKI,oBAKpB+C,EAAA,OAAKG,KAAK,OAAOC,MAAM,gBACrBJ,EAAA,cAGFA,EAAA,UAAQG,KAAK,SAASC,MAAM,kBAC1BJ,EAAA,QAAMY,KAAK,SAASI,aAAcnE,KAAKa,qB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixFileUploadCss","SixFileUpload","this","handleFiles","files","disabled","length","multiple","failure","emit","reason","file","acceptedTypesList","accept","replace","split","indexOf","type","maxFileSize","size","eventPayload","success","onChange","_a","fileInput","value","dragenterHandler","isOver","dragoverHandler","dragleaveHandler","dropHandler","dataTransfer","componentDidLoad","forEach","eventName","host","addEventListener","preventDefaults","document","body","disconnectedCallback","removeEventListener","e","preventDefault","stopPropagation","renderLabel","label","compact","h","class","render","Container","slot","name","ref","el"],"sources":["./src/components/six-file-upload/six-file-upload.scss?tag=six-file-upload&encapsulation=scoped","./src/components/six-file-upload/six-file-upload.tsx"],"sourcesContent":["@import 'src/global/component';\n\n$over-color: var(--six-color-action-light-to-be-defined);\n$disabled-color: var(--six-color-inactive);\n$transition: 0.3s;\n$margin: 1rem;\n\n:host {\n position: static;\n display: block;\n}\n\n.six-file-upload {\n six-card {\n box-shadow: none;\n padding: 0;\n width: 100%;\n\n &.kyc-file-upload__container--compact {\n width: inherit;\n }\n }\n\n &__label {\n &--highlighted {\n color: var(--six-color-action-600);\n }\n }\n\n &__container {\n &--full {\n border: dashed 1px var(--six-color-web-rock-500);\n }\n }\n\n &__label-icon {\n margin-right: 0.5rem;\n }\n\n &__drop-zone {\n padding: 2rem 0;\n display: flex;\n justify-content: center;\n width: 100%;\n transition: background-color $transition;\n\n &--compact {\n padding: 0;\n }\n }\n\n &__input {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n user-select: none;\n height: 100%;\n opacity: 0;\n outline: none;\n }\n\n &--disabled &__drop-zone {\n background-color: $disabled-color;\n }\n\n &:not(.six-file-upload--disabled) &__drop-zone:hover,\n &__drop-zone--hover {\n background-color: $over-color;\n\n &.six-file-upload__drop-zone--compact {\n background-color: inherit;\n }\n }\n\n &--disabled &__input {\n cursor: not-allowed;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\n\ninterface ISingleFile {\n file: File;\n}\n\ninterface IMultipleFiles {\n files: FileList;\n}\n\nexport type SixFileUploadSuccessPayload = ISingleFile | IMultipleFiles;\n\nexport interface SixFileUploadFailurePayload {\n reason: string;\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n */\n@Component({\n tag: 'six-file-upload',\n styleUrl: 'six-file-upload.scss',\n scoped: true,\n shadow: false,\n})\nexport class SixFileUpload {\n @Element() readonly host!: HTMLSixFileUploadElement;\n\n private fileInput?: HTMLInputElement;\n\n @State() isOver = false;\n\n /** Set to true if file control should be small. */\n @Prop() readonly compact: boolean = false;\n\n /** Label of the drop area. */\n @Prop() readonly label?: string;\n\n /** Set when button is disabled. */\n @Prop() readonly disabled = false;\n\n /** Accepted MIME-Types. */\n @Prop() readonly accept?: string;\n\n /** More than one file allowed. */\n @Prop() readonly multiple = false;\n\n /** Allowed max file size in bytes. */\n @Prop() readonly maxFileSize?: number;\n\n /** Triggers when a file is added. */\n @Event({ eventName: 'six-file-upload-success' }) success!: EventEmitter<SixFileUploadSuccessPayload>;\n\n /** Triggers when an uploaded file doesn't match MIME type or max file size. */\n @Event({ eventName: 'six-file-upload-failure' }) failure!: EventEmitter<SixFileUploadFailurePayload>;\n\n @Listen('dragenter', { capture: false })\n dragenterHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragover', { capture: false })\n dragoverHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragleave', { capture: false })\n dragleaveHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n @Listen('drop', { capture: false })\n dropHandler({ dataTransfer }: DragEvent) {\n if (!this.disabled) {\n this.isOver = false;\n if (dataTransfer != null) {\n this.handleFiles(dataTransfer.files);\n }\n }\n }\n\n private handleFiles = (files: FileList) => {\n if (this.disabled || files.length === 0) {\n return;\n }\n\n if (!this.multiple && files.length > 1) {\n return this.failure.emit({ reason: 'Only one file is allowed.' });\n }\n\n for (const file of files) {\n if (file == null) {\n return;\n }\n\n let acceptedTypesList: string[] = [];\n if (this.accept != null) {\n acceptedTypesList = this.accept.replace(/\\s/g, '').split(',');\n }\n\n if (acceptedTypesList.length > 0 && acceptedTypesList.indexOf(file.type) === -1) {\n const reason = files.length > 1 ? 'One or more files have invalid MIME type.' : 'File has invalid MIME type.';\n return this.failure.emit({ reason });\n }\n\n if (this.maxFileSize != null && file.size > this.maxFileSize) {\n const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';\n return this.failure.emit({ reason });\n }\n }\n\n const eventPayload: SixFileUploadSuccessPayload = this.multiple ? { files } : { file: files[0] };\n this.success.emit(eventPayload);\n };\n\n componentDidLoad() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.addEventListener(eventName, this.preventDefaults, false);\n document.body.addEventListener(eventName, this.preventDefaults, false);\n });\n }\n\n disconnectedCallback() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.removeEventListener(eventName, this.preventDefaults, false);\n document.body.removeEventListener(eventName, this.preventDefaults, false);\n });\n }\n\n private preventDefaults(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n private onChange = () => {\n if (this.fileInput?.files != null) {\n const files = this.fileInput.files;\n this.handleFiles(files);\n this.fileInput.value = '';\n }\n };\n\n private renderLabel() {\n return (\n this.label ??\n (this.compact ? (\n 'Upload'\n ) : (\n <span>\n Drop files to upload, or <span class=\"six-file-upload__label--highlighted\">browse</span>\n </span>\n ))\n );\n }\n\n render() {\n const Container = this.compact ? 'six-button' : 'six-card';\n\n return (\n <div\n class={{\n 'six-file-upload': true,\n 'six-file-upload--disabled': this.disabled,\n }}\n >\n <Container\n class={{\n 'six-file-upload__container--compact': this.compact,\n 'six-file-upload__container--full': !this.compact,\n }}\n >\n {this.compact && (\n <span slot=\"prefix\">\n <six-icon class=\"six-file-upload__label-icon\">arrow_circle_up</six-icon>\n </span>\n )}\n <div\n class={{\n 'six-file-upload__drop-zone': true,\n 'six-file-upload__drop-zone--hover': this.isOver,\n 'six-file-upload__drop-zone--compact': this.compact,\n }}\n >\n <span>{this.renderLabel()}</span>\n <input\n class=\"six-file-upload__input\"\n type=\"file\"\n name=\"resume\"\n disabled={this.disabled}\n accept={this.accept}\n multiple={this.multiple}\n onChange={this.onChange}\n ref={(el) => (this.fileInput = el)}\n />\n </div>\n </Container>\n </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L,KAAKK,SACfe,SAAUpB,KAAKoB,SACfgC,IAAMC,GAAQrD,KAAKsB,UAAY+B,M"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["EventListeners","constructor","this","eventListeners","add","el","name","listener","identifier","push","addEventListener","remove","getFilteredEventListeners","eventListener","removeByIdentifier","sameItem","foundListener","find","undefined","removeAll","length","pop","removeEventListener","filter","item","forward","from","to","host","dispatchEvent","InputEvent","bubbles","cancelable","FocusEvent"],"sources":["./src/utils/event-listeners.ts"],"sourcesContent":["interface EventListener {\n el: DocumentAndElementEventHandlers;\n name: string;\n listener: EventListenerOrEventListenerObject;\n identifier?: string | null;\n}\n\nexport class EventListeners {\n eventListeners: EventListener[] = [];\n\n add = <T extends DocumentAndElementEventHandlers>(\n el: T,\n name: string,\n listener: EventListenerOrEventListenerObject,\n identifier: string | null | undefined = null\n ) => {\n this.eventListeners.push({ el, name, listener, identifier });\n el.addEventListener(name, listener);\n };\n\n remove = <T extends DocumentAndElementEventHandlers>(\n el: T,\n name: string,\n listener: EventListenerOrEventListenerObject\n ) => {\n this.eventListeners = this.getFilteredEventListeners(\n (eventListener: EventListener) =>\n eventListener.listener == listener && eventListener.el === el && eventListener.name === name\n );\n };\n\n removeByIdentifier = (identifier: string) => {\n const sameItem = (el: EventListener) => el.identifier === identifier;\n const foundListener = this.eventListeners.find(sameItem) !== undefined;\n if (!foundListener) {\n return;\n }\n this.eventListeners = this.getFilteredEventListeners(sameItem);\n };\n\n private getFilteredEventListeners(sameItem: (el: EventListener) => boolean) {\n return this.eventListeners.filter((item) => {\n if (sameItem(item)) {\n item.el.removeEventListener(item.name, item.listener);\n return false;\n } else {\n return true;\n }\n });\n }\n\n removeAll = () => {\n while (this.eventListeners.length > 0) {\n const eventListener: EventListener | undefined = this.eventListeners.pop();\n if (eventListener != null) {\n eventListener.el.removeEventListener(eventListener.name, eventListener.listener);\n }\n }\n };\n\n forward(from: string, to: 'input' | 'change' | 'blur' | 'focus', host: HTMLElement) {\n switch (to) {\n case 'input':\n this.add(host, from, () => host.dispatchEvent(new InputEvent(to, { bubbles: true, cancelable: true })));\n break;\n case 'change':\n this.add(host, from, () => host.dispatchEvent(new InputEvent(to, { bubbles: true, cancelable: true })));\n break;\n case 'blur':\n this.add(host, from, () => host.dispatchEvent(new FocusEvent(to, { bubbles: true, cancelable: true })));\n break;\n case 'focus':\n this.add(host, from, () => host.dispatchEvent(new FocusEvent(to, { bubbles: true, cancelable: true })));\n break;\n }\n }\n}\n"],"mappings":"MAOaA,EAAbC,cACEC,KAAAC,eAAkC,GAElCD,KAAAE,IAAM,CACJC,EACAC,EACAC,EACAC,EAAwC,QAExCN,KAAKC,eAAeM,KAAK,CAAEJ,KAAIC,OAAMC,WAAUC,eAC/CH,EAAGK,iBAAiBJ,EAAMC,EAAS,EAGrCL,KAAAS,OAAS,CACPN,EACAC,EACAC,KAEAL,KAAKC,eAAiBD,KAAKU,2BACxBC,GACCA,EAAcN,UAAYA,GAAYM,EAAcR,KAAOA,GAAMQ,EAAcP,OAASA,GAC3F,EAGHJ,KAAAY,mBAAsBN,IACpB,MAAMO,EAAYV,GAAsBA,EAAGG,aAAeA,EAC1D,MAAMQ,EAAgBd,KAAKC,eAAec,KAAKF,KAAcG,UAC7D,IAAKF,EAAe,CAClB,M,CAEFd,KAAKC,eAAiBD,KAAKU,0BAA0BG,EAAS,EAchEb,KAAAiB,UAAY,KACV,MAAOjB,KAAKC,eAAeiB,OAAS,EAAG,CACrC,MAAMP,EAA2CX,KAAKC,eAAekB,MACrE,GAAIR,GAAiB,KAAM,CACzBA,EAAcR,GAAGiB,oBAAoBT,EAAcP,KAAMO,EAAcN,S,IAfrEK,0BAA0BG,GAChC,OAAOb,KAAKC,eAAeoB,QAAQC,IACjC,GAAIT,EAASS,GAAO,CAClBA,EAAKnB,GAAGiB,oBAAoBE,EAAKlB,KAAMkB,EAAKjB,UAC5C,OAAO,K,KACF,CACL,OAAO,I,KAcbkB,QAAQC,EAAcC,EAA2CC,GAC/D,OAAQD,GACN,IAAK,QACHzB,KAAKE,IAAIwB,EAAMF,GAAM,IAAME,EAAKC,cAAc,IAAIC,WAAWH,EAAI,CAAEI,QAAS,KAAMC,WAAY,UAC9F,MACF,IAAK,SACH9B,KAAKE,IAAIwB,EAAMF,GAAM,IAAME,EAAKC,cAAc,IAAIC,WAAWH,EAAI,CAAEI,QAAS,KAAMC,WAAY,UAC9F,MACF,IAAK,OACH9B,KAAKE,IAAIwB,EAAMF,GAAM,IAAME,EAAKC,cAAc,IAAII,WAAWN,EAAI,CAAEI,QAAS,KAAMC,WAAY,UAC9F,MACF,IAAK,QACH9B,KAAKE,IAAIwB,EAAMF,GAAM,IAAME,EAAKC,cAAc,IAAII,WAAWN,EAAI,CAAEI,QAAS,KAAMC,WAAY,UAC9F,M"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixSpinnerCss","SixSpinner","renderSIXLogo","h","class","viewBox","fill","stroke","d","renderSimple","part","render","this","six"],"sources":["./src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","./src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n$color-six-spinner-background: rgba(255, 255, 255, 0.7);\n\n.six-spinner {\n width: auto;\n height: auto;\n position: relative;\n\n .six-spinner__container {\n margin: 0;\n transform: translateX(0);\n }\n\n .six-spinner__container svg {\n transform: translateX(0);\n }\n\n &__container {\n position: relative;\n margin: 0 auto;\n top: calc(50% - 20px);\n z-index: 1;\n }\n\n &__container,\n &__container svg {\n width: 40px;\n height: 40px;\n display: block;\n transform: translateX(40px);\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } 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 * @part base - The component's base wrapper.\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX logo or simple spinner. */\n @Prop() six = false;\n\n private renderSIXLogo() {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">\n <svg viewBox=\"0 0 40 40\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n 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\"\n ></path>\n </svg>\n </div>\n </span>\n );\n }\n\n private renderSimple() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n return this.six ? this.renderSIXLogo() : this.renderSimple();\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAgB,4vC,MCeTC,EAAU,M,kCAEP,K,CAENC,gBACN,OACEC,EAAA,QAAMC,MAAM,cAAa,YAAW,OAAM,YAAW,UACnDD,EAAA,OAAKC,MAAM,0BACTD,EAAA,OAAKE,QAAQ,aACXF,EAAA,QACEG,KAAK,OACLC,OAAO,UAAS,eACH,IAAG,iBACD,QACfC,EAAE,wH,CAQNC,eACN,OAAON,EAAA,QAAMO,KAAK,OAAON,MAAM,UAAS,YAAW,OAAM,YAAW,U,CAGtEO,SACE,OAAOC,KAAKC,IAAMD,KAAKV,gBAAkBU,KAAKH,c"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixSidebarCss","isSidebarItemGroup","node","_a","tagName","toLowerCase","SixSidebar","this","willShow","willHide","handleTransitionEnd","event","target","type","classList","contains","resetTransitionVariables","closeSiblingDetailsOnShow","clickedMenuItem","sidebar","scrollIntoView","closeAllSiblingsBySiblingProperty","getSibling","detailsElement","shadowRoot","querySelector","open","previousElementSibling","nextElementSibling","handleOpenChange","show","hide","componentWillLoad","componentDidRender","setupTogglableMenuItems","disconnectedCallback","removeEventListener","toggled","markAllMenuItemsAsSelectableEmpty","addEventListener","slot","nodes","assignedElements","menuItems","length","pop","menuItemsForCurrentNode","querySelectorAll","push","newItemGroups","Array","from","children","filter","forEach","details","selectableEmpty","async","sixShow","emit","defaultPrevented","isVisible","sixHide","index","menuItemsOnRootLevel","flatMap","el","console","error","value","sidebarItemGroups","indexOfSelectedElement","findIndex","name","selectedItem","_c","_b","at","sixAfterShow","sixAfterHide","render","h","class","sidebar__container","position","style","width","ref","onTransitionEnd"],"sources":["./src/components/six-sidebar/six-sidebar.scss?tag=six-sidebar&encapsulation=shadow","./src/components/six-sidebar/six-sidebar.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: block;\n height: 100%;\n}\n\n.sidebar {\n &__container {\n // scroll\n height: 100%;\n overflow: auto;\n\n &.sidebar--open {\n box-shadow: var(--six-elevation-1dp);\n }\n\n &:not(.sidebar--visible) {\n @include hidden;\n }\n }\n\n &--left {\n color: var(--six-sidebar-color);\n background-color: var(--six-sidebar-background-color);\n // collapse\n transition: var(--six-transition-medium) margin-left;\n // six background\n background-size: 300vw 70%;\n background-position: bottom;\n background-repeat: no-repeat;\n }\n\n &--right {\n // collapse\n transition: var(--six-transition-medium) margin-right;\n }\n\n // if the sidebar is embedded within six-root it cuts-off the border styling, for thus we need to guarante a margin\n &--open {\n &.sidebar--left {\n margin-right: 2px;\n }\n\n &.sidebar--right {\n margin-left: 2px;\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { scrollIntoView } from '../../utils/scroll';\n\nconst isSidebarItemGroup = (node?: Element | null): boolean =>\n node?.tagName?.toLowerCase() === 'six-sidebar-item-group';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested side bar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar',\n styleUrl: 'six-sidebar.scss',\n shadow: true,\n})\nexport class SixSidebar {\n private willShow = false;\n private willHide = false;\n\n private sidebar?: HTMLElement;\n\n @State() isVisible = false;\n\n /** Sidebar position */\n @Prop() position: 'left' | 'right' = 'left';\n\n /** Indicates whether the sidebar is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Sidebar width */\n @Prop() width = '16rem';\n\n /** Define whether sidebar is toggled meaning only one menu can be open at the same time*/\n @Prop() toggled = false;\n\n /** Emitted when the sidebar opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-sidebar-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the sidebar opens and all transitions are complete. */\n @Event({ eventName: 'six-sidebar-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the sidebar closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-sidebar-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the sidebar closes and all transitions are complete. */\n @Event({ eventName: 'six-sidebar-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the sidebar opens and the panel gains focus. Calling `event.preventDefault()` will prevent focus and\n * allow you to set it on a different element in the sidebar, such as an input or button.\n */\n @Event({ eventName: 'six-sidebar-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.type === 'transitionend' && target.classList.contains('sidebar__container')) {\n this.resetTransitionVariables();\n }\n };\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n void this.show();\n // if the sidebar is open by default we need to manually reset the\n // transition variables since there will be no transition event\n this.resetTransitionVariables();\n }\n }\n\n componentDidRender() {\n this.setupTogglableMenuItems();\n }\n\n disconnectedCallback() {\n this.sidebar?.removeEventListener('six-details-show', this.closeSiblingDetailsOnShow);\n }\n\n private closeSiblingDetailsOnShow = (event: Event) => {\n const clickedMenuItem = event.target as HTMLElement;\n if (this.sidebar != null) {\n scrollIntoView(clickedMenuItem, this.sidebar);\n }\n\n const closeAllSiblingsBySiblingProperty = (\n getSibling: (node: Element | null | undefined) => Element | null | undefined\n ) => {\n let node: Element | null | undefined = clickedMenuItem;\n while (getSibling(node) != null) {\n node = getSibling(node);\n if (isSidebarItemGroup(node)) {\n const detailsElement = node?.shadowRoot?.querySelector('six-details');\n if (detailsElement != null) {\n detailsElement.open = false;\n }\n }\n }\n };\n\n // close all previous siblings\n closeAllSiblingsBySiblingProperty((node) => node?.previousElementSibling);\n // close all further siblings\n closeAllSiblingsBySiblingProperty((node) => node?.nextElementSibling);\n };\n\n private setupTogglableMenuItems() {\n if (!this.toggled || this.sidebar == null) return;\n this.markAllMenuItemsAsSelectableEmpty();\n this.sidebar.addEventListener('six-details-show', this.closeSiblingDetailsOnShow);\n }\n\n private markAllMenuItemsAsSelectableEmpty() {\n // when you have a toggled menu you also want to close other menu items when you click on an item without children\n // nice benefit this item will then also be highlighted\n const slot = this.sidebar?.querySelector('slot');\n const nodes = slot?.assignedElements() || [];\n\n // since we don't just want to make the top level empty menuItems selectable in toggled mode,\n // but also nested items we need to traverse the whole menu item tree\n const menuItems = [];\n while (nodes.length > 0) {\n const node = nodes.pop();\n if (node?.shadowRoot == null) {\n continue;\n }\n\n // collect six-details in the current shadowDOM\n const menuItemsForCurrentNode = node.shadowRoot.querySelectorAll('six-details');\n menuItems.push(...menuItemsForCurrentNode);\n\n // collect all six-sidebar-item-group children of the current node to afterwards check their shadowDOM too\n const newItemGroups = Array.from(node.children).filter(isSidebarItemGroup);\n nodes.push(...newItemGroups);\n }\n\n menuItems.forEach((details) => (details.selectableEmpty = true));\n }\n\n /** Toggles whether the sidebar should be shown or hidden */\n @Method()\n async toggle() {\n if (this.willShow || this.willHide) {\n return;\n }\n\n if (this.open) {\n await this.hide();\n } else {\n await this.show();\n }\n }\n\n /** Shows the sidebar */\n @Method()\n async show() {\n if (this.willShow) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the sidebar */\n @Method()\n async hide() {\n if (this.willHide) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n }\n\n /** Allows to select a menu item programmatically by index */\n @Method()\n async selectItemByIndex(index: number) {\n if (this.sidebar == null) return;\n\n const slot = this.sidebar.querySelector('slot');\n const menuItemsOnRootLevel: HTMLSixDetailsElement[] = (slot?.assignedElements() || []).flatMap((el) => {\n const detailsElement = el.shadowRoot?.querySelector('six-details');\n if (detailsElement == null) {\n return [];\n }\n return [detailsElement];\n });\n if (index < 0 || index > menuItemsOnRootLevel.length - 1) {\n console.error(\n `Tried to access sidebar menu item by index, but provided index out of range. Provided index: ${index}`\n );\n return;\n }\n await menuItemsOnRootLevel[index].show();\n }\n\n /** Allows to select a menu item programmatically by name */\n @Method()\n async selectItemByName(value: string) {\n const slot = this.sidebar?.querySelector('slot');\n const sidebarItemGroups = slot?.assignedElements() as HTMLSixSidebarItemGroupElement[];\n if (sidebarItemGroups == null) {\n return;\n }\n\n const indexOfSelectedElement = sidebarItemGroups.findIndex((el) => el?.name === value);\n const selectedItem = sidebarItemGroups.at(indexOfSelectedElement)?.shadowRoot?.querySelector('six-details');\n await selectedItem?.show();\n }\n\n private resetTransitionVariables() {\n this.isVisible = this.open;\n this.willShow = false;\n this.willHide = false;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n\n render() {\n return (\n <host class=\"six-sidebar\">\n <div\n class={{\n sidebar__container: true,\n 'sidebar--visible': this.isVisible,\n 'sidebar--open': this.open,\n 'sidebar--left': this.position === 'left',\n 'sidebar--right': this.position === 'right',\n }}\n style={{\n width: this.width,\n [`margin-${this.position}`]: this.open ? '0' : `calc(1rem - ${this.width})`,\n }}\n ref={(el) => (this.sidebar = el)}\n aria-hidden={this.open ? 'false' : 'true'}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <slot />\n </div>\n </host>\n );\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAAgB,szBCItB,MAAMC,EAAsBC,IAAqB,IAAAC,EAC/C,QAAAA,EAAAD,IAAI,MAAJA,SAAI,SAAJA,EAAME,WAAO,MAAAD,SAAA,SAAAA,EAAEE,iBAAkB,wBAAwB,E,MAc9CC,EAAU,M,kRACbC,KAAAC,SAAW,MACXD,KAAAE,SAAW,MAyCXF,KAAAG,oBAAuBC,IAC7B,MAAMC,EAASD,EAAMC,OAGrB,GAAID,EAAME,OAAS,iBAAmBD,EAAOE,UAAUC,SAAS,sBAAuB,CACrFR,KAAKS,0B,GAsBDT,KAAAU,0BAA6BN,IACnC,MAAMO,EAAkBP,EAAMC,OAC9B,GAAIL,KAAKY,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,MAAAhB,SAAA,SAAAA,EAAEsB,cAAc,QACzC,MAAM6C,EAAoB9B,IAAI,MAAJA,SAAI,SAAJA,EAAME,mBAChC,GAAI4B,GAAqB,KAAM,CAC7B,M,CAGF,MAAMC,EAAyBD,EAAkBE,WAAWN,IAAOA,IAAE,MAAFA,SAAE,SAAFA,EAAIO,QAASJ,IAChF,MAAMK,GAAeC,GAAAC,EAAAN,EAAkBO,GAAGN,MAAuB,MAAAK,SAAA,SAAAA,EAAEpD,cAAU,MAAAmD,SAAA,SAAAA,EAAElD,cAAc,qBACvFiD,IAAY,MAAZA,SAAY,SAAZA,EAAc5C,O,CAGdd,2BACNT,KAAKsD,UAAYtD,KAAKmB,KACtBnB,KAAKC,SAAW,MAChBD,KAAKE,SAAW,MAChBF,KAAKmB,KAAOnB,KAAKuE,aAAanB,OAASpD,KAAKwE,aAAapB,M,CAG3DqB,SACE,OACEC,EAAA,QAAMC,MAAM,eACVD,EAAA,OACEC,MAAO,CACLC,mBAAoB,KACpB,mBAAoB5E,KAAKsD,UACzB,gBAAiBtD,KAAKmB,KACtB,gBAAiBnB,KAAK6E,WAAa,OACnC,iBAAkB7E,KAAK6E,WAAa,SAEtCC,MAAO,CACLC,MAAO/E,KAAK+E,MACZ,CAAC,UAAU/E,KAAK6E,YAAa7E,KAAKmB,KAAO,IAAM,eAAenB,KAAK+E,UAErEC,IAAMrB,GAAQ3D,KAAKY,QAAU+C,EAAG,cACnB3D,KAAKmB,KAAO,QAAU,OACnC8D,gBAAiBjF,KAAKG,qBAEtBuE,EAAA,c"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["isString","value","isNil","i18nDate","en","months","monthsShort","monthsShortGrouped","weekdays","weekdaysShort","weekdaysMin","de","fr","it","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","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","_b","formattedDate","sixBlur","getCurrentDateAsPointer","type","DDMMYYY_DOT","DEFAULT_DEBOUNCE_FAST","debounceChanged","sixSelect","debounceEvent","debounce","invalidChanged","invalid","valueChanged","console","warn","updateDropdownDirection","moveOpenHoistedPopup","adjustPopupPosition","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","datepicker__popup","placement","_c","adjustPopupForHoisting","isUp","adjustPopupForSmallScreens","connectedCallback","forward","disconnectedCallback","removeAll","static"],"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};\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';\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","export 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 */\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' = '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 = '';\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 @Watch('invalid')\n protected invalidChanged(invalid: boolean) {\n if (this.inputElement) {\n this.inputElement.invalid = invalid;\n }\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 }\n this.selectedDate = this.value;\n this.updatePointerDates();\n this.sixSelect.emit(this.value);\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 }\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 // clear the value if the user deleted the date\n if (this.inputElement?.value === '' && isValidDate(this.value)) {\n this.value = undefined;\n }\n\n event.stopPropagation();\n const inputValue = this.inputElement?.value;\n const inputValueDate = toDate(inputValue, this.dateFormat);\n const formattedDate = formatDate(this.value, this.dateFormat);\n\n if (this.inputElement != null && inputValueDate != null && inputValue !== formattedDate) {\n // properly format date if necessary\n this.inputElement.value = formattedDate;\n }\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 error-text={this.errorText}\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 </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 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,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,QACLiI,IAAMC,GAAQhH,KAAKoE,MAAQ4C,EAC3BnI,MAAO,CACLwI,kBAAmB,KACnB,2BAA4BrH,KAAKsH,WAAa,KAAOtH,KAAKsH,YAAc,MAAQtH,KAAK2E,oBACrF,+BAAgC3E,KAAKmF,SAGtCnF,KAAK4F,eACL5F,KAAKkG,aACLlG,KAAKmD,OAAS,aACbvE,EAAA,kBACEuG,OAAQ,KAAI,oCACwBtE,GAAUb,KAAK8B,mBAAmBjB,GACtErM,QACEiK,EAAAuB,KAAKnD,gBAAY,MAAA4B,SAAA,SAAAA,EAAEpI,YACnB,MACA0M,EAAA/C,KAAKnD,gBAAY,MAAAkG,SAAA,SAAAA,EAAExM,cACnB,MACAgR,EAAAvH,KAAKnD,gBAAY,MAAA0K,SAAA,SAAAA,EAAE9Q,gBAIzBmI,EAAA,OAAKC,MAAM,sBACTD,EAAA,e,CAQJqF,sBACNuD,EACExH,KAAKmE,MACLnE,KAAKoE,MACLpE,KAAKkB,aACLlB,KAAKqE,QACLxE,IACC4H,GAAUzH,KAAK2E,oBAAsB8C,IAExCC,EAA2B1H,KAAKoE,M,CAGlCuD,oBACE3H,KAAKC,eAAe2H,QAAQ,wBAAyB,SAAU5H,KAAKuE,MACpEvE,KAAKC,eAAe2H,QAAQ,sBAAuB,OAAQ5H,KAAKuE,K,CAGlEsD,uBACE7H,KAAKC,eAAe6H,W,CAGdC,iCACN,MAAO,CACL/R,KAAMA,EAAKX,KACXa,MAAOA,EAAMb,KACbc,IAAKA,EAAId,KACTe,MAAOA,EAAMf,KACbiB,QAASA,EAAQjB,KACjBmB,QAASA,EAAQnB,K"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixMenuLabelCss","SixMenuLabel","render","h","part","class"],"sources":["./src/components/six-menu-label/six-menu-label.scss?tag=six-menu-label&encapsulation=shadow","./src/components/six-menu-label/six-menu-label.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-label {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n color: var(--six-input-label-color);\n padding: var(--six-spacing-xx-small) var(--six-spacing-small);\n user-select: none;\n}\n","import { Component, h } 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 - The menu label's content.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-menu-label',\n styleUrl: 'six-menu-label.scss',\n shadow: true,\n})\nexport class SixMenuLabel {\n render() {\n return (\n <div part=\"base\" class=\"menu-label\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAkB,oc,MCkBXC,EAAY,M,yBACvBC,SACE,OACEC,EAAA,OAAKC,KAAK,OAAOC,MAAM,cACrBF,EAAA,a"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixSidebarItemGroupCss","SixSidebarItemGroup","this","provideSlot","name","summaryIconHasContent","h","slot","onSlotchange","_a","host","shadowRoot","querySelector","assignedNodes","length","connectedCallback","handleSlotChange","bind","componentWillLoad","hasItems","hasSlot","isSubgroup","parentElement","closest","render","class","inline","open","summaryIcon","hasContent","icon"],"sources":["./src/components/six-sidebar-item-group/six-sidebar-item-group.scss?tag=six-sidebar-item-group&encapsulation=shadow","./src/components/six-sidebar-item-group/six-sidebar-item-group.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.six-sidebar-item-group--childless::part(content) {\n padding: 0 !important;\n}\n\n.six-sidebar-item-group--subgroup::part(header) {\n background-color: transparent !important;\n}\n\n.six-sidebar-item-group__header-icon {\n margin-left: 16px;\n transform: translate(0px, -3px);\n}\n\n.six-sidebar-details__header {\n display: flex;\n}\n\n.six-sidebar-details__header-icon {\n margin-right: 1em;\n}\n","import { Component, Element, h, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested sidebar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar-item-group',\n styleUrl: 'six-sidebar-item-group.scss',\n shadow: true,\n})\nexport class SixSidebarItemGroup {\n @Element() readonly host!: HTMLSixSidebarItemGroupElement;\n\n @State() hasItems = false;\n\n /** Title of item group */\n @Prop() name = '';\n\n /** Icon of the group */\n @Prop() icon = '';\n\n /** A unique value to store in the sidebar item of the group label. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Indicates whether the sidebar is shown */\n @Prop({ reflect: true }) open = false;\n\n /** Custom summary icon name. */\n @Prop() summaryIcon?: string;\n\n @State() summaryIconHasContent = false;\n\n connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange() {\n this.hasItems = hasSlot(this.host);\n }\n\n private isSubgroup() {\n return this.host.parentElement?.closest('six-sidebar-item-group') != null;\n }\n\n private provideSlot = (name: string) => {\n if (this.summaryIconHasContent) {\n return (\n <div slot={name}>\n <slot name={name}></slot>\n </div>\n );\n }\n\n return (\n <slot\n name={name}\n onSlotchange={() => {\n const slot = this.host.shadowRoot?.querySelector<HTMLSlotElement>(`slot[name=\"${name}\"]`);\n if (slot != null) {\n this.summaryIconHasContent = slot.assignedNodes().length > 0;\n }\n }}\n ></slot>\n );\n };\n\n render() {\n return (\n <six-details\n class={{\n 'six-sidebar-item-group--childless': !this.hasItems,\n 'six-sidebar-item-group--subgroup': this.isSubgroup(),\n }}\n inline={true}\n open={this.open}\n summary-icon={this.summaryIcon}\n hasContent={this.hasItems}\n >\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\">\n {this.icon && <six-icon class=\"six-sidebar-details__header-icon\">{this.icon}</six-icon>}\n {this.name}\n </div>\n </div>\n {this.provideSlot('summary-icon')}\n <slot />\n </six-details>\n );\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAAyB,8c,MCelBC,EAAmB,M,yBAsCtBC,KAAAC,YAAeC,IACrB,GAAIF,KAAKG,sBAAuB,CAC9B,OACEC,EAAA,OAAKC,KAAMH,GACTE,EAAA,QAAMF,KAAMA,I,CAKlB,OACEE,EAAA,QACEF,KAAMA,EACNI,aAAc,K,MACZ,MAAMD,GAAOE,EAAAP,KAAKQ,KAAKC,cAAU,MAAAF,SAAA,SAAAA,EAAEG,cAA+B,cAAcR,OAChF,GAAIG,GAAQ,KAAM,CAChBL,KAAKG,sBAAwBE,EAAKM,gBAAgBC,OAAS,C,IAGzD,E,cArDQ,M,UAGL,G,UAGA,G,WAGkB,G,UAGD,M,sDAKC,K,CAEjCC,oBACEb,KAAKc,iBAAmBd,KAAKc,iBAAiBC,KAAKf,K,CAGrDgB,oBACEhB,KAAKc,kB,CAGCA,mBACNd,KAAKiB,SAAWC,EAAQlB,KAAKQ,K,CAGvBW,a,MACN,QAAOZ,EAAAP,KAAKQ,KAAKY,iBAAa,MAAAb,SAAA,SAAAA,EAAEc,QAAQ,4BAA6B,I,CAyBvEC,SACE,OACElB,EAAA,eACEmB,MAAO,CACL,qCAAsCvB,KAAKiB,SAC3C,mCAAoCjB,KAAKmB,cAE3CK,OAAQ,KACRC,KAAMzB,KAAKyB,KAAI,eACDzB,KAAK0B,YACnBC,WAAY3B,KAAKiB,UAEjBb,EAAA,OAAKC,KAAK,WACRD,EAAA,OAAKmB,MAAM,+BACRvB,KAAK4B,MAAQxB,EAAA,YAAUmB,MAAM,oCAAoCvB,KAAK4B,MACtE5B,KAAKE,OAGTF,KAAKC,YAAY,gBAClBG,EAAA,a"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixGroupLabelCss","id","SixGroupLabel","this","wrapperLabelId","labelId","helpTextId","handleSlotChange","hasLabelSlot","hasSlot","host","hasHelpTextSlot","handleLabelChange","connectedCallback","_a","shadowRoot","addEventListener","componentWillLoad","disconnectedCallback","removeEventListener","render","h","FormControl","inputId","label","helpText","size","disabled","required"],"sources":["./src/components/six-group-label/six-group-label.scss?tag=six-group-label&encapsulation=shadow","./src/components/six-group-label/six-group-label.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n display: block;\n}\n","import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\n\nlet id = 0;\n\n/**\n * @since 1.1\n * @status stable\n *\n * @slot label - The wrapped component's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The label of wrapped component.\n * @part help-text - The help text of the wrapped component.\n */\n@Component({\n tag: 'six-group-label',\n styleUrl: 'six-group-label.scss',\n shadow: true,\n})\nexport class SixGroupLabel {\n private wrapperLabelId = `label-${++id}`;\n private labelId = `label-label-${id}`;\n private helpTextId = `label-help-text-${id}`;\n\n @Element() host!: HTMLSixGroupLabelElement;\n\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n\n /** The label's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The wrapper label's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The wrapper label's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** Set to true to disable the label. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n @Watch('helpText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n };\n\n render() {\n return (\n <FormControl\n inputId={this.wrapperLabelId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n >\n <slot></slot>\n </FormControl>\n );\n }\n}\n"],"mappings":"0HAAA,MAAMA,EAAmB,u7ECIzB,IAAIC,EAAK,E,MAoBIC,EAAa,M,yBAChBC,KAAAC,eAAiB,WAAWH,IAC5BE,KAAAE,QAAU,eAAeJ,IACzBE,KAAAG,WAAa,mBAAmBL,IAwChCE,KAAAI,iBAAmB,KACzBJ,KAAKK,aAAeC,EAAQN,KAAKO,KAAM,SACvCP,KAAKQ,gBAAkBF,EAAQN,KAAKO,KAAM,YAAY,E,qBAtC7B,M,kBACH,M,UAGsC,S,WAG9C,G,cAGG,G,cAGiB,M,cAGjB,K,CAInBE,oBACET,KAAKI,kB,CAGPM,oB,OACEC,EAAAX,KAAKO,KAAKK,cAAU,MAAAD,SAAA,SAAAA,EAAEE,iBAAiB,aAAcb,KAAKI,iB,CAG5DU,oBACEd,KAAKI,kB,CAGPW,uB,OACEJ,EAAAX,KAAKO,KAAKK,cAAU,MAAAD,SAAA,SAAAA,EAAEK,oBAAoB,aAAchB,KAAKI,iB,CAQ/Da,SACE,OACEC,EAACC,EAAW,CACVC,QAASpB,KAAKC,eACdoB,MAAOrB,KAAKqB,MACZnB,QAASF,KAAKE,QACdG,aAAcL,KAAKK,aACnBF,WAAYH,KAAKG,WACjBmB,SAAUtB,KAAKsB,SACfd,gBAAiBR,KAAKQ,gBACtBe,KAAMvB,KAAKuB,KACXC,SAAUxB,KAAKwB,SACfC,SAAUzB,KAAKyB,UAEfP,EAAA,a"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixTileCss","SixTile","this","handleSlotChange","hasIconSlot","hasSlot","host","hasLabelSlot","slot","getSlot","addEventListener","handleClickEvent","handleCloseClickEvent","visible","sixTileClose","emit","sixTileSelected","async","componentWillLoad","render","h","disabled","disableTooltip","label","content","part","class","tile","size","elevated","closeable","name","closeIconSize","onClick","iconName","iconSize","small","medium","large"],"sources":["./src/components/six-tile/six-tile.scss?tag=six-tile&encapsulation=shadow","./src/components/six-tile/six-tile.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.tile {\n &--small {\n --tile-size: 80px;\n --tile-padding-size: var(--six-spacing-medium);\n }\n\n &--medium {\n --tile-size: 120px;\n --tile-padding-size: var(--six-spacing-large);\n }\n\n &--large {\n --tile-size: 160px;\n --tile-padding-size: var(--six-spacing-x-large);\n }\n\n min-height: var(--tile-size);\n width: var(--tile-size);\n\n background-color: var(--six-color-clay-50);\n\n display: inline-grid;\n grid-template-columns: 100%;\n grid-template-areas:\n 'header'\n 'middle'\n 'footer';\n\n &:not(.tile--visible) {\n visibility: hidden;\n }\n\n &--elevated {\n border: 0;\n box-shadow: var(--six-elevation-8dp);\n }\n}\n\n.tile__header {\n grid-area: header;\n height: 5%;\n justify-self: right;\n display: flex;\n justify-content: right;\n opacity: 0;\n transition: var(--six-transition-fast) opacity;\n\n .tile:hover > & {\n opacity: 1;\n }\n\n &--hidden {\n visibility: hidden;\n }\n\n six-icon-button {\n margin-top: -6px;\n margin-right: -6px;\n margin-bottom: -16px;\n }\n}\n\n.tile__body {\n grid-area: middle;\n display: grid;\n place-items: center;\n cursor: pointer;\n\n six-icon::part(base) {\n padding: 0;\n }\n\n &--small {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-medium);\n }\n\n &--medium {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-large);\n }\n\n &--large {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-x-large);\n }\n\n padding-left: var(--tile-padding-size);\n padding-right: var(--tile-padding-size);\n}\n\n.tile__footer {\n grid-area: footer;\n display: flex;\n justify-content: center;\n cursor: pointer;\n font-weight: var(--six-font-weight-normal);\n color: var(--six-color-web-rock-900);\n\n &--small {\n @extend .tile__footer;\n font-size: var(--six-font-size-xxx-small);\n }\n\n &--medium {\n @extend .tile__footer;\n font-size: var(--six-font-size-xx-small);\n }\n\n &--large {\n @extend .tile__footer;\n font-size: var(--six-font-size-small);\n }\n\n .label__footer {\n overflow: hidden;\n text-overflow: ellipsis;\n width: calc(var(--tile-size) - 2em);\n text-align: center;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { getSlot, hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n */\n\n@Component({\n tag: 'six-tile',\n styleUrl: 'six-tile.scss',\n shadow: true,\n})\nexport class SixTile {\n @Element() host!: HTMLSixTileElement;\n\n /** The tile's label. */\n @Prop() label = '';\n\n /** The icon's name. */\n @Prop() iconName?: string;\n\n /** Flag, whether the tile is closeable. */\n @Prop() closeable = true;\n\n /** Flag, whether the tile should cast a shadow. */\n @Prop() elevated = false;\n\n /** Enables tile tooltip for tiles */\n @Prop() disableTooltip = true;\n\n /** Set to true to disable the tile. */\n @Prop({ reflect: true }) disabled = false;\n\n /** The tile's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @State() visible = true;\n\n /** Emitted when the tile was closed. */\n @Event({ eventName: 'six-tile-closed' }) sixTileClose!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tile is selected. */\n @Event({ eventName: 'six-tile-selected' }) sixTileSelected!: EventEmitter<EmptyPayload>;\n\n /** Hides the tile */\n @Method()\n async hide() {\n this.visible = false;\n }\n\n /** Shows the tile */\n @Method()\n async show() {\n this.visible = true;\n }\n\n @State() hasIconSlot = false;\n\n @State() hasLabelSlot = false;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange = () => {\n this.hasIconSlot = hasSlot(this.host, 'icon');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n\n if (this.hasIconSlot) {\n const slot = getSlot(this.host, 'icon');\n slot?.addEventListener('click', this.handleClickEvent);\n }\n\n if (this.hasLabelSlot) {\n const slot = getSlot(this.host, 'label');\n slot?.addEventListener('click', this.handleClickEvent);\n }\n };\n\n render() {\n return (\n <six-tooltip disabled={this.disableTooltip || this.label === ''} content={this.label}>\n <div\n part=\"base\"\n class={{\n tile: true,\n 'tile--visible': this.visible,\n 'tile--small': this.size === 'small',\n 'tile--medium': this.size === 'medium',\n 'tile--large': this.size === 'large',\n 'tile--elevated': this.elevated,\n }}\n >\n <div part=\"header\" class=\"tile__header\">\n <six-icon-button\n class={{\n 'tile__header--hidden': !this.closeable,\n }}\n name=\"close\"\n size={closeIconSize(this.size)}\n onClick={this.handleCloseClickEvent}\n />\n </div>\n\n <div part=\"body\" class=\"tile__body\">\n {this.iconName && (\n <six-icon onClick={this.handleClickEvent} size={iconSize(this.size)}>\n {this.iconName}\n </six-icon>\n )}\n {this.hasIconSlot && <slot name=\"icon\"></slot>}\n </div>\n\n <div\n part=\"footer\"\n class={{\n 'tile__footer--small': this.size === 'small',\n 'tile__footer--medium': this.size === 'medium',\n 'tile__footer--large': this.size === 'large',\n }}\n >\n {this.label && (\n <div\n class={{\n '.label__footer': true,\n }}\n onClick={this.handleClickEvent}\n >\n {this.label}\n </div>\n )}\n {this.hasLabelSlot && <slot name=\"label\"></slot>}\n </div>\n </div>\n </six-tooltip>\n );\n }\n\n private handleCloseClickEvent = () => {\n this.visible = false;\n this.sixTileClose.emit();\n };\n\n private handleClickEvent = () => {\n this.sixTileSelected.emit();\n };\n}\n\nconst closeIconSize = (size: string) => {\n return {\n small: 'xxSmall',\n medium: 'medium',\n large: 'medium',\n }[size] as 'xSmall' | 'medium';\n};\n\nconst iconSize = (size: string) => {\n return {\n small: 'xLarge',\n medium: 'xxLarge',\n large: 'xxxLarge',\n }[size] as 'xLarge' | 'xxLarge' | 'xxxLarge';\n};\n"],"m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,UACJd,EAAA,YAAUa,QAAS/B,KAAKS,iBAAkBiB,KAAMO,EAASjC,KAAK0B,OAC3D1B,KAAKgC,UAGThC,KAAKE,aAAegB,EAAA,QAAMW,KAAK,UAGlCX,EAAA,OACEK,KAAK,SACLC,MAAO,CACL,sBAAuBxB,KAAK0B,OAAS,QACrC,uBAAwB1B,KAAK0B,OAAS,SACtC,sBAAuB1B,KAAK0B,OAAS,UAGtC1B,KAAKqB,OACJH,EAAA,OACEM,MAAO,CACL,iBAAkB,MAEpBO,QAAS/B,KAAKS,kBAEbT,KAAKqB,OAGTrB,KAAKK,cAAgBa,EAAA,QAAMW,KAAK,Y,6BAiB7C,MAAMC,EAAiBJ,IACd,CACLQ,MAAO,UACPC,OAAQ,SACRC,MAAO,UACPV,IAGJ,MAAMO,EAAYP,IACT,CACLQ,MAAO,SACPC,OAAQ,UACRC,MAAO,YACPV,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixMainContainerCss","SixMainContainer","render","h","Host","part","class","content","this","padded"],"sources":["./src/components/six-main-container/six-main-container.scss?tag=six-main-container&encapsulation=shadow","./src/components/six-main-container/six-main-container.tsx"],"sourcesContent":["$margin-default-width: 10rem;\n$content-default-width: 60rem;\n$content-min-width: 48rem;\n$content-max-width: 100rem;\n\n:host {\n display: flex;\n flex-wrap: nowrap;\n min-width: fit-content;\n}\n\n.left-margin,\n.right-margin {\n flex: 1 6 $margin-default-width;\n min-width: var(--six-spacing-xxx-large);\n}\n\n.content {\n flex: 6 1 $content-default-width;\n min-width: $content-min-width;\n max-width: $content-max-width;\n &--padded {\n padding: var(--six-spacing-xxx-large) 0;\n }\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * @since 1.01\n * @status stable\n *\n * @slot - The main container's content.\n *\n * @part left-margin - The component's left margin area.\n * @part content - The component's content area.\n * @part right-margin - The component's right margin area.\n */\n\n@Component({\n tag: 'six-main-container',\n styleUrl: 'six-main-container.scss',\n shadow: true,\n})\nexport class SixMainContainer {\n @Element() host!: HTMLSixMainContainerElement;\n\n /** Set to false to remove top and bottom padding. */\n @Prop() padded = true;\n\n render() {\n return (\n <Host>\n <div part=\"left-margin\" class=\"left-margin\" />\n <div part=\"content\" class={{ content: true, 'content--padded': this.padded }}>\n <slot />\n </div>\n <div part=\"right-margin\" class=\"right-margin\" />\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,+P,MCkBfC,EAAgB,M,qCAIV,I,CAEjBC,SACE,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,KAAK,cAAcC,MAAM,gBAC9BH,EAAA,OAAKE,KAAK,UAAUC,MAAO,CAAEC,QAAS,KAAM,kBAAmBC,KAAKC,SAClEN,EAAA,cAEFA,EAAA,OAAKE,KAAK,eAAeC,MAAM,iB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixTabCss","id","SixTab","this","componentId","connectedCallback","handleCloseClick","bind","async","options","_a","tab","focus","blur","sixClose","emit","render","h","Host","host","part","ref","el","class","active","closable","disabled","role","tabindex","name","size","exportparts","onClick","tabIndex"],"sources":["./src/components/six-tab/six-tab.scss?tag=six-tab&encapsulation=shadow","./src/components/six-tab/six-tab.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.tab {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-semibold);\n border-radius: 4px;\n color: var(--six-tab-color);\n padding: var(--six-spacing-medium) var(--six-spacing-large);\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n transition: var(--six-transition-fast) box-shadow, var(--six-transition-fast) color;\n\n &:focus {\n outline: none;\n }\n\n &:focus:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n }\n\n &.tab--active:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n font-weight: var(--six-font-weight-bold);\n }\n\n &.tab--closable {\n padding-right: var(--six-spacing-small);\n }\n\n &.tab--disabled {\n color: var(--six-tab-color-disabled);\n cursor: not-allowed;\n }\n\n &:hover:not(.tab--disabled) {\n color: var(--six-tab-color-hover);\n }\n}\n\n.tab__close-button {\n font-size: var(--six-font-size-large);\n margin-left: var(--six-spacing-xx-small);\n\n &::part(base) {\n padding: var(--six-spacing-xxx-small);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\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 - The tab's label.\n *\n * @part base - The component's base wrapper.\n * @part close-button - The close button, which is the icon button's base wrapper.\n */\n\n@Component({\n tag: 'six-tab',\n styleUrl: 'six-tab.scss',\n shadow: true,\n})\nexport class SixTab {\n private componentId = `tab-${++id}`;\n private tab?: HTMLElement;\n\n @Element() host!: HTMLSixTabElement;\n\n /** The name of the tab panel the tab will control. The panel must be located in the same tab group. */\n @Prop({ reflect: true }) panel = '';\n\n /** Set to true to draw the tab in an active state. */\n @Prop({ reflect: true }) active = false;\n\n /** When true, the tab will be rendered with a close icon. */\n @Prop() closable = false;\n\n /** Set to true to draw the tab in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event({ eventName: 'six-tab-close' }) sixClose!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n }\n\n /** Sets focus to the tab. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.tab?.focus(options);\n }\n\n /** Removes focus from the tab. */\n @Method()\n async removeFocus() {\n this.tab?.blur();\n }\n\n private handleCloseClick() {\n this.sixClose.emit();\n }\n\n render() {\n return (\n // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId}>\n <div\n part=\"base\"\n ref={(el) => (this.tab = el)}\n class={{\n tab: true,\n\n // States\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled,\n }}\n role=\"tab\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-selected={this.active ? 'true' : 'false'}\n tabindex={this.disabled || !this.active ? '-1' : '0'}\n >\n <slot />\n {this.closable && (\n <six-icon-button\n name=\"close\"\n size=\"xSmall\"\n exportparts=\"base:close-button\"\n class=\"tab__close-button\"\n onClick={this.handleCloseClick}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAY,kkCCGlB,IAAIC,EAAK,E,MAmBIC,EAAM,M,iEACTC,KAAAC,YAAc,SAASH,I,WAME,G,YAGC,M,cAGf,M,cAGiB,K,CAKpCI,oBACEF,KAAKG,iBAAmBH,KAAKG,iBAAiBC,KAAKJ,K,CAKrDK,eAAeC,G,OACbC,EAAAP,KAAKQ,OAAG,MAAAD,SAAA,SAAAA,EAAEE,MAAMH,E,CAKlBD,oB,OACEE,EAAAP,KAAKQ,OAAG,MAAAD,SAAA,SAAAA,EAAEG,M,CAGJP,mBACNH,KAAKW,SAASC,M,CAGhBC,SACE,OAEEC,EAACC,EAAI,CAACjB,GAAIE,KAAKgB,KAAKlB,IAAME,KAAKC,aAC7Ba,EAAA,OACEG,KAAK,OACLC,IAAMC,GAAQnB,KAAKQ,IAAMW,EACzBC,MAAO,CACLZ,IAAK,KAGL,cAAeR,KAAKqB,OACpB,gBAAiBrB,KAAKsB,SACtB,gBAAiBtB,KAAKuB,UAExBC,KAAK,MAAK,gBACKxB,KAAKuB,SAAW,OAAS,QAAO,gBAChCvB,KAAKqB,OAAS,OAAS,QACtCI,SAAUzB,KAAKuB,WAAavB,KAAKqB,OAAS,KAAO,KAEjDP,EAAA,aACCd,KAAKsB,UACJR,EAAA,mBACEY,KAAK,QACLC,KAAK,SACLC,YAAY,oBACZR,MAAM,oBACNS,QAAS7B,KAAKG,iBACd2B,UAAW,EAAC,cACA,U"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixFileListCss","SixFileList","render","h","class"],"sources":["./src/components/six-file-list/six-file-list.scss?tag=six-file-list&encapsulation=shadow","./src/components/six-file-list/six-file-list.tsx"],"sourcesContent":[".six-files-list {\n &__container {\n padding: 1rem;\n\n & :last-child {\n padding-bottom: 0;\n }\n }\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n */\n@Component({\n tag: 'six-file-list',\n styleUrl: 'six-file-list.scss',\n shadow: true,\n})\nexport class SixFileList {\n render() {\n return (\n <div class=\"six-files-list__container\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAiB,mG,MCYVC,EAAW,M,yBACtBC,SACE,OACEC,EAAA,OAAKC,MAAM,6BACTD,EAAA,a"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixSwitchCss","id","SixSwitch","this","switchId","labelId","errorTextId","eventListeners","EventListeners","handleClick","inputElement","checked","handleBlur","hasFocus","sixBlur","emit","handleFocus","sixFocus","handleKeyDown","event","key","preventDefault","handleMouseDown","_a","focus","handleCheckedChange","sixChange","connectedCallback","forward","host","disconnectedCallback","removeAll","async","options","blur","render","h","FormControl","inputId","label","hasLabelSlot","errorText","size","disabled","required","displayError","invalid","part","htmlFor","class","switch","onMouseDown","ref","el","type","name","value","role","onClick","onBlur","onFocus","onKeyDown"],"sources":["./src/components/six-switch/six-switch.scss?tag=six-switch&encapsulation=shadow","./src/components/six-switch/six-switch.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n/**\n * @prop --width: The width of the switch.\n * @prop --height: The height of the switch.\n * @prop --thumb-size: The size of the thumb.\n */\n:host {\n --height: var(--six-selection-control-toggle-size);\n --thumb-size: calc(var(--six-selection-control-toggle-size) - 4px);\n --width: calc(var(--height) * 2);\n\n display: inline-block;\n}\n\n.switch {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.switch__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--six-selection-control-color-disabled);\n border-radius: var(--height);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color;\n\n .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--six-input-background-color);\n border-radius: 50%;\n transform: translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));\n transition: var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color,\n var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n}\n\n// Hover\n.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-hover);\n}\n\n// Checked\n.switch--checked .switch__control {\n background-color: var(--six-selection-control-color);\n\n .switch__thumb {\n background-color: var(--six-color-white);\n transform: translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2));\n }\n}\n\n// Checked + hover\n.switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.switch--disabled {\n cursor: not-allowed;\n color: var(--six-selection-control-color-disabled);\n\n .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n\n &.switch--checked .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n}\n\n.switch__label {\n line-height: var(--height);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport FormControl from '../../functional-components/form-control/form-control';\n\nlet id = 0;\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 - The switch's label.\n *\n * @part base - The component's base wrapper.\n * @part control - The switch control.\n * @part thumb - The switch position indicator.\n * @part label - The switch label.\n */\n\n@Component({\n tag: 'six-switch',\n styleUrl: 'six-switch.scss',\n shadow: true,\n})\nexport class SixSwitch {\n private switchId = `switch-${++id}`;\n private labelId = `switch-label-${id}`;\n private errorTextId = `input-error-text-${id}`;\n\n private inputElement?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixSwitchElement;\n\n @State() hasFocus = false;\n\n /** The switch's name attribute. */\n @Prop() name = '';\n\n /** The switch's value attribute. */\n @Prop() value = 'on';\n\n /** Set to true to disable the switch. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** Set to true to draw the switch in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText = '';\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 @Watch('checked')\n handleCheckedChange() {\n if (this.inputElement != null) {\n this.inputElement.checked = this.checked;\n this.checked = this.inputElement.checked;\n }\n this.sixChange.emit(this.checked);\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-switch-blur' }) sixBlur!: EventEmitter<boolean>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-switch-change' }) sixChange!: EventEmitter<boolean>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-switch-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.eventListeners.forward('six-switch-change', 'change', this.host);\n this.eventListeners.forward('six-switch-blur', 'blur', this.host);\n this.eventListeners.forward('six-switch-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the switch. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.focus(options);\n }\n\n /** Removes focus from the switch. */\n @Method()\n async removeFocus() {\n this.inputElement?.blur();\n }\n\n private handleClick = () => {\n if (this.inputElement != null) {\n this.checked = this.inputElement.checked;\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit(this.checked);\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.checked = false;\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.checked = true;\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.inputElement?.focus();\n };\n\n render() {\n return (\n <FormControl\n inputId={this.switchId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={false}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n htmlFor={this.switchId}\n class={{\n switch: true,\n 'switch--checked': this.checked,\n 'switch--disabled': this.disabled,\n 'switch--focused': this.hasFocus,\n }}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\" />\n\n <input\n ref={(el) => (this.inputElement = el)}\n id={this.switchId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"switch\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"switch__label\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"],"mappings":"iIAAA,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,EAAEC,MAAMS,E,CAK3BD,oB,OACET,EAAApB,KAAKO,gBAAY,MAAAa,SAAA,SAAAA,EAAEW,M,CAqCrBC,SACE,OACEC,EAACC,EAAW,CACVC,QAASnC,KAAKC,SACdmC,MAAOpC,KAAKoC,MACZlC,QAASF,KAAKE,QACdmC,aAAc,MACdlC,YAAaH,KAAKG,YAClBmC,UAAWtC,KAAKsC,UAChBC,KAAK,SACLC,SAAUxC,KAAKwC,SACfC,SAAUzC,KAAKyC,SACfC,aAAc1C,KAAK2C,SAEnBV,EAAA,SACEW,KAAK,OACLC,QAAS7C,KAAKC,SACd6C,MAAO,CACLC,OAAQ,KACR,kBAAmB/C,KAAKQ,QACxB,mBAAoBR,KAAKwC,SACzB,kBAAmBxC,KAAKU,UAE1BsC,YAAahD,KAAKmB,iBAElBc,EAAA,QAAMW,KAAK,UAAUE,MAAM,mBACzBb,EAAA,QAAMW,KAAK,QAAQE,MAAM,kBAEzBb,EAAA,SACEgB,IAAMC,GAAQlD,KAAKO,aAAe2C,EAClCpD,GAAIE,KAAKC,SACTkD,KAAK,WACLC,KAAMpD,KAAKoD,KACXC,MAAOrD,KAAKqD,MACZ7C,QAASR,KAAKQ,QACdgC,SAAUxC,KAAKwC,SACfC,SAAUzC,KAAKyC,SACfa,KAAK,SAAQ,eACCtD,KAAKQ,QAAU,OAAS,QAAO,kBAC5BR,KAAKE,QACtBqD,QAASvD,KAAKM,YACdkD,OAAQxD,KAAKS,WACbgD,QAASzD,KAAKa,YACd6C,UAAW1D,KAAKe,iBAIpBkB,EAAA,QAAMW,KAAK,QAAQ9C,GAAIE,KAAKE,QAAS4C,MAAM,iBACzCb,EAAA,e"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["DEFAULT_DEBOUNCE_INSANELY_FAST","DEFAULT_DEBOUNCE_FAST","debounce","callback","timeout","timer","args","clearTimeout","setTimeout","debounceEvent","event","original","_original","emit","bind"],"sources":["./src/utils/execution-control.ts"],"sourcesContent":["import { EventEmitter } from '@stencil/core';\n\nexport const DEFAULT_DEBOUNCE_INSANELY_FAST = 35;\nexport const DEFAULT_DEBOUNCE_FAST = 300;\n\n/**\n * Debounce function to implement a timeframe to wait for no new changes before executing a callback\n\n * example usages:\n * debounce(() => saveInput());\n * debounce(() => saveInput(), 750);\n * this.searchInput.addEventListener('six-input-input', debounce((event) => this.searchInputChange(event)));\n *\n * regarding default timeout check https://lawsofux.com/doherty-threshold/\n *\n * @param callback\n * @param timeout\n */\nexport const debounce = <T>(callback: (x: T) => void, timeout = DEFAULT_DEBOUNCE_FAST) => {\n let timer: number;\n return (args: T) => {\n clearTimeout(timer);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n timer = setTimeout(() => callback(args), timeout);\n };\n};\n\n/**\n * Debounce an event\n *\n * @param event\n * @param timeout\n */\nexport const debounceEvent = (event: EventEmitter, timeout: number): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n const emit = debounce(original.emit.bind(original), timeout) as (_: unknown) => CustomEvent;\n return {\n _original: event,\n emit: emit,\n } as EventEmitter;\n};\n"],"mappings":"MAEaA,EAAiC,G,MACjCC,EAAwB,I,MAexBC,EAAW,CAAIC,EAA0BC,EAAUH,KAC9D,IAAII,EACJ,OAAQC,IACNC,aAAaF,GAGbA,EAAQG,YAAW,IAAML,EAASG,IAAOF,EAAQ,CAClD,E,MASUK,EAAgB,CAACC,EAAqBN,KAEjD,MAAMO,EAAYD,EAAcE,WAAaF,EAC7C,MAAMG,EAAOX,EAASS,EAASE,KAAKC,KAAKH,GAAWP,GACpD,MAAO,CACLQ,UAAWF,EACXG,KAAMA,EACS,S"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixProgressRingCss","SixProgressRing","handlePercentageChange","this","updateProgress","componentDidLoad","_a","indicator","r","radius","baseVal","value","circumference","Math","PI","offset","percentage","style","strokeDasharray","strokeDashoffset","render","h","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,gvB,MCmBdC,EAAe,M,mCAIX,I,iBAGO,E,gBAGD,C,CAGrBC,yBACEC,KAAKC,gB,CAGPC,mBACEF,KAAKC,gB,CAGCA,iB,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,CAG7CK,SACE,OACEC,EAAA,OAAKC,KAAK,OAAOC,MAAM,iBACrBF,EAAA,OAAKE,MAAM,uBAAuBC,MAAOrB,KAAKsB,KAAMC,OAAQvB,KAAKsB,MAC/DJ,EAAA,UACEE,MAAM,uBAAsB,eACdpB,KAAKwB,YAAW,iBACf,QACfC,KAAK,cACLpB,EAAGL,KAAKsB,KAAO,EAAItB,KAAKwB,YAAc,EACtCE,GAAI1B,KAAKsB,KAAO,EAChBK,GAAI3B,KAAKsB,KAAO,IAGlBJ,EAAA,UACEU,IAAMC,GAAQ7B,KAAKI,UAAYyB,EAC/BT,MAAM,2BAA0B,eAClBpB,KAAKwB,YAAW,iBACf,QACfC,KAAK,cACLpB,EAAGL,KAAKsB,KAAO,EAAItB,KAAKwB,YAAc,EACtCE,GAAI1B,KAAKsB,KAAO,EAChBK,GAAI3B,KAAKsB,KAAO,KAIpBJ,EAAA,QAAMC,KAAK,QAAQC,MAAM,wBACvBF,EAAA,c"}