@six-group/ui-library 0.0.0-insider.faf050a → 0.0.0-insider.fbc1348

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 (854) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/error-messages-6e8049a4.js +119 -0
  4. package/dist/cjs/error-messages-6e8049a4.js.map +1 -0
  5. package/dist/cjs/{form-control-f9bc25dd.js → form-control-de259450.js} +2 -2
  6. package/dist/cjs/{form-control-f9bc25dd.js.map → form-control-de259450.js.map} +1 -1
  7. package/dist/cjs/{index-3baddcdc.js → index-1f707a55.js} +127 -76
  8. package/dist/cjs/index-1f707a55.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +54 -101
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +5 -3
  12. package/dist/cjs/loader.cjs.js.map +1 -1
  13. package/dist/cjs/{modal-3ce015be.js → modal-bd7fc5bc.js} +1 -18
  14. package/dist/cjs/modal-bd7fc5bc.js.map +1 -0
  15. package/dist/cjs/{popup-40a9adbb.js → popup-e854acda.js} +2 -2
  16. package/dist/cjs/popup-e854acda.js.map +1 -0
  17. package/dist/cjs/six-alert.cjs.entry.js +42 -9
  18. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  19. package/dist/cjs/six-avatar.cjs.entry.js +5 -4
  20. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  21. package/dist/cjs/six-badge.cjs.entry.js +6 -5
  22. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  23. package/dist/cjs/six-button.cjs.entry.js +8 -6
  24. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  25. package/dist/cjs/six-card.cjs.entry.js +5 -4
  26. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  27. package/dist/cjs/six-checkbox_2.cjs.entry.js +192 -0
  28. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -0
  29. package/dist/cjs/six-datepicker.cjs.entry.js +44 -15
  30. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-details.cjs.entry.js +7 -6
  32. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-dialog.cjs.entry.js +16 -32
  34. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-drawer.cjs.entry.js +15 -32
  36. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-dropdown_2.cjs.entry.js +204 -130
  38. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-error-page.cjs.entry.js +4 -3
  40. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-error.cjs.entry.js +4 -3
  42. package/dist/cjs/six-error.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-file-list-item.cjs.entry.js +6 -5
  44. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-file-list.cjs.entry.js +4 -3
  46. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
  47. package/dist/cjs/six-file-upload.cjs.entry.js +34 -9
  48. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-footer.cjs.entry.js +5 -4
  50. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-group-label.cjs.entry.js +7 -6
  52. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-header.cjs.entry.js +43 -20
  54. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-icon-button.cjs.entry.js +7 -6
  56. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-icon.cjs.entry.js +6 -5
  58. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-input.cjs.entry.js +11 -8
  60. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-item-picker.cjs.entry.js +106 -9
  62. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-language-switcher.cjs.entry.js +11 -6
  64. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-layout-grid.cjs.entry.js +4 -3
  66. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-main-container.cjs.entry.js +4 -3
  68. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-menu-divider.cjs.entry.js +5 -4
  70. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-menu-label.cjs.entry.js +5 -4
  72. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-picto.cjs.entry.js +4 -3
  74. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-progress-bar.cjs.entry.js +6 -5
  76. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-progress-ring.cjs.entry.js +5 -4
  78. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-radio.cjs.entry.js +6 -5
  80. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  81. package/dist/cjs/six-range.cjs.entry.js +18 -7
  82. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  83. package/dist/cjs/six-root.cjs.entry.js +4 -22
  84. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-search-field.cjs.entry.js +5 -4
  86. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-select.cjs.entry.js +340 -182
  88. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +5 -4
  90. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-sidebar-item.cjs.entry.js +5 -4
  92. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-sidebar.cjs.entry.js +6 -5
  94. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-spinner.cjs.entry.js +5 -4
  96. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  97. package/dist/cjs/six-stage-indicator.cjs.entry.js +23 -0
  98. package/dist/cjs/six-stage-indicator.cjs.entry.js.map +1 -0
  99. package/dist/cjs/six-switch.cjs.entry.js +8 -7
  100. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-tab-group.cjs.entry.js +35 -9
  102. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  103. package/dist/cjs/six-tab-panel.cjs.entry.js +5 -4
  104. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  105. package/dist/cjs/six-tab.cjs.entry.js +6 -5
  106. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  107. package/dist/cjs/six-tag.cjs.entry.js +7 -6
  108. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  109. package/dist/cjs/six-textarea.cjs.entry.js +8 -7
  110. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  111. package/dist/cjs/six-tile.cjs.entry.js +8 -7
  112. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  113. package/dist/cjs/six-timepicker.cjs.entry.js +8 -7
  114. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  115. package/dist/cjs/six-tooltip.cjs.entry.js +6 -5
  116. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  117. package/dist/cjs/{slot-9821749e.js → slot-1b1232a1.js} +1 -3
  118. package/dist/cjs/slot-1b1232a1.js.map +1 -0
  119. package/dist/cjs/{types-0a6d66f6.js → types-d3da200b.js} +3 -1
  120. package/dist/cjs/types-d3da200b.js.map +1 -0
  121. package/dist/cjs/ui-library.cjs.js +6 -4
  122. package/dist/cjs/ui-library.cjs.js.map +1 -1
  123. package/dist/collection/assets/TRADEMARKS.md +3 -3
  124. package/dist/collection/collection-manifest.json +5 -6
  125. package/dist/collection/components/six-alert/six-alert.css +5 -1
  126. package/dist/collection/components/six-alert/six-alert.js +57 -12
  127. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  128. package/dist/collection/components/six-avatar/six-avatar.css +2 -2
  129. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  130. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  131. package/dist/collection/components/six-badge/six-badge.css +1 -1
  132. package/dist/collection/components/six-badge/six-badge.js +2 -2
  133. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  134. package/dist/collection/components/six-button/six-button.css +19 -1
  135. package/dist/collection/components/six-button/six-button.js +8 -6
  136. package/dist/collection/components/six-button/six-button.js.map +1 -1
  137. package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -1
  138. package/dist/collection/components/six-card/six-card.css +4 -5
  139. package/dist/collection/components/six-card/six-card.js +1 -1
  140. package/dist/collection/components/six-card/six-card.js.map +1 -1
  141. package/dist/collection/components/six-checkbox/six-checkbox.css +8 -1
  142. package/dist/collection/components/six-checkbox/six-checkbox.js +5 -4
  143. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  144. package/dist/collection/components/six-datepicker/six-date-formats.js +1 -0
  145. package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -1
  146. package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
  147. package/dist/collection/components/six-datepicker/six-datepicker.js +20 -16
  148. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  149. package/dist/collection/components/six-details/six-details.css +1 -5
  150. package/dist/collection/components/six-details/six-details.js +3 -3
  151. package/dist/collection/components/six-details/six-details.js.map +1 -1
  152. package/dist/collection/components/six-dialog/six-dialog.css +2 -2
  153. package/dist/collection/components/six-dialog/six-dialog.js +10 -28
  154. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  155. package/dist/collection/components/six-drawer/six-drawer.css +2 -2
  156. package/dist/collection/components/six-drawer/six-drawer.js +9 -28
  157. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  158. package/dist/collection/components/six-dropdown/six-dropdown.css +22 -7
  159. package/dist/collection/components/six-dropdown/six-dropdown.js +216 -124
  160. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  161. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +54 -29
  162. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -1
  163. package/dist/collection/components/six-error/six-error.js +1 -1
  164. package/dist/collection/components/six-error/six-error.js.map +1 -1
  165. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  166. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  167. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  168. package/dist/collection/components/six-file-list/six-file-list.js.map +1 -1
  169. package/dist/collection/components/six-file-list-item/six-file-list-item.css +1 -1
  170. package/dist/collection/components/six-file-list-item/six-file-list-item.js +2 -2
  171. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  172. package/dist/collection/components/six-file-upload/six-file-upload.css +12 -4
  173. package/dist/collection/components/six-file-upload/six-file-upload.js +87 -7
  174. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  175. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +187 -24
  176. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
  177. package/dist/collection/components/six-footer/six-footer.css +2 -2
  178. package/dist/collection/components/six-footer/six-footer.js +1 -1
  179. package/dist/collection/components/six-footer/six-footer.js.map +1 -1
  180. package/dist/collection/components/six-group-label/six-group-label.css +1 -1
  181. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  182. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  183. package/dist/collection/components/six-header/six-header.css +15 -2
  184. package/dist/collection/components/six-header/six-header.js +77 -18
  185. package/dist/collection/components/six-header/six-header.js.map +1 -1
  186. package/dist/collection/components/six-icon/six-icon.css +5 -2
  187. package/dist/collection/components/six-icon/six-icon.js +2 -2
  188. package/dist/collection/components/six-icon/six-icon.js.map +1 -1
  189. package/dist/collection/components/six-icon-button/six-icon-button.css +1 -1
  190. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  191. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  192. package/dist/collection/components/six-input/six-input.css +10 -1
  193. package/dist/collection/components/six-input/six-input.js +47 -19
  194. package/dist/collection/components/six-input/six-input.js.map +1 -1
  195. package/dist/collection/components/six-item-picker/six-item-picker.css +8 -0
  196. package/dist/collection/components/six-item-picker/six-item-picker.js +101 -5
  197. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  198. package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js +57 -57
  199. package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js.map +1 -1
  200. package/dist/collection/components/six-item-picker/types.js +2 -0
  201. package/dist/collection/components/six-item-picker/types.js.map +1 -1
  202. package/dist/collection/components/six-language-switcher/six-language-switcher.css +7 -2
  203. package/dist/collection/components/six-language-switcher/six-language-switcher.js +7 -3
  204. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  205. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +20 -20
  206. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -1
  207. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  208. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  209. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  210. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  211. package/dist/collection/components/six-menu/six-menu.css +8 -7
  212. package/dist/collection/components/six-menu/six-menu.js +30 -8
  213. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  214. package/dist/collection/components/six-menu/test/six-menu.spec.js +6 -6
  215. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  216. package/dist/collection/components/six-menu-divider/six-menu-divider.css +3 -2
  217. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  218. package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -1
  219. package/dist/collection/components/six-menu-item/six-menu-item.css +13 -2
  220. package/dist/collection/components/six-menu-item/six-menu-item.js +37 -8
  221. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  222. package/dist/collection/components/six-menu-label/six-menu-label.css +1 -1
  223. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  224. package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -1
  225. package/dist/collection/components/six-picto/six-picto.js +1 -1
  226. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  227. package/dist/collection/components/six-progress-bar/six-progress-bar.css +1 -1
  228. package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
  229. package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -1
  230. package/dist/collection/components/six-progress-ring/six-progress-ring.css +1 -1
  231. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  232. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  233. package/dist/collection/components/six-radio/six-radio.css +1 -1
  234. package/dist/collection/components/six-radio/six-radio.js +5 -4
  235. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  236. package/dist/collection/components/six-range/six-range.css +2 -2
  237. package/dist/collection/components/six-range/six-range.js +15 -4
  238. package/dist/collection/components/six-range/six-range.js.map +1 -1
  239. package/dist/collection/components/six-root/six-root.js +1 -69
  240. package/dist/collection/components/six-root/six-root.js.map +1 -1
  241. package/dist/collection/components/six-root/test/six-root.spec.js +0 -7
  242. package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -1
  243. package/dist/collection/components/six-search-field/six-search-field.css +1 -1
  244. package/dist/collection/components/six-search-field/six-search-field.js +1 -1
  245. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  246. package/dist/collection/components/six-select/six-select.css +54 -66
  247. package/dist/collection/components/six-select/six-select.js +351 -183
  248. package/dist/collection/components/six-select/six-select.js.map +1 -1
  249. package/dist/collection/components/six-select/test/six-select.spec.js +31 -15
  250. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
  251. package/dist/collection/components/six-select/test/util.spec.js +23 -1
  252. package/dist/collection/components/six-select/test/util.spec.js.map +1 -1
  253. package/dist/collection/components/six-select/util.js +24 -0
  254. package/dist/collection/components/six-select/util.js.map +1 -1
  255. package/dist/collection/components/six-sidebar/six-sidebar.css +2 -2
  256. package/dist/collection/components/six-sidebar/six-sidebar.js +8 -6
  257. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  258. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  259. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  260. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +2 -1
  261. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  262. package/dist/collection/components/six-spinner/six-spinner.css +1 -1
  263. package/dist/collection/components/six-spinner/six-spinner.js +2 -1
  264. package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
  265. package/dist/collection/components/six-spinner/test/six-spinner.spec.js +1 -1
  266. package/dist/collection/components/six-spinner/test/six-spinner.spec.js.map +1 -1
  267. package/dist/collection/components/six-stage-indicator/six-stage-indicator.css +1 -1
  268. package/dist/collection/components/six-switch/six-switch.css +1 -1
  269. package/dist/collection/components/six-switch/six-switch.js +5 -4
  270. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  271. package/dist/collection/components/six-tab/six-tab.css +1 -1
  272. package/dist/collection/components/six-tab/six-tab.js +5 -4
  273. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  274. package/dist/collection/components/six-tab-group/six-tab-group.css +1 -1
  275. package/dist/collection/components/six-tab-group/six-tab-group.js +36 -9
  276. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  277. package/dist/collection/components/six-tab-panel/six-tab-panel.css +1 -1
  278. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  279. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  280. package/dist/collection/components/six-tag/six-tag.css +1 -1
  281. package/dist/collection/components/six-tag/six-tag.js +2 -2
  282. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  283. package/dist/collection/components/six-textarea/six-textarea.css +1 -1
  284. package/dist/collection/components/six-textarea/six-textarea.js +26 -18
  285. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  286. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
  287. package/dist/collection/components/six-tile/six-tile.css +2 -2
  288. package/dist/collection/components/six-tile/six-tile.js +3 -3
  289. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  290. package/dist/collection/components/six-timepicker/six-timepicker.css +1 -1
  291. package/dist/collection/components/six-timepicker/six-timepicker.js +4 -3
  292. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  293. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
  294. package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
  295. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  296. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  297. package/dist/collection/index.js +1 -0
  298. package/dist/collection/index.js.map +1 -1
  299. package/dist/collection/utils/alert.js +54 -0
  300. package/dist/collection/utils/alert.js.map +1 -0
  301. package/dist/collection/utils/date-util.js +25 -0
  302. package/dist/collection/utils/date-util.js.map +1 -1
  303. package/dist/collection/utils/date-util.spec.js.map +1 -1
  304. package/dist/collection/utils/error-messages.js +7 -0
  305. package/dist/collection/utils/error-messages.js.map +1 -1
  306. package/dist/collection/utils/event-listeners.js.map +1 -1
  307. package/dist/collection/utils/focus-visible.js.map +1 -1
  308. package/dist/collection/utils/form.js.map +1 -1
  309. package/dist/collection/utils/modal.js.map +1 -1
  310. package/dist/collection/utils/popover.js.map +1 -1
  311. package/dist/collection/utils/popup.js +1 -1
  312. package/dist/collection/utils/popup.js.map +1 -1
  313. package/dist/collection/utils/scroll.js.map +1 -1
  314. package/dist/collection/utils/slot.js +0 -1
  315. package/dist/collection/utils/slot.js.map +1 -1
  316. package/dist/collection/utils/tabbable.js.map +1 -1
  317. package/dist/collection/utils/time.util.js.map +1 -1
  318. package/dist/collection/utils/time.util.spec.js.map +1 -1
  319. package/dist/components/index.js +50 -102
  320. package/dist/components/index.js.map +1 -1
  321. package/dist/components/modal.js +1 -17
  322. package/dist/components/modal.js.map +1 -1
  323. package/dist/components/six-alert.js +41 -8
  324. package/dist/components/six-alert.js.map +1 -1
  325. package/dist/components/six-avatar.js +4 -3
  326. package/dist/components/six-avatar.js.map +1 -1
  327. package/dist/components/six-badge.js +5 -4
  328. package/dist/components/six-badge.js.map +1 -1
  329. package/dist/components/six-button.js +1 -142
  330. package/dist/components/six-button.js.map +1 -1
  331. package/dist/components/six-button2.js +148 -0
  332. package/dist/components/six-button2.js.map +1 -0
  333. package/dist/components/six-card.js +4 -3
  334. package/dist/components/six-card.js.map +1 -1
  335. package/dist/components/six-checkbox.js +1 -161
  336. package/dist/components/six-checkbox.js.map +1 -1
  337. package/dist/components/six-checkbox2.js +166 -0
  338. package/dist/components/six-checkbox2.js.map +1 -0
  339. package/dist/components/six-datepicker.js +41 -12
  340. package/dist/components/six-datepicker.js.map +1 -1
  341. package/dist/components/six-details2.js +6 -5
  342. package/dist/components/six-details2.js.map +1 -1
  343. package/dist/components/six-dialog.js +14 -30
  344. package/dist/components/six-dialog.js.map +1 -1
  345. package/dist/components/six-drawer.js +13 -30
  346. package/dist/components/six-drawer.js.map +1 -1
  347. package/dist/components/six-dropdown2.js +204 -127
  348. package/dist/components/six-dropdown2.js.map +1 -1
  349. package/dist/components/six-error-page.js +3 -2
  350. package/dist/components/six-error-page.js.map +1 -1
  351. package/dist/components/six-error2.js +3 -2
  352. package/dist/components/six-error2.js.map +1 -1
  353. package/dist/components/six-file-list-item.js +5 -4
  354. package/dist/components/six-file-list-item.js.map +1 -1
  355. package/dist/components/six-file-list.js +3 -2
  356. package/dist/components/six-file-list.js.map +1 -1
  357. package/dist/components/six-file-upload.js +53 -12
  358. package/dist/components/six-file-upload.js.map +1 -1
  359. package/dist/components/six-footer.js +4 -3
  360. package/dist/components/six-footer.js.map +1 -1
  361. package/dist/components/six-group-label.js +4 -3
  362. package/dist/components/six-group-label.js.map +1 -1
  363. package/dist/components/six-header.js +50 -19
  364. package/dist/components/six-header.js.map +1 -1
  365. package/dist/components/six-icon-button2.js +6 -5
  366. package/dist/components/six-icon-button2.js.map +1 -1
  367. package/dist/components/six-icon2.js +5 -4
  368. package/dist/components/six-icon2.js.map +1 -1
  369. package/dist/components/six-input2.js +9 -5
  370. package/dist/components/six-input2.js.map +1 -1
  371. package/dist/components/six-item-picker2.js +106 -7
  372. package/dist/components/six-item-picker2.js.map +1 -1
  373. package/dist/components/six-language-switcher.js +10 -5
  374. package/dist/components/six-language-switcher.js.map +1 -1
  375. package/dist/components/six-layout-grid.js +3 -2
  376. package/dist/components/six-layout-grid.js.map +1 -1
  377. package/dist/components/six-main-container.js +3 -2
  378. package/dist/components/six-main-container.js.map +1 -1
  379. package/dist/components/six-menu-divider.js +4 -3
  380. package/dist/components/six-menu-divider.js.map +1 -1
  381. package/dist/components/six-menu-item2.js +31 -7
  382. package/dist/components/six-menu-item2.js.map +1 -1
  383. package/dist/components/six-menu-label.js +4 -3
  384. package/dist/components/six-menu-label.js.map +1 -1
  385. package/dist/components/six-menu2.js +26 -9
  386. package/dist/components/six-menu2.js.map +1 -1
  387. package/dist/components/six-picto2.js +3 -2
  388. package/dist/components/six-picto2.js.map +1 -1
  389. package/dist/components/six-progress-bar.js +5 -4
  390. package/dist/components/six-progress-bar.js.map +1 -1
  391. package/dist/components/six-progress-ring.js +4 -3
  392. package/dist/components/six-progress-ring.js.map +1 -1
  393. package/dist/components/six-radio.js +5 -4
  394. package/dist/components/six-radio.js.map +1 -1
  395. package/dist/components/six-range.js +15 -4
  396. package/dist/components/six-range.js.map +1 -1
  397. package/dist/components/six-root.js +6 -34
  398. package/dist/components/six-root.js.map +1 -1
  399. package/dist/components/six-search-field.js +4 -3
  400. package/dist/components/six-search-field.js.map +1 -1
  401. package/dist/components/six-select.js +478 -201
  402. package/dist/components/six-select.js.map +1 -1
  403. package/dist/components/six-sidebar-item-group.js +3 -2
  404. package/dist/components/six-sidebar-item-group.js.map +1 -1
  405. package/dist/components/six-sidebar-item.js +4 -3
  406. package/dist/components/six-sidebar-item.js.map +1 -1
  407. package/dist/components/six-sidebar.js +5 -4
  408. package/dist/components/six-sidebar.js.map +1 -1
  409. package/dist/components/six-spinner2.js +4 -3
  410. package/dist/components/six-spinner2.js.map +1 -1
  411. package/dist/components/six-stage-indicator2.js +3 -2
  412. package/dist/components/six-stage-indicator2.js.map +1 -1
  413. package/dist/components/six-switch.js +5 -4
  414. package/dist/components/six-switch.js.map +1 -1
  415. package/dist/components/six-tab-group.js +36 -9
  416. package/dist/components/six-tab-group.js.map +1 -1
  417. package/dist/components/six-tab-panel.js +4 -3
  418. package/dist/components/six-tab-panel.js.map +1 -1
  419. package/dist/components/six-tab.js +5 -4
  420. package/dist/components/six-tab.js.map +1 -1
  421. package/dist/components/six-tag.js +99 -1
  422. package/dist/components/six-tag.js.map +1 -1
  423. package/dist/components/six-textarea.js +5 -4
  424. package/dist/components/six-textarea.js.map +1 -1
  425. package/dist/components/six-tile.js +6 -5
  426. package/dist/components/six-tile.js.map +1 -1
  427. package/dist/components/six-timepicker2.js +5 -4
  428. package/dist/components/six-timepicker2.js.map +1 -1
  429. package/dist/components/six-tooltip2.js +5 -4
  430. package/dist/components/six-tooltip2.js.map +1 -1
  431. package/dist/components/slot.js +1 -2
  432. package/dist/components/slot.js.map +1 -1
  433. package/dist/components.d.ts +1 -21
  434. package/dist/components.json +741 -242
  435. package/dist/esm/app-globals-0f993ce5.js +5 -0
  436. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  437. package/dist/esm/error-messages-1eaaad23.js +115 -0
  438. package/dist/esm/error-messages-1eaaad23.js.map +1 -0
  439. package/dist/esm/{form-control-6b30894f.js → form-control-30c5bd8b.js} +2 -2
  440. package/dist/esm/{form-control-6b30894f.js.map → form-control-30c5bd8b.js.map} +1 -1
  441. package/dist/esm/{index-17d8173e.js → index-5390c1d6.js} +127 -76
  442. package/dist/esm/index-5390c1d6.js.map +1 -0
  443. package/dist/esm/index.js +51 -100
  444. package/dist/esm/index.js.map +1 -1
  445. package/dist/esm/loader.js +6 -4
  446. package/dist/esm/loader.js.map +1 -1
  447. package/dist/esm/{modal-96526245.js → modal-6c1288e3.js} +2 -18
  448. package/dist/esm/modal-6c1288e3.js.map +1 -0
  449. package/dist/esm/{popup-e8049817.js → popup-7209e9d5.js} +2 -2
  450. package/dist/esm/popup-7209e9d5.js.map +1 -0
  451. package/dist/esm/six-alert.entry.js +42 -9
  452. package/dist/esm/six-alert.entry.js.map +1 -1
  453. package/dist/esm/six-avatar.entry.js +5 -4
  454. package/dist/esm/six-avatar.entry.js.map +1 -1
  455. package/dist/esm/six-badge.entry.js +6 -5
  456. package/dist/esm/six-badge.entry.js.map +1 -1
  457. package/dist/esm/six-button.entry.js +8 -6
  458. package/dist/esm/six-button.entry.js.map +1 -1
  459. package/dist/esm/six-card.entry.js +5 -4
  460. package/dist/esm/six-card.entry.js.map +1 -1
  461. package/dist/esm/six-checkbox_2.entry.js +187 -0
  462. package/dist/esm/six-checkbox_2.entry.js.map +1 -0
  463. package/dist/esm/six-datepicker.entry.js +44 -15
  464. package/dist/esm/six-datepicker.entry.js.map +1 -1
  465. package/dist/esm/six-details.entry.js +7 -6
  466. package/dist/esm/six-details.entry.js.map +1 -1
  467. package/dist/esm/six-dialog.entry.js +16 -32
  468. package/dist/esm/six-dialog.entry.js.map +1 -1
  469. package/dist/esm/six-drawer.entry.js +15 -32
  470. package/dist/esm/six-drawer.entry.js.map +1 -1
  471. package/dist/esm/six-dropdown_2.entry.js +205 -131
  472. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  473. package/dist/esm/six-error-page.entry.js +4 -3
  474. package/dist/esm/six-error-page.entry.js.map +1 -1
  475. package/dist/esm/six-error.entry.js +4 -3
  476. package/dist/esm/six-error.entry.js.map +1 -1
  477. package/dist/esm/six-file-list-item.entry.js +6 -5
  478. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  479. package/dist/esm/six-file-list.entry.js +4 -3
  480. package/dist/esm/six-file-list.entry.js.map +1 -1
  481. package/dist/esm/six-file-upload.entry.js +34 -9
  482. package/dist/esm/six-file-upload.entry.js.map +1 -1
  483. package/dist/esm/six-footer.entry.js +5 -4
  484. package/dist/esm/six-footer.entry.js.map +1 -1
  485. package/dist/esm/six-group-label.entry.js +7 -6
  486. package/dist/esm/six-group-label.entry.js.map +1 -1
  487. package/dist/esm/six-header.entry.js +43 -20
  488. package/dist/esm/six-header.entry.js.map +1 -1
  489. package/dist/esm/six-icon-button.entry.js +7 -6
  490. package/dist/esm/six-icon-button.entry.js.map +1 -1
  491. package/dist/esm/six-icon.entry.js +6 -5
  492. package/dist/esm/six-icon.entry.js.map +1 -1
  493. package/dist/esm/six-input.entry.js +11 -8
  494. package/dist/esm/six-input.entry.js.map +1 -1
  495. package/dist/esm/six-item-picker.entry.js +106 -9
  496. package/dist/esm/six-item-picker.entry.js.map +1 -1
  497. package/dist/esm/six-language-switcher.entry.js +11 -6
  498. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  499. package/dist/esm/six-layout-grid.entry.js +4 -3
  500. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  501. package/dist/esm/six-main-container.entry.js +4 -3
  502. package/dist/esm/six-main-container.entry.js.map +1 -1
  503. package/dist/esm/six-menu-divider.entry.js +5 -4
  504. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  505. package/dist/esm/six-menu-label.entry.js +5 -4
  506. package/dist/esm/six-menu-label.entry.js.map +1 -1
  507. package/dist/esm/six-picto.entry.js +4 -3
  508. package/dist/esm/six-picto.entry.js.map +1 -1
  509. package/dist/esm/six-progress-bar.entry.js +6 -5
  510. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  511. package/dist/esm/six-progress-ring.entry.js +5 -4
  512. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  513. package/dist/esm/six-radio.entry.js +6 -5
  514. package/dist/esm/six-radio.entry.js.map +1 -1
  515. package/dist/esm/six-range.entry.js +18 -7
  516. package/dist/esm/six-range.entry.js.map +1 -1
  517. package/dist/esm/six-root.entry.js +4 -22
  518. package/dist/esm/six-root.entry.js.map +1 -1
  519. package/dist/esm/six-search-field.entry.js +5 -4
  520. package/dist/esm/six-search-field.entry.js.map +1 -1
  521. package/dist/esm/six-select.entry.js +340 -182
  522. package/dist/esm/six-select.entry.js.map +1 -1
  523. package/dist/esm/six-sidebar-item-group.entry.js +5 -4
  524. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  525. package/dist/esm/six-sidebar-item.entry.js +5 -4
  526. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  527. package/dist/esm/six-sidebar.entry.js +6 -5
  528. package/dist/esm/six-sidebar.entry.js.map +1 -1
  529. package/dist/esm/six-spinner.entry.js +5 -4
  530. package/dist/esm/six-spinner.entry.js.map +1 -1
  531. package/dist/esm/six-stage-indicator.entry.js +19 -0
  532. package/dist/esm/six-stage-indicator.entry.js.map +1 -0
  533. package/dist/esm/six-switch.entry.js +8 -7
  534. package/dist/esm/six-switch.entry.js.map +1 -1
  535. package/dist/esm/six-tab-group.entry.js +35 -9
  536. package/dist/esm/six-tab-group.entry.js.map +1 -1
  537. package/dist/esm/six-tab-panel.entry.js +5 -4
  538. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  539. package/dist/esm/six-tab.entry.js +6 -5
  540. package/dist/esm/six-tab.entry.js.map +1 -1
  541. package/dist/esm/six-tag.entry.js +7 -6
  542. package/dist/esm/six-tag.entry.js.map +1 -1
  543. package/dist/esm/six-textarea.entry.js +8 -7
  544. package/dist/esm/six-textarea.entry.js.map +1 -1
  545. package/dist/esm/six-tile.entry.js +8 -7
  546. package/dist/esm/six-tile.entry.js.map +1 -1
  547. package/dist/esm/six-timepicker.entry.js +8 -7
  548. package/dist/esm/six-timepicker.entry.js.map +1 -1
  549. package/dist/esm/six-tooltip.entry.js +6 -5
  550. package/dist/esm/six-tooltip.entry.js.map +1 -1
  551. package/dist/esm/{slot-41bc439a.js → slot-56531341.js} +2 -3
  552. package/dist/esm/slot-56531341.js.map +1 -0
  553. package/dist/esm/{types-07748c42.js → types-a07bb999.js} +3 -1
  554. package/dist/esm/types-a07bb999.js.map +1 -0
  555. package/dist/esm/ui-library.js +7 -5
  556. package/dist/esm/ui-library.js.map +1 -1
  557. package/dist/types/components/six-alert/six-alert.d.ts +13 -6
  558. package/dist/types/components/six-button/six-button.d.ts +1 -1
  559. package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
  560. package/dist/types/components/six-dialog/six-dialog.d.ts +1 -0
  561. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -9
  562. package/dist/types/components/six-file-upload/six-file-upload.d.ts +10 -0
  563. package/dist/types/components/six-header/six-header.d.ts +8 -2
  564. package/dist/types/components/six-input/six-input.d.ts +4 -0
  565. package/dist/types/components/six-item-picker/six-item-picker.d.ts +7 -0
  566. package/dist/types/components/six-menu/six-menu.d.ts +4 -0
  567. package/dist/types/components/six-menu-item/six-menu-item.d.ts +7 -1
  568. package/dist/types/components/six-range/six-range.d.ts +2 -0
  569. package/dist/types/components/six-root/six-root.d.ts +0 -13
  570. package/dist/types/components/six-select/six-select.d.ts +27 -13
  571. package/dist/types/components/six-select/util.d.ts +2 -0
  572. package/dist/types/components/six-spinner/six-spinner.d.ts +1 -0
  573. package/dist/types/components/six-tab-group/six-tab-group.d.ts +4 -1
  574. package/dist/types/components.d.ts +120 -62
  575. package/dist/types/index.d.ts +1 -0
  576. package/dist/types/types.d.ts +1 -0
  577. package/dist/types/utils/alert.d.ts +10 -0
  578. package/dist/types/utils/date-util.d.ts +9 -1
  579. package/dist/types/utils/error-messages.d.ts +1 -0
  580. package/dist/types/utils/slot.d.ts +0 -1
  581. package/dist/ui-library/assets/TRADEMARKS.md +3 -3
  582. package/dist/ui-library/index.esm.js +1 -1
  583. package/dist/ui-library/index.esm.js.map +1 -1
  584. package/dist/ui-library/p-030fa1fa.entry.js +2 -0
  585. package/dist/ui-library/p-030fa1fa.entry.js.map +1 -0
  586. package/dist/ui-library/p-03d1b956.entry.js +2 -0
  587. package/dist/ui-library/p-03d1b956.entry.js.map +1 -0
  588. package/dist/ui-library/p-047d02ad.entry.js +2 -0
  589. package/dist/ui-library/p-047d02ad.entry.js.map +1 -0
  590. package/dist/ui-library/p-05eb1bab.js +3 -0
  591. package/dist/ui-library/p-05eb1bab.js.map +1 -0
  592. package/dist/ui-library/p-060069d4.entry.js +2 -0
  593. package/dist/ui-library/p-060069d4.entry.js.map +1 -0
  594. package/dist/ui-library/p-06ba653e.entry.js +2 -0
  595. package/dist/ui-library/p-06ba653e.entry.js.map +1 -0
  596. package/dist/ui-library/p-07c8de65.entry.js +2 -0
  597. package/dist/ui-library/p-07c8de65.entry.js.map +1 -0
  598. package/dist/ui-library/p-0cebf1d2.js +2 -0
  599. package/dist/ui-library/p-0cebf1d2.js.map +1 -0
  600. package/dist/ui-library/p-0fb3fb30.entry.js +2 -0
  601. package/dist/ui-library/p-0fb3fb30.entry.js.map +1 -0
  602. package/dist/ui-library/p-14e5fccc.entry.js +2 -0
  603. package/dist/ui-library/p-14e5fccc.entry.js.map +1 -0
  604. package/dist/ui-library/p-189602e4.entry.js +2 -0
  605. package/dist/ui-library/p-189602e4.entry.js.map +1 -0
  606. package/dist/ui-library/p-19560508.entry.js +2 -0
  607. package/dist/ui-library/p-19560508.entry.js.map +1 -0
  608. package/dist/ui-library/p-21074819.entry.js +2 -0
  609. package/dist/ui-library/p-21074819.entry.js.map +1 -0
  610. package/dist/ui-library/p-2386627e.entry.js +2 -0
  611. package/dist/ui-library/p-2386627e.entry.js.map +1 -0
  612. package/dist/ui-library/p-2c25cb61.entry.js +2 -0
  613. package/dist/ui-library/p-2c25cb61.entry.js.map +1 -0
  614. package/dist/ui-library/p-32e421a3.entry.js +2 -0
  615. package/dist/ui-library/p-32e421a3.entry.js.map +1 -0
  616. package/dist/ui-library/p-3603dd96.entry.js +2 -0
  617. package/dist/ui-library/p-3603dd96.entry.js.map +1 -0
  618. package/dist/ui-library/p-39ff5f61.entry.js +2 -0
  619. package/dist/ui-library/p-39ff5f61.entry.js.map +1 -0
  620. package/dist/ui-library/p-3b5a76ea.entry.js +2 -0
  621. package/dist/ui-library/p-3b5a76ea.entry.js.map +1 -0
  622. package/dist/ui-library/p-419ed003.entry.js +2 -0
  623. package/dist/ui-library/p-419ed003.entry.js.map +1 -0
  624. package/dist/ui-library/p-45003bae.entry.js +2 -0
  625. package/dist/ui-library/p-45003bae.entry.js.map +1 -0
  626. package/dist/ui-library/p-4963f03c.entry.js +2 -0
  627. package/dist/ui-library/p-4963f03c.entry.js.map +1 -0
  628. package/dist/ui-library/p-4d89932f.entry.js +2 -0
  629. package/dist/ui-library/p-4d89932f.entry.js.map +1 -0
  630. package/dist/ui-library/{p-6907a7dc.js → p-605bdd81.js} +2 -2
  631. package/dist/ui-library/p-63acceb6.entry.js +2 -0
  632. package/dist/ui-library/p-63acceb6.entry.js.map +1 -0
  633. package/dist/ui-library/p-651293e7.js +2 -0
  634. package/dist/ui-library/p-651293e7.js.map +1 -0
  635. package/dist/ui-library/p-6888b9ee.entry.js +2 -0
  636. package/dist/ui-library/p-6888b9ee.entry.js.map +1 -0
  637. package/dist/ui-library/p-6f9153be.entry.js +2 -0
  638. package/dist/ui-library/p-6f9153be.entry.js.map +1 -0
  639. package/dist/ui-library/p-7561b336.entry.js +2 -0
  640. package/dist/ui-library/p-7561b336.entry.js.map +1 -0
  641. package/dist/ui-library/p-7c18b8ca.entry.js +2 -0
  642. package/dist/ui-library/p-7c18b8ca.entry.js.map +1 -0
  643. package/dist/ui-library/p-82bd8781.entry.js +2 -0
  644. package/dist/ui-library/p-82bd8781.entry.js.map +1 -0
  645. package/dist/ui-library/{p-0861899a.js → p-862d474e.js} +1 -1
  646. package/dist/ui-library/p-862d474e.js.map +1 -0
  647. package/dist/ui-library/p-89db9a8b.entry.js +2 -0
  648. package/dist/ui-library/p-89db9a8b.entry.js.map +1 -0
  649. package/dist/ui-library/{p-d310a6dd.entry.js → p-8f1d3461.entry.js} +2 -2
  650. package/dist/ui-library/p-8f1d3461.entry.js.map +1 -0
  651. package/dist/ui-library/p-8fb96142.entry.js +2 -0
  652. package/dist/ui-library/p-8fb96142.entry.js.map +1 -0
  653. package/dist/ui-library/p-96d441e9.entry.js +2 -0
  654. package/dist/ui-library/p-96d441e9.entry.js.map +1 -0
  655. package/dist/ui-library/p-9bc1639b.entry.js +2 -0
  656. package/dist/ui-library/p-9bc1639b.entry.js.map +1 -0
  657. package/dist/ui-library/p-9cb83369.entry.js +2 -0
  658. package/dist/ui-library/p-9cb83369.entry.js.map +1 -0
  659. package/dist/ui-library/p-a398e3eb.entry.js +2 -0
  660. package/dist/ui-library/p-a398e3eb.entry.js.map +1 -0
  661. package/dist/ui-library/p-a7e2f511.entry.js +2 -0
  662. package/dist/ui-library/p-a7e2f511.entry.js.map +1 -0
  663. package/dist/ui-library/p-a8863197.entry.js +2 -0
  664. package/dist/ui-library/p-a8863197.entry.js.map +1 -0
  665. package/dist/ui-library/p-a9e009af.entry.js +2 -0
  666. package/dist/ui-library/p-a9e009af.entry.js.map +1 -0
  667. package/dist/ui-library/p-ac00076d.entry.js +2 -0
  668. package/dist/ui-library/p-ac00076d.entry.js.map +1 -0
  669. package/dist/ui-library/p-b4bc4915.entry.js +2 -0
  670. package/dist/ui-library/p-b4bc4915.entry.js.map +1 -0
  671. package/dist/ui-library/p-b5acf54d.entry.js +2 -0
  672. package/dist/ui-library/p-b5acf54d.entry.js.map +1 -0
  673. package/dist/ui-library/p-b60c20aa.entry.js +2 -0
  674. package/dist/ui-library/p-b60c20aa.entry.js.map +1 -0
  675. package/dist/ui-library/p-c1d68730.entry.js +2 -0
  676. package/dist/ui-library/p-c1d68730.entry.js.map +1 -0
  677. package/dist/ui-library/p-c35a7cef.entry.js +2 -0
  678. package/dist/ui-library/p-c35a7cef.entry.js.map +1 -0
  679. package/dist/ui-library/p-c62893e5.entry.js +2 -0
  680. package/dist/ui-library/p-c62893e5.entry.js.map +1 -0
  681. package/dist/ui-library/p-c6464bfe.entry.js +2 -0
  682. package/dist/ui-library/p-c6464bfe.entry.js.map +1 -0
  683. package/dist/ui-library/p-cf109cbf.entry.js +2 -0
  684. package/dist/ui-library/p-cf109cbf.entry.js.map +1 -0
  685. package/dist/ui-library/p-d07b549f.entry.js +2 -0
  686. package/dist/ui-library/p-d07b549f.entry.js.map +1 -0
  687. package/dist/ui-library/p-d42f1ea9.entry.js +2 -0
  688. package/dist/ui-library/p-d42f1ea9.entry.js.map +1 -0
  689. package/dist/ui-library/p-e080d5b6.js +2 -0
  690. package/dist/ui-library/p-e080d5b6.js.map +1 -0
  691. package/dist/ui-library/p-e1255160.js +2 -0
  692. package/dist/ui-library/p-e1255160.js.map +1 -0
  693. package/dist/ui-library/p-f136a6b2.js +2 -0
  694. package/dist/ui-library/p-f136a6b2.js.map +1 -0
  695. package/dist/ui-library/p-fe37dadf.entry.js +2 -0
  696. package/dist/ui-library/p-fe37dadf.entry.js.map +1 -0
  697. package/dist/ui-library/p-fe89a7c4.entry.js +2 -0
  698. package/dist/ui-library/p-fe89a7c4.entry.js.map +1 -0
  699. package/dist/ui-library/ui-library.css +1 -10
  700. package/dist/ui-library/ui-library.esm.js +1 -1
  701. package/dist/ui-library/ui-library.esm.js.map +1 -1
  702. package/package.json +10 -13
  703. package/dist/cjs/index-3baddcdc.js.map +0 -1
  704. package/dist/cjs/modal-3ce015be.js.map +0 -1
  705. package/dist/cjs/popup-40a9adbb.js.map +0 -1
  706. package/dist/cjs/set-attributes_2.cjs.entry.js +0 -73
  707. package/dist/cjs/set-attributes_2.cjs.entry.js.map +0 -1
  708. package/dist/cjs/six-checkbox.cjs.entry.js +0 -127
  709. package/dist/cjs/six-checkbox.cjs.entry.js.map +0 -1
  710. package/dist/cjs/six-menu-item.cjs.entry.js +0 -63
  711. package/dist/cjs/six-menu-item.cjs.entry.js.map +0 -1
  712. package/dist/cjs/slot-9821749e.js.map +0 -1
  713. package/dist/cjs/types-0a6d66f6.js.map +0 -1
  714. package/dist/collection/components/six-header/assets/six-logo.svg +0 -1
  715. package/dist/collection/components/six-header/test/six-header.spec.js +0 -133
  716. package/dist/collection/components/six-header/test/six-header.spec.js.map +0 -1
  717. package/dist/collection/utils/support.js +0 -16
  718. package/dist/collection/utils/support.js.map +0 -1
  719. package/dist/collection/wrappers/set-attributes/set-attributes.js +0 -74
  720. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +0 -1
  721. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +0 -16
  722. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +0 -1
  723. package/dist/components/set-attributes.d.ts +0 -11
  724. package/dist/components/set-attributes.js +0 -8
  725. package/dist/components/set-attributes.js.map +0 -1
  726. package/dist/components/set-attributes2.js +0 -73
  727. package/dist/components/set-attributes2.js.map +0 -1
  728. package/dist/components/six-tag2.js +0 -102
  729. package/dist/components/six-tag2.js.map +0 -1
  730. package/dist/esm/index-17d8173e.js.map +0 -1
  731. package/dist/esm/modal-96526245.js.map +0 -1
  732. package/dist/esm/popup-e8049817.js.map +0 -1
  733. package/dist/esm/set-attributes_2.entry.js +0 -68
  734. package/dist/esm/set-attributes_2.entry.js.map +0 -1
  735. package/dist/esm/six-checkbox.entry.js +0 -123
  736. package/dist/esm/six-checkbox.entry.js.map +0 -1
  737. package/dist/esm/six-menu-item.entry.js +0 -59
  738. package/dist/esm/six-menu-item.entry.js.map +0 -1
  739. package/dist/esm/slot-41bc439a.js.map +0 -1
  740. package/dist/esm/types-07748c42.js.map +0 -1
  741. package/dist/types/utils/support.d.ts +0 -1
  742. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +0 -9
  743. package/dist/ui-library/assets/six-logo.svg +0 -1
  744. package/dist/ui-library/p-0861899a.js.map +0 -1
  745. package/dist/ui-library/p-0a81b42c.entry.js +0 -2
  746. package/dist/ui-library/p-0a81b42c.entry.js.map +0 -1
  747. package/dist/ui-library/p-0beec94f.js +0 -3
  748. package/dist/ui-library/p-0beec94f.js.map +0 -1
  749. package/dist/ui-library/p-100d5a25.entry.js +0 -2
  750. package/dist/ui-library/p-100d5a25.entry.js.map +0 -1
  751. package/dist/ui-library/p-178f5782.entry.js +0 -2
  752. package/dist/ui-library/p-178f5782.entry.js.map +0 -1
  753. package/dist/ui-library/p-19a61686.entry.js +0 -2
  754. package/dist/ui-library/p-19a61686.entry.js.map +0 -1
  755. package/dist/ui-library/p-1d0c5929.entry.js +0 -2
  756. package/dist/ui-library/p-1d0c5929.entry.js.map +0 -1
  757. package/dist/ui-library/p-23c02c98.entry.js +0 -2
  758. package/dist/ui-library/p-23c02c98.entry.js.map +0 -1
  759. package/dist/ui-library/p-2f9f2532.entry.js +0 -2
  760. package/dist/ui-library/p-2f9f2532.entry.js.map +0 -1
  761. package/dist/ui-library/p-3187bc23.entry.js +0 -2
  762. package/dist/ui-library/p-3187bc23.entry.js.map +0 -1
  763. package/dist/ui-library/p-32e1a5ab.entry.js +0 -2
  764. package/dist/ui-library/p-32e1a5ab.entry.js.map +0 -1
  765. package/dist/ui-library/p-3d54ecf2.entry.js +0 -2
  766. package/dist/ui-library/p-3d54ecf2.entry.js.map +0 -1
  767. package/dist/ui-library/p-4229f7e8.entry.js +0 -2
  768. package/dist/ui-library/p-4229f7e8.entry.js.map +0 -1
  769. package/dist/ui-library/p-479d8087.entry.js +0 -2
  770. package/dist/ui-library/p-479d8087.entry.js.map +0 -1
  771. package/dist/ui-library/p-49aa8d1e.entry.js +0 -2
  772. package/dist/ui-library/p-49aa8d1e.entry.js.map +0 -1
  773. package/dist/ui-library/p-58661675.entry.js +0 -2
  774. package/dist/ui-library/p-58661675.entry.js.map +0 -1
  775. package/dist/ui-library/p-5d43ea07.entry.js +0 -2
  776. package/dist/ui-library/p-5d43ea07.entry.js.map +0 -1
  777. package/dist/ui-library/p-6aa2929a.entry.js +0 -2
  778. package/dist/ui-library/p-6aa2929a.entry.js.map +0 -1
  779. package/dist/ui-library/p-7432d409.entry.js +0 -2
  780. package/dist/ui-library/p-7432d409.entry.js.map +0 -1
  781. package/dist/ui-library/p-74a714c0.entry.js +0 -2
  782. package/dist/ui-library/p-74a714c0.entry.js.map +0 -1
  783. package/dist/ui-library/p-76825395.entry.js +0 -2
  784. package/dist/ui-library/p-76825395.entry.js.map +0 -1
  785. package/dist/ui-library/p-816f857d.entry.js +0 -2
  786. package/dist/ui-library/p-816f857d.entry.js.map +0 -1
  787. package/dist/ui-library/p-882fbf6f.entry.js +0 -2
  788. package/dist/ui-library/p-882fbf6f.entry.js.map +0 -1
  789. package/dist/ui-library/p-88fd4973.entry.js +0 -2
  790. package/dist/ui-library/p-88fd4973.entry.js.map +0 -1
  791. package/dist/ui-library/p-8b750c9e.entry.js +0 -2
  792. package/dist/ui-library/p-8b750c9e.entry.js.map +0 -1
  793. package/dist/ui-library/p-911eb578.entry.js +0 -2
  794. package/dist/ui-library/p-911eb578.entry.js.map +0 -1
  795. package/dist/ui-library/p-93fcda4a.entry.js +0 -2
  796. package/dist/ui-library/p-93fcda4a.entry.js.map +0 -1
  797. package/dist/ui-library/p-981b3228.entry.js +0 -2
  798. package/dist/ui-library/p-981b3228.entry.js.map +0 -1
  799. package/dist/ui-library/p-998de05d.js +0 -2
  800. package/dist/ui-library/p-998de05d.js.map +0 -1
  801. package/dist/ui-library/p-9b1ff147.entry.js +0 -2
  802. package/dist/ui-library/p-9b1ff147.entry.js.map +0 -1
  803. package/dist/ui-library/p-a21f8d06.entry.js +0 -2
  804. package/dist/ui-library/p-a21f8d06.entry.js.map +0 -1
  805. package/dist/ui-library/p-a2461274.entry.js +0 -2
  806. package/dist/ui-library/p-a2461274.entry.js.map +0 -1
  807. package/dist/ui-library/p-a4e4620c.entry.js +0 -2
  808. package/dist/ui-library/p-a4e4620c.entry.js.map +0 -1
  809. package/dist/ui-library/p-ada23fe3.entry.js +0 -2
  810. package/dist/ui-library/p-ada23fe3.entry.js.map +0 -1
  811. package/dist/ui-library/p-b5ac1219.entry.js +0 -2
  812. package/dist/ui-library/p-b5ac1219.entry.js.map +0 -1
  813. package/dist/ui-library/p-ba247565.entry.js +0 -2
  814. package/dist/ui-library/p-ba247565.entry.js.map +0 -1
  815. package/dist/ui-library/p-bdb79948.entry.js +0 -2
  816. package/dist/ui-library/p-bdb79948.entry.js.map +0 -1
  817. package/dist/ui-library/p-c021a9c9.entry.js +0 -2
  818. package/dist/ui-library/p-c021a9c9.entry.js.map +0 -1
  819. package/dist/ui-library/p-c07b1240.entry.js +0 -2
  820. package/dist/ui-library/p-c07b1240.entry.js.map +0 -1
  821. package/dist/ui-library/p-c12a94ce.entry.js +0 -2
  822. package/dist/ui-library/p-c12a94ce.entry.js.map +0 -1
  823. package/dist/ui-library/p-c1675a45.entry.js +0 -2
  824. package/dist/ui-library/p-c1675a45.entry.js.map +0 -1
  825. package/dist/ui-library/p-c2df8c27.entry.js +0 -2
  826. package/dist/ui-library/p-c2df8c27.entry.js.map +0 -1
  827. package/dist/ui-library/p-c86aa5b3.entry.js +0 -2
  828. package/dist/ui-library/p-c86aa5b3.entry.js.map +0 -1
  829. package/dist/ui-library/p-cd35b3c6.entry.js +0 -2
  830. package/dist/ui-library/p-cd35b3c6.entry.js.map +0 -1
  831. package/dist/ui-library/p-d2cf4280.entry.js +0 -2
  832. package/dist/ui-library/p-d2cf4280.entry.js.map +0 -1
  833. package/dist/ui-library/p-d310a6dd.entry.js.map +0 -1
  834. package/dist/ui-library/p-d6838141.entry.js +0 -2
  835. package/dist/ui-library/p-d6838141.entry.js.map +0 -1
  836. package/dist/ui-library/p-dc908cbb.entry.js +0 -2
  837. package/dist/ui-library/p-dc908cbb.entry.js.map +0 -1
  838. package/dist/ui-library/p-dfb6bff6.entry.js +0 -2
  839. package/dist/ui-library/p-dfb6bff6.entry.js.map +0 -1
  840. package/dist/ui-library/p-ee71e3a3.entry.js +0 -2
  841. package/dist/ui-library/p-ee71e3a3.entry.js.map +0 -1
  842. package/dist/ui-library/p-ef317d69.entry.js +0 -2
  843. package/dist/ui-library/p-ef317d69.entry.js.map +0 -1
  844. package/dist/ui-library/p-f2ef23c4.js +0 -2
  845. package/dist/ui-library/p-f2ef23c4.js.map +0 -1
  846. package/dist/ui-library/p-f385f1c2.entry.js +0 -2
  847. package/dist/ui-library/p-f385f1c2.entry.js.map +0 -1
  848. package/dist/ui-library/p-f73a6bdc.entry.js +0 -2
  849. package/dist/ui-library/p-f73a6bdc.entry.js.map +0 -1
  850. package/dist/ui-library/p-faa04bb5.js +0 -2
  851. package/dist/ui-library/p-faa04bb5.js.map +0 -1
  852. package/dist/ui-library/p-fcd57e0a.entry.js +0 -2
  853. package/dist/ui-library/p-fcd57e0a.entry.js.map +0 -1
  854. /package/dist/ui-library/{p-6907a7dc.js.map → p-605bdd81.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"six-dropdown2.js","mappings":";;;;;;;;;;;SAAgB,UAAU,CAAC,EAAe;IACxC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC7B,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC;AACvB,CAAC;SAEe,yBAAyB,CAAC,EAAe;;IAEvD,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE;QAClB,OAAO,EAAE,CAAC;KACX;;IAGD,IAAI,EAAE,CAAC,UAAU,IAAI,IAAI,EAAE;QACzB,MAAM,mBAAmB,GAAG,CAAC,GA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E,CAAC,IAAI,CAAC,IAAI;aAC5B,iBACY,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,EACzC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,EAC3C,WAAW,EAAE,IAAI,CAAC,iBAAiB,GACnC,CACH,EACD,WACE,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,MAAM,iBACE,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,qBACxB,IAAI,CAAC,WAAW,EACjC,QAAQ,EAAE,IAAI,CAAC,oBAAoB,IAEnC,eAAQ,EACP,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,KAC9B,gBAAU,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,GAAa,CAClG,CACG,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/tabbable.ts","src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","src/components/six-dropdown/six-dropdown.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement | undefined {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot != null) {\n const tabbableShadowChild = [...el.shadowRoot.children].find((e) => isTabbable(e as HTMLElement)) as HTMLElement;\n if (tabbableShadowChild != null) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children != null) {\n return [...el.children].map((e) => getNearestTabbableElement(e as HTMLElement)).at(0);\n }\n\n return undefined;\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: inline-block;\n}\n\n.dropdown {\n position: relative;\n}\n\n.dropdown__trigger {\n display: block;\n}\n\n.dropdown__positioner {\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n\n &__filtered {\n width: 100%;\n }\n}\n\n.dropdown__panel {\n max-height: 50vh;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n color: var(--color);\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--six-elevation-2dp);\n opacity: 0;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: none;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n // fix for firefox scrollbar\n scrollbar-width: thin;\n}\n\n.filter-hidden {\n display: none;\n}\n\n.dropdown__positioner {\n &[data-popper-placement^='top'] .dropdown__panel {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .dropdown__panel {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .dropdown__panel {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .dropdown__panel {\n transform-origin: left;\n }\n\n &.popover-visible .dropdown__panel {\n opacity: 1;\n transform: none;\n pointer-events: all;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { getSlotChildren } from '../../utils/slot';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixMenuItemData } from '../six-menu/six-menu';\n\nexport interface SixDropdownAutoFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownAsyncFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownScrollPayload {\n scrollHeight: number;\n scrollTop: number;\n scrollbarHeight: number;\n scrollRatio: number;\n}\n\nconst isTagName =\n (name: string) =>\n <T extends Element>(el?: T) =>\n el?.tagName.toLowerCase() === name.toLowerCase();\nconst isSixMenu = isTagName('six-menu');\nconst isSixMenuItem = isTagName('six-menu-item');\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 trigger - The dropdown's trigger, usually a `<six-button>` element.\n * @slot - The dropdown's content.\n *\n * @part base - The component's base wrapper.\n * @part trigger - The container that wraps the trigger.\n * @part panel - The panel that gets shown when the dropdown is open.\n */\n\n@Component({\n tag: 'six-dropdown',\n styleUrl: 'six-dropdown.scss',\n shadow: true,\n})\nexport class SixDropdown {\n private componentId = `dropdown-${++id}`;\n private isVisible = false;\n private panel?: HTMLElement;\n private positioner?: HTMLElement;\n private popover?: Popover;\n private trigger?: HTMLElement;\n private hasBeenInitialized = false;\n\n // the input element shown in the dropdown when filter is set to true\n private filterInputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixDropdownElement;\n\n /** Indicates whether the dropdown 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 preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Determines whether the dropdown should hide when a menu item is selected. */\n @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 0;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @Prop() skidding = 0;\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 /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /**\n * Set to true to allow auto filtering for entries in the dropdown.\n * With this flag the dropdown will automatically filter itsel.\n * If you need to coordinate the shown elements yourself,\n * e.g. because you need to call an endpoint use asyncFilter instead\n */\n @Prop() filter = false;\n\n /**\n * Set to true to allow async filtering.\n * When you enter something in the search field the component will only emit an event but not filter any elements itself.\n * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself\n */\n @Prop() asyncFilter = false;\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder = 'Filter...';\n\n /** By default the search field will be focused when opening a dropdown with filtering enabled. */\n @Prop() autofocusFilter = true;\n\n get hasFilterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop() filterDebounce = DEFAULT_DEBOUNCE_FAST;\n\n /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */\n @Prop() disableHideOnEnterAndSpace = false;\n\n /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/\n @Prop() options: SixMenuItemData[] = [];\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n /** Emitted when the dropdown opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dropdown-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown opens and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dropdown closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dropdown-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown closes and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the auto filter is triggered */\n @Event({ eventName: 'six-dropdown-auto-filter-fired' }) sixAutoFilter!: EventEmitter<SixDropdownAutoFilterPayload>;\n\n /** Emitted when the async filter is triggered */\n @Event({ eventName: 'six-async-filter-fired' }) sixAsyncFilterFired!: EventEmitter<SixDropdownAsyncFilterPayload>;\n\n /** Emitted when the user scrolls inside dropdown panel.*/\n @Event({ eventName: 'six-dropdown-scroll' }) sixScroll!: EventEmitter<SixDropdownScrollPayload>;\n\n private eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State() filteredOptions: SixMenuItemData[] = [];\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n this.updateAccessibleTrigger();\n }\n\n @Watch('distance')\n @Watch('hoist')\n @Watch('placement')\n @Watch('skidding')\n handlePopoverOptionsChange() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n });\n }\n\n @Watch('options')\n handleOptionsChange() {\n if (Array.isArray(this.options)) {\n this.filteredOptions = [...this.options];\n }\n }\n\n connectedCallback() {\n if (this.virtualScroll && this.options === null) {\n console.error('Options must be defined when using virtual scrolling');\n }\n\n if (Array.isArray(this.options)) {\n this.filteredOptions = [...this.options];\n }\n\n if (this.hasBeenInitialized && this.popover == null) {\n // there was a weird bug when using six-dropdown inside an ag-grid filter. When closing the ag-grid filter\n // disconnectedCallback() is executed. However, since componentDidLoad() will not be rerendered the popover had\n // no longer a connected transitionEnd callback to the dropdown. To fix this, we have this sanity check here,\n // to re-initialize the popover in case the component has already been initialized but the popover is undefined.\n this.initializePopover();\n }\n }\n\n componentDidLoad() {\n this.hasBeenInitialized = true;\n this.initializePopover();\n\n // Show on init if open\n if (this.open) {\n void this.show();\n }\n\n if (this.filter) {\n this.setupFiltering(this.handleFilterInputChange);\n } else if (this.asyncFilter) {\n this.setupFiltering(() => this.sixAsyncFilterFired.emit({ filterValue: this.filterInputElement?.value ?? '' }));\n }\n }\n\n private initializePopover() {\n if (this.trigger == null || this.positioner == null) return;\n const onAfterHide = () => {\n if (this.filter && this.filterInputElement != null) {\n this.filterInputElement.value = '';\n\n if (this.filteredOptions.length > 0) {\n this.filteredOptions = [...this.options];\n } else {\n const menuItems = this.getMenuItems();\n menuItems.forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n this.sixAfterHide.emit();\n };\n\n const onAfterShow = async () => {\n if (this.hasFilterEnabled && this.autofocusFilter) {\n // if dropdown filter is enabled we should autofocus the search field\n await this.filterInputElement?.setFocus();\n }\n\n this.sixAfterShow.emit();\n };\n\n const onTransitionEnd = () => {\n if (!this.open && this.panel != null) {\n this.panel.scrollTop = 0;\n }\n };\n\n this.popover = new Popover(this.trigger, this.positioner, {\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.panel,\n onAfterHide,\n onAfterShow,\n onTransitionEnd,\n });\n }\n\n private setupFiltering(callback: () => void) {\n if (this.filterInputElement != null) {\n this.eventListeners.add(this.filterInputElement, 'six-input-input', debounce(callback, this.filterDebounce));\n }\n }\n\n private getMenuItems = (): HTMLSixMenuItemElement[] => {\n if (this.filteredOptions.length > 0) {\n return this.filteredOptions.map((option) => <six-menu-item value={option.value}>{option.label}</six-menu-item>);\n }\n if (this.panel == null) return [];\n\n const [panel] = getSlotChildren<HTMLSixMenuElement>(this.panel);\n\n // the menu-items can be in a slot e.g. in six-select or direct children of the panel\n return getSlotChildren(panel) || Array.from(panel.querySelectorAll('six-menu-item'));\n };\n\n private handleFilterInputChange = () => {\n if (this.filterInputElement == null) return;\n\n const lowerCaseFilterTerm = this.filterInputElement.value?.toLowerCase()?.trim() || '';\n\n if (this.filteredOptions.length > 0) {\n this.handleFilteringForAttributeItems(lowerCaseFilterTerm);\n } else {\n this.handleFilteringForSlotItems(lowerCaseFilterTerm);\n }\n\n this.sixAutoFilter.emit({ filterValue: lowerCaseFilterTerm });\n };\n\n private handleFilteringForAttributeItems(lowerCaseFilterTerm: string) {\n if (lowerCaseFilterTerm === '' && Array.isArray(this.options)) {\n this.filteredOptions = [...this.options];\n return;\n }\n\n this.filteredOptions = this.options.filter(\n (option) =>\n (option.label && String(option.label)?.toLowerCase()?.includes(lowerCaseFilterTerm)) ||\n (option.value && String(option.value)?.toLowerCase()?.includes(lowerCaseFilterTerm))\n );\n }\n\n private handleFilteringForSlotItems(lowerCaseFilterTerm: string) {\n const menuItems = this.getMenuItems();\n menuItems.forEach(async (menuItem) => {\n // hide all elements which don't contain the entered substring\n const elementContainsFilterTerm =\n menuItem?.value?.toLowerCase()?.includes(lowerCaseFilterTerm) ||\n (await menuItem?.getTextLabel())?.toLowerCase()?.includes(lowerCaseFilterTerm);\n\n menuItem.style.display = elementContainsFilterTerm ? 'unset' : 'none';\n });\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n\n void this.hide();\n this.popover?.destroy();\n this.popover = undefined;\n }\n\n /** Shows the dropdown panel */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.popover == null || this.panel == null) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = true;\n this.open = true;\n this.popover.show();\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.panel == null || this.popover == 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.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n private focusOnTrigger() {\n if (this.trigger == null) return;\n const [trigger] = getSlotChildren<HTMLSixButtonElement>(this.trigger);\n if (trigger != null) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n private getMenu(): HTMLSixMenuElement | undefined {\n if (this.panel == null) return;\n return getSlotChildren<HTMLSixMenuElement>(this.panel).filter(isSixMenu).at(0);\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n @Method()\n async reposition() {\n if (!this.open || this.popover == null) {\n return;\n }\n this.popover.reposition();\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (keyboardEvent.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot?.activeElement) {\n if (keyboardEvent.key === 'ArrowDown') {\n const item = this.getMenuItems().find((item) => item.style.display !== 'none');\n if (item != null) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement != null && isSixMenuItem(document.activeElement)) {\n keyboardEvent.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.container.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (activeElement?.closest(this.container.tagName.toLowerCase()) !== this.container) {\n void this.hide();\n return;\n }\n });\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 void this.hide();\n return;\n }\n };\n\n private handlePanelSelect = (event: Event) => {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (this.closeOnSelect && isSixMenu(target)) {\n void this.hide();\n this.focusOnTrigger();\n }\n };\n\n private handleTriggerClick = () => {\n this.open ? this.hide() : this.show();\n };\n\n private handleTriggerKeyDown = (event: KeyboardEvent) => {\n // Close when escape or tab is pressed\n if (event.key === 'Escape') {\n this.focusOnTrigger();\n void this.hide();\n return;\n }\n\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {\n event.preventDefault();\n this.open ? void this.hide() : void this.show();\n return;\n }\n\n const menu = this.getMenu();\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n void this.show();\n }\n\n if (menu == null) {\n return;\n }\n const menuItems = [...menu.querySelectorAll('six-menu-item')];\n const firstMenuItem = menuItems.at(0);\n const lastMenuItem = menuItems.at(menuItems.length - 1);\n\n // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem != null) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem != null) {\n lastMenuItem.setFocus();\n return;\n }\n }\n\n // Other keys bring focus to the menu and initiate type-to-select behavior\n const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];\n if (this.open && menu != null && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n };\n\n private handleTriggerKeyUp = (event: KeyboardEvent) => {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n };\n\n private handleTriggerSlotChange = () => {\n this.updateAccessibleTrigger();\n };\n\n private handleDropdownScroll = () => {\n if (this.panel == null) return;\n\n this.sixScroll.emit({\n scrollHeight: this.panel.scrollHeight,\n scrollTop: this.panel.scrollTop,\n scrollbarHeight: this.panel.offsetHeight * (this.panel.offsetHeight / this.panel.scrollHeight),\n scrollRatio: this.panel.scrollTop / (this.panel.scrollHeight - this.panel.clientHeight),\n });\n };\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n private updateAccessibleTrigger() {\n if (this.trigger == null) return;\n\n const accessibleTrigger = getSlotChildren(this.trigger).map(getNearestTabbableElement).at(0);\n if (accessibleTrigger != null) {\n accessibleTrigger.setAttribute('aria-haspopup', 'true');\n accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n id={this.componentId}\n class={{\n dropdown: true,\n 'dropdown--open': this.open,\n }}\n >\n <span\n part=\"trigger\"\n class=\"dropdown__trigger\"\n ref={(el) => (this.trigger = el)}\n onClick={this.handleTriggerClick}\n onKeyDown={this.handleTriggerKeyDown}\n onKeyUp={this.handleTriggerKeyUp}\n >\n <slot name=\"trigger\" onSlotchange={this.handleTriggerSlotChange} />\n </span>\n\n {/* Position the panel with a wrapper since the popover makes use of `translate`. This let's us add transitions\n on the panel without interfering with the position. */}\n <div\n ref={(el) => (this.positioner = el)}\n class={{\n dropdown__positioner: true,\n dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,\n }}\n >\n {this.hasFilterEnabled && (\n <six-input\n class={{\n 'filter-hidden': !this.open,\n }}\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\n />\n )}\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dropdown__panel\"\n role=\"menu\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-labelledby={this.componentId}\n onScroll={this.handleDropdownScroll}\n >\n <slot />\n {this.filteredOptions.length > 0 && (\n <six-menu part=\"menu\" items={this.filteredOptions} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-dropdown2.js","mappings":";;;;;;;;;;;SAAgB,UAAU,CAAC,EAAe;IACxC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC7B,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC;AACvB,CAAC;SAEe,yBAAyB,CAAC,EAAe;;IAEvD,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE;QAClB,OAAO,EAAE,CAAC;KACX;;IAGD,IAAI,EAAE,CAAC,UAAU,IAAI,IAAI,EAAE;QACzB,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAgB,CAAC,CAAgB,CAAC;QACjH,IAAI,mBAAmB,IAAI,IAAI,EAAE;YAC/B,OAAO,mBAAmB,CAAC;SAC5B;KACF;;IAGD,IAAI,EAAE,CAAC,QAAQ,IAAI,IAAI,EAAE;QACvB,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,yBAAyB,CAAC,CAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvF;IAED,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CAClG,CACG,EACN,6DAAM,IAAI,EAAC,iBAAiB,GAAQ,CAChC,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,SAAS,SAAS,CAAC,EAAY;IAC7B,OAAO,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,CAAC,WAAW,EAAE,MAAK,UAAU,CAAC;AAClD,CAAC;AACD,SAAS,aAAa,CAAC,EAAY;IACjC,OAAO,CAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,OAAO,CAAC,WAAW,EAAE,MAAK,eAAe,CAAC;AACvD,CAAC;AACD,SAAS,oBAAoB,CAAC,EAAY;;IACxC,OAAO,CAAA,MAAA,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,YAAY,CAAC,OAAO,CAAC,0CAAE,QAAQ,CAAC,qBAAqB,CAAC,KAAI,KAAK,CAAC;AAC7E,CAAC;AACD,eAAe,kBAAkB,CAAC,QAAgC,EAAE,mBAA2B;IAC7F,QACE,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC1D,CAAC,MAAM,QAAQ,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAC3E;AACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/tabbable.ts","src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","src/components/six-dropdown/six-dropdown.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement | undefined {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot != null) {\n const tabbableShadowChild = [...el.shadowRoot.children].find((e) => isTabbable(e as HTMLElement)) as HTMLElement;\n if (tabbableShadowChild != null) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children != null) {\n return [...el.children].map((e) => getNearestTabbableElement(e as HTMLElement)).at(0);\n }\n\n return undefined;\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: inline-block;\n}\n\n.dropdown {\n position: relative;\n}\n\n.dropdown__trigger {\n display: block;\n}\n\n.dropdown__positioner {\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n\n &__filtered {\n width: 100%;\n }\n}\n\n.dropdown__panel {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n color: var(--color);\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n border: 1px solid var(--six-color-web-rock-300);\n box-shadow: var(--six-shadow-small);\n opacity: 0;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n max-width: 90vw;\n}\n\n.dropdown__panel__scroll {\n max-height: 18.75rem;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: none;\n\n &--virtual {\n overflow-y: hidden;\n overflow-x: hidden;\n }\n}\n\n.filter-hidden {\n display: none;\n}\n\n.dropdown__positioner {\n &[data-popper-placement^='top'] .dropdown__panel {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .dropdown__panel {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .dropdown__panel {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .dropdown__panel {\n transform-origin: left;\n }\n\n &.popover-visible .dropdown__panel {\n opacity: 1;\n transform: none;\n pointer-events: all;\n }\n}\n\n.filter {\n border-bottom: 1px solid var(--six-color-web-rock-300);\n\n &__icon {\n color: var(--six-color-web-rock-600);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixMenuItemData } from '../six-menu/six-menu';\n\nexport interface SixDropdownAutoFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownAsyncFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownScrollPayload {\n scrollHeight: number;\n scrollTop: number;\n scrollbarHeight: number;\n scrollRatio: number;\n}\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 trigger - The dropdown's trigger, usually a `<six-button>` element.\n * @slot dropdown-footer - The dropdown's footer area.\n * @slot - The dropdown's content.\n *\n * @part base - The component's base wrapper.\n * @part trigger - The container that wraps the trigger.\n * @part panel - The panel that gets shown when the dropdown is open.\n */\n\n@Component({\n tag: 'six-dropdown',\n styleUrl: 'six-dropdown.scss',\n shadow: true,\n})\nexport class SixDropdown {\n private componentId = `dropdown-${++id}`;\n private isVisible = false;\n private panel?: HTMLElement;\n private scrollPanel?: HTMLElement;\n private panelSlot?: HTMLSlotElement;\n private positioner?: HTMLElement;\n private popover?: Popover;\n private trigger?: HTMLElement;\n private triggerSlot?: HTMLSlotElement;\n private resizeObserver = new ResizeObserver(debounce(() => this.updatePanelPosition(), 100));\n\n // the input element shown in the dropdown when filter is set to true\n private filterInputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixDropdownElement;\n\n /** Indicates whether the dropdown 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 preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Determines whether the dropdown should hide when a menu item is selected. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 4;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @Prop() skidding = 0;\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 /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /**\n * Set to true to allow auto filtering for entries in the dropdown.\n * With this flag the dropdown will automatically filter itsel.\n * If you need to coordinate the shown elements yourself,\n * e.g. because you need to call an endpoint use asyncFilter instead\n */\n @Prop() filter = false;\n\n /**\n * Set to true to allow async filtering.\n * When you enter something in the search field the component will only emit an event but not filter any elements itself.\n * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself\n */\n @Prop() asyncFilter = false;\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder = 'Filter...';\n\n /** By default the search field will be focused when opening a dropdown with filtering enabled. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autofocusFilter = true;\n\n get filterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop({ mutable: true }) filterDebounce = 0;\n\n /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */\n @Prop() disableHideOnEnterAndSpace = false;\n\n /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/\n @Prop({ mutable: true }) options: SixMenuItemData[] = [];\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Determines if the dropdown panel's width should match the width of the trigger element.\n *\n * If set to `true`, the panel will resize its width to align with the trigger's width.\n * If `false` or omitted, the panel will maintain its default width.\n */\n @Prop() matchTriggerWidth = false;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n /** Emitted when the dropdown opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dropdown-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown opens and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dropdown closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dropdown-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown closes and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the auto filter is triggered */\n @Event({ eventName: 'six-dropdown-auto-filter-fired' }) sixAutoFilter!: EventEmitter<SixDropdownAutoFilterPayload>;\n\n /** Emitted when the async filter is triggered */\n @Event({ eventName: 'six-async-filter-fired' }) sixAsyncFilterFired!: EventEmitter<SixDropdownAsyncFilterPayload>;\n\n /** Emitted when the user scrolls inside dropdown panel.*/\n @Event({ eventName: 'six-dropdown-scroll' }) sixScroll!: EventEmitter<SixDropdownScrollPayload>;\n\n private eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State() renderedOptions: SixMenuItemData[] = [];\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n this.updateAccessibleTrigger();\n }\n\n @Watch('distance')\n @Watch('hoist')\n @Watch('placement')\n @Watch('skidding')\n handlePopoverOptionsChange() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n });\n }\n\n @Watch('options')\n @Watch('virtualScroll')\n handleOptionsChange() {\n this.validateOptions();\n }\n\n private validateOptions() {\n if (!Array.isArray(this.options)) {\n this.options = [];\n }\n if (this.virtualScroll && this.options.length === 0) {\n console.error('Options must be defined when using virtual scrolling');\n }\n this.renderedOptions = [...this.options];\n }\n\n componentWillLoad() {\n this.validateOptions();\n if (this.asyncFilter) {\n this.filterDebounce = DEFAULT_DEBOUNCE_FAST;\n }\n }\n\n componentDidLoad() {\n this.init();\n if (this.open) {\n void this.show();\n }\n }\n\n connectedCallback() {\n this.init();\n }\n\n private init() {\n this.initPopover();\n\n // listen to filter\n const filterInputElement = this.filterInputElement;\n if (filterInputElement != null) {\n this.eventListeners.add(\n filterInputElement,\n 'six-input-input',\n debounce(() => {\n const filterValue = filterInputElement.value ?? '';\n if (this.filter) {\n this.applyFilter(filterValue);\n }\n this.emitFilterEvents(filterValue);\n }, this.filterDebounce)\n );\n }\n }\n\n private applyFilter(filterTerm: string) {\n const lowerCaseFilterTerm = filterTerm.toLowerCase()?.trim() || '';\n if (this.options.length > 0) {\n this.renderedOptions = this.options.filter(\n (option) =>\n (option.label && String(option.label)?.toLowerCase()?.includes(lowerCaseFilterTerm)) ||\n (option.value && String(option.value)?.toLowerCase()?.includes(lowerCaseFilterTerm))\n );\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n const selectionContainerValues = selectionContainerItems.map((s) => s.value);\n\n // Filter items in selection container\n selectionContainerItems.forEach(async (menuItem) => {\n menuItem.style.display = (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) ? 'unset' : 'none';\n });\n\n // Filter other items. Always hide items which contained in the selection container.\n sixMenuItems.forEach(async (menuItem) => {\n menuItem.style.display =\n (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) &&\n !selectionContainerValues.includes(menuItem.value)\n ? 'unset'\n : 'none';\n });\n }\n }\n\n private resetFilter() {\n if (this.filterInputElement != null) {\n this.filterInputElement.value = '';\n this.emitFilterEvents('');\n }\n if (this.options.length > 0) {\n this.renderedOptions = [...this.options];\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n [...selectionContainerItems, ...sixMenuItems].forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n private emitFilterEvents(filterValue: string) {\n if (this.filter) {\n this.sixAutoFilter.emit({ filterValue });\n } else if (this.asyncFilter) {\n this.sixAsyncFilterFired.emit({ filterValue });\n }\n }\n\n private initPopover() {\n if (this.trigger == null || this.positioner == null) return;\n this.popover = new Popover(this.trigger, this.positioner, {\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.panel,\n onAfterHide: () => {\n if (this.filterEnabled) {\n this.resetFilter();\n }\n this.sixAfterHide.emit();\n },\n onAfterShow: async () => {\n this.sixAfterShow.emit();\n },\n onTransitionEnd: () => {\n if (!this.open && this.scrollPanel != null) {\n this.scrollPanel.scrollTop = 0;\n }\n },\n });\n }\n\n private getMenuItems = (): {\n selectionContainerItems: HTMLSixMenuItemElement[];\n sixMenuItems: HTMLSixMenuItemElement[];\n } => {\n if (this.options.length > 0) {\n return {\n sixMenuItems: this.renderedOptions.map((option) => (\n <six-menu-item value={option.value}>{option.label}</six-menu-item>\n )),\n selectionContainerItems: [],\n };\n }\n if (this.panel == null) return { sixMenuItems: [], selectionContainerItems: [] };\n\n // Relies on the implementation of six-select. Its dropdown slot contains two elements,\n // one for the selected menu items, and one for the other items.\n const selectionContainer = this.panelSlot?.assignedElements({ flatten: true }).filter(isSelectionContainer).at(0);\n const sixMenuElement = this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n const selectionContainerItems = selectionContainer?.querySelectorAll('six-menu-item') || [];\n let sixMenuItems: HTMLSixMenuItemElement[] =\n sixMenuElement\n ?.querySelector('slot')\n ?.assignedElements()\n .filter((el): el is HTMLSixMenuItemElement => isSixMenuItem(el)) || [];\n\n if (sixMenuItems.length === 0) {\n sixMenuItems = Array.from(sixMenuElement?.shadowRoot?.querySelectorAll('six-menu-item') || []);\n }\n\n if (selectionContainerItems.length > 0 || sixMenuItems.length > 0) {\n return { sixMenuItems, selectionContainerItems: [...selectionContainerItems] };\n } else {\n return {\n sixMenuItems: sixMenuElement ? Array.from(sixMenuElement.querySelectorAll('six-menu-item')) : [],\n selectionContainerItems: [],\n };\n }\n };\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n this.eventListeners.removeAll();\n void this.hide();\n this.popover?.destroy();\n this.popover = undefined;\n }\n\n /** Shows the dropdown panel */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.popover == null || this.panel == null) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = true;\n this.open = true;\n\n if (this.trigger != null) {\n this.resizeObserver.observe(this.trigger);\n }\n this.updatePanelPosition();\n this.popover.show();\n\n if (this.filterEnabled && this.autofocusFilter) {\n requestAnimationFrame(() => {\n this.filterInputElement?.setFocus();\n });\n }\n }\n\n /**\n * Set min width of dropdown panel to the width of the trigger element\n */\n private updatePanelPosition() {\n if (!this.open) {\n return;\n }\n\n if (this.matchTriggerWidth && this.trigger != null && this.panel != null) {\n const width = this.trigger.getBoundingClientRect().width;\n this.panel.style.minWidth = `${width}px`;\n }\n\n if (this.popover != null) {\n this.popover.reposition();\n }\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n this.resizeObserver.disconnect();\n\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.panel == null || this.popover == 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.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n private focusOnTrigger() {\n if (this.trigger == null) return;\n const trigger = this.triggerSlot?.assignedElements({ flatten: true }).at(0) as HTMLSixButtonElement | undefined;\n if (trigger != null) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n private getMenu(): HTMLSixMenuElement | undefined {\n return this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n *\n * @deprecated: use the property `matchTriggerWidth` instead.\n */\n @Method()\n async reposition() {\n if (this.open && this.popover != null) {\n this.popover.reposition();\n }\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (keyboardEvent.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot?.activeElement) {\n if (keyboardEvent.key === 'ArrowDown') {\n const { sixMenuItems, selectionContainerItems } = this.getMenuItems();\n const item = [...selectionContainerItems, ...sixMenuItems].find((item) => item.style.display !== 'none');\n if (item != null) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement != null && isSixMenuItem(document.activeElement)) {\n keyboardEvent.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.container.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (activeElement?.closest(this.container.tagName.toLowerCase()) !== this.container) {\n void this.hide();\n return;\n }\n });\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 void this.hide();\n return;\n }\n };\n\n private handlePanelSelect = (event: Event) => {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (this.closeOnSelect && isSixMenu(target)) {\n void this.hide();\n this.focusOnTrigger();\n }\n };\n\n private handleTriggerClick = () => {\n this.open ? this.hide() : this.show();\n };\n\n private handleTriggerKeyDown = (event: KeyboardEvent) => {\n // Close when escape or tab is pressed\n if (event.key === 'Escape') {\n this.focusOnTrigger();\n void this.hide();\n return;\n }\n\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {\n event.preventDefault();\n this.open ? void this.hide() : void this.show();\n return;\n }\n\n const menu = this.getMenu();\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n void this.show();\n }\n\n if (menu == null) {\n return;\n }\n const menuItems = [...menu.querySelectorAll('six-menu-item')];\n const firstMenuItem = menuItems.at(0);\n const lastMenuItem = menuItems.at(menuItems.length - 1);\n\n // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem != null) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem != null) {\n lastMenuItem.setFocus();\n return;\n }\n }\n\n // Other keys bring focus to the menu and initiate type-to-select behavior\n const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];\n if (this.open && menu != null && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n };\n\n private handleTriggerKeyUp = (event: KeyboardEvent) => {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n };\n\n private handleTriggerSlotChange = () => {\n this.updateAccessibleTrigger();\n };\n\n private handleDropdownScroll = () => {\n if (this.scrollPanel == null) return;\n\n this.sixScroll.emit({\n scrollHeight: this.scrollPanel.scrollHeight,\n scrollTop: this.scrollPanel.scrollTop,\n scrollbarHeight: this.scrollPanel.offsetHeight * (this.scrollPanel.offsetHeight / this.scrollPanel.scrollHeight),\n scrollRatio: this.scrollPanel.scrollTop / (this.scrollPanel.scrollHeight - this.scrollPanel.clientHeight),\n });\n };\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n private updateAccessibleTrigger() {\n if (this.trigger == null) return;\n const assignedElements = (this.triggerSlot?.assignedElements({ flatten: true }) || []) as HTMLElement[];\n const accessibleTrigger = assignedElements.map(getNearestTabbableElement).at(0);\n if (accessibleTrigger != null) {\n accessibleTrigger.setAttribute('aria-haspopup', 'true');\n accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n id={this.componentId}\n class={{\n dropdown: true,\n 'dropdown--open': this.open,\n }}\n >\n <span\n part=\"trigger\"\n class=\"dropdown__trigger\"\n ref={(el) => (this.trigger = el)}\n onClick={this.handleTriggerClick}\n onKeyDown={this.handleTriggerKeyDown}\n onKeyUp={this.handleTriggerKeyUp}\n >\n <slot\n name=\"trigger\"\n ref={(el) => (this.triggerSlot = el as HTMLSlotElement)}\n onSlotchange={this.handleTriggerSlotChange}\n />\n </span>\n\n {/* Position the panel with a wrapper since the popover makes use of `translate`. This let's us add transitions\n on the panel without interfering with the position. */}\n <div\n ref={(el) => (this.positioner = el)}\n class={{\n dropdown__positioner: true,\n dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,\n }}\n >\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dropdown__panel\"\n role=\"menu\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-labelledby={this.componentId}\n >\n {this.filterEnabled && (\n <six-input\n class={{\n filter: true,\n 'filter-hidden': !this.open,\n }}\n dropdown-search\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\n >\n <six-icon class=\"filter__icon\" slot=\"suffix\" size=\"small\">\n search\n </six-icon>\n </six-input>\n )}\n <div\n class={{\n dropdown__panel__scroll: true,\n 'dropdown__panel__scroll--virtual': this.virtualScroll,\n }}\n onScroll={this.handleDropdownScroll}\n ref={(el) => (this.scrollPanel = el)}\n >\n <slot ref={(el) => (this.panelSlot = el as HTMLSlotElement)} />\n {this.options.length > 0 && (\n <six-menu part=\"menu\" items={this.renderedOptions} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n <slot name=\"dropdown-footer\"></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n\nfunction isSixMenu(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu';\n}\nfunction isSixMenuItem(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu-item';\n}\nfunction isSelectionContainer(el?: Element): boolean {\n return el?.getAttribute('class')?.includes('selection-container') || false;\n}\nasync function containsFilterTerm(menuItem: HTMLSixMenuItemElement, lowerCaseFilterTerm: string): Promise<boolean> {\n return (\n menuItem.value.toLowerCase().includes(lowerCaseFilterTerm) ||\n (await menuItem.getTextLabel()).toLowerCase().includes(lowerCaseFilterTerm)\n );\n}\n"],"version":3}
@@ -2,6 +2,7 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/clien
2
2
  import { d as defineCustomElement$2 } from './six-picto2.js';
3
3
 
4
4
  const sixErrorPageCss = ".six-error-page__title{display:flex;justify-content:center;font-size:var(--six-font-size-xx-large);font-weight:bold;margin-bottom:var(--six-spacing-large)}.six-error-page__description>*{text-align:center}.six-error-page__icon-container{display:flex;justify-content:center}.six-error-page__icon::part(icon){background-color:var(--six-color-web-rock-300)}";
5
+ const SixErrorPageStyle0 = sixErrorPageCss;
5
6
 
6
7
  const TITLE_PER_ERROR_CODE = {
7
8
  403: {
@@ -95,9 +96,9 @@ const SixErrorPage$1 = /*@__PURE__*/ proxyCustomElement(class SixErrorPage exten
95
96
  return DESCRIPTION_PER_ERROR_CODE[this.errorCode][this.language];
96
97
  }
97
98
  render() {
98
- return (h("div", { part: "container" }, h("div", { class: "six-error-page__icon-container", part: "icon-container" }, h("six-picto", { size: "4xl", class: "six-error-page__icon", part: "icon" }, this.getIconName())), h("div", { class: "six-error-page__title", part: "title" }, this.getErrorTitle()), h("div", { class: "six-error-page__description", part: "description" }, this.getErrorDescription())));
99
+ return (h("div", { key: '480b7593df8c54c64e63fb4218d8f9ab41cc1e0a', part: "container" }, h("div", { key: '9842ad416849c357952fb90009a8311058e803e4', class: "six-error-page__icon-container", part: "icon-container" }, h("six-picto", { key: 'd4ff368cbab362f49baa76217bf0bef0ce4d77c9', size: "4xl", class: "six-error-page__icon", part: "icon" }, this.getIconName())), h("div", { key: '270eabc20c8974d788b10ccf144204db5bad0d75', class: "six-error-page__title", part: "title" }, this.getErrorTitle()), h("div", { key: 'e005a5ef17a1ec204a6b1704568ba19993c774a9', class: "six-error-page__description", part: "description" }, this.getErrorDescription())));
99
100
  }
100
- static get style() { return sixErrorPageCss; }
101
+ static get style() { return SixErrorPageStyle0; }
101
102
  }, [1, "six-error-page", {
102
103
  "errorCode": [2, "error-code"],
103
104
  "language": [1],
@@ -1 +1 @@
1
- {"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orPage"],"sources":["src/components/six-error-page/six-error-page.scss?tag=six-error-page&encapsulation=shadow","src/components/six-error-page/six-error-page.tsx"],"sourcesContent":[".six-error-page {\n &__title {\n display: flex;\n justify-content: center;\n font-size: var(--six-font-size-xx-large);\n font-weight: bold;\n margin-bottom: var(--six-spacing-large);\n }\n\n &__description {\n & > * {\n text-align: center;\n }\n }\n\n &__icon-container {\n display: flex;\n justify-content: center;\n }\n\n &__icon::part(icon) {\n background-color: var(--six-color-web-rock-300);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\ntype ErrorCode = 403 | 404 | 500;\n\nconst TITLE_PER_ERROR_CODE: Record<\n ErrorCode,\n {\n en: string;\n de: string;\n }\n> = {\n 403: {\n en: 'Access Denied',\n de: 'Kein Zugriff',\n },\n 404: {\n en: 'Not Found',\n de: 'Seite nicht gefunden',\n },\n 500: {\n en: 'Ooops!',\n de: 'Ups!',\n },\n};\n\nconst DESCRIPTION_PER_ERROR_CODE: Record<ErrorCode, { en: string[]; de: string[] }> = {\n 403: {\n en: [\n 'You don’t have permission to access this page. ',\n 'Please contact an administrator or click the SIX logo on top left.',\n ],\n de: [\n 'Sie haben keine Zugriffsberechtigung auf diese Seite.',\n 'Bitte wenden Sie sich an einen Administrator oder klicken Sie auf das SIX-Logo oben links.',\n ],\n },\n 404: {\n en: ['We have not found the page you requested.', 'Please click the SIX logo on top left.'],\n de: ['Wir haben die angeforderte Seite nicht gefunden.', 'Bitte klicken Sie auf das SIX-Logo oben links.'],\n },\n 500: {\n en: ['Sorry, we messed up! We try to fix this.', 'Please click the SIX logo on top left.'],\n de: [\n 'Sorry, das war unser Fehler! Wir versuchen das zu beheben.',\n 'Bitte klicken Sie auf das SIX-Logo oben links.',\n ],\n },\n};\n/*\n * @since 2.2.0\n * @status experimental\n * @part container - The whole component container\n * @part label - The language label\n * @part separator - The separator between the language labels\n */\n\n@Component({\n tag: 'six-error-page',\n styleUrl: 'six-error-page.scss',\n shadow: true,\n})\nexport class SixErrorPage {\n /**\n * Defines error Code and thus displays the proper error page.\n */\n @Prop() errorCode?: 404 | 403 | 500;\n\n /**\n * Defines language and thus displays the proper error page in the selected language.\n */\n @Prop() language: 'en' | 'de' = 'en';\n\n /**\n * Defines a custom title.\n */\n @Prop() customTitle?: string;\n\n /**\n * Defines a custom description.\n */\n @Prop() customDescription?: string[];\n\n /**\n * Defines a custom icon.\n */\n @Prop() customIcon?: string;\n\n private getIconName() {\n if (this.customIcon != null) {\n return this.customIcon;\n }\n\n if (this.errorCode == null) {\n return;\n }\n\n if (this.errorCode === 403) {\n return 'lock';\n }\n\n if (this.errorCode === 404) {\n return 'find-in-page';\n }\n\n if (this.errorCode === 500) {\n return 'sentiment-dissatisfied';\n }\n }\n\n private getErrorTitle(): string | undefined {\n if (this.customTitle != null) {\n return this.customTitle;\n }\n\n if (this.errorCode == null) {\n return;\n }\n\n return TITLE_PER_ERROR_CODE[this.errorCode][this.language];\n }\n\n private getErrorDescription() {\n if (this.errorCode == null && this.customDescription == null) {\n return;\n }\n\n const descriptions = this.getDescriptions() ?? [];\n return descriptions.map((errorMessage) => <div>{errorMessage}</div>);\n }\n\n private getDescriptions() {\n if (this.customDescription !== undefined) {\n return this.customDescription;\n }\n\n if (this.errorCode == null) {\n return;\n }\n\n return DESCRIPTION_PER_ERROR_CODE[this.errorCode][this.language];\n }\n\n render() {\n return (\n <div part=\"container\">\n <div class=\"six-error-page__icon-container\" part=\"icon-container\">\n <six-picto size=\"4xl\" class=\"six-error-page__icon\" part=\"icon\">\n {this.getIconName()}\n </six-picto>\n </div>\n <div class=\"six-error-page__title\" part=\"title\">\n {this.getErrorTitle()}\n </div>\n <div class=\"six-error-page__description\" part=\"description\">\n {this.getErrorDescription()}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-error-page.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,mWAAmW,CAAC;AAC5X,2BAAe,eAAe;;ACG9B,MAAM,oBAAoB,GAMtB;IACF,GAAG,EAAE;Q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AAO;SACR;QAED,OAAO,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC5D;IAEO,mBAAmB;;QACzB,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,EAAE;YAC5D,OAAO;SACR;QAED,MAAM,YAAY,GAAG,MAAA,IAAI,CAAC,eAAe,EAAE,mCAAI,EAAE,CAAC;QAClD,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,YAAY,KAAK,eAAM,YAAY,CAAO,CAAC,CAAC;KACtE;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;YACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC;SAC/B;QAED,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YAC1B,OAAO;SACR;QAED,OAAO,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAClE;IAED,MAAM;QACJ,QACE,4DAAK,IAAI,EAAC,WAAW,IACnB,4DAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,gBAAgB,IAC/D,kEAAW,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,MAAM,IAC3D,IAAI,CAAC,WAAW,EAAE,CACT,CACR,EACN,4DAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,IAC5C,IAAI,CAAC,aAAa,EAAE,CACjB,EACN,4DAAK,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,aAAa,IACxD,IAAI,CAAC,mBAAmB,EAAE,CACvB,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixErrorPage"],"sources":["src/components/six-error-page/six-error-page.scss?tag=six-error-page&encapsulation=shadow","src/components/six-error-page/six-error-page.tsx"],"sourcesContent":[".six-error-page {\n &__title {\n display: flex;\n justify-content: center;\n font-size: var(--six-font-size-xx-large);\n font-weight: bold;\n margin-bottom: var(--six-spacing-large);\n }\n\n &__description {\n & > * {\n text-align: center;\n }\n }\n\n &__icon-container {\n display: flex;\n justify-content: center;\n }\n\n &__icon::part(icon) {\n background-color: var(--six-color-web-rock-300);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\ntype ErrorCode = 403 | 404 | 500;\n\nconst TITLE_PER_ERROR_CODE: Record<\n ErrorCode,\n {\n en: string;\n de: string;\n }\n> = {\n 403: {\n en: 'Access Denied',\n de: 'Kein Zugriff',\n },\n 404: {\n en: 'Not Found',\n de: 'Seite nicht gefunden',\n },\n 500: {\n en: 'Ooops!',\n de: 'Ups!',\n },\n};\n\nconst DESCRIPTION_PER_ERROR_CODE: Record<ErrorCode, { en: string[]; de: string[] }> = {\n 403: {\n en: [\n 'You don’t have permission to access this page. ',\n 'Please contact an administrator or click the SIX logo on top left.',\n ],\n de: [\n 'Sie haben keine Zugriffsberechtigung auf diese Seite.',\n 'Bitte wenden Sie sich an einen Administrator oder klicken Sie auf das SIX-Logo oben links.',\n ],\n },\n 404: {\n en: ['We have not found the page you requested.', 'Please click the SIX logo on top left.'],\n de: ['Wir haben die angeforderte Seite nicht gefunden.', 'Bitte klicken Sie auf das SIX-Logo oben links.'],\n },\n 500: {\n en: ['Sorry, we messed up! We try to fix this.', 'Please click the SIX logo on top left.'],\n de: [\n 'Sorry, das war unser Fehler! Wir versuchen das zu beheben.',\n 'Bitte klicken Sie auf das SIX-Logo oben links.',\n ],\n },\n};\n/*\n * @since 2.2.0\n * @status experimental\n * @part container - The whole component container\n * @part label - The language label\n * @part separator - The separator between the language labels\n */\n\n@Component({\n tag: 'six-error-page',\n styleUrl: 'six-error-page.scss',\n shadow: true,\n})\nexport class SixErrorPage {\n /**\n * Defines error Code and thus displays the proper error page.\n */\n @Prop() errorCode?: 404 | 403 | 500;\n\n /**\n * Defines language and thus displays the proper error page in the selected language.\n */\n @Prop() language: 'en' | 'de' = 'en';\n\n /**\n * Defines a custom title.\n */\n @Prop() customTitle?: string;\n\n /**\n * Defines a custom description.\n */\n @Prop() customDescription?: string[];\n\n /**\n * Defines a custom icon.\n */\n @Prop() customIcon?: string;\n\n private getIconName() {\n if (this.customIcon != null) {\n return this.customIcon;\n }\n\n if (this.errorCode == null) {\n return;\n }\n\n if (this.errorCode === 403) {\n return 'lock';\n }\n\n if (this.errorCode === 404) {\n return 'find-in-page';\n }\n\n if (this.errorCode === 500) {\n return 'sentiment-dissatisfied';\n }\n }\n\n private getErrorTitle(): string | undefined {\n if (this.customTitle != null) {\n return this.customTitle;\n }\n\n if (this.errorCode == null) {\n return;\n }\n\n return TITLE_PER_ERROR_CODE[this.errorCode][this.language];\n }\n\n private getErrorDescription() {\n if (this.errorCode == null && this.customDescription == null) {\n return;\n }\n\n const descriptions = this.getDescriptions() ?? [];\n return descriptions.map((errorMessage) => <div>{errorMessage}</div>);\n }\n\n private getDescriptions() {\n if (this.customDescription !== undefined) {\n return this.customDescription;\n }\n\n if (this.errorCode == null) {\n return;\n }\n\n return DESCRIPTION_PER_ERROR_CODE[this.errorCode][this.language];\n }\n\n render() {\n return (\n <div part=\"container\">\n <div class=\"six-error-page__icon-container\" part=\"icon-container\">\n <six-picto size=\"4xl\" class=\"six-error-page__icon\" part=\"icon\">\n {this.getIconName()}\n </six-picto>\n </div>\n <div class=\"six-error-page__title\" part=\"title\">\n {this.getErrorTitle()}\n </div>\n <div class=\"six-error-page__description\" part=\"description\">\n {this.getErrorDescription()}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
 
3
3
  const sixErrorCss = ".six-error-container{text-align:left;color:var(--six-color-danger-800);width:100%}";
4
+ const SixErrorStyle0 = sixErrorCss;
4
5
 
5
6
  const SixError = /*@__PURE__*/ proxyCustomElement(class SixError extends HTMLElement {
6
7
  constructor() {
@@ -9,9 +10,9 @@ const SixError = /*@__PURE__*/ proxyCustomElement(class SixError extends HTMLEle
9
10
  this.__attachShadow();
10
11
  }
11
12
  render() {
12
- return (h("div", { class: "six-error-container" }, h("slot", null)));
13
+ return (h("div", { key: 'cb030d06c5672995c6c8077eebe7ec6e605bfbec', class: "six-error-container" }, h("slot", { key: 'eec715b6c3f8933ffce58f37dedc73c7e006c14b' })));
13
14
  }
14
- static get style() { return sixErrorCss; }
15
+ static get style() { return SixErrorStyle0; }
15
16
  }, [1, "six-error"]);
16
17
  function defineCustomElement() {
17
18
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"six-error2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,oFAAoF;;MCc3F,QAAQ;;;;;;IACnB,MAAM;QACJ,QACE,WAAK,KAAK,EAAC,qBAAqB,IAC9B,eAAQ,CACJ,EACN;KACH;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-error/six-error.scss?tag=six-error&encapsulation=shadow","src/components/six-error/six-error.tsx"],"sourcesContent":[".six-error-container {\n text-align: left;\n color: var(--six-color-danger-800);\n width: 100%;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 4.0\n * @status beta\n *\n * @slot default - The error's message content\n */\n\n@Component({\n tag: 'six-error',\n styleUrl: 'six-error.scss',\n shadow: true,\n})\nexport class SixError {\n render() {\n return (\n <div class=\"six-error-container\">\n <slot />\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-error2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,oFAAoF,CAAC;AACzG,uBAAe,WAAW;;MCab,QAAQ;;;;;;IACnB,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,8DAAQ,CACJ,EACN;KACH;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-error/six-error.scss?tag=six-error&encapsulation=shadow","src/components/six-error/six-error.tsx"],"sourcesContent":[".six-error-container {\n text-align: left;\n color: var(--six-color-danger-800);\n width: 100%;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 4.0\n * @status beta\n *\n * @slot default - The error's message content\n */\n\n@Component({\n tag: 'six-error',\n styleUrl: 'six-error.scss',\n shadow: true,\n})\nexport class SixError {\n render() {\n return (\n <div class=\"six-error-container\">\n <slot />\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,8 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$2 } from './six-icon2.js';
3
3
 
4
- const sixFileListItemCss = ".six-files-list-item{padding-bottom:0.5rem}.six-files-list-item__name{color:var(--six-color-action-600);cursor:pointer}.six-files-list-item__name--disabled{cursor:inherit;color:var(--six-color-web-rock-500)}.six-files-list-item__name:hover:not(.six-files-list-item__name--disabled){color:var(--six-color-action-500)}.six-files-list-item__date{padding-left:1rem;color:var(--six-color-web-rock-600)}.six-files-list-item__size{padding-left:1rem;color:var(--six-color-web-rock-600)}.six-files-list-item__icon{padding-left:0.5rem;display:inline-block;transform:translateY(-1px);cursor:pointer;color:var(--six-color-web-rock-600)}.six-files-list-item__icon--disabled{cursor:not-allowed;color:var(--six-color-web-rock-500)}.six-files-list-item__icon:hover:not(.six-files-list-item__icon--disabled){color:var(--six-color-web-rock-900)}";
4
+ const sixFileListItemCss = ".six-files-list-item{padding-bottom:0.5rem}.six-files-list-item__name{color:var(--six-color-action-600);cursor:pointer}.six-files-list-item__name--disabled{cursor:inherit;color:var(--six-color-web-rock-500)}.six-files-list-item__name:hover:not(.six-files-list-item__name--disabled){color:var(--six-color-action-500)}.six-files-list-item__date{padding-left:1rem;color:var(--six-color-web-rock-600)}.six-files-list-item__size{padding-left:1rem;color:var(--six-color-web-rock-600)}.six-files-list-item__icon{padding-left:0.5rem;display:inline-block;transform:translateY(-3px);cursor:pointer;color:var(--six-color-web-rock-600)}.six-files-list-item__icon--disabled{cursor:not-allowed;color:var(--six-color-web-rock-500)}.six-files-list-item__icon:hover:not(.six-files-list-item__icon--disabled){color:var(--six-color-web-rock-900)}";
5
+ const SixFileListItemStyle0 = sixFileListItemCss;
5
6
 
6
7
  const SixFileListItem$1 = /*@__PURE__*/ proxyCustomElement(class SixFileListItem extends HTMLElement {
7
8
  constructor() {
@@ -30,15 +31,15 @@ const SixFileListItem$1 = /*@__PURE__*/ proxyCustomElement(class SixFileListItem
30
31
  this.nodelete = false;
31
32
  }
32
33
  render() {
33
- return (h("div", { class: "six-files-list-item" }, h("span", { class: {
34
+ return (h("div", { key: 'd952d96c29ffa8e5e4b0476e3c7ed2f28d635517', class: "six-files-list-item" }, h("span", { key: '1690a23c428c3b70281fbcff30183d8079ed83a4', class: {
34
35
  'six-files-list-item__name': true,
35
36
  'six-files-list-item__name--disabled': this.nodownload,
36
- }, onClick: this.downloadFile }, this.name), h("span", { class: "six-files-list-item__date" }, this.date), this.size != null && h("span", { class: "six-files-list-item__size" }, Math.round(this.size / 1024), " KB"), h("six-icon", { class: {
37
+ }, onClick: this.downloadFile }, this.name), h("span", { key: '8c7437e946edaeeeedee8e76e28950f0f14ed4bb', class: "six-files-list-item__date" }, this.date), this.size != null && h("span", { class: "six-files-list-item__size" }, Math.round(this.size / 1024), " KB"), h("six-icon", { key: '1b433c6baf5a67b7b812919058562e31bc402a9d', class: {
37
38
  'six-files-list-item__icon': true,
38
39
  'six-files-list-item__icon--disabled': this.nodelete,
39
40
  }, size: "small", onClick: this.removeFile }, "delete")));
40
41
  }
41
- static get style() { return sixFileListItemCss; }
42
+ static get style() { return SixFileListItemStyle0; }
42
43
  }, [1, "six-file-list-item", {
43
44
  "identifier": [513],
44
45
  "name": [513],
@@ -1 +1 @@
1
- {"file":"six-file-list-item.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,6zBAA6zB;;MCsB30BA,iBAAe;;;;;;;QAyBlB,iBAAY,GAAG;YACrB,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,OAAO;aACR;YAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SACvE,CAAC;QAEM,eAAU,GAAG;YACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,OAAO;aACR;YAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SACrE,CAAC;0BArCoC,EAAE;oBAGR,EAAE;oBAGF,EAAE;;0BAMI,KAAK;wBAGP,KAAK;;IAwBzC,MAAM;QACJ,QACE,WAAK,KAAK,EAAC,qBAAqB,IAC9B,YACE,KAAK,EAAE;gBACL,2BAA2B,EAAE,IAAI;gBACjC,qCAAqC,EAAE,IAAI,CAAC,UAAU;aACvD,EACD,OAAO,EAAE,IAAI,CAAC,YAAY,IAEzB,IAAI,CAAC,IAAI,CACL,EACP,YAAM,KAAK,EAAC,2BAA2B,IAAE,IAAI,CAAC,IAAI,CAAQ,EACzD,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,YAAM,KAAK,EAAC,2BAA2B,IAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAW,EACtG,gBACE,KAAK,EAAE;gBACL,2BAA2B,EAAE,IAAI;gBACjC,qCAAqC,EAAE,IAAI,CAAC,QAAQ;aACrD,EACD,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,UAAU,aAGf,CACP,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixFileListItem"],"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"],"version":3}
1
+ {"file":"six-file-list-item.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,6zBAA6zB,CAAC;AACz1B,8BAAe,kBAAkB;;MCqBpBA,iBAAe;;;;;;;QAyBlB,iBAAY,GAAG;YACrB,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,OAAO;aACR;YAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SACvE,CAAC;QAEM,eAAU,GAAG;YACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,OAAO;aACR;YAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SACrE,CAAC;0BArCoC,EAAE;oBAGR,EAAE;oBAGF,EAAE;;0BAMI,KAAK;wBAGP,KAAK;;IAwBzC,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,6DACE,KAAK,EAAE;gBACL,2BAA2B,EAAE,IAAI;gBACjC,qCAAqC,EAAE,IAAI,CAAC,UAAU;aACvD,EACD,OAAO,EAAE,IAAI,CAAC,YAAY,IAEzB,IAAI,CAAC,IAAI,CACL,EACP,6DAAM,KAAK,EAAC,2BAA2B,IAAE,IAAI,CAAC,IAAI,CAAQ,EACzD,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,YAAM,KAAK,EAAC,2BAA2B,IAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAW,EACtG,iEACE,KAAK,EAAE;gBACL,2BAA2B,EAAE,IAAI;gBACjC,qCAAqC,EAAE,IAAI,CAAC,QAAQ;aACrD,EACD,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,UAAU,aAGf,CACP,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixFileListItem"],"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(-3px);\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"],"version":3}
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
 
3
3
  const sixFileListCss = ".six-files-list__container{padding:1rem}.six-files-list__container :last-child{padding-bottom:0}";
4
+ const SixFileListStyle0 = sixFileListCss;
4
5
 
5
6
  const SixFileList$1 = /*@__PURE__*/ proxyCustomElement(class SixFileList extends HTMLElement {
6
7
  constructor() {
@@ -9,9 +10,9 @@ const SixFileList$1 = /*@__PURE__*/ proxyCustomElement(class SixFileList extends
9
10
  this.__attachShadow();
10
11
  }
11
12
  render() {
12
- return (h("div", { class: "six-files-list__container" }, h("slot", null)));
13
+ return (h("div", { key: 'a7119608a094e12dec079974a2a313eac5bf63ae', class: "six-files-list__container" }, h("slot", { key: 'eedc03a42dafc5d690db84ed670b1f0b0bb71b81' })));
13
14
  }
14
- static get style() { return sixFileListCss; }
15
+ static get style() { return SixFileListStyle0; }
15
16
  }, [1, "six-file-list"]);
16
17
  function defineCustomElement$1() {
17
18
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"six-file-list.js","mappings":";;AAAA,MAAM,cAAc,GAAG,kGAAkG;;MCY5GA,aAAW;;;;;;IACtB,MAAM;QACJ,QACE,WAAK,KAAK,EAAC,2BAA2B,IACpC,eAAQ,CACJ,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;","names":["SixFileList"],"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"],"version":3}
1
+ {"file":"six-file-list.js","mappings":";;AAAA,MAAM,cAAc,GAAG,kGAAkG,CAAC;AAC1H,0BAAe,cAAc;;MCWhBA,aAAW;;;;;;IACtB,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,2BAA2B,IACpC,8DAAQ,CACJ,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;","names":["SixFileList"],"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"],"version":3}
@@ -1,7 +1,11 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$2 } from './six-icon2.js';
2
+ import { h as hasSlot } from './slot.js';
3
+ import { d as defineCustomElement$4 } from './six-error2.js';
4
+ import { d as defineCustomElement$3 } from './six-icon2.js';
5
+ import { d as defineCustomElement$2 } from './six-spinner2.js';
3
6
 
4
- const sixFileUploadCss = ".sc-six-file-upload-h{position:relative;box-sizing:border-box}.sc-six-file-upload-h *.sc-six-file-upload,.sc-six-file-upload-h *.sc-six-file-upload:before,.sc-six-file-upload-h *.sc-six-file-upload:after{box-sizing:inherit}.sc-six-file-upload-h{position:static;display:block}.six-file-upload.sc-six-file-upload six-card.sc-six-file-upload{box-shadow:none;padding:0;width:100%}.six-file-upload.sc-six-file-upload six-card.kyc-file-upload__container--compact.sc-six-file-upload{width:inherit}.six-file-upload__label--highlighted.sc-six-file-upload{color:var(--six-color-action-600)}.six-file-upload__container--full.sc-six-file-upload{border:dashed 1px var(--six-color-web-rock-500)}.six-file-upload__label-icon.sc-six-file-upload{margin-right:0.5rem}.six-file-upload__drop-zone.sc-six-file-upload{padding:2rem 0;display:flex;justify-content:center;width:100%;transition:background-color 0.3s}.six-file-upload__drop-zone--compact.sc-six-file-upload{padding:0}.six-file-upload__input.sc-six-file-upload{cursor:pointer;position:absolute;top:0;left:0;width:100%;user-select:none;height:100%;opacity:0;outline:none}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__drop-zone.sc-six-file-upload{background-color:var(--six-color-inactive)}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover,.six-file-upload__drop-zone--hover.sc-six-file-upload{background-color:var(--six-color-action-light-to-be-defined)}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover.six-file-upload__drop-zone--compact,.six-file-upload__drop-zone--hover.six-file-upload__drop-zone--compact.sc-six-file-upload{background-color:inherit}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__input.sc-six-file-upload{cursor:not-allowed}";
7
+ const sixFileUploadCss = ".sc-six-file-upload-h{position:relative;box-sizing:border-box}.sc-six-file-upload-h *.sc-six-file-upload,.sc-six-file-upload-h *.sc-six-file-upload:before,.sc-six-file-upload-h *.sc-six-file-upload:after{box-sizing:border-box}.sc-six-file-upload-h{position:static;display:block}.six-file-upload.sc-six-file-upload six-card.sc-six-file-upload{box-shadow:none;padding:0;width:100%}.six-file-upload__label--highlighted.sc-six-file-upload{color:var(--six-color-action-600)}.six-file-upload__container--full.sc-six-file-upload{border:dashed 1px var(--six-color-web-rock-500)}.six-file-upload__label-icon.sc-six-file-upload{margin-right:0.5rem}.six-file-upload__drop-zone.sc-six-file-upload{padding:2rem 0;display:flex;justify-content:center;width:100%;transition:background-color 0.3s}.six-file-upload__drop-zone__spinner-container.sc-six-file-upload{display:flex;align-items:center}.six-file-upload__drop-zone__spinner-container.sc-six-file-upload six-spinner.sc-six-file-upload{margin-right:var(--six-spacing-x-small)}.six-file-upload__drop-zone--compact.sc-six-file-upload{padding:0}.six-file-upload__input.sc-six-file-upload{cursor:pointer;position:absolute;top:0;left:0;width:100%;user-select:none;height:100%;opacity:0;outline:none}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__drop-zone.sc-six-file-upload{background-color:var(--six-color-inactive);cursor:not-allowed}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover,.six-file-upload__drop-zone--hover.sc-six-file-upload{background-color:var(--six-color-action-light-to-be-defined)}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover.six-file-upload__drop-zone--compact,.six-file-upload__drop-zone--hover.six-file-upload__drop-zone--compact.sc-six-file-upload{background-color:inherit}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__input.sc-six-file-upload{cursor:not-allowed}.six-file-upload__error-text.sc-six-file-upload{font-size:var(--six-input-help-text-font-size-medium)}";
8
+ const SixFileUploadStyle0 = sixFileUploadCss;
5
9
 
6
10
  const SixFileUpload$1 = /*@__PURE__*/ proxyCustomElement(class SixFileUpload extends HTMLElement {
7
11
  constructor() {
@@ -9,8 +13,19 @@ const SixFileUpload$1 = /*@__PURE__*/ proxyCustomElement(class SixFileUpload ext
9
13
  this.__registerHost();
10
14
  this.success = createEvent(this, "six-file-upload-success", 7);
11
15
  this.failure = createEvent(this, "six-file-upload-failure", 7);
16
+ this.handleSlotChange = () => {
17
+ let validType = false;
18
+ if (this.errorText != null &&
19
+ ((typeof this.errorText == 'string' && this.errorText.trim().length > 0) ||
20
+ (typeof this.errorText == 'object' && this.errorText.length > 0))) {
21
+ validType = true;
22
+ }
23
+ this.hasError = validType || hasSlot(this.host, 'error-text');
24
+ console.log(this.errorText);
25
+ console.log(this.hasError);
26
+ };
12
27
  this.handleFiles = (files) => {
13
- if (this.disabled || files.length === 0) {
28
+ if (this.disabled || files.length === 0 || this.uploading) {
14
29
  return;
15
30
  }
16
31
  if (!this.multiple && files.length > 1) {
@@ -45,12 +60,16 @@ const SixFileUpload$1 = /*@__PURE__*/ proxyCustomElement(class SixFileUpload ext
45
60
  }
46
61
  };
47
62
  this.isOver = false;
63
+ this.hasError = false;
48
64
  this.compact = false;
49
65
  this.label = undefined;
50
66
  this.disabled = false;
51
67
  this.accept = undefined;
52
68
  this.multiple = false;
53
69
  this.maxFileSize = undefined;
70
+ this.uploading = false;
71
+ this.errorText = '';
72
+ this.invalid = false;
54
73
  }
55
74
  dragenterHandler() {
56
75
  if (!this.disabled) {
@@ -75,17 +94,24 @@ const SixFileUpload$1 = /*@__PURE__*/ proxyCustomElement(class SixFileUpload ext
75
94
  }
76
95
  }
77
96
  }
97
+ componentWillLoad() {
98
+ this.handleSlotChange();
99
+ }
78
100
  componentDidLoad() {
101
+ var _a;
79
102
  ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {
80
103
  this.host.addEventListener(eventName, this.preventDefaults, false);
81
104
  document.body.addEventListener(eventName, this.preventDefaults, false);
82
105
  });
106
+ (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('slotchange', this.handleSlotChange);
83
107
  }
84
108
  disconnectedCallback() {
109
+ var _a;
85
110
  ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {
86
111
  this.host.removeEventListener(eventName, this.preventDefaults, false);
87
112
  document.body.removeEventListener(eventName, this.preventDefaults, false);
88
113
  });
114
+ (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeEventListener('slotchange', this.handleSlotChange);
89
115
  }
90
116
  preventDefaults(e) {
91
117
  e.preventDefault();
@@ -97,41 +123,56 @@ const SixFileUpload$1 = /*@__PURE__*/ proxyCustomElement(class SixFileUpload ext
97
123
  }
98
124
  render() {
99
125
  const Container = this.compact ? 'six-button' : 'six-card';
100
- return (h("div", { class: {
126
+ const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter((text) => text != null && text.trim() !== '');
127
+ return (h("div", { key: 'aeaeba82e5419d410bb070edc4c14e99658a2024', class: {
101
128
  'six-file-upload': true,
102
- 'six-file-upload--disabled': this.disabled,
103
- } }, h(Container, { class: {
129
+ 'six-file-upload--disabled': this.disabled || this.uploading,
130
+ } }, h(Container, { key: '18a2c76f6c1cc07d6a8d69f17fa55df61bcfc486', disabled: this.disabled || this.uploading, "aria-invalid": this.invalid ? 'true' : 'false', class: {
104
131
  'six-file-upload__container--compact': this.compact,
105
132
  'six-file-upload__container--full': !this.compact,
106
- } }, this.compact && (h("span", { slot: "prefix" }, h("six-icon", { class: "six-file-upload__label-icon" }, "arrow_circle_up"))), h("div", { class: {
133
+ } }, this.compact && !this.uploading && (h("span", { slot: "prefix" }, h("six-icon", { class: "six-file-upload__label-icon" }, "arrow_circle_up"))), h("div", { key: '1c4dee810b517670842708c438e280897b80c32a', class: {
107
134
  'six-file-upload__drop-zone': true,
108
135
  'six-file-upload__drop-zone--hover': this.isOver,
109
136
  'six-file-upload__drop-zone--compact': this.compact,
110
- } }, h("span", null, this.renderLabel()), h("input", { class: "six-file-upload__input", type: "file", name: "resume", disabled: this.disabled, accept: this.accept, multiple: this.multiple, onChange: this.onChange, ref: (el) => (this.fileInput = el) })))));
137
+ } }, this.uploading ? (h("span", { class: "six-file-upload__drop-zone__spinner-container" }, h("six-spinner", null), " Uploading...")) : (h("div", null, h("span", null, this.renderLabel()), h("input", { class: "six-file-upload__input", type: "file", name: "resume", disabled: this.disabled, accept: this.accept, multiple: this.multiple, onChange: this.onChange, ref: (el) => (this.fileInput = el) }))))), h("div", { key: '4d8524acc6ab4b919ab8ed469b16d11268ed9994', "aria-hidden": this.invalid ? 'false' : 'true' }, h("slot", { key: '8b104ee4a3feb6c5db255157a5530deeec5dec3d', name: "error-text" }, errorMessages.map((text) => (h("six-error", null, h("div", { class: "six-file-upload__error-text" }, text))))))));
111
138
  }
112
139
  get host() { return this; }
113
- static get style() { return sixFileUploadCss; }
114
- }, [2, "six-file-upload", {
140
+ static get style() { return SixFileUploadStyle0; }
141
+ }, [6, "six-file-upload", {
115
142
  "compact": [4],
116
143
  "label": [1],
117
144
  "disabled": [4],
118
145
  "accept": [1],
119
146
  "multiple": [4],
120
147
  "maxFileSize": [2, "max-file-size"],
121
- "isOver": [32]
148
+ "uploading": [516],
149
+ "errorText": [1, "error-text"],
150
+ "invalid": [516],
151
+ "isOver": [32],
152
+ "hasError": [32]
122
153
  }, [[1, "dragenter", "dragenterHandler"], [1, "dragover", "dragoverHandler"], [1, "dragleave", "dragleaveHandler"], [1, "drop", "dropHandler"]]]);
123
154
  function defineCustomElement$1() {
124
155
  if (typeof customElements === "undefined") {
125
156
  return;
126
157
  }
127
- const components = ["six-file-upload", "six-icon"];
158
+ const components = ["six-file-upload", "six-error", "six-icon", "six-spinner"];
128
159
  components.forEach(tagName => { switch (tagName) {
129
160
  case "six-file-upload":
130
161
  if (!customElements.get(tagName)) {
131
162
  customElements.define(tagName, SixFileUpload$1);
132
163
  }
133
164
  break;
165
+ case "six-error":
166
+ if (!customElements.get(tagName)) {
167
+ defineCustomElement$4();
168
+ }
169
+ break;
134
170
  case "six-icon":
171
+ if (!customElements.get(tagName)) {
172
+ defineCustomElement$3();
173
+ }
174
+ break;
175
+ case "six-spinner":
135
176
  if (!customElements.get(tagName)) {
136
177
  defineCustomElement$2();
137
178
  }
@@ -1 +1 @@
1
- {"file":"six-file-upload.js","mappings":";;;AAAA,MAAM,gBAAgB,GAAG,u0DAAu0D;;MC2Bn1DA,eAAa;;;;;;QA8DhB,gBAAW,GAAG,CAAC,KAAe;YACpC,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;gBACvC,OAAO;aACR;YAED,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC,CAAC;aACnE;YAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,IAAI,IAAI,IAAI,IAAI,EAAE;oBAChB,OAAO;iBACR;gBAED,IAAI,iBAAiB,GAAa,EAAE,CAAC;gBACrC,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE;oBACvB,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAA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C,eAAe,EAAE,CAAC;KACrB;IAUO,WAAW;;QACjB,QACE,MAAA,IAAI,CAAC,KAAK,oCACT,IAAI,CAAC,OAAO,IACX,QAAQ,KAER,6CAC2B,YAAM,KAAK,EAAC,qCAAqC,aAAc,CACnF,CACR,CAAC,EACF;KACH;IAED,MAAM;QACJ,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,GAAG,YAAY,GAAG,UAAU,CAAC;QAE3D,QACE,WACE,KAAK,EAAE;gBACL,iBAAiB,EAAE,IAAI;gBACvB,2BAA2B,EAAE,IAAI,CAAC,QAAQ;aAC3C,IAED,EAAC,SAAS,IACR,KAAK,EAAE;gBACL,qCAAqC,EAAE,IAAI,CAAC,OAAO;gBACnD,kCAAkC,EAAE,CAAC,IAAI,CAAC,OAAO;aAClD,IAEA,IAAI,CAAC,OAAO,KACX,YAAM,IAAI,EAAC,QAAQ,IACjB,gBAAU,KAAK,EAAC,6BAA6B,sBAA2B,CACnE,CACR,EACD,WACE,KAAK,EAAE;gBACL,4BAA4B,EAAE,IAAI;gBAClC,mCAAmC,EAAE,IAAI,CAAC,MAAM;gBAChD,qCAAqC,EAAE,IAAI,CAAC,OAAO;aACpD,IAED,gBAAO,IAAI,CAAC,WAAW,EAAE,CAAQ,EACjC,aACE,KAAK,EAAC,wBAAwB,EAC9B,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAClC,CACE,CACI,CACR,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixFileUpload"],"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 </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-file-upload.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,4jEAA4jE,CAAC;AACtlE,4BAAe,gBAAgB;;MC4BlBA,eAAa;;;;;;QAwEhB,qBAAgB,G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IACjB,gBAAU,KAAK,EAAC,6BAA6B,sBAA2B,CACnE,CACR,EACD,4DACE,KAAK,EAAE;gBACL,4BAA4B,EAAE,IAAI;gBAClC,mCAAmC,EAAE,IAAI,CAAC,MAAM;gBAChD,qCAAqC,EAAE,IAAI,CAAC,OAAO;aACpD,IAEA,IAAI,CAAC,SAAS,IACb,YAAM,KAAK,EAAC,+CAA+C,IACzD,sBAAe,kBACV,KAEP,eACE,gBAAO,IAAI,CAAC,WAAW,EAAE,CAAQ,EACjC,aACE,KAAK,EAAC,wBAAwB,EAC9B,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAClC,CACE,CACP,CACG,CACI,EACZ,2EAAkB,IAAI,CAAC,OAAO,GAAG,OAAO,GAAG,MAAM,IAC/C,6DAAM,IAAI,EAAC,YAAY,IACpB,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,MACtB,qBACE,WAAK,KAAK,EAAC,6BAA6B,IAAE,IAAI,CAAO,CAC3C,CACb,CAAC,CACG,CACH,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixFileUpload"],"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\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 &__spinner-container {\n display: flex;\n align-items: center;\n\n six-spinner {\n margin-right: var(--six-spacing-x-small);\n }\n }\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 cursor: not-allowed;\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 &__error-text {\n font-size: var(--six-input-help-text-font-size-medium);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\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 * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\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 @State() hasError = 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 /** Set to true to draw the control in a loading state. */\n @Prop({ reflect: true }) uploading = false;\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\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 /** 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 handleSlotChange = () => {\n let validType = false;\n\n if (\n this.errorText != null &&\n ((typeof this.errorText == 'string' && this.errorText.trim().length > 0) ||\n (typeof this.errorText == 'object' && this.errorText.length > 0))\n ) {\n validType = true;\n }\n\n this.hasError = validType || hasSlot(this.host, 'error-text');\n console.log(this.errorText);\n console.log(this.hasError);\n };\n\n private handleFiles = (files: FileList) => {\n if (this.disabled || files.length === 0 || this.uploading) {\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 componentWillLoad() {\n this.handleSlotChange();\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 this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\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 this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\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 const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n return (\n <div\n class={{\n 'six-file-upload': true,\n 'six-file-upload--disabled': this.disabled || this.uploading,\n }}\n >\n <Container\n disabled={this.disabled || this.uploading}\n aria-invalid={this.invalid ? 'true' : 'false'}\n class={{\n 'six-file-upload__container--compact': this.compact,\n 'six-file-upload__container--full': !this.compact,\n }}\n >\n {this.compact && !this.uploading && (\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 {this.uploading ? (\n <span class=\"six-file-upload__drop-zone__spinner-container\">\n <six-spinner /> Uploading...\n </span>\n ) : (\n <div>\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 )}\n </div>\n </Container>\n <div aria-hidden={this.invalid ? 'false' : 'true'}>\n <slot name=\"error-text\">\n {errorMessages.map((text) => (\n <six-error>\n <div class=\"six-file-upload__error-text\">{text}</div>\n </six-error>\n ))}\n </slot>\n </div>\n </div>\n );\n }\n}\n"],"version":3}