@six-group/ui-library 0.0.0-insider.6705a47 → 0.0.0-insider.68b07ac

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 (835) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/error-messages-6e8049a4.js +119 -0
  4. package/dist/cjs/error-messages-6e8049a4.js.map +1 -0
  5. package/dist/cjs/{form-control-f9bc25dd.js → form-control-de259450.js} +2 -2
  6. package/dist/cjs/{form-control-f9bc25dd.js.map → form-control-de259450.js.map} +1 -1
  7. package/dist/cjs/{index-3baddcdc.js → index-1f707a55.js} +127 -76
  8. package/dist/cjs/index-1f707a55.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +54 -101
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +5 -3
  12. package/dist/cjs/loader.cjs.js.map +1 -1
  13. package/dist/cjs/{modal-3ce015be.js → modal-bd7fc5bc.js} +1 -18
  14. package/dist/cjs/modal-bd7fc5bc.js.map +1 -0
  15. package/dist/cjs/six-alert.cjs.entry.js +42 -9
  16. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  17. package/dist/cjs/six-avatar.cjs.entry.js +5 -4
  18. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  19. package/dist/cjs/six-badge.cjs.entry.js +6 -5
  20. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  21. package/dist/cjs/six-button.cjs.entry.js +8 -6
  22. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  23. package/dist/cjs/six-card.cjs.entry.js +5 -4
  24. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  25. package/dist/cjs/six-checkbox_2.cjs.entry.js +192 -0
  26. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -0
  27. package/dist/cjs/six-datepicker.cjs.entry.js +43 -14
  28. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  29. package/dist/cjs/six-details.cjs.entry.js +7 -6
  30. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-dialog.cjs.entry.js +16 -32
  32. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-drawer.cjs.entry.js +15 -32
  34. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-dropdown_2.cjs.entry.js +215 -132
  36. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-error-page.cjs.entry.js +4 -3
  38. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-error.cjs.entry.js +5 -4
  40. package/dist/cjs/six-error.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-file-list-item.cjs.entry.js +6 -5
  42. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-file-list.cjs.entry.js +4 -3
  44. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-file-upload.cjs.entry.js +32 -9
  46. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  47. package/dist/cjs/six-footer.cjs.entry.js +5 -4
  48. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-group-label.cjs.entry.js +7 -6
  50. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-header.cjs.entry.js +25 -17
  52. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-icon-button.cjs.entry.js +7 -6
  54. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-icon.cjs.entry.js +6 -5
  56. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-input.cjs.entry.js +20 -8
  58. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-item-picker.cjs.entry.js +7 -6
  60. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-language-switcher.cjs.entry.js +11 -6
  62. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-layout-grid.cjs.entry.js +4 -3
  64. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-main-container.cjs.entry.js +4 -3
  66. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-menu-divider.cjs.entry.js +5 -4
  68. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-menu-label.cjs.entry.js +5 -4
  70. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-picto.cjs.entry.js +4 -3
  72. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-progress-bar.cjs.entry.js +6 -5
  74. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-progress-ring.cjs.entry.js +5 -4
  76. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-radio.cjs.entry.js +6 -5
  78. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-range.cjs.entry.js +18 -7
  80. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  81. package/dist/cjs/six-root.cjs.entry.js +4 -22
  82. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  83. package/dist/cjs/six-search-field.cjs.entry.js +5 -4
  84. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-select.cjs.entry.js +351 -177
  86. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +5 -4
  88. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-sidebar-item.cjs.entry.js +5 -4
  90. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-sidebar.cjs.entry.js +6 -5
  92. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-spinner.cjs.entry.js +4 -3
  94. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-stage-indicator.cjs.entry.js +23 -0
  96. package/dist/cjs/six-stage-indicator.cjs.entry.js.map +1 -0
  97. package/dist/cjs/six-switch.cjs.entry.js +8 -7
  98. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  99. package/dist/cjs/six-tab-group.cjs.entry.js +35 -9
  100. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-tab-panel.cjs.entry.js +5 -4
  102. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  103. package/dist/cjs/six-tab.cjs.entry.js +6 -5
  104. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  105. package/dist/cjs/six-tag.cjs.entry.js +7 -6
  106. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  107. package/dist/cjs/six-textarea.cjs.entry.js +8 -7
  108. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  109. package/dist/cjs/six-tile.cjs.entry.js +8 -7
  110. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  111. package/dist/cjs/six-timepicker.cjs.entry.js +7 -6
  112. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  113. package/dist/cjs/six-tooltip.cjs.entry.js +6 -5
  114. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  115. package/dist/cjs/{slot-9821749e.js → slot-1b1232a1.js} +1 -3
  116. package/dist/cjs/slot-1b1232a1.js.map +1 -0
  117. package/dist/cjs/{types-0a6d66f6.js → types-d3da200b.js} +3 -1
  118. package/dist/cjs/types-d3da200b.js.map +1 -0
  119. package/dist/cjs/ui-library.cjs.js +6 -4
  120. package/dist/cjs/ui-library.cjs.js.map +1 -1
  121. package/dist/collection/assets/TRADEMARKS.md +3 -3
  122. package/dist/collection/collection-manifest.json +6 -7
  123. package/dist/collection/components/six-alert/six-alert.css +5 -1
  124. package/dist/collection/components/six-alert/six-alert.js +57 -12
  125. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  126. package/dist/collection/components/six-avatar/six-avatar.css +2 -2
  127. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  128. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  129. package/dist/collection/components/six-badge/six-badge.css +1 -1
  130. package/dist/collection/components/six-badge/six-badge.js +2 -2
  131. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  132. package/dist/collection/components/six-button/six-button.css +19 -1
  133. package/dist/collection/components/six-button/six-button.js +8 -6
  134. package/dist/collection/components/six-button/six-button.js.map +1 -1
  135. package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -1
  136. package/dist/collection/components/six-card/six-card.css +4 -5
  137. package/dist/collection/components/six-card/six-card.js +1 -1
  138. package/dist/collection/components/six-card/six-card.js.map +1 -1
  139. package/dist/collection/components/six-checkbox/six-checkbox.css +3 -1
  140. package/dist/collection/components/six-checkbox/six-checkbox.js +5 -4
  141. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  142. package/dist/collection/components/six-datepicker/six-date-formats.js +1 -0
  143. package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -1
  144. package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
  145. package/dist/collection/components/six-datepicker/six-datepicker.js +20 -16
  146. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  147. package/dist/collection/components/six-details/six-details.css +1 -5
  148. package/dist/collection/components/six-details/six-details.js +3 -3
  149. package/dist/collection/components/six-details/six-details.js.map +1 -1
  150. package/dist/collection/components/six-dialog/six-dialog.css +2 -2
  151. package/dist/collection/components/six-dialog/six-dialog.js +10 -28
  152. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  153. package/dist/collection/components/six-drawer/six-drawer.css +2 -2
  154. package/dist/collection/components/six-drawer/six-drawer.js +9 -28
  155. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  156. package/dist/collection/components/six-dropdown/six-dropdown.css +22 -7
  157. package/dist/collection/components/six-dropdown/six-dropdown.js +216 -124
  158. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  159. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +54 -29
  160. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -1
  161. package/dist/collection/components/six-error/six-error.css +1 -0
  162. package/dist/collection/components/six-error/six-error.js +1 -1
  163. package/dist/collection/components/six-error/six-error.js.map +1 -1
  164. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  165. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  166. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  167. package/dist/collection/components/six-file-list/six-file-list.js.map +1 -1
  168. package/dist/collection/components/six-file-list-item/six-file-list-item.css +1 -1
  169. package/dist/collection/components/six-file-list-item/six-file-list-item.js +2 -2
  170. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  171. package/dist/collection/components/six-file-upload/six-file-upload.css +12 -4
  172. package/dist/collection/components/six-file-upload/six-file-upload.js +85 -7
  173. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  174. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +187 -24
  175. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
  176. package/dist/collection/components/six-footer/six-footer.css +2 -2
  177. package/dist/collection/components/six-footer/six-footer.js +1 -1
  178. package/dist/collection/components/six-footer/six-footer.js.map +1 -1
  179. package/dist/collection/components/six-group-label/six-group-label.css +1 -1
  180. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  181. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  182. package/dist/collection/components/six-header/six-header.css +15 -2
  183. package/dist/collection/components/six-header/six-header.js +41 -15
  184. package/dist/collection/components/six-header/six-header.js.map +1 -1
  185. package/dist/collection/components/six-icon/six-icon.css +3 -7
  186. package/dist/collection/components/six-icon/six-icon.js +2 -2
  187. package/dist/collection/components/six-icon/six-icon.js.map +1 -1
  188. package/dist/collection/components/six-icon-button/six-icon-button.css +1 -1
  189. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  190. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  191. package/dist/collection/components/six-input/six-input.css +11 -1
  192. package/dist/collection/components/six-input/six-input.js +84 -20
  193. package/dist/collection/components/six-input/six-input.js.map +1 -1
  194. package/dist/collection/components/six-item-picker/six-item-picker.js +3 -3
  195. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  196. package/dist/collection/components/six-item-picker/types.js +2 -0
  197. package/dist/collection/components/six-item-picker/types.js.map +1 -1
  198. package/dist/collection/components/six-language-switcher/six-language-switcher.css +7 -2
  199. package/dist/collection/components/six-language-switcher/six-language-switcher.js +7 -3
  200. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  201. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +20 -20
  202. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -1
  203. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  204. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  205. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  206. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  207. package/dist/collection/components/six-menu/six-menu.css +8 -7
  208. package/dist/collection/components/six-menu/six-menu.js +41 -10
  209. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  210. package/dist/collection/components/six-menu/test/six-menu.spec.js +6 -6
  211. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  212. package/dist/collection/components/six-menu-divider/six-menu-divider.css +3 -2
  213. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  214. package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -1
  215. package/dist/collection/components/six-menu-item/six-menu-item.css +13 -2
  216. package/dist/collection/components/six-menu-item/six-menu-item.js +37 -8
  217. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  218. package/dist/collection/components/six-menu-label/six-menu-label.css +1 -1
  219. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  220. package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -1
  221. package/dist/collection/components/six-picto/six-picto.js +1 -1
  222. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  223. package/dist/collection/components/six-progress-bar/six-progress-bar.css +1 -1
  224. package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
  225. package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -1
  226. package/dist/collection/components/six-progress-ring/six-progress-ring.css +1 -1
  227. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  228. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  229. package/dist/collection/components/six-radio/six-radio.css +1 -1
  230. package/dist/collection/components/six-radio/six-radio.js +5 -4
  231. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  232. package/dist/collection/components/six-range/six-range.css +2 -2
  233. package/dist/collection/components/six-range/six-range.js +15 -4
  234. package/dist/collection/components/six-range/six-range.js.map +1 -1
  235. package/dist/collection/components/six-root/six-root.js +1 -69
  236. package/dist/collection/components/six-root/six-root.js.map +1 -1
  237. package/dist/collection/components/six-root/test/six-root.spec.js +0 -7
  238. package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -1
  239. package/dist/collection/components/six-search-field/six-search-field.css +1 -1
  240. package/dist/collection/components/six-search-field/six-search-field.js +1 -1
  241. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  242. package/dist/collection/components/six-select/six-select.css +54 -66
  243. package/dist/collection/components/six-select/six-select.js +362 -178
  244. package/dist/collection/components/six-select/six-select.js.map +1 -1
  245. package/dist/collection/components/six-select/test/six-select.spec.js +31 -15
  246. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
  247. package/dist/collection/components/six-select/test/util.spec.js +23 -1
  248. package/dist/collection/components/six-select/test/util.spec.js.map +1 -1
  249. package/dist/collection/components/six-select/util.js +24 -0
  250. package/dist/collection/components/six-select/util.js.map +1 -1
  251. package/dist/collection/components/six-sidebar/six-sidebar.css +2 -2
  252. package/dist/collection/components/six-sidebar/six-sidebar.js +8 -6
  253. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  254. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  255. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  256. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +2 -1
  257. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  258. package/dist/collection/components/six-spinner/six-spinner.css +1 -1
  259. package/dist/collection/components/six-stage-indicator/six-stage-indicator.css +1 -1
  260. package/dist/collection/components/six-switch/six-switch.css +1 -1
  261. package/dist/collection/components/six-switch/six-switch.js +5 -4
  262. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  263. package/dist/collection/components/six-tab/six-tab.css +1 -1
  264. package/dist/collection/components/six-tab/six-tab.js +5 -4
  265. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  266. package/dist/collection/components/six-tab-group/six-tab-group.css +1 -1
  267. package/dist/collection/components/six-tab-group/six-tab-group.js +36 -9
  268. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  269. package/dist/collection/components/six-tab-panel/six-tab-panel.css +1 -1
  270. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  271. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  272. package/dist/collection/components/six-tag/six-tag.css +1 -1
  273. package/dist/collection/components/six-tag/six-tag.js +2 -2
  274. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  275. package/dist/collection/components/six-textarea/six-textarea.css +6 -1
  276. package/dist/collection/components/six-textarea/six-textarea.js +26 -18
  277. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  278. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
  279. package/dist/collection/components/six-tile/six-tile.css +2 -2
  280. package/dist/collection/components/six-tile/six-tile.js +3 -3
  281. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  282. package/dist/collection/components/six-timepicker/six-timepicker.css +1 -1
  283. package/dist/collection/components/six-timepicker/six-timepicker.js +4 -3
  284. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  285. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
  286. package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
  287. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  288. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  289. package/dist/collection/index.js +1 -0
  290. package/dist/collection/index.js.map +1 -1
  291. package/dist/collection/utils/alert.js +54 -0
  292. package/dist/collection/utils/alert.js.map +1 -0
  293. package/dist/collection/utils/date-util.js +25 -0
  294. package/dist/collection/utils/date-util.js.map +1 -1
  295. package/dist/collection/utils/date-util.spec.js.map +1 -1
  296. package/dist/collection/utils/error-messages.js +7 -0
  297. package/dist/collection/utils/error-messages.js.map +1 -1
  298. package/dist/collection/utils/event-listeners.js.map +1 -1
  299. package/dist/collection/utils/focus-visible.js.map +1 -1
  300. package/dist/collection/utils/form.js.map +1 -1
  301. package/dist/collection/utils/modal.js.map +1 -1
  302. package/dist/collection/utils/popover.js.map +1 -1
  303. package/dist/collection/utils/popup.js.map +1 -1
  304. package/dist/collection/utils/scroll.js.map +1 -1
  305. package/dist/collection/utils/slot.js +0 -1
  306. package/dist/collection/utils/slot.js.map +1 -1
  307. package/dist/collection/utils/tabbable.js.map +1 -1
  308. package/dist/collection/utils/time.util.js.map +1 -1
  309. package/dist/collection/utils/time.util.spec.js.map +1 -1
  310. package/dist/components/index.js +50 -102
  311. package/dist/components/index.js.map +1 -1
  312. package/dist/components/modal.js +1 -17
  313. package/dist/components/modal.js.map +1 -1
  314. package/dist/components/six-alert.js +41 -8
  315. package/dist/components/six-alert.js.map +1 -1
  316. package/dist/components/six-avatar.js +4 -3
  317. package/dist/components/six-avatar.js.map +1 -1
  318. package/dist/components/six-badge.js +5 -4
  319. package/dist/components/six-badge.js.map +1 -1
  320. package/dist/components/six-button.js +1 -142
  321. package/dist/components/six-button.js.map +1 -1
  322. package/dist/components/six-button2.js +148 -0
  323. package/dist/components/six-button2.js.map +1 -0
  324. package/dist/components/six-card.js +4 -3
  325. package/dist/components/six-card.js.map +1 -1
  326. package/dist/components/six-checkbox.js +1 -161
  327. package/dist/components/six-checkbox.js.map +1 -1
  328. package/dist/components/six-checkbox2.js +166 -0
  329. package/dist/components/six-checkbox2.js.map +1 -0
  330. package/dist/components/six-datepicker.js +41 -12
  331. package/dist/components/six-datepicker.js.map +1 -1
  332. package/dist/components/six-details2.js +6 -5
  333. package/dist/components/six-details2.js.map +1 -1
  334. package/dist/components/six-dialog.js +14 -30
  335. package/dist/components/six-dialog.js.map +1 -1
  336. package/dist/components/six-drawer.js +13 -30
  337. package/dist/components/six-drawer.js.map +1 -1
  338. package/dist/components/six-dropdown2.js +204 -127
  339. package/dist/components/six-dropdown2.js.map +1 -1
  340. package/dist/components/six-error-page.js +3 -2
  341. package/dist/components/six-error-page.js.map +1 -1
  342. package/dist/components/six-error2.js +4 -3
  343. package/dist/components/six-error2.js.map +1 -1
  344. package/dist/components/six-file-list-item.js +5 -4
  345. package/dist/components/six-file-list-item.js.map +1 -1
  346. package/dist/components/six-file-list.js +3 -2
  347. package/dist/components/six-file-list.js.map +1 -1
  348. package/dist/components/six-file-upload.js +51 -12
  349. package/dist/components/six-file-upload.js.map +1 -1
  350. package/dist/components/six-footer.js +4 -3
  351. package/dist/components/six-footer.js.map +1 -1
  352. package/dist/components/six-group-label.js +4 -3
  353. package/dist/components/six-group-label.js.map +1 -1
  354. package/dist/components/six-header.js +31 -16
  355. package/dist/components/six-header.js.map +1 -1
  356. package/dist/components/six-icon-button2.js +6 -5
  357. package/dist/components/six-icon-button2.js.map +1 -1
  358. package/dist/components/six-icon2.js +5 -4
  359. package/dist/components/six-icon2.js.map +1 -1
  360. package/dist/components/six-input2.js +19 -5
  361. package/dist/components/six-input2.js.map +1 -1
  362. package/dist/components/six-item-picker2.js +7 -4
  363. package/dist/components/six-item-picker2.js.map +1 -1
  364. package/dist/components/six-language-switcher.js +10 -5
  365. package/dist/components/six-language-switcher.js.map +1 -1
  366. package/dist/components/six-layout-grid.js +3 -2
  367. package/dist/components/six-layout-grid.js.map +1 -1
  368. package/dist/components/six-main-container.js +3 -2
  369. package/dist/components/six-main-container.js.map +1 -1
  370. package/dist/components/six-menu-divider.js +4 -3
  371. package/dist/components/six-menu-divider.js.map +1 -1
  372. package/dist/components/six-menu-item2.js +31 -7
  373. package/dist/components/six-menu-item2.js.map +1 -1
  374. package/dist/components/six-menu-label.js +4 -3
  375. package/dist/components/six-menu-label.js.map +1 -1
  376. package/dist/components/six-menu2.js +37 -11
  377. package/dist/components/six-menu2.js.map +1 -1
  378. package/dist/components/six-picto2.js +3 -2
  379. package/dist/components/six-picto2.js.map +1 -1
  380. package/dist/components/six-progress-bar.js +5 -4
  381. package/dist/components/six-progress-bar.js.map +1 -1
  382. package/dist/components/six-progress-ring.js +4 -3
  383. package/dist/components/six-progress-ring.js.map +1 -1
  384. package/dist/components/six-radio.js +5 -4
  385. package/dist/components/six-radio.js.map +1 -1
  386. package/dist/components/six-range.js +15 -4
  387. package/dist/components/six-range.js.map +1 -1
  388. package/dist/components/six-root.js +6 -34
  389. package/dist/components/six-root.js.map +1 -1
  390. package/dist/components/six-search-field.js +4 -3
  391. package/dist/components/six-search-field.js.map +1 -1
  392. package/dist/components/six-select.js +489 -196
  393. package/dist/components/six-select.js.map +1 -1
  394. package/dist/components/six-sidebar-item-group.js +3 -2
  395. package/dist/components/six-sidebar-item-group.js.map +1 -1
  396. package/dist/components/six-sidebar-item.js +4 -3
  397. package/dist/components/six-sidebar-item.js.map +1 -1
  398. package/dist/components/six-sidebar.js +5 -4
  399. package/dist/components/six-sidebar.js.map +1 -1
  400. package/dist/components/six-spinner2.js +3 -2
  401. package/dist/components/six-spinner2.js.map +1 -1
  402. package/dist/components/six-stage-indicator2.js +3 -2
  403. package/dist/components/six-stage-indicator2.js.map +1 -1
  404. package/dist/components/six-switch.js +5 -4
  405. package/dist/components/six-switch.js.map +1 -1
  406. package/dist/components/six-tab-group.js +36 -9
  407. package/dist/components/six-tab-group.js.map +1 -1
  408. package/dist/components/six-tab-panel.js +4 -3
  409. package/dist/components/six-tab-panel.js.map +1 -1
  410. package/dist/components/six-tab.js +5 -4
  411. package/dist/components/six-tab.js.map +1 -1
  412. package/dist/components/six-tag.js +99 -1
  413. package/dist/components/six-tag.js.map +1 -1
  414. package/dist/components/six-textarea.js +5 -4
  415. package/dist/components/six-textarea.js.map +1 -1
  416. package/dist/components/six-tile.js +6 -5
  417. package/dist/components/six-tile.js.map +1 -1
  418. package/dist/components/six-timepicker2.js +4 -3
  419. package/dist/components/six-timepicker2.js.map +1 -1
  420. package/dist/components/six-tooltip2.js +5 -4
  421. package/dist/components/six-tooltip2.js.map +1 -1
  422. package/dist/components/slot.js +1 -2
  423. package/dist/components/slot.js.map +1 -1
  424. package/dist/components.d.ts +1 -21
  425. package/dist/components.json +764 -247
  426. package/dist/esm/app-globals-0f993ce5.js +5 -0
  427. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  428. package/dist/esm/error-messages-1eaaad23.js +115 -0
  429. package/dist/esm/error-messages-1eaaad23.js.map +1 -0
  430. package/dist/esm/{form-control-6b30894f.js → form-control-30c5bd8b.js} +2 -2
  431. package/dist/esm/{form-control-6b30894f.js.map → form-control-30c5bd8b.js.map} +1 -1
  432. package/dist/esm/{index-17d8173e.js → index-5390c1d6.js} +127 -76
  433. package/dist/esm/index-5390c1d6.js.map +1 -0
  434. package/dist/esm/index.js +51 -100
  435. package/dist/esm/index.js.map +1 -1
  436. package/dist/esm/loader.js +6 -4
  437. package/dist/esm/loader.js.map +1 -1
  438. package/dist/esm/{modal-96526245.js → modal-6c1288e3.js} +2 -18
  439. package/dist/esm/modal-6c1288e3.js.map +1 -0
  440. package/dist/esm/six-alert.entry.js +42 -9
  441. package/dist/esm/six-alert.entry.js.map +1 -1
  442. package/dist/esm/six-avatar.entry.js +5 -4
  443. package/dist/esm/six-avatar.entry.js.map +1 -1
  444. package/dist/esm/six-badge.entry.js +6 -5
  445. package/dist/esm/six-badge.entry.js.map +1 -1
  446. package/dist/esm/six-button.entry.js +8 -6
  447. package/dist/esm/six-button.entry.js.map +1 -1
  448. package/dist/esm/six-card.entry.js +5 -4
  449. package/dist/esm/six-card.entry.js.map +1 -1
  450. package/dist/esm/six-checkbox_2.entry.js +187 -0
  451. package/dist/esm/six-checkbox_2.entry.js.map +1 -0
  452. package/dist/esm/six-datepicker.entry.js +43 -14
  453. package/dist/esm/six-datepicker.entry.js.map +1 -1
  454. package/dist/esm/six-details.entry.js +7 -6
  455. package/dist/esm/six-details.entry.js.map +1 -1
  456. package/dist/esm/six-dialog.entry.js +16 -32
  457. package/dist/esm/six-dialog.entry.js.map +1 -1
  458. package/dist/esm/six-drawer.entry.js +15 -32
  459. package/dist/esm/six-drawer.entry.js.map +1 -1
  460. package/dist/esm/six-dropdown_2.entry.js +216 -133
  461. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  462. package/dist/esm/six-error-page.entry.js +4 -3
  463. package/dist/esm/six-error-page.entry.js.map +1 -1
  464. package/dist/esm/six-error.entry.js +5 -4
  465. package/dist/esm/six-error.entry.js.map +1 -1
  466. package/dist/esm/six-file-list-item.entry.js +6 -5
  467. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  468. package/dist/esm/six-file-list.entry.js +4 -3
  469. package/dist/esm/six-file-list.entry.js.map +1 -1
  470. package/dist/esm/six-file-upload.entry.js +32 -9
  471. package/dist/esm/six-file-upload.entry.js.map +1 -1
  472. package/dist/esm/six-footer.entry.js +5 -4
  473. package/dist/esm/six-footer.entry.js.map +1 -1
  474. package/dist/esm/six-group-label.entry.js +7 -6
  475. package/dist/esm/six-group-label.entry.js.map +1 -1
  476. package/dist/esm/six-header.entry.js +25 -17
  477. package/dist/esm/six-header.entry.js.map +1 -1
  478. package/dist/esm/six-icon-button.entry.js +7 -6
  479. package/dist/esm/six-icon-button.entry.js.map +1 -1
  480. package/dist/esm/six-icon.entry.js +6 -5
  481. package/dist/esm/six-icon.entry.js.map +1 -1
  482. package/dist/esm/six-input.entry.js +20 -8
  483. package/dist/esm/six-input.entry.js.map +1 -1
  484. package/dist/esm/six-item-picker.entry.js +7 -6
  485. package/dist/esm/six-item-picker.entry.js.map +1 -1
  486. package/dist/esm/six-language-switcher.entry.js +11 -6
  487. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  488. package/dist/esm/six-layout-grid.entry.js +4 -3
  489. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  490. package/dist/esm/six-main-container.entry.js +4 -3
  491. package/dist/esm/six-main-container.entry.js.map +1 -1
  492. package/dist/esm/six-menu-divider.entry.js +5 -4
  493. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  494. package/dist/esm/six-menu-label.entry.js +5 -4
  495. package/dist/esm/six-menu-label.entry.js.map +1 -1
  496. package/dist/esm/six-picto.entry.js +4 -3
  497. package/dist/esm/six-picto.entry.js.map +1 -1
  498. package/dist/esm/six-progress-bar.entry.js +6 -5
  499. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  500. package/dist/esm/six-progress-ring.entry.js +5 -4
  501. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  502. package/dist/esm/six-radio.entry.js +6 -5
  503. package/dist/esm/six-radio.entry.js.map +1 -1
  504. package/dist/esm/six-range.entry.js +18 -7
  505. package/dist/esm/six-range.entry.js.map +1 -1
  506. package/dist/esm/six-root.entry.js +4 -22
  507. package/dist/esm/six-root.entry.js.map +1 -1
  508. package/dist/esm/six-search-field.entry.js +5 -4
  509. package/dist/esm/six-search-field.entry.js.map +1 -1
  510. package/dist/esm/six-select.entry.js +351 -177
  511. package/dist/esm/six-select.entry.js.map +1 -1
  512. package/dist/esm/six-sidebar-item-group.entry.js +5 -4
  513. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  514. package/dist/esm/six-sidebar-item.entry.js +5 -4
  515. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  516. package/dist/esm/six-sidebar.entry.js +6 -5
  517. package/dist/esm/six-sidebar.entry.js.map +1 -1
  518. package/dist/esm/six-spinner.entry.js +4 -3
  519. package/dist/esm/six-spinner.entry.js.map +1 -1
  520. package/dist/esm/six-stage-indicator.entry.js +19 -0
  521. package/dist/esm/six-stage-indicator.entry.js.map +1 -0
  522. package/dist/esm/six-switch.entry.js +8 -7
  523. package/dist/esm/six-switch.entry.js.map +1 -1
  524. package/dist/esm/six-tab-group.entry.js +35 -9
  525. package/dist/esm/six-tab-group.entry.js.map +1 -1
  526. package/dist/esm/six-tab-panel.entry.js +5 -4
  527. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  528. package/dist/esm/six-tab.entry.js +6 -5
  529. package/dist/esm/six-tab.entry.js.map +1 -1
  530. package/dist/esm/six-tag.entry.js +7 -6
  531. package/dist/esm/six-tag.entry.js.map +1 -1
  532. package/dist/esm/six-textarea.entry.js +8 -7
  533. package/dist/esm/six-textarea.entry.js.map +1 -1
  534. package/dist/esm/six-tile.entry.js +8 -7
  535. package/dist/esm/six-tile.entry.js.map +1 -1
  536. package/dist/esm/six-timepicker.entry.js +7 -6
  537. package/dist/esm/six-timepicker.entry.js.map +1 -1
  538. package/dist/esm/six-tooltip.entry.js +6 -5
  539. package/dist/esm/six-tooltip.entry.js.map +1 -1
  540. package/dist/esm/{slot-41bc439a.js → slot-56531341.js} +2 -3
  541. package/dist/esm/slot-56531341.js.map +1 -0
  542. package/dist/esm/{types-07748c42.js → types-a07bb999.js} +3 -1
  543. package/dist/esm/types-a07bb999.js.map +1 -0
  544. package/dist/esm/ui-library.js +7 -5
  545. package/dist/esm/ui-library.js.map +1 -1
  546. package/dist/types/components/six-alert/six-alert.d.ts +13 -6
  547. package/dist/types/components/six-button/six-button.d.ts +1 -1
  548. package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
  549. package/dist/types/components/six-dialog/six-dialog.d.ts +1 -0
  550. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -9
  551. package/dist/types/components/six-file-upload/six-file-upload.d.ts +10 -0
  552. package/dist/types/components/six-header/six-header.d.ts +3 -1
  553. package/dist/types/components/six-input/six-input.d.ts +13 -1
  554. package/dist/types/components/six-menu/six-menu.d.ts +5 -1
  555. package/dist/types/components/six-menu-item/six-menu-item.d.ts +7 -1
  556. package/dist/types/components/six-range/six-range.d.ts +2 -0
  557. package/dist/types/components/six-root/six-root.d.ts +0 -13
  558. package/dist/types/components/six-select/six-select.d.ts +26 -13
  559. package/dist/types/components/six-select/util.d.ts +2 -0
  560. package/dist/types/components/six-tab-group/six-tab-group.d.ts +4 -1
  561. package/dist/types/components.d.ts +119 -63
  562. package/dist/types/index.d.ts +1 -0
  563. package/dist/types/types.d.ts +1 -0
  564. package/dist/types/utils/alert.d.ts +10 -0
  565. package/dist/types/utils/date-util.d.ts +9 -1
  566. package/dist/types/utils/error-messages.d.ts +1 -0
  567. package/dist/types/utils/slot.d.ts +0 -1
  568. package/dist/ui-library/assets/TRADEMARKS.md +3 -3
  569. package/dist/ui-library/index.esm.js +1 -1
  570. package/dist/ui-library/index.esm.js.map +1 -1
  571. package/dist/ui-library/p-030fa1fa.entry.js +2 -0
  572. package/dist/ui-library/p-030fa1fa.entry.js.map +1 -0
  573. package/dist/ui-library/p-037afc74.entry.js +2 -0
  574. package/dist/ui-library/p-037afc74.entry.js.map +1 -0
  575. package/dist/ui-library/p-047d02ad.entry.js +2 -0
  576. package/dist/ui-library/p-047d02ad.entry.js.map +1 -0
  577. package/dist/ui-library/p-05eb1bab.js +3 -0
  578. package/dist/ui-library/p-05eb1bab.js.map +1 -0
  579. package/dist/ui-library/p-06ba653e.entry.js +2 -0
  580. package/dist/ui-library/p-06ba653e.entry.js.map +1 -0
  581. package/dist/ui-library/p-07c8de65.entry.js +2 -0
  582. package/dist/ui-library/p-07c8de65.entry.js.map +1 -0
  583. package/dist/ui-library/p-0c129b61.entry.js +2 -0
  584. package/dist/ui-library/p-0c129b61.entry.js.map +1 -0
  585. package/dist/ui-library/p-0cebf1d2.js +2 -0
  586. package/dist/ui-library/p-0cebf1d2.js.map +1 -0
  587. package/dist/ui-library/p-11344bb8.entry.js +2 -0
  588. package/dist/ui-library/p-11344bb8.entry.js.map +1 -0
  589. package/dist/ui-library/p-14e5fccc.entry.js +2 -0
  590. package/dist/ui-library/p-14e5fccc.entry.js.map +1 -0
  591. package/dist/ui-library/p-189602e4.entry.js +2 -0
  592. package/dist/ui-library/p-189602e4.entry.js.map +1 -0
  593. package/dist/ui-library/p-18b9189f.entry.js +2 -0
  594. package/dist/ui-library/p-18b9189f.entry.js.map +1 -0
  595. package/dist/ui-library/p-1adc26f2.entry.js +2 -0
  596. package/dist/ui-library/p-1adc26f2.entry.js.map +1 -0
  597. package/dist/ui-library/p-2386627e.entry.js +2 -0
  598. package/dist/ui-library/p-2386627e.entry.js.map +1 -0
  599. package/dist/ui-library/p-32e421a3.entry.js +2 -0
  600. package/dist/ui-library/p-32e421a3.entry.js.map +1 -0
  601. package/dist/ui-library/p-347e568f.entry.js +2 -0
  602. package/dist/ui-library/p-347e568f.entry.js.map +1 -0
  603. package/dist/ui-library/p-36d5f98a.entry.js +2 -0
  604. package/dist/ui-library/p-36d5f98a.entry.js.map +1 -0
  605. package/dist/ui-library/p-37433242.entry.js +2 -0
  606. package/dist/ui-library/p-37433242.entry.js.map +1 -0
  607. package/dist/ui-library/p-3b5a76ea.entry.js +2 -0
  608. package/dist/ui-library/p-3b5a76ea.entry.js.map +1 -0
  609. package/dist/ui-library/p-416b0439.entry.js +2 -0
  610. package/dist/ui-library/p-416b0439.entry.js.map +1 -0
  611. package/dist/ui-library/p-419ed003.entry.js +2 -0
  612. package/dist/ui-library/p-419ed003.entry.js.map +1 -0
  613. package/dist/ui-library/p-45b0748e.entry.js +2 -0
  614. package/dist/ui-library/p-45b0748e.entry.js.map +1 -0
  615. package/dist/ui-library/p-4963f03c.entry.js +2 -0
  616. package/dist/ui-library/p-4963f03c.entry.js.map +1 -0
  617. package/dist/ui-library/p-4bc7bbdb.entry.js +2 -0
  618. package/dist/ui-library/p-4bc7bbdb.entry.js.map +1 -0
  619. package/dist/ui-library/p-4d89932f.entry.js +2 -0
  620. package/dist/ui-library/p-4d89932f.entry.js.map +1 -0
  621. package/dist/ui-library/{p-6907a7dc.js → p-605bdd81.js} +2 -2
  622. package/dist/ui-library/p-63acceb6.entry.js +2 -0
  623. package/dist/ui-library/p-63acceb6.entry.js.map +1 -0
  624. package/dist/ui-library/p-63ee5e7e.entry.js +2 -0
  625. package/dist/ui-library/p-63ee5e7e.entry.js.map +1 -0
  626. package/dist/ui-library/p-651293e7.js +2 -0
  627. package/dist/ui-library/p-651293e7.js.map +1 -0
  628. package/dist/ui-library/p-6b40c40c.entry.js +2 -0
  629. package/dist/ui-library/p-6b40c40c.entry.js.map +1 -0
  630. package/dist/ui-library/p-6f9153be.entry.js +2 -0
  631. package/dist/ui-library/p-6f9153be.entry.js.map +1 -0
  632. package/dist/ui-library/p-7bdd1116.entry.js +2 -0
  633. package/dist/ui-library/p-7bdd1116.entry.js.map +1 -0
  634. package/dist/ui-library/p-7c18b8ca.entry.js +2 -0
  635. package/dist/ui-library/p-7c18b8ca.entry.js.map +1 -0
  636. package/dist/ui-library/{p-0861899a.js → p-862d474e.js} +1 -1
  637. package/dist/ui-library/p-862d474e.js.map +1 -0
  638. package/dist/ui-library/{p-d310a6dd.entry.js → p-8f1d3461.entry.js} +2 -2
  639. package/dist/ui-library/p-8f1d3461.entry.js.map +1 -0
  640. package/dist/ui-library/p-96d441e9.entry.js +2 -0
  641. package/dist/ui-library/p-96d441e9.entry.js.map +1 -0
  642. package/dist/ui-library/p-99f6fe01.entry.js +2 -0
  643. package/dist/ui-library/p-99f6fe01.entry.js.map +1 -0
  644. package/dist/ui-library/p-9cb83369.entry.js +2 -0
  645. package/dist/ui-library/p-9cb83369.entry.js.map +1 -0
  646. package/dist/ui-library/p-a398e3eb.entry.js +2 -0
  647. package/dist/ui-library/p-a398e3eb.entry.js.map +1 -0
  648. package/dist/ui-library/p-a9e009af.entry.js +2 -0
  649. package/dist/ui-library/p-a9e009af.entry.js.map +1 -0
  650. package/dist/ui-library/p-b335ed9c.entry.js +2 -0
  651. package/dist/ui-library/p-b335ed9c.entry.js.map +1 -0
  652. package/dist/ui-library/p-b5acf54d.entry.js +2 -0
  653. package/dist/ui-library/p-b5acf54d.entry.js.map +1 -0
  654. package/dist/ui-library/p-b60c20aa.entry.js +2 -0
  655. package/dist/ui-library/p-b60c20aa.entry.js.map +1 -0
  656. package/dist/ui-library/p-b7c68f74.entry.js +2 -0
  657. package/dist/ui-library/p-b7c68f74.entry.js.map +1 -0
  658. package/dist/ui-library/p-c62893e5.entry.js +2 -0
  659. package/dist/ui-library/p-c62893e5.entry.js.map +1 -0
  660. package/dist/ui-library/p-c6464bfe.entry.js +2 -0
  661. package/dist/ui-library/p-c6464bfe.entry.js.map +1 -0
  662. package/dist/ui-library/p-cf109cbf.entry.js +2 -0
  663. package/dist/ui-library/p-cf109cbf.entry.js.map +1 -0
  664. package/dist/ui-library/p-d1a2f84b.entry.js +2 -0
  665. package/dist/ui-library/p-d1a2f84b.entry.js.map +1 -0
  666. package/dist/ui-library/p-d42f1ea9.entry.js +2 -0
  667. package/dist/ui-library/p-d42f1ea9.entry.js.map +1 -0
  668. package/dist/ui-library/p-d88b9c16.entry.js +2 -0
  669. package/dist/ui-library/p-d88b9c16.entry.js.map +1 -0
  670. package/dist/ui-library/p-d9586999.entry.js +2 -0
  671. package/dist/ui-library/p-d9586999.entry.js.map +1 -0
  672. package/dist/ui-library/p-e080d5b6.js +2 -0
  673. package/dist/ui-library/p-e080d5b6.js.map +1 -0
  674. package/dist/ui-library/p-e1255160.js +2 -0
  675. package/dist/ui-library/p-e1255160.js.map +1 -0
  676. package/dist/ui-library/p-e14d78e9.entry.js +2 -0
  677. package/dist/ui-library/p-e14d78e9.entry.js.map +1 -0
  678. package/dist/ui-library/p-e9b8ad98.entry.js +2 -0
  679. package/dist/ui-library/p-e9b8ad98.entry.js.map +1 -0
  680. package/dist/ui-library/p-ebbe9bdc.entry.js +2 -0
  681. package/dist/ui-library/p-ebbe9bdc.entry.js.map +1 -0
  682. package/dist/ui-library/p-fe89a7c4.entry.js +2 -0
  683. package/dist/ui-library/p-fe89a7c4.entry.js.map +1 -0
  684. package/dist/ui-library/ui-library.css +1 -10
  685. package/dist/ui-library/ui-library.esm.js +1 -1
  686. package/dist/ui-library/ui-library.esm.js.map +1 -1
  687. package/package.json +10 -13
  688. package/dist/cjs/index-3baddcdc.js.map +0 -1
  689. package/dist/cjs/modal-3ce015be.js.map +0 -1
  690. package/dist/cjs/set-attributes_2.cjs.entry.js +0 -73
  691. package/dist/cjs/set-attributes_2.cjs.entry.js.map +0 -1
  692. package/dist/cjs/six-checkbox.cjs.entry.js +0 -127
  693. package/dist/cjs/six-checkbox.cjs.entry.js.map +0 -1
  694. package/dist/cjs/six-menu-item.cjs.entry.js +0 -63
  695. package/dist/cjs/six-menu-item.cjs.entry.js.map +0 -1
  696. package/dist/cjs/slot-9821749e.js.map +0 -1
  697. package/dist/cjs/types-0a6d66f6.js.map +0 -1
  698. package/dist/collection/components/six-header/assets/six-logo.svg +0 -1
  699. package/dist/collection/components/six-header/test/six-header.spec.js +0 -175
  700. package/dist/collection/components/six-header/test/six-header.spec.js.map +0 -1
  701. package/dist/collection/utils/support.js +0 -16
  702. package/dist/collection/utils/support.js.map +0 -1
  703. package/dist/collection/wrappers/set-attributes/set-attributes.js +0 -74
  704. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +0 -1
  705. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +0 -16
  706. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +0 -1
  707. package/dist/components/set-attributes.d.ts +0 -11
  708. package/dist/components/set-attributes.js +0 -8
  709. package/dist/components/set-attributes.js.map +0 -1
  710. package/dist/components/set-attributes2.js +0 -73
  711. package/dist/components/set-attributes2.js.map +0 -1
  712. package/dist/components/six-tag2.js +0 -102
  713. package/dist/components/six-tag2.js.map +0 -1
  714. package/dist/esm/index-17d8173e.js.map +0 -1
  715. package/dist/esm/modal-96526245.js.map +0 -1
  716. package/dist/esm/set-attributes_2.entry.js +0 -68
  717. package/dist/esm/set-attributes_2.entry.js.map +0 -1
  718. package/dist/esm/six-checkbox.entry.js +0 -123
  719. package/dist/esm/six-checkbox.entry.js.map +0 -1
  720. package/dist/esm/six-menu-item.entry.js +0 -59
  721. package/dist/esm/six-menu-item.entry.js.map +0 -1
  722. package/dist/esm/slot-41bc439a.js.map +0 -1
  723. package/dist/esm/types-07748c42.js.map +0 -1
  724. package/dist/types/utils/support.d.ts +0 -1
  725. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +0 -9
  726. package/dist/ui-library/assets/six-logo.svg +0 -1
  727. package/dist/ui-library/p-0861899a.js.map +0 -1
  728. package/dist/ui-library/p-0a81b42c.entry.js +0 -2
  729. package/dist/ui-library/p-0a81b42c.entry.js.map +0 -1
  730. package/dist/ui-library/p-0beec94f.js +0 -3
  731. package/dist/ui-library/p-0beec94f.js.map +0 -1
  732. package/dist/ui-library/p-0e7332db.entry.js +0 -2
  733. package/dist/ui-library/p-0e7332db.entry.js.map +0 -1
  734. package/dist/ui-library/p-178f5782.entry.js +0 -2
  735. package/dist/ui-library/p-178f5782.entry.js.map +0 -1
  736. package/dist/ui-library/p-19a61686.entry.js +0 -2
  737. package/dist/ui-library/p-19a61686.entry.js.map +0 -1
  738. package/dist/ui-library/p-1d0c5929.entry.js +0 -2
  739. package/dist/ui-library/p-1d0c5929.entry.js.map +0 -1
  740. package/dist/ui-library/p-23c02c98.entry.js +0 -2
  741. package/dist/ui-library/p-23c02c98.entry.js.map +0 -1
  742. package/dist/ui-library/p-28221447.entry.js +0 -2
  743. package/dist/ui-library/p-28221447.entry.js.map +0 -1
  744. package/dist/ui-library/p-2b59175f.entry.js +0 -2
  745. package/dist/ui-library/p-2b59175f.entry.js.map +0 -1
  746. package/dist/ui-library/p-2eed9d8d.entry.js +0 -2
  747. package/dist/ui-library/p-2eed9d8d.entry.js.map +0 -1
  748. package/dist/ui-library/p-3187bc23.entry.js +0 -2
  749. package/dist/ui-library/p-3187bc23.entry.js.map +0 -1
  750. package/dist/ui-library/p-32e1a5ab.entry.js +0 -2
  751. package/dist/ui-library/p-32e1a5ab.entry.js.map +0 -1
  752. package/dist/ui-library/p-3d54ecf2.entry.js +0 -2
  753. package/dist/ui-library/p-3d54ecf2.entry.js.map +0 -1
  754. package/dist/ui-library/p-4229f7e8.entry.js +0 -2
  755. package/dist/ui-library/p-4229f7e8.entry.js.map +0 -1
  756. package/dist/ui-library/p-479d8087.entry.js +0 -2
  757. package/dist/ui-library/p-479d8087.entry.js.map +0 -1
  758. package/dist/ui-library/p-49aa8d1e.entry.js +0 -2
  759. package/dist/ui-library/p-49aa8d1e.entry.js.map +0 -1
  760. package/dist/ui-library/p-58661675.entry.js +0 -2
  761. package/dist/ui-library/p-58661675.entry.js.map +0 -1
  762. package/dist/ui-library/p-5d43ea07.entry.js +0 -2
  763. package/dist/ui-library/p-5d43ea07.entry.js.map +0 -1
  764. package/dist/ui-library/p-6aa2929a.entry.js +0 -2
  765. package/dist/ui-library/p-6aa2929a.entry.js.map +0 -1
  766. package/dist/ui-library/p-7432d409.entry.js +0 -2
  767. package/dist/ui-library/p-7432d409.entry.js.map +0 -1
  768. package/dist/ui-library/p-74a714c0.entry.js +0 -2
  769. package/dist/ui-library/p-74a714c0.entry.js.map +0 -1
  770. package/dist/ui-library/p-76825395.entry.js +0 -2
  771. package/dist/ui-library/p-76825395.entry.js.map +0 -1
  772. package/dist/ui-library/p-816f857d.entry.js +0 -2
  773. package/dist/ui-library/p-816f857d.entry.js.map +0 -1
  774. package/dist/ui-library/p-882fbf6f.entry.js +0 -2
  775. package/dist/ui-library/p-882fbf6f.entry.js.map +0 -1
  776. package/dist/ui-library/p-88fd4973.entry.js +0 -2
  777. package/dist/ui-library/p-88fd4973.entry.js.map +0 -1
  778. package/dist/ui-library/p-8b750c9e.entry.js +0 -2
  779. package/dist/ui-library/p-8b750c9e.entry.js.map +0 -1
  780. package/dist/ui-library/p-911eb578.entry.js +0 -2
  781. package/dist/ui-library/p-911eb578.entry.js.map +0 -1
  782. package/dist/ui-library/p-93fcda4a.entry.js +0 -2
  783. package/dist/ui-library/p-93fcda4a.entry.js.map +0 -1
  784. package/dist/ui-library/p-981b3228.entry.js +0 -2
  785. package/dist/ui-library/p-981b3228.entry.js.map +0 -1
  786. package/dist/ui-library/p-998de05d.js +0 -2
  787. package/dist/ui-library/p-998de05d.js.map +0 -1
  788. package/dist/ui-library/p-9b1ff147.entry.js +0 -2
  789. package/dist/ui-library/p-9b1ff147.entry.js.map +0 -1
  790. package/dist/ui-library/p-a0658b26.entry.js +0 -2
  791. package/dist/ui-library/p-a0658b26.entry.js.map +0 -1
  792. package/dist/ui-library/p-a4e4620c.entry.js +0 -2
  793. package/dist/ui-library/p-a4e4620c.entry.js.map +0 -1
  794. package/dist/ui-library/p-ada23fe3.entry.js +0 -2
  795. package/dist/ui-library/p-ada23fe3.entry.js.map +0 -1
  796. package/dist/ui-library/p-b5ac1219.entry.js +0 -2
  797. package/dist/ui-library/p-b5ac1219.entry.js.map +0 -1
  798. package/dist/ui-library/p-ba247565.entry.js +0 -2
  799. package/dist/ui-library/p-ba247565.entry.js.map +0 -1
  800. package/dist/ui-library/p-bdb79948.entry.js +0 -2
  801. package/dist/ui-library/p-bdb79948.entry.js.map +0 -1
  802. package/dist/ui-library/p-bee65dd9.entry.js +0 -2
  803. package/dist/ui-library/p-bee65dd9.entry.js.map +0 -1
  804. package/dist/ui-library/p-c07b1240.entry.js +0 -2
  805. package/dist/ui-library/p-c07b1240.entry.js.map +0 -1
  806. package/dist/ui-library/p-c12a94ce.entry.js +0 -2
  807. package/dist/ui-library/p-c12a94ce.entry.js.map +0 -1
  808. package/dist/ui-library/p-c1675a45.entry.js +0 -2
  809. package/dist/ui-library/p-c1675a45.entry.js.map +0 -1
  810. package/dist/ui-library/p-c2df8c27.entry.js +0 -2
  811. package/dist/ui-library/p-c2df8c27.entry.js.map +0 -1
  812. package/dist/ui-library/p-c86aa5b3.entry.js +0 -2
  813. package/dist/ui-library/p-c86aa5b3.entry.js.map +0 -1
  814. package/dist/ui-library/p-cd35b3c6.entry.js +0 -2
  815. package/dist/ui-library/p-cd35b3c6.entry.js.map +0 -1
  816. package/dist/ui-library/p-ce373da5.entry.js +0 -2
  817. package/dist/ui-library/p-ce373da5.entry.js.map +0 -1
  818. package/dist/ui-library/p-d2cf4280.entry.js +0 -2
  819. package/dist/ui-library/p-d2cf4280.entry.js.map +0 -1
  820. package/dist/ui-library/p-d310a6dd.entry.js.map +0 -1
  821. package/dist/ui-library/p-dfb6bff6.entry.js +0 -2
  822. package/dist/ui-library/p-dfb6bff6.entry.js.map +0 -1
  823. package/dist/ui-library/p-ee71e3a3.entry.js +0 -2
  824. package/dist/ui-library/p-ee71e3a3.entry.js.map +0 -1
  825. package/dist/ui-library/p-ef317d69.entry.js +0 -2
  826. package/dist/ui-library/p-ef317d69.entry.js.map +0 -1
  827. package/dist/ui-library/p-f385f1c2.entry.js +0 -2
  828. package/dist/ui-library/p-f385f1c2.entry.js.map +0 -1
  829. package/dist/ui-library/p-f73a6bdc.entry.js +0 -2
  830. package/dist/ui-library/p-f73a6bdc.entry.js.map +0 -1
  831. package/dist/ui-library/p-faa04bb5.js +0 -2
  832. package/dist/ui-library/p-faa04bb5.js.map +0 -1
  833. package/dist/ui-library/p-fcd57e0a.entry.js +0 -2
  834. package/dist/ui-library/p-fcd57e0a.entry.js.map +0 -1
  835. /package/dist/ui-library/{p-6907a7dc.js.map → p-605bdd81.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["convertToValidValue","value","multiple","Array","isArray","filter","element","length","convertToValidArrayValue","valueEquals","a","b","every","index","sixSelectCss","SixSelectStyle0","id","SixSelect","this","inputId","labelId","helpTextId","errorTextId","eventListeners","EventListeners","activeItemIndex","resizeObserver","ResizeObserver","updateDisplayedValues","handleBlur","hasFocus","sixBlur","emit","handleFocus","sixFocus","handleClearClick","async","event","stopPropagation","clearValues","_a","dropdown","show","setFocus","sixChange","isSelected","handleKeyDown","virtualScroll","autocomplete","includes","key","items","getVisibleItems","isOpen","code","ctrlKey","preventDefault","selectAll","hide","activeItem","at","click","_b","_c","_d","handleLabelClick","box","focus","handleMenuSelect","currentItem","detail","item","checked","getItems","forEach","i","syncValueFromItems","handleMenuShow","disabled","mainItems","style","display","checkedItems","getCheckedItems","selectionContainerItems","map","h","checkType","onClick","menuItem","target","isChecked","getItemLabel","handleMenuHide","handleSlotChange","hasHelpTextSlot","hasSlot","host","hasLabelSlot","hasErrorTextSlot","syncItemsFromValue","DEFAULT_DEBOUNCE_FAST","handleDisabledChange","handleLabelChange","handleMultipleChange","handleValueChange","newValue","connectedCallback","options","console","error","shadowRoot","addEventListener","forward","displayValuesContainer","observe","componentWillLoad","componentDidLoad","requestAnimationFrame","autocompleteInput","add","debounce","inputDebounce","selectedLabel","displayedValues","join","disconnectedCallback","disconnect","removeEventListener","removeAll","slot","querySelector","getTextContent","textContent","menu","querySelectorAll","getSelectionContainerItems","visibleItems","hasDeselectedOptions","option","some","val","checkedValues","displayValueOptions","overflowCount","d","showDisplayValue","showSeparator","separator","availableWidth","getWidth","fitCount","computeFitCount","hideOverflowCount","showFittingValues","setOverflowCount","showOverflowCount","render","hasSelection","hasMenuItems","showClear","showExpand","clearable","FormControl","label","helpText","errorText","errorTextCount","size","onLabelClick","required","displayError","invalid","part","ref","el","hoist","matchTriggerWidth","closeOnSelect","containingElement","disableHideOnEnterAndSpace","class","select","pill","onKeyDown","filterPlaceholder","filterDebounce","asyncFilter","select__box","line","role","tabIndex","onBlur","onFocus","placeholder","exportparts","name","tabindex","select__input","select__menu","onSlotchange","selectAllButton","type","selectAllText","selectAllDefaultText","opt","getBoundingClientRect","width","accumulatedWidth","displayOption","slice","displayValue","list","isLast","hideSeparator","hideDisplayValue","displayValueOption","classList","remove","count","lang","getLanguage"],"sources":["src/components/six-select/util.ts","src/components/six-select/six-select.scss?tag=six-select&encapsulation=shadow","src/components/six-select/six-select.tsx"],"sourcesContent":["export interface MenuItem {\n value: string;\n}\n\nexport function getValue(value: unknown, multiple: boolean, menuItems: MenuItem[]): string | string[] {\n if (multiple) {\n if (Array.isArray(value)) {\n return getSelectedValues(value, menuItems);\n } else {\n return getSelectedValuesFromString(value, menuItems);\n }\n }\n\n return getSelectedMenuItem(value, menuItems)?.value ?? '';\n}\n\nexport function isValidValue(value: unknown, multiple: boolean, menuItems: MenuItem[]): boolean {\n if (value === '') {\n return true;\n }\n\n if (multiple) {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n return true;\n }\n return getSelectedValues(value, menuItems).length === value.length;\n }\n return getSelectedValuesFromString(value, menuItems).length > 0;\n }\n\n return getSelectedMenuItem(value, menuItems) != null;\n}\n\nexport function convertToValidValue(value: unknown, multiple: boolean): string | string[] {\n if (multiple) {\n if (Array.isArray(value)) {\n return value.filter((element) => typeof element === 'string');\n } else if (typeof value === 'string' && value.length > 0) {\n return [value];\n } else {\n return [];\n }\n } else {\n if (typeof value === 'string') {\n return value;\n } else {\n return '';\n }\n }\n}\n\nexport function convertToValidArrayValue(value: unknown): string[] {\n return convertToValidValue(value, true) as string[];\n}\n\nexport function valueEquals(a: string | string[], b: string | string[]): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((element, index) => element === b[index]);\n } else if (typeof a === 'string' && typeof b === 'string') {\n return a === b;\n }\n return false;\n}\n\nexport function isValueEmpty(value: string | string[]): boolean {\n if (Array.isArray(value)) {\n return value.length === 0;\n }\n return value === '';\n}\n\nfunction getSelectedValues(values: unknown[], menuItems: MenuItem[]): string[] {\n return menuItems.filter((menuItem) => values.includes(menuItem.value)).map((menuItem) => menuItem.value);\n}\n\nfunction getSelectedValuesFromString(value: unknown, menuItems: MenuItem[]): string[] {\n return menuItems.filter((menuItem) => value === menuItem.value).map((menuItem) => menuItem.value);\n}\n\nfunction getSelectedMenuItem(value: unknown, menuItems: MenuItem[]): MenuItem | undefined {\n return menuItems.find((item) => value === item.value);\n}\n","@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n@import 'src/global/mixins/hidden';\n@import 'src/global/mixins/hide-scrollbar';\n\n:host,\n.select {\n display: block;\n}\n\n.select__box {\n display: inline-flex;\n align-items: center;\n justify-content: start;\n position: relative;\n width: 100%;\n font-family: var(--six-font-family);\n font-weight: var(--six-input-font-weight);\n font-size: var(--six-input-font-size-medium);\n letter-spacing: var(--six-input-letter-spacing);\n background-color: var(--six-input-background-color);\n border: solid var(--six-border-width) var(--six-input-border-color);\n vertical-align: middle;\n transition: var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: pointer;\n\n &--line {\n border: none;\n border-bottom: solid var(--six-border-width) var(--six-input-border-color);\n }\n\n &--autocomplete {\n border: none;\n overflow: initial;\n }\n}\n\n.select:not(.select--disabled) .select__box:hover {\n background-color: var(--six-input-background-color-hover);\n color: var(--six-input-color-hover);\n\n border-bottom-color: var(--six-input-border-color-hover);\n\n &:not(.select__box--line) {\n border-color: var(--six-input-border-color-hover);\n }\n}\n\n.select:not(.select--disabled) .select__box:focus {\n background-color: var(--six-input-background-color-focus);\n outline: none;\n color: var(--six-input-color-focus);\n\n border-bottom-color: var(--six-input-border-color-focus);\n box-shadow: 0 1px 0 0 var(--six-input-border-color-focus);\n\n &:not(.select__box--line) {\n border-color: var(--six-input-border-color-focus);\n box-shadow: var(--six-input-focus-shadow);\n }\n}\n\n.select--disabled {\n .select__box {\n background-color: var(--six-input-background-color-disabled);\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n outline: none;\n\n &:not(.select__box--line) {\n border-color: var(--six-input-border-color-disabled);\n }\n }\n\n .select__clear {\n pointer-events: none;\n }\n}\n\n.select--invalid:not(.select--disabled):not(.select--focused) {\n .select__box {\n border-bottom-color: var(--six-input-border-color-danger);\n\n &:not(.input--line) {\n border-color: var(--six-input-border-color-danger);\n }\n }\n}\n\n.display__values {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n user-select: none;\n overflow: hidden;\n @include hide-scrollbar;\n}\n\n.display__values-values {\n flex: 0 1 auto;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.display__values-and-counter {\n display: flex;\n overflow: hidden;\n}\n\n.select__clear {\n flex-shrink: 0;\n flex-grow: 0;\n display: inline;\n}\n\n.select__icon {\n flex-shrink: 0;\n flex-grow: 0;\n display: inline;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.select--open .select__icon {\n transform: rotate(-180deg);\n}\n\n// Placeholder\n.placeholder {\n color: var(--six-input-placeholder-color);\n}\n\n.select--disabled .placeholder {\n color: var(--six-input-placeholder-color-disabled);\n}\n\n// Hidden input (for form control validation to show)\n.select__hidden-select {\n @include visually-hidden();\n}\n\n.select__input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.select--small {\n .select__box {\n border-radius: var(--six-input-border-radius-small);\n font-size: var(--six-input-font-size-small);\n min-height: var(--six-height-small);\n\n &--line {\n border: none;\n border-bottom: solid var(--six-border-width) var(--six-input-border-color);\n }\n }\n\n .display__values {\n margin: 0 0 0 var(--six-input-spacing-small);\n }\n\n .select__clear {\n margin-right: var(--six-spacing-xxx-small);\n }\n\n .select__icon {\n margin-right: var(--six-spacing-x-small);\n }\n}\n\n.select--medium {\n .select__box {\n border-radius: var(--six-input-border-radius-medium);\n font-size: var(--six-input-font-size-medium);\n min-height: var(--six-height-medium);\n\n &--line {\n border: none;\n border-bottom: solid var(--six-border-width) var(--six-input-border-color);\n }\n }\n\n .display__values {\n margin: 0 0 0 var(--six-input-spacing-medium);\n }\n\n .select__clear {\n margin-right: var(--six-spacing-xxx-small);\n }\n\n .select__icon {\n margin-right: var(--six-spacing-x-small);\n }\n}\n\n.select--large {\n .select__box {\n border-radius: var(--six-input-border-radius-large);\n font-size: var(--six-input-font-size-large);\n min-height: var(--six-height-large);\n\n &--line {\n border: none;\n border-bottom: solid var(--six-border-width) var(--six-input-border-color);\n }\n }\n\n .display__values {\n margin: 0 0 0 var(--six-input-spacing-large);\n }\n\n .select__clear {\n margin-right: var(--six-spacing-xxx-small);\n }\n\n .select__icon {\n margin-right: var(--six-spacing-x-small);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.select--pill {\n &.select--small .select__box {\n border-radius: var(--six-height-small);\n }\n\n &.select--medium .select__box {\n border-radius: var(--six-height-medium);\n }\n\n &.select--large .select__box {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Menu\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n.select {\n &__menu {\n width: 100%;\n\n &--hidden {\n // hide the menu panel if there are no menu items\n display: none;\n }\n }\n}\n\n// fixes problem where six-select height changes when size=\"small\" and clearing button is visible\nsix-icon-button::part(base) {\n padding-top: 0;\n padding-bottom: 0;\n}\n\n.selection-container--border {\n border-bottom: solid var(--six-border-width) var(--six-menu-divider-color);\n padding-top: var(--six-spacing-xx-small);\n padding-bottom: var(--six-spacing-xx-small);\n}\n\n.display-value--hidden {\n display: none;\n}\n\n.overflow-count {\n color: var(--six-color-web-rock-600);\n padding-left: var(--six-spacing-x-small);\n}\n\n.overflow-count-hidden {\n display: none;\n}\n\n.separator--hidden {\n display: none;\n}\n\n.select-all {\n border-top: 1px solid var(--six-color-web-rock-300);\n display: flex;\n justify-content: end;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { getTextContent, hasSlot } from '../../utils/slot';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { SixMenuItemData } from '../six-menu/six-menu';\nimport { getLanguage } from '../../utils/error-messages';\nimport { convertToValidArrayValue, convertToValidValue, valueEquals } from './util';\n\nexport interface SixSelectChangePayload {\n value: string | string[];\n isSelected: boolean;\n}\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The select's options in the form of menu items.\n * @slot label - The select's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the select.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part clear-button - The input's clear button, exported from six-input.\n * @part form-control - The form control that wraps the label, input, and help text.\n * @part help-text - The select's help text.\n * @part icon - The select's icon.\n * @part label - The select's label.\n * @part menu - The select menu, a six-menu element.\n * @part tag - The multiselect option, a six-tag element.\n * @part tags - The container in which multiselect options are rendered.\n */\n\n@Component({\n tag: 'six-select',\n styleUrl: 'six-select.scss',\n shadow: true,\n})\nexport class SixSelect {\n private box?: HTMLElement;\n private menu?: HTMLElement;\n private dropdown?: HTMLSixDropdownElement;\n private displayValuesContainer?: HTMLElement;\n private overflowCount?: HTMLElement;\n private autocompleteInput?: HTMLSixInputElement;\n private inputId = `select-${++id}`;\n private labelId = `select-label-${id}`;\n private helpTextId = `select-help-text-${id}`;\n private errorTextId = `select-error-text-${id}`;\n private eventListeners = new EventListeners();\n private activeItemIndex = -1;\n private resizeObserver = new ResizeObserver(() => this.updateDisplayedValues());\n\n @Element() host!: HTMLSixSelectElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorTextSlot = false;\n @State() isOpen = false;\n @State() displayedValues: string[] = [];\n\n /** Menu items shown in the selection container. */\n @State() selectionContainerItems: HTMLSixMenuItemElement[] = [];\n\n /** Set to true to enable multiselect. */\n @Prop() multiple = false;\n\n /** Enables the select all button. */\n @Prop() selectAllButton = false;\n\n /**\n * Custom text for the \"select all\" button. Defaults to \"Select all\" and equivalents in supported languages.\n */\n @Prop() selectAllText?: string;\n\n /**\n * The maximum number of tags to show when `multiple` is true. After the maximum, \"+n\" will be shown to indicate the\n * number of additional items that are selected. Set to -1 to remove the limit.\n *\n * @deprecated: This property is ignored. The component now displays as many items as possible and computes the \"+n\" dynamically.\n */\n @Prop() maxTagsVisible = 3;\n\n /** Set to true to disable the select control. */\n @Prop() disabled = false;\n\n /** The select's name. */\n @Prop() name = '';\n\n /** The select's placeholder text. */\n @Prop() placeholder = '';\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder?: string;\n\n /** The debounce for the filter callbacks. */\n @Prop() filterDebounce?: number;\n\n /** The select's size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\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 value of the control. This will be a string or an array depending on `multiple`. */\n @Prop({ mutable: true }) value: string | string[] = '';\n\n /** Set to true to draw a pill-style select with rounded edges. */\n @Prop() pill = false;\n\n /** The select's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** Set to true to add a clear button when the select is populated. */\n @Prop() clearable = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** Set to render as line */\n @Prop() line = false;\n\n /** Set to true to allow filtering for entries in the dropdown */\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 /**\n * Set to true to turn the six-select into an autocomplete.\n */\n @Prop() autocomplete = false;\n\n /** The debounce for when the input changes for autocompletes should be emitted */\n @Prop() inputDebounce = DEFAULT_DEBOUNCE_FAST;\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 @Watch('disabled')\n handleDisabledChange() {\n if (this.disabled && this.isOpen) {\n this.dropdown?.hide();\n }\n }\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('multiple')\n handleMultipleChange() {\n this.value = convertToValidValue(this.value, this.multiple);\n this.syncItemsFromValue();\n }\n\n @Watch('value')\n async handleValueChange() {\n const newValue = convertToValidValue(this.value, this.multiple);\n if (!valueEquals(this.value, newValue)) {\n this.value = newValue;\n }\n await this.syncItemsFromValue();\n }\n\n /** Emitted when the control's value changes. */\n @Event({ eventName: 'six-select-change' }) sixChange!: EventEmitter<SixSelectChangePayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-select-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-select-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n if (this.virtualScroll && this.options === null) {\n console.error('Options must be defined when using virtual scrolling');\n }\n\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-select-change', 'change', this.host);\n this.eventListeners.forward('six-select-blur', 'blur', this.host);\n this.eventListeners.forward('six-select-focus', 'focus', this.host);\n if (this.displayValuesContainer) {\n this.resizeObserver.observe(this.displayValuesContainer);\n }\n }\n\n componentWillLoad() {\n this.value = convertToValidValue(this.value, this.multiple);\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n if (this.displayValuesContainer) {\n this.resizeObserver.observe(this.displayValuesContainer);\n }\n\n // We need to do an initial sync after the component has rendered, so this will suppress the re-render warning\n requestAnimationFrame(() => this.syncItemsFromValue());\n\n if (this.autocomplete && this.autocompleteInput != null) {\n const autocompleteInput = this.autocompleteInput;\n this.eventListeners.add(\n autocompleteInput,\n 'six-input-input',\n debounce((event) => {\n this.value = autocompleteInput.value;\n this.sixChange.emit({ value: this.value, isSelected: false });\n event.stopPropagation();\n\n if (this.virtualScroll || this.value.length > 0) {\n this.dropdown?.show();\n }\n }, this.inputDebounce)\n );\n\n const selectedLabel = this.displayedValues.join(', ');\n autocompleteInput.value = selectedLabel;\n }\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the select. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.hasFocus = true;\n this.box?.focus(options);\n }\n\n private getItemLabel(item: HTMLSixMenuItemElement): string {\n const slot = item.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement;\n if (slot != null) {\n return getTextContent(slot);\n } else {\n // bugfix/COMSLI-203-six-select-value-is-not-updated-if-the-slot-is-changed\n return item.textContent ?? '';\n }\n }\n\n private getItems(): HTMLSixMenuItemElement[] {\n if (this.options !== null && this.menu != null && this.menu.shadowRoot != null) {\n return [...this.menu.shadowRoot.querySelectorAll('six-menu-item')];\n }\n\n return [...this.host.querySelectorAll('six-menu-item')];\n }\n\n private getVisibleItems(): HTMLSixMenuItemElement[] {\n const selectionContainerItems = this.getSelectionContainerItems();\n const mainItems = this.getItems();\n return [...selectionContainerItems, ...mainItems].filter((i) => i.style.display !== 'none');\n }\n\n private getSelectionContainerItems() {\n return [...(this.host.shadowRoot?.querySelectorAll('six-menu-item') || [])];\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClearClick = async (event: MouseEvent) => {\n event.stopPropagation();\n await this.clearValues();\n await this.dropdown?.show();\n await this.setFocus();\n this.sixChange.emit({ value: this.value, isSelected: true });\n };\n\n private async clearValues() {\n this.value = this.multiple ? [] : '';\n this.selectionContainerItems = [];\n await this.syncItemsFromValue();\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.virtualScroll || this.autocomplete) {\n return;\n }\n\n if (['Control', 'Escape'].includes(event.key)) {\n return;\n }\n\n const items = this.getVisibleItems();\n\n // Ctrl-A selects all items\n if (this.isOpen && this.multiple && event.code === 'KeyA' && event.ctrlKey) {\n event.preventDefault();\n this.selectAll();\n return;\n }\n\n // Tabbing out of the control closes it\n if (event.key === 'Tab') {\n if (this.isOpen) {\n this.dropdown?.hide();\n }\n return;\n }\n\n if (event.key === ' ' && !this.multiple) {\n return;\n }\n\n // Enter and Space selects the active item\n if (this.activeItemIndex >= 0 && ['Enter', ' '].includes(event.key)) {\n const activeItem = items.at(this.activeItemIndex);\n event.preventDefault();\n activeItem?.click();\n return;\n }\n\n // Move the selection when pressing up or down\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n // Show the menu if it's not already open\n if (!this.isOpen) {\n this.dropdown?.show();\n }\n\n if (items.length > 0) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n this.activeItemIndex++;\n } else if (event.key === 'ArrowUp') {\n this.activeItemIndex--;\n } else if (event.key === 'Home') {\n this.activeItemIndex = 0;\n } else if (event.key === 'End') {\n this.activeItemIndex = items.length - 1;\n }\n\n if (this.activeItemIndex < 0) this.activeItemIndex = 0;\n if (this.activeItemIndex > items.length - 1) this.activeItemIndex = items.length - 1;\n\n items.at(this.activeItemIndex)?.setFocus();\n }\n }\n\n // All other keys open the menu\n if (!this.isOpen) {\n event.stopPropagation();\n event.preventDefault();\n this.dropdown?.show();\n }\n };\n\n private selectAll() {\n const visibleItems = this.getVisibleItems();\n const hasDeselectedOptions = this.hasDeselectedOptions();\n visibleItems.filter((option) => !option.disabled).forEach((option) => (option.checked = hasDeselectedOptions));\n const checkedItems = visibleItems.filter((option) => option.checked).map((option) => option.value);\n this.value = hasDeselectedOptions ? checkedItems : [];\n this.sixChange.emit({ value: this.value, isSelected: true });\n }\n\n private handleLabelClick = () => {\n this.box?.focus();\n };\n\n private handleMenuSelect = (event: CustomEvent) => {\n const currentItem = event.detail.item as HTMLSixMenuItemElement;\n if (this.multiple) {\n currentItem.checked = !currentItem.checked;\n } else {\n this.getItems().forEach((i) => (i.checked = false));\n currentItem.checked = true;\n }\n this.syncValueFromItems();\n this.sixChange.emit({ value: this.value, isSelected: true });\n };\n\n private handleMenuShow = (event: CustomEvent) => {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n this.activeItemIndex = -1;\n\n if (!this.virtualScroll && this.multiple) {\n // reset display style of main items\n const mainItems = this.getItems();\n mainItems.forEach((item) => (item.style.display = 'unset'));\n\n // show selected menu items in the selection container and hide them in the main container\n const checkedItems = getCheckedItems(convertToValidArrayValue(this.value), mainItems);\n checkedItems.forEach((i) => (i.style.display = 'none'));\n this.selectionContainerItems = checkedItems.map((item) => {\n return (\n <six-menu-item\n key={item.value} // key makes sure the node is not re-used: https://stenciljs.com/docs/templating-jsx#conditionals\n checked={true}\n value={item.value}\n checkType={this.multiple ? 'checkbox' : 'check'}\n onClick={(event) => {\n event.stopPropagation();\n if (!this.disabled) {\n const menuItem = event.target as HTMLSixMenuItemElement;\n const isChecked = menuItem.checked;\n menuItem.checked = !isChecked;\n item.checked = !isChecked;\n this.syncValueFromItems();\n this.sixChange.emit({ value: this.value, isSelected: true });\n }\n }}\n >\n {this.getItemLabel(item)}\n </six-menu-item>\n );\n });\n }\n\n this.isOpen = true;\n };\n\n private handleMenuHide = () => {\n this.isOpen = false;\n if (this.multiple) {\n this.handleBlur();\n }\n };\n\n private handleSlotChange = () => {\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n this.syncItemsFromValue();\n };\n\n /**\n * Sets the checked state of menu items and renders the displayed values.\n */\n private async syncItemsFromValue() {\n const selectionContainerItems = this.getSelectionContainerItems();\n const mainItems = this.getItems();\n const value = convertToValidValue(this.value, this.multiple);\n\n selectionContainerItems.forEach((item) => {\n item.checkType = this.multiple ? 'checkbox' : 'check';\n if (Array.isArray(value)) {\n item.checked = value.some((val) => val === item.value);\n } else {\n item.checked = value === item.value;\n }\n });\n\n mainItems.forEach((item) => {\n item.checkType = this.multiple ? 'checkbox' : 'check';\n if (Array.isArray(value)) {\n item.checked = value.some((val) => val === item.value);\n } else {\n item.checked = value === item.value;\n }\n });\n\n const checkedItems = getCheckedItems(convertToValidArrayValue(this.value), mainItems);\n this.displayedValues = checkedItems.map((i) => this.getItemLabel(i));\n\n if (this.autocomplete && this.autocompleteInput != null && !this.hasFocus) {\n const selectedLabel = this.displayedValues.join(', ');\n this.autocompleteInput.value = selectedLabel;\n }\n\n requestAnimationFrame(() => {\n this.updateDisplayedValues();\n });\n }\n\n private syncValueFromItems() {\n const items = this.getItems();\n const checkedValues = items.filter((item) => item.checked).map((item) => item.value);\n if (this.multiple) {\n this.value = checkedValues;\n } else {\n this.value = checkedValues.length > 0 ? checkedValues[0] : '';\n }\n }\n\n private updateDisplayedValues() {\n const displayValueOptions = [...(this.displayValuesContainer?.querySelectorAll('.display-value') ?? [])];\n if (this.displayValuesContainer == null || displayValueOptions.length === 0 || this.overflowCount == null) {\n return;\n }\n\n // Show all options and separators to properly measure all widths.\n displayValueOptions.forEach((d) => {\n showDisplayValue(d);\n showSeparator(d);\n });\n\n // Measure available width. The last separator is added to the available width, because it will be hidden later on.\n const separator = displayValueOptions[displayValueOptions.length - 1].querySelector('.separator');\n if (separator == null) return;\n let availableWidth = getWidth(this.displayValuesContainer) + getWidth(separator);\n\n // Compute how many display value elements fit in the available width\n let { fitCount, overflowCount } = computeFitCount(displayValueOptions, availableWidth);\n\n if (overflowCount === 0) {\n // All items fit, hide overflow count and show all values.\n hideOverflowCount(this.overflowCount);\n showFittingValues(displayValueOptions, fitCount);\n } else {\n // Not all items fit in the available width. Recompute the available width with the overflow-count visible.\n\n // Increment overflow count by one to make sure the elements fit, even if the overflow count increases to the\n // next higher power of ten, e.g. from 9 to 10 or 99 to 100.\n setOverflowCount(this.overflowCount, overflowCount + 1);\n showOverflowCount(this.overflowCount);\n\n // Subtract the overflow count from the available width\n availableWidth = availableWidth - getWidth(this.overflowCount);\n\n // Compute how many display value elements fit in the new available width\n ({ fitCount, overflowCount } = computeFitCount(displayValueOptions, availableWidth));\n\n // Show overflow count and items that fit.\n setOverflowCount(this.overflowCount, overflowCount);\n showFittingValues(displayValueOptions, fitCount);\n }\n }\n\n render() {\n const hasSelection = this.hasSelection();\n const items = this.getItems();\n const hasMenuItems = items.length > 0;\n const hasDeselectedOptions = this.hasDeselectedOptions();\n let showClear = false;\n let showExpand = hasMenuItems;\n if (this.clearable && hasSelection) {\n showClear = true;\n showExpand = false;\n }\n\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size={this.size}\n onLabelClick={this.handleLabelClick}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <six-dropdown\n part=\"base\"\n ref={(el) => (this.dropdown = el)}\n hoist={this.hoist}\n matchTriggerWidth={true}\n closeOnSelect={!this.multiple}\n containingElement={this.host}\n disableHideOnEnterAndSpace={this.autocomplete}\n class={{\n select: true,\n 'select--open': this.isOpen,\n 'select--empty': this.value?.length === 0,\n 'select--focused': this.hasFocus,\n 'select--clearable': this.clearable,\n 'select--disabled': this.disabled,\n 'select--multiple': this.multiple,\n 'select--has-tags': this.multiple && hasSelection,\n 'select--placeholder-visible': this.displayedValues.length === 0,\n 'select--small': this.size === 'small',\n 'select--medium': this.size === 'medium',\n 'select--large': this.size === 'large',\n 'select--pill': this.pill,\n 'select--invalid': this.invalid,\n }}\n onKeyDown={this.handleKeyDown}\n onSix-dropdown-show={this.handleMenuShow}\n onSix-dropdown-hide={this.handleMenuHide}\n filterPlaceholder={this.filterPlaceholder}\n filterDebounce={this.filterDebounce}\n filter={this.filter}\n asyncFilter={this.asyncFilter}\n virtualScroll={this.virtualScroll}\n >\n {/* Trigger */}\n <div\n slot=\"trigger\"\n ref={(el) => (this.box = el)}\n id={this.inputId}\n class={{\n select__box: true,\n 'select__box--line': this.line,\n 'select__box--autocomplete': this.autocomplete,\n }}\n role=\"combobox\"\n aria-labelledby={this.labelId}\n aria-describedby={this.helpTextId}\n aria-haspopup=\"true\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n >\n {/* Display values */}\n <div class=\"display__values\" ref={(el) => (this.displayValuesContainer = el)}>\n {this.displayedValues.length > 0 ? (\n <span class=\"display__values-and-counter\">\n <span class=\"display__values-values\">\n {this.displayedValues.map((value) => (\n <span key={value} class=\"display-value\">\n {value}\n <span class={{ separator: true }}>, </span>\n </span>\n ))}\n </span>\n <span ref={(el) => (this.overflowCount = el)} class=\"overflow-count\">\n +10\n </span>\n </span>\n ) : (\n <span class=\"placeholder\">{this.placeholder}</span>\n )}\n </div>\n\n {/* Clear */}\n {showClear && (\n <six-icon-button\n exportparts=\"base:clear-button\"\n class=\"select__clear\"\n name=\"clear\"\n size=\"small\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n />\n )}\n\n {/* Expand */}\n {showExpand && (\n <span part=\"icon\" class=\"select__icon\">\n <six-icon size=\"medium\">expand_more</six-icon>\n </span>\n )}\n\n {/* Autocomplete */}\n <six-input\n ref={(el) => (this.autocompleteInput = el)}\n class={{\n select__input: true,\n 'select__hidden-select': !this.autocomplete,\n }}\n aria-hidden=\"true\"\n required={this.required}\n onFocus={this.handleFocus}\n clearable={this.clearable}\n placeholder={this.placeholder}\n pill={this.pill}\n disabled={this.disabled}\n size={this.size}\n tabIndex={-1}\n />\n </div>\n\n {/* Selection container */}\n <div\n class={{\n 'selection-container': true,\n 'selection-container--border':\n this.selectionContainerItems.length > 0 && items.length !== this.selectionContainerItems.length,\n }}\n >\n {this.selectionContainerItems}\n </div>\n\n {/* Menu */}\n <six-menu\n ref={(el) => (this.menu = el)}\n part=\"menu\"\n class={{\n select__menu: true,\n 'select__menu--hidden': !hasMenuItems,\n }}\n onSix-menu-item-selected={this.handleMenuSelect}\n items={this.options}\n virtualScroll={this.virtualScroll}\n remove-box-shadow={true}\n disable-keyboard-handling={true}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </six-menu>\n\n {/* Select all */}\n {this.multiple && this.selectAllButton && (\n <div class=\"select-all\" slot=\"dropdown-footer\">\n <six-button type=\"link\" onClick={() => this.selectAll()}>\n {this.selectAllText == null ? selectAllDefaultText(hasDeselectedOptions) : this.selectAllText}\n </six-button>\n </div>\n )}\n </six-dropdown>\n </FormControl>\n );\n }\n\n private hasSelection() {\n return this.multiple ? this.value.length > 0 : this.value !== '';\n }\n\n private hasDeselectedOptions() {\n return this.getVisibleItems().some((opt) => !opt.disabled && !opt.checked);\n }\n}\n\nfunction getCheckedItems(value: string[], items: HTMLSixMenuItemElement[]): HTMLSixMenuItemElement[] {\n return items.filter((item) => value.includes(item.value));\n}\n\nfunction getWidth(element: Element) {\n return element.getBoundingClientRect().width;\n}\n\nfunction computeFitCount(options: Element[], availableWidth: number): { fitCount: number; overflowCount: number } {\n let accumulatedWidth = 0;\n let fitCount = 0;\n\n for (let i = 0; i < options.length; i++) {\n const displayOption = options[i];\n const width = getWidth(displayOption);\n if (i === 0 && width > availableWidth) {\n fitCount = 1;\n break;\n }\n accumulatedWidth += width;\n if (accumulatedWidth > availableWidth) {\n break;\n } else {\n fitCount += 1;\n }\n }\n const overflowCount = options.length - fitCount;\n return { fitCount, overflowCount };\n}\n\nfunction showFittingValues(displayValueOptions: Element[], fitCount: number) {\n if (displayValueOptions.length > 0) {\n // show items that fit\n displayValueOptions.slice(0, fitCount).forEach((displayValue, index, list) => {\n showDisplayValue(displayValue);\n const isLast = index === list.length - 1;\n if (isLast) {\n hideSeparator(displayValue);\n } else {\n showSeparator(displayValue);\n }\n });\n\n // hide the rest\n displayValueOptions.slice(fitCount).forEach((displayValue) => {\n hideDisplayValue(displayValue);\n showSeparator(displayValue);\n });\n }\n}\n\nfunction hideSeparator(displayValueOption: Element) {\n displayValueOption.querySelector('.separator')?.classList.add('separator--hidden');\n}\n\nfunction showSeparator(displayValueOption: Element) {\n displayValueOption.querySelector('.separator')?.classList.remove('separator--hidden');\n}\n\nfunction showDisplayValue(displayValueOption: Element) {\n displayValueOption.classList.remove('display-value--hidden');\n}\n\nfunction hideDisplayValue(displayValueOption: Element) {\n displayValueOption.classList.add('display-value--hidden');\n}\n\nfunction setOverflowCount(overflowCount: Element, count: number) {\n overflowCount.textContent = `+${count}`;\n}\n\nfunction showOverflowCount(overflowCount: Element) {\n overflowCount.classList.remove('overflow-count-hidden');\n}\n\nfunction hideOverflowCount(overflowCount: Element) {\n overflowCount.classList.add('overflow-count-hidden');\n}\n\nfunction selectAllDefaultText(hasDeselectedOptions: boolean) {\n const lang = getLanguage();\n switch (lang) {\n case 'de':\n return hasDeselectedOptions ? 'Alle auswählen' : 'Alle abwählen';\n case 'fr':\n return hasDeselectedOptions ? 'Tout sélectionner' : 'Tout désélectionner';\n case 'it':\n return hasDeselectedOptions ? 'Seleziona tutto' : 'Deseleziona tutto';\n case 'en':\n return hasDeselectedOptions ? 'Select all' : 'Deselect all';\n case 'es':\n return hasDeselectedOptions ? 'Seleccionar todo' : 'Deseleccionar todo';\n }\n}\n"],"mappings":"oQAkCgBA,EAAoBC,EAAgBC,GAClD,GAAIA,EAAU,CACZ,GAAIC,MAAMC,QAAQH,GAAQ,CACxB,OAAOA,EAAMI,QAAQC,UAAmBA,IAAY,U,MAC/C,UAAWL,IAAU,UAAYA,EAAMM,OAAS,EAAG,CACxD,MAAO,CAACN,E,KACH,CACL,MAAO,E,MAEJ,CACL,UAAWA,IAAU,SAAU,CAC7B,OAAOA,C,KACF,CACL,MAAO,E,EAGb,C,SAEgBO,EAAyBP,GACvC,OAAOD,EAAoBC,EAAO,KACpC,C,SAEgBQ,EAAYC,EAAsBC,GAChD,GAAIR,MAAMC,QAAQM,IAAMP,MAAMC,QAAQO,GAAI,CACxC,OAAOD,EAAEH,SAAWI,EAAEJ,QAAUG,EAAEE,OAAM,CAACN,EAASO,IAAUP,IAAYK,EAAEE,I,MACrE,UAAWH,IAAM,iBAAmBC,IAAM,SAAU,CACzD,OAAOD,IAAMC,C,CAEf,OAAO,KACT,CC/DA,MAAMG,EAAe,yqPACrB,MAAAC,EAAeD,ECcf,IAAIE,EAAK,E,MA6BIC,EAAS,M,0JAOZC,KAAAC,QAAU,YAAYH,IACtBE,KAAAE,QAAU,gBAAgBJ,IAC1BE,KAAAG,WAAa,oBAAoBL,IACjCE,KAAAI,YAAc,qBAAqBN,IACnCE,KAAAK,eAAiB,IAAIC,EACrBN,KAAAO,iBAAmB,EAC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L,UAAUC,OAAO,oBACnE,CAEA,SAASxE,EAAiBsE,GACxBA,EAAmBC,UAAUC,OAAO,wBACtC,CAEA,SAASH,EAAiBC,GACxBA,EAAmBC,UAAUjG,IAAI,wBACnC,CAEA,SAASmC,EAAiBX,EAAwB2E,GAChD3E,EAAcX,YAAc,IAAIsF,GAClC,CAEA,SAAS/D,EAAkBZ,GACzBA,EAAcyE,UAAUC,OAAO,wBACjC,CAEA,SAASjE,EAAkBT,GACzBA,EAAcyE,UAAUjG,IAAI,wBAC9B,CAEA,SAASoF,EAAqBlE,GAC5B,MAAMkF,EAAOC,IACb,OAAQD,GACN,IAAK,KACH,OAAOlF,EAAuB,iBAAmB,gBACnD,IAAK,KACH,OAAOA,EAAuB,oBAAsB,sBACtD,IAAK,KACH,OAAOA,EAAuB,kBAAoB,oBACpD,IAAK,KACH,OAAOA,EAAuB,aAAe,eAC/C,IAAK,KACH,OAAOA,EAAuB,mBAAqB,qBAEzD,C"}
@@ -0,0 +1,2 @@
1
+ import{r as e,h as s}from"./p-05eb1bab.js";const a=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.menu-label{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);color:var(--six-input-label-color);padding:var(--six-spacing-xx-small) var(--six-spacing-small);user-select:none}";const o=a;const i=class{constructor(s){e(this,s)}render(){return s("div",{key:"5183d165a877bd2ca0c25d4ff61d55200b66132d",part:"base",class:"menu-label"},s("slot",{key:"5adecf55a82a78de5eee401aeec442f7e60e0874"}))}};i.style=o;export{i as six_menu_label};
2
+ //# sourceMappingURL=p-4963f03c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixMenuLabelCss","SixMenuLabelStyle0","SixMenuLabel","render","h","key","part","class"],"sources":["src/components/six-menu-label/six-menu-label.scss?tag=six-menu-label&encapsulation=shadow","src/components/six-menu-label/six-menu-label.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-label {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n color: var(--six-input-label-color);\n padding: var(--six-spacing-xx-small) var(--six-spacing-small);\n user-select: none;\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu label's content.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-menu-label',\n styleUrl: 'six-menu-label.scss',\n shadow: true,\n})\nexport class SixMenuLabel {\n render() {\n return (\n <div part=\"base\" class=\"menu-label\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAkB,ucACxB,MAAAC,EAAeD,E,MCiBFE,EAAY,M,yBACvB,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,KAAK,OAAOC,MAAM,cACrBH,EAAA,QAAAC,IAAA,6C"}
@@ -0,0 +1,2 @@
1
+ import{r as a,h as i}from"./p-05eb1bab.js";const t=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;--size:2rem}.avatar{display:inline-flex;align-items:center;justify-content:center;position:relative;width:var(--size);height:var(--size);background-color:var(--six-avatar-background-color);font-family:var(--six-font-sans);font-size:calc(var(--size) * 0.5);font-weight:var(--six-font-weight-normal);color:var(--six-avatar-color);overflow:hidden;user-select:none;vertical-align:middle;cursor:pointer;outline:none}.avatar:hover{box-shadow:var(--six-shadow-medium)}.avatar--circle{border-radius:var(--six-border-radius-circle)}.avatar--rounded{border-radius:var(--six-border-radius-medium)}.avatar--square{border-radius:0}.avatar__icon{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%}.avatar__initials{line-height:1;text-transform:uppercase}.avatar__image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}";const r=t;const e=class{constructor(i){a(this,i);this.handleImageError=()=>{this.hasError=true};this.hasError=false;this.image="";this.alt="";this.initials="";this.shape="circle"}render(){return i("div",{key:"d2a98a9d561a826a49fff6f7b9e40faa9a970d49",part:"base",class:{avatar:true,"avatar--circle":this.shape==="circle","avatar--rounded":this.shape==="rounded","avatar--square":this.shape==="square"},role:"image","aria-label":this.alt,tabIndex:0},this.initials===""&&i("div",{part:"icon",class:"avatar__icon"},i("slot",{name:"icon"},i("six-icon",null,"person"))),this.initials&&i("div",{part:"initials",class:"avatar__initials"},this.initials),this.image&&!this.hasError&&i("img",{part:"image",class:"avatar__image",src:this.image,onError:this.handleImageError}))}};e.style=r;export{e as six_avatar};
2
+ //# sourceMappingURL=p-4bc7bbdb.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixAvatarCss","SixAvatarStyle0","SixAvatar","this","handleImageError","hasError","render","h","key","part","class","avatar","shape","role","alt","tabIndex","initials","name","image","src","onError"],"sources":["src/components/six-avatar/six-avatar.scss?tag=six-avatar&encapsulation=shadow","src/components/six-avatar/six-avatar.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --size: The size of the avatar.\n */\n:host {\n display: inline-block;\n\n --size: 2rem;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n background-color: var(--six-avatar-background-color);\n font-family: var(--six-font-sans);\n font-size: calc(var(--size) * 0.5);\n font-weight: var(--six-font-weight-normal);\n color: var(--six-avatar-color);\n overflow: hidden;\n user-select: none;\n vertical-align: middle;\n cursor: pointer;\n outline: none;\n\n &:hover {\n box-shadow: var(--six-shadow-medium);\n }\n}\n\n.avatar--circle {\n border-radius: var(--six-border-radius-circle);\n}\n\n.avatar--rounded {\n border-radius: var(--six-border-radius-medium);\n}\n\n.avatar--square {\n border-radius: 0;\n}\n\n.avatar__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.avatar__initials {\n line-height: 1;\n text-transform: uppercase;\n}\n\n.avatar__image {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n","import { Component, h, Prop, State } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot icon - The default icon to use when no image or initials are present.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the avatar icon.\n * @part initials - The container that wraps the avatar initials.\n * @part image - The avatar image.\n */\n@Component({\n tag: 'six-avatar',\n styleUrl: 'six-avatar.scss',\n shadow: true,\n})\nexport class SixAvatar {\n @State() hasError = false;\n\n /** The image source to use for the avatar. */\n @Prop() image = '';\n\n /** Alternative text for the image. */\n @Prop() alt = '';\n\n /** Initials to use as a fallback when no image is available (1-2 characters max recommended). */\n @Prop() initials = '';\n\n /** The shape of the avatar. */\n @Prop() shape: 'circle' | 'square' | 'rounded' = 'circle';\n\n private handleImageError = () => {\n this.hasError = true;\n };\n\n render() {\n return (\n <div\n part=\"base\"\n class={{\n avatar: true,\n 'avatar--circle': this.shape === 'circle',\n 'avatar--rounded': this.shape === 'rounded',\n 'avatar--square': this.shape === 'square',\n }}\n role=\"image\"\n aria-label={this.alt}\n tabIndex={0}\n >\n {this.initials === '' && (\n <div part=\"icon\" class=\"avatar__icon\">\n <slot name=\"icon\">\n <six-icon>person</six-icon>\n </slot>\n </div>\n )}\n\n {this.initials && (\n <div part=\"initials\" class=\"avatar__initials\">\n {this.initials}\n </div>\n )}\n\n {this.image && !this.hasError && (\n <img part=\"image\" class=\"avatar__image\" src={this.image} onError={this.handleImageError} />\n )}\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAe,2/BACrB,MAAAC,EAAeD,E,MCmBFE,EAAS,M,yBAeZC,KAAAC,iBAAmB,KACzBD,KAAKE,SAAW,IAAI,E,cAfF,M,WAGJ,G,SAGF,G,cAGK,G,WAG8B,Q,CAMjD,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,2CACEC,KAAK,OACLC,MAAO,CACLC,OAAQ,KACR,iBAAkBR,KAAKS,QAAU,SACjC,kBAAmBT,KAAKS,QAAU,UAClC,iBAAkBT,KAAKS,QAAU,UAEnCC,KAAK,QAAO,aACAV,KAAKW,IACjBC,SAAU,GAETZ,KAAKa,WAAa,IACjBT,EAAA,OAAKE,KAAK,OAAOC,MAAM,gBACrBH,EAAA,QAAMU,KAAK,QACTV,EAAA,4BAKLJ,KAAKa,UACJT,EAAA,OAAKE,KAAK,WAAWC,MAAM,oBACxBP,KAAKa,UAITb,KAAKe,QAAUf,KAAKE,UACnBE,EAAA,OAAKE,KAAK,QAAQC,MAAM,gBAAgBS,IAAKhB,KAAKe,MAAOE,QAASjB,KAAKC,mB"}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as i}from"./p-05eb1bab.js";const r=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:grid}.center-content{display:grid;align-self:center;justify-self:center;grid-gap:5px;grid-auto-flow:column}.align-item{margin:auto}.indicator,.indicator--acceptance,.indicator--etu,.indicator--dev,.indicator--itu{font-family:var(--six-font-family);font-size:14px;font-weight:var(--six-font-weight-bold);display:grid;align-content:center;width:100%;height:24px}.indicator--itu{background-color:var(--six-color-success-600);color:var(--six-color-web-rock-900)}.indicator--dev{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.indicator--etu{background-color:var(--six-color-action-600);color:var(--six-color-white)}.indicator--acceptance{background-color:var(--six-color-warning-800);color:var(--six-color-web-rock-900)}";const t=r;const c=class{constructor(i){o(this,i);this.stage=null}render(){return this.stage==null||this.stage=="PROD"?null:i("div",{class:`indicator--${this.stage.toLowerCase()}`},i("div",{class:"center-content"},i("six-icon",{class:"align-item",size:"small"},"error_outline"),i("span",{class:"align-item"},i("slot",null))))}};c.style=t;export{c as six_stage_indicator};
2
+ //# sourceMappingURL=p-4d89932f.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixStageIndicatorCss","SixStageIndicatorStyle0","SixStageIndicator","render","this","stage","h","class","toLowerCase","size"],"sources":["src/components/six-stage-indicator/six-stage-indicator.scss?tag=six-stage-indicator&encapsulation=shadow","src/components/six-stage-indicator/six-stage-indicator.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: grid;\n}\n\n.center-content {\n display: grid;\n align-self: center;\n justify-self: center;\n grid-gap: 5px;\n grid-auto-flow: column;\n}\n\n.align-item {\n margin: auto;\n}\n\n.indicator {\n font-family: var(--six-font-family);\n font-size: 14px;\n font-weight: var(--six-font-weight-bold);\n display: grid;\n align-content: center;\n width: 100%;\n height: 24px;\n\n &--itu {\n @extend .indicator;\n background-color: var(--six-color-success-600);\n color: var(--six-color-web-rock-900);\n }\n\n &--dev {\n @extend .indicator;\n background-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n }\n\n &--etu {\n @extend .indicator;\n background-color: var(--six-color-action-600);\n color: var(--six-color-white);\n }\n\n &--acceptance {\n @extend .indicator;\n background-color: var(--six-color-warning-800);\n color: var(--six-color-web-rock-900);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\nexport type StageType = 'DEV' | 'ITU' | 'ETU' | 'ACCEPTANCE' | 'PROD' | null;\n\n@Component({\n tag: 'six-stage-indicator',\n styleUrl: 'six-stage-indicator.scss',\n shadow: true,\n})\nexport class SixStageIndicator {\n /** The indicators value attribute */\n @Prop() stage: StageType = null;\n\n render() {\n return this.stage == null || this.stage == 'PROD' ? null : (\n <div class={`indicator--${this.stage.toLowerCase()}`}>\n <div class=\"center-content\">\n <six-icon class=\"align-item\" size=\"small\">\n error_outline\n </six-icon>\n <span class={'align-item'}>\n <slot />\n </span>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAuB,m2BAC7B,MAAAC,EAAeD,E,MCQFE,EAAiB,M,oCAED,I,CAE3B,MAAAC,GACE,OAAOC,KAAKC,OAAS,MAAQD,KAAKC,OAAS,OAAS,KAClDC,EAAA,OAAKC,MAAO,cAAcH,KAAKC,MAAMG,iBACnCF,EAAA,OAAKC,MAAM,kBACTD,EAAA,YAAUC,MAAM,aAAaE,KAAK,SAAO,iBAGzCH,EAAA,QAAMC,MAAO,cACXD,EAAA,e"}
@@ -1,2 +1,2 @@
1
- import{h as l}from"./p-0beec94f.js";const r=(r,o)=>{var e,t,a,n,s,i,c,d;const f=(Array.isArray(r.errorText)?r.errorText:[r.errorText]).filter((l=>l!=null&&l.trim()!==""));const m=r.label!=null&&r.label.trim()!==""?true:(e=r.hasLabelSlot)!==null&&e!==void 0?e:false;const u=r.helpText!=null&&r.helpText.trim()!==""?true:(t=r.hasHelpTextSlot)!==null&&t!==void 0?t:false;const v=(f.length>0||((a=r.hasErrorTextSlot)!==null&&a!==void 0?a:false))&&((n=r.displayError)!==null&&n!==void 0?n:false);return l("div",{part:"form-control",class:{"form-control":true,"form-control--small":r.size==="small","form-control--medium":r.size==="medium","form-control--large":r.size==="large","form-control--has-label":m,"form-control--has-help-text":u,"form-control--has-error-text":v,"form-control--disabled":(s=r.disabled)!==null&&s!==void 0?s:false,"form-control--invalid":((i=r.displayError)!==null&&i!==void 0?i:false)&&!r.disabled}},l("label",{part:"label",id:r.labelId,class:{"form-control__label":true,"form-control__label__required":(c=r.required)!==null&&c!==void 0?c:false},htmlFor:r.inputId,"aria-hidden":m?"false":"true",onClick:r.onLabelClick},l("slot",{name:"label"},r.label)),l("div",{class:"form-control__input"},o),l("div",{part:"error-text",id:r.errorTextId,class:"form-control__error-text","aria-hidden":v?"false":"true"},l("slot",{name:"error-text"},f.slice(0,(d=r.errorTextCount)!==null&&d!==void 0?d:1).map((r=>l("six-error",null,r))))),l("div",{part:"help-text",id:r.helpTextId,class:"form-control__help-text","aria-hidden":u?"false":"true"},l("slot",{name:"help-text"},r.helpText)))};export{r as F};
2
- //# sourceMappingURL=p-6907a7dc.js.map
1
+ import{h as l}from"./p-05eb1bab.js";const r=(r,o)=>{var e,t,a,n,s,i,d,m;const c=(Array.isArray(r.errorText)?r.errorText:[r.errorText]).filter((l=>l!=null&&l.trim()!==""));const f=r.label!=null&&r.label.trim()!==""?true:(e=r.hasLabelSlot)!==null&&e!==void 0?e:false;const u=r.helpText!=null&&r.helpText.trim()!==""?true:(t=r.hasHelpTextSlot)!==null&&t!==void 0?t:false;const v=(c.length>0||((a=r.hasErrorTextSlot)!==null&&a!==void 0?a:false))&&((n=r.displayError)!==null&&n!==void 0?n:false);return l("div",{part:"form-control",class:{"form-control":true,"form-control--small":r.size==="small","form-control--medium":r.size==="medium","form-control--large":r.size==="large","form-control--has-label":f,"form-control--has-help-text":u,"form-control--has-error-text":v,"form-control--disabled":(s=r.disabled)!==null&&s!==void 0?s:false,"form-control--invalid":((i=r.displayError)!==null&&i!==void 0?i:false)&&!r.disabled}},l("label",{part:"label",id:r.labelId,class:{"form-control__label":true,"form-control__label__required":(d=r.required)!==null&&d!==void 0?d:false},htmlFor:r.inputId,"aria-hidden":f?"false":"true",onClick:r.onLabelClick},l("slot",{name:"label"},r.label)),l("div",{class:"form-control__input"},o),l("div",{part:"error-text",id:r.errorTextId,class:"form-control__error-text","aria-hidden":v?"false":"true"},l("slot",{name:"error-text"},c.slice(0,(m=r.errorTextCount)!==null&&m!==void 0?m:1).map((r=>l("six-error",null,r))))),l("div",{part:"help-text",id:r.helpTextId,class:"form-control__help-text","aria-hidden":u?"false":"true"},l("slot",{name:"help-text"},r.helpText)))};export{r as F};
2
+ //# sourceMappingURL=p-605bdd81.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,h as r}from"./p-05eb1bab.js";const s=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--track-color:var(--six-progress-track-color);--indicator-color:var(--six-progress-indicator-color);display:inline-flex}.progress-ring{display:inline-flex;align-items:center;justify-content:center;position:relative}.progress-ring__image{transform:rotate(-90deg);transform-origin:50% 50%}.progress-ring__track{stroke:var(--track-color)}.progress-ring__indicator{stroke:var(--indicator-color);transition:0.35s stroke-dashoffset, 0.35s stroke}.progress-ring__label{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;user-select:none;font-family:var(--six-font-family)}";const t=s;const i=class{constructor(r){e(this,r);this.size=128;this.strokeWidth=4;this.percentage=0}handlePercentageChange(){this.updateProgress()}componentDidLoad(){this.updateProgress()}updateProgress(){var e;if(((e=this.indicator)===null||e===void 0?void 0:e.r)==null)return;const r=this.indicator.r.baseVal.value;const s=r*2*Math.PI;const t=s-this.percentage/100*s;this.indicator.style.strokeDasharray=`${s} ${s}`;this.indicator.style.strokeDashoffset=`${t}`}render(){return r("div",{key:"e502ccf39d3b246d03122b446949ee8380e1a2fa",part:"base",class:"progress-ring"},r("svg",{key:"d37581863e5a67e9f8a9cd058954581ee7e86a4a",class:"progress-ring__image",width:this.size,height:this.size},r("circle",{key:"022eeb124e217d93479cf7ead2cabb9169b9afd4",class:"progress-ring__track","stroke-width":this.strokeWidth,"stroke-linecap":"round",fill:"transparent",r:this.size/2-this.strokeWidth*2,cx:this.size/2,cy:this.size/2}),r("circle",{key:"bc0fbfc9f1c872243ae2169d6412db47fb554e19",ref:e=>this.indicator=e,class:"progress-ring__indicator","stroke-width":this.strokeWidth,"stroke-linecap":"round",fill:"transparent",r:this.size/2-this.strokeWidth*2,cx:this.size/2,cy:this.size/2})),r("span",{key:"9320211edc9c0b9b24124ffc7ffdac9d6d2f86a7",part:"label",class:"progress-ring__label"},r("slot",{key:"e7c3ce7e12a7691e461b73e6cbd2912dde27ac75"})))}static get watchers(){return{percentage:["handlePercentageChange"]}}};i.style=t;export{i as six_progress_ring};
2
+ //# sourceMappingURL=p-63acceb6.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixProgressRingCss","SixProgressRingStyle0","SixProgressRing","handlePercentageChange","this","updateProgress","componentDidLoad","_a","indicator","r","radius","baseVal","value","circumference","Math","PI","offset","percentage","style","strokeDasharray","strokeDashoffset","render","h","key","part","class","width","size","height","strokeWidth","fill","cx","cy","ref","el"],"sources":["src/components/six-progress-ring/six-progress-ring.scss?tag=six-progress-ring&encapsulation=shadow","src/components/six-progress-ring/six-progress-ring.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The track color.\n * @prop --indicator-color: The indicator color.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n\n display: inline-flex;\n}\n\n.progress-ring {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n}\n\n.progress-ring__image {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n}\n\n.progress-ring__track {\n stroke: var(--track-color);\n}\n\n.progress-ring__indicator {\n stroke: var(--indicator-color);\n transition: 0.35s stroke-dashoffset, 0.35s stroke;\n}\n\n.progress-ring__label {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n user-select: none;\n font-family: var(--six-font-family);\n}\n","import { Component, h, Prop, Watch } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - A label to show inside the ring.\n *\n * @part base - The component's base wrapper.\n * @part label - The progress ring label.\n */\n\n@Component({\n tag: 'six-progress-ring',\n styleUrl: 'six-progress-ring.scss',\n shadow: true,\n})\nexport class SixProgressRing {\n private indicator?: SVGCircleElement;\n\n /** The size of the progress ring in pixels. */\n @Prop() size = 128;\n\n /** The stroke width of the progress ring in pixels. */\n @Prop() strokeWidth = 4;\n\n /** The current progress percentage, 0 - 100. */\n @Prop() percentage = 0;\n\n @Watch('percentage')\n handlePercentageChange() {\n this.updateProgress();\n }\n\n componentDidLoad() {\n this.updateProgress();\n }\n\n private updateProgress() {\n if (this.indicator?.r == null) return;\n\n const radius = this.indicator.r.baseVal.value;\n const circumference = radius * 2 * Math.PI;\n const offset = circumference - (this.percentage / 100) * circumference;\n\n this.indicator.style.strokeDasharray = `${circumference} ${circumference}`;\n this.indicator.style.strokeDashoffset = `${offset}`;\n }\n\n render() {\n return (\n <div part=\"base\" class=\"progress-ring\">\n <svg class=\"progress-ring__image\" width={this.size} height={this.size}>\n <circle\n class=\"progress-ring__track\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n\n <circle\n ref={(el) => (this.indicator = el as SVGCircleElement)}\n class=\"progress-ring__indicator\"\n stroke-width={this.strokeWidth}\n stroke-linecap=\"round\"\n fill=\"transparent\"\n r={this.size / 2 - this.strokeWidth * 2}\n cx={this.size / 2}\n cy={this.size / 2}\n />\n </svg>\n\n <span part=\"label\" class=\"progress-ring__label\">\n <slot />\n </span>\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAqB,mvBAC3B,MAAAC,EAAeD,E,MCkBFE,EAAe,M,mCAIX,I,iBAGO,E,gBAGD,C,CAGrB,sBAAAC,GACEC,KAAKC,gB,CAGP,gBAAAC,GACEF,KAAKC,gB,CAGC,cAAAA,G,MACN,KAAIE,EAAAH,KAAKI,aAAS,MAAAD,SAAA,SAAAA,EAAEE,IAAK,KAAM,OAE/B,MAAMC,EAASN,KAAKI,UAAUC,EAAEE,QAAQC,MACxC,MAAMC,EAAgBH,EAAS,EAAII,KAAKC,GACxC,MAAMC,EAASH,EAAiBT,KAAKa,WAAa,IAAOJ,EAEzDT,KAAKI,UAAUU,MAAMC,gBAAkB,GAAGN,KAAiBA,IAC3DT,KAAKI,UAAUU,MAAME,iBAAmB,GAAGJ,G,CAG7C,MAAAK,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,KAAK,OAAOC,MAAM,iBACrBH,EAAA,OAAAC,IAAA,2CAAKE,MAAM,uBAAuBC,MAAOtB,KAAKuB,KAAMC,OAAQxB,KAAKuB,MAC/DL,EAAA,UAAAC,IAAA,2CACEE,MAAM,uBAAsB,eACdrB,KAAKyB,YAAW,iBACf,QACfC,KAAK,cACLrB,EAAGL,KAAKuB,KAAO,EAAIvB,KAAKyB,YAAc,EACtCE,GAAI3B,KAAKuB,KAAO,EAChBK,GAAI5B,KAAKuB,KAAO,IAGlBL,EAAA,UAAAC,IAAA,2CACEU,IAAMC,GAAQ9B,KAAKI,UAAY0B,EAC/BT,MAAM,2BAA0B,eAClBrB,KAAKyB,YAAW,iBACf,QACfC,KAAK,cACLrB,EAAGL,KAAKuB,KAAO,EAAIvB,KAAKyB,YAAc,EACtCE,GAAI3B,KAAKuB,KAAO,EAChBK,GAAI5B,KAAKuB,KAAO,KAIpBL,EAAA,QAAAC,IAAA,2CAAMC,KAAK,QAAQC,MAAM,wBACvBH,EAAA,QAAAC,IAAA,8C"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as o,h as i,g as r}from"./p-05eb1bab.js";import{s}from"./p-8227aaed.js";function a(t,o,i={duration:150,easing:"ease",fill:"both"}){const r=o.getBoundingClientRect();const s=t.getBoundingClientRect();const a=r.left-s.left;const e=r.top-s.top;const l=r.width/s.width;const n=r.height/s.height;t.animate([{transformOrigin:"top left",transform:`translate(${a}px, ${e}px) scale(${l}, ${n})`},{transformOrigin:"top left",transform:"none"}],i)}const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.tab-group{display:flex;border:solid 1px transparent;border-radius:0}.tab-group .tab-group__tabs{display:flex;position:relative}.tab-group--has-scroll-controls .tab-group__nav-container{position:relative;padding:0 var(--six-spacing-x-large)}.tab-group__scroll-button{display:flex;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;width:var(--six-spacing-x-large)}.tab-group__scroll-button--left{left:0}.tab-group__scroll-button--right{right:0}.tab-group--top{flex-direction:column}.tab-group--top .tab-group__nav-container{order:1}.tab-group--top .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--top .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--top .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--top .tab-group__body{order:2}.tab-group--bottom{flex-direction:column}.tab-group--bottom .tab-group__nav-container{order:2}.tab-group--bottom .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--bottom .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--bottom .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--bottom .tab-group__body{order:1}.tab-group--left{flex-direction:row}.tab-group--left .tab-group__nav-container{order:1}.tab-group--left .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--left .tab-group__body{flex:1 1 auto;order:2}.tab-group--right{flex-direction:row}.tab-group--right .tab-group__nav-container{order:2}.tab-group--right .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--right .tab-group__body{flex:1 1 auto;order:1}";const l=e;const n=class{constructor(i){t(this,i);this.sixTabShow=o(this,"six-tab-show",7);this.sixTabHide=o(this,"six-tab-hide",7);this.handleClick=t=>{const o=t.target;const i=o.closest("six-tab");const r=i===null||i===void 0?void 0:i.closest("six-tab-group");if(r!==this.host){return false}if(i!=null){this.setActiveTab(i)}};this.handleKeyDown=t=>{if(this.nav==null)return;const o=t.target;const i=o.closest("six-tab");const r=i===null||i===void 0?void 0:i.closest("six-tab-group");if(r!==this.host){return false}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){const o=document.activeElement;if(o&&o.tagName.toLowerCase()==="six-tab"){const i=this.getAllTabs();let r=i.indexOf(o);if(t.key==="Home"){r=0}else if(t.key==="End"){r=i.length-1}else if(t.key==="ArrowLeft"){r=Math.max(0,r-1)}else if(t.key==="ArrowRight"){r=Math.min(i.length-1,r+1)}i[r].setFocus({preventScroll:true});this.setActiveTab(i[r]);if(["top","bottom"].includes(this.placement)){s(i[r],this.nav,"horizontal")}t.preventDefault()}}};this.handleScrollLeft=()=>{if(this.nav==null)return;this.nav.scroll({left:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})};this.handleScrollRight=()=>{if(this.nav==null)return;this.nav.scroll({left:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})};this.hasLeftControl=false;this.hasRightControl=false;this.placement="top";this.noScrollControls=false}handleNoScrollControlsChange(){this.updateScrollControls()}componentDidLoad(){if(this.tabGroup==null||this.nav==null)return;const t=new IntersectionObserver(((t,o)=>{if(t[0].intersectionRatio>0){this.setAriaLabels();this.setActiveTab(this.getActiveTab()||this.getAllTabs()[0],false);o.unobserve(t[0].target)}}));t.observe(this.host);this.resizeObserver=new ResizeObserver((()=>this.updateScrollControls()));this.resizeObserver.observe(this.nav);requestAnimationFrame((()=>this.updateScrollControls()));this.nav.addEventListener("scroll",(()=>{if(this.nav==null){return}this.hasRightControl=this.calculateRightControlVisibility();this.hasLeftControl=this.calculateLeftControlVisibility()}));this.mutationObserver=new MutationObserver((t=>{if(t.some((t=>{var o;return!["aria-labelledby","aria-controls"].includes((o=t.attributeName)!==null&&o!==void 0?o:"")}))){setTimeout((()=>this.setAriaLabels()))}}));this.mutationObserver.observe(this.host,{attributes:true,childList:true,subtree:true})}disconnectedCallback(){if(this.mutationObserver==null||this.tabGroup==null||this.nav==null||this.resizeObserver==null){return}this.mutationObserver.disconnect();this.resizeObserver.unobserve(this.nav)}async show(t){const o=this.getAllTabs();const i=o.find((o=>o.panel===t));if(i!=null){this.setActiveTab(i)}}getAllTabs(t=false){var o;const i=(o=this.tabs)===null||o===void 0?void 0:o.querySelector("slot");if(i==null)return[];return[...i.assignedElements()].filter((o=>t?o.tagName.toLowerCase()==="six-tab":o.tagName.toLowerCase()==="six-tab"&&!o.disabled))}getAllPanels(){var t;const o=(t=this.body)===null||t===void 0?void 0:t.querySelector("slot");if(o==null)return[];return[...o.assignedElements()].filter((t=>t.tagName.toLowerCase()==="six-tab-panel"))}getActiveTab(){return this.getAllTabs().find((t=>t.active))}calculateRightControlVisibility(){var t,o,i;if(this.nav==null){return false}return Math.abs((t=this.nav)===null||t===void 0?void 0:t.scrollLeft)+((o=this.nav)===null||o===void 0?void 0:o.clientWidth)<((i=this.nav)===null||i===void 0?void 0:i.scrollWidth)-1}calculateLeftControlVisibility(){var t;if(this.nav==null){return false}return Math.abs((t=this.nav)===null||t===void 0?void 0:t.scrollLeft)>0}updateScrollControls(){if(this.nav==null)return;this.hasRightControl=this.noScrollControls?false:["top","bottom"].includes(this.placement)&&this.calculateRightControlVisibility();this.hasLeftControl=this.noScrollControls?false:["top","bottom"].includes(this.placement)&&this.calculateLeftControlVisibility()}setActiveTab(t,o=true){var i,r,e;if(this.nav==null)return;const l=(i=t===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".tab__indicator");const n=(e=(r=this.getActiveTab())===null||r===void 0?void 0:r.shadowRoot)===null||e===void 0?void 0:e.querySelector(".tab__indicator");if(n!=null&&l!=null){a(l,n)}if(t!==this.activeTab&&!t.disabled){const i=this.activeTab;this.activeTab=t;this.getAllTabs().map((t=>t.active=t===this.activeTab));this.getAllPanels().map((t=>{var o;return t.active=t.name===((o=this.activeTab)===null||o===void 0?void 0:o.panel)}));if(["top","bottom"].includes(this.placement)){s(this.activeTab,this.nav,"horizontal")}if(o){if(i!=null){this.sixTabHide.emit({name:i.panel})}this.sixTabShow.emit({name:this.activeTab.panel})}}}setAriaLabels(){const t=this.getAllTabs();const o=this.getAllPanels();t.map((t=>{var i,r;const s=o.find((o=>o.name===t.panel));if(s!=null){t.setAttribute("aria-controls",(i=s.getAttribute("id"))!==null&&i!==void 0?i:"");s.setAttribute("aria-labelledby",(r=t.getAttribute("id"))!==null&&r!==void 0?r:"")}}))}render(){return i("div",{key:"9752b81f3babdcbe656cc5552b7c07c7cc096d8d",part:"base",ref:t=>this.tabGroup=t,class:{"tab-group":true,"tab-group--top":this.placement==="top","tab-group--bottom":this.placement==="bottom","tab-group--left":this.placement==="left","tab-group--right":this.placement==="right","tab-group--has-scroll-controls":this.hasRightControl||this.hasLeftControl},onClick:this.handleClick,onKeyDown:this.handleKeyDown},i("div",{key:"d96c9094ddc1a9cd6ad9ac9c5ab559ac703ccd6e",class:"tab-group__nav-container"},this.hasLeftControl&&i("six-icon-button",{class:"tab-group__scroll-button tab-group__scroll-button--left",exportparts:"base:scroll-button",name:"chevron_left",onClick:this.handleScrollLeft}),i("div",{ref:t=>this.nav=t,key:"nav",part:"nav",class:"tab-group__nav"},i("div",{key:"288b14b0bbc790f1ae54e2a26693e9b103002715",ref:t=>this.tabs=t,part:"tabs",class:"tab-group__tabs",role:"tablist"},i("slot",{key:"249ef2f5d67dd3abf35b07028c9d2fe3798ef1ea",name:"nav"}))),this.hasRightControl&&i("six-icon-button",{class:"tab-group__scroll-button tab-group__scroll-button--right",exportparts:"base:scroll-button",name:"chevron_right",onClick:this.handleScrollRight})),i("div",{key:"3aa5553829dfefb71bfb725db55db8dc204f93dc",ref:t=>this.body=t,part:"body",class:"tab-group__body"},i("slot",{key:"8d96ff43d62b33d77bea3616ea5ac76ad6b99a76"})))}get host(){return r(this)}static get watchers(){return{noScrollControls:["handleNoScrollControlsChange"]}}};n.style=l;export{n as six_tab_group};
2
+ //# sourceMappingURL=p-63ee5e7e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["flipAnimate","element","fromElement","options","duration","easing","fill","dimensionsTo","getBoundingClientRect","dimensionsFrom","deltaX","left","deltaY","top","deltaW","width","deltaH","height","animate","transformOrigin","transform","sixTabGroupCss","SixTabGroupStyle0","SixTabGroup","this","handleClick","event","target","tab","closest","tabGroup","host","setActiveTab","handleKeyDown","nav","includes","key","activeEl","document","activeElement","tagName","toLowerCase","tabs","getAllTabs","index","indexOf","length","Math","max","min","setFocus","preventScroll","placement","scrollIntoView","preventDefault","handleScrollLeft","scroll","scrollLeft","clientWidth","behavior","handleScrollRight","handleNoScrollControlsChange","updateScrollControls","componentDidLoad","observer","IntersectionObserver","entries","intersectionRatio","setAriaLabels","getActiveTab","unobserve","observe","resizeObserver","ResizeObserver","requestAnimationFrame","addEventListener","hasRightControl","calculateRightControlVisibility","hasLeftControl","calculateLeftControlVisibility","mutationObserver","MutationObserver","mutations","some","mutation","_a","attributeName","setTimeout","attributes","childList","subtree","disconnectedCallback","disconnect","show","panel","find","el","includeDisabled","slot","querySelector","assignedElements","filter","disabled","getAllPanels","body","active","abs","_b","_c","scrollWidth","noScrollControls","emitEvents","newIndicator","shadowRoot","oldIndicator","activeTab","previousTab","map","name","sixTabHide","emit","sixTabShow","panels","setAttribute","getAttribute","render","h","part","ref","class","onClick","onKeyDown","exportparts","role"],"sources":["src/utils/animation.ts","src/components/six-tab-group/six-tab-group.scss?tag=six-tab-group&encapsulation=shadow","src/components/six-tab-group/six-tab-group.tsx"],"sourcesContent":["/**\n * Animates a given `element` from the position and dimension of `fromElement` to\n * its current position and dimension. Can be useful to implement the FLIP animation technique.\n *\n * @see {@link https://css-tricks.com/animating-layouts-with-the-flip-technique/} for details on the FLIP technique.\n *\n * @param {Element} element - The element to animate.\n * @param {Element} fromElement - The element representing the initial position and dimensions.\n * @param {KeyframeAnimationOptions} [options={ duration: 150, easing: 'ease', fill: 'both' }] - Optional animation parameters.\n *\n */\nexport function flipAnimate(\n element: Element,\n fromElement: Element,\n options: KeyframeAnimationOptions = {\n duration: 150,\n easing: 'ease',\n fill: 'both',\n }\n) {\n const dimensionsTo = fromElement.getBoundingClientRect();\n const dimensionsFrom = element.getBoundingClientRect();\n\n const deltaX = dimensionsTo.left - dimensionsFrom.left;\n const deltaY = dimensionsTo.top - dimensionsFrom.top;\n const deltaW = dimensionsTo.width / dimensionsFrom.width;\n const deltaH = dimensionsTo.height / dimensionsFrom.height;\n\n element.animate(\n [\n {\n transformOrigin: 'top left',\n transform: `translate(${deltaX}px, ${deltaY}px) scale(${deltaW}, ${deltaH})`,\n },\n {\n transformOrigin: 'top left',\n transform: 'none',\n },\n ],\n options\n );\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/hide-scrollbar';\n\n:host {\n display: block;\n}\n\n.tab-group {\n display: flex;\n border: solid 1px transparent;\n border-radius: 0;\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n }\n}\n\n.tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button--left {\n left: 0;\n}\n\n.tab-group__scroll-button--right {\n right: 0;\n}\n\n// TOP\n.tab-group--top {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 2;\n }\n}\n\n// Bottom\n.tab-group--bottom {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 1;\n }\n}\n\n// Left\n\n.tab-group--left {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n}\n\n// Right\n.tab-group--right {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { flipAnimate } from '../../utils/animation';\n\nexport interface SixTabShowPayload {\n name: string;\n}\n\nexport interface SixTabHidePayload {\n name: string;\n}\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 nav - Used for grouping tabs in the tab group.\n * @slot - Used for grouping tab panels in the tab group.\n *\n * @part base - The component's base wrapper.\n * @part nav - The tab group navigation container.\n * @part tabs - The container that wraps the slotted tabs.\n * @part active-tab-indicator - An element that displays the currently selected tab. This is a child of the tab's container.\n * @part body - The tab group body where tab panels are slotted in.\n * @part scroll-button - The previous and next scroll buttons that appear when tabs are scrollable.\n */\n@Component({\n tag: 'six-tab-group',\n styleUrl: 'six-tab-group.scss',\n shadow: true,\n})\nexport class SixTabGroup {\n private activeTab?: HTMLSixTabElement;\n private body?: HTMLElement;\n private mutationObserver?: MutationObserver;\n private nav?: HTMLElement;\n private resizeObserver?: ResizeObserver;\n private tabGroup?: HTMLElement;\n private tabs?: HTMLElement;\n\n @Element() host!: HTMLSixTabGroupElement;\n\n @State() hasLeftControl = false;\n @State() hasRightControl = false;\n\n /** The placement of the tabs. */\n @Prop() placement: 'top' | 'bottom' | 'left' | 'right' = 'top';\n\n /** Disables the scroll arrows that appear when tabs overflow. */\n @Prop() noScrollControls = false;\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n /** Emitted when a tab is shown. */\n @Event({ eventName: 'six-tab-show' }) sixTabShow!: EventEmitter<SixTabShowPayload>;\n\n /** Emitted when a tab is hidden. */\n @Event({ eventName: 'six-tab-hide' }) sixTabHide!: EventEmitter<SixTabHidePayload>;\n\n componentDidLoad() {\n if (this.tabGroup == null || this.nav == null) return;\n\n // Set initial tab state when the tabs first become visible\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab() || this.getAllTabs()[0], false);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());\n this.resizeObserver.observe(this.nav);\n requestAnimationFrame(() => this.updateScrollControls());\n\n this.nav.addEventListener('scroll', () => {\n if (this.nav == null) {\n return;\n }\n this.hasRightControl = this.calculateRightControlVisibility();\n\n this.hasLeftControl = this.calculateLeftControlVisibility();\n });\n\n // Update aria labels if the DOM changes\n this.mutationObserver = new MutationObserver((mutations) => {\n if (\n mutations.some((mutation) => {\n return !['aria-labelledby', 'aria-controls'].includes(mutation.attributeName ?? '');\n })\n ) {\n setTimeout(() => this.setAriaLabels());\n }\n });\n this.mutationObserver.observe(this.host, { attributes: true, childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mutationObserver == null || this.tabGroup == null || this.nav == null || this.resizeObserver == null) {\n return;\n }\n this.mutationObserver.disconnect();\n this.resizeObserver.unobserve(this.nav);\n }\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n const tabs = this.getAllTabs();\n const tab = tabs.find((el) => el.panel === panel);\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n }\n\n private getAllTabs(includeDisabled = false): HTMLSixTabElement[] {\n const slot = this.tabs?.querySelector('slot');\n if (slot == null) return [];\n\n return [...slot.assignedElements()].filter((el: Element) => {\n return includeDisabled\n ? el.tagName.toLowerCase() === 'six-tab'\n : el.tagName.toLowerCase() === 'six-tab' && !(el as HTMLSixTabElement).disabled;\n }) as [HTMLSixTabElement];\n }\n\n private getAllPanels(): HTMLSixTabPanelElement[] {\n const slot = this.body?.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements()].filter((el: Element) => el.tagName.toLowerCase() === 'six-tab-panel') as [\n HTMLSixTabPanelElement\n ];\n }\n\n private getActiveTab() {\n return this.getAllTabs().find((el) => el.active);\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.nav == null) return;\n\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n // Move focus left or right\n if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const activeEl = document.activeElement as HTMLSixTabElement;\n\n if (activeEl && activeEl.tagName.toLowerCase() === 'six-tab') {\n const tabs = this.getAllTabs();\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') {\n index = 0;\n } else if (event.key === 'End') {\n index = tabs.length - 1;\n } else if (event.key === 'ArrowLeft') {\n index = Math.max(0, index - 1);\n } else if (event.key === 'ArrowRight') {\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus({ preventScroll: true });\n this.setActiveTab(tabs[index]);\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(tabs[index], this.nav, 'horizontal');\n }\n\n event.preventDefault();\n }\n }\n };\n\n private handleScrollLeft = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft - this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private handleScrollRight = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft + this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private calculateRightControlVisibility() {\n if (this.nav == null) {\n return false;\n }\n return Math.abs(this.nav?.scrollLeft) + this.nav?.clientWidth < this.nav?.scrollWidth - 1;\n }\n\n private calculateLeftControlVisibility() {\n if (this.nav == null) {\n return false;\n }\n return Math.abs(this.nav?.scrollLeft) > 0;\n }\n\n private updateScrollControls() {\n if (this.nav == null) return;\n\n this.hasRightControl = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.calculateRightControlVisibility();\n\n this.hasLeftControl = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.calculateLeftControlVisibility();\n }\n\n private setActiveTab(tab: HTMLSixTabElement, emitEvents = true) {\n if (this.nav == null) return;\n\n const newIndicator = tab?.shadowRoot?.querySelector('.tab__indicator');\n const oldIndicator = this.getActiveTab()?.shadowRoot?.querySelector('.tab__indicator');\n\n if (oldIndicator != null && newIndicator != null) {\n flipAnimate(newIndicator, oldIndicator);\n }\n\n if (tab !== this.activeTab && !tab.disabled) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n\n // Sync tabs and panels\n this.getAllTabs().map((el) => (el.active = el === this.activeTab));\n this.getAllPanels().map((el) => (el.active = el.name === this.activeTab?.panel));\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab != null) {\n this.sixTabHide.emit({ name: previousTab.panel });\n }\n\n this.sixTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllTabs();\n const panels = this.getAllPanels();\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel != null) {\n tab.setAttribute('aria-controls', panel.getAttribute('id') ?? '');\n panel.setAttribute('aria-labelledby', tab.getAttribute('id') ?? '');\n }\n });\n }\n\n render() {\n return (\n <div\n part=\"base\"\n ref={(el) => (this.tabGroup = el)}\n class={{\n 'tab-group': true,\n\n // Placements\n 'tab-group--top': this.placement === 'top',\n 'tab-group--bottom': this.placement === 'bottom',\n 'tab-group--left': this.placement === 'left',\n 'tab-group--right': this.placement === 'right',\n\n 'tab-group--has-scroll-controls': this.hasRightControl || this.hasLeftControl,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"tab-group__nav-container\">\n {this.hasLeftControl && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--left\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_left\"\n onClick={this.handleScrollLeft}\n />\n )}\n <div ref={(el) => (this.nav = el)} key=\"nav\" part=\"nav\" class=\"tab-group__nav\">\n <div ref={(el) => (this.tabs = el)} part=\"tabs\" class=\"tab-group__tabs\" role=\"tablist\">\n <slot name=\"nav\" />\n </div>\n </div>\n {this.hasRightControl && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--right\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_right\"\n onClick={this.handleScrollRight}\n />\n )}\n </div>\n\n <div ref={(el) => (this.body = el)} part=\"body\" class=\"tab-group__body\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"mappings":"iGAWgBA,EACdC,EACAC,EACAC,EAAoC,CAClCC,SAAU,IACVC,OAAQ,OACRC,KAAM,SAGR,MAAMC,EAAeL,EAAYM,wBACjC,MAAMC,EAAiBR,EAAQO,wBAE/B,MAAME,EAASH,EAAaI,KAAOF,EAAeE,KAClD,MAAMC,EAASL,EAAaM,IAAMJ,EAAeI,IACjD,MAAMC,EAASP,EAAaQ,MAAQN,EAAeM,MACnD,MAAMC,EAAST,EAAaU,OAASR,EAAeQ,OAEpDhB,EAAQiB,QACN,CACE,CACEC,gBAAiB,WACjBC,UAAW,aAAaV,QAAaE,cAAmBE,MAAWE,MAErE,CACEG,gBAAiB,WACjBC,UAAW,SAGfjB,EAEJ,CCzCA,MAAMkB,EAAiB,0xDACvB,MAAAC,EAAeD,E,MCgCFE,EAAW,M,2GA+GdC,KAAAC,YAAeC,IACrB,MAAMC,EAASD,EAAMC,OACrB,MAAMC,EAAMD,EAAOE,QAAQ,WAC3B,MAAMC,EAAWF,IAAG,MAAHA,SAAG,SAAHA,EAAKC,QAAQ,iBAG9B,GAAIC,IAAaN,KAAKO,KAAM,CAC1B,OAAO,K,CAGT,GAAIH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OE,MAAM,mBACpDH,EAAA,QAAA1F,IAAA,8C"}
@@ -0,0 +1,2 @@
1
+ let t=[];class i{constructor(t,i){this.element=t;this.options=i;this.handleFocusIn=this.handleFocusIn.bind(this)}activate(){t.push(this.element);document.addEventListener("focusin",this.handleFocusIn)}deactivate(){t=t.filter((t=>t!==this.element));document.removeEventListener("focusin",this.handleFocusIn)}isActive(){return t[t.length-1]===this.element}handleFocusIn(t){var i,s;const h=t.target;const o=this.element.tagName.toLowerCase();if(this.isActive()&&h.closest(o)!==this.element&&typeof((i=this.options)===null||i===void 0?void 0:i.onFocusOut)==="function"){(s=this.options)===null||s===void 0?void 0:s.onFocusOut(t)}}}export{i as M};
2
+ //# sourceMappingURL=p-651293e7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["activeModals","Modal","constructor","element","options","this","handleFocusIn","bind","activate","push","document","addEventListener","deactivate","filter","modal","removeEventListener","isActive","length","event","target","tagName","toLowerCase","closest","_a","onFocusOut","_b"],"sources":["src/utils/modal.ts"],"sourcesContent":["interface ModalOptions {\n onFocusOut?: (event: Event) => void;\n}\n\nlet activeModals: HTMLElement[] = [];\n\nexport default class Modal {\n element: HTMLElement;\n options?: ModalOptions;\n\n constructor(element: HTMLElement, options?: ModalOptions) {\n this.element = element;\n this.options = options;\n this.handleFocusIn = this.handleFocusIn.bind(this);\n }\n\n activate() {\n activeModals.push(this.element);\n document.addEventListener('focusin', this.handleFocusIn);\n }\n\n deactivate() {\n activeModals = activeModals.filter((modal) => modal !== this.element);\n document.removeEventListener('focusin', this.handleFocusIn);\n }\n\n isActive() {\n // The \"active\" modal is always the most recent one shown\n return activeModals[activeModals.length - 1] === this.element;\n }\n\n handleFocusIn(event: Event) {\n const target = event.target as HTMLElement;\n const tagName = this.element.tagName.toLowerCase();\n\n // If focus is lost while the modal is active, run the onFocusOut callback\n if (this.isActive() && target.closest(tagName) !== this.element && typeof this.options?.onFocusOut === 'function') {\n this.options?.onFocusOut(event);\n }\n }\n}\n"],"mappings":"AAIA,IAAIA,EAA8B,G,MAEbC,EAInB,WAAAC,CAAYC,EAAsBC,GAChCC,KAAKF,QAAUA,EACfE,KAAKD,QAAUA,EACfC,KAAKC,cAAgBD,KAAKC,cAAcC,KAAKF,K,CAG/C,QAAAG,GACER,EAAaS,KAAKJ,KAAKF,SACvBO,SAASC,iBAAiB,UAAWN,KAAKC,c,CAG5C,UAAAM,GACEZ,EAAeA,EAAaa,QAAQC,GAAUA,IAAUT,KAAKF,UAC7DO,SAASK,oBAAoB,UAAWV,KAAKC,c,CAG/C,QAAAU,GAEE,OAAOhB,EAAaA,EAAaiB,OAAS,KAAOZ,KAAKF,O,CAGxD,aAAAG,CAAcY,G,QACZ,MAAMC,EAASD,EAAMC,OACrB,MAAMC,EAAUf,KAAKF,QAAQiB,QAAQC,cAGrC,GAAIhB,KAAKW,YAAcG,EAAOG,QAAQF,KAAaf,KAAKF,iBAAkBoB,EAAAlB,KAAKD,WAAO,MAAAmB,SAAA,SAAAA,EAAEC,cAAe,WAAY,EACjHC,EAAApB,KAAKD,WAAO,MAAAqB,SAAA,SAAAA,EAAED,WAAWN,E"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as s,g as e}from"./p-05eb1bab.js";import{P as n}from"./p-7f856f00.js";import{E as o}from"./p-8bfb4bfc.js";import{a as r,D as h}from"./p-a1502802.js";import{a as l}from"./p-0cebf1d2.js";function a(t){const i=t.tabIndex;return i>-1}function d(t){if(a(t)){return t}if(t.shadowRoot!=null){const i=[...t.shadowRoot.children].find((t=>a(t)));if(i!=null){return i}}if(t.children!=null){return[...t.children].map((t=>d(t))).at(0)}return undefined}const u=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block}.dropdown{position:relative}.dropdown__trigger{display:block}.dropdown__positioner{position:absolute;z-index:var(--six-z-index-dropdown)}.dropdown__positioner__filtered{width:100%}.dropdown__panel{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);color:var(--color);background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);border:1px solid var(--six-color-web-rock-300);box-shadow:var(--six-shadow-small);opacity:0;pointer-events:none;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;max-width:90vw}.dropdown__panel__scroll{max-height:18.75rem;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none}.dropdown__panel__scroll--virtual{overflow-y:hidden;overflow-x:hidden}.filter-hidden{display:none}.dropdown__positioner[data-popper-placement^=top] .dropdown__panel{transform-origin:bottom}.dropdown__positioner[data-popper-placement^=bottom] .dropdown__panel{transform-origin:top}.dropdown__positioner[data-popper-placement^=left] .dropdown__panel{transform-origin:right}.dropdown__positioner[data-popper-placement^=right] .dropdown__panel{transform-origin:left}.dropdown__positioner.popover-visible .dropdown__panel{opacity:1;transform:none;pointer-events:all}.filter{border-bottom:1px solid var(--six-color-web-rock-300)}.filter__icon{color:var(--six-color-web-rock-600)}";const f=u;let c=0;const p=class{constructor(e){t(this,e);this.sixShow=i(this,"six-dropdown-show",7);this.sixAfterShow=i(this,"six-dropdown-after-show",7);this.sixHide=i(this,"six-dropdown-hide",7);this.sixAfterHide=i(this,"six-dropdown-after-hide",7);this.sixAutoFilter=i(this,"six-dropdown-auto-filter-fired",7);this.sixAsyncFilterFired=i(this,"six-async-filter-fired",7);this.sixScroll=i(this,"six-dropdown-scroll",7);this.componentId=`dropdown-${++c}`;this.isVisible=false;this.resizeObserver=new ResizeObserver(r((()=>this.updatePanelPosition()),100));this.eventListeners=new o;this.getMenuItems=()=>{var t,i,e,n;if(this.options.length>0){return{sixMenuItems:this.renderedOptions.map((t=>s("six-menu-item",{value:t.value},t.label))),selectionContainerItems:[]}}if(this.panel==null)return{sixMenuItems:[],selectionContainerItems:[]};const o=(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(w).at(0);const r=(i=this.panelSlot)===null||i===void 0?void 0:i.assignedElements({flatten:true}).filter(v).at(0);const h=(o===null||o===void 0?void 0:o.querySelectorAll("six-menu-item"))||[];let l=((e=r===null||r===void 0?void 0:r.querySelector("slot"))===null||e===void 0?void 0:e.assignedElements().filter((t=>m(t))))||[];if(l.length===0){l=Array.from(((n=r===null||r===void 0?void 0:r.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("six-menu-item"))||[])}if(h.length>0||l.length>0){return{sixMenuItems:l,selectionContainerItems:[...h]}}else{return{sixMenuItems:r?Array.from(r.querySelectorAll("six-menu-item")):[],selectionContainerItems:[]}}};this.handleDocumentKeyDown=t=>{var i;const s=t;if(s.key==="Escape"){void this.hide();this.focusOnTrigger();return}if(this.filterInputElement===((i=this.host.shadowRoot)===null||i===void 0?void 0:i.activeElement)){if(s.key==="ArrowDown"){const{sixMenuItems:t,selectionContainerItems:i}=this.getMenuItems();const s=[...i,...t].find((t=>t.style.display!=="none"));if(s!=null){s.setFocus()}}}if(s.key==="Tab"){if(this.open&&document.activeElement!=null&&m(document.activeElement)){s.preventDefault();void this.hide();this.focusOnTrigger();return}setTimeout((()=>{var t,i;const s=this.container.getRootNode()instanceof ShadowRoot?(i=(t=document.activeElement)===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.activeElement:document.activeElement;if((s===null||s===void 0?void 0:s.closest(this.container.tagName.toLowerCase()))!==this.container){void this.hide();return}}))}};this.handleDocumentMouseDown=t=>{const i=t.composedPath();if(!i.includes(this.container)){void this.hide();return}};this.handlePanelSelect=t=>{const i=t.target;if(this.closeOnSelect&&v(i)){void this.hide();this.focusOnTrigger()}};this.handleTriggerClick=()=>{this.open?this.hide():this.show()};this.handleTriggerKeyDown=t=>{if(t.key==="Escape"){this.focusOnTrigger();void this.hide();return}if(!this.disableHideOnEnterAndSpace&&[" ","Enter"].includes(t.key)){t.preventDefault();this.open?void this.hide():void this.show();return}const i=this.getMenu();if(["ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault();if(!this.open){void this.show()}if(i==null){return}const s=[...i.querySelectorAll("six-menu-item")];const e=s.at(0);const n=s.at(s.length-1);if(t.key==="ArrowDown"&&e!=null){e.setFocus();return}if(t.key==="ArrowUp"&&n!=null){n.setFocus();return}}const s=["Tab","Shift","Meta","Ctrl","Alt"];if(this.open&&i!=null&&!s.includes(t.key)){void i.typeToSelect(t.key);return}};this.handleTriggerKeyUp=t=>{if(t.key===" "){t.preventDefault()}};this.handleTriggerSlotChange=()=>{this.updateAccessibleTrigger()};this.handleDropdownScroll=()=>{if(this.scrollPanel==null)return;this.sixScroll.emit({scrollHeight:this.scrollPanel.scrollHeight,scrollTop:this.scrollPanel.scrollTop,scrollbarHeight:this.scrollPanel.offsetHeight*(this.scrollPanel.offsetHeight/this.scrollPanel.scrollHeight),scrollRatio:this.scrollPanel.scrollTop/(this.scrollPanel.scrollHeight-this.scrollPanel.clientHeight)})};this.open=false;this.placement="bottom-start";this.closeOnSelect=true;this.distance=4;this.skidding=0;this.hoist=false;this.containingElement=undefined;this.filter=false;this.asyncFilter=false;this.filterPlaceholder="Filter...";this.autofocusFilter=true;this.filterDebounce=0;this.disableHideOnEnterAndSpace=false;this.options=[];this.virtualScroll=false;this.matchTriggerWidth=false;this.renderedOptions=[]}get filterEnabled(){return this.filter||this.asyncFilter}get container(){return this.containingElement||this.host}handleOpenChange(){this.open?this.show():this.hide();this.updateAccessibleTrigger()}handlePopoverOptionsChange(){if(this.popover==null)return;this.popover.setOptions({strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding})}handleOptionsChange(){this.validateOptions()}validateOptions(){if(!Array.isArray(this.options)){this.options=[]}if(this.virtualScroll&&this.options.length===0){console.error("Options must be defined when using virtual scrolling")}this.renderedOptions=[...this.options]}componentWillLoad(){this.validateOptions();if(this.asyncFilter){this.filterDebounce=h}}componentDidLoad(){this.init();if(this.open){void this.show()}}connectedCallback(){this.init()}init(){this.initPopover();const t=this.filterInputElement;if(t!=null){this.eventListeners.add(t,"six-input-input",r((()=>{var i;const s=(i=t.value)!==null&&i!==void 0?i:"";if(this.filter){this.applyFilter(s)}this.emitFilterEvents(s)}),this.filterDebounce))}}applyFilter(t){var i;const s=((i=t.toLowerCase())===null||i===void 0?void 0:i.trim())||"";if(this.options.length>0){this.renderedOptions=this.options.filter((t=>{var i,e,n,o;return t.label&&((e=(i=String(t.label))===null||i===void 0?void 0:i.toLowerCase())===null||e===void 0?void 0:e.includes(s))||t.value&&((o=(n=String(t.value))===null||n===void 0?void 0:n.toLowerCase())===null||o===void 0?void 0:o.includes(s))}))}else{const{selectionContainerItems:t,sixMenuItems:i}=this.getMenuItems();const e=t.map((t=>t.value));t.forEach((async t=>{t.style.display=await x(t,s)?"unset":"none"}));i.forEach((async t=>{t.style.display=await x(t,s)&&!e.includes(t.value)?"unset":"none"}))}}resetFilter(){if(this.filterInputElement!=null){this.filterInputElement.value="";this.emitFilterEvents("")}if(this.options.length>0){this.renderedOptions=[...this.options]}else{const{selectionContainerItems:t,sixMenuItems:i}=this.getMenuItems();[...t,...i].forEach((t=>t.style.display="unset"))}}emitFilterEvents(t){if(this.filter){this.sixAutoFilter.emit({filterValue:t})}else if(this.asyncFilter){this.sixAsyncFilterFired.emit({filterValue:t})}}initPopover(){if(this.trigger==null||this.positioner==null)return;this.popover=new n(this.trigger,this.positioner,{strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding,transitionElement:this.panel,onAfterHide:()=>{if(this.filterEnabled){this.resetFilter()}this.sixAfterHide.emit()},onAfterShow:async()=>{this.sixAfterShow.emit()},onTransitionEnd:()=>{if(!this.open&&this.scrollPanel!=null){this.scrollPanel.scrollTop=0}}})}disconnectedCallback(){var t;this.resizeObserver.disconnect();this.eventListeners.removeAll();void this.hide();(t=this.popover)===null||t===void 0?void 0:t.destroy();this.popover=undefined}async show(){if(this.isVisible||this.popover==null||this.panel==null){return}const t=this.sixShow.emit();if(t.defaultPrevented){this.open=false;return}this.eventListeners.add(this.panel,"six-menu-item-selected",this.handlePanelSelect);this.eventListeners.add(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.add(document,"mousedown",this.handleDocumentMouseDown);this.isVisible=true;this.open=true;if(this.trigger!=null){this.resizeObserver.observe(this.trigger)}this.updatePanelPosition();this.popover.show();if(this.filterEnabled&&this.autofocusFilter){requestAnimationFrame((()=>{var t;(t=this.filterInputElement)===null||t===void 0?void 0:t.setFocus()}))}}updatePanelPosition(){if(!this.open){return}if(this.matchTriggerWidth&&this.trigger!=null&&this.panel!=null){const t=this.trigger.getBoundingClientRect().width;this.panel.style.minWidth=`${t}px`}if(this.popover!=null){this.popover.reposition()}}async hide(){this.resizeObserver.disconnect();if(!this.isVisible||this.panel==null||this.popover==null){return}const t=this.sixHide.emit();if(t.defaultPrevented){this.open=true;return}this.eventListeners.remove(this.panel,"six-menu-item-selected",this.handlePanelSelect);this.eventListeners.remove(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.remove(document,"mousedown",this.handleDocumentMouseDown);this.isVisible=false;this.open=false;this.popover.hide()}focusOnTrigger(){var t;if(this.trigger==null)return;const i=(t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).at(0);if(i!=null){if(typeof i.setFocus==="function"){i.setFocus()}else if(typeof i.focus==="function"){i.focus()}}}getMenu(){var t;return(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(v).at(0)}async reposition(){if(this.open&&this.popover!=null){this.popover.reposition()}}updateAccessibleTrigger(){var t;if(this.trigger==null)return;const i=((t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}))||[];const s=i.map(d).at(0);if(s!=null){s.setAttribute("aria-haspopup","true");s.setAttribute("aria-expanded",this.open?"true":"false")}}render(){return s("div",{key:"6569a6e118fd68e19f14dcae0553e25f81987923",part:"base",id:this.componentId,class:{dropdown:true,"dropdown--open":this.open}},s("span",{key:"be04c5d687eafa3c58c9fed9cf43f72d43aa45ef",part:"trigger",class:"dropdown__trigger",ref:t=>this.trigger=t,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown,onKeyUp:this.handleTriggerKeyUp},s("slot",{key:"fba562d4fc45a0874e5cf8caad5e9710d6dd34e0",name:"trigger",ref:t=>this.triggerSlot=t,onSlotchange:this.handleTriggerSlotChange})),s("div",{key:"d37f1cb0246d47ca34004f35e3575e8433d998c8",ref:t=>this.positioner=t,class:{dropdown__positioner:true,dropdown__positioner__filtered:(this.filter||this.asyncFilter)&&!this.hoist}},s("div",{key:"e6c08b51f39a12259b4d8911770e1e1754dc4b8e",ref:t=>this.panel=t,part:"panel",class:"dropdown__panel",role:"menu","aria-hidden":this.open?"false":"true","aria-labelledby":this.componentId},this.filterEnabled&&s("six-input",{class:{filter:true,"filter-hidden":!this.open},"dropdown-search":true,"aria-hidden":this.open?"false":"true",ref:t=>this.filterInputElement=t,placeholder:this.filterPlaceholder},s("six-icon",{class:"filter__icon",slot:"suffix",size:"small"},"search")),s("div",{key:"174d0a5dd5965877e9278475112e2f14d959966d",class:{dropdown__panel__scroll:true,"dropdown__panel__scroll--virtual":this.virtualScroll},onScroll:this.handleDropdownScroll,ref:t=>this.scrollPanel=t},s("slot",{key:"fa0fc63a45e693cc6655db03b0382f028aea9473",ref:t=>this.panelSlot=t}),this.options.length>0&&s("six-menu",{part:"menu",items:this.renderedOptions,virtualScroll:this.virtualScroll})),s("slot",{key:"f24f41a9a70f0624078d43eb60b41e841ee90bf7",name:"dropdown-footer"}))))}get host(){return e(this)}static get watchers(){return{open:["handleOpenChange"],distance:["handlePopoverOptionsChange"],hoist:["handlePopoverOptionsChange"],placement:["handlePopoverOptionsChange"],skidding:["handlePopoverOptionsChange"],options:["handleOptionsChange"],virtualScroll:["handleOptionsChange"]}}};function v(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu"}function m(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item"}function w(t){var i;return((i=t===null||t===void 0?void 0:t.getAttribute("class"))===null||i===void 0?void 0:i.includes("selection-container"))||false}async function x(t,i){return t.value.toLowerCase().includes(i)||(await t.getTextLabel()).toLowerCase().includes(i)}p.style=f;const b=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.menu{padding:var(--six-spacing-xx-small) 0;border:none;box-shadow:var(--six-shadow-small);overflow-y:auto;overflow-x:hidden}.menu:focus{outline:none}.no-shadow{box-shadow:none}";const g=b;const _=t=>{var i,s,e;return(e=(s=(i=t===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".menu-item"))===null||s===void 0?void 0:s.classList)===null||e===void 0?void 0:e.contains("menu-item--focused")};const y=t=>(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item";const k=({value:t,label:i})=>s("six-menu-item",{key:t,value:t},i);const C=5;const I=48;const A=64;const O=class{constructor(s){t(this,s);this.sixMenuItemSelected=i(this,"six-menu-item-selected",7);this.eventListeners=new o;this.typeToSelectString="";this.handleScrolling=()=>{if(this.menuWrapper==null)return;this.scrollingIndex=Math.floor(this.menuWrapper.scrollTop/this.sixMenuItemHeight)};this.removeBoxShadow=false;this.items=null;this.itemsShown=undefined;this.virtualScroll=false;this.itemSize=10;this.scrollingDebounce=15;this.disableKeyboardHandling=false;this.scrollingIndex=0;this.sixMenuItemHeight=this.virtualScroll?I:A}connectedCallback(){this.handleClick=this.handleClick.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this)}componentWillLoad(){if(this.items===null){return}}componentDidLoad(){this.setupForVirtualScrollingAfterRendering()}disconnectedCallback(){this.eventListeners.removeAll()}async typeToSelect(t){var i;clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=setTimeout((()=>this.typeToSelectString=""),750);this.typeToSelectString+=t.toLowerCase();const s=this.getItems();for(const t of s){const s=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector("slot:not([name])");const e=l(s).toLowerCase().trim();if(e.substring(0,this.typeToSelectString.length)===this.typeToSelectString){t.setFocus();break}}}getItemsShown(){var t;const i=this.virtualScroll?C:0;if(this.items&&this.items.length===1){return 0}return(t=this.itemsShown)!==null&&t!==void 0?t:i}setupForVirtualScrollingAfterRendering(){var t,i;if(!this.virtualScroll||this.menuWrapper==null)return;this.eventListeners.add(this.menuWrapper,"scroll",r(this.handleScrolling,this.scrollingDebounce));const s=(i=(t=this.menu)===null||t===void 0?void 0:t.querySelector("six-menu-item"))===null||i===void 0?void 0:i.clientHeight;if(s!=null&&s>0){this.sixMenuItemHeight=s}}getItems(){if(this.menu==null)return[];if(this.items!=null){return this.items.map(k)}const t=this.menu.querySelector("slot");if(t==null)return[];return[...t.assignedElements({flatten:true})].filter((t=>y(t)&&!t.disabled))}getActiveItemIndex(){const t=this.getItems();const i=this.getActiveItem();if(i!=null){const s=t.indexOf(i);if(s>-1){return s}}const s=this.extractItemsFromDOM();return s.findIndex(_)}getActiveItem(){var t;const i=this.getItems().find((t=>t===document.activeElement));if(i!=null){return i}return(t=this.extractItemsFromDOM())===null||t===void 0?void 0:t.find(_)}extractItemsFromDOM(){var t,i;return Array.from((i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("six-menu-item"))!==null&&i!==void 0?i:[])}setActiveItem(t){t===null||t===void 0?void 0:t.setFocus()}handleClick(t){const i=t.target;const s=i.closest("six-menu-item");if(s&&!s.disabled){this.sixMenuItemSelected.emit({name:s.value,item:s})}}handleKeyDown(t){if(this.disableKeyboardHandling){return}if(t.key==="Enter"){const i=this.getActiveItem();t.preventDefault();if(i!=null){this.sixMenuItemSelected.emit({name:i.value,item:i})}}if(t.key===" "){t.preventDefault()}if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){const i=this.items===null?this.getItems():this.extractItemsFromDOM();let s=this.getActiveItemIndex();if(i.length>0){t.preventDefault();if(t.key==="ArrowDown"){s++}else if(t.key==="ArrowUp"){s--}else if(t.key==="Home"){s=0}else if(t.key==="End"){s=i.length-1}if(s<0)s=0;if(s>i.length-1)s=i.length-1;this.setActiveItem(i[s]);return}}void this.typeToSelect(t.key)}getMenuWrapperStyle(){var t;const i={};if(this.getItemsShown()>0){i.height=`${((t=this.getItemsShown())!==null&&t!==void 0?t:0)*this.sixMenuItemHeight}px`}else if(this.items&&this.items.length===1){i.height="auto"}return Object.assign({},i)}getMenuContainerStyle(){const t={};if(this.virtualScroll){t.transform=`translateY(${this.sixMenuItemHeight*this.scrollingIndex}px)`}return Object.assign({},t)}getScrollbarGhostStyle(){const t={};if(this.virtualScroll&&this.items!==null&&this.items.length>1){t.height=`${this.items.length*this.sixMenuItemHeight-this.itemSize*this.sixMenuItemHeight}px`}return Object.assign({},t)}renderItems(){if(this.items===undefined||this.items===null){return}if(!this.virtualScroll){return this.items.map(k)}return this.items.slice(this.scrollingIndex,Math.min(this.items.length,this.itemSize+this.scrollingIndex)).map((({value:t,label:i})=>s("six-menu-item",{checkType:"check",key:t,value:t},i)))}render(){return s("div",{key:"fa1ad99f966331ac08e3d0278714613476b84953",ref:t=>this.menuWrapper=t,style:this.getMenuWrapperStyle(),part:"wrapper",class:{menu:true,".no-shadow":this.removeBoxShadow}},s("div",{key:"6a3d5440ad417f969e5862e93e44ff576f043002",ref:t=>this.menu=t,part:"base",role:"menu",onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:0,style:this.getMenuContainerStyle()},s("slot",{key:"96895a99228cd5407e6a3f60b73d3192bcf3c13a"}),this.renderItems()),this.virtualScroll&&s("div",{style:this.getScrollbarGhostStyle()}))}get host(){return e(this)}};O.style=g;export{p as six_dropdown,O as six_menu};
2
+ //# sourceMappingURL=p-6b40c40c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isTabbable","el","tabIndex","getNearestTabbableElement","shadowRoot","tabbableShadowChild","children","find","e","map","at","undefined","sixDropdownCss","SixDropdownStyle0","id","SixDropdown","this","componentId","isVisible","resizeObserver","ResizeObserver","debounce","updatePanelPosition","eventListeners","EventListeners","getMenuItems","options","length","sixMenuItems","renderedOptions","option","h","value","label","selectionContainerItems","panel","selectionContainer","_a","panelSlot","assignedElements","flatten","filter","isSelectionContainer","sixMenuElement","_b","isSixMenu","querySelectorAll","_c","querySelector","isSixMenuItem","Array","from","_d","handleDocumentKeyDown","event","keyboardEvent","key","hide","focusOnTrigger","filterInputElement","host","activeElement","item","style","display","setFocus","open","document","preventDefault","setTimeout","container","getRootNode","ShadowRoot","closest","tagName","toLowerCase","handleDocumentMouseDown","path","composedPath","includes","handlePanelSelect","target","closeOnSelect","handleTriggerClick","show","handleTriggerKeyDown","disableHideOnEnterAndSpace","menu","getMenu","menuItems","firstMenuItem","lastMenuItem","ignoredKeys","typeToSelect","handleTriggerKeyUp","handleTriggerSlotChange","updateAccessibleTrigger","handleDropdownScroll","scrollPanel","sixScroll","emit","scrollHeight","scrollTop","scrollbarHeight","offsetHeight","scrollRatio","clientHeight","filterEnabled","asyncFilter","containingElement","handleOpenChange","handlePopoverOptionsChange","popover","setOptions","strategy","hoist","placement","distance","skidding","handleOptionsChange","validateOptions","isArray","virtualScroll","console","error","componentWillLoad","filterDebounce","DEFAULT_DEBOUNCE_FAST","componentDidLoad","init","connectedCallback","initPopover","add","filterValue","applyFilter","emitFilterEvents","filterTerm","lowerCaseFilterTerm","trim","String","selectionContainerValues","s","forEach","async","menuItem","containsFilterTerm","resetFilter","sixAutoFilter","sixAsyncFilterFired","trigger","positioner","Popover","transitionElement","onAfterHide","sixAfterHide","onAfterShow","sixAfterShow","onTransitionEnd","disconnectedCallback","disconnect","removeAll","destroy","sixShow","defaultPrevented","observe","autofocusFilter","requestAnimationFrame","matchTriggerWidth","width","getBoundingClientRect","minWidth","reposition","sixHide","remove","triggerSlot","focus","accessibleTrigger","setAttribute","render","part","class","dropdown","ref","onClick","onKeyDown","onKeyUp","name","onSlotchange","dropdown__positioner","dropdown__positioner__filtered","role","placeholder","filterPlaceholder","slot","size","dropdown__panel__scroll","onScroll","items","getAttribute","getTextLabel","sixMenuCss","SixMenuStyle0","isFocusedMenuItem","classList","contains","isSIXMenuItemElement","mapToMenuItem","DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING","DEFAULT_SIX_MENU_ITEM_HEIGHT_FOR_VIRTUAL_SCROLLING","DEFAULT_SIX_MENU_ITEM_HEIGHT","SixMenu","typeToSelectString","handleScrolling","menuWrapper","scrollingIndex","Math","floor","sixMenuItemHeight","handleClick","bind","handleKeyDown","setupForVirtualScrollingAfterRendering","clearTimeout","typeToSelectTimeout","getItems","getTextContent","substring","getItemsShown","defaultItemsShown","itemsShown","scrollingDebounce","menuItemHeight","disabled","getActiveItemIndex","selectedItem","getActiveItem","itemIndex","indexOf","extractItemsFromDOM","findIndex","i","setActiveItem","clickedItem","sixMenuItemSelected","disableKeyboardHandling","activeItem","indexOfActiveItem","getMenuWrapperStyle","styles","height","Object","assign","getMenuContainerStyle","transform","getScrollbarGhostStyle","itemSize","renderItems","slice","min","checkType","removeBoxShadow"],"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"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement | undefined {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot != null) {\n const tabbableShadowChild = [...el.shadowRoot.children].find((e) => isTabbable(e as HTMLElement)) as HTMLElement;\n if (tabbableShadowChild != null) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children != null) {\n return [...el.children].map((e) => getNearestTabbableElement(e as HTMLElement)).at(0);\n }\n\n return undefined;\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: inline-block;\n}\n\n.dropdown {\n position: relative;\n}\n\n.dropdown__trigger {\n display: block;\n}\n\n.dropdown__positioner {\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n\n &__filtered {\n width: 100%;\n }\n}\n\n.dropdown__panel {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n color: var(--color);\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n border: 1px solid var(--six-color-web-rock-300);\n box-shadow: var(--six-shadow-small);\n opacity: 0;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n max-width: 90vw;\n}\n\n.dropdown__panel__scroll {\n max-height: 18.75rem;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: none;\n\n &--virtual {\n overflow-y: hidden;\n overflow-x: hidden;\n }\n}\n\n.filter-hidden {\n display: none;\n}\n\n.dropdown__positioner {\n &[data-popper-placement^='top'] .dropdown__panel {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .dropdown__panel {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .dropdown__panel {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .dropdown__panel {\n transform-origin: left;\n }\n\n &.popover-visible .dropdown__panel {\n opacity: 1;\n transform: none;\n pointer-events: all;\n }\n}\n\n.filter {\n border-bottom: 1px solid var(--six-color-web-rock-300);\n\n &__icon {\n color: var(--six-color-web-rock-600);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixMenuItemData } from '../six-menu/six-menu';\n\nexport interface SixDropdownAutoFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownAsyncFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownScrollPayload {\n scrollHeight: number;\n scrollTop: number;\n scrollbarHeight: number;\n scrollRatio: number;\n}\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot trigger - The dropdown's trigger, usually a `<six-button>` element.\n * @slot dropdown-footer - The dropdown's footer area.\n * @slot - The dropdown's content.\n *\n * @part base - The component's base wrapper.\n * @part trigger - The container that wraps the trigger.\n * @part panel - The panel that gets shown when the dropdown is open.\n */\n\n@Component({\n tag: 'six-dropdown',\n styleUrl: 'six-dropdown.scss',\n shadow: true,\n})\nexport class SixDropdown {\n private componentId = `dropdown-${++id}`;\n private isVisible = false;\n private panel?: HTMLElement;\n private scrollPanel?: HTMLElement;\n private panelSlot?: HTMLSlotElement;\n private positioner?: HTMLElement;\n private popover?: Popover;\n private trigger?: HTMLElement;\n private triggerSlot?: HTMLSlotElement;\n private resizeObserver = new ResizeObserver(debounce(() => this.updatePanelPosition(), 100));\n\n // the input element shown in the dropdown when filter is set to true\n private filterInputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixDropdownElement;\n\n /** Indicates whether the dropdown is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Determines whether the dropdown should hide when a menu item is selected. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 4;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @Prop() skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /**\n * Set to true to allow auto filtering for entries in the dropdown.\n * With this flag the dropdown will automatically filter itsel.\n * If you need to coordinate the shown elements yourself,\n * e.g. because you need to call an endpoint use asyncFilter instead\n */\n @Prop() filter = false;\n\n /**\n * Set to true to allow async filtering.\n * When you enter something in the search field the component will only emit an event but not filter any elements itself.\n * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself\n */\n @Prop() asyncFilter = false;\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder = 'Filter...';\n\n /** By default the search field will be focused when opening a dropdown with filtering enabled. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autofocusFilter = true;\n\n get filterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop({ mutable: true }) filterDebounce = 0;\n\n /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */\n @Prop() disableHideOnEnterAndSpace = false;\n\n /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/\n @Prop({ mutable: true }) options: SixMenuItemData[] = [];\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Determines if the dropdown panel's width should match the width of the trigger element.\n *\n * If set to `true`, the panel will resize its width to align with the trigger's width.\n * If `false` or omitted, the panel will maintain its default width.\n */\n @Prop() matchTriggerWidth = false;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n /** Emitted when the dropdown opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dropdown-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown opens and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dropdown closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dropdown-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown closes and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the auto filter is triggered */\n @Event({ eventName: 'six-dropdown-auto-filter-fired' }) sixAutoFilter!: EventEmitter<SixDropdownAutoFilterPayload>;\n\n /** Emitted when the async filter is triggered */\n @Event({ eventName: 'six-async-filter-fired' }) sixAsyncFilterFired!: EventEmitter<SixDropdownAsyncFilterPayload>;\n\n /** Emitted when the user scrolls inside dropdown panel.*/\n @Event({ eventName: 'six-dropdown-scroll' }) sixScroll!: EventEmitter<SixDropdownScrollPayload>;\n\n private eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State() renderedOptions: SixMenuItemData[] = [];\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n this.updateAccessibleTrigger();\n }\n\n @Watch('distance')\n @Watch('hoist')\n @Watch('placement')\n @Watch('skidding')\n handlePopoverOptionsChange() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n });\n }\n\n @Watch('options')\n @Watch('virtualScroll')\n handleOptionsChange() {\n this.validateOptions();\n }\n\n private validateOptions() {\n if (!Array.isArray(this.options)) {\n this.options = [];\n }\n if (this.virtualScroll && this.options.length === 0) {\n console.error('Options must be defined when using virtual scrolling');\n }\n this.renderedOptions = [...this.options];\n }\n\n componentWillLoad() {\n this.validateOptions();\n if (this.asyncFilter) {\n this.filterDebounce = DEFAULT_DEBOUNCE_FAST;\n }\n }\n\n componentDidLoad() {\n this.init();\n if (this.open) {\n void this.show();\n }\n }\n\n connectedCallback() {\n this.init();\n }\n\n private init() {\n this.initPopover();\n\n // listen to filter\n const filterInputElement = this.filterInputElement;\n if (filterInputElement != null) {\n this.eventListeners.add(\n filterInputElement,\n 'six-input-input',\n debounce(() => {\n const filterValue = filterInputElement.value ?? '';\n if (this.filter) {\n this.applyFilter(filterValue);\n }\n this.emitFilterEvents(filterValue);\n }, this.filterDebounce)\n );\n }\n }\n\n private applyFilter(filterTerm: string) {\n const lowerCaseFilterTerm = filterTerm.toLowerCase()?.trim() || '';\n if (this.options.length > 0) {\n this.renderedOptions = this.options.filter(\n (option) =>\n (option.label && String(option.label)?.toLowerCase()?.includes(lowerCaseFilterTerm)) ||\n (option.value && String(option.value)?.toLowerCase()?.includes(lowerCaseFilterTerm))\n );\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n const selectionContainerValues = selectionContainerItems.map((s) => s.value);\n\n // Filter items in selection container\n selectionContainerItems.forEach(async (menuItem) => {\n menuItem.style.display = (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) ? 'unset' : 'none';\n });\n\n // Filter other items. Always hide items which contained in the selection container.\n sixMenuItems.forEach(async (menuItem) => {\n menuItem.style.display =\n (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) &&\n !selectionContainerValues.includes(menuItem.value)\n ? 'unset'\n : 'none';\n });\n }\n }\n\n private resetFilter() {\n if (this.filterInputElement != null) {\n this.filterInputElement.value = '';\n this.emitFilterEvents('');\n }\n if (this.options.length > 0) {\n this.renderedOptions = [...this.options];\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n [...selectionContainerItems, ...sixMenuItems].forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n private emitFilterEvents(filterValue: string) {\n if (this.filter) {\n this.sixAutoFilter.emit({ filterValue });\n } else if (this.asyncFilter) {\n this.sixAsyncFilterFired.emit({ filterValue });\n }\n }\n\n private initPopover() {\n if (this.trigger == null || this.positioner == null) return;\n this.popover = new Popover(this.trigger, this.positioner, {\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.panel,\n onAfterHide: () => {\n if (this.filterEnabled) {\n this.resetFilter();\n }\n this.sixAfterHide.emit();\n },\n onAfterShow: async () => {\n this.sixAfterShow.emit();\n },\n onTransitionEnd: () => {\n if (!this.open && this.scrollPanel != null) {\n this.scrollPanel.scrollTop = 0;\n }\n },\n });\n }\n\n private getMenuItems = (): {\n selectionContainerItems: HTMLSixMenuItemElement[];\n sixMenuItems: HTMLSixMenuItemElement[];\n } => {\n if (this.options.length > 0) {\n return {\n sixMenuItems: this.renderedOptions.map((option) => (\n <six-menu-item value={option.value}>{option.label}</six-menu-item>\n )),\n selectionContainerItems: [],\n };\n }\n if (this.panel == null) return { sixMenuItems: [], selectionContainerItems: [] };\n\n // Relies on the implementation of six-select. Its dropdown slot contains two elements,\n // one for the selected menu items, and one for the other items.\n const selectionContainer = this.panelSlot?.assignedElements({ flatten: true }).filter(isSelectionContainer).at(0);\n const sixMenuElement = this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n const selectionContainerItems = selectionContainer?.querySelectorAll('six-menu-item') || [];\n let sixMenuItems: HTMLSixMenuItemElement[] =\n sixMenuElement\n ?.querySelector('slot')\n ?.assignedElements()\n .filter((el): el is HTMLSixMenuItemElement => isSixMenuItem(el)) || [];\n\n if (sixMenuItems.length === 0) {\n sixMenuItems = Array.from(sixMenuElement?.shadowRoot?.querySelectorAll('six-menu-item') || []);\n }\n\n if (selectionContainerItems.length > 0 || sixMenuItems.length > 0) {\n return { sixMenuItems, selectionContainerItems: [...selectionContainerItems] };\n } else {\n return {\n sixMenuItems: sixMenuElement ? Array.from(sixMenuElement.querySelectorAll('six-menu-item')) : [],\n selectionContainerItems: [],\n };\n }\n };\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n this.eventListeners.removeAll();\n void this.hide();\n this.popover?.destroy();\n this.popover = undefined;\n }\n\n /** Shows the dropdown panel */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.popover == null || this.panel == null) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = true;\n this.open = true;\n\n if (this.trigger != null) {\n this.resizeObserver.observe(this.trigger);\n }\n this.updatePanelPosition();\n this.popover.show();\n\n if (this.filterEnabled && this.autofocusFilter) {\n requestAnimationFrame(() => {\n this.filterInputElement?.setFocus();\n });\n }\n }\n\n /**\n * Set min width of dropdown panel to the width of the trigger element\n */\n private updatePanelPosition() {\n if (!this.open) {\n return;\n }\n\n if (this.matchTriggerWidth && this.trigger != null && this.panel != null) {\n const width = this.trigger.getBoundingClientRect().width;\n this.panel.style.minWidth = `${width}px`;\n }\n\n if (this.popover != null) {\n this.popover.reposition();\n }\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n this.resizeObserver.disconnect();\n\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.panel == null || this.popover == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n private focusOnTrigger() {\n if (this.trigger == null) return;\n const trigger = this.triggerSlot?.assignedElements({ flatten: true }).at(0) as HTMLSixButtonElement | undefined;\n if (trigger != null) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n private getMenu(): HTMLSixMenuElement | undefined {\n return this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n *\n * @deprecated: use the property `matchTriggerWidth` instead.\n */\n @Method()\n async reposition() {\n if (this.open && this.popover != null) {\n this.popover.reposition();\n }\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (keyboardEvent.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot?.activeElement) {\n if (keyboardEvent.key === 'ArrowDown') {\n const { sixMenuItems, selectionContainerItems } = this.getMenuItems();\n const item = [...selectionContainerItems, ...sixMenuItems].find((item) => item.style.display !== 'none');\n if (item != null) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement != null && isSixMenuItem(document.activeElement)) {\n keyboardEvent.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.container.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (activeElement?.closest(this.container.tagName.toLowerCase()) !== this.container) {\n void this.hide();\n return;\n }\n });\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n void this.hide();\n return;\n }\n };\n\n private handlePanelSelect = (event: Event) => {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (this.closeOnSelect && isSixMenu(target)) {\n void this.hide();\n this.focusOnTrigger();\n }\n };\n\n private handleTriggerClick = () => {\n this.open ? this.hide() : this.show();\n };\n\n private handleTriggerKeyDown = (event: KeyboardEvent) => {\n // Close when escape or tab is pressed\n if (event.key === 'Escape') {\n this.focusOnTrigger();\n void this.hide();\n return;\n }\n\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {\n event.preventDefault();\n this.open ? void this.hide() : void this.show();\n return;\n }\n\n const menu = this.getMenu();\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n void this.show();\n }\n\n if (menu == null) {\n return;\n }\n const menuItems = [...menu.querySelectorAll('six-menu-item')];\n const firstMenuItem = menuItems.at(0);\n const lastMenuItem = menuItems.at(menuItems.length - 1);\n\n // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem != null) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem != null) {\n lastMenuItem.setFocus();\n return;\n }\n }\n\n // Other keys bring focus to the menu and initiate type-to-select behavior\n const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];\n if (this.open && menu != null && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n };\n\n private handleTriggerKeyUp = (event: KeyboardEvent) => {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n };\n\n private handleTriggerSlotChange = () => {\n this.updateAccessibleTrigger();\n };\n\n private handleDropdownScroll = () => {\n if (this.scrollPanel == null) return;\n\n this.sixScroll.emit({\n scrollHeight: this.scrollPanel.scrollHeight,\n scrollTop: this.scrollPanel.scrollTop,\n scrollbarHeight: this.scrollPanel.offsetHeight * (this.scrollPanel.offsetHeight / this.scrollPanel.scrollHeight),\n scrollRatio: this.scrollPanel.scrollTop / (this.scrollPanel.scrollHeight - this.scrollPanel.clientHeight),\n });\n };\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n private updateAccessibleTrigger() {\n if (this.trigger == null) return;\n const assignedElements = (this.triggerSlot?.assignedElements({ flatten: true }) || []) as HTMLElement[];\n const accessibleTrigger = assignedElements.map(getNearestTabbableElement).at(0);\n if (accessibleTrigger != null) {\n accessibleTrigger.setAttribute('aria-haspopup', 'true');\n accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n id={this.componentId}\n class={{\n dropdown: true,\n 'dropdown--open': this.open,\n }}\n >\n <span\n part=\"trigger\"\n class=\"dropdown__trigger\"\n ref={(el) => (this.trigger = el)}\n onClick={this.handleTriggerClick}\n onKeyDown={this.handleTriggerKeyDown}\n onKeyUp={this.handleTriggerKeyUp}\n >\n <slot\n name=\"trigger\"\n ref={(el) => (this.triggerSlot = el as HTMLSlotElement)}\n onSlotchange={this.handleTriggerSlotChange}\n />\n </span>\n\n {/* Position the panel with a wrapper since the popover makes use of `translate`. This let's us add transitions\n on the panel without interfering with the position. */}\n <div\n ref={(el) => (this.positioner = el)}\n class={{\n dropdown__positioner: true,\n dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,\n }}\n >\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dropdown__panel\"\n role=\"menu\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-labelledby={this.componentId}\n >\n {this.filterEnabled && (\n <six-input\n class={{\n filter: true,\n 'filter-hidden': !this.open,\n }}\n dropdown-search\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\n >\n <six-icon class=\"filter__icon\" slot=\"suffix\" size=\"small\">\n search\n </six-icon>\n </six-input>\n )}\n <div\n class={{\n dropdown__panel__scroll: true,\n 'dropdown__panel__scroll--virtual': this.virtualScroll,\n }}\n onScroll={this.handleDropdownScroll}\n ref={(el) => (this.scrollPanel = el)}\n >\n <slot ref={(el) => (this.panelSlot = el as HTMLSlotElement)} />\n {this.options.length > 0 && (\n <six-menu part=\"menu\" items={this.renderedOptions} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n <slot name=\"dropdown-footer\"></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n\nfunction isSixMenu(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu';\n}\nfunction isSixMenuItem(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu-item';\n}\nfunction isSelectionContainer(el?: Element): boolean {\n return el?.getAttribute('class')?.includes('selection-container') || false;\n}\nasync function containsFilterTerm(menuItem: HTMLSixMenuItemElement, lowerCaseFilterTerm: string): Promise<boolean> {\n return (\n menuItem.value.toLowerCase().includes(lowerCaseFilterTerm) ||\n (await menuItem.getTextLabel()).toLowerCase().includes(lowerCaseFilterTerm)\n );\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu {\n padding: var(--six-spacing-xx-small) 0;\n border: none;\n box-shadow: var(--six-shadow-small);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.menu:focus {\n outline: none;\n}\n\n.no-shadow {\n box-shadow: none;\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 }: SixMenuItemData) => (\n <six-menu-item key={value} value={value}>\n {label}\n </six-menu-item>\n);\n\nconst DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING = 5;\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT_FOR_VIRTUAL_SCROLLING = 48;\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT = 64;\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 private menu?: HTMLElement;\n private menuWrapper?: HTMLElement;\n private typeToSelectString = '';\n private typeToSelectTimeout?: number;\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 = 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 property a scrollbar will be shown */\n @Prop() itemsShown?: number;\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Used for virtual scrolling\n * Define how many items should be rendered in the DOM when using virtual scrolling\n */\n @Prop() itemSize = 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 = 15;\n\n /**\n * Internal: Disables handling of key presses.\n */\n @Prop() disableKeyboardHandling = false;\n\n /**\n * Used to calculate which items should be rendered in the DOM\n */\n @State()\n private scrollingIndex = 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 height after the first render\n @State()\n private sixMenuItemHeight = this.virtualScroll\n ? DEFAULT_SIX_MENU_ITEM_HEIGHT_FOR_VIRTUAL_SCROLLING\n : 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 if (this.menuWrapper == null) return;\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 // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\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(): number {\n const defaultItemsShown = this.virtualScroll ? DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING : 0;\n if (this.items && this.items.length === 1) {\n return 0;\n }\n return this.itemsShown ?? defaultItemsShown;\n }\n\n private setupForVirtualScrollingAfterRendering() {\n if (!this.virtualScroll || this.menuWrapper == null) return;\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 != null && menuItemHeight > 0) {\n this.sixMenuItemHeight = menuItemHeight;\n }\n }\n\n private getItems(): HTMLSixMenuItemElement[] {\n if (this.menu == null) return [];\n\n if (this.items != null) {\n return this.items.map(mapToMenuItem);\n }\n\n const slot = this.menu.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements({ flatten: true })].filter(\n (el): el is HTMLSixMenuItemElement => isSIXMenuItemElement(el) && !el.disabled\n );\n }\n\n private getActiveItemIndex() {\n const items = this.getItems();\n const selectedItem = this.getActiveItem();\n if (selectedItem != null) {\n const itemIndex = items.indexOf(selectedItem);\n if (itemIndex > -1) {\n return itemIndex;\n }\n }\n const sixMenuItems = this.extractItemsFromDOM();\n return sixMenuItems.findIndex(isFocusedMenuItem);\n }\n\n private getActiveItem(): HTMLSixMenuItemElement | undefined {\n const activeElement = this.getItems().find((i) => i === document.activeElement);\n if (activeElement != null) {\n return activeElement;\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 private setActiveItem(item: HTMLSixMenuItemElement) {\n item?.setFocus();\n }\n\n private 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 private handleKeyDown(event: KeyboardEvent) {\n if (this.disableKeyboardHandling) {\n return;\n }\n\n // Make a selection when pressing enter\n if (event.key === 'Enter') {\n const activeItem = this.getActiveItem();\n event.preventDefault();\n\n if (activeItem != null) {\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 > 0) {\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 if (this.getItemsShown() > 0) {\n // calculate the proper height to show the correct number of items\n styles.height = `${(this.getItemsShown() ?? 0) * this.sixMenuItemHeight}px`;\n } else if (this.items && this.items.length === 1) {\n styles.height = 'auto';\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 if (this.virtualScroll && this.items !== null && this.items.length > 1) {\n styles.height = `${this.items.length * this.sixMenuItemHeight - this.itemSize * this.sixMenuItemHeight}px`;\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(({ value, label }: SixMenuItemData) => (\n <six-menu-item checkType=\"check\" key={value} value={value}>\n {label}\n </six-menu-item>\n ));\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 '.no-shadow': this.removeBoxShadow,\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"],"mappings":"yNAAgBA,EAAWC,GACzB,MAAMC,EAAWD,EAAGC,SACpB,OAAOA,GAAY,CACrB,C,SAEgBC,EAA0BF,GAExC,GAAID,EAAWC,GAAK,CAClB,OAAOA,C,CAIT,GAAIA,EAAGG,YAAc,KAAM,CACzB,MAAMC,EAAsB,IAAIJ,EAAGG,WAAWE,UAAUC,MAAMC,GAAMR,EAAWQ,KAC/E,GAAIH,GAAuB,KAAM,CAC/B,OAAOA,C,EAKX,GAAIJ,EAAGK,UAAY,KAAM,CACvB,MAAO,IAAIL,EAAGK,UAAUG,KAAKD,GAAML,EAA0BK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2B"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as o,h as i,g as r}from"./p-05eb1bab.js";import{E as s}from"./p-8bfb4bfc.js";import{F as e}from"./p-605bdd81.js";import{h as l}from"./p-0cebf1d2.js";const a=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{--height:var(--six-selection-control-toggle-size);--thumb-size:calc(var(--six-selection-control-toggle-size) - 4px);--width:calc(var(--height) * 2);display:inline-block}.switch{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-input-font-size-medium);font-weight:var(--six-input-font-weight);color:var(--six-input-color);vertical-align:middle;cursor:pointer}.switch__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--width);height:var(--height);background-color:var(--six-selection-control-color-disabled);border-radius:var(--height);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color}.switch__control .switch__thumb{width:var(--thumb-size);height:var(--thumb-size);background-color:var(--six-input-background-color);border-radius:50%;transform:translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));transition:var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color, var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow}.switch__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover{background-color:var(--six-input-border-color-hover)}.switch--checked .switch__control{background-color:var(--six-selection-control-color)}.switch--checked .switch__control .switch__thumb{background-color:var(--six-color-white);transform:translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2))}.switch.switch--checked:not(.switch--disabled) .switch__control:hover{background-color:var(--six-input-border-color-focus)}.switch--disabled{cursor:not-allowed;color:var(--six-selection-control-color-disabled)}.switch--disabled .switch__control{background-color:var(--six-selection-control-color-disabled)}.switch--disabled.switch--checked .switch__control{background-color:var(--six-selection-control-color-disabled)}.switch__label{line-height:var(--height);margin-left:0.5em;user-select:none}';const n=a;let c=0;const h=class{constructor(i){t(this,i);this.sixBlur=o(this,"six-switch-blur",7);this.sixChange=o(this,"six-switch-change",7);this.sixFocus=o(this,"six-switch-focus",7);this.switchId=`switch-${++c}`;this.labelId=`switch-label-${c}`;this.errorTextId=`input-error-text-${c}`;this.eventListeners=new s;this.handleSlotChange=()=>{this.hasErrorTextSlot=l(this.host,"error-text")};this.handleClick=()=>{if(this.inputElement!=null){this.checked=this.inputElement.checked;this.sixChange.emit(this.checked)}};this.handleBlur=()=>{this.hasFocus=false;this.sixBlur.emit(this.checked)};this.handleFocus=()=>{this.hasFocus=true;this.sixFocus.emit()};this.handleKeyDown=t=>{if(t.key==="ArrowLeft"){t.preventDefault();this.checked=false;this.sixChange.emit(this.checked)}if(t.key==="ArrowRight"){t.preventDefault();this.checked=true;this.sixChange.emit(this.checked)}};this.handleMouseDown=t=>{var o;t.preventDefault();(o=this.inputElement)===null||o===void 0?void 0:o.focus()};this.hasFocus=false;this.hasErrorTextSlot=false;this.name="";this.value="on";this.disabled=false;this.required=false;this.checked=false;this.label="";this.errorText="";this.errorTextCount=undefined;this.invalid=false}componentWillLoad(){this.handleSlotChange()}handleCheckedChange(){if(this.inputElement!=null){this.inputElement.checked=this.checked;this.checked=this.inputElement.checked}}connectedCallback(){var t;(t=this.host.shadowRoot)===null||t===void 0?void 0:t.addEventListener("slotchange",this.handleSlotChange);this.eventListeners.forward("six-switch-change","change",this.host);this.eventListeners.forward("six-switch-blur","blur",this.host);this.eventListeners.forward("six-switch-focus","focus",this.host)}disconnectedCallback(){var t;(t=this.host.shadowRoot)===null||t===void 0?void 0:t.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}handleLabelChange(){this.handleSlotChange()}async setFocus(t){var o;(o=this.inputElement)===null||o===void 0?void 0:o.focus(t)}async removeFocus(){var t;(t=this.inputElement)===null||t===void 0?void 0:t.blur()}render(){return i(e,{key:"9d6b19d30b6fbe9edaca09765fb987496085af3d",inputId:this.switchId,label:this.label,labelId:this.labelId,hasLabelSlot:false,errorTextId:this.errorTextId,errorText:this.errorText,errorTextCount:this.errorTextCount,hasErrorTextSlot:this.hasErrorTextSlot,size:"medium",disabled:this.disabled,required:this.required,displayError:this.invalid},i("label",{key:"3e17b60e405ebdbb9a2329677b7ba58bf5b39506",part:"base",htmlFor:this.switchId,class:{switch:true,"switch--checked":this.checked,"switch--disabled":this.disabled,"switch--focused":this.hasFocus},onMouseDown:this.handleMouseDown},i("span",{key:"a8f0a78413ef612287e59d371ecc4a4de3f95d86",part:"control",class:"switch__control"},i("span",{key:"02e2e4f0ebea74189adaae5c5820e72c317fb3c8",part:"thumb",class:"switch__thumb"}),i("input",{key:"50f37e2801b211be3a3f378f3f59c736f10900ea",ref:t=>this.inputElement=t,id:this.switchId,type:"checkbox",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,role:"switch","aria-checked":this.checked?"true":"false","aria-labelledby":this.labelId,onClick:this.handleClick,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyDown:this.handleKeyDown})),i("span",{key:"9a4e42a33a099be2301b47553f1238f2e4acf027",part:"label",id:this.labelId,class:"switch__label"},i("slot",{key:"f393ef7b2eb5621a4a203d0502017a428412080d"}))))}get host(){return r(this)}static get watchers(){return{checked:["handleCheckedChange"],errorText:["handleLabelChange"],label:["handleLabelChange"]}}};h.style=n;export{h as six_switch};
2
+ //# sourceMappingURL=p-6f9153be.entry.js.map