@six-group/ui-library 0.0.0-insider.a9875a1 → 0.0.0-insider.ad9373a

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 (611) hide show
  1. package/dist/cjs/error-messages-6e8049a4.js +119 -0
  2. package/dist/cjs/error-messages-6e8049a4.js.map +1 -0
  3. package/dist/cjs/{form-control-f9bc25dd.js → form-control-72186fcc.js} +2 -2
  4. package/dist/cjs/{form-control-f9bc25dd.js.map → form-control-72186fcc.js.map} +1 -1
  5. package/dist/cjs/{index-3baddcdc.js → index-5dd19c4b.js} +63 -44
  6. package/dist/cjs/index-5dd19c4b.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +6 -106
  8. package/dist/cjs/index.cjs.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/set-attributes_2.cjs.entry.js +2 -2
  11. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
  12. package/dist/cjs/six-alert.cjs.entry.js +2 -2
  13. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/six-avatar.cjs.entry.js +2 -2
  15. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/six-badge.cjs.entry.js +2 -2
  17. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  18. package/dist/cjs/six-button.cjs.entry.js +3 -3
  19. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  20. package/dist/cjs/six-card.cjs.entry.js +2 -2
  21. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-checkbox_2.cjs.entry.js +190 -0
  23. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -0
  24. package/dist/cjs/six-datepicker.cjs.entry.js +4 -3
  25. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  26. package/dist/cjs/six-details.cjs.entry.js +2 -2
  27. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  28. package/dist/cjs/six-dialog.cjs.entry.js +3 -3
  29. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  30. package/dist/cjs/six-drawer.cjs.entry.js +3 -3
  31. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  32. package/dist/cjs/six-dropdown_2.cjs.entry.js +195 -125
  33. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  34. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  35. package/dist/cjs/six-error.cjs.entry.js +1 -1
  36. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  37. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  38. package/dist/cjs/six-file-upload.cjs.entry.js +2 -2
  39. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  40. package/dist/cjs/six-footer.cjs.entry.js +2 -2
  41. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  42. package/dist/cjs/six-group-label.cjs.entry.js +4 -4
  43. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  44. package/dist/cjs/six-header.cjs.entry.js +7 -5
  45. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  46. package/dist/cjs/six-icon-button.cjs.entry.js +2 -2
  47. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  48. package/dist/cjs/six-icon.cjs.entry.js +2 -2
  49. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  50. package/dist/cjs/six-input.cjs.entry.js +6 -4
  51. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  52. package/dist/cjs/six-item-picker.cjs.entry.js +2 -2
  53. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  54. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  55. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  56. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  57. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  58. package/dist/cjs/six-menu-divider.cjs.entry.js +2 -2
  59. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  60. package/dist/cjs/six-menu-label.cjs.entry.js +2 -2
  61. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  62. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  63. package/dist/cjs/six-progress-bar.cjs.entry.js +2 -2
  64. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-progress-ring.cjs.entry.js +2 -2
  66. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-radio.cjs.entry.js +2 -2
  68. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-range.cjs.entry.js +4 -4
  70. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-root.cjs.entry.js +1 -1
  72. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-search-field.cjs.entry.js +2 -2
  74. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-select.cjs.entry.js +300 -169
  76. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +3 -3
  78. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
  80. package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
  81. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  82. package/dist/cjs/six-spinner.cjs.entry.js +2 -2
  83. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  84. package/dist/cjs/six-switch.cjs.entry.js +4 -4
  85. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  86. package/dist/cjs/six-tab-group.cjs.entry.js +2 -2
  87. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  88. package/dist/cjs/six-tab-panel.cjs.entry.js +2 -2
  89. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  90. package/dist/cjs/six-tab.cjs.entry.js +2 -2
  91. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  92. package/dist/cjs/six-tag.cjs.entry.js +3 -3
  93. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  94. package/dist/cjs/six-textarea.cjs.entry.js +4 -4
  95. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  96. package/dist/cjs/six-tile.cjs.entry.js +3 -3
  97. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  98. package/dist/cjs/six-timepicker.cjs.entry.js +4 -4
  99. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  100. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  101. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  102. package/dist/cjs/{slot-9821749e.js → slot-1b1232a1.js} +1 -3
  103. package/dist/cjs/slot-1b1232a1.js.map +1 -0
  104. package/dist/cjs/{types-0a6d66f6.js → types-d3da200b.js} +3 -1
  105. package/dist/cjs/types-d3da200b.js.map +1 -0
  106. package/dist/cjs/ui-library.cjs.js +3 -3
  107. package/dist/cjs/ui-library.cjs.js.map +1 -1
  108. package/dist/collection/collection-manifest.json +1 -1
  109. package/dist/collection/components/six-alert/six-alert.css +1 -1
  110. package/dist/collection/components/six-avatar/six-avatar.css +2 -2
  111. package/dist/collection/components/six-badge/six-badge.css +1 -1
  112. package/dist/collection/components/six-button/six-button.css +1 -1
  113. package/dist/collection/components/six-button/six-button.js +3 -2
  114. package/dist/collection/components/six-button/six-button.js.map +1 -1
  115. package/dist/collection/components/six-card/six-card.css +4 -5
  116. package/dist/collection/components/six-checkbox/six-checkbox.css +1 -1
  117. package/dist/collection/components/six-checkbox/six-checkbox.js +3 -2
  118. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  119. package/dist/collection/components/six-datepicker/six-date-formats.js +1 -0
  120. package/dist/collection/components/six-datepicker/six-date-formats.js.map +1 -1
  121. package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
  122. package/dist/collection/components/six-datepicker/six-datepicker.js +6 -4
  123. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  124. package/dist/collection/components/six-details/six-details.css +1 -1
  125. package/dist/collection/components/six-details/six-details.js.map +1 -1
  126. package/dist/collection/components/six-dialog/six-dialog.css +2 -2
  127. package/dist/collection/components/six-drawer/six-drawer.css +2 -2
  128. package/dist/collection/components/six-dropdown/six-dropdown.css +22 -7
  129. package/dist/collection/components/six-dropdown/six-dropdown.js +213 -123
  130. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  131. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +54 -29
  132. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -1
  133. package/dist/collection/components/six-file-upload/six-file-upload.css +1 -4
  134. package/dist/collection/components/six-footer/six-footer.css +2 -2
  135. package/dist/collection/components/six-group-label/six-group-label.css +1 -1
  136. package/dist/collection/components/six-header/six-header.css +6 -2
  137. package/dist/collection/components/six-header/six-header.js +25 -4
  138. package/dist/collection/components/six-header/six-header.js.map +1 -1
  139. package/dist/collection/components/six-header/test/six-header.spec.js +38 -2
  140. package/dist/collection/components/six-header/test/six-header.spec.js.map +1 -1
  141. package/dist/collection/components/six-icon/six-icon.css +1 -1
  142. package/dist/collection/components/six-icon-button/six-icon-button.css +1 -1
  143. package/dist/collection/components/six-input/six-input.css +10 -1
  144. package/dist/collection/components/six-input/six-input.js +44 -16
  145. package/dist/collection/components/six-input/six-input.js.map +1 -1
  146. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  147. package/dist/collection/components/six-item-picker/types.js +2 -0
  148. package/dist/collection/components/six-item-picker/types.js.map +1 -1
  149. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  150. package/dist/collection/components/six-menu/six-menu.css +8 -7
  151. package/dist/collection/components/six-menu/six-menu.js +28 -6
  152. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  153. package/dist/collection/components/six-menu/test/six-menu.spec.js +6 -6
  154. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  155. package/dist/collection/components/six-menu-divider/six-menu-divider.css +3 -2
  156. package/dist/collection/components/six-menu-item/six-menu-item.css +13 -2
  157. package/dist/collection/components/six-menu-item/six-menu-item.js +36 -7
  158. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  159. package/dist/collection/components/six-menu-label/six-menu-label.css +1 -1
  160. package/dist/collection/components/six-progress-bar/six-progress-bar.css +1 -1
  161. package/dist/collection/components/six-progress-ring/six-progress-ring.css +1 -1
  162. package/dist/collection/components/six-radio/six-radio.css +1 -1
  163. package/dist/collection/components/six-radio/six-radio.js +3 -2
  164. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  165. package/dist/collection/components/six-range/six-range.css +1 -1
  166. package/dist/collection/components/six-range/six-range.js +3 -2
  167. package/dist/collection/components/six-range/six-range.js.map +1 -1
  168. package/dist/collection/components/six-root/six-root.js.map +1 -1
  169. package/dist/collection/components/six-search-field/six-search-field.css +1 -1
  170. package/dist/collection/components/six-select/six-select.css +54 -66
  171. package/dist/collection/components/six-select/six-select.js +343 -168
  172. package/dist/collection/components/six-select/six-select.js.map +1 -1
  173. package/dist/collection/components/six-select/test/six-select.spec.js +31 -15
  174. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -1
  175. package/dist/collection/components/six-sidebar/six-sidebar.css +2 -2
  176. package/dist/collection/components/six-sidebar/six-sidebar.js +6 -4
  177. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  178. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +1 -1
  179. package/dist/collection/components/six-spinner/six-spinner.css +1 -1
  180. package/dist/collection/components/six-stage-indicator/six-stage-indicator.css +1 -1
  181. package/dist/collection/components/six-switch/six-switch.css +1 -1
  182. package/dist/collection/components/six-switch/six-switch.js +3 -2
  183. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  184. package/dist/collection/components/six-tab/six-tab.css +1 -1
  185. package/dist/collection/components/six-tab/six-tab.js +3 -2
  186. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  187. package/dist/collection/components/six-tab-group/six-tab-group.css +1 -1
  188. package/dist/collection/components/six-tab-group/six-tab-group.js +3 -2
  189. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  190. package/dist/collection/components/six-tab-panel/six-tab-panel.css +1 -1
  191. package/dist/collection/components/six-tag/six-tag.css +1 -1
  192. package/dist/collection/components/six-textarea/six-textarea.css +1 -1
  193. package/dist/collection/components/six-textarea/six-textarea.js +24 -16
  194. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  195. package/dist/collection/components/six-tile/six-tile.css +2 -2
  196. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  197. package/dist/collection/components/six-timepicker/six-timepicker.css +1 -1
  198. package/dist/collection/components/six-timepicker/six-timepicker.js +3 -2
  199. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  200. package/dist/collection/components/six-tooltip/six-tooltip.css +1 -1
  201. package/dist/collection/utils/error-messages.js +7 -0
  202. package/dist/collection/utils/error-messages.js.map +1 -1
  203. package/dist/collection/utils/slot.js +0 -1
  204. package/dist/collection/utils/slot.js.map +1 -1
  205. package/dist/components/index.js +2 -106
  206. package/dist/components/index.js.map +1 -1
  207. package/dist/components/six-alert.js +1 -1
  208. package/dist/components/six-alert.js.map +1 -1
  209. package/dist/components/six-avatar.js +1 -1
  210. package/dist/components/six-avatar.js.map +1 -1
  211. package/dist/components/six-badge.js +1 -1
  212. package/dist/components/six-badge.js.map +1 -1
  213. package/dist/components/six-button.js +1 -142
  214. package/dist/components/six-button.js.map +1 -1
  215. package/dist/components/six-button2.js +146 -0
  216. package/dist/components/six-button2.js.map +1 -0
  217. package/dist/components/six-card.js +1 -1
  218. package/dist/components/six-card.js.map +1 -1
  219. package/dist/components/six-checkbox.js +1 -161
  220. package/dist/components/six-checkbox.js.map +1 -1
  221. package/dist/components/six-checkbox2.js +165 -0
  222. package/dist/components/six-checkbox2.js.map +1 -0
  223. package/dist/components/six-datepicker.js +2 -1
  224. package/dist/components/six-datepicker.js.map +1 -1
  225. package/dist/components/six-details2.js +1 -1
  226. package/dist/components/six-details2.js.map +1 -1
  227. package/dist/components/six-dialog.js +1 -1
  228. package/dist/components/six-dialog.js.map +1 -1
  229. package/dist/components/six-drawer.js +1 -1
  230. package/dist/components/six-drawer.js.map +1 -1
  231. package/dist/components/six-dropdown2.js +199 -125
  232. package/dist/components/six-dropdown2.js.map +1 -1
  233. package/dist/components/six-file-upload.js +1 -1
  234. package/dist/components/six-file-upload.js.map +1 -1
  235. package/dist/components/six-footer.js +1 -1
  236. package/dist/components/six-footer.js.map +1 -1
  237. package/dist/components/six-group-label.js +1 -1
  238. package/dist/components/six-group-label.js.map +1 -1
  239. package/dist/components/six-header.js +13 -4
  240. package/dist/components/six-header.js.map +1 -1
  241. package/dist/components/six-icon-button2.js +1 -1
  242. package/dist/components/six-icon-button2.js.map +1 -1
  243. package/dist/components/six-icon2.js +1 -1
  244. package/dist/components/six-icon2.js.map +1 -1
  245. package/dist/components/six-input2.js +4 -1
  246. package/dist/components/six-input2.js.map +1 -1
  247. package/dist/components/six-item-picker2.js +2 -0
  248. package/dist/components/six-item-picker2.js.map +1 -1
  249. package/dist/components/six-main-container.js.map +1 -1
  250. package/dist/components/six-menu-divider.js +1 -1
  251. package/dist/components/six-menu-divider.js.map +1 -1
  252. package/dist/components/six-menu-item2.js +28 -5
  253. package/dist/components/six-menu-item2.js.map +1 -1
  254. package/dist/components/six-menu-label.js +1 -1
  255. package/dist/components/six-menu-label.js.map +1 -1
  256. package/dist/components/six-menu2.js +22 -6
  257. package/dist/components/six-menu2.js.map +1 -1
  258. package/dist/components/six-progress-bar.js +1 -1
  259. package/dist/components/six-progress-bar.js.map +1 -1
  260. package/dist/components/six-progress-ring.js +1 -1
  261. package/dist/components/six-progress-ring.js.map +1 -1
  262. package/dist/components/six-radio.js +1 -1
  263. package/dist/components/six-radio.js.map +1 -1
  264. package/dist/components/six-range.js +1 -1
  265. package/dist/components/six-range.js.map +1 -1
  266. package/dist/components/six-root.js.map +1 -1
  267. package/dist/components/six-search-field.js +1 -1
  268. package/dist/components/six-search-field.js.map +1 -1
  269. package/dist/components/six-select.js +435 -185
  270. package/dist/components/six-select.js.map +1 -1
  271. package/dist/components/six-sidebar-item-group.js +1 -1
  272. package/dist/components/six-sidebar-item-group.js.map +1 -1
  273. package/dist/components/six-sidebar.js +1 -1
  274. package/dist/components/six-sidebar.js.map +1 -1
  275. package/dist/components/six-spinner2.js +1 -1
  276. package/dist/components/six-spinner2.js.map +1 -1
  277. package/dist/components/six-stage-indicator2.js +1 -1
  278. package/dist/components/six-stage-indicator2.js.map +1 -1
  279. package/dist/components/six-switch.js +1 -1
  280. package/dist/components/six-switch.js.map +1 -1
  281. package/dist/components/six-tab-group.js +1 -1
  282. package/dist/components/six-tab-group.js.map +1 -1
  283. package/dist/components/six-tab-panel.js +1 -1
  284. package/dist/components/six-tab-panel.js.map +1 -1
  285. package/dist/components/six-tab.js +1 -1
  286. package/dist/components/six-tab.js.map +1 -1
  287. package/dist/components/six-tag.js +98 -1
  288. package/dist/components/six-tag.js.map +1 -1
  289. package/dist/components/six-textarea.js +1 -1
  290. package/dist/components/six-textarea.js.map +1 -1
  291. package/dist/components/six-tile.js +1 -1
  292. package/dist/components/six-tile.js.map +1 -1
  293. package/dist/components/six-timepicker2.js +1 -1
  294. package/dist/components/six-timepicker2.js.map +1 -1
  295. package/dist/components/six-tooltip2.js +1 -1
  296. package/dist/components/six-tooltip2.js.map +1 -1
  297. package/dist/components/slot.js +1 -2
  298. package/dist/components/slot.js.map +1 -1
  299. package/dist/components.d.ts +1 -21
  300. package/dist/components.json +545 -115
  301. package/dist/esm/error-messages-1eaaad23.js +115 -0
  302. package/dist/esm/error-messages-1eaaad23.js.map +1 -0
  303. package/dist/esm/{form-control-6b30894f.js → form-control-77fcccd0.js} +2 -2
  304. package/dist/esm/{form-control-6b30894f.js.map → form-control-77fcccd0.js.map} +1 -1
  305. package/dist/esm/{index-17d8173e.js → index-6c10d50b.js} +63 -44
  306. package/dist/esm/index-6c10d50b.js.map +1 -0
  307. package/dist/esm/index.js +1 -106
  308. package/dist/esm/index.js.map +1 -1
  309. package/dist/esm/loader.js +3 -3
  310. package/dist/esm/set-attributes_2.entry.js +2 -2
  311. package/dist/esm/set-attributes_2.entry.js.map +1 -1
  312. package/dist/esm/six-alert.entry.js +2 -2
  313. package/dist/esm/six-alert.entry.js.map +1 -1
  314. package/dist/esm/six-avatar.entry.js +2 -2
  315. package/dist/esm/six-avatar.entry.js.map +1 -1
  316. package/dist/esm/six-badge.entry.js +2 -2
  317. package/dist/esm/six-badge.entry.js.map +1 -1
  318. package/dist/esm/six-button.entry.js +3 -3
  319. package/dist/esm/six-button.entry.js.map +1 -1
  320. package/dist/esm/six-card.entry.js +2 -2
  321. package/dist/esm/six-card.entry.js.map +1 -1
  322. package/dist/esm/six-checkbox_2.entry.js +185 -0
  323. package/dist/esm/six-checkbox_2.entry.js.map +1 -0
  324. package/dist/esm/six-datepicker.entry.js +4 -3
  325. package/dist/esm/six-datepicker.entry.js.map +1 -1
  326. package/dist/esm/six-details.entry.js +2 -2
  327. package/dist/esm/six-details.entry.js.map +1 -1
  328. package/dist/esm/six-dialog.entry.js +3 -3
  329. package/dist/esm/six-dialog.entry.js.map +1 -1
  330. package/dist/esm/six-drawer.entry.js +3 -3
  331. package/dist/esm/six-drawer.entry.js.map +1 -1
  332. package/dist/esm/six-dropdown_2.entry.js +196 -126
  333. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  334. package/dist/esm/six-error-page.entry.js +1 -1
  335. package/dist/esm/six-error.entry.js +1 -1
  336. package/dist/esm/six-file-list-item.entry.js +1 -1
  337. package/dist/esm/six-file-list.entry.js +1 -1
  338. package/dist/esm/six-file-upload.entry.js +2 -2
  339. package/dist/esm/six-file-upload.entry.js.map +1 -1
  340. package/dist/esm/six-footer.entry.js +2 -2
  341. package/dist/esm/six-footer.entry.js.map +1 -1
  342. package/dist/esm/six-group-label.entry.js +4 -4
  343. package/dist/esm/six-group-label.entry.js.map +1 -1
  344. package/dist/esm/six-header.entry.js +7 -5
  345. package/dist/esm/six-header.entry.js.map +1 -1
  346. package/dist/esm/six-icon-button.entry.js +2 -2
  347. package/dist/esm/six-icon-button.entry.js.map +1 -1
  348. package/dist/esm/six-icon.entry.js +2 -2
  349. package/dist/esm/six-icon.entry.js.map +1 -1
  350. package/dist/esm/six-input.entry.js +6 -4
  351. package/dist/esm/six-input.entry.js.map +1 -1
  352. package/dist/esm/six-item-picker.entry.js +2 -2
  353. package/dist/esm/six-item-picker.entry.js.map +1 -1
  354. package/dist/esm/six-language-switcher.entry.js +1 -1
  355. package/dist/esm/six-layout-grid.entry.js +1 -1
  356. package/dist/esm/six-main-container.entry.js +1 -1
  357. package/dist/esm/six-main-container.entry.js.map +1 -1
  358. package/dist/esm/six-menu-divider.entry.js +2 -2
  359. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  360. package/dist/esm/six-menu-label.entry.js +2 -2
  361. package/dist/esm/six-menu-label.entry.js.map +1 -1
  362. package/dist/esm/six-picto.entry.js +1 -1
  363. package/dist/esm/six-progress-bar.entry.js +2 -2
  364. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  365. package/dist/esm/six-progress-ring.entry.js +2 -2
  366. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  367. package/dist/esm/six-radio.entry.js +2 -2
  368. package/dist/esm/six-radio.entry.js.map +1 -1
  369. package/dist/esm/six-range.entry.js +4 -4
  370. package/dist/esm/six-range.entry.js.map +1 -1
  371. package/dist/esm/six-root.entry.js +1 -1
  372. package/dist/esm/six-root.entry.js.map +1 -1
  373. package/dist/esm/six-search-field.entry.js +2 -2
  374. package/dist/esm/six-search-field.entry.js.map +1 -1
  375. package/dist/esm/six-select.entry.js +300 -169
  376. package/dist/esm/six-select.entry.js.map +1 -1
  377. package/dist/esm/six-sidebar-item-group.entry.js +3 -3
  378. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  379. package/dist/esm/six-sidebar-item.entry.js +1 -1
  380. package/dist/esm/six-sidebar.entry.js +2 -2
  381. package/dist/esm/six-sidebar.entry.js.map +1 -1
  382. package/dist/esm/six-spinner.entry.js +2 -2
  383. package/dist/esm/six-spinner.entry.js.map +1 -1
  384. package/dist/esm/six-switch.entry.js +4 -4
  385. package/dist/esm/six-switch.entry.js.map +1 -1
  386. package/dist/esm/six-tab-group.entry.js +2 -2
  387. package/dist/esm/six-tab-group.entry.js.map +1 -1
  388. package/dist/esm/six-tab-panel.entry.js +2 -2
  389. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  390. package/dist/esm/six-tab.entry.js +2 -2
  391. package/dist/esm/six-tab.entry.js.map +1 -1
  392. package/dist/esm/six-tag.entry.js +3 -3
  393. package/dist/esm/six-tag.entry.js.map +1 -1
  394. package/dist/esm/six-textarea.entry.js +4 -4
  395. package/dist/esm/six-textarea.entry.js.map +1 -1
  396. package/dist/esm/six-tile.entry.js +3 -3
  397. package/dist/esm/six-tile.entry.js.map +1 -1
  398. package/dist/esm/six-timepicker.entry.js +4 -4
  399. package/dist/esm/six-timepicker.entry.js.map +1 -1
  400. package/dist/esm/six-tooltip.entry.js +2 -2
  401. package/dist/esm/six-tooltip.entry.js.map +1 -1
  402. package/dist/esm/{slot-41bc439a.js → slot-56531341.js} +2 -3
  403. package/dist/esm/slot-56531341.js.map +1 -0
  404. package/dist/esm/{types-07748c42.js → types-a07bb999.js} +3 -1
  405. package/dist/esm/types-a07bb999.js.map +1 -0
  406. package/dist/esm/ui-library.js +4 -4
  407. package/dist/esm/ui-library.js.map +1 -1
  408. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -9
  409. package/dist/types/components/six-header/six-header.d.ts +2 -0
  410. package/dist/types/components/six-input/six-input.d.ts +4 -0
  411. package/dist/types/components/six-menu/six-menu.d.ts +4 -0
  412. package/dist/types/components/six-menu-item/six-menu-item.d.ts +7 -1
  413. package/dist/types/components/six-select/six-select.d.ts +27 -12
  414. package/dist/types/components.d.ts +62 -3
  415. package/dist/types/utils/error-messages.d.ts +1 -0
  416. package/dist/types/utils/slot.d.ts +0 -1
  417. package/dist/ui-library/index.esm.js +1 -1
  418. package/dist/ui-library/index.esm.js.map +1 -1
  419. package/dist/ui-library/{p-c86aa5b3.entry.js → p-01ae4500.entry.js} +2 -2
  420. package/dist/ui-library/p-021f6da9.entry.js +2 -0
  421. package/dist/ui-library/{p-6aa2929a.entry.js.map → p-021f6da9.entry.js.map} +1 -1
  422. package/dist/ui-library/p-0274c52c.entry.js +2 -0
  423. package/dist/ui-library/{p-882fbf6f.entry.js.map → p-0274c52c.entry.js.map} +1 -1
  424. package/dist/ui-library/{p-f73a6bdc.entry.js → p-0cb135aa.entry.js} +2 -2
  425. package/dist/ui-library/p-0cebf1d2.js +2 -0
  426. package/dist/ui-library/p-0cebf1d2.js.map +1 -0
  427. package/dist/ui-library/p-1431a2a8.entry.js +2 -0
  428. package/dist/ui-library/p-1431a2a8.entry.js.map +1 -0
  429. package/dist/ui-library/p-1aa28025.entry.js +2 -0
  430. package/dist/ui-library/p-1aa28025.entry.js.map +1 -0
  431. package/dist/ui-library/p-1b135e1c.entry.js +2 -0
  432. package/dist/ui-library/{p-ce373da5.entry.js.map → p-1b135e1c.entry.js.map} +1 -1
  433. package/dist/ui-library/{p-1d0c5929.entry.js → p-1be990f9.entry.js} +2 -2
  434. package/dist/ui-library/{p-1d0c5929.entry.js.map → p-1be990f9.entry.js.map} +1 -1
  435. package/dist/ui-library/p-2008636b.entry.js +2 -0
  436. package/dist/ui-library/{p-19a61686.entry.js.map → p-2008636b.entry.js.map} +1 -1
  437. package/dist/ui-library/p-2132da0a.entry.js +2 -0
  438. package/dist/ui-library/{p-479d8087.entry.js.map → p-2132da0a.entry.js.map} +1 -1
  439. package/dist/ui-library/p-2cd674e0.entry.js +2 -0
  440. package/dist/ui-library/{p-ee71e3a3.entry.js.map → p-2cd674e0.entry.js.map} +1 -1
  441. package/dist/ui-library/p-2d86ba99.entry.js +2 -0
  442. package/dist/ui-library/p-2d86ba99.entry.js.map +1 -0
  443. package/dist/ui-library/p-31a4a74c.entry.js +2 -0
  444. package/dist/ui-library/p-31a4a74c.entry.js.map +1 -0
  445. package/dist/ui-library/p-3783aed0.entry.js +2 -0
  446. package/dist/ui-library/p-3783aed0.entry.js.map +1 -0
  447. package/dist/ui-library/p-391f10f1.entry.js +2 -0
  448. package/dist/ui-library/p-391f10f1.entry.js.map +1 -0
  449. package/dist/ui-library/p-3dd28dc0.entry.js +2 -0
  450. package/dist/ui-library/{p-23c02c98.entry.js.map → p-3dd28dc0.entry.js.map} +1 -1
  451. package/dist/ui-library/p-3f0f59b6.entry.js +2 -0
  452. package/dist/ui-library/{p-49aa8d1e.entry.js.map → p-3f0f59b6.entry.js.map} +1 -1
  453. package/dist/ui-library/p-46ee280d.entry.js +2 -0
  454. package/dist/ui-library/{p-c2df8c27.entry.js.map → p-46ee280d.entry.js.map} +1 -1
  455. package/dist/ui-library/p-4752a63c.entry.js +2 -0
  456. package/dist/ui-library/{p-7432d409.entry.js.map → p-4752a63c.entry.js.map} +1 -1
  457. package/dist/ui-library/p-4772a9d3.entry.js +2 -0
  458. package/dist/ui-library/{p-a4e4620c.entry.js.map → p-4772a9d3.entry.js.map} +1 -1
  459. package/dist/ui-library/p-48c453f1.entry.js +2 -0
  460. package/dist/ui-library/{p-0e7332db.entry.js.map → p-48c453f1.entry.js.map} +1 -1
  461. package/dist/ui-library/p-4a3ba956.entry.js +2 -0
  462. package/dist/ui-library/{p-fcd57e0a.entry.js.map → p-4a3ba956.entry.js.map} +1 -1
  463. package/dist/ui-library/p-4b154936.entry.js +2 -0
  464. package/dist/ui-library/p-4b154936.entry.js.map +1 -0
  465. package/dist/ui-library/p-5a5f6869.entry.js +2 -0
  466. package/dist/ui-library/{p-a0658b26.entry.js.map → p-5a5f6869.entry.js.map} +1 -1
  467. package/dist/ui-library/{p-c1675a45.entry.js → p-621c2742.entry.js} +2 -2
  468. package/dist/ui-library/p-65778e3d.entry.js +2 -0
  469. package/dist/ui-library/p-65778e3d.entry.js.map +1 -0
  470. package/dist/ui-library/{p-6907a7dc.js → p-67496e8c.js} +2 -2
  471. package/dist/ui-library/p-78529c8c.entry.js +2 -0
  472. package/dist/ui-library/{p-b5ac1219.entry.js.map → p-78529c8c.entry.js.map} +1 -1
  473. package/dist/ui-library/{p-74a714c0.entry.js → p-7eb4bbe7.entry.js} +2 -2
  474. package/dist/ui-library/{p-d310a6dd.entry.js → p-831517cd.entry.js} +2 -2
  475. package/dist/ui-library/{p-0861899a.js → p-862d474e.js} +1 -1
  476. package/dist/ui-library/p-862d474e.js.map +1 -0
  477. package/dist/ui-library/{p-816f857d.entry.js → p-87e197ee.entry.js} +2 -2
  478. package/dist/ui-library/p-88767c27.entry.js +2 -0
  479. package/dist/ui-library/{p-ada23fe3.entry.js.map → p-88767c27.entry.js.map} +1 -1
  480. package/dist/ui-library/p-8c38a7bd.entry.js +2 -0
  481. package/dist/ui-library/{p-c12a94ce.entry.js.map → p-8c38a7bd.entry.js.map} +1 -1
  482. package/dist/ui-library/p-943ce0f2.entry.js +2 -0
  483. package/dist/ui-library/p-943ce0f2.entry.js.map +1 -0
  484. package/dist/ui-library/{p-bee65dd9.entry.js → p-98ce9502.entry.js} +2 -2
  485. package/dist/ui-library/p-98ce9502.entry.js.map +1 -0
  486. package/dist/ui-library/p-a036cc6f.entry.js +2 -0
  487. package/dist/ui-library/{p-3d54ecf2.entry.js.map → p-a036cc6f.entry.js.map} +1 -1
  488. package/dist/ui-library/p-a29f6a0e.entry.js +2 -0
  489. package/dist/ui-library/p-a29f6a0e.entry.js.map +1 -0
  490. package/dist/ui-library/p-a3fd8c74.entry.js +2 -0
  491. package/dist/ui-library/p-a3fd8c74.entry.js.map +1 -0
  492. package/dist/ui-library/p-a919b557.entry.js +2 -0
  493. package/dist/ui-library/p-a919b557.entry.js.map +1 -0
  494. package/dist/ui-library/p-ace4ec84.entry.js +2 -0
  495. package/dist/ui-library/p-ace4ec84.entry.js.map +1 -0
  496. package/dist/ui-library/{p-cd35b3c6.entry.js → p-adf5a4da.entry.js} +2 -2
  497. package/dist/ui-library/{p-9b1ff147.entry.js → p-b5f844f7.entry.js} +2 -2
  498. package/dist/ui-library/p-b5f844f7.entry.js.map +1 -0
  499. package/dist/ui-library/p-b8ea574b.entry.js +2 -0
  500. package/dist/ui-library/p-b8ea574b.entry.js.map +1 -0
  501. package/dist/ui-library/p-ca63a6fa.js +3 -0
  502. package/dist/ui-library/p-ca63a6fa.js.map +1 -0
  503. package/dist/ui-library/{p-d2cf4280.entry.js → p-d221d86a.entry.js} +2 -2
  504. package/dist/ui-library/p-d702b6ec.entry.js +2 -0
  505. package/dist/ui-library/{p-58661675.entry.js.map → p-d702b6ec.entry.js.map} +1 -1
  506. package/dist/ui-library/p-db9d2fde.entry.js +2 -0
  507. package/dist/ui-library/{p-bdb79948.entry.js.map → p-db9d2fde.entry.js.map} +1 -1
  508. package/dist/ui-library/p-e080d5b6.js +2 -0
  509. package/dist/ui-library/p-e080d5b6.js.map +1 -0
  510. package/dist/ui-library/p-e0dd0307.entry.js +2 -0
  511. package/dist/ui-library/{p-3187bc23.entry.js.map → p-e0dd0307.entry.js.map} +1 -1
  512. package/dist/ui-library/p-e340a0ad.entry.js +2 -0
  513. package/dist/ui-library/{p-c07b1240.entry.js.map → p-e340a0ad.entry.js.map} +1 -1
  514. package/dist/ui-library/p-efa14ac2.entry.js +2 -0
  515. package/dist/ui-library/{p-5d43ea07.entry.js.map → p-efa14ac2.entry.js.map} +1 -1
  516. package/dist/ui-library/p-fce214eb.entry.js +2 -0
  517. package/dist/ui-library/{p-911eb578.entry.js.map → p-fce214eb.entry.js.map} +1 -1
  518. package/dist/ui-library/p-fe87f64b.entry.js +2 -0
  519. package/dist/ui-library/p-fe87f64b.entry.js.map +1 -0
  520. package/dist/ui-library/ui-library.css +1 -10
  521. package/dist/ui-library/ui-library.esm.js +1 -1
  522. package/dist/ui-library/ui-library.esm.js.map +1 -1
  523. package/package.json +5 -8
  524. package/dist/cjs/index-3baddcdc.js.map +0 -1
  525. package/dist/cjs/six-checkbox.cjs.entry.js +0 -127
  526. package/dist/cjs/six-checkbox.cjs.entry.js.map +0 -1
  527. package/dist/cjs/six-menu-item.cjs.entry.js +0 -63
  528. package/dist/cjs/six-menu-item.cjs.entry.js.map +0 -1
  529. package/dist/cjs/slot-9821749e.js.map +0 -1
  530. package/dist/cjs/types-0a6d66f6.js.map +0 -1
  531. package/dist/components/six-tag2.js +0 -102
  532. package/dist/components/six-tag2.js.map +0 -1
  533. package/dist/esm/index-17d8173e.js.map +0 -1
  534. package/dist/esm/six-checkbox.entry.js +0 -123
  535. package/dist/esm/six-checkbox.entry.js.map +0 -1
  536. package/dist/esm/six-menu-item.entry.js +0 -59
  537. package/dist/esm/six-menu-item.entry.js.map +0 -1
  538. package/dist/esm/slot-41bc439a.js.map +0 -1
  539. package/dist/esm/types-07748c42.js.map +0 -1
  540. package/dist/ui-library/p-0861899a.js.map +0 -1
  541. package/dist/ui-library/p-0a81b42c.entry.js +0 -2
  542. package/dist/ui-library/p-0a81b42c.entry.js.map +0 -1
  543. package/dist/ui-library/p-0beec94f.js +0 -3
  544. package/dist/ui-library/p-0beec94f.js.map +0 -1
  545. package/dist/ui-library/p-0e7332db.entry.js +0 -2
  546. package/dist/ui-library/p-178f5782.entry.js +0 -2
  547. package/dist/ui-library/p-178f5782.entry.js.map +0 -1
  548. package/dist/ui-library/p-19a61686.entry.js +0 -2
  549. package/dist/ui-library/p-23c02c98.entry.js +0 -2
  550. package/dist/ui-library/p-28221447.entry.js +0 -2
  551. package/dist/ui-library/p-28221447.entry.js.map +0 -1
  552. package/dist/ui-library/p-2eed9d8d.entry.js +0 -2
  553. package/dist/ui-library/p-2eed9d8d.entry.js.map +0 -1
  554. package/dist/ui-library/p-3187bc23.entry.js +0 -2
  555. package/dist/ui-library/p-32e1a5ab.entry.js +0 -2
  556. package/dist/ui-library/p-32e1a5ab.entry.js.map +0 -1
  557. package/dist/ui-library/p-32fed3c7.entry.js +0 -2
  558. package/dist/ui-library/p-32fed3c7.entry.js.map +0 -1
  559. package/dist/ui-library/p-3d54ecf2.entry.js +0 -2
  560. package/dist/ui-library/p-4229f7e8.entry.js +0 -2
  561. package/dist/ui-library/p-4229f7e8.entry.js.map +0 -1
  562. package/dist/ui-library/p-479d8087.entry.js +0 -2
  563. package/dist/ui-library/p-49aa8d1e.entry.js +0 -2
  564. package/dist/ui-library/p-58661675.entry.js +0 -2
  565. package/dist/ui-library/p-5d43ea07.entry.js +0 -2
  566. package/dist/ui-library/p-6aa2929a.entry.js +0 -2
  567. package/dist/ui-library/p-7432d409.entry.js +0 -2
  568. package/dist/ui-library/p-76825395.entry.js +0 -2
  569. package/dist/ui-library/p-76825395.entry.js.map +0 -1
  570. package/dist/ui-library/p-882fbf6f.entry.js +0 -2
  571. package/dist/ui-library/p-88fd4973.entry.js +0 -2
  572. package/dist/ui-library/p-88fd4973.entry.js.map +0 -1
  573. package/dist/ui-library/p-8b750c9e.entry.js +0 -2
  574. package/dist/ui-library/p-8b750c9e.entry.js.map +0 -1
  575. package/dist/ui-library/p-911eb578.entry.js +0 -2
  576. package/dist/ui-library/p-93fcda4a.entry.js +0 -2
  577. package/dist/ui-library/p-93fcda4a.entry.js.map +0 -1
  578. package/dist/ui-library/p-981b3228.entry.js +0 -2
  579. package/dist/ui-library/p-981b3228.entry.js.map +0 -1
  580. package/dist/ui-library/p-9b1ff147.entry.js.map +0 -1
  581. package/dist/ui-library/p-a0658b26.entry.js +0 -2
  582. package/dist/ui-library/p-a4e4620c.entry.js +0 -2
  583. package/dist/ui-library/p-ada23fe3.entry.js +0 -2
  584. package/dist/ui-library/p-b5ac1219.entry.js +0 -2
  585. package/dist/ui-library/p-ba247565.entry.js +0 -2
  586. package/dist/ui-library/p-ba247565.entry.js.map +0 -1
  587. package/dist/ui-library/p-bdb79948.entry.js +0 -2
  588. package/dist/ui-library/p-bee65dd9.entry.js.map +0 -1
  589. package/dist/ui-library/p-c07b1240.entry.js +0 -2
  590. package/dist/ui-library/p-c12a94ce.entry.js +0 -2
  591. package/dist/ui-library/p-c2df8c27.entry.js +0 -2
  592. package/dist/ui-library/p-ce373da5.entry.js +0 -2
  593. package/dist/ui-library/p-dfb6bff6.entry.js +0 -2
  594. package/dist/ui-library/p-dfb6bff6.entry.js.map +0 -1
  595. package/dist/ui-library/p-ee71e3a3.entry.js +0 -2
  596. package/dist/ui-library/p-ef317d69.entry.js +0 -2
  597. package/dist/ui-library/p-ef317d69.entry.js.map +0 -1
  598. package/dist/ui-library/p-f385f1c2.entry.js +0 -2
  599. package/dist/ui-library/p-f385f1c2.entry.js.map +0 -1
  600. package/dist/ui-library/p-faa04bb5.js +0 -2
  601. package/dist/ui-library/p-faa04bb5.js.map +0 -1
  602. package/dist/ui-library/p-fcd57e0a.entry.js +0 -2
  603. /package/dist/ui-library/{p-c86aa5b3.entry.js.map → p-01ae4500.entry.js.map} +0 -0
  604. /package/dist/ui-library/{p-f73a6bdc.entry.js.map → p-0cb135aa.entry.js.map} +0 -0
  605. /package/dist/ui-library/{p-c1675a45.entry.js.map → p-621c2742.entry.js.map} +0 -0
  606. /package/dist/ui-library/{p-6907a7dc.js.map → p-67496e8c.js.map} +0 -0
  607. /package/dist/ui-library/{p-74a714c0.entry.js.map → p-7eb4bbe7.entry.js.map} +0 -0
  608. /package/dist/ui-library/{p-d310a6dd.entry.js.map → p-831517cd.entry.js.map} +0 -0
  609. /package/dist/ui-library/{p-816f857d.entry.js.map → p-87e197ee.entry.js.map} +0 -0
  610. /package/dist/ui-library/{p-cd35b3c6.entry.js.map → p-adf5a4da.entry.js.map} +0 -0
  611. /package/dist/ui-library/{p-d2cf4280.entry.js.map → p-d221d86a.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixSelectCss","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","hide","sixChange","value","isSelected","handleKeyDown","virtualScroll","autocomplete","includes","key","items","getVisibleItems","isOpen","multiple","code","ctrlKey","preventDefault","selectAll","activeItem","at","click","_b","show","length","_c","setFocus","_d","handleLabelClick","box","focus","handleMenuSelect","currentItem","detail","item","checked","getItems","forEach","i","syncValueFromItems","handleMenuShow","disabled","mainItems","style","display","checkedItems","getCheckedItems","getValueAsArray","selectionContainerItems","map","h","checkType","onClick","menuItem","target","isChecked","getItemLabel","handleMenuHide","handleSlotChange","hasHelpTextSlot","hasSlot","host","hasLabelSlot","hasErrorTextSlot","syncItemsFromValue","DEFAULT_DEBOUNCE_FAST","handleDisabledChange","handleLabelChange","handleMultipleChange","handleValueChange","Array","isArray","connectedCallback","options","console","error","init","componentWillLoad","componentDidLoad","requestAnimationFrame","autocompleteInput","add","debounce","inputDebounce","join","disconnectedCallback","disconnect","shadowRoot","removeEventListener","removeAll","addEventListener","forward","displayValuesContainer","observe","slot","querySelector","getTextContent","textContent","menu","querySelectorAll","getSelectionContainerItems","filter","values","String","visibleItems","hasDeselectedOptions","option","displayedValues","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","some","opt","element","getBoundingClientRect","width","accumulatedWidth","displayOption","slice","displayValue","index","list","isLast","hideSeparator","hideDisplayValue","displayValueOption","classList","remove","count","lang","getLanguage"],"sources":["src/components/six-select/six-select.scss?tag=six-select&encapsulation=shadow","src/components/six-select/six-select.tsx"],"sourcesContent":["@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';\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 // Cast to array | string based on `this.multiple`\n const value = this.getValueAsArray();\n this.value = this.multiple ? value : value[0] || '';\n this.syncItemsFromValue();\n }\n\n @Watch('value')\n async handleValueChange() {\n if (this.multiple && !Array.isArray(this.value)) {\n this.value = [];\n }\n\n if (!this.multiple && typeof this.value !== 'string') {\n this.value = '';\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 this.init();\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n if (this.multiple && this.value != null) {\n this.value = this.getValueAsArray();\n }\n }\n\n componentDidLoad() {\n this.init();\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 }, this.inputDebounce)\n );\n autocompleteInput.value = Array.isArray(this.value) ? this.value.join(',') : this.value;\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 init() {\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 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 getValueAsArray() {\n const values = Array.isArray(this.value) ? this.value : this.value === '' ? [] : [this.value];\n // enforce that the values are converted to 'string' before the value is compared\n return values.map(String);\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?.hide();\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 // 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(this.getValueAsArray(), mainItems);\n if (!this.virtualScroll && this.multiple) {\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 };\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 = this.getValueAsArray();\n\n selectionContainerItems.forEach((item) => {\n item.checkType = this.multiple ? 'checkbox' : 'check';\n item.checked = value.includes(item.value);\n });\n mainItems.forEach((item) => {\n item.checkType = this.multiple ? 'checkbox' : 'check';\n item.checked = value.includes(item.value);\n });\n\n const checkedItems = getCheckedItems(this.getValueAsArray(), mainItems);\n this.displayedValues = checkedItems.map((i) => this.getItemLabel(i));\n\n if (this.autocomplete && this.autocompleteInput != null) {\n this.autocompleteInput.value = Array.isArray(this.value) ? this.value.join(',') : this.value;\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' : 'Desele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EAAiByE,GACxBA,EAAmBC,UAAUC,OAAO,wBACtC,CAEA,SAASH,EAAiBC,GACxBA,EAAmBC,UAAUzG,IAAI,wBACnC,CAEA,SAASwC,EAAiBX,EAAwB8E,GAChD9E,EAAcb,YAAc,IAAI2F,GAClC,CAEA,SAASlE,EAAkBZ,GACzBA,EAAc4E,UAAUC,OAAO,wBACjC,CAEA,SAASpE,EAAkBT,GACzBA,EAAc4E,UAAUzG,IAAI,wBAC9B,CAEA,SAASyF,EAAqBjE,GAC5B,MAAMoF,EAAOC,IACb,OAAQD,GACN,IAAK,KACH,OAAOpF,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 t,c as i,h as s,g as e}from"./p-ca63a6fa.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)}";let c=0;const f=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;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 n=(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(m).at(0);const o=(i=this.panelSlot)===null||i===void 0?void 0:i.assignedElements({flatten:true}).filter(p).at(0);const r=(n===null||n===void 0?void 0:n.querySelectorAll("six-menu-item"))||[];const h=((e=o===null||o===void 0?void 0:o.querySelector("slot"))===null||e===void 0?void 0:e.assignedElements().filter(v))||[];if(r.length>0||h.length>0){return{sixMenuItems:h,selectionContainerItems:[...r]}}else{return{sixMenuItems:o?Array.from(o.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&&v(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&&p(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 w(t,s)?"unset":"none"}));i.forEach((async t=>{t.style.display=await w(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(p).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",{part:"base",id:this.componentId,class:{dropdown:true,"dropdown--open":this.open}},s("span",{part:"trigger",class:"dropdown__trigger",ref:t=>this.trigger=t,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown,onKeyUp:this.handleTriggerKeyUp},s("slot",{name:"trigger",ref:t=>this.triggerSlot=t,onSlotchange:this.handleTriggerSlotChange})),s("div",{ref:t=>this.positioner=t,class:{dropdown__positioner:true,dropdown__positioner__filtered:(this.filter||this.asyncFilter)&&!this.hoist}},s("div",{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",{class:{dropdown__panel__scroll:true,"dropdown__panel__scroll--virtual":this.virtualScroll},onScroll:this.handleDropdownScroll,ref:t=>this.scrollPanel=t},s("slot",{ref:t=>this.panelSlot=t}),this.options.length>0&&s("six-menu",{part:"menu",items:this.renderedOptions,virtualScroll:this.virtualScroll})),s("slot",{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 p(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu"}function v(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item"}function m(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 w(t,i){return t.value.toLowerCase().includes(i)||(await t.getTextLabel()).toLowerCase().includes(i)}f.style=u;const x=":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=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 b=t=>(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item";const _=({value:t,label:i})=>s("six-menu-item",{key:t,value:t},i);const y=5;const C=64;const k=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=C}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?y: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(_)}const t=this.menu.querySelector("slot");if(t==null)return[];return[...t.assignedElements({flatten:true})].filter((t=>b(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(g)}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(g)}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`}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){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(_)}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",{ref:t=>this.menuWrapper=t,style:this.getMenuWrapperStyle(),part:"wrapper",class:{menu:true,".no-shadow":this.removeBoxShadow}},s("div",{ref:t=>this.menu=t,part:"base",role:"menu",onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:0,style:this.getMenuContainerStyle()},s("slot",null),this.renderItems()),this.virtualScroll&&s("div",{style:this.getScrollbarGhostStyle()}))}get host(){return e(this)}};k.style=x;export{f as six_dropdown,k as six_menu};
2
+ //# sourceMappingURL=p-a919b557.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isTabbable","el","tabIndex","getNearestTabbableElement","shadowRoot","tabbableShadowChild","children","find","e","map","at","undefined","sixDropdownCss","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","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","_d","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","isFocusedMenuItem","classList","contains","isSIXMenuItemElement","mapToMenuItem","DEFAULT_NUMBER_OF_ITEMS_SHOWN_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 const sixMenuItems = (sixMenuElement?.querySelector('slot')?.assignedElements().filter(isSixMenuItem) ||\n []) as HTMLSixMenuItemElement[];\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;\n\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 sixMenuItemHeight = DEFAULT_SIX_MENU_ITEM_HEIGHT;\n\n connectedCallback() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n componentWillLoad() {\n if (this.items === null) {\n return;\n }\n }\n\n private handleScrolling = () => {\n 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 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 }\n return {\n ...styles,\n };\n }\n\n private getMenuContainerStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll) {\n // calculate height of content are if all items would be rendered so the scrollbar has the proper size\n styles.transform = `translateY(${this.sixMenuItemHeight * this.scrollingIndex}px)`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getScrollbarGhostStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll && this.items !== null) {\n styles.height = `${this.items.length * this.sixMenuItemHeight - this.itemSize * this.sixMenuItemHeight}px`;\n }\n\n return {\n ...styles,\n };\n }\n\n private renderItems() {\n if (this.items === undefined || this.items === null) {\n return;\n }\n\n if (!this.virtualScroll) {\n return this.items.map(mapToMenuItem);\n }\n\n return this.items\n .slice(this.scrollingIndex, Math.min(this.items.length, this.itemSize + this.scrollingIndex))\n .map(({ 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,E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CAGF,IAAKrL,KAAKyG,cAAe,CACvB,OAAOzG,KAAKqL,MAAM3L,IAAImM,E,CAGxB,OAAO7L,KAAKqL,MACT0D,MAAM/O,KAAKoM,eAAgBC,KAAK2C,IAAIhP,KAAKqL,MAAM1K,OAAQX,KAAK6O,SAAW7O,KAAKoM,iBAC5E1M,KAAI,EAAGsB,QAAOC,WACbF,EAAA,iBAAekO,UAAU,QAAQ1M,IAAKvB,EAAOA,MAAOA,GACjDC,I,CAKT,MAAAiJ,GACE,OACEnJ,EAAA,OACEuJ,IAAMpL,GAAQc,KAAKmM,YAAcjN,EACjC4D,MAAO9C,KAAKqO,sBACZlE,KAAK,UACLC,MAAO,CACL9F,KAAM,KACN,aAActE,KAAKkP,kBAGrBnO,EAAA,OACEuJ,IAAMpL,GAAQc,KAAKsE,KAAOpF,EAC1BiL,KAAK,OACLW,KAAK,OACLP,QAASvK,KAAKwM,YACdhC,UAAWxK,KAAK0M,cAChBvN,SAAU,EACV2D,MAAO9C,KAAK0O,yBAEZ3N,EAAA,aACCf,KAAK8O,eAEP9O,KAAKyG,eAAiB1F,EAAA,OAAK+B,MAAO9C,KAAK4O,2B"}
@@ -0,0 +1,2 @@
1
+ import{r as i,c as e,h as t,g as s}from"./p-ca63a6fa.js";import{h as l,g as a}from"./p-0cebf1d2.js";const o=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block}.tile{min-height:var(--tile-size);width:var(--tile-size);background-color:var(--six-color-clay-50);display:inline-grid;grid-template-columns:100%;grid-template-areas:"header" "middle" "footer"}.tile--small{--tile-size:80px;--tile-padding-size:var(--six-spacing-medium)}.tile--medium{--tile-size:120px;--tile-padding-size:var(--six-spacing-large)}.tile--large{--tile-size:160px;--tile-padding-size:var(--six-spacing-x-large)}.tile:not(.tile--visible){visibility:hidden}.tile--elevated{border:0;box-shadow:var(--six-shadow-medium)}.tile__header{grid-area:header;height:5%;justify-self:right;display:flex;justify-content:right;opacity:0;transition:var(--six-transition-fast) opacity}.tile:hover>.tile__header{opacity:1}.tile__header--hidden{visibility:hidden}.tile__header six-icon-button{margin-top:-6px;margin-right:-6px;margin-bottom:-16px}.tile__body,.tile__body--large,.tile__body--medium,.tile__body--small{grid-area:middle;display:grid;place-items:center;cursor:pointer;padding-left:var(--tile-padding-size);padding-right:var(--tile-padding-size)}.tile__body six-icon::part(base),.tile__body--large six-icon::part(base),.tile__body--medium six-icon::part(base),.tile__body--small six-icon::part(base){padding:0}.tile__body--small{--tile-padding-size:var(--six-spacing-medium)}.tile__body--medium{--tile-padding-size:var(--six-spacing-large)}.tile__body--large{--tile-padding-size:var(--six-spacing-x-large)}.tile__footer,.tile__footer--large,.tile__footer--medium,.tile__footer--small{grid-area:footer;display:flex;justify-content:center;cursor:pointer;font-weight:var(--six-font-weight-normal);color:var(--six-color-web-rock-900)}.tile__footer--small{font-size:var(--six-font-size-xxx-small)}.tile__footer--medium{font-size:var(--six-font-size-xx-small)}.tile__footer--large{font-size:var(--six-font-size-small)}.tile__footer .label__footer,.tile__footer--small .label__footer,.tile__footer--medium .label__footer,.tile__footer--large .label__footer{overflow:hidden;text-overflow:ellipsis;width:calc(var(--tile-size) - 2em);text-align:center}';const r=class{constructor(t){i(this,t);this.sixTileClose=e(this,"six-tile-closed",7);this.sixTileSelected=e(this,"six-tile-selected",7);this.handleSlotChange=()=>{this.hasIconSlot=l(this.host,"icon");this.hasLabelSlot=l(this.host,"label");if(this.hasIconSlot){const i=a(this.host,"icon");i===null||i===void 0?void 0:i.addEventListener("click",this.handleClickEvent)}if(this.hasLabelSlot){const i=a(this.host,"label");i===null||i===void 0?void 0:i.addEventListener("click",this.handleClickEvent)}};this.handleCloseClickEvent=()=>{this.visible=false;this.sixTileClose.emit()};this.handleClickEvent=()=>{this.sixTileSelected.emit()};this.label="";this.iconName=undefined;this.closeable=true;this.elevated=false;this.disableTooltip=true;this.disabled=false;this.size="medium";this.visible=true;this.hasIconSlot=false;this.hasLabelSlot=false}async hide(){this.visible=false}async show(){this.visible=true}componentWillLoad(){this.handleSlotChange()}render(){return t("six-tooltip",{disabled:this.disableTooltip||this.label==="",content:this.label},t("div",{part:"base",class:{tile:true,"tile--visible":this.visible,"tile--small":this.size==="small","tile--medium":this.size==="medium","tile--large":this.size==="large","tile--elevated":this.elevated}},t("div",{part:"header",class:"tile__header"},t("six-icon-button",{class:{"tile__header--hidden":!this.closeable},name:"close",size:d(this.size),onClick:this.handleCloseClickEvent})),t("div",{part:"body",class:"tile__body"},this.iconName&&t("six-icon",{onClick:this.handleClickEvent,size:n(this.size)},this.iconName),this.hasIconSlot&&t("slot",{name:"icon"})),t("div",{part:"footer",class:{"tile__footer--small":this.size==="small","tile__footer--medium":this.size==="medium","tile__footer--large":this.size==="large"}},this.label&&t("div",{class:{".label__footer":true},onClick:this.handleClickEvent},this.label),this.hasLabelSlot&&t("slot",{name:"label"}))))}get host(){return s(this)}};const d=i=>({small:"xxSmall",medium:"medium",large:"medium"}[i]);const n=i=>({small:"xLarge",medium:"xxLarge",large:"xxxLarge"}[i]);r.style=o;export{r as six_tile};
2
+ //# sourceMappingURL=p-ace4ec84.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixTileCss","SixTile","this","handleSlotChange","hasIconSlot","hasSlot","host","hasLabelSlot","slot","getSlot","addEventListener","handleClickEvent","handleCloseClickEvent","visible","sixTileClose","emit","sixTileSelected","hide","show","componentWillLoad","render","h","disabled","disableTooltip","label","content","part","class","tile","size","elevated","closeable","name","closeIconSize","onClick","iconName","iconSize","small","medium","large"],"sources":["src/components/six-tile/six-tile.scss?tag=six-tile&encapsulation=shadow","src/components/six-tile/six-tile.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.tile {\n &--small {\n --tile-size: 80px;\n --tile-padding-size: var(--six-spacing-medium);\n }\n\n &--medium {\n --tile-size: 120px;\n --tile-padding-size: var(--six-spacing-large);\n }\n\n &--large {\n --tile-size: 160px;\n --tile-padding-size: var(--six-spacing-x-large);\n }\n\n min-height: var(--tile-size);\n width: var(--tile-size);\n\n background-color: var(--six-color-clay-50);\n\n display: inline-grid;\n grid-template-columns: 100%;\n grid-template-areas:\n 'header'\n 'middle'\n 'footer';\n\n &:not(.tile--visible) {\n visibility: hidden;\n }\n\n &--elevated {\n border: 0;\n box-shadow: var(--six-shadow-medium);\n }\n}\n\n.tile__header {\n grid-area: header;\n height: 5%;\n justify-self: right;\n display: flex;\n justify-content: right;\n opacity: 0;\n transition: var(--six-transition-fast) opacity;\n\n .tile:hover > & {\n opacity: 1;\n }\n\n &--hidden {\n visibility: hidden;\n }\n\n six-icon-button {\n margin-top: -6px;\n margin-right: -6px;\n margin-bottom: -16px;\n }\n}\n\n.tile__body {\n grid-area: middle;\n display: grid;\n place-items: center;\n cursor: pointer;\n\n six-icon::part(base) {\n padding: 0;\n }\n\n &--small {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-medium);\n }\n\n &--medium {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-large);\n }\n\n &--large {\n @extend .tile__body;\n --tile-padding-size: var(--six-spacing-x-large);\n }\n\n padding-left: var(--tile-padding-size);\n padding-right: var(--tile-padding-size);\n}\n\n.tile__footer {\n grid-area: footer;\n display: flex;\n justify-content: center;\n cursor: pointer;\n font-weight: var(--six-font-weight-normal);\n color: var(--six-color-web-rock-900);\n\n &--small {\n @extend .tile__footer;\n font-size: var(--six-font-size-xxx-small);\n }\n\n &--medium {\n @extend .tile__footer;\n font-size: var(--six-font-size-xx-small);\n }\n\n &--large {\n @extend .tile__footer;\n font-size: var(--six-font-size-small);\n }\n\n .label__footer {\n overflow: hidden;\n text-overflow: ellipsis;\n width: calc(var(--tile-size) - 2em);\n text-align: center;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { getSlot, hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n */\n\n@Component({\n tag: 'six-tile',\n styleUrl: 'six-tile.scss',\n shadow: true,\n})\nexport class SixTile {\n @Element() host!: HTMLSixTileElement;\n\n /** The tile's label. */\n @Prop() label = '';\n\n /** The icon's name. */\n @Prop() iconName?: string;\n\n /** Flag, whether the tile is closeable. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() closeable = true;\n\n /** Flag, whether the tile should cast a shadow. */\n @Prop() elevated = false;\n\n /** Enables tile tooltip for tiles */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() disableTooltip = true;\n\n /** Set to true to disable the tile. */\n @Prop({ reflect: true }) disabled = false;\n\n /** The tile's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @State() visible = true;\n\n /** Emitted when the tile was closed. */\n @Event({ eventName: 'six-tile-closed' }) sixTileClose!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tile is selected. */\n @Event({ eventName: 'six-tile-selected' }) sixTileSelected!: EventEmitter<EmptyPayload>;\n\n /** Hides the tile */\n @Method()\n async hide() {\n this.visible = false;\n }\n\n /** Shows the tile */\n @Method()\n async show() {\n this.visible = true;\n }\n\n @State() hasIconSlot = false;\n\n @State() hasLabelSlot = false;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange = () => {\n this.hasIconSlot = hasSlot(this.host, 'icon');\n this.hasLabelSlot = hasSlot(this.host, 'label');\n\n if (this.hasIconSlot) {\n const slot = getSlot(this.host, 'icon');\n slot?.addEventListener('click', this.handleClickEvent);\n }\n\n if (this.hasLabelSlot) {\n const slot = getSlot(this.host, 'label');\n slot?.addEventListener('click', this.handleClickEvent);\n }\n };\n\n render() {\n return (\n <six-tooltip disabled={this.disableTooltip || this.label === ''} content={this.label}>\n <div\n part=\"base\"\n class={{\n tile: true,\n 'tile--visible': this.visible,\n 'tile--small': this.size === 'small',\n 'tile--medium': this.size === 'medium',\n 'tile--large': this.size === 'large',\n 'tile--elevated': this.elevated,\n }}\n >\n <div part=\"header\" class=\"tile__header\">\n <six-icon-button\n class={{\n 'tile__header--hidden': !this.closeable,\n }}\n name=\"close\"\n size={closeIconSize(this.size)}\n onClick={this.handleCloseClickEvent}\n />\n </div>\n\n <div part=\"body\" class=\"tile__body\">\n {this.iconName && (\n <six-icon onClick={this.handleClickEvent} size={iconSize(this.size)}>\n {this.iconName}\n </six-icon>\n )}\n {this.hasIconSlot && <slot name=\"icon\"></slot>}\n </div>\n\n <div\n part=\"footer\"\n class={{\n 'tile__footer--small': this.size === 'small',\n 'tile__footer--medium': this.size === 'medium',\n 'tile__footer--large': this.size === 'large',\n }}\n >\n {this.label && (\n <div\n class={{\n '.label__footer': true,\n }}\n onClick={this.handleClickEvent}\n >\n {this.label}\n </div>\n )}\n {this.hasLabelSlot && <slot name=\"label\"></slot>}\n </div>\n </div>\n </six-tooltip>\n );\n }\n\n private handleCloseClickEvent = () => {\n this.visible = false;\n this.sixTileClose.emit();\n };\n\n private handleClickEvent = () => {\n this.sixTileSelected.emit();\n };\n}\n\nconst closeIconSize = (size: string) => {\n return {\n small: 'xxSmall',\n medium: 'medium',\n large: 'medium',\n }[size] as 'xSmall' | 'medium';\n};\n\nconst iconSize = (size: string) => {\n return {\n small: 'xLarge',\n medium: 'xxLarge',\n large: 'xxxLarge',\n }[size] as 'xLarge' | 'xxLarge' | 'xxxLarge';\n};\n"],"mappings":"oGAAA,MAAMA,EAAa,soE,MCcNC,EAAO,M,0HAsDVC,KAAAC,iBAAmB,KACzBD,KAAKE,YAAcC,EAAQH,KAAKI,KAAM,QACtCJ,KAAKK,aAAeF,EAAQH,KAAKI,KAAM,SAEvC,GAAIJ,KAAKE,YAAa,CACpB,MAAMI,EAAOC,EAAQP,KAAKI,KAAM,QAChCE,IAAI,MAAJA,SAAI,SAAJA,EAAME,iBAAiB,QAASR,KAAKS,iB,CAGvC,GAAIT,KAAKK,aAAc,CACrB,MAAMC,EAAOC,EAAQP,KAAKI,KAAM,SAChCE,IAAI,MAAJA,SAAI,SAAJA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K,cAAgBc,EAAA,QAAMW,KAAK,Y,6BAiB7C,MAAMC,EAAiBJ,IACd,CACLQ,MAAO,UACPC,OAAQ,SACRC,MAAO,UACPV,IAGJ,MAAMO,EAAYP,IACT,CACLQ,MAAO,SACPC,OAAQ,UACRC,MAAO,YACPV,I"}
@@ -1,2 +1,2 @@
1
- import{r as t,h as s,H as n,g as o}from"./p-0beec94f.js";const e=":host{display:grid;grid-template-columns:repeat(var(--no-of-columns), 1fr);grid-column-gap:1rem}";const r=class{constructor(s){t(this,s);this.columns=undefined}handleColumnsChange(){if(typeof this.columns!=="number"||this.columns===0){this.columns=12}this.host.style.setProperty("--no-of-columns",String(this.columns))}componentWillLoad(){this.handleColumnsChange()}render(){return s(n,null,s("slot",null))}get host(){return o(this)}static get watchers(){return{columns:["handleColumnsChange"]}}};r.style=e;export{r as six_layout_grid};
2
- //# sourceMappingURL=p-cd35b3c6.entry.js.map
1
+ import{r as t,h as s,H as n,g as o}from"./p-ca63a6fa.js";const r=":host{display:grid;grid-template-columns:repeat(var(--no-of-columns), 1fr);grid-column-gap:1rem}";const e=class{constructor(s){t(this,s);this.columns=undefined}handleColumnsChange(){if(typeof this.columns!=="number"||this.columns===0){this.columns=12}this.host.style.setProperty("--no-of-columns",String(this.columns))}componentWillLoad(){this.handleColumnsChange()}render(){return s(n,null,s("slot",null))}get host(){return o(this)}static get watchers(){return{columns:["handleColumnsChange"]}}};e.style=r;export{e as six_layout_grid};
2
+ //# sourceMappingURL=p-adf5a4da.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,g as e}from"./p-0beec94f.js";const o=":host{display:block;overflow:hidden;height:inherit}.six-root{display:grid;grid-template:auto 1fr auto/auto 1fr auto;height:100%}.six-root__container--padded{padding:var(--six-spacing-xxx-large)}.six-root__left-sidebar{height:100%;overflow:scroll;grid-column:1/2}.six-root__right-sidebar{height:100%;overflow:scroll;grid-column:3/4}.six-root nav{overflow:hidden}header{grid-column:1/4;position:sticky;top:0;z-index:var(--six-z-index-header);margin-right:2px}main{height:100%;display:flex;flex-direction:column;justify-content:space-between;grid-column:2/3;overflow:auto}footer{grid-column:1/4}";const r=class{constructor(s){t(this,s);this.collapsedEvent=i(this,"six-root-collapsed",7);this.resizeObserver=new ResizeObserver((([t])=>{const{width:i}=t.contentRect;this.collapse=i<this.breakpoint}));this.breakpoint=1024;this.padded=true;this.stage=null;this.version="";this.collapse=false}handleCollapsed(t){this.collapsedEvent.emit({collapsed:t})}componentWillLoad(){this.resizeObserver.observe(this.host)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){return s("host",{class:"six-root"},s("header",{part:"header"},this.stage&&s("six-stage-indicator",{stage:this.stage},this.version),s("slot",{name:"header"})),s("nav",{class:"six-root__left-sidebar",part:"left-sidebar"},s("set-attributes",{value:{open:!this.collapse}},s("slot",{name:"left-sidebar"}))),s("main",{part:"main"},s("div",{class:{"six-root__container":true,"six-root__container--padded":this.padded},part:"container"},s("slot",{name:"main"})),s("div",{class:"six-root__footer"},s("slot",{name:"footer"}))),s("nav",{class:"six-root__right-sidebar",part:"right-sidebar"},s("slot",{name:"right-sidebar"})))}get host(){return e(this)}static get watchers(){return{collapse:["handleCollapsed"]}}};r.style=o;export{r as six_root};
2
- //# sourceMappingURL=p-9b1ff147.entry.js.map
1
+ import{r as t,c as i,h as s,g as e}from"./p-ca63a6fa.js";const o=":host{display:block;overflow:hidden;height:inherit}.six-root{display:grid;grid-template:auto 1fr auto/auto 1fr auto;height:100%}.six-root__container--padded{padding:var(--six-spacing-xxx-large)}.six-root__left-sidebar{height:100%;overflow:scroll;grid-column:1/2}.six-root__right-sidebar{height:100%;overflow:scroll;grid-column:3/4}.six-root nav{overflow:hidden}header{grid-column:1/4;position:sticky;top:0;z-index:var(--six-z-index-header);margin-right:2px}main{height:100%;display:flex;flex-direction:column;justify-content:space-between;grid-column:2/3;overflow:auto}footer{grid-column:1/4}";const r=class{constructor(s){t(this,s);this.collapsedEvent=i(this,"six-root-collapsed",7);this.resizeObserver=new ResizeObserver((([t])=>{const{width:i}=t.contentRect;this.collapse=i<this.breakpoint}));this.breakpoint=1024;this.padded=true;this.stage=null;this.version="";this.collapse=false}handleCollapsed(t){this.collapsedEvent.emit({collapsed:t})}componentWillLoad(){this.resizeObserver.observe(this.host)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){return s("host",{class:"six-root"},s("header",{part:"header"},this.stage&&s("six-stage-indicator",{stage:this.stage},this.version),s("slot",{name:"header"})),s("nav",{class:"six-root__left-sidebar",part:"left-sidebar"},s("set-attributes",{value:{open:!this.collapse}},s("slot",{name:"left-sidebar"}))),s("main",{part:"main"},s("div",{class:{"six-root__container":true,"six-root__container--padded":this.padded},part:"container"},s("slot",{name:"main"})),s("div",{class:"six-root__footer"},s("slot",{name:"footer"}))),s("nav",{class:"six-root__right-sidebar",part:"right-sidebar"},s("slot",{name:"right-sidebar"})))}get host(){return e(this)}static get watchers(){return{collapse:["handleCollapsed"]}}};r.style=o;export{r as six_root};
2
+ //# sourceMappingURL=p-b5f844f7.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixRootCss","SixRoot","this","resizeObserver","ResizeObserver","host","width","contentRect","collapse","breakpoint","handleCollapsed","collapsed","collapsedEvent","emit","componentWillLoad","observe","disconnectedCallback","disconnect","render","h","class","part","stage","version","name","value","open","padded"],"sources":["src/components/six-root/six-root.scss?tag=six-root&encapsulation=shadow","src/components/six-root/six-root.tsx"],"sourcesContent":["@import 'src/global/mixins/scrollbar';\n\n:host {\n display: block;\n overflow: hidden;\n height: inherit;\n}\n\n.six-root {\n display: grid;\n grid-template: auto 1fr auto / auto 1fr auto;\n height: 100%;\n\n &__container {\n &--padded {\n padding: var(--six-spacing-xxx-large);\n }\n }\n\n &__left-sidebar {\n height: 100%;\n overflow: scroll;\n grid-column: 1 / 2;\n }\n\n &__right-sidebar {\n height: 100%;\n overflow: scroll;\n grid-column: 3 / 4;\n }\n\n nav {\n overflow: hidden;\n }\n}\n\nheader {\n grid-column: 1 / 4;\n position: sticky;\n top: 0;\n z-index: var(--six-z-index-header);\n // border fix\n margin-right: 2px;\n}\n\nmain {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n grid-column: 2 / 3;\n overflow: auto;\n}\n\nfooter {\n grid-column: 1 / 4;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { StageType } from '../six-stage-indicator/six-stage-indicator';\n\nexport interface SixRootCollapsedPayload {\n collapsed: boolean;\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot header - Used to define the header component.\n * @slot main - Used to define the components in the main area.\n * @slot left-sidebar - Used to define the sidebar on the left side.\n * @slot right-sidebar - Used to define the sidebar on the right side.\n * @slot footer - Used to define the footer component.\n */\n\n@Component({\n tag: 'six-root',\n styleUrl: 'six-root.scss',\n shadow: true,\n})\nexport class SixRoot {\n @Element() host!: HTMLSixRootElement;\n\n /** Breakpoint for smaller screens when the right sidebar is collapsed by default. */\n @Prop() breakpoint = 1024;\n\n /** Defines whether the content section should be padded */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() padded = true;\n\n /** Defines the stage of the application*/\n @Prop() stage: StageType = null;\n\n /** Defines the version of the application*/\n @Prop() version = '';\n\n /** Emitted when display size is updated. */\n @Event({ eventName: 'six-root-collapsed' }) collapsedEvent!: EventEmitter<SixRootCollapsedPayload>;\n\n @State() collapse = false;\n\n private resizeObserver = new ResizeObserver(([host]) => {\n const { width } = host.contentRect;\n this.collapse = width < this.breakpoint;\n });\n\n @Watch('collapse')\n handleCollapsed(collapsed: boolean) {\n this.collapsedEvent.emit({ collapsed });\n }\n\n componentWillLoad() {\n this.resizeObserver.observe(this.host);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n render() {\n return (\n <host class=\"six-root\">\n <header part=\"header\">\n {this.stage && <six-stage-indicator stage={this.stage}>{this.version}</six-stage-indicator>}\n <slot name=\"header\" />\n </header>\n <nav class=\"six-root__left-sidebar\" part=\"left-sidebar\">\n <set-attributes value={{ open: !this.collapse }}>\n <slot name=\"left-sidebar\" />\n </set-attributes>\n </nav>\n <main part=\"main\">\n <div class={{ 'six-root__container': true, 'six-root__container--padded': this.padded }} part=\"container\">\n <slot name=\"main\" />\n </div>\n <div class=\"six-root__footer\">\n <slot name=\"footer\" />\n </div>\n </main>\n <nav class=\"six-root__right-sidebar\" part=\"right-sidebar\">\n <slot name=\"right-sidebar\" />\n </nav>\n </host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAa,mlB,MCuBNC,EAAO,M,4EAqBVC,KAAAC,eAAiB,IAAIC,gBAAe,EAAEC,MAC5C,MAAMC,MAAEA,GAAUD,EAAKE,YACvBL,KAAKM,SAAWF,EAAQJ,KAAKO,UAAU,I,gBAnBpB,K,YAIJ,K,WAGU,K,aAGT,G,cAKE,K,CAQpB,eAAAC,CAAgBC,GACdT,KAAKU,eAAeC,KAAK,CAAEF,a,CAG7B,iBAAAG,GACEZ,KAAKC,eAAeY,QAAQb,KAAKG,K,CAGnC,oBAAAW,GACEd,KAAKC,eAAec,Y,CAGtB,MAAAC,GACE,OACEC,EAAA,QAAMC,MAAM,YACVD,EAAA,UAAQE,KAAK,UACVnB,KAAKoB,OAASH,EAAA,uBAAqBG,MAAOpB,KAAKoB,OAAQpB,KAAKqB,SAC7DJ,EAAA,QAAMK,KAAK,YAEbL,EAAA,OAAKC,MAAM,yBAAyBC,KAAK,gBACvCF,EAAA,kBAAgBM,MAAO,CAAEC,MAAOxB,KAAKM,WACnCW,EAAA,QAAMK,KAAK,mBAGfL,EAAA,QAAME,KAAK,QACTF,EAAA,OAAKC,MAAO,CAAE,sBAAuB,KAAM,8BAA+BlB,KAAKyB,QAAUN,KAAK,aAC5FF,EAAA,QAAMK,KAAK,UAEbL,EAAA,OAAKC,MAAM,oBACTD,EAAA,QAAMK,KAAK,aAGfL,EAAA,OAAKC,MAAM,0BAA0BC,KAAK,iBACxCF,EAAA,QAAMK,KAAK,mB"}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as o,h as t,g as i}from"./p-ca63a6fa.js";import{F as s}from"./p-67496e8c.js";import{h as r,a as l}from"./p-0cebf1d2.js";import{E as n}from"./p-8bfb4bfc.js";const c=':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{display:inline-block}.checkbox{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}.checkbox--focused .checkbox__control{outline:var(--six-focus-ring);outline-offset:0}.checkbox__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size);border:solid var(--six-border-width) var(--six-input-border-color);border-radius:0;background-color:var(--six-input-background-color);color:var(--six-checkbox-color);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow}.checkbox__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.checkbox__control .checkbox__icon{display:inline-flex;width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size)}.checkbox__control .checkbox__icon svg{width:100%;height:100%}.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--six-input-border-color-hover)}.checkbox--checked .checkbox__control,.checkbox--indeterminate .checkbox__control{border-color:var(--six-selection-control-color);background-color:var(--six-selection-control-color)}.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--six-input-border-color-focus);background-color:var(--six-input-border-color-focus)}.checkbox--disabled{cursor:not-allowed;color:var(--six-input-color-disabled)}.checkbox--disabled .checkbox__control{border-color:var(--six-input-border-color-disabled)}.checkbox--disabled.checkbox--checked .checkbox__control,.checkbox--disabled.checkbox--indeterminate .checkbox__control{background-color:var(--six-selection-control-color-disabled)}.checkbox--invalid:not(.checkbox--disabled) .checkbox__control{border-color:var(--six-input-border-color-danger)}.checkbox__text{line-height:var(--six-selection-control-toggle-size);margin-left:0.5em;user-select:none}';let a=0;const h=class{constructor(t){e(this,t);this.sixBlur=o(this,"six-checkbox-blur",7);this.sixChange=o(this,"six-checkbox-change",7);this.sixFocus=o(this,"six-checkbox-focus",7);this.inputId=`checkbox-${++a}`;this.labelId=`checkbox-label-${a}`;this.textId=`checkbox-text-${a}`;this.errorTextId=`input-error-text-${a}`;this.eventListeners=new n;this.handleChange=()=>{if(this.nativeInput!=null){this.checked=this.nativeInput.checked;this.indeterminate=false;this.sixChange.emit()}};this.handleBlur=()=>{this.hasFocus=false;this.sixBlur.emit()};this.handleFocus=()=>{this.hasFocus=true;this.sixFocus.emit()};this.handleMouseDown=e=>{var o;e.preventDefault();(o=this.nativeInput)===null||o===void 0?void 0:o.focus()};this.hasFocus=false;this.hasLabelSlot=false;this.hasErrorSlot=false;this.name="";this.value="on";this.disabled=false;this.required=false;this.label="";this.errorText="";this.errorTextCount=undefined;this.invalid=false;this.checked=false;this.indeterminate=false}handleCheckedChange(){if(this.nativeInput==null)return;this.nativeInput.checked=this.checked;this.checked=this.nativeInput.checked;this.nativeInput.indeterminate=this.indeterminate}handleLabelChange(){this.handleSlotChange()}connectedCallback(){var e;(e=this.host.shadowRoot)===null||e===void 0?void 0:e.addEventListener("slotchange",this.handleSlotChange);this.eventListeners.forward("six-checkbox-change","change",this.host);this.eventListeners.forward("six-checkbox-blur","blur",this.host);this.eventListeners.forward("six-checkbox-focus","focus",this.host)}disconnectedCallback(){var e;(e=this.host.shadowRoot)===null||e===void 0?void 0:e.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){const e=this.nativeInput;if(e==null){return}e.indeterminate=this.indeterminate}async setFocus(e){var o;(o=this.nativeInput)===null||o===void 0?void 0:o.focus(e)}async removeFocus(){var e;(e=this.nativeInput)===null||e===void 0?void 0:e.blur()}handleSlotChange(){this.hasLabelSlot=r(this.host,"label");this.hasErrorSlot=r(this.host,"error-text")}render(){return t(s,{inputId:this.inputId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,errorTextId:this.errorTextId,hasErrorTextSlot:this.hasErrorSlot,errorText:this.errorText,errorTextCount:this.errorTextCount,size:"medium",disabled:this.disabled,required:this.required,displayError:this.invalid},t("label",{part:"base",class:{checkbox:true,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--invalid":this.invalid,"checkbox--indeterminate":this.indeterminate},htmlFor:this.inputId,onMouseDown:this.handleMouseDown},t("span",{part:"control",class:"checkbox__control"},this.checked&&t("span",{part:"checked-icon",class:"checkbox__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"round"},t("g",{stroke:"currentColor","stroke-width":"2"},t("g",{transform:"translate(3.428571, 3.428571)"},t("path",{d:"M0,5.71428571 L3.42857143,9.14285714"}),t("path",{d:"M9.14285714,0 L3.42857143,9.14285714"})))))),!this.checked&&this.indeterminate&&t("span",{part:"indeterminate-icon",class:"checkbox__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"round"},t("g",{stroke:"currentColor","stroke-width":"2"},t("g",{transform:"translate(2.285714, 6.857143)"},t("path",{d:"M10.2857143,1.14285714 L1.14285714,1.14285714"})))))),t("input",{ref:e=>this.nativeInput=e,id:this.inputId,type:"checkbox",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,role:"checkbox","aria-checked":this.checked?"true":"false","aria-labelledby":this.labelId,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus})),t("span",{part:"text",id:this.textId,class:"checkbox__text"},t("slot",null))))}get host(){return i(this)}static get watchers(){return{checked:["handleCheckedChange"],indeterminate:["handleCheckedChange"],errorText:["handleLabelChange"],label:["handleLabelChange"]}}};h.style=c;const x=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}:focus{outline:none}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);text-align:left;color:var(--six-input-color);border-radius:var(--six-border-radius-medium);padding:var(--six-spacing-x-small) var(--six-spacing-medium);transition:var(--six-transition-fast) fill;user-select:none;white-space:nowrap;cursor:pointer}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--active:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto;align-self:center}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(:last-child){margin-right:0.5em}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(:first-child){margin-left:0.5em}.menu-item .menu-item__check{flex:0 0 auto;display:flex;align-items:center;margin-left:var(--six-spacing-small);visibility:hidden;font-size:inherit}.menu-item .menu-item__checkbox{margin-top:-1px}.menu-item--checked .menu-item__check{visibility:visible}";const d=class{constructor(o){e(this,o);this.handleCheckboxChange=()=>{this.host.dispatchEvent(new Event("click",{bubbles:true,cancelable:true}))};this.hasFocus=false;this.active=false;this.checkType="check";this.checked=false;this.value="";this.disabled=false}connectedCallback(){this.handleBlur=this.handleBlur.bind(this);this.handleFocus=this.handleFocus.bind(this);this.handleMouseEnter=this.handleMouseEnter.bind(this);this.handleMouseLeave=this.handleMouseLeave.bind(this);this.handleCheckboxChange=this.handleCheckboxChange.bind(this)}async setFocus(e){var o;(o=this.menuItem)===null||o===void 0?void 0:o.focus(e)}async removeFocus(){var e;(e=this.menuItem)===null||e===void 0?void 0:e.blur()}getTextLabel(){return Promise.resolve(l(this.defaultSlot))}handleBlur(){this.hasFocus=false}handleFocus(){this.hasFocus=true}handleMouseEnter(){this.active=true}handleMouseLeave(){this.active=false;this.hasFocus=false}render(){return t("div",{ref:e=>this.menuItem=e,part:"base",class:{"menu-item":true,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--focused":this.hasFocus,"menu-item--active":this.active},role:"menuitem","aria-disabled":this.disabled?"true":"false","aria-checked":this.checked?"true":"false",tabIndex:!this.disabled?0:undefined,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.checkType==="checkbox"&&t("span",{class:"menu-item__checkbox"},t("six-checkbox",{"onSix-checkbox-change":this.handleCheckboxChange,disabled:this.disabled,checked:this.checked})),t("span",{part:"prefix",class:"menu-item__prefix"},t("slot",{name:"prefix"})),t("span",{part:"label",class:"menu-item__label"},t("slot",{ref:e=>this.defaultSlot=e})),t("span",{part:"suffix",class:"menu-item__suffix"},t("slot",{name:"suffix"})),this.checkType==="check"&&t("span",{part:"checked-icon",class:"menu-item__check"},t("six-icon",{size:"small","aria-hidden":"true"},"check")))}get host(){return i(this)}};d.style=x;export{h as six_checkbox,d as six_menu_item};
2
+ //# sourceMappingURL=p-b8ea574b.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixCheckboxCss","id","SixCheckbox","this","inputId","labelId","textId","errorTextId","eventListeners","EventListeners","handleChange","nativeInput","checked","indeterminate","sixChange","emit","handleBlur","hasFocus","sixBlur","handleFocus","sixFocus","handleMouseDown","event","preventDefault","_a","focus","handleCheckedChange","handleLabelChange","handleSlotChange","connectedCallback","host","shadowRoot","addEventListener","forward","disconnectedCallback","removeEventListener","removeAll","componentWillLoad","componentDidLoad","setFocus","options","removeFocus","blur","hasLabelSlot","hasSlot","hasErrorSlot","render","h","FormControl","label","hasErrorTextSlot","errorText","errorTextCount","size","disabled","required","displayError","invalid","part","class","checkbox","htmlFor","onMouseDown","viewBox","stroke","fill","transform","d","ref","el","type","name","value","role","onChange","onBlur","onFocus","sixMenuItemCss","SixMenuItem","handleCheckboxChange","dispatchEvent","Event","bubbles","cancelable","bind","handleMouseEnter","handleMouseLeave","menuItem","getTextLabel","Promise","resolve","getTextContent","defaultSlot","active","tabIndex","undefined","onMouseEnter","onMouseLeave","checkType"],"sources":["src/components/six-checkbox/six-checkbox.scss?tag=six-checkbox&encapsulation=shadow","src/components/six-checkbox/six-checkbox.tsx","src/components/six-menu-item/six-menu-item.scss?tag=six-menu-item&encapsulation=shadow","src/components/six-menu-item/six-menu-item.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n display: inline-block;\n}\n\n.checkbox {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.checkbox--focused {\n .checkbox__control {\n outline: var(--six-focus-ring);\n outline-offset: 0;\n }\n}\n\n.checkbox__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--six-selection-control-toggle-size);\n height: var(--six-selection-control-toggle-size);\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: 0;\n background-color: var(--six-input-background-color);\n color: var(--six-checkbox-color);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color,\n var(--six-transition-fast) color, var(--six-transition-fast) box-shadow;\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n .checkbox__icon {\n display: inline-flex;\n width: var(--six-selection-control-toggle-size);\n height: var(--six-selection-control-toggle-size);\n\n svg {\n width: 100%;\n height: 100%;\n }\n }\n}\n\n// Hover\n.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover {\n border-color: var(--six-input-border-color-hover);\n}\n\n// Checked/indeterminate\n.checkbox--checked .checkbox__control,\n.checkbox--indeterminate .checkbox__control {\n border-color: var(--six-selection-control-color);\n background-color: var(--six-selection-control-color);\n}\n\n// Checked/indeterminate + hover\n.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover {\n border-color: var(--six-input-border-color-focus);\n background-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.checkbox--disabled {\n cursor: not-allowed;\n color: var(--six-input-color-disabled);\n\n .checkbox__control {\n border-color: var(--six-input-border-color-disabled);\n }\n\n &.checkbox--checked .checkbox__control,\n &.checkbox--indeterminate .checkbox__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n}\n\n// Invalid\n.checkbox--invalid:not(.checkbox--disabled) {\n .checkbox__control {\n border-color: var(--six-input-border-color-danger);\n }\n}\n\n.checkbox__text {\n line-height: var(--six-selection-control-toggle-size);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\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 label - The checkbox label.\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 control - The checkbox control.\n * @part checked-icon - The container the wraps the checked icon.\n * @part indeterminate-icon - The container that wraps the indeterminate icon.\n * @part text - The checkbox text rendered to the right.\n */\n\n@Component({\n tag: 'six-checkbox',\n styleUrl: 'six-checkbox.scss',\n shadow: true,\n})\nexport class SixCheckbox {\n private inputId = `checkbox-${++id}`;\n private labelId = `checkbox-label-${id}`;\n private textId = `checkbox-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeInput?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixCheckboxElement;\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasErrorSlot = false;\n\n /** The checkbox's name attribute. */\n @Prop() name = '';\n\n /**\n * The value of the checkbox does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a checkbox is analogous to the value of an `<input type=\"checkbox\">`,\n * it's only used when the checkbox participates in a native `<form>`.\n */\n @Prop() value = 'on';\n\n /** Set to true to disable the checkbox. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = 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 true to draw the checkbox in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** Set to true to draw the checkbox in an indeterminate state. */\n @Prop({ mutable: true, reflect: true }) indeterminate = false;\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-checkbox-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-checkbox-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-checkbox-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('checked')\n @Watch('indeterminate')\n handleCheckedChange() {\n if (this.nativeInput == null) return;\n\n this.nativeInput.checked = this.checked;\n this.checked = this.nativeInput.checked;\n this.nativeInput.indeterminate = this.indeterminate;\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-checkbox-change', 'change', this.host);\n this.eventListeners.forward('six-checkbox-blur', 'blur', this.host);\n this.eventListeners.forward('six-checkbox-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n const nativeInput = this.nativeInput;\n if (nativeInput == null) {\n return;\n }\n\n nativeInput.indeterminate = this.indeterminate;\n }\n\n /** Sets focus on the checkbox. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeInput?.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n @Method()\n async removeFocus() {\n this.nativeInput?.blur();\n }\n\n private handleChange = () => {\n if (this.nativeInput != null) {\n this.checked = this.nativeInput.checked;\n this.indeterminate = false;\n this.sixChange.emit();\n }\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 handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.nativeInput?.focus();\n };\n\n private handleSlotChange() {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasErrorSlot = hasSlot(this.host, 'error-text');\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n errorTextId={this.errorTextId}\n hasErrorTextSlot={this.hasErrorSlot}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n class={{\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--invalid': this.invalid,\n 'checkbox--indeterminate': this.indeterminate,\n }}\n htmlFor={this.inputId}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"checkbox__control\">\n {this.checked && (\n <span part=\"checked-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n )}\n\n {!this.checked && this.indeterminate && (\n <span part=\"indeterminate-icon\" class=\"checkbox__icon\">\n <svg viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(2.285714, 6.857143)\">\n <path d=\"M10.2857143,1.14285714 L1.14285714,1.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n </span>\n )}\n\n <input\n ref={(el) => (this.nativeInput = el)}\n id={this.inputId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"checkbox\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n />\n </span>\n\n <span part=\"text\" id={this.textId} class=\"checkbox__text\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n:focus {\n outline: none;\n}\n\n.menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n text-align: left;\n color: var(--six-input-color);\n border-radius: var(--six-border-radius-medium);\n padding: var(--six-spacing-x-small) var(--six-spacing-medium);\n transition: var(--six-transition-fast) fill;\n user-select: none;\n white-space: nowrap;\n cursor: pointer;\n\n &.menu-item--focused:not(.menu-item--disabled) {\n outline: none;\n background-color: var(--six-menu-item-background-color);\n }\n\n &.menu-item--active:not(.menu-item--disabled) {\n outline: none;\n background-color: var(--six-menu-item-background-color);\n }\n\n &.menu-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n .menu-item__label {\n flex: 1 1 auto;\n align-self: center;\n }\n\n .menu-item__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:last-child) {\n margin-right: 0.5em;\n }\n }\n\n .menu-item__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:first-child) {\n margin-left: 0.5em;\n }\n }\n\n .menu-item__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: var(--six-spacing-small);\n visibility: hidden;\n font-size: inherit;\n }\n\n .menu-item__checkbox {\n margin-top: -1px;\n }\n}\n\n.menu-item--checked .menu-item__check {\n visibility: visible;\n}\n","import { Component, Element, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu item's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @part base - The component's base wrapper.\n * @part checked-icon - The container that wraps the checked icon.\n * @part prefix - The prefix container.\n * @part label - The menu item label.\n * @part suffix - The suffix container.\n */\n\n@Component({\n tag: 'six-menu-item',\n styleUrl: 'six-menu-item.scss',\n shadow: true,\n})\nexport class SixMenuItem {\n private menuItem?: HTMLElement;\n private defaultSlot?: HTMLSlotElement;\n\n @Element() host!: HTMLSixMenuItemElement;\n\n @State() hasFocus = false;\n\n @State() active = false;\n\n /** Defines if the checked state is displayed as a checkbox or a check-icon */\n @Prop() checkType: 'checkbox' | 'check' = 'check';\n\n /** Internal: Draws the item in a checked state. CheckType needs to be set to 'checkbox' or 'check' to show the\n * checked state */\n @Prop({ reflect: true }) checked = false;\n\n /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the menu item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.handleCheckboxChange = this.handleCheckboxChange.bind(this);\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.menuItem?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.menuItem?.blur();\n }\n\n /** Returns a text label based on the contents of the menu item's default slot. */\n @Method()\n getTextLabel() {\n return Promise.resolve(getTextContent(this.defaultSlot));\n }\n\n private handleBlur() {\n this.hasFocus = false;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n }\n\n private handleMouseEnter() {\n this.active = true;\n }\n\n private handleMouseLeave() {\n this.active = false;\n this.hasFocus = false;\n }\n\n private handleCheckboxChange = () => {\n this.host.dispatchEvent(new Event('click', { bubbles: true, cancelable: true }));\n };\n\n render() {\n return (\n <div\n ref={(el) => (this.menuItem = el)}\n part=\"base\"\n class={{\n 'menu-item': true,\n 'menu-item--checked': this.checked,\n 'menu-item--disabled': this.disabled,\n 'menu-item--focused': this.hasFocus,\n 'menu-item--active': this.active,\n }}\n role=\"menuitem\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-checked={this.checked ? 'true' : 'false'}\n tabIndex={!this.disabled ? 0 : undefined}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n {this.checkType === 'checkbox' && (\n <span class=\"menu-item__checkbox\">\n <six-checkbox\n onSix-checkbox-change={this.handleCheckboxChange}\n disabled={this.disabled}\n checked={this.checked}\n ></six-checkbox>\n </span>\n )}\n\n <span part=\"prefix\" class=\"menu-item__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <span part=\"label\" class=\"menu-item__label\">\n <slot ref={(el) => (this.defaultSlot = el as HTMLSlotElement)} />\n </span>\n\n <span part=\"suffix\" class=\"menu-item__suffix\">\n <slot name=\"suffix\" />\n </span>\n\n {this.checkType === 'check' && (\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <six-icon size=\"small\" aria-hidden=\"true\">\n check\n </six-icon>\n </span>\n )}\n </div>\n );\n }\n}\n"],"mappings":"4KAAA,MAAMA,EAAiB,wwJCMvB,IAAIC,EAAK,E,MAuBIC,EAAW,M,gKACdC,KAAAC,QAAU,cAAcH,IACxBE,KAAAE,QAAU,kBAAkBJ,IAC5BE,KAAAG,OAAS,iBAAiBL,IAC1BE,KAAAI,YAAc,oBAAoBN,IAElCE,KAAAK,eAAiB,IAAIC,EA0GrBN,KAAAO,aAAe,KACrB,GAAIP,KAAKQ,aAAe,KAAM,CAC5BR,KAAKS,QAAUT,KAAKQ,YAAYC,QAChCT,KAAKU,cAAgB,MACrBV,KAAKW,UAAUC,M,GAIXZ,KAAAa,WAAa,KACnBb,KAAKc,SAAW,MAChBd,KAAKe,QAAQH,MAAM,EAGbZ,KAAAgB,YAAc,KACpBhB,KAAKc,SAAW,KAChBd,KAAKiB,SAASL,MAAM,EAGdZ,KAAAkB,gBAAmBC,I,MAEzBA,EAAMC,kBACNC,EAAArB,KAAKQ,eAAW,MAAAa,SAAA,SAAAA,EAAEC,OAAO,E,cA3HP,M,kBACI,M,kBACA,M,UAGT,G,WASC,K,cAGG,M,cAGA,M,WAGH,G,eAGuB,G,2CAMJ,M,aAGe,M,mBAGM,K,CAaxD,mBAAAC,GACE,GAAIvB,KAAKQ,aAAe,KAAM,OAE9BR,KAAKQ,YAAYC,QAAUT,KAAKS,QACh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ACjCnD,KAAKS,QAAU,OAAS,QACtCkF,UAAW3F,KAAKmD,SAAW,EAAIyC,UAC/BnB,QAASzE,KAAKgB,YACdwD,OAAQxE,KAAKa,WACbgF,aAAc7F,KAAKkF,iBACnBY,aAAc9F,KAAKmF,kBAElBnF,KAAK+F,YAAc,YAClBnD,EAAA,QAAMY,MAAM,uBACVZ,EAAA,wCACyB5C,KAAK4E,qBAC5BzB,SAAUnD,KAAKmD,SACf1C,QAAST,KAAKS,WAKpBmC,EAAA,QAAMW,KAAK,SAASC,MAAM,qBACxBZ,EAAA,QAAMwB,KAAK,YAGbxB,EAAA,QAAMW,KAAK,QAAQC,MAAM,oBACvBZ,EAAA,QAAMqB,IAAMC,GAAQlE,KAAKyF,YAAcvB,KAGzCtB,EAAA,QAAMW,KAAK,SAASC,MAAM,qBACxBZ,EAAA,QAAMwB,KAAK,YAGZpE,KAAK+F,YAAc,SAClBnD,EAAA,QAAMW,KAAK,eAAeC,MAAM,oBAC9BZ,EAAA,YAAUM,KAAK,QAAO,cAAa,QAAM,U"}
@@ -0,0 +1,3 @@
1
+ const e="ui-library";const t={allRenderFn:true,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:false,cmpDidLoad:true,cmpDidRender:true,cmpDidUnload:false,cmpDidUpdate:true,cmpShouldUpdate:false,cmpWillLoad:true,cmpWillRender:false,cmpWillUpdate:false,connectedCallback:true,constructableCSS:true,cssAnnotations:true,devTools:false,disconnectedCallback:true,element:false,event:true,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:true,hostListenerTarget:true,hostListenerTargetBody:false,hostListenerTargetDocument:false,hostListenerTargetParent:false,hostListenerTargetWindow:true,hotModuleReplacement:false,hydrateClientSide:false,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:true,scoped:true,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:false,shadowDom:true,slot:true,slotChildNodesFix:false,slotRelocation:true,state:true,style:true,svg:true,taskQueue:true,transformTagName:false,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:false,watchCallback:true};let n;let s;let l;let o=false;let i=false;let c=false;let f=false;let r=false;const u=(e,t="")=>{{return()=>{}}};const a=(e,t)=>{{return()=>{}}};const d="{visibility:hidden}.hydrated{visibility:inherit}";const v="slot-fb{display:contents}slot-fb[hidden]{display:none}";const p={};const m="http://www.w3.org/2000/svg";const h="http://www.w3.org/1999/xhtml";const y=e=>e!=null;const b=e=>{e=typeof e;return e==="object"||e==="function"};function g(e){var t,n,s;return(s=(n=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const $=(e,t,...n)=>{let s=null;let l=null;let o=null;let i=false;let c=false;const f=[];const r=t=>{for(let n=0;n<t.length;n++){s=t[n];if(Array.isArray(s)){r(s)}else if(s!=null&&typeof s!=="boolean"){if(i=typeof e!=="function"&&!b(s)){s=String(s)}if(i&&c){f[f.length-1].t+=s}else{f.push(i?w(null,s):s)}c=i}}};r(n);if(t){if(t.key){l=t.key}if(t.name){o=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,f,C)}const u=w(e,null);u.l=t;if(f.length>0){u.o=f}{u.i=l}{u.u=o}return u};const w=(e,t)=>{const n={v:0,p:e,t,m:null,o:null};{n.l=null}{n.i=null}{n.u=null}return n};const S={};const k=e=>e&&e.p===S;const C={forEach:(e,t)=>e.map(j).forEach(t),map:(e,t)=>e.map(j).map(t).map(O)};const j=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.p,vtext:e.t});const O=e=>{if(typeof e.vtag==="function"){const t=Object.assign({},e.vattrs);if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return $(e.vtag,t,...e.vchildren||[])}const t=w(e.vtag,e.vtext);t.l=e.vattrs;t.o=e.vchildren;t.i=e.vkey;t.u=e.vname;return t};const T=(e,t)=>{if(e!=null&&!b(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};const x=e=>Re(e).$hostElement$;const L=(e,t,n)=>{const s=x(e);return{emit:e=>R(s,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:e})}};const R=(e,t,n)=>{const s=ze.ce(t,n);e.dispatchEvent(s);return s};const D=new WeakMap;const F=(e,t,n)=>{let s=Ue.get(e);if(He&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=t}else{s.replaceSync(t)}}else{s=t}Ue.set(e,s)};const M=(e,t,n)=>{var s;const l=N(t);const o=Ue.get(l);e=e.nodeType===11?e:Ee;if(o){if(typeof o==="string"){e=e.head||e;let n=D.get(e);let i;if(!n){D.set(e,n=new Set)}if(!n.has(l)){{i=Ee.createElement("style");i.innerHTML=o;const t=(s=ze.h)!==null&&s!==void 0?s:g(Ee);if(t!=null){i.setAttribute("nonce",t)}e.insertBefore(i,e.querySelector("link"))}if(t.v&4){i.innerHTML+=v}if(n){n.add(l)}}}else if(!e.adoptedStyleSheets.includes(o)){e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]}}return l};const A=e=>{const t=e.$;const n=e.$hostElement$;const s=t.v;const l=u("attachStyles",t.S);const o=M(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h");if(s&2){n.classList.add(o+"-s")}}l()};const N=(e,t)=>"sc-"+e.S;const P=(e,t,n,s,l,o)=>{if(n!==s){let i=Me(e,t);let c=t.toLowerCase();if(t==="class"){const t=e.classList;const l=W(n);const o=W(s);t.remove(...l.filter((e=>e&&!o.includes(e))));t.add(...o.filter((e=>e&&!l.includes(e))))}else if(t==="style"){{for(const t in n){if(!s||s[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in s){if(!n||s[t]!==n[t]){if(t.includes("-")){e.style.setProperty(t,s[t])}else{e.style[t]=s[t]}}}}else if(t==="key");else if(t==="ref"){if(s){s(e)}}else if(!i&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(Me(We,c)){t=c.slice(2)}else{t=c[2]+t.slice(3)}if(n||s){const l=t.endsWith(E);t=t.replace(z,"");if(n){ze.rel(e,t,n,l)}if(s){ze.ael(e,t,s,l)}}}else{const c=b(s);if((i||c&&s!==null)&&!l){try{if(!e.tagName.includes("-")){const l=s==null?"":s;if(t==="list"){i=false}else if(n==null||e[t]!=l){e[t]=l}}else{e[t]=s}}catch(e){}}if(s==null||s===false){if(s!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!i||o&4||l)&&!c){s=s===true?"":s;{e.setAttribute(t,s)}}}}};const U=/\s/;const W=e=>!e?[]:e.split(U);const E="Capture";const z=new RegExp(E+"$");const B=(e,t,n,s)=>{const l=t.m.nodeType===11&&t.m.host?t.m.host:t.m;const o=e&&e.l||p;const i=t.l||p;{for(s in o){if(!(s in i)){P(l,s,o[s],undefined,n,t.v)}}}for(s in i){P(l,s,o[s],i[s],n,t.v)}};const H=(e,t,i,r)=>{var u;const a=t.o[i];let d=0;let v;let p;let b;if(!o){c=true;if(a.p==="slot"){if(n){r.classList.add(n+"-s")}a.v|=a.o?2:1}}if(a.t!==null){v=a.m=Ee.createTextNode(a.t)}else if(a.v&1){v=a.m=Ee.createTextNode("")}else{if(!f){f=a.p==="svg"}v=a.m=Ee.createElementNS(f?m:h,a.v&2?"slot-fb":a.p);if(f&&a.p==="foreignObject"){f=false}{B(null,a,f)}if(y(n)&&v["s-si"]!==n){v.classList.add(v["s-si"]=n)}if(a.o){for(d=0;d<a.o.length;++d){p=H(e,a,d,v);if(p){v.appendChild(p)}}}{if(a.p==="svg"){f=false}else if(v.tagName==="foreignObject"){f=true}}}v["s-hn"]=l;{if(a.v&(2|1)){v["s-sr"]=true;v["s-fs"]=(u=a.l)===null||u===void 0?void 0:u.slot;v["s-cr"]=s;v["s-sn"]=a.u||"";b=e&&e.o&&e.o[i];if(b&&b.p===a.p&&e.m){{Q(e.m,false)}}}}return v};const Q=(e,t)=>{var n;ze.v|=1;const s=e.childNodes;for(let e=s.length-1;e>=0;e--){const o=s[e];if(o["s-hn"]!==l&&o["s-ol"]){_(o).insertBefore(o,X(o));o["s-ol"].remove();o["s-ol"]=undefined;o["s-sh"]=undefined;if(o.nodeType===1){o.setAttribute("slot",(n=o["s-sn"])!==null&&n!==void 0?n:"")}c=true}if(t){Q(o,t)}}ze.v&=~1};const q=(e,t,n,s,o,i)=>{let c=e["s-cr"]&&e["s-cr"].parentNode||e;let f;if(c.shadowRoot&&c.tagName===l){c=c.shadowRoot}for(;o<=i;++o){if(s[o]){f=H(null,n,o,e);if(f){s[o].m=f;c.insertBefore(f,X(t))}}}};const I=(e,t,n)=>{for(let s=t;s<=n;++s){const t=e[s];if(t){const e=t.m;te(t);if(e){{i=true;if(e["s-ol"]){e["s-ol"].remove()}else{Q(e,true)}}e.remove()}}}};const K=(e,t,n,s,l=false)=>{let o=0;let i=0;let c=0;let f=0;let r=t.length-1;let u=t[0];let a=t[r];let d=s.length-1;let v=s[0];let p=s[d];let m;let h;while(o<=r&&i<=d){if(u==null){u=t[++o]}else if(a==null){a=t[--r]}else if(v==null){v=s[++i]}else if(p==null){p=s[--d]}else if(V(u,v,l)){G(u,v,l);u=t[++o];v=s[++i]}else if(V(a,p,l)){G(a,p,l);a=t[--r];p=s[--d]}else if(V(u,p,l)){if(u.p==="slot"||p.p==="slot"){Q(u.m.parentNode,false)}G(u,p,l);e.insertBefore(u.m,a.m.nextSibling);u=t[++o];p=s[--d]}else if(V(a,v,l)){if(u.p==="slot"||p.p==="slot"){Q(a.m.parentNode,false)}G(a,v,l);e.insertBefore(a.m,u.m);a=t[--r];v=s[++i]}else{c=-1;{for(f=o;f<=r;++f){if(t[f]&&t[f].i!==null&&t[f].i===v.i){c=f;break}}}if(c>=0){h=t[c];if(h.p!==v.p){m=H(t&&t[i],n,c,e)}else{G(h,v,l);t[c]=undefined;m=h.m}v=s[++i]}else{m=H(t&&t[i],n,i,e);v=s[++i]}if(m){{_(u.m).insertBefore(m,X(u.m))}}}}if(o>r){q(e,s[d+1]==null?null:s[d+1].m,n,s,i,d)}else if(i>d){I(t,o,r)}};const V=(e,t,n=false)=>{if(e.p===t.p){if(e.p==="slot"){return e.u===t.u}if(!n){return e.i===t.i}return true}return false};const X=e=>e&&e["s-ol"]||e;const _=e=>(e["s-ol"]?e["s-ol"]:e).parentNode;const G=(e,t,n=false)=>{const s=t.m=e.m;const l=e.o;const o=t.o;const i=t.p;const c=t.t;let r;if(c===null){{f=i==="svg"?true:i==="foreignObject"?false:f}{if(i==="slot");else{B(e,t,f)}}if(l!==null&&o!==null){K(s,l,t,o,n)}else if(o!==null){if(e.t!==null){s.textContent=""}q(s,null,t,o,0,o.length-1)}else if(l!==null){I(l,0,l.length-1)}if(f&&i==="svg"){f=false}}else if(r=s["s-cr"]){r.parentNode.textContent=c}else if(e.t!==c){s.data=c}};const J=e=>{const t=e.childNodes;for(const e of t){if(e.nodeType===1){if(e["s-sr"]){const n=e["s-sn"];e.hidden=false;for(const s of t){if(s!==e){if(s["s-hn"]!==e["s-hn"]||n!==""){if(s.nodeType===1&&(n===s.getAttribute("slot")||n===s["s-sn"])){e.hidden=true;break}}else{if(s.nodeType===1||s.nodeType===3&&s.textContent.trim()!==""){e.hidden=true;break}}}}}J(e)}}};const Y=[];const Z=e=>{let n;let s;let l;for(const o of e.childNodes){if(o["s-sr"]&&(n=o["s-cr"])&&n.parentNode){s=n.parentNode.childNodes;const e=o["s-sn"];for(l=s.length-1;l>=0;l--){n=s[l];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==o["s-hn"]&&!t.experimentalSlotFixes){if(ee(n,e)){let t=Y.find((e=>e.k===n));i=true;n["s-sn"]=n["s-sn"]||e;if(t){t.k["s-sh"]=o["s-hn"];t.C=o}else{n["s-sh"]=o["s-hn"];Y.push({C:o,k:n})}if(n["s-sr"]){Y.map((e=>{if(ee(e.k,n["s-sn"])){t=Y.find((e=>e.k===n));if(t&&!e.C){e.C=t.C}}}))}}else if(!Y.some((e=>e.k===n))){Y.push({k:n})}}}}if(o.nodeType===1){Z(o)}}};const ee=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};const te=e=>{{e.l&&e.l.ref&&e.l.ref(null);e.o&&e.o.map(te)}};const ne=(e,t,f=false)=>{var r,u,a,d;const v=e.$hostElement$;const p=e.$;const m=e.j||w(null,null);const h=k(t)?t:$(null,null,t);l=v.tagName;if(p.O){h.l=h.l||{};p.O.map((([e,t])=>h.l[t]=v[e]))}if(f&&h.l){for(const e of Object.keys(h.l)){if(v.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){h.l[e]=v[e]}}}h.p=null;h.v|=4;e.j=h;h.m=m.m=v.shadowRoot||v;{n=v["s-sc"]}{s=v["s-cr"];o=(p.v&1)!==0;i=false}G(m,h,f);{ze.v|=1;if(c){Z(h.m);for(const e of Y){const t=e.k;if(!t["s-ol"]){const e=Ee.createTextNode("");e["s-nr"]=t;t.parentNode.insertBefore(t["s-ol"]=e,t)}}for(const e of Y){const t=e.k;const n=e.C;if(n){const e=n.parentNode;let s=n.nextSibling;{let n=(r=t["s-ol"])===null||r===void 0?void 0:r.previousSibling;while(n){let l=(u=n["s-nr"])!==null&&u!==void 0?u:null;if(l&&l["s-sn"]===t["s-sn"]&&e===l.parentNode){l=l.nextSibling;if(!l||!l["s-nr"]){s=l;break}}n=n.previousSibling}}if(!s&&e!==t.parentNode||t.nextSibling!==s){if(t!==s){if(!t["s-hn"]&&t["s-ol"]){t["s-hn"]=t["s-ol"].parentNode.nodeName}e.insertBefore(t,s);if(t.nodeType===1){t.hidden=(a=t["s-ih"])!==null&&a!==void 0?a:false}}}}else{if(t.nodeType===1){if(f){t["s-ih"]=(d=t.hidden)!==null&&d!==void 0?d:false}t.hidden=true}}}}if(i){J(h.m)}ze.v&=~1;Y.length=0}};const se=(e,t)=>{if(t&&!e.T&&t["s-p"]){t["s-p"].push(new Promise((t=>e.T=t)))}};const le=(e,t)=>{{e.v|=16}if(e.v&4){e.v|=512;return}se(e,e.L);const n=()=>oe(e,t);return _e(n)};const oe=(e,t)=>{const n=u("scheduleUpdate",e.$.S);const s=e.R;let l;if(t){{e.v|=256;if(e.D){e.D.map((([e,t])=>de(s,e,t)));e.D=undefined}}{l=de(s,"componentWillLoad")}}n();return ie(l,(()=>fe(e,s,t)))};const ie=(e,t)=>ce(e)?e.then(t):t();const ce=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";const fe=async(e,t,n)=>{var s;const l=e.$hostElement$;const o=u("update",e.$.S);const i=l["s-rc"];if(n){A(e)}const c=u("render",e.$.S);{re(e,t,l,n)}if(i){i.map((e=>e()));l["s-rc"]=undefined}c();o();{const t=(s=l["s-p"])!==null&&s!==void 0?s:[];const n=()=>ue(e);if(t.length===0){n()}else{Promise.all(t).then(n);e.v|=4;t.length=0}}};const re=(e,t,n,s)=>{try{t=t.render();{e.v&=~16}{e.v|=2}{{{ne(e,t,s)}}}}catch(t){Ae(t,e.$hostElement$)}return null};const ue=e=>{const t=e.$.S;const n=e.$hostElement$;const s=u("postUpdate",t);const l=e.R;const o=e.L;{de(l,"componentDidRender")}if(!(e.v&64)){e.v|=64;{ve(n)}{de(l,"componentDidLoad")}s();{e.F(n);if(!o){ae()}}}else{{de(l,"componentDidUpdate")}s()}{e.M(n)}{if(e.T){e.T();e.T=undefined}if(e.v&512){Xe((()=>le(e,false)))}e.v&=~(4|512)}};const ae=t=>{{ve(Ee.documentElement)}Xe((()=>R(We,"appload",{detail:{namespace:e}})))};const de=(e,t,n)=>{if(e&&e[t]){try{return e[t](n)}catch(e){Ae(e)}}return undefined};const ve=e=>e.classList.add("hydrated");const pe=(e,t)=>Re(e).A.get(t);const me=(e,t,n,s)=>{const l=Re(e);const o=l.$hostElement$;const i=l.A.get(t);const c=l.v;const f=l.R;n=T(n,s.N[t][0]);const r=Number.isNaN(i)&&Number.isNaN(n);const u=n!==i&&!r;if((!(c&8)||i===undefined)&&u){l.A.set(t,n);if(f){if(s.P&&c&128){const e=s.P[t];if(e){e.map((e=>{try{f[e](n,i,t)}catch(e){Ae(e,o)}}))}}if((c&(2|16))===2){le(l,false)}}}};const he=(e,t,n)=>{var s;const l=e.prototype;if(t.N){if(e.watchers){t.P=e.watchers}const o=Object.entries(t.N);o.map((([e,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,e,{get(){return pe(this,e)},set(n){me(this,e,n,t)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(l,e,{value(...t){var n;const s=Re(this);return(n=s===null||s===void 0?void 0:s.U)===null||n===void 0?void 0:n.then((()=>{var n;return(n=s.R)===null||n===void 0?void 0:n[e](...t)}))}})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(e,s,o){ze.jmp((()=>{var i;const c=n.get(e);if(this.hasOwnProperty(c)){o=this[c];delete this[c]}else if(l.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==o){return}else if(c==null){const n=Re(this);const l=n===null||n===void 0?void 0:n.v;if(l&&!(l&8)&&l&128&&o!==s){const l=n.R;const c=(i=t.P)===null||i===void 0?void 0:i[e];c===null||c===void 0?void 0:c.forEach((t=>{if(l[t]!=null){l[t].call(l,o,s,e)}}))}return}this[c]=o===null&&typeof this[c]==="boolean"?false:o}))};e.observedAttributes=Array.from(new Set([...Object.keys((s=t.P)!==null&&s!==void 0?s:{}),...o.filter((([e,t])=>t[0]&15)).map((([e,s])=>{var l;const o=s[1]||e;n.set(o,e);if(s[0]&512){(l=t.O)===null||l===void 0?void 0:l.push([e,o])}return o}))]))}}return e};const ye=async(e,t,n,s)=>{let l;if((t.v&32)===0){t.v|=32;{l=Pe(n);if(l.then){const e=a();l=await l;e()}if(!l.isProxied){{n.P=l.watchers}he(l,n,2);l.isProxied=true}const e=u("createInstance",n.S);{t.v|=8}try{new l(t)}catch(e){Ae(e)}{t.v&=~8}{t.v|=128}e();be(t.R)}if(l.style){let e=l.style;const t=N(n);if(!Ue.has(t)){const s=u("registerStyles",n.S);F(t,e,!!(n.v&1));s()}}}const o=t.L;const i=()=>le(t,true);if(o&&o["s-rc"]){o["s-rc"].push(i)}else{i()}};const be=e=>{{de(e,"connectedCallback")}};const ge=e=>{if((ze.v&1)===0){const t=Re(e);const n=t.$;const s=u("connectedCallback",n.S);if(!(t.v&1)){t.v|=1;{if(n.v&(4|8)){$e(e)}}{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){se(t,t.L=n);break}}}if(n.N){Object.entries(n.N).map((([t,[n]])=>{if(n&31&&e.hasOwnProperty(t)){const n=e[t];delete e[t];e[t]=n}}))}{ye(e,t,n)}}else{Ce(e,t,n.W);if(t===null||t===void 0?void 0:t.R){be(t.R)}else if(t===null||t===void 0?void 0:t.B){t.B.then((()=>be(t.R)))}}s()}};const $e=e=>{const t=e["s-cr"]=Ee.createComment("");t["s-cn"]=true;e.insertBefore(t,e.firstChild)};const we=e=>{{de(e,"disconnectedCallback")}};const Se=async e=>{if((ze.v&1)===0){const t=Re(e);{if(t.H){t.H.map((e=>e()));t.H=undefined}}if(t===null||t===void 0?void 0:t.R){we(t.R)}else if(t===null||t===void 0?void 0:t.B){t.B.then((()=>we(t.R)))}}};const ke=(e,t={})=>{var n;const s=u();const l=[];const o=t.exclude||[];const i=We.customElements;const c=Ee.head;const f=c.querySelector("meta[charset]");const r=Ee.createElement("style");const a=[];let p;let m=true;Object.assign(ze,t);ze.q=new URL(t.resourcesUrl||"./",Ee.baseURI).href;let h=false;e.map((e=>{e[1].map((t=>{var n;const s={v:t[0],S:t[1],N:t[2],W:t[3]};if(s.v&4){h=true}{s.N=t[2]}{s.W=t[3]}{s.O=[]}{s.P=(n=t[4])!==null&&n!==void 0?n:{}}const c=s.S;const f=class extends HTMLElement{constructor(e){super(e);e=this;Fe(e,s);if(s.v&1){{{e.attachShadow({mode:"open"})}}}}connectedCallback(){if(p){clearTimeout(p);p=null}if(m){a.push(this)}else{ze.jmp((()=>ge(this)))}}disconnectedCallback(){ze.jmp((()=>Se(this)))}componentOnReady(){return Re(this).B}};s.I=e[0];if(!o.includes(c)&&!i.get(c)){l.push(c);i.define(c,he(f,s,1))}}))}));if(h){r.innerHTML+=v}{r.innerHTML+=l+d}if(r.innerHTML.length){r.setAttribute("data-styles","");const e=(n=ze.h)!==null&&n!==void 0?n:g(Ee);if(e!=null){r.setAttribute("nonce",e)}c.insertBefore(r,f?f.nextSibling:c.firstChild)}m=false;if(a.length){a.map((e=>e.connectedCallback()))}else{{ze.jmp((()=>p=setTimeout(ae,30)))}}s()};const Ce=(e,t,n,s)=>{if(n){n.map((([n,s,l])=>{const o=Oe(e,n);const i=je(t,l);const c=Te(n);ze.ael(o,s,i,c);(t.H=t.H||[]).push((()=>ze.rel(o,s,i,c)))}))}};const je=(e,t)=>n=>{try{{if(e.v&256){e.R[t](n)}else{(e.D=e.D||[]).push([t,n])}}}catch(e){Ae(e)}};const Oe=(e,t)=>{if(t&8)return We;return e};const Te=e=>(e&2)!==0;const xe=e=>ze.h=e;const Le=new WeakMap;const Re=e=>Le.get(e);const De=(e,t)=>Le.set(t.R=e,t);const Fe=(e,t)=>{const n={v:0,$hostElement$:e,$:t,A:new Map};{n.U=new Promise((e=>n.M=e))}{n.B=new Promise((e=>n.F=e));e["s-p"]=[];e["s-rc"]=[]}Ce(e,n,t.W);return Le.set(e,n)};const Me=(e,t)=>t in e;const Ae=(e,t)=>(0,console.error)(e,t);const Ne=new Map;const Pe=(e,t,n)=>{const s=e.S.replace(/-/g,"_");const l=e.I;const o=Ne.get(l);if(o){return o[s]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((e=>{{Ne.set(l,e)}return e[s]}),Ae)};const Ue=new Map;const We=typeof window!=="undefined"?window:{};const Ee=We.document||{head:{}};const ze={v:0,q:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,s)=>e.addEventListener(t,n,s),rel:(e,t,n,s)=>e.removeEventListener(t,n,s),ce:(e,t)=>new CustomEvent(e,t)};const Be=e=>Promise.resolve(e);const He=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();const Qe=[];const qe=[];const Ie=(e,t)=>n=>{e.push(n);if(!r){r=true;if(t&&ze.v&4){Xe(Ve)}else{ze.raf(Ve)}}};const Ke=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){Ae(e)}}e.length=0};const Ve=()=>{Ke(Qe);{Ke(qe);if(r=Qe.length>0){ze.raf(Ve)}}};const Xe=e=>Be().then(e);const _e=Ie(qe,true);export{S as H,ke as b,L as c,x as g,$ as h,Be as p,De as r,xe as s};
3
+ //# sourceMappingURL=p-ca63a6fa.js.map