@six-group/ui-library 3.0.0-beta.1.8 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (906) hide show
  1. package/dist/cjs/event-listeners-74715e62.js +2 -0
  2. package/dist/cjs/event-listeners-74715e62.js.map +1 -0
  3. package/dist/cjs/execution-control-46f388e0.js +2 -0
  4. package/dist/cjs/execution-control-46f388e0.js.map +1 -0
  5. package/dist/cjs/focus-visible-0b352c74.js +2 -0
  6. package/dist/cjs/focus-visible-0b352c74.js.map +1 -0
  7. package/dist/cjs/{form-control-866bbece.js → form-control-8e2ae807.js} +3 -1
  8. package/dist/cjs/form-control-8e2ae807.js.map +1 -0
  9. package/dist/cjs/{index-341df120.js → index-b3257a77.js} +603 -279
  10. package/dist/cjs/index-b3257a77.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +2 -0
  12. package/dist/cjs/index.cjs.js.map +1 -0
  13. package/dist/cjs/loader.cjs.js +6 -3
  14. package/dist/cjs/loader.cjs.js.map +1 -0
  15. package/dist/cjs/modal-48d42228.js +2 -0
  16. package/dist/cjs/modal-48d42228.js.map +1 -0
  17. package/dist/cjs/{popover-1d2a037c.js → popover-f743f62b.js} +5 -4
  18. package/dist/cjs/popover-f743f62b.js.map +1 -0
  19. package/dist/cjs/scroll-76e6f5d7.js +2 -0
  20. package/dist/cjs/scroll-76e6f5d7.js.map +1 -0
  21. package/dist/cjs/set-attributes_2.cjs.entry.js +5 -5
  22. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -0
  23. package/dist/cjs/six-alert.cjs.entry.js +4 -9
  24. package/dist/cjs/six-alert.cjs.entry.js.map +1 -0
  25. package/dist/cjs/six-avatar.cjs.entry.js +4 -6
  26. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -0
  27. package/dist/cjs/six-badge.cjs.entry.js +4 -5
  28. package/dist/cjs/six-badge.cjs.entry.js.map +1 -0
  29. package/dist/cjs/six-button.cjs.entry.js +9 -11
  30. package/dist/cjs/six-button.cjs.entry.js.map +1 -0
  31. package/dist/cjs/six-card.cjs.entry.js +4 -2
  32. package/dist/cjs/six-card.cjs.entry.js.map +1 -0
  33. package/dist/cjs/six-checkbox.cjs.entry.js +9 -13
  34. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -0
  35. package/dist/cjs/six-datepicker.cjs.entry.js +33 -86
  36. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -0
  37. package/dist/cjs/six-details.cjs.entry.js +6 -9
  38. package/dist/cjs/six-details.cjs.entry.js.map +1 -0
  39. package/dist/cjs/six-dialog.cjs.entry.js +4 -11
  40. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -0
  41. package/dist/cjs/six-drawer.cjs.entry.js +4 -16
  42. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -0
  43. package/dist/cjs/six-dropdown_3.cjs.entry.js +37 -84
  44. package/dist/cjs/six-dropdown_3.cjs.entry.js.map +1 -0
  45. package/dist/cjs/six-error-page.cjs.entry.js +8 -5
  46. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -0
  47. package/dist/cjs/six-file-list-item.cjs.entry.js +10 -12
  48. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -0
  49. package/dist/cjs/six-file-list.cjs.entry.js +4 -2
  50. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -0
  51. package/dist/cjs/six-file-upload.cjs.entry.js +30 -17
  52. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -0
  53. package/dist/cjs/six-footer.cjs.entry.js +4 -2
  54. package/dist/cjs/six-footer.cjs.entry.js.map +1 -0
  55. package/dist/cjs/six-form.cjs.entry.js +4 -3
  56. package/dist/cjs/six-form.cjs.entry.js.map +1 -0
  57. package/dist/cjs/six-group-label.cjs.entry.js +6 -7
  58. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -0
  59. package/dist/cjs/six-header.cjs.entry.js +11 -11
  60. package/dist/cjs/six-header.cjs.entry.js.map +1 -0
  61. package/dist/cjs/six-icon-button.cjs.entry.js +9 -6
  62. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -0
  63. package/dist/cjs/six-icon.cjs.entry.js +4 -4
  64. package/dist/cjs/six-icon.cjs.entry.js.map +1 -0
  65. package/dist/cjs/six-input.cjs.entry.js +21 -23
  66. package/dist/cjs/six-input.cjs.entry.js.map +1 -0
  67. package/dist/cjs/six-item-picker.cjs.entry.js +11 -26
  68. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -0
  69. package/dist/cjs/six-language-switcher.cjs.entry.js +6 -4
  70. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -0
  71. package/dist/cjs/six-layout-grid.cjs.entry.js +5 -2
  72. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -0
  73. package/dist/cjs/six-main-container.cjs.entry.js +4 -3
  74. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -0
  75. package/dist/cjs/six-menu-divider.cjs.entry.js +4 -2
  76. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -0
  77. package/dist/cjs/six-menu-label.cjs.entry.js +4 -2
  78. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -0
  79. package/dist/cjs/six-picto.cjs.entry.js +4 -5
  80. package/dist/cjs/six-picto.cjs.entry.js.map +1 -0
  81. package/dist/cjs/six-progress-bar.cjs.entry.js +4 -4
  82. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -0
  83. package/dist/cjs/six-progress-ring.cjs.entry.js +5 -4
  84. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -0
  85. package/dist/cjs/six-radio.cjs.entry.js +8 -10
  86. package/dist/cjs/six-radio.cjs.entry.js.map +1 -0
  87. package/dist/cjs/six-range.cjs.entry.js +9 -20
  88. package/dist/cjs/six-range.cjs.entry.js.map +1 -0
  89. package/dist/cjs/six-root.cjs.entry.js +9 -10
  90. package/dist/cjs/six-root.cjs.entry.js.map +1 -0
  91. package/dist/cjs/six-search-field.cjs.entry.js +9 -10
  92. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -0
  93. package/dist/cjs/six-select.cjs.entry.js +31 -57
  94. package/dist/cjs/six-select.cjs.entry.js.map +1 -0
  95. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +11 -10
  96. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -0
  97. package/dist/cjs/six-sidebar-item.cjs.entry.js +4 -5
  98. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -0
  99. package/dist/cjs/six-sidebar.cjs.entry.js +9 -11
  100. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -0
  101. package/dist/cjs/six-spinner.cjs.entry.js +4 -3
  102. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -0
  103. package/dist/cjs/six-switch.cjs.entry.js +8 -8
  104. package/dist/cjs/six-switch.cjs.entry.js.map +1 -0
  105. package/dist/cjs/six-tab-group.cjs.entry.js +4 -4
  106. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -0
  107. package/dist/cjs/six-tab-panel.cjs.entry.js +4 -4
  108. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -0
  109. package/dist/cjs/six-tab.cjs.entry.js +4 -6
  110. package/dist/cjs/six-tab.cjs.entry.js.map +1 -0
  111. package/dist/cjs/six-table-cell_4.cjs.entry.js +21 -16
  112. package/dist/cjs/six-table-cell_4.cjs.entry.js.map +1 -0
  113. package/dist/cjs/six-table.cjs.entry.js +31 -32
  114. package/dist/cjs/six-table.cjs.entry.js.map +1 -0
  115. package/dist/cjs/six-tag.cjs.entry.js +4 -6
  116. package/dist/cjs/six-tag.cjs.entry.js.map +1 -0
  117. package/dist/cjs/six-textarea.cjs.entry.js +17 -20
  118. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -0
  119. package/dist/cjs/six-tile.cjs.entry.js +12 -15
  120. package/dist/cjs/six-tile.cjs.entry.js.map +1 -0
  121. package/dist/cjs/six-timepicker.cjs.entry.js +29 -78
  122. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -0
  123. package/dist/cjs/six-timepicker.types-c19ebff3.js +2 -0
  124. package/dist/cjs/six-timepicker.types-c19ebff3.js.map +1 -0
  125. package/dist/cjs/six-tooltip.cjs.entry.js +8 -18
  126. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -0
  127. package/dist/cjs/slot-ad537f24.js +2 -0
  128. package/dist/cjs/slot-ad537f24.js.map +1 -0
  129. package/dist/cjs/types-64878648.js +2 -0
  130. package/dist/cjs/types-64878648.js.map +1 -0
  131. package/dist/cjs/ui-library.cjs.js +12 -3
  132. package/dist/cjs/ui-library.cjs.js.map +1 -0
  133. package/dist/collection/collection-manifest.json +2 -2
  134. package/dist/collection/components/six-alert/six-alert.js +221 -219
  135. package/dist/collection/components/six-alert/six-alert.js.map +1 -0
  136. package/dist/collection/components/six-avatar/six-avatar.js +91 -91
  137. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -0
  138. package/dist/collection/components/six-badge/six-badge.js +69 -66
  139. package/dist/collection/components/six-badge/six-badge.js.map +1 -0
  140. package/dist/collection/components/six-button/six-button.js +377 -379
  141. package/dist/collection/components/six-button/six-button.js.map +1 -0
  142. package/dist/collection/components/six-card/six-card.js +13 -9
  143. package/dist/collection/components/six-card/six-card.js.map +1 -0
  144. package/dist/collection/components/six-checkbox/six-checkbox.js +372 -381
  145. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -0
  146. package/dist/collection/components/six-datepicker/components/day-selection.js +9 -10
  147. package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -0
  148. package/dist/collection/components/six-datepicker/components/month-selection.js +6 -6
  149. package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -0
  150. package/dist/collection/components/six-datepicker/components/year-selection.js +6 -6
  151. package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -0
  152. package/dist/collection/components/six-datepicker/six-date-formats.js +1 -0
  153. package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -0
  154. package/dist/collection/components/six-datepicker/six-datepicker.js +670 -742
  155. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -0
  156. package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js +1 -0
  157. package/dist/collection/components/six-datepicker/test/six-datepicker.test-helpers.js.map +1 -0
  158. package/dist/collection/components/six-details/six-details.js +276 -274
  159. package/dist/collection/components/six-details/six-details.js.map +1 -0
  160. package/dist/collection/components/six-dialog/six-dialog.js +224 -228
  161. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -0
  162. package/dist/collection/components/six-drawer/six-drawer.js +258 -267
  163. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -0
  164. package/dist/collection/components/six-dropdown/six-dropdown.js +514 -534
  165. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -0
  166. package/dist/collection/components/six-error-page/six-error-page.js +100 -96
  167. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -0
  168. package/dist/collection/components/six-file-list/six-file-list.js +13 -9
  169. package/dist/collection/components/six-file-list/six-file-list.js.map +1 -0
  170. package/dist/collection/components/six-file-list-item/six-file-list-item.js +170 -169
  171. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -0
  172. package/dist/collection/components/six-file-upload/six-file-upload.js +221 -186
  173. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -0
  174. package/dist/collection/components/six-footer/six-footer.js +13 -9
  175. package/dist/collection/components/six-footer/six-footer.js.map +1 -0
  176. package/dist/collection/components/six-form/six-form.js +174 -163
  177. package/dist/collection/components/six-form/six-form.js.map +1 -0
  178. package/dist/collection/components/six-group-label/six-group-label.js +118 -111
  179. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -0
  180. package/dist/collection/components/six-header/six-header.js +260 -268
  181. package/dist/collection/components/six-header/six-header.js.map +1 -0
  182. package/dist/collection/components/six-icon/six-icon.js +52 -48
  183. package/dist/collection/components/six-icon/six-icon.js.map +1 -0
  184. package/dist/collection/components/six-icon-button/six-icon-button.js +108 -104
  185. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -0
  186. package/dist/collection/components/six-input/six-input.js +895 -896
  187. package/dist/collection/components/six-input/six-input.js.map +1 -0
  188. package/dist/collection/components/six-item-picker/six-item-picker.js +329 -336
  189. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -0
  190. package/dist/collection/components/six-item-picker/types.js +1 -0
  191. package/dist/collection/components/six-item-picker/types.js.map +1 -0
  192. package/dist/collection/components/six-language-switcher/six-language-switcher.js +85 -74
  193. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -0
  194. package/dist/collection/components/six-layout-grid/six-layout-grid.js +43 -32
  195. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -0
  196. package/dist/collection/components/six-main-container/six-main-container.js +35 -33
  197. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -0
  198. package/dist/collection/components/six-menu/six-menu.js +176 -184
  199. package/dist/collection/components/six-menu/six-menu.js.map +1 -0
  200. package/dist/collection/components/six-menu-divider/six-menu-divider.js +12 -7
  201. package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -0
  202. package/dist/collection/components/six-menu-item/six-menu-item.js +131 -110
  203. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -0
  204. package/dist/collection/components/six-menu-label/six-menu-label.js +13 -9
  205. package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -0
  206. package/dist/collection/components/six-picto/six-picto.js +35 -32
  207. package/dist/collection/components/six-picto/six-picto.js.map +1 -0
  208. package/dist/collection/components/six-progress-bar/six-progress-bar.js +54 -51
  209. package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -0
  210. package/dist/collection/components/six-progress-ring/six-progress-ring.js +75 -72
  211. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -0
  212. package/dist/collection/components/six-radio/six-radio.js +269 -267
  213. package/dist/collection/components/six-radio/six-radio.js.map +1 -0
  214. package/dist/collection/components/six-range/six-range.js +426 -427
  215. package/dist/collection/components/six-range/six-range.js.map +1 -0
  216. package/dist/collection/components/six-root/six-root.js +127 -129
  217. package/dist/collection/components/six-root/six-root.js.map +1 -0
  218. package/dist/collection/components/six-search-field/six-search-field.js +134 -128
  219. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -0
  220. package/dist/collection/components/six-select/six-select.css +1 -2
  221. package/dist/collection/components/six-select/six-select.js +665 -689
  222. package/dist/collection/components/six-select/six-select.js.map +1 -0
  223. package/dist/collection/components/six-sidebar/six-sidebar.js +288 -279
  224. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -0
  225. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +69 -66
  226. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -0
  227. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +116 -115
  228. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -0
  229. package/dist/collection/components/six-spinner/six-spinner.js +35 -32
  230. package/dist/collection/components/six-spinner/six-spinner.js.map +1 -0
  231. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +39 -36
  232. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js.map +1 -0
  233. package/dist/collection/components/six-switch/six-switch.js +279 -271
  234. package/dist/collection/components/six-switch/six-switch.js.map +1 -0
  235. package/dist/collection/components/six-tab/six-tab.js +150 -146
  236. package/dist/collection/components/six-tab/six-tab.js.map +1 -0
  237. package/dist/collection/components/six-tab-group/six-tab-group.js +126 -120
  238. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -0
  239. package/dist/collection/components/six-tab-panel/six-tab-panel.js +52 -49
  240. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -0
  241. package/dist/collection/components/six-table/six-table.js +178 -168
  242. package/dist/collection/components/six-table/six-table.js.map +1 -0
  243. package/dist/collection/components/six-table/test/helpers.js +1 -0
  244. package/dist/collection/components/six-table/test/helpers.js.map +1 -0
  245. package/dist/collection/components/six-table/types.js +1 -0
  246. package/dist/collection/components/six-table/types.js.map +1 -0
  247. package/dist/collection/components/six-table/util/filter-by.js +5 -5
  248. package/dist/collection/components/six-table/util/filter-by.js.map +1 -0
  249. package/dist/collection/components/six-table/util/from-data.js +2 -3
  250. package/dist/collection/components/six-table/util/from-data.js.map +1 -0
  251. package/dist/collection/components/six-table/util/is.js +1 -0
  252. package/dist/collection/components/six-table/util/is.js.map +1 -0
  253. package/dist/collection/components/six-table/util/quick-filter-by.js +1 -0
  254. package/dist/collection/components/six-table/util/quick-filter-by.js.map +1 -0
  255. package/dist/collection/components/six-table/util/sort-by.js +5 -5
  256. package/dist/collection/components/six-table/util/sort-by.js.map +1 -0
  257. package/dist/collection/components/six-table-cell/six-table-cell.js +13 -9
  258. package/dist/collection/components/six-table-cell/six-table-cell.js.map +1 -0
  259. package/dist/collection/components/six-table-header/six-table-header.js +13 -9
  260. package/dist/collection/components/six-table-header/six-table-header.js.map +1 -0
  261. package/dist/collection/components/six-table-header-cell/get-next-state.js +3 -3
  262. package/dist/collection/components/six-table-header-cell/get-next-state.js.map +1 -0
  263. package/dist/collection/components/six-table-header-cell/icons.js +8 -8
  264. package/dist/collection/components/six-table-header-cell/icons.js.map +1 -0
  265. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +139 -134
  266. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js.map +1 -0
  267. package/dist/collection/components/six-table-header-cell/types.js +2 -13
  268. package/dist/collection/components/six-table-header-cell/types.js.map +1 -0
  269. package/dist/collection/components/six-table-header-cell/util/create-model.js +1 -0
  270. package/dist/collection/components/six-table-header-cell/util/create-model.js.map +1 -0
  271. package/dist/collection/components/six-table-header-cell/util/get-next-state.js +3 -3
  272. package/dist/collection/components/six-table-header-cell/util/get-next-state.js.map +1 -0
  273. package/dist/collection/components/six-table-row/six-table-row.js +13 -9
  274. package/dist/collection/components/six-table-row/six-table-row.js.map +1 -0
  275. package/dist/collection/components/six-tag/six-tag.js +107 -105
  276. package/dist/collection/components/six-tag/six-tag.js.map +1 -0
  277. package/dist/collection/components/six-textarea/six-textarea.js +708 -700
  278. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -0
  279. package/dist/collection/components/six-tile/six-tile.js +237 -238
  280. package/dist/collection/components/six-tile/six-tile.js.map +1 -0
  281. package/dist/collection/components/six-timepicker/six-time-format.js +1 -0
  282. package/dist/collection/components/six-timepicker/six-time-format.js.map +1 -0
  283. package/dist/collection/components/six-timepicker/six-timepicker.js +597 -641
  284. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -0
  285. package/dist/collection/components/six-timepicker/six-timepicker.types.js +1 -0
  286. package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +1 -0
  287. package/dist/collection/components/six-tooltip/six-tooltip.js +256 -259
  288. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -0
  289. package/dist/collection/functional-components/form-control/form-control.js +5 -10
  290. package/dist/collection/functional-components/form-control/form-control.js.map +1 -0
  291. package/dist/collection/index.js +1 -0
  292. package/dist/collection/index.js.map +1 -0
  293. package/dist/collection/testUtil/delay.js +1 -0
  294. package/dist/collection/testUtil/delay.js.map +1 -0
  295. package/dist/collection/utils/as-array.js +1 -0
  296. package/dist/collection/utils/as-array.js.map +1 -0
  297. package/dist/collection/utils/date-util.js +1 -0
  298. package/dist/collection/utils/date-util.js.map +1 -0
  299. package/dist/collection/utils/event-listeners.js +1 -0
  300. package/dist/collection/utils/event-listeners.js.map +1 -0
  301. package/dist/collection/utils/execution-control.js +1 -0
  302. package/dist/collection/utils/execution-control.js.map +1 -0
  303. package/dist/collection/utils/focus-visible.js +1 -0
  304. package/dist/collection/utils/focus-visible.js.map +1 -0
  305. package/dist/collection/utils/matchers.js +1 -0
  306. package/dist/collection/utils/matchers.js.map +1 -0
  307. package/dist/collection/utils/modal.js +1 -0
  308. package/dist/collection/utils/modal.js.map +1 -0
  309. package/dist/collection/utils/offset.js +1 -0
  310. package/dist/collection/utils/offset.js.map +1 -0
  311. package/dist/collection/utils/popover.js +1 -0
  312. package/dist/collection/utils/popover.js.map +1 -0
  313. package/dist/collection/utils/scroll.js +1 -0
  314. package/dist/collection/utils/scroll.js.map +1 -0
  315. package/dist/collection/utils/slot.js +1 -0
  316. package/dist/collection/utils/slot.js.map +1 -0
  317. package/dist/collection/utils/support.js +1 -0
  318. package/dist/collection/utils/support.js.map +1 -0
  319. package/dist/collection/utils/tabbable.js +1 -0
  320. package/dist/collection/utils/tabbable.js.map +1 -0
  321. package/dist/collection/utils/testing.js +1 -0
  322. package/dist/collection/utils/testing.js.map +1 -0
  323. package/dist/collection/utils/time.util.js +1 -0
  324. package/dist/collection/utils/time.util.js.map +1 -0
  325. package/dist/collection/utils/type-check.js +1 -0
  326. package/dist/collection/utils/type-check.js.map +1 -0
  327. package/dist/collection/utils/types.js +1 -0
  328. package/dist/collection/utils/types.js.map +1 -0
  329. package/dist/collection/wrappers/set-attributes/set-attributes.js +28 -24
  330. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -0
  331. package/dist/components/event-listeners.js +43 -0
  332. package/dist/components/event-listeners.js.map +1 -0
  333. package/dist/components/execution-control.js +40 -0
  334. package/dist/components/execution-control.js.map +1 -0
  335. package/dist/components/focus-visible.js +45 -0
  336. package/dist/components/focus-visible.js.map +1 -0
  337. package/dist/components/form-control.js +32 -0
  338. package/dist/components/form-control.js.map +1 -0
  339. package/dist/components/index.d.ts +39 -0
  340. package/dist/components/index.js +132 -0
  341. package/dist/components/index.js.map +1 -0
  342. package/dist/components/modal.js +48 -0
  343. package/dist/components/modal.js.map +1 -0
  344. package/dist/{esm/popover-1c7a1139.js → components/popover.js} +5 -4
  345. package/dist/components/popover.js.map +1 -0
  346. package/dist/components/scroll.js +64 -0
  347. package/dist/components/scroll.js.map +1 -0
  348. package/dist/components/set-attributes.d.ts +11 -0
  349. package/dist/components/set-attributes.js +8 -0
  350. package/dist/components/set-attributes.js.map +1 -0
  351. package/dist/components/set-attributes2.js +69 -0
  352. package/dist/components/set-attributes2.js.map +1 -0
  353. package/dist/components/six-alert.d.ts +11 -0
  354. package/dist/components/six-alert.js +172 -0
  355. package/dist/components/six-alert.js.map +1 -0
  356. package/dist/components/six-avatar.d.ts +11 -0
  357. package/dist/components/six-avatar.js +63 -0
  358. package/dist/components/six-avatar.js.map +1 -0
  359. package/dist/components/six-badge.d.ts +11 -0
  360. package/dist/components/six-badge.js +54 -0
  361. package/dist/components/six-badge.js.map +1 -0
  362. package/dist/components/six-button.d.ts +11 -0
  363. package/dist/components/six-button.js +147 -0
  364. package/dist/components/six-button.js.map +1 -0
  365. package/dist/components/six-card.d.ts +11 -0
  366. package/dist/components/six-card.js +35 -0
  367. package/dist/components/six-card.js.map +1 -0
  368. package/dist/components/six-checkbox.d.ts +11 -0
  369. package/dist/components/six-checkbox.js +193 -0
  370. package/dist/components/six-checkbox.js.map +1 -0
  371. package/dist/components/six-datepicker.d.ts +11 -0
  372. package/dist/components/six-datepicker.js +1229 -0
  373. package/dist/components/six-datepicker.js.map +1 -0
  374. package/dist/components/six-details.d.ts +11 -0
  375. package/dist/components/six-details.js +8 -0
  376. package/dist/components/six-details.js.map +1 -0
  377. package/dist/components/six-details2.js +176 -0
  378. package/dist/components/six-details2.js.map +1 -0
  379. package/dist/components/six-dialog.d.ts +11 -0
  380. package/dist/components/six-dialog.js +190 -0
  381. package/dist/components/six-dialog.js.map +1 -0
  382. package/dist/components/six-drawer.d.ts +11 -0
  383. package/dist/components/six-drawer.js +209 -0
  384. package/dist/components/six-drawer.js.map +1 -0
  385. package/dist/components/six-dropdown.d.ts +11 -0
  386. package/dist/components/six-dropdown.js +8 -0
  387. package/dist/components/six-dropdown.js.map +1 -0
  388. package/dist/components/six-dropdown2.js +499 -0
  389. package/dist/components/six-dropdown2.js.map +1 -0
  390. package/dist/components/six-error-page.d.ts +11 -0
  391. package/dist/components/six-error-page.js +134 -0
  392. package/dist/components/six-error-page.js.map +1 -0
  393. package/dist/components/six-file-list-item.d.ts +11 -0
  394. package/dist/components/six-file-list-item.js +74 -0
  395. package/dist/components/six-file-list-item.js.map +1 -0
  396. package/dist/components/six-file-list.d.ts +11 -0
  397. package/dist/components/six-file-list.js +35 -0
  398. package/dist/components/six-file-list.js.map +1 -0
  399. package/dist/components/six-file-upload.d.ts +11 -0
  400. package/dist/components/six-file-upload.js +147 -0
  401. package/dist/components/six-file-upload.js.map +1 -0
  402. package/dist/components/six-footer.d.ts +11 -0
  403. package/dist/components/six-footer.js +35 -0
  404. package/dist/components/six-footer.js.map +1 -0
  405. package/dist/components/six-form.d.ts +11 -0
  406. package/dist/components/six-form.js +252 -0
  407. package/dist/components/six-form.js.map +1 -0
  408. package/dist/components/six-group-label.d.ts +11 -0
  409. package/dist/components/six-group-label.js +78 -0
  410. package/dist/components/six-group-label.js.map +1 -0
  411. package/dist/components/six-header.d.ts +11 -0
  412. package/dist/components/six-header.js +219 -0
  413. package/dist/components/six-header.js.map +1 -0
  414. package/dist/components/six-icon-button.d.ts +11 -0
  415. package/dist/components/six-icon-button.js +8 -0
  416. package/dist/components/six-icon-button.js.map +1 -0
  417. package/dist/components/six-icon-button2.js +70 -0
  418. package/dist/components/six-icon-button2.js.map +1 -0
  419. package/dist/components/six-icon.d.ts +11 -0
  420. package/dist/components/six-icon.js +8 -0
  421. package/dist/components/six-icon.js.map +1 -0
  422. package/dist/components/six-icon2.js +49 -0
  423. package/dist/components/six-icon2.js.map +1 -0
  424. package/dist/components/six-input.d.ts +11 -0
  425. package/dist/components/six-input.js +8 -0
  426. package/dist/components/six-input.js.map +1 -0
  427. package/dist/components/six-input2.js +303 -0
  428. package/dist/components/six-input2.js.map +1 -0
  429. package/dist/components/six-item-picker.d.ts +11 -0
  430. package/dist/components/six-item-picker.js +8 -0
  431. package/dist/components/six-item-picker.js.map +1 -0
  432. package/dist/components/six-item-picker2.js +404 -0
  433. package/dist/components/six-item-picker2.js.map +1 -0
  434. package/dist/components/six-language-switcher.d.ts +11 -0
  435. package/dist/components/six-language-switcher.js +82 -0
  436. package/dist/components/six-language-switcher.js.map +1 -0
  437. package/dist/components/six-layout-grid.d.ts +11 -0
  438. package/dist/components/six-layout-grid.js +49 -0
  439. package/dist/components/six-layout-grid.js.map +1 -0
  440. package/dist/components/six-main-container.d.ts +11 -0
  441. package/dist/components/six-main-container.js +39 -0
  442. package/dist/components/six-main-container.js.map +1 -0
  443. package/dist/components/six-menu-divider.d.ts +11 -0
  444. package/dist/components/six-menu-divider.js +35 -0
  445. package/dist/components/six-menu-divider.js.map +1 -0
  446. package/dist/components/six-menu-item.d.ts +11 -0
  447. package/dist/components/six-menu-item.js +8 -0
  448. package/dist/components/six-menu-item.js.map +1 -0
  449. package/dist/components/six-menu-item2.js +86 -0
  450. package/dist/components/six-menu-item2.js.map +1 -0
  451. package/dist/components/six-menu-label.d.ts +11 -0
  452. package/dist/components/six-menu-label.js +35 -0
  453. package/dist/components/six-menu-label.js.map +1 -0
  454. package/dist/components/six-menu.d.ts +11 -0
  455. package/dist/components/six-menu.js +8 -0
  456. package/dist/components/six-menu.js.map +1 -0
  457. package/dist/components/six-menu2.js +252 -0
  458. package/dist/components/six-menu2.js.map +1 -0
  459. package/dist/components/six-picto.d.ts +11 -0
  460. package/dist/components/six-picto.js +8 -0
  461. package/dist/components/six-picto.js.map +1 -0
  462. package/dist/{custom-elements/index.js → components/six-picto2.js} +21 -9740
  463. package/dist/components/six-picto2.js.map +1 -0
  464. package/dist/components/six-progress-bar.d.ts +11 -0
  465. package/dist/components/six-progress-bar.js +45 -0
  466. package/dist/components/six-progress-bar.js.map +1 -0
  467. package/dist/components/six-progress-ring.d.ts +11 -0
  468. package/dist/components/six-progress-ring.js +61 -0
  469. package/dist/components/six-progress-ring.js.map +1 -0
  470. package/dist/components/six-radio.d.ts +11 -0
  471. package/dist/components/six-radio.js +157 -0
  472. package/dist/components/six-radio.js.map +1 -0
  473. package/dist/components/six-range.d.ts +11 -0
  474. package/dist/components/six-range.js +236 -0
  475. package/dist/components/six-range.js.map +1 -0
  476. package/dist/components/six-root.d.ts +11 -0
  477. package/dist/components/six-root.js +82 -0
  478. package/dist/components/six-root.js.map +1 -0
  479. package/dist/components/six-search-field.d.ts +11 -0
  480. package/dist/components/six-search-field.js +85 -0
  481. package/dist/components/six-search-field.js.map +1 -0
  482. package/dist/components/six-select.d.ts +11 -0
  483. package/dist/components/six-select.js +526 -0
  484. package/dist/components/six-select.js.map +1 -0
  485. package/dist/components/six-sidebar-item-group.d.ts +11 -0
  486. package/dist/components/six-sidebar-item-group.js +88 -0
  487. package/dist/components/six-sidebar-item-group.js.map +1 -0
  488. package/dist/components/six-sidebar-item.d.ts +11 -0
  489. package/dist/components/six-sidebar-item.js +46 -0
  490. package/dist/components/six-sidebar-item.js.map +1 -0
  491. package/dist/components/six-sidebar.d.ts +11 -0
  492. package/dist/components/six-sidebar.js +205 -0
  493. package/dist/components/six-sidebar.js.map +1 -0
  494. package/dist/components/six-spinner.d.ts +11 -0
  495. package/dist/components/six-spinner.js +8 -0
  496. package/dist/components/six-spinner.js.map +1 -0
  497. package/dist/components/six-spinner2.js +41 -0
  498. package/dist/components/six-spinner2.js.map +1 -0
  499. package/dist/components/six-stage-indicator.d.ts +11 -0
  500. package/dist/components/six-stage-indicator.js +8 -0
  501. package/dist/components/six-stage-indicator.js.map +1 -0
  502. package/dist/components/six-stage-indicator2.js +41 -0
  503. package/dist/components/six-stage-indicator2.js.map +1 -0
  504. package/dist/components/six-switch.d.ts +11 -0
  505. package/dist/components/six-switch.js +139 -0
  506. package/dist/components/six-switch.js.map +1 -0
  507. package/dist/components/six-tab-group.d.ts +11 -0
  508. package/dist/components/six-tab-group.js +268 -0
  509. package/dist/components/six-tab-group.js.map +1 -0
  510. package/dist/components/six-tab-panel.d.ts +11 -0
  511. package/dist/components/six-tab-panel.js +45 -0
  512. package/dist/components/six-tab-panel.js.map +1 -0
  513. package/dist/components/six-tab.d.ts +11 -0
  514. package/dist/components/six-tab.js +84 -0
  515. package/dist/components/six-tab.js.map +1 -0
  516. package/dist/components/six-table-cell.d.ts +11 -0
  517. package/dist/components/six-table-cell.js +8 -0
  518. package/dist/components/six-table-cell.js.map +1 -0
  519. package/dist/components/six-table-cell2.js +32 -0
  520. package/dist/components/six-table-cell2.js.map +1 -0
  521. package/dist/components/six-table-header-cell.d.ts +11 -0
  522. package/dist/components/six-table-header-cell.js +8 -0
  523. package/dist/components/six-table-header-cell.js.map +1 -0
  524. package/dist/components/six-table-header-cell2.js +120 -0
  525. package/dist/components/six-table-header-cell2.js.map +1 -0
  526. package/dist/components/six-table-header.d.ts +11 -0
  527. package/dist/components/six-table-header.js +8 -0
  528. package/dist/components/six-table-header.js.map +1 -0
  529. package/dist/components/six-table-header2.js +32 -0
  530. package/dist/components/six-table-header2.js.map +1 -0
  531. package/dist/components/six-table-row.d.ts +11 -0
  532. package/dist/components/six-table-row.js +8 -0
  533. package/dist/components/six-table-row.js.map +1 -0
  534. package/dist/components/six-table-row2.js +32 -0
  535. package/dist/components/six-table-row2.js.map +1 -0
  536. package/dist/components/six-table.d.ts +11 -0
  537. package/dist/components/six-table.js +252 -0
  538. package/dist/components/six-table.js.map +1 -0
  539. package/dist/components/six-tag.d.ts +11 -0
  540. package/dist/components/six-tag.js +8 -0
  541. package/dist/components/six-tag.js.map +1 -0
  542. package/dist/components/six-tag2.js +77 -0
  543. package/dist/components/six-tag2.js.map +1 -0
  544. package/dist/components/six-textarea.d.ts +11 -0
  545. package/dist/components/six-textarea.js +269 -0
  546. package/dist/components/six-textarea.js.map +1 -0
  547. package/dist/components/six-tile.d.ts +11 -0
  548. package/dist/components/six-tile.js +142 -0
  549. package/dist/components/six-tile.js.map +1 -0
  550. package/dist/components/six-timepicker.d.ts +11 -0
  551. package/dist/components/six-timepicker.js +8 -0
  552. package/dist/components/six-timepicker.js.map +1 -0
  553. package/dist/components/six-timepicker2.js +559 -0
  554. package/dist/components/six-timepicker2.js.map +1 -0
  555. package/dist/components/six-tooltip.d.ts +11 -0
  556. package/dist/components/six-tooltip.js +8 -0
  557. package/dist/components/six-tooltip.js.map +1 -0
  558. package/dist/components/six-tooltip2.js +194 -0
  559. package/dist/components/six-tooltip2.js.map +1 -0
  560. package/dist/components/slot.js +47 -0
  561. package/dist/components/slot.js.map +1 -0
  562. package/dist/components.d.ts +27 -0
  563. package/dist/components.json +61 -28
  564. package/dist/esm/event-listeners-570a24ea.js +2 -0
  565. package/dist/esm/event-listeners-570a24ea.js.map +1 -0
  566. package/dist/esm/execution-control-1a60d709.js +2 -0
  567. package/dist/esm/execution-control-1a60d709.js.map +1 -0
  568. package/dist/esm/focus-visible-97933ea9.js +2 -0
  569. package/dist/esm/focus-visible-97933ea9.js.map +1 -0
  570. package/dist/esm/{form-control-24f446af.js → form-control-bdd1478a.js} +3 -1
  571. package/dist/esm/form-control-bdd1478a.js.map +1 -0
  572. package/dist/esm/{index-a2605a62.js → index-96b1af5d.js} +603 -279
  573. package/dist/esm/index-96b1af5d.js.map +1 -0
  574. package/dist/esm/index.js +2 -0
  575. package/dist/esm/index.js.map +1 -0
  576. package/dist/esm/loader.js +6 -3
  577. package/dist/esm/loader.js.map +1 -0
  578. package/dist/esm/modal-5ebdc320.js +2 -0
  579. package/dist/esm/modal-5ebdc320.js.map +1 -0
  580. package/dist/esm/polyfills/css-shim.js +1 -1
  581. package/dist/esm/popover-bd2c2fca.js +1897 -0
  582. package/dist/esm/popover-bd2c2fca.js.map +1 -0
  583. package/dist/esm/scroll-180b53fd.js +2 -0
  584. package/dist/esm/scroll-180b53fd.js.map +1 -0
  585. package/dist/esm/set-attributes_2.entry.js +5 -5
  586. package/dist/esm/set-attributes_2.entry.js.map +1 -0
  587. package/dist/esm/six-alert.entry.js +4 -9
  588. package/dist/esm/six-alert.entry.js.map +1 -0
  589. package/dist/esm/six-avatar.entry.js +4 -6
  590. package/dist/esm/six-avatar.entry.js.map +1 -0
  591. package/dist/esm/six-badge.entry.js +4 -5
  592. package/dist/esm/six-badge.entry.js.map +1 -0
  593. package/dist/esm/six-button.entry.js +9 -11
  594. package/dist/esm/six-button.entry.js.map +1 -0
  595. package/dist/esm/six-card.entry.js +4 -2
  596. package/dist/esm/six-card.entry.js.map +1 -0
  597. package/dist/esm/six-checkbox.entry.js +9 -13
  598. package/dist/esm/six-checkbox.entry.js.map +1 -0
  599. package/dist/esm/six-datepicker.entry.js +33 -86
  600. package/dist/esm/six-datepicker.entry.js.map +1 -0
  601. package/dist/esm/six-details.entry.js +6 -9
  602. package/dist/esm/six-details.entry.js.map +1 -0
  603. package/dist/esm/six-dialog.entry.js +4 -11
  604. package/dist/esm/six-dialog.entry.js.map +1 -0
  605. package/dist/esm/six-drawer.entry.js +4 -16
  606. package/dist/esm/six-drawer.entry.js.map +1 -0
  607. package/dist/esm/six-dropdown_3.entry.js +37 -84
  608. package/dist/esm/six-dropdown_3.entry.js.map +1 -0
  609. package/dist/esm/six-error-page.entry.js +8 -5
  610. package/dist/esm/six-error-page.entry.js.map +1 -0
  611. package/dist/esm/six-file-list-item.entry.js +10 -12
  612. package/dist/esm/six-file-list-item.entry.js.map +1 -0
  613. package/dist/esm/six-file-list.entry.js +4 -2
  614. package/dist/esm/six-file-list.entry.js.map +1 -0
  615. package/dist/esm/six-file-upload.entry.js +30 -17
  616. package/dist/esm/six-file-upload.entry.js.map +1 -0
  617. package/dist/esm/six-footer.entry.js +4 -2
  618. package/dist/esm/six-footer.entry.js.map +1 -0
  619. package/dist/esm/six-form.entry.js +4 -3
  620. package/dist/esm/six-form.entry.js.map +1 -0
  621. package/dist/esm/six-group-label.entry.js +6 -7
  622. package/dist/esm/six-group-label.entry.js.map +1 -0
  623. package/dist/esm/six-header.entry.js +11 -11
  624. package/dist/esm/six-header.entry.js.map +1 -0
  625. package/dist/esm/six-icon-button.entry.js +9 -6
  626. package/dist/esm/six-icon-button.entry.js.map +1 -0
  627. package/dist/esm/six-icon.entry.js +4 -4
  628. package/dist/esm/six-icon.entry.js.map +1 -0
  629. package/dist/esm/six-input.entry.js +21 -23
  630. package/dist/esm/six-input.entry.js.map +1 -0
  631. package/dist/esm/six-item-picker.entry.js +11 -26
  632. package/dist/esm/six-item-picker.entry.js.map +1 -0
  633. package/dist/esm/six-language-switcher.entry.js +6 -4
  634. package/dist/esm/six-language-switcher.entry.js.map +1 -0
  635. package/dist/esm/six-layout-grid.entry.js +5 -2
  636. package/dist/esm/six-layout-grid.entry.js.map +1 -0
  637. package/dist/esm/six-main-container.entry.js +4 -3
  638. package/dist/esm/six-main-container.entry.js.map +1 -0
  639. package/dist/esm/six-menu-divider.entry.js +4 -2
  640. package/dist/esm/six-menu-divider.entry.js.map +1 -0
  641. package/dist/esm/six-menu-label.entry.js +4 -2
  642. package/dist/esm/six-menu-label.entry.js.map +1 -0
  643. package/dist/esm/six-picto.entry.js +4 -5
  644. package/dist/esm/six-picto.entry.js.map +1 -0
  645. package/dist/esm/six-progress-bar.entry.js +4 -4
  646. package/dist/esm/six-progress-bar.entry.js.map +1 -0
  647. package/dist/esm/six-progress-ring.entry.js +5 -4
  648. package/dist/esm/six-progress-ring.entry.js.map +1 -0
  649. package/dist/esm/six-radio.entry.js +8 -10
  650. package/dist/esm/six-radio.entry.js.map +1 -0
  651. package/dist/esm/six-range.entry.js +9 -20
  652. package/dist/esm/six-range.entry.js.map +1 -0
  653. package/dist/esm/six-root.entry.js +9 -10
  654. package/dist/esm/six-root.entry.js.map +1 -0
  655. package/dist/esm/six-search-field.entry.js +9 -10
  656. package/dist/esm/six-search-field.entry.js.map +1 -0
  657. package/dist/esm/six-select.entry.js +31 -57
  658. package/dist/esm/six-select.entry.js.map +1 -0
  659. package/dist/esm/six-sidebar-item-group.entry.js +11 -10
  660. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -0
  661. package/dist/esm/six-sidebar-item.entry.js +4 -5
  662. package/dist/esm/six-sidebar-item.entry.js.map +1 -0
  663. package/dist/esm/six-sidebar.entry.js +9 -11
  664. package/dist/esm/six-sidebar.entry.js.map +1 -0
  665. package/dist/esm/six-spinner.entry.js +4 -3
  666. package/dist/esm/six-spinner.entry.js.map +1 -0
  667. package/dist/esm/six-switch.entry.js +8 -8
  668. package/dist/esm/six-switch.entry.js.map +1 -0
  669. package/dist/esm/six-tab-group.entry.js +4 -4
  670. package/dist/esm/six-tab-group.entry.js.map +1 -0
  671. package/dist/esm/six-tab-panel.entry.js +4 -4
  672. package/dist/esm/six-tab-panel.entry.js.map +1 -0
  673. package/dist/esm/six-tab.entry.js +4 -6
  674. package/dist/esm/six-tab.entry.js.map +1 -0
  675. package/dist/esm/six-table-cell_4.entry.js +21 -16
  676. package/dist/esm/six-table-cell_4.entry.js.map +1 -0
  677. package/dist/esm/six-table.entry.js +31 -32
  678. package/dist/esm/six-table.entry.js.map +1 -0
  679. package/dist/esm/six-tag.entry.js +4 -6
  680. package/dist/esm/six-tag.entry.js.map +1 -0
  681. package/dist/esm/six-textarea.entry.js +17 -20
  682. package/dist/esm/six-textarea.entry.js.map +1 -0
  683. package/dist/esm/six-tile.entry.js +12 -15
  684. package/dist/esm/six-tile.entry.js.map +1 -0
  685. package/dist/esm/six-timepicker.entry.js +29 -78
  686. package/dist/esm/six-timepicker.entry.js.map +1 -0
  687. package/dist/esm/six-timepicker.types-e161a447.js +2 -0
  688. package/dist/esm/six-timepicker.types-e161a447.js.map +1 -0
  689. package/dist/esm/six-tooltip.entry.js +8 -18
  690. package/dist/esm/six-tooltip.entry.js.map +1 -0
  691. package/dist/esm/slot-6f3984c7.js +2 -0
  692. package/dist/esm/slot-6f3984c7.js.map +1 -0
  693. package/dist/esm/types-4b10b413.js +2 -0
  694. package/dist/esm/types-4b10b413.js.map +1 -0
  695. package/dist/esm/ui-library.js +9 -3
  696. package/dist/esm/ui-library.js.map +1 -0
  697. package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
  698. package/dist/types/components/six-file-upload/six-file-upload.d.ts +8 -1
  699. package/dist/types/components/six-item-picker/six-item-picker.d.ts +2 -2
  700. package/dist/types/components/six-language-switcher/six-language-switcher.d.ts +1 -1
  701. package/dist/types/components/six-menu-item/six-menu-item.d.ts +3 -0
  702. package/dist/types/components/six-select/six-select.d.ts +2 -1
  703. package/dist/types/components/six-stage-indicator/six-stage-indicator.d.ts +1 -1
  704. package/dist/types/components/six-table/types.d.ts +10 -10
  705. package/dist/types/components/six-table/util/filter-by.d.ts +1 -1
  706. package/dist/types/components/six-table-header-cell/icons.d.ts +1 -1
  707. package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +2 -2
  708. package/dist/types/components/six-table-header-cell/types.d.ts +2 -11
  709. package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +1 -1
  710. package/dist/types/components.d.ts +1254 -106
  711. package/dist/types/stencil-public-runtime.d.ts +91 -19
  712. package/dist/types/utils/slot.d.ts +1 -1
  713. package/dist/types/utils/types.d.ts +1 -1
  714. package/dist/ui-library/index.esm.js +2 -0
  715. package/dist/ui-library/index.esm.js.map +1 -0
  716. package/dist/ui-library/p-00507165.entry.js +2 -0
  717. package/dist/ui-library/p-00507165.entry.js.map +1 -0
  718. package/dist/ui-library/p-028a2c54.entry.js +2 -0
  719. package/dist/ui-library/p-028a2c54.entry.js.map +1 -0
  720. package/dist/ui-library/p-028a2f77.entry.js +2 -0
  721. package/dist/ui-library/p-028a2f77.entry.js.map +1 -0
  722. package/dist/ui-library/p-0786fa7c.js +2 -1
  723. package/dist/ui-library/p-0786fa7c.js.map +1 -0
  724. package/dist/ui-library/p-0c89817e.entry.js +2 -0
  725. package/dist/ui-library/p-0c89817e.entry.js.map +1 -0
  726. package/dist/ui-library/p-0d1fdc4e.entry.js +2 -0
  727. package/dist/ui-library/p-0d1fdc4e.entry.js.map +1 -0
  728. package/dist/ui-library/p-0d9cbb51.entry.js +2 -0
  729. package/dist/ui-library/p-0d9cbb51.entry.js.map +1 -0
  730. package/dist/ui-library/p-12000282.entry.js +2 -0
  731. package/dist/ui-library/p-12000282.entry.js.map +1 -0
  732. package/dist/ui-library/p-1414a242.entry.js +2 -0
  733. package/dist/ui-library/p-1414a242.entry.js.map +1 -0
  734. package/dist/ui-library/p-14db57aa.entry.js +2 -0
  735. package/dist/ui-library/p-14db57aa.entry.js.map +1 -0
  736. package/dist/ui-library/p-16732ac1.entry.js +2 -0
  737. package/dist/ui-library/p-16732ac1.entry.js.map +1 -0
  738. package/dist/ui-library/p-16b99232.js +3 -0
  739. package/dist/ui-library/p-16b99232.js.map +1 -0
  740. package/dist/ui-library/p-18ea0c56.js +2 -0
  741. package/dist/ui-library/p-18ea0c56.js.map +1 -0
  742. package/dist/ui-library/p-232d43a6.entry.js +2 -0
  743. package/dist/ui-library/p-232d43a6.entry.js.map +1 -0
  744. package/dist/ui-library/p-25a3bf57.js +2 -1
  745. package/dist/ui-library/p-25a3bf57.js.map +1 -0
  746. package/dist/ui-library/p-28e6c2eb.entry.js +2 -0
  747. package/dist/ui-library/p-28e6c2eb.entry.js.map +1 -0
  748. package/dist/ui-library/p-2a02734a.entry.js +2 -0
  749. package/dist/ui-library/p-2a02734a.entry.js.map +1 -0
  750. package/dist/ui-library/p-2a61cc66.entry.js +2 -0
  751. package/dist/ui-library/p-2a61cc66.entry.js.map +1 -0
  752. package/dist/ui-library/p-3c100309.js +2 -0
  753. package/dist/ui-library/p-3c100309.js.map +1 -0
  754. package/dist/ui-library/p-3d5cad2d.entry.js +2 -0
  755. package/dist/ui-library/p-3d5cad2d.entry.js.map +1 -0
  756. package/dist/ui-library/p-3e3edcbc.entry.js +2 -0
  757. package/dist/ui-library/p-3e3edcbc.entry.js.map +1 -0
  758. package/dist/ui-library/p-3efe46cf.entry.js +2 -0
  759. package/dist/ui-library/p-3efe46cf.entry.js.map +1 -0
  760. package/dist/ui-library/p-4b44fa83.entry.js +2 -0
  761. package/dist/ui-library/p-4b44fa83.entry.js.map +1 -0
  762. package/dist/ui-library/p-4bcebd5a.entry.js +2 -0
  763. package/dist/ui-library/p-4bcebd5a.entry.js.map +1 -0
  764. package/dist/ui-library/p-4d4829db.entry.js +2 -0
  765. package/dist/ui-library/p-4d4829db.entry.js.map +1 -0
  766. package/dist/ui-library/p-4f8394d7.js +2 -1
  767. package/dist/ui-library/p-4f8394d7.js.map +1 -0
  768. package/dist/ui-library/p-524e5804.entry.js +2 -0
  769. package/dist/ui-library/p-524e5804.entry.js.map +1 -0
  770. package/dist/ui-library/p-52cb61bd.entry.js +2 -0
  771. package/dist/ui-library/p-52cb61bd.entry.js.map +1 -0
  772. package/dist/ui-library/p-55dc28ad.entry.js +2 -0
  773. package/dist/ui-library/p-55dc28ad.entry.js.map +1 -0
  774. package/dist/ui-library/p-57a84d7f.entry.js +2 -0
  775. package/dist/ui-library/p-57a84d7f.entry.js.map +1 -0
  776. package/dist/ui-library/p-5eb21538.entry.js +2 -0
  777. package/dist/ui-library/p-5eb21538.entry.js.map +1 -0
  778. package/dist/ui-library/p-60c5395c.entry.js +2 -0
  779. package/dist/ui-library/p-60c5395c.entry.js.map +1 -0
  780. package/dist/ui-library/p-694829b8.entry.js +2 -0
  781. package/dist/ui-library/p-694829b8.entry.js.map +1 -0
  782. package/dist/ui-library/p-6cc82df5.entry.js +2 -0
  783. package/dist/ui-library/p-6cc82df5.entry.js.map +1 -0
  784. package/dist/ui-library/p-7115416e.entry.js +2 -0
  785. package/dist/ui-library/p-7115416e.entry.js.map +1 -0
  786. package/dist/ui-library/p-788281d0.entry.js +2 -0
  787. package/dist/ui-library/p-788281d0.entry.js.map +1 -0
  788. package/dist/ui-library/p-7cbc261b.entry.js +2 -0
  789. package/dist/ui-library/p-7cbc261b.entry.js.map +1 -0
  790. package/dist/ui-library/p-80f32909.entry.js +2 -0
  791. package/dist/ui-library/p-80f32909.entry.js.map +1 -0
  792. package/dist/ui-library/p-8187701c.entry.js +2 -0
  793. package/dist/ui-library/p-8187701c.entry.js.map +1 -0
  794. package/dist/ui-library/p-94ab37b2.entry.js +2 -0
  795. package/dist/ui-library/p-94ab37b2.entry.js.map +1 -0
  796. package/dist/ui-library/p-9a860acc.js +2 -1
  797. package/dist/ui-library/p-9a860acc.js.map +1 -0
  798. package/dist/ui-library/p-9eba5c71.entry.js +2 -0
  799. package/dist/ui-library/p-9eba5c71.entry.js.map +1 -0
  800. package/dist/ui-library/p-9f9bef35.entry.js +2 -0
  801. package/dist/ui-library/p-9f9bef35.entry.js.map +1 -0
  802. package/dist/ui-library/p-b1683e9c.entry.js +2 -0
  803. package/dist/ui-library/p-b1683e9c.entry.js.map +1 -0
  804. package/dist/ui-library/p-b1e66136.js +2 -1
  805. package/dist/ui-library/p-b1e66136.js.map +1 -0
  806. package/dist/ui-library/p-b3974ad4.entry.js +2 -0
  807. package/dist/ui-library/p-b3974ad4.entry.js.map +1 -0
  808. package/dist/ui-library/p-b4dfb7cf.js +2 -1
  809. package/dist/ui-library/p-b4dfb7cf.js.map +1 -0
  810. package/dist/ui-library/p-b66c5c48.entry.js +2 -0
  811. package/dist/ui-library/p-b66c5c48.entry.js.map +1 -0
  812. package/dist/ui-library/p-ba6e1f0e.entry.js +2 -0
  813. package/dist/ui-library/p-ba6e1f0e.entry.js.map +1 -0
  814. package/dist/ui-library/p-c799a6bf.entry.js +2 -0
  815. package/dist/ui-library/p-c799a6bf.entry.js.map +1 -0
  816. package/dist/ui-library/p-ccee090e.entry.js +2 -0
  817. package/dist/ui-library/p-ccee090e.entry.js.map +1 -0
  818. package/dist/ui-library/p-cf2bdd34.entry.js +2 -0
  819. package/dist/ui-library/p-cf2bdd34.entry.js.map +1 -0
  820. package/dist/ui-library/p-d12c6092.js +2 -1
  821. package/dist/ui-library/p-d12c6092.js.map +1 -0
  822. package/dist/ui-library/p-dd0ac344.entry.js +2 -0
  823. package/dist/ui-library/p-dd0ac344.entry.js.map +1 -0
  824. package/dist/ui-library/p-def4a925.entry.js +2 -0
  825. package/dist/ui-library/p-def4a925.entry.js.map +1 -0
  826. package/dist/ui-library/p-e0bda772.entry.js +2 -0
  827. package/dist/ui-library/p-e0bda772.entry.js.map +1 -0
  828. package/dist/ui-library/p-e1aed7ed.entry.js +2 -0
  829. package/dist/ui-library/p-e1aed7ed.entry.js.map +1 -0
  830. package/dist/ui-library/p-e4b6264b.entry.js +2 -0
  831. package/dist/ui-library/p-e4b6264b.entry.js.map +1 -0
  832. package/dist/ui-library/p-eb1ec1b7.entry.js +2 -0
  833. package/dist/ui-library/p-eb1ec1b7.entry.js.map +1 -0
  834. package/dist/ui-library/p-eb8f05a9.js +2 -1
  835. package/dist/ui-library/p-eb8f05a9.js.map +1 -0
  836. package/dist/ui-library/p-f65aa796.entry.js +2 -0
  837. package/dist/ui-library/p-f65aa796.entry.js.map +1 -0
  838. package/dist/ui-library/p-f68b5c54.entry.js +2 -0
  839. package/dist/ui-library/p-f68b5c54.entry.js.map +1 -0
  840. package/dist/ui-library/p-f9c50f81.entry.js +2 -0
  841. package/dist/ui-library/p-f9c50f81.entry.js.map +1 -0
  842. package/dist/ui-library/ui-library.esm.js +2 -1
  843. package/dist/ui-library/ui-library.esm.js.map +1 -0
  844. package/loader/index.d.ts +9 -0
  845. package/loader/package.json +1 -0
  846. package/package.json +8 -12
  847. package/readme.md +41 -39
  848. package/dist/cjs/types-581e8ff0.js +0 -15
  849. package/dist/custom-elements/index.d.ts +0 -387
  850. package/dist/esm/types-ed860f7c.js +0 -15
  851. package/dist/ui-library/p-007bc8e8.entry.js +0 -1
  852. package/dist/ui-library/p-044b784e.entry.js +0 -1
  853. package/dist/ui-library/p-0493c926.entry.js +0 -1
  854. package/dist/ui-library/p-07d1e830.js +0 -1
  855. package/dist/ui-library/p-09cb13fa.entry.js +0 -1
  856. package/dist/ui-library/p-0c596054.entry.js +0 -1
  857. package/dist/ui-library/p-1005d1a8.entry.js +0 -1
  858. package/dist/ui-library/p-19ff1079.entry.js +0 -1
  859. package/dist/ui-library/p-1b8dc7b7.entry.js +0 -1
  860. package/dist/ui-library/p-2053c61a.entry.js +0 -1
  861. package/dist/ui-library/p-281e8c2d.entry.js +0 -1
  862. package/dist/ui-library/p-2924f82f.entry.js +0 -1
  863. package/dist/ui-library/p-2d7ed407.entry.js +0 -1
  864. package/dist/ui-library/p-30ebc1e7.js +0 -1
  865. package/dist/ui-library/p-354704e5.entry.js +0 -1
  866. package/dist/ui-library/p-376b8f30.entry.js +0 -1
  867. package/dist/ui-library/p-3a7daff8.entry.js +0 -1
  868. package/dist/ui-library/p-3f577392.entry.js +0 -1
  869. package/dist/ui-library/p-4162dcdd.entry.js +0 -1
  870. package/dist/ui-library/p-4d3a4e93.entry.js +0 -1
  871. package/dist/ui-library/p-4ed023b8.entry.js +0 -1
  872. package/dist/ui-library/p-530ea6ec.entry.js +0 -1
  873. package/dist/ui-library/p-531ab886.entry.js +0 -1
  874. package/dist/ui-library/p-54c48654.entry.js +0 -1
  875. package/dist/ui-library/p-55c64cbc.entry.js +0 -1
  876. package/dist/ui-library/p-5f1c6a5f.js +0 -1
  877. package/dist/ui-library/p-6494e92d.entry.js +0 -1
  878. package/dist/ui-library/p-66601906.entry.js +0 -1
  879. package/dist/ui-library/p-675a8243.entry.js +0 -1
  880. package/dist/ui-library/p-6a4f0542.entry.js +0 -1
  881. package/dist/ui-library/p-6d622ed0.entry.js +0 -1
  882. package/dist/ui-library/p-75297ad7.js +0 -1
  883. package/dist/ui-library/p-76bfa55f.entry.js +0 -1
  884. package/dist/ui-library/p-7fe09462.entry.js +0 -1
  885. package/dist/ui-library/p-88e1e390.entry.js +0 -1
  886. package/dist/ui-library/p-8e8e922b.entry.js +0 -1
  887. package/dist/ui-library/p-90b26447.entry.js +0 -1
  888. package/dist/ui-library/p-93945629.entry.js +0 -1
  889. package/dist/ui-library/p-a98198bd.entry.js +0 -1
  890. package/dist/ui-library/p-aa37e45a.entry.js +0 -1
  891. package/dist/ui-library/p-b391f704.entry.js +0 -1
  892. package/dist/ui-library/p-b9377445.entry.js +0 -1
  893. package/dist/ui-library/p-bf110ea9.entry.js +0 -1
  894. package/dist/ui-library/p-c24292b3.entry.js +0 -1
  895. package/dist/ui-library/p-c4b22513.entry.js +0 -1
  896. package/dist/ui-library/p-c536792e.entry.js +0 -1
  897. package/dist/ui-library/p-cd79de73.entry.js +0 -1
  898. package/dist/ui-library/p-ce02c34f.entry.js +0 -1
  899. package/dist/ui-library/p-d28ac80a.entry.js +0 -1
  900. package/dist/ui-library/p-d724bbc9.entry.js +0 -1
  901. package/dist/ui-library/p-d837e5a8.entry.js +0 -1
  902. package/dist/ui-library/p-dd3cae68.entry.js +0 -1
  903. package/dist/ui-library/p-ea781e94.entry.js +0 -1
  904. package/dist/ui-library/p-eae232c3.entry.js +0 -1
  905. package/dist/ui-library/p-eb0956d2.entry.js +0 -1
  906. package/dist/ui-library/p-f00c1783.entry.js +0 -1
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2605a62.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-96b1af5d.js';
2
2
  import { s as scrollIntoView } from './scroll-180b53fd.js';
3
- import { P as Popover } from './popover-1c7a1139.js';
3
+ import { P as Popover } from './popover-bd2c2fca.js';
4
4
  import { E as EventListeners } from './event-listeners-570a24ea.js';
5
5
  import { b as getSlotChildren, a as getTextContent } from './slot-6f3984c7.js';
6
6
  import { D as DEFAULT_DEBOUNCE_FAST, a as debounce } from './execution-control-1a60d709.js';
@@ -34,7 +34,7 @@ const isTagName = (name) => (el) => (el === null || el === void 0 ? void 0 : el.
34
34
  const isSixMenu = isTagName('six-menu');
35
35
  const isSixMenuItem = isTagName('six-menu-item');
36
36
  let id = 0;
37
- let SixDropdown = class {
37
+ const SixDropdown = class {
38
38
  constructor(hostRef) {
39
39
  registerInstance(this, hostRef);
40
40
  this.sixShow = createEvent(this, "six-dropdown-show", 7);
@@ -47,53 +47,7 @@ let SixDropdown = class {
47
47
  this.componentId = `dropdown-${++id}`;
48
48
  this.isVisible = false;
49
49
  this.hasBeenInitialized = false;
50
- /** Indicates whether or not the dropdown is open. You can use this in lieu of the show/hide methods. */
51
- this.open = false;
52
- /**
53
- * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel
54
- * inside of the viewport.
55
- */
56
- this.placement = 'bottom-start';
57
- /** Determines whether the dropdown should hide when a menu item is selected. */
58
- this.closeOnSelect = true;
59
- /** The distance in pixels from which to offset the panel away from its trigger. */
60
- this.distance = 0;
61
- /** The distance in pixels from which to offset the panel along its trigger. */
62
- this.skidding = 0;
63
- /**
64
- * Enable this option to prevent the panel from being clipped when the component is placed inside a container with
65
- * `overflow: auto|scroll`.
66
- */
67
- this.hoist = false;
68
- /**
69
- * Set to true to allow auto filtering for entries in the dropdown.
70
- * With this flag the dropdown will automatically filter itsel.
71
- * If you need to coordinate the shown elements yourself,
72
- * e.g. because you need to call an endpoint use asyncFilter instead
73
- */
74
- this.filter = false;
75
- /**
76
- * Set to true to allow async filtering.
77
- * When you enter something in the search field the component will only emit an event but not filter any elements itself.
78
- * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself
79
- */
80
- this.asyncFilter = false;
81
- /** The filter's placeholder text. */
82
- this.filterPlaceholder = 'Filter...';
83
- /** By default the search field will be focused when opening a dropdown with filtering enabled. */
84
- this.autofocusFilter = true;
85
- /** The debounce for the filter callbacks. */
86
- this.filterDebounce = DEFAULT_DEBOUNCE_FAST;
87
- /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */
88
- this.disableHideOnEnterAndSpace = false;
89
- /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/
90
- this.options = null;
91
- /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)
92
- * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */
93
- this.virtualScroll = false;
94
50
  this.eventListeners = new EventListeners();
95
- // internal representation of options, so we don't have to make options mutable
96
- this._options = null;
97
51
  this.getMenuItems = () => {
98
52
  if (this._options !== null) {
99
53
  return this._options.map((option) => h("six-menu-item", { value: option.value }, option.label));
@@ -113,6 +67,22 @@ let SixDropdown = class {
113
67
  }
114
68
  this.sixAutoFilterFired.emit({ filterValue: lowerCaseFilterTerm });
115
69
  };
70
+ this.open = false;
71
+ this.placement = 'bottom-start';
72
+ this.closeOnSelect = true;
73
+ this.distance = 0;
74
+ this.skidding = 0;
75
+ this.hoist = false;
76
+ this.containingElement = undefined;
77
+ this.filter = false;
78
+ this.asyncFilter = false;
79
+ this.filterPlaceholder = 'Filter...';
80
+ this.autofocusFilter = true;
81
+ this.filterDebounce = DEFAULT_DEBOUNCE_FAST;
82
+ this.disableHideOnEnterAndSpace = false;
83
+ this.options = null;
84
+ this.virtualScroll = false;
85
+ this._options = null;
116
86
  }
117
87
  get hasFilterEnabled() {
118
88
  return this.filter || this.asyncFilter;
@@ -153,7 +123,7 @@ let SixDropdown = class {
153
123
  this.handleDropdownScroll = this.handleDropdownScroll.bind(this);
154
124
  if (this.hasBeenInitialized && !this.popover) {
155
125
  // there was a weird bug when using six-dropdown inside an ag-grid filter. When closing the ag-grid filter
156
- // disconnectedCallback() is executed. However since componentDidLoad() will not be rerendered the popover was had
126
+ // disconnectedCallback() is executed. However, since componentDidLoad() will not be rerendered the popover had
157
127
  // no longer a connected transitionEnd callback to the dropdown. To fix this, we have this sanity check here,
158
128
  // to re-initialize the popover in case the component has already been initialized but the popover is undefined.
159
129
  this.initializePopover();
@@ -226,12 +196,11 @@ let SixDropdown = class {
226
196
  }
227
197
  handleFilteringForSlotItems(lowerCaseFilterTerm) {
228
198
  const menuItems = this.getMenuItems();
229
- menuItems.forEach((menuItem) => {
230
- var _a, _b;
231
- const lowerCaseMenuItemValue = (_a = menuItem === null || menuItem === void 0 ? void 0 : menuItem.value) === null || _a === void 0 ? void 0 : _a.toLowerCase();
232
- const lowerCaseMenuText = (_b = menuItem === null || menuItem === void 0 ? void 0 : menuItem.innerText) === null || _b === void 0 ? void 0 : _b.toLowerCase();
199
+ menuItems.forEach(async (menuItem) => {
200
+ var _a, _b, _c, _d;
233
201
  // hide all elements which don't contain the entered substring
234
- const elementContainsFilterTerm = (lowerCaseMenuItemValue === null || lowerCaseMenuItemValue === void 0 ? void 0 : lowerCaseMenuItemValue.includes(lowerCaseFilterTerm)) || (lowerCaseMenuText === null || lowerCaseMenuText === void 0 ? void 0 : lowerCaseMenuText.includes(lowerCaseFilterTerm));
202
+ const elementContainsFilterTerm = ((_b = (_a = menuItem === null || menuItem === void 0 ? void 0 : menuItem.value) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(lowerCaseFilterTerm)) ||
203
+ ((_d = (_c = (await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.getTextLabel()))) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === null || _d === void 0 ? void 0 : _d.includes(lowerCaseFilterTerm));
235
204
  menuItem.style.display = elementContainsFilterTerm ? 'unset' : 'none';
236
205
  });
237
206
  }
@@ -474,43 +443,24 @@ const mapToMenuItem = ({ value, label }) => h("six-menu-item", { value: value },
474
443
  const DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING = 5;
475
444
  const DEFAULT_SIX_MENU_ITEM_HEIGHT = 64;
476
445
  const ITEMS_SHOWN_NOT_SET = undefined;
477
- let SixMenu = class {
446
+ const SixMenu = class {
478
447
  constructor(hostRef) {
479
448
  registerInstance(this, hostRef);
480
449
  this.sixMenuItemSelected = createEvent(this, "six-menu-item-selected", 7);
481
450
  this.eventListeners = new EventListeners();
482
451
  this.typeToSelectString = '';
483
- /** Set to true to remove the box-shadow */
452
+ this.handleScrolling = () => {
453
+ // for performance improvements we only update the DOM if the scrollRatio change "enough"
454
+ this.scrollingIndex = Math.floor(this.menuWrapper.scrollTop / this.sixMenuItemHeight);
455
+ };
484
456
  this.removeBoxShadow = false;
485
- /** Set the options to be shown in the dropdown */
486
457
  this.items = null;
487
- /** Defines how many items should be shown. If the number of items is larger than this properties a scrollbar will be shown */
488
458
  this.itemsShown = ITEMS_SHOWN_NOT_SET;
489
- /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)
490
- * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */
491
459
  this.virtualScroll = false;
492
- /**
493
- * Used for virtual scrolling
494
- * Define how many items should be rendered in the DOM when using virtual scrolling
495
- */
496
460
  this.itemSize = 10;
497
- /**
498
- * Used for virtual scrolling
499
- * Define the debounce for listening on scrolling changes in milliseconds.
500
- * The lower the number the more sensitive the component reacts to scrolling changes.
501
- */
502
461
  this.scrollingDebounce = 15;
503
- /**
504
- * Used to calculate which items should be rendered in the DOM
505
- */
506
462
  this.scrollingIndex = 0;
507
- // set a default item height, this variable will be updated with the real value after the first render.
508
- // However, it's necessary to have a default value because we can only fetch the proper hight after the first render
509
463
  this.sixMenuItemHeight = DEFAULT_SIX_MENU_ITEM_HEIGHT;
510
- this.handleScrolling = () => {
511
- // for performance improvements we only update the DOM if the scrollRatio change "enough"
512
- this.scrollingIndex = Math.floor(this.menuWrapper.scrollTop / this.sixMenuItemHeight);
513
- };
514
464
  }
515
465
  connectedCallback() {
516
466
  this.handleClick = this.handleClick.bind(this);
@@ -694,15 +644,12 @@ SixMenu.style = sixMenuCss;
694
644
 
695
645
  const sixMenuItemCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);text-align:left;color:var(--six-input-color);border-radius:var(--six-border-radius-medium);padding:var(--six-spacing-medium) var(--six-spacing-medium);transition:var(--six-transition-fast) fill;user-select:none;white-space:nowrap;cursor:pointer}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto;align-self:center}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(:last-child){margin-right:0.5em}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(:first-child){margin-left:0.5em}.menu-item .menu-item__check{flex:0 0 auto;display:flex;align-items:center;margin-left:var(--six-spacing-small);visibility:hidden;font-size:inherit}.menu-item--checked .menu-item__check{visibility:visible}";
696
646
 
697
- let SixMenuItem = class {
647
+ const SixMenuItem = class {
698
648
  constructor(hostRef) {
699
649
  registerInstance(this, hostRef);
700
650
  this.hasFocus = false;
701
- /** Set to true to draw the item in a checked state. */
702
651
  this.checked = false;
703
- /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */
704
652
  this.value = '';
705
- /** Set to true to draw the menu item in a disabled state. */
706
653
  this.disabled = false;
707
654
  }
708
655
  connectedCallback() {
@@ -719,6 +666,10 @@ let SixMenuItem = class {
719
666
  async removeFocus() {
720
667
  this.menuItem.blur();
721
668
  }
669
+ /** Returns a text label based on the contents of the menu item's default slot. */
670
+ getTextLabel() {
671
+ return Promise.resolve(getTextContent(this.defaultSlot));
672
+ }
722
673
  handleBlur() {
723
674
  this.hasFocus = false;
724
675
  }
@@ -737,9 +688,11 @@ let SixMenuItem = class {
737
688
  'menu-item--checked': this.checked,
738
689
  'menu-item--disabled': this.disabled,
739
690
  'menu-item--focused': this.hasFocus,
740
- }, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabIndex: !this.disabled ? 0 : null, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("span", { part: "prefix", class: "menu-item__prefix" }, h("slot", { name: "prefix" })), h("span", { part: "label", class: "menu-item__label" }, h("slot", null)), h("span", { part: "suffix", class: "menu-item__suffix" }, h("slot", { name: "suffix" })), h("span", { part: "checked-icon", class: "menu-item__check" }, h("six-icon", { size: "small", "aria-hidden": "true" }, "check"))));
691
+ }, role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false', "aria-checked": this.checked ? 'true' : 'false', tabIndex: !this.disabled ? 0 : null, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("span", { part: "prefix", class: "menu-item__prefix" }, h("slot", { name: "prefix" })), h("span", { part: "label", class: "menu-item__label" }, h("slot", { ref: (el) => (this.defaultSlot = el) })), h("span", { part: "suffix", class: "menu-item__suffix" }, h("slot", { name: "suffix" })), h("span", { part: "checked-icon", class: "menu-item__check" }, h("six-icon", { size: "small", "aria-hidden": "true" }, "check"))));
741
692
  }
742
693
  };
743
694
  SixMenuItem.style = sixMenuItemCss;
744
695
 
745
696
  export { SixDropdown as six_dropdown, SixMenu as six_menu, SixMenuItem as six_menu_item };
697
+
698
+ //# sourceMappingURL=six-dropdown_3.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"six-dropdown.six-menu.six-menu-item.entry.js","mappings":";;;;;;;SAAgB,UAAU,CAAC,EAAe;EACxC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;EAC7B,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC;AACvB,CAAC;SAEe,yBAAyB,CAAC,EAAe;;EAEvD,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE;IAClB,OAAO,EAAE,CAAC;GACX;;EAGD,IAAI,EAAE,CAAC,UAAU,EAAE;IACjB,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAgB,CAAC;IACxF,IAAI,mBAAmB,EAAE;MACvB,OAAO,mBAAmB,CAAC;KAC5B;GACF;;EAGD,IAAI,EAAE,CAAC,QAAQ,EAAE;IACf,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;GAC3D;EAED,OAAO,IAAI,CAAC;AACd;;ACzBA,MAAM,cAAc,GAAG,8wCAA8wC;;ACyBryC,MAAM,SAAS,GACb,CAAC,IAAY,KACb,CAAoB,EAAM,K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BAAoB,EAAE,IAAI,CAAC,QAAQ;OACpC,EACD,IAAI,EAAC,UAAU,mBACA,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,kBACjC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,EAC7C,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAG,IAAI,EACnC,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,YAAY,EAAE,IAAI,CAAC,gBAAgB,IAEnC,YAAM,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB,IAC3C,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EAEP,YAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,kBAAkB,IACzC,YAAM,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,WAAW,GAAG,EAAqB,CAAC,GAAI,CAC5D,EAEP,YAAM,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB,IAC3C,YAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EAEP,YAAM,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,kBAAkB,IAChD,gBAAU,IAAI,EAAC,OAAO,iBAAa,MAAM,YAE9B,CACN,CACH,EACN;GACH;;;;;;","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","./src/components/six-menu/six-menu.scss?tag=six-menu&encapsulation=shadow","./src/components/six-menu/six-menu.tsx","./src/components/six-menu-item/six-menu-item.scss?tag=six-menu-item&encapsulation=shadow","./src/components/six-menu-item/six-menu-item.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot) {\n const tabbableShadowChild = [...el.shadowRoot.children].find(isTabbable) as HTMLElement;\n if (tabbableShadowChild) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children) {\n return [...el.children].map(getNearestTabbableElement)[0];\n }\n\n return null;\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: auto;\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 { scrollIntoView } from '../../utils/scroll';\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 accessibleTrigger: HTMLElement;\n componentId = `dropdown-${++id}`;\n isVisible = false;\n panel: HTMLElement;\n positioner: HTMLElement;\n popover: Popover;\n trigger: HTMLElement;\n hasBeenInitialized = false;\n\n // the input element shown in the dropdown when filter is set to true\n filterInputElement: HTMLSixInputElement;\n\n @Element() host: HTMLSixDropdownElement;\n\n /** Indicates whether or not 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 of 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[] | null = null;\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' })\n sixAutoFilterFired: 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 readonly eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State()\n _options: SixMenuItemData[] = null;\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 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 this._options = [...this.options];\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 (this.options !== null) {\n this._options = [...this.options];\n }\n\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n this.handleMenuItemActivate = this.handleMenuItemActivate.bind(this);\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleTriggerClick = this.handleTriggerClick.bind(this);\n this.handleTriggerKeyDown = this.handleTriggerKeyDown.bind(this);\n this.handleTriggerKeyUp = this.handleTriggerKeyUp.bind(this);\n this.handleTriggerSlotChange = this.handleTriggerSlotChange.bind(this);\n this.handleDropdownScroll = this.handleDropdownScroll.bind(this);\n\n if (this.hasBeenInitialized && !this.popover) {\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 const onAfterHide = () => {\n if (this.filter) {\n this.filterInputElement.value = '';\n\n if (this._options !== null) {\n this._options = [...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) {\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 this.eventListeners.add(this.filterInputElement, 'six-input-input', debounce(callback, this.filterDebounce));\n }\n\n getMenuItems = (): HTMLSixMenuItemElement[] => {\n if (this._options !== null) {\n return this._options.map((option) => <six-menu-item value={option.value}>{option.label}</six-menu-item>);\n }\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 handleFilterInputChange = () => {\n const lowerCaseFilterTerm = this.filterInputElement.value?.toLowerCase()?.trim() || '';\n\n if (this._options) {\n this.handleFilteringForAttributeItems(lowerCaseFilterTerm);\n } else {\n this.handleFilteringForSlotItems(lowerCaseFilterTerm);\n }\n\n this.sixAutoFilterFired.emit({ filterValue: lowerCaseFilterTerm });\n };\n\n private handleFilteringForAttributeItems(lowerCaseFilterTerm: string) {\n if (lowerCaseFilterTerm === '') {\n this._options = [...this.options];\n return;\n }\n\n this._options = 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 = null;\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) {\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) {\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 focusOnTrigger() {\n const [trigger] = getSlotChildren<HTMLSixButtonElement>(this.trigger);\n if (trigger) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n getMenu() {\n const [menu] = getSlotChildren<HTMLSixMenuElement>(this.panel).filter(isSixMenu);\n return menu;\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) {\n return;\n }\n this.popover.reposition();\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed\n if (event.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot.activeElement) {\n if (event.key === 'ArrowDown') {\n const item = this.getMenuItems().find((item) => item.style.display !== 'none');\n if (item) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && isSixMenuItem(document.activeElement)) {\n event.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of 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 handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of 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 handleMenuItemActivate(event: CustomEvent) {\n const item = event.target as HTMLSixMenuItemElement;\n scrollIntoView(item, this.panel);\n }\n\n handlePanelSelect(event: CustomEvent) {\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 handleTriggerClick() {\n this.open ? this.hide() : this.show();\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n const menu = this.getMenu();\n const menuItems = menu ? [...menu.querySelectorAll('six-menu-item')] : null;\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\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 // 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 // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem) {\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 && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n handleDropdownScroll() {\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 updateAccessibleTrigger() {\n const [accessibleTrigger] = getSlotChildren(this.trigger).map(getNearestTabbableElement);\n\n if (accessibleTrigger) {\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._options && (\n <six-menu part=\"menu\" items={this._options} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu {\n padding: 0 0;\n border: none;\n box-shadow: var(--six-elevation-2dp);\n\n &:focus {\n outline: none;\n }\n\n &--noshadow {\n box-shadow: none;\n }\n\n &__wrapper {\n &--scrollable {\n overflow-y: auto;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\nimport { StyleDeclaration } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce } from '../../utils/execution-control';\n\nexport interface SixMenuItemData {\n label: string;\n value: string;\n}\n\nexport interface SixMenuItemSelectedPayload {\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nconst isFocusedMenuItem = (menuItem: HTMLSixMenuItemElement) =>\n menuItem?.shadowRoot?.querySelector('.menu-item')?.classList?.contains('menu-item--focused');\n\nconst isSIXMenuItemElement = (el?: Element): el is HTMLSixMenuItemElement =>\n el?.tagName.toLowerCase() === 'six-menu-item';\n\nconst mapToMenuItem = ({ value, label }) => <six-menu-item value={value}>{label}</six-menu-item>;\n\nconst DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING = 5;\n\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT = 64;\n\nconst ITEMS_SHOWN_NOT_SET = undefined;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu's content, including menu items, menu dividers, and menu labels.\n *\n * @part base - The component's base wrapper.\n */\n@Component({\n tag: 'six-menu',\n styleUrl: 'six-menu.scss',\n shadow: true,\n})\nexport class SixMenu {\n private readonly eventListeners = new EventListeners();\n\n menu: HTMLElement;\n menuWrapper: HTMLElement;\n typeToSelectString = '';\n typeToSelectTimeout: NodeJS.Timeout;\n\n @Element() host: HTMLSixMenuElement;\n\n /** Emitted when a menu item is selected. */\n @Event({ eventName: 'six-menu-item-selected' }) sixMenuItemSelected: EventEmitter<SixMenuItemSelectedPayload>;\n\n /** Set to true to remove the box-shadow */\n @Prop() removeBoxShadow: boolean = false;\n\n /** Set the options to be shown in the dropdown */\n @Prop() items: SixMenuItemData[] | null = null;\n\n /** Defines how many items should be shown. If the number of items is larger than this properties a scrollbar will be shown */\n @Prop() itemsShown?: number = ITEMS_SHOWN_NOT_SET;\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: boolean = false;\n\n /**\n * Used for virtual scrolling\n * Define how many items should be rendered in the DOM when using virtual scrolling\n */\n @Prop() itemSize: number = 10;\n\n /**\n * Used for virtual scrolling\n * Define the debounce for listening on scrolling changes in milliseconds.\n * The lower the number the more sensitive the component reacts to scrolling changes.\n */\n @Prop() scrollingDebounce: number = 15;\n\n /**\n * Used to calculate which items should be rendered in the DOM\n */\n @State()\n private scrollingIndex: number = 0;\n\n // set a default item height, this variable will be updated with the real value after the first render.\n // However, it's necessary to have a default value because we can only fetch the proper hight after the first render\n @State()\n sixMenuItemHeight = DEFAULT_SIX_MENU_ITEM_HEIGHT;\n\n connectedCallback() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n componentWillLoad() {\n if (this.items === null) {\n return;\n }\n }\n\n private handleScrolling = () => {\n // for performance improvements we only update the DOM if the scrollRatio change \"enough\"\n this.scrollingIndex = Math.floor(this.menuWrapper.scrollTop / this.sixMenuItemHeight);\n };\n\n componentDidLoad() {\n this.setupForVirtualScrollingAfterRendering();\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /**\n * Initiates type-to-select logic, which automatically selects an option based on what the user is currently typing.\n * The key passed will be appended to the internal query and the selection will be updated. After a brief period, the\n * internal query is cleared automatically. This method is intended to be used with the keydown event. Useful for\n * enabling type-to-select when the menu doesn't have focus.\n */\n @Method()\n async typeToSelect(key: string) {\n clearTimeout(this.typeToSelectTimeout);\n this.typeToSelectTimeout = setTimeout(() => (this.typeToSelectString = ''), 750);\n this.typeToSelectString += key.toLowerCase();\n const items = this.getItems();\n for (const item of items) {\n const slot = item.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement;\n const label = getTextContent(slot).toLowerCase().trim();\n if (label.substring(0, this.typeToSelectString.length) === this.typeToSelectString) {\n item.setFocus();\n break;\n }\n }\n }\n\n private getItemsShown() {\n const defaultItemsShown = this.virtualScroll\n ? DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING\n : ITEMS_SHOWN_NOT_SET;\n\n return this.itemsShown ?? defaultItemsShown;\n }\n\n private setupForVirtualScrollingAfterRendering() {\n if (!this.virtualScroll) {\n return;\n }\n\n this.eventListeners.add(this.menuWrapper, 'scroll', debounce(this.handleScrolling, this.scrollingDebounce));\n\n // set menu height to proper height once the item is rendered.\n const menuItemHeight = this.menu?.querySelector('six-menu-item')?.clientHeight;\n if (menuItemHeight && menuItemHeight > 0) {\n this.sixMenuItemHeight = menuItemHeight;\n }\n }\n\n getItems() {\n if (this.items !== null && this.items !== undefined) {\n return this.items.map(mapToMenuItem);\n }\n\n const slot = this.menu.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter((el) => isSIXMenuItemElement(el) && !el.disabled);\n }\n\n private getActiveItemIndex() {\n const items = this.getItems();\n const selectedItem = this.getActiveItem();\n const itemIndex = items.indexOf(selectedItem);\n\n if (itemIndex > -1) {\n return itemIndex;\n }\n\n const sixMenuItems = this.extractItemsFromDOM();\n return sixMenuItems.findIndex(isFocusedMenuItem);\n }\n\n getActiveItem() {\n const activeElement = this.getItems().find((i) => i === document.activeElement);\n\n if (activeElement) {\n return activeElement;\n }\n\n return this.extractItemsFromDOM()?.find(isFocusedMenuItem);\n }\n\n private extractItemsFromDOM() {\n return Array.from(this.host?.shadowRoot?.querySelectorAll('six-menu-item'));\n }\n\n setActiveItem(item: HTMLSixMenuItemElement) {\n item.setFocus();\n }\n\n handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const clickedItem = target.closest('six-menu-item');\n if (clickedItem && !clickedItem.disabled) {\n this.sixMenuItemSelected.emit({ name: clickedItem.value, item: clickedItem });\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Make a selection when pressing enter\n if (event.key === 'Enter') {\n const activeItem = this.getActiveItem();\n event.preventDefault();\n\n if (activeItem) {\n this.sixMenuItemSelected.emit({ name: activeItem.value, item: activeItem });\n }\n }\n\n // Prevent scrolling when space is pressed\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n // Move the selection when pressing down or up\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n const items = this.items === null ? this.getItems() : this.extractItemsFromDOM();\n\n let indexOfActiveItem = this.getActiveItemIndex();\n\n if (items.length) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n indexOfActiveItem++;\n } else if (event.key === 'ArrowUp') {\n indexOfActiveItem--;\n } else if (event.key === 'Home') {\n indexOfActiveItem = 0;\n } else if (event.key === 'End') {\n indexOfActiveItem = items.length - 1;\n }\n\n if (indexOfActiveItem < 0) indexOfActiveItem = 0;\n if (indexOfActiveItem > items.length - 1) indexOfActiveItem = items.length - 1;\n\n this.setActiveItem(items[indexOfActiveItem]);\n\n return;\n }\n }\n\n void this.typeToSelect(event.key);\n }\n\n private getMenuWrapperStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.getItemsShown() > 0) {\n // calculate the proper height to show the correct number of items\n styles.height = `${this.getItemsShown() * this.sixMenuItemHeight}px`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getMenuContainerStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll) {\n // calculate height of content are if all items would be rendered so the scrollbar has the proper size\n styles.transform = `translateY(${this.sixMenuItemHeight * this.scrollingIndex}px)`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getScrollbarGhostStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll && this.items !== null) {\n styles.height = `${this.items.length * this.sixMenuItemHeight - this.itemSize * this.sixMenuItemHeight}px`;\n }\n\n return {\n ...styles,\n };\n }\n\n private renderItems() {\n if (this.items === undefined || this.items === null) {\n return;\n }\n\n if (!this.virtualScroll) {\n return this.items.map(mapToMenuItem);\n }\n\n return this.items\n .slice(this.scrollingIndex, Math.min(this.items.length, this.itemSize + this.scrollingIndex))\n .map(mapToMenuItem);\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuWrapper = el)}\n style={this.getMenuWrapperStyle()}\n part=\"wrapper\"\n class={{\n menu: true,\n 'menu--noshadow': this.removeBoxShadow,\n 'menu__wrapper--scrollable': this.getItemsShown() > 0,\n }}\n >\n <div\n ref={(el) => (this.menu = el)}\n part=\"base\"\n role=\"menu\"\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n tabIndex={0}\n style={this.getMenuContainerStyle()}\n >\n <slot />\n {this.renderItems()}\n </div>\n {this.virtualScroll && <div style={this.getScrollbarGhostStyle()} />}\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n text-align: left;\n color: var(--six-input-color);\n border-radius: var(--six-border-radius-medium);\n padding: var(--six-spacing-medium) var(--six-spacing-medium);\n transition: var(--six-transition-fast) fill;\n user-select: none;\n white-space: nowrap;\n cursor: pointer;\n\n &.menu-item--focused:not(.menu-item--disabled) {\n outline: none;\n background-color: var(--six-menu-item-background-color);\n }\n\n &.menu-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n .menu-item__label {\n flex: 1 1 auto;\n align-self: center;\n }\n\n .menu-item__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:last-child) {\n margin-right: 0.5em;\n }\n }\n\n .menu-item__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:first-child) {\n margin-left: 0.5em;\n }\n }\n\n .menu-item__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: var(--six-spacing-small);\n visibility: hidden;\n font-size: inherit;\n }\n}\n\n.menu-item--checked .menu-item__check {\n visibility: visible;\n}\n","import { Component, Method, Prop, State, h } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu item's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @part base - The component's base wrapper.\n * @part checked-icon - The container that wraps the checked icon.\n * @part prefix - The prefix container.\n * @part label - The menu item label.\n * @part suffix - The suffix container.\n */\n\n@Component({\n tag: 'six-menu-item',\n styleUrl: 'six-menu-item.scss',\n shadow: true,\n})\nexport class SixMenuItem {\n menuItem: HTMLElement;\n defaultSlot: HTMLSlotElement;\n\n @State() hasFocus = false;\n\n /** Set to true to draw the item in a checked state. */\n @Prop({ reflect: true }) checked = false;\n\n /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the menu item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.menuItem.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.menuItem.blur();\n }\n\n /** Returns a text label based on the contents of the menu item's default slot. */\n @Method()\n getTextLabel() {\n return Promise.resolve(getTextContent(this.defaultSlot));\n }\n\n handleBlur() {\n this.hasFocus = false;\n }\n\n handleFocus() {\n this.hasFocus = true;\n }\n\n handleMouseEnter() {\n this.setFocus();\n }\n\n handleMouseLeave() {\n this.removeFocus();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuItem = el)}\n part=\"base\"\n class={{\n 'menu-item': true,\n 'menu-item--checked': this.checked,\n 'menu-item--disabled': this.disabled,\n 'menu-item--focused': this.hasFocus,\n }}\n role=\"menuitem\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-checked={this.checked ? 'true' : 'false'}\n tabIndex={!this.disabled ? 0 : null}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n <span part=\"prefix\" class=\"menu-item__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <span part=\"label\" class=\"menu-item__label\">\n <slot ref={(el) => (this.defaultSlot = el as HTMLSlotElement)} />\n </span>\n\n <span part=\"suffix\" class=\"menu-item__suffix\">\n <slot name=\"suffix\" />\n </span>\n\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <six-icon size=\"small\" aria-hidden=\"true\">\n check\n </six-icon>\n </span>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-a2605a62.js';
1
+ import { r as registerInstance, h } from './index-96b1af5d.js';
2
2
 
3
3
  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)}";
4
4
 
@@ -45,13 +45,14 @@ const DESCRIPTION_PER_ERROR_CODE = {
45
45
  ],
46
46
  },
47
47
  };
48
- let SixErrorPage = class {
48
+ const SixErrorPage = class {
49
49
  constructor(hostRef) {
50
50
  registerInstance(this, hostRef);
51
- /**
52
- * Defines language and thus displays the proper error page in the selected language.
53
- */
51
+ this.errorCode = undefined;
54
52
  this.language = 'en';
53
+ this.customTitle = undefined;
54
+ this.customDescription = undefined;
55
+ this.customIcon = undefined;
55
56
  }
56
57
  getIconName() {
57
58
  if (this.customIcon !== undefined) {
@@ -99,3 +100,5 @@ let SixErrorPage = class {
99
100
  SixErrorPage.style = sixErrorPageCss;
100
101
 
101
102
  export { SixErrorPage as six_error_page };
103
+
104
+ //# sourceMappingURL=six-error-page.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"six-error-page.entry.js","mappings":";;AAAA,MAAM,eAAe,GAAG,mWAAmW;;ACE3X,IAAK,UAIJ;AAJD,WAAK,UAAU;EACb,uDAAe,CAAA;EACf,uDAAe,CAAA;EACf,+EAA2B,CAAA;AAC7B,CAAC,EAJI,UAAU,KAAV,UAAU,QAId;AACD,MAAM,oBAAoB,GAAG;EAC3B,CAAC,UAAU,CAAC,SAAS,GAAG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IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;MAClC,OAAO,IAAI,CAAC,WAAW,CAAC;KACzB;IAED,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;MAChC,OAAO;KACR;IAED,OAAO,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GAC5D;EAEO,mBAAmB;IACzB,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;MACxE,OAAO;KACR;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IAC5C,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,YAAY,KAAK,eAAM,YAAY,CAAO,CAAC,CAAC;GACtE;EAEO,eAAe;IACrB,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;MACxC,OAAO,IAAI,CAAC,iBAAiB,CAAC;KAC/B;IAED,OAAO,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GAClE;EAED,MAAM;IACJ,QACE,WAAK,IAAI,EAAC,WAAW,IACnB,WAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,gBAAgB,IAC/D,iBAAW,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,MAAM,IAC3D,IAAI,CAAC,WAAW,EAAE,CACT,CACR,EACN,WAAK,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,IAC5C,IAAI,CAAC,aAAa,EAAE,CACjB,EACN,WAAK,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,aAAa,IACxD,IAAI,CAAC,mBAAmB,EAAE,CACvB,CACF,EACN;GACH;;;;;;","names":[],"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\nenum ERROR_CODE {\n FORBIDDEN = 403,\n NOT_FOUND = 404,\n INTERNAL_SERVER_ERROR = 500,\n}\nconst TITLE_PER_ERROR_CODE = {\n [ERROR_CODE.FORBIDDEN]: {\n en: 'Access Denied',\n de: 'Kein Zugriff',\n },\n [ERROR_CODE.NOT_FOUND]: {\n en: 'Not Found',\n de: 'Seite nicht gefunden',\n },\n [ERROR_CODE.INTERNAL_SERVER_ERROR]: {\n en: 'Ooops!',\n de: 'Ups!',\n },\n};\n\nconst DESCRIPTION_PER_ERROR_CODE = {\n [ERROR_CODE.FORBIDDEN]: {\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 [ERROR_CODE.NOT_FOUND]: {\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 [ERROR_CODE.INTERNAL_SERVER_ERROR]: {\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: number;\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 !== undefined) {\n return this.customIcon;\n }\n\n if (this.errorCode === undefined) {\n return;\n }\n\n if (this.errorCode === ERROR_CODE.FORBIDDEN) {\n return 'lock';\n }\n\n if (this.errorCode === ERROR_CODE.NOT_FOUND) {\n return 'find-in-page';\n }\n\n if (this.errorCode === ERROR_CODE.INTERNAL_SERVER_ERROR) {\n return 'sentiment-dissatisfied';\n }\n }\n\n private getErrorTitle() {\n if (this.customTitle !== undefined) {\n return this.customTitle;\n }\n\n if (this.errorCode === undefined) {\n return;\n }\n\n return TITLE_PER_ERROR_CODE[this.errorCode][this.language];\n }\n\n private getErrorDescription() {\n if (this.errorCode === undefined && this.customDescription === undefined) {\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 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,22 +1,12 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-a2605a62.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-96b1af5d.js';
2
2
 
3
3
  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
4
 
5
- let SixFileListItem = class {
5
+ const SixFileListItem = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.downloadEvent = createEvent(this, "six-file-list-item-download", 7);
9
9
  this.removeEvent = createEvent(this, "six-file-list-item-remove", 7);
10
- /** An id to clearly identify the file */
11
- this.identifier = '';
12
- /** The filename */
13
- this.name = '';
14
- /** The date when the file was uploaded */
15
- this.date = '';
16
- /** Set to true if you don't want to allow to download this file */
17
- this.nodownload = false;
18
- /** Set to true if you don't want to allow to delete this file */
19
- this.nodelete = false;
20
10
  this.downloadFile = () => {
21
11
  if (this.nodownload) {
22
12
  return;
@@ -29,6 +19,12 @@ let SixFileListItem = class {
29
19
  }
30
20
  this.removeEvent.emit({ fileId: this.identifier, name: this.name });
31
21
  };
22
+ this.identifier = '';
23
+ this.name = '';
24
+ this.date = '';
25
+ this.size = undefined;
26
+ this.nodownload = false;
27
+ this.nodelete = false;
32
28
  }
33
29
  render() {
34
30
  return (h("div", { class: "six-files-list-item" }, h("span", { class: {
@@ -43,3 +39,5 @@ let SixFileListItem = class {
43
39
  SixFileListItem.style = sixFileListItemCss;
44
40
 
45
41
  export { SixFile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U,aAGf,CACP,EACN;GACH;;;;;;","names":[],"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 downloadFile = () => {\n if (this.nodownload) {\n return;\n }\n\n this.downloadEvent.emit({ fileId: this.identifier, name: this.name });\n };\n\n 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 !== undefined && <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,8 +1,8 @@
1
- import { r as registerInstance, h } from './index-a2605a62.js';
1
+ import { r as registerInstance, h } from './index-96b1af5d.js';
2
2
 
3
3
  const sixFileListCss = ".six-files-list__container{padding:1rem}.six-files-list__container :last-child{padding-bottom:0}";
4
4
 
5
- let SixFileList = class {
5
+ const SixFileList = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  }
@@ -13,3 +13,5 @@ let SixFileList = class {
13
13
  SixFileList.style = sixFileListCss;
14
14
 
15
15
  export { SixFileList as six_file_list };
16
+
17
+ //# sourceMappingURL=six-file-list.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"six-file-list.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,kGAAkG;;MCY5G,WAAW;;;;EACtB,MAAM;IACJ,QACE,WAAK,KAAK,EAAC,2BAA2B,IACpC,eAAQ,CACJ,EACN;GACH;;;;;;","names":[],"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,34 +1,38 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a2605a62.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-96b1af5d.js';
2
2
 
3
3
  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}";
4
4
 
5
- let SixFileUpload = class {
5
+ const SixFileUpload = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.fileUploadSuccessEvent = createEvent(this, "six-file-upload-success", 7);
9
9
  this.fileUploadFailureEvent = createEvent(this, "six-file-upload-failure", 7);
10
- this.isOver = false;
11
- /** Set to true if file control should be small. */
12
- this.compact = false;
13
- /** Set when button is disabled. */
14
- this.disabled = false;
15
- /** Allowed max file size in bytes. */
16
- this.maxFileSize = undefined;
17
10
  this.handleFiles = (files) => {
18
11
  if (this.disabled) {
19
12
  return;
20
13
  }
21
- const file = files.item(0);
22
- if (!file) {
14
+ if (files.length === 0) {
23
15
  return;
24
16
  }
25
- if (this.accept && this.accept !== file.type) {
26
- return this.fileUploadFailureEvent.emit({ reason: 'File has invalid MIME type.' });
17
+ if (!this.multiple && files.length > 1) {
18
+ return this.fileUploadFailureEvent.emit({ reason: 'Only one file is allowed.' });
27
19
  }
28
- if (this.maxFileSize && file.size > this.maxFileSize) {
29
- return this.fileUploadFailureEvent.emit({ reason: 'File is too big.' });
20
+ for (const file of files) {
21
+ if (!file) {
22
+ return;
23
+ }
24
+ const acceptedTypesList = this.accept && this.accept.replace(/\s/g, '').split(',');
25
+ if (this.accept && acceptedTypesList.indexOf(file.type) === -1) {
26
+ const reason = files.length > 1 ? 'One or more files have invalid MIME type.' : 'File has invalid MIME type.';
27
+ return this.fileUploadFailureEvent.emit({ reason });
28
+ }
29
+ if (this.maxFileSize && file.size > this.maxFileSize) {
30
+ const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';
31
+ return this.fileUploadFailureEvent.emit({ reason });
32
+ }
30
33
  }
31
- this.fileUploadSuccessEvent.emit({ file });
34
+ const objectToEmit = this.multiple ? { files } : { file: files.item(0) };
35
+ this.fileUploadSuccessEvent.emit(objectToEmit);
32
36
  };
33
37
  this.onChange = () => {
34
38
  var _a;
@@ -38,6 +42,13 @@ let SixFileUpload = class {
38
42
  this.fileInput.value = '';
39
43
  }
40
44
  };
45
+ this.isOver = false;
46
+ this.compact = false;
47
+ this.label = undefined;
48
+ this.disabled = false;
49
+ this.accept = undefined;
50
+ this.multiple = undefined;
51
+ this.maxFileSize = undefined;
41
52
  }
42
53
  dragenterHandler() {
43
54
  if (!this.disabled) {
@@ -94,10 +105,12 @@ let SixFileUpload = class {
94
105
  'six-file-upload__drop-zone': true,
95
106
  'six-file-upload__drop-zone--hover': this.isOver,
96
107
  'six-file-upload__drop-zone--compact': this.compact,
97
- } }, h("span", null, this.renderLabel()), h("input", { class: "six-file-upload__input", type: "file", name: "resume", disabled: this.disabled, accept: this.accept, onChange: this.onChange, ref: (el) => (this.fileInput = el) })))));
108
+ } }, 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) })))));
98
109
  }
99
110
  get host() { return getElement(this); }
100
111
  };
101
112
  SixFileUpload.style = sixFileUploadCss;
102
113
 
103
114
  export { SixFileUpload as six_file_upload };
115
+
116
+ //# sourceMappingURL=six-file-upload.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"six-file-upload.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,u0DAAu0D;;MC2Bn1D,aAAa;;;;;IAgExB,gBAAW,GAAG,CAAC,KAAe;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE;QACjB,OAAO;OACR;MAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO;OACR;MAED,IAAI,CAAC,IAAI,CA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C,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAClC,CACE,CACI,CACR,EACN;GACH;;;;;;;","names":[],"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 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: boolean = false;\n\n /** Accepted MIME-Types. */\n @Prop() readonly accept: string;\n\n /** More than one file allowed. */\n @Prop() readonly multiple: boolean;\n\n /** Allowed max file size in bytes. */\n @Prop() readonly maxFileSize: number | undefined = undefined;\n\n /** Triggers when a file is added. */\n @Event({ eventName: 'six-file-upload-success' })\n readonly fileUploadSuccessEvent: 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' })\n readonly fileUploadFailureEvent: 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) {\n this.handleFiles(dataTransfer.files);\n }\n }\n }\n\n handleFiles = (files: FileList) => {\n if (this.disabled) {\n return;\n }\n\n if (files.length === 0) {\n return;\n }\n\n if (!this.multiple && files.length > 1) {\n return this.fileUploadFailureEvent.emit({ reason: 'Only one file is allowed.' });\n }\n\n for (const file of files) {\n if (!file) {\n return;\n }\n\n const acceptedTypesList = this.accept && this.accept.replace(/\\s/g, '').split(',');\n\n if (this.accept && 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.fileUploadFailureEvent.emit({ reason });\n }\n\n if (this.maxFileSize && file.size > this.maxFileSize) {\n const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';\n return this.fileUploadFailureEvent.emit({ reason });\n }\n }\n\n const objectToEmit: SixFileUploadSuccessPayload = this.multiple ? { files } : { file: files.item(0) };\n\n this.fileUploadSuccessEvent.emit(objectToEmit);\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 preventDefaults(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n onChange = () => {\n if (this.fileInput?.files) {\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}