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

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 (1067) hide show
  1. package/dist/cjs/event-listeners-fdfe838c.js +61 -0
  2. package/dist/cjs/event-listeners-fdfe838c.js.map +1 -0
  3. package/dist/cjs/{execution-control-46f388e0.js → execution-control-b4707294.js} +6 -3
  4. package/dist/cjs/execution-control-b4707294.js.map +1 -0
  5. package/dist/cjs/{focus-visible-0b352c74.js → focus-visible-ae2470dd.js} +3 -3
  6. package/dist/cjs/focus-visible-ae2470dd.js.map +1 -0
  7. package/dist/cjs/form-2df8c5bb.js +20 -0
  8. package/dist/cjs/form-2df8c5bb.js.map +1 -0
  9. package/dist/cjs/{form-control-8e2ae807.js → form-control-d369af14.js} +10 -11
  10. package/dist/cjs/form-control-d369af14.js.map +1 -0
  11. package/dist/cjs/{index-b3257a77.js → index-900437fc.js} +186 -55
  12. package/dist/cjs/index-900437fc.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +94 -0
  14. package/dist/cjs/index.cjs.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +3 -12
  16. package/dist/cjs/loader.cjs.js.map +1 -1
  17. package/dist/cjs/{modal-48d42228.js → modal-d5f074c7.js} +4 -3
  18. package/dist/cjs/modal-d5f074c7.js.map +1 -0
  19. package/dist/cjs/{popover-f743f62b.js → popover-2df7e154.js} +39 -31
  20. package/dist/cjs/popover-2df7e154.js.map +1 -0
  21. package/dist/cjs/popup-f1d9910f.js +103 -0
  22. package/dist/cjs/popup-f1d9910f.js.map +1 -0
  23. package/dist/cjs/{scroll-76e6f5d7.js → scroll-03678de1.js} +1 -1
  24. package/dist/cjs/scroll-03678de1.js.map +1 -0
  25. package/dist/cjs/set-attributes_2.cjs.entry.js +4 -2
  26. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
  27. package/dist/cjs/six-alert.cjs.entry.js +18 -23
  28. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  29. package/dist/cjs/six-avatar.cjs.entry.js +5 -8
  30. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-badge.cjs.entry.js +2 -2
  32. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-button.cjs.entry.js +36 -34
  34. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-card.cjs.entry.js +1 -1
  36. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-checkbox.cjs.entry.js +50 -85
  38. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-datepicker.cjs.entry.js +155 -281
  40. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-details.cjs.entry.js +48 -47
  42. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-dialog.cjs.entry.js +37 -41
  44. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-drawer.cjs.entry.js +34 -38
  46. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  47. package/dist/cjs/{six-dropdown_3.cjs.entry.js → six-dropdown_2.cjs.entry.js} +216 -249
  48. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -0
  49. package/dist/cjs/six-error-page.cjs.entry.js +20 -22
  50. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-file-list-item.cjs.entry.js +2 -2
  52. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  54. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-file-upload.cjs.entry.js +21 -21
  56. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  58. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-group-label.cjs.entry.js +12 -11
  60. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-header.cjs.entry.js +66 -44
  62. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-icon-button.cjs.entry.js +4 -4
  64. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-icon.cjs.entry.js +1 -1
  66. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-input.cjs.entry.js +95 -128
  68. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-item-picker.cjs.entry.js +62 -81
  70. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-language-switcher.cjs.entry.js +2 -2
  72. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-layout-grid.cjs.entry.js +5 -3
  74. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  76. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  78. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-menu-item.cjs.entry.js +63 -0
  80. package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -0
  81. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  82. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  83. package/dist/cjs/six-picto.cjs.entry.js +5 -2
  84. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
  86. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-progress-ring.cjs.entry.js +4 -4
  88. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-radio.cjs.entry.js +63 -72
  90. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-range.cjs.entry.js +107 -106
  92. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-root.cjs.entry.js +2 -2
  94. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-search-field.cjs.entry.js +11 -6
  96. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  97. package/dist/cjs/six-select.cjs.entry.js +190 -223
  98. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  99. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +10 -6
  100. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
  102. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  103. package/dist/cjs/six-sidebar.cjs.entry.js +41 -20
  104. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  105. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  106. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  107. package/dist/cjs/six-switch.cjs.entry.js +58 -64
  108. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  109. package/dist/cjs/six-tab-group.cjs.entry.js +132 -114
  110. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  111. package/dist/cjs/six-tab-panel.cjs.entry.js +2 -2
  112. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  113. package/dist/cjs/six-tab.cjs.entry.js +5 -3
  114. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  115. package/dist/cjs/six-tag.cjs.entry.js +6 -9
  116. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  117. package/dist/cjs/six-textarea.cjs.entry.js +82 -108
  118. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  119. package/dist/cjs/six-tile.cjs.entry.js +14 -17
  120. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  121. package/dist/cjs/six-timepicker.cjs.entry.js +159 -215
  122. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  123. package/dist/cjs/six-tooltip.cjs.entry.js +54 -57
  124. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  125. package/dist/cjs/{slot-ad537f24.js → slot-6e6a400f.js} +11 -10
  126. package/dist/cjs/slot-6e6a400f.js.map +1 -0
  127. package/dist/cjs/{types-64878648.js → types-47199040.js} +1 -1
  128. package/dist/cjs/types-47199040.js.map +1 -0
  129. package/dist/cjs/ui-library.cjs.js +3 -6
  130. package/dist/cjs/ui-library.cjs.js.map +1 -1
  131. package/dist/collection/collection-manifest.json +54 -60
  132. package/dist/collection/components/six-alert/six-alert.js +32 -30
  133. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  134. package/dist/collection/components/six-alert/test/six-alert.spec.js +25 -0
  135. package/dist/collection/components/six-alert/test/six-alert.spec.js.map +1 -0
  136. package/dist/collection/components/six-avatar/six-avatar.js +5 -8
  137. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  138. package/dist/collection/components/six-avatar/test/six-avatar.spec.js +26 -0
  139. package/dist/collection/components/six-avatar/test/six-avatar.spec.js.map +1 -0
  140. package/dist/collection/components/six-badge/six-badge.js +2 -2
  141. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  142. package/dist/collection/components/six-badge/test/six-badge.spec.js +20 -0
  143. package/dist/collection/components/six-badge/test/six-badge.spec.js.map +1 -0
  144. package/dist/collection/components/six-button/six-button.js +56 -47
  145. package/dist/collection/components/six-button/six-button.js.map +1 -1
  146. package/dist/collection/components/six-button/test/six-button.spec.js +69 -0
  147. package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -0
  148. package/dist/collection/components/six-card/six-card.js +1 -1
  149. package/dist/collection/components/six-card/six-card.js.map +1 -1
  150. package/dist/collection/components/six-card/test/six-card.spec.js +18 -0
  151. package/dist/collection/components/six-card/test/six-card.spec.js.map +1 -0
  152. package/dist/collection/components/six-checkbox/six-checkbox.js +81 -194
  153. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  154. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js +79 -0
  155. package/dist/collection/components/six-checkbox/test/six-checkbox.spec.js.map +1 -0
  156. package/dist/collection/components/six-datepicker/components/day-selection.js +3 -3
  157. package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -1
  158. package/dist/collection/components/six-datepicker/components/month-selection.js +6 -5
  159. package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -1
  160. package/dist/collection/components/six-datepicker/components/year-selection.js +11 -8
  161. package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -1
  162. package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
  163. package/dist/collection/components/six-datepicker/six-datepicker.js +219 -395
  164. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  165. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js +26 -0
  166. package/dist/collection/components/six-datepicker/test/six-datepicker.spec.js.map +1 -0
  167. package/dist/collection/components/six-details/six-details.js +65 -58
  168. package/dist/collection/components/six-details/six-details.js.map +1 -1
  169. package/dist/collection/components/six-details/test/six-details.spec.js +36 -0
  170. package/dist/collection/components/six-details/test/six-details.spec.js.map +1 -0
  171. package/dist/collection/components/six-dialog/six-dialog.js +55 -51
  172. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  173. package/dist/collection/components/six-dialog/test/six-dialog.spec.js +34 -0
  174. package/dist/collection/components/six-dialog/test/six-dialog.spec.js.map +1 -0
  175. package/dist/collection/components/six-drawer/six-drawer.js +52 -48
  176. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  177. package/dist/collection/components/six-drawer/test/six-drawer.spec.js +34 -0
  178. package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -0
  179. package/dist/collection/components/six-dropdown/six-dropdown.js +215 -191
  180. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  181. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js +122 -0
  182. package/dist/collection/components/six-dropdown/test/six-dropdown.spec.js.map +1 -0
  183. package/dist/collection/components/six-error-page/six-error-page.js +26 -28
  184. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  185. package/dist/collection/components/six-error-page/test/six-error-page.spec.js +240 -0
  186. package/dist/collection/components/six-error-page/test/six-error-page.spec.js.map +1 -0
  187. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  188. package/dist/collection/components/six-file-list/test/six-file-list.spec.js +67 -0
  189. package/dist/collection/components/six-file-list/test/six-file-list.spec.js.map +1 -0
  190. package/dist/collection/components/six-file-list-item/six-file-list-item.js +8 -6
  191. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  192. package/dist/collection/components/six-file-list-item/test/six-file-list-item.spec.js +169 -0
  193. package/dist/collection/components/six-file-list-item/test/six-file-list-item.spec.js.map +1 -0
  194. package/dist/collection/components/six-file-upload/six-file-upload.js +37 -35
  195. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  196. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +103 -0
  197. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -0
  198. package/dist/collection/components/six-footer/six-footer.js +1 -1
  199. package/dist/collection/components/six-footer/test/six-footer.spec.js +21 -0
  200. package/dist/collection/components/six-footer/test/six-footer.spec.js.map +1 -0
  201. package/dist/collection/components/six-group-label/six-group-label.js +15 -13
  202. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  203. package/dist/collection/components/six-group-label/test/six-group-label.spec.js +43 -0
  204. package/dist/collection/components/six-group-label/test/six-group-label.spec.js.map +1 -0
  205. package/dist/collection/components/six-header/six-header.js +82 -52
  206. package/dist/collection/components/six-header/six-header.js.map +1 -1
  207. package/dist/collection/components/six-header/test/six-header.spec.js +133 -0
  208. package/dist/collection/components/six-header/test/six-header.spec.js.map +1 -0
  209. package/dist/collection/components/six-icon/six-icon.js +1 -1
  210. package/dist/collection/components/six-icon/test/six-icon.spec.js +20 -0
  211. package/dist/collection/components/six-icon/test/six-icon.spec.js.map +1 -0
  212. package/dist/collection/components/six-icon-button/six-icon-button.js +10 -10
  213. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  214. package/dist/collection/components/six-icon-button/test/six-icon-button.spec.js +23 -0
  215. package/dist/collection/components/six-icon-button/test/six-icon-button.spec.js.map +1 -0
  216. package/dist/collection/components/six-input/six-input.css +1 -1
  217. package/dist/collection/components/six-input/six-input.js +189 -362
  218. package/dist/collection/components/six-input/six-input.js.map +1 -1
  219. package/dist/collection/components/six-input/test/six-input.spec.js +37 -0
  220. package/dist/collection/components/six-input/test/six-input.spec.js.map +1 -0
  221. package/dist/collection/components/six-item-picker/six-item-picker.js +79 -94
  222. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  223. package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js +90 -0
  224. package/dist/collection/components/six-item-picker/test/six-item-picker.spec.js.map +1 -0
  225. package/dist/collection/components/six-language-switcher/six-language-switcher.js +7 -5
  226. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  227. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +196 -0
  228. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -0
  229. package/dist/collection/components/six-layout-grid/six-layout-grid.js +10 -8
  230. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  231. package/dist/collection/components/six-layout-grid/test/six-layout-grid.spec.js +18 -0
  232. package/dist/collection/components/six-layout-grid/test/six-layout-grid.spec.js.map +1 -0
  233. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  234. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  235. package/dist/collection/components/six-main-container/test/six-main-container.spec.js +22 -0
  236. package/dist/collection/components/six-main-container/test/six-main-container.spec.js.map +1 -0
  237. package/dist/collection/components/six-menu/six-menu.js +41 -31
  238. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  239. package/dist/collection/components/six-menu/test/six-menu.spec.js +93 -0
  240. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -0
  241. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  242. package/dist/collection/components/six-menu-divider/test/six-menu-divider.spec.js +18 -0
  243. package/dist/collection/components/six-menu-divider/test/six-menu-divider.spec.js.map +1 -0
  244. package/dist/collection/components/six-menu-item/six-menu-item.js +17 -11
  245. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  246. package/dist/collection/components/six-menu-item/test/six-menu-item.spec.js +33 -0
  247. package/dist/collection/components/six-menu-item/test/six-menu-item.spec.js.map +1 -0
  248. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  249. package/dist/collection/components/six-menu-label/test/six-menu-label.spec.js +20 -0
  250. package/dist/collection/components/six-menu-label/test/six-menu-label.spec.js.map +1 -0
  251. package/dist/collection/components/six-picto/six-picto.js +5 -2
  252. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  253. package/dist/collection/components/six-picto/test/six-picto.spec.js +33 -0
  254. package/dist/collection/components/six-picto/test/six-picto.spec.js.map +1 -0
  255. package/dist/collection/components/six-progress-bar/six-progress-bar.js +1 -1
  256. package/dist/collection/components/six-progress-bar/test/six-progress-bar.spec.js +24 -0
  257. package/dist/collection/components/six-progress-bar/test/six-progress-bar.spec.js.map +1 -0
  258. package/dist/collection/components/six-progress-ring/six-progress-ring.js +6 -5
  259. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  260. package/dist/collection/components/six-progress-ring/test/six-progress-ring.spec.js +26 -0
  261. package/dist/collection/components/six-progress-ring/test/six-progress-ring.spec.js.map +1 -0
  262. package/dist/collection/components/six-radio/six-radio.js +82 -148
  263. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  264. package/dist/collection/components/six-radio/test/six-radio.spec.js +63 -0
  265. package/dist/collection/components/six-radio/test/six-radio.spec.js.map +1 -0
  266. package/dist/collection/components/six-range/six-range.js +149 -190
  267. package/dist/collection/components/six-range/six-range.js.map +1 -1
  268. package/dist/collection/components/six-range/test/six-range.spec.js +32 -0
  269. package/dist/collection/components/six-range/test/six-range.spec.js.map +1 -0
  270. package/dist/collection/components/six-root/six-root.js +9 -7
  271. package/dist/collection/components/six-root/six-root.js.map +1 -1
  272. package/dist/collection/components/six-root/test/six-root.spec.js +43 -0
  273. package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -0
  274. package/dist/collection/components/six-search-field/six-search-field.js +15 -9
  275. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  276. package/dist/collection/components/six-search-field/test/six-search-field.spec.js +22 -0
  277. package/dist/collection/components/six-search-field/test/six-search-field.spec.js.map +1 -0
  278. package/dist/collection/components/six-select/six-select.css +6 -9
  279. package/dist/collection/components/six-select/six-select.js +235 -349
  280. package/dist/collection/components/six-select/six-select.js.map +1 -1
  281. package/dist/collection/components/six-select/test/six-select.spec.js +82 -0
  282. package/dist/collection/components/six-select/test/six-select.spec.js.map +1 -0
  283. package/dist/collection/components/six-select/test/util.spec.js +81 -0
  284. package/dist/collection/components/six-select/test/util.spec.js.map +1 -0
  285. package/dist/collection/components/six-select/util.js +52 -0
  286. package/dist/collection/components/six-select/util.js.map +1 -0
  287. package/dist/collection/components/six-sidebar/six-sidebar.js +66 -33
  288. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  289. package/dist/collection/components/six-sidebar/test/six-sidebar.spec.js +22 -0
  290. package/dist/collection/components/six-sidebar/test/six-sidebar.spec.js.map +1 -0
  291. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +1 -1
  292. package/dist/collection/components/six-sidebar-item/test/six-sidebar-item.spec.js +50 -0
  293. package/dist/collection/components/six-sidebar-item/test/six-sidebar-item.spec.js.map +1 -0
  294. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +14 -10
  295. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  296. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +53 -0
  297. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -0
  298. package/dist/collection/components/six-spinner/six-spinner.js +1 -1
  299. package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
  300. package/dist/collection/components/six-spinner/test/six-spinner.spec.js +37 -0
  301. package/dist/collection/components/six-spinner/test/six-spinner.spec.js.map +1 -0
  302. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +4 -3
  303. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js.map +1 -1
  304. package/dist/collection/components/six-stage-indicator/test/six-stage-indicator.spec.js +117 -0
  305. package/dist/collection/components/six-stage-indicator/test/six-stage-indicator.spec.js.map +1 -0
  306. package/dist/collection/components/six-switch/six-switch.css +77 -0
  307. package/dist/collection/components/six-switch/six-switch.js +108 -139
  308. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  309. package/dist/collection/components/six-switch/test/six-switch.spec.js +69 -0
  310. package/dist/collection/components/six-switch/test/six-switch.spec.js.map +1 -0
  311. package/dist/collection/components/six-tab/six-tab.js +13 -7
  312. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  313. package/dist/collection/components/six-tab/test/six-tab.spec.js +20 -0
  314. package/dist/collection/components/six-tab/test/six-tab.spec.js.map +1 -0
  315. package/dist/collection/components/six-tab-group/six-tab-group.js +140 -119
  316. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  317. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +45 -0
  318. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +1 -0
  319. package/dist/collection/components/six-tab-panel/six-tab-panel.js +2 -2
  320. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  321. package/dist/collection/components/six-tab-panel/test/six-tab-panel.spec.js +20 -0
  322. package/dist/collection/components/six-tab-panel/test/six-tab-panel.spec.js.map +1 -0
  323. package/dist/collection/components/six-tag/six-tag.css +6 -0
  324. package/dist/collection/components/six-tag/six-tag.js +7 -9
  325. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  326. package/dist/collection/components/six-tag/test/six-tag.spec.js +42 -0
  327. package/dist/collection/components/six-tag/test/six-tag.spec.js.map +1 -0
  328. package/dist/collection/components/six-textarea/six-textarea.js +167 -282
  329. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  330. package/dist/collection/components/six-textarea/test/six-textarea.spec.js +117 -0
  331. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -0
  332. package/dist/collection/components/six-tile/six-tile.js +26 -25
  333. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  334. package/dist/collection/components/six-tile/test/six-tile.spec.js +69 -0
  335. package/dist/collection/components/six-tile/test/six-tile.spec.js.map +1 -0
  336. package/dist/collection/components/six-timepicker/six-timepicker.js +169 -264
  337. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  338. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js +496 -0
  339. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -0
  340. package/dist/collection/components/six-tooltip/six-tooltip.js +69 -66
  341. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  342. package/dist/collection/components/six-tooltip/test/six-tooltip.spec.js +28 -0
  343. package/dist/collection/components/six-tooltip/test/six-tooltip.spec.js.map +1 -0
  344. package/dist/collection/functional-components/form-control/form-control.js +9 -10
  345. package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
  346. package/dist/collection/index.js +1 -1
  347. package/dist/collection/index.js.map +1 -1
  348. package/dist/collection/testUtil/delay.js.map +1 -1
  349. package/dist/collection/utils/date-util.js +25 -16
  350. package/dist/collection/utils/date-util.js.map +1 -1
  351. package/dist/collection/utils/date-util.spec.js +995 -0
  352. package/dist/collection/utils/date-util.spec.js.map +1 -0
  353. package/dist/collection/utils/error-messages.js +91 -0
  354. package/dist/collection/utils/error-messages.js.map +1 -0
  355. package/dist/collection/utils/event-listeners.js +22 -6
  356. package/dist/collection/utils/event-listeners.js.map +1 -1
  357. package/dist/collection/utils/execution-control.js +5 -4
  358. package/dist/collection/utils/execution-control.js.map +1 -1
  359. package/dist/collection/utils/focus-visible.js +2 -2
  360. package/dist/collection/utils/focus-visible.js.map +1 -1
  361. package/dist/collection/utils/form.js +15 -0
  362. package/dist/collection/utils/form.js.map +1 -0
  363. package/dist/collection/utils/modal.js +3 -2
  364. package/dist/collection/utils/modal.js.map +1 -1
  365. package/dist/collection/utils/popover.js +33 -19
  366. package/dist/collection/utils/popover.js.map +1 -1
  367. package/dist/collection/utils/popup.js +95 -0
  368. package/dist/collection/utils/popup.js.map +1 -0
  369. package/dist/collection/utils/scroll.js +1 -1
  370. package/dist/collection/utils/scroll.spec.js +122 -0
  371. package/dist/collection/utils/scroll.spec.js.map +1 -0
  372. package/dist/collection/utils/slot.js +9 -24
  373. package/dist/collection/utils/slot.js.map +1 -1
  374. package/dist/collection/utils/tabbable.js +6 -6
  375. package/dist/collection/utils/tabbable.js.map +1 -1
  376. package/dist/collection/utils/time.util.js +48 -34
  377. package/dist/collection/utils/time.util.js.map +1 -1
  378. package/dist/collection/utils/time.util.spec.js +368 -0
  379. package/dist/collection/utils/time.util.spec.js.map +1 -0
  380. package/dist/collection/utils/type-check.js +0 -1
  381. package/dist/collection/utils/type-check.js.map +1 -1
  382. package/dist/collection/wrappers/set-attributes/set-attributes.js +4 -2
  383. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -1
  384. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +16 -0
  385. package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +1 -0
  386. package/dist/components/event-listeners.js +22 -6
  387. package/dist/components/event-listeners.js.map +1 -1
  388. package/dist/components/execution-control.js +5 -2
  389. package/dist/components/execution-control.js.map +1 -1
  390. package/dist/components/focus-visible.js +2 -2
  391. package/dist/components/focus-visible.js.map +1 -1
  392. package/dist/components/form-control.js +8 -9
  393. package/dist/components/form-control.js.map +1 -1
  394. package/dist/components/form.js +18 -0
  395. package/dist/components/form.js.map +1 -0
  396. package/dist/components/index.js +92 -13
  397. package/dist/components/index.js.map +1 -1
  398. package/dist/components/modal.js +3 -2
  399. package/dist/components/modal.js.map +1 -1
  400. package/dist/components/popover.js +38 -30
  401. package/dist/components/popover.js.map +1 -1
  402. package/dist/components/scroll.js.map +1 -1
  403. package/dist/components/set-attributes2.js +3 -1
  404. package/dist/components/set-attributes2.js.map +1 -1
  405. package/dist/components/six-alert.js +17 -22
  406. package/dist/components/six-alert.js.map +1 -1
  407. package/dist/components/six-avatar.js +4 -7
  408. package/dist/components/six-avatar.js.map +1 -1
  409. package/dist/components/six-badge.js +1 -1
  410. package/dist/components/six-badge.js.map +1 -1
  411. package/dist/components/six-button.js +34 -32
  412. package/dist/components/six-button.js.map +1 -1
  413. package/dist/components/six-card.js.map +1 -1
  414. package/dist/components/six-checkbox.js +48 -89
  415. package/dist/components/six-checkbox.js.map +1 -1
  416. package/dist/components/six-datepicker.js +154 -283
  417. package/dist/components/six-datepicker.js.map +1 -1
  418. package/dist/components/six-details2.js +46 -45
  419. package/dist/components/six-details2.js.map +1 -1
  420. package/dist/components/six-dialog.js +33 -37
  421. package/dist/components/six-dialog.js.map +1 -1
  422. package/dist/components/six-drawer.js +30 -34
  423. package/dist/components/six-drawer.js.map +1 -1
  424. package/dist/components/six-dropdown2.js +185 -173
  425. package/dist/components/six-dropdown2.js.map +1 -1
  426. package/dist/components/six-error-page.js +19 -21
  427. package/dist/components/six-error-page.js.map +1 -1
  428. package/dist/components/six-file-list-item.js +1 -1
  429. package/dist/components/six-file-list-item.js.map +1 -1
  430. package/dist/components/six-file-list.js.map +1 -1
  431. package/dist/components/six-file-upload.js +20 -20
  432. package/dist/components/six-file-upload.js.map +1 -1
  433. package/dist/components/six-footer.js.map +1 -1
  434. package/dist/components/six-group-label.js +10 -9
  435. package/dist/components/six-group-label.js.map +1 -1
  436. package/dist/components/six-header.js +64 -42
  437. package/dist/components/six-header.js.map +1 -1
  438. package/dist/components/six-icon-button2.js +2 -2
  439. package/dist/components/six-icon-button2.js.map +1 -1
  440. package/dist/components/six-icon2.js.map +1 -1
  441. package/dist/components/six-input2.js +96 -138
  442. package/dist/components/six-input2.js.map +1 -1
  443. package/dist/components/six-item-picker2.js +58 -77
  444. package/dist/components/six-item-picker2.js.map +1 -1
  445. package/dist/components/six-language-switcher.js +1 -1
  446. package/dist/components/six-language-switcher.js.map +1 -1
  447. package/dist/components/six-layout-grid.js +5 -3
  448. package/dist/components/six-layout-grid.js.map +1 -1
  449. package/dist/components/six-main-container.js.map +1 -1
  450. package/dist/components/six-menu-divider.js.map +1 -1
  451. package/dist/components/six-menu-item2.js +7 -5
  452. package/dist/components/six-menu-item2.js.map +1 -1
  453. package/dist/components/six-menu-label.js.map +1 -1
  454. package/dist/components/six-menu2.js +25 -18
  455. package/dist/components/six-menu2.js.map +1 -1
  456. package/dist/components/six-picto2.js +4 -1
  457. package/dist/components/six-picto2.js.map +1 -1
  458. package/dist/components/six-progress-bar.js.map +1 -1
  459. package/dist/components/six-progress-ring.js +3 -3
  460. package/dist/components/six-progress-ring.js.map +1 -1
  461. package/dist/components/six-radio.js +65 -78
  462. package/dist/components/six-radio.js.map +1 -1
  463. package/dist/components/six-range.js +108 -111
  464. package/dist/components/six-range.js.map +1 -1
  465. package/dist/components/six-root.js +1 -1
  466. package/dist/components/six-root.js.map +1 -1
  467. package/dist/components/six-search-field.js +8 -3
  468. package/dist/components/six-search-field.js.map +1 -1
  469. package/dist/components/six-select.js +190 -229
  470. package/dist/components/six-select.js.map +1 -1
  471. package/dist/components/six-sidebar-item-group.js +8 -4
  472. package/dist/components/six-sidebar-item-group.js.map +1 -1
  473. package/dist/components/six-sidebar-item.js.map +1 -1
  474. package/dist/components/six-sidebar.js +39 -18
  475. package/dist/components/six-sidebar.js.map +1 -1
  476. package/dist/components/six-spinner2.js.map +1 -1
  477. package/dist/components/six-stage-indicator2.js.map +1 -1
  478. package/dist/components/six-switch.js +61 -69
  479. package/dist/components/six-switch.js.map +1 -1
  480. package/dist/components/six-tab-group.js +129 -111
  481. package/dist/components/six-tab-group.js.map +1 -1
  482. package/dist/components/six-tab-panel.js +1 -1
  483. package/dist/components/six-tab-panel.js.map +1 -1
  484. package/dist/components/six-tab.js +4 -2
  485. package/dist/components/six-tab.js.map +1 -1
  486. package/dist/components/six-tag2.js +5 -8
  487. package/dist/components/six-tag2.js.map +1 -1
  488. package/dist/components/six-textarea.js +83 -115
  489. package/dist/components/six-textarea.js.map +1 -1
  490. package/dist/components/six-tile.js +14 -17
  491. package/dist/components/six-tile.js.map +1 -1
  492. package/dist/components/six-timepicker.js +1 -1
  493. package/dist/components/six-timepicker2.js +247 -258
  494. package/dist/components/six-timepicker2.js.map +1 -1
  495. package/dist/components/six-tooltip2.js +52 -55
  496. package/dist/components/six-tooltip2.js.map +1 -1
  497. package/dist/components/slot.js +10 -9
  498. package/dist/components/slot.js.map +1 -1
  499. package/dist/components.d.ts +361 -88
  500. package/dist/components.json +4380 -1620
  501. package/dist/esm/event-listeners-f6e5b0ab.js +59 -0
  502. package/dist/esm/event-listeners-f6e5b0ab.js.map +1 -0
  503. package/dist/esm/{execution-control-1a60d709.js → execution-control-e0892a05.js} +6 -3
  504. package/dist/esm/execution-control-e0892a05.js.map +1 -0
  505. package/dist/esm/{focus-visible-97933ea9.js → focus-visible-fc6ac671.js} +3 -3
  506. package/dist/esm/focus-visible-fc6ac671.js.map +1 -0
  507. package/dist/esm/form-81252534.js +18 -0
  508. package/dist/esm/form-81252534.js.map +1 -0
  509. package/dist/esm/{form-control-bdd1478a.js → form-control-32cb533f.js} +10 -11
  510. package/dist/esm/form-control-32cb533f.js.map +1 -0
  511. package/dist/esm/{index-96b1af5d.js → index-8a74f992.js} +187 -55
  512. package/dist/esm/index-8a74f992.js.map +1 -0
  513. package/dist/esm/index.js +91 -0
  514. package/dist/esm/index.js.map +1 -1
  515. package/dist/esm/loader.js +4 -13
  516. package/dist/esm/loader.js.map +1 -1
  517. package/dist/esm/{modal-5ebdc320.js → modal-7d32e141.js} +4 -3
  518. package/dist/esm/modal-7d32e141.js.map +1 -0
  519. package/dist/esm/{popover-bd2c2fca.js → popover-136d1f73.js} +39 -31
  520. package/dist/esm/popover-136d1f73.js.map +1 -0
  521. package/dist/esm/popup-7f89a001.js +98 -0
  522. package/dist/esm/popup-7f89a001.js.map +1 -0
  523. package/dist/esm/{scroll-180b53fd.js → scroll-3fb087a2.js} +1 -1
  524. package/dist/esm/scroll-3fb087a2.js.map +1 -0
  525. package/dist/esm/set-attributes_2.entry.js +4 -2
  526. package/dist/esm/set-attributes_2.entry.js.map +1 -1
  527. package/dist/esm/six-alert.entry.js +18 -23
  528. package/dist/esm/six-alert.entry.js.map +1 -1
  529. package/dist/esm/six-avatar.entry.js +5 -8
  530. package/dist/esm/six-avatar.entry.js.map +1 -1
  531. package/dist/esm/six-badge.entry.js +2 -2
  532. package/dist/esm/six-badge.entry.js.map +1 -1
  533. package/dist/esm/six-button.entry.js +36 -34
  534. package/dist/esm/six-button.entry.js.map +1 -1
  535. package/dist/esm/six-card.entry.js +1 -1
  536. package/dist/esm/six-card.entry.js.map +1 -1
  537. package/dist/esm/six-checkbox.entry.js +50 -85
  538. package/dist/esm/six-checkbox.entry.js.map +1 -1
  539. package/dist/esm/six-datepicker.entry.js +153 -279
  540. package/dist/esm/six-datepicker.entry.js.map +1 -1
  541. package/dist/esm/six-details.entry.js +48 -47
  542. package/dist/esm/six-details.entry.js.map +1 -1
  543. package/dist/esm/six-dialog.entry.js +37 -41
  544. package/dist/esm/six-dialog.entry.js.map +1 -1
  545. package/dist/esm/six-drawer.entry.js +34 -38
  546. package/dist/esm/six-drawer.entry.js.map +1 -1
  547. package/dist/esm/{six-dropdown_3.entry.js → six-dropdown_2.entry.js} +217 -249
  548. package/dist/esm/six-dropdown_2.entry.js.map +1 -0
  549. package/dist/esm/six-error-page.entry.js +20 -22
  550. package/dist/esm/six-error-page.entry.js.map +1 -1
  551. package/dist/esm/six-file-list-item.entry.js +2 -2
  552. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  553. package/dist/esm/six-file-list.entry.js +1 -1
  554. package/dist/esm/six-file-list.entry.js.map +1 -1
  555. package/dist/esm/six-file-upload.entry.js +21 -21
  556. package/dist/esm/six-file-upload.entry.js.map +1 -1
  557. package/dist/esm/six-footer.entry.js +1 -1
  558. package/dist/esm/six-footer.entry.js.map +1 -1
  559. package/dist/esm/six-group-label.entry.js +12 -11
  560. package/dist/esm/six-group-label.entry.js.map +1 -1
  561. package/dist/esm/six-header.entry.js +66 -44
  562. package/dist/esm/six-header.entry.js.map +1 -1
  563. package/dist/esm/six-icon-button.entry.js +4 -4
  564. package/dist/esm/six-icon-button.entry.js.map +1 -1
  565. package/dist/esm/six-icon.entry.js +1 -1
  566. package/dist/esm/six-icon.entry.js.map +1 -1
  567. package/dist/esm/six-input.entry.js +95 -128
  568. package/dist/esm/six-input.entry.js.map +1 -1
  569. package/dist/esm/six-item-picker.entry.js +62 -81
  570. package/dist/esm/six-item-picker.entry.js.map +1 -1
  571. package/dist/esm/six-language-switcher.entry.js +2 -2
  572. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  573. package/dist/esm/six-layout-grid.entry.js +5 -3
  574. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  575. package/dist/esm/six-main-container.entry.js +1 -1
  576. package/dist/esm/six-main-container.entry.js.map +1 -1
  577. package/dist/esm/six-menu-divider.entry.js +1 -1
  578. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  579. package/dist/esm/six-menu-item.entry.js +59 -0
  580. package/dist/esm/six-menu-item.entry.js.map +1 -0
  581. package/dist/esm/six-menu-label.entry.js +1 -1
  582. package/dist/esm/six-menu-label.entry.js.map +1 -1
  583. package/dist/esm/six-picto.entry.js +5 -2
  584. package/dist/esm/six-picto.entry.js.map +1 -1
  585. package/dist/esm/six-progress-bar.entry.js +1 -1
  586. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  587. package/dist/esm/six-progress-ring.entry.js +4 -4
  588. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  589. package/dist/esm/six-radio.entry.js +63 -72
  590. package/dist/esm/six-radio.entry.js.map +1 -1
  591. package/dist/esm/six-range.entry.js +107 -106
  592. package/dist/esm/six-range.entry.js.map +1 -1
  593. package/dist/esm/six-root.entry.js +2 -2
  594. package/dist/esm/six-root.entry.js.map +1 -1
  595. package/dist/esm/six-search-field.entry.js +11 -6
  596. package/dist/esm/six-search-field.entry.js.map +1 -1
  597. package/dist/esm/six-select.entry.js +190 -223
  598. package/dist/esm/six-select.entry.js.map +1 -1
  599. package/dist/esm/six-sidebar-item-group.entry.js +10 -6
  600. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  601. package/dist/esm/six-sidebar-item.entry.js +1 -1
  602. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  603. package/dist/esm/six-sidebar.entry.js +41 -20
  604. package/dist/esm/six-sidebar.entry.js.map +1 -1
  605. package/dist/esm/six-spinner.entry.js +1 -1
  606. package/dist/esm/six-spinner.entry.js.map +1 -1
  607. package/dist/esm/six-switch.entry.js +58 -64
  608. package/dist/esm/six-switch.entry.js.map +1 -1
  609. package/dist/esm/six-tab-group.entry.js +132 -114
  610. package/dist/esm/six-tab-group.entry.js.map +1 -1
  611. package/dist/esm/six-tab-panel.entry.js +2 -2
  612. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  613. package/dist/esm/six-tab.entry.js +5 -3
  614. package/dist/esm/six-tab.entry.js.map +1 -1
  615. package/dist/esm/six-tag.entry.js +6 -9
  616. package/dist/esm/six-tag.entry.js.map +1 -1
  617. package/dist/esm/six-textarea.entry.js +82 -108
  618. package/dist/esm/six-textarea.entry.js.map +1 -1
  619. package/dist/esm/six-tile.entry.js +14 -17
  620. package/dist/esm/six-tile.entry.js.map +1 -1
  621. package/dist/esm/six-timepicker.entry.js +159 -215
  622. package/dist/esm/six-timepicker.entry.js.map +1 -1
  623. package/dist/esm/six-tooltip.entry.js +54 -57
  624. package/dist/esm/six-tooltip.entry.js.map +1 -1
  625. package/dist/esm/{slot-6f3984c7.js → slot-ad36df3a.js} +11 -10
  626. package/dist/esm/slot-ad36df3a.js.map +1 -0
  627. package/dist/esm/{types-4b10b413.js → types-59b455aa.js} +1 -1
  628. package/dist/esm/types-59b455aa.js.map +1 -0
  629. package/dist/esm/ui-library.js +4 -7
  630. package/dist/esm/ui-library.js.map +1 -1
  631. package/dist/types/components/six-alert/six-alert.d.ts +5 -7
  632. package/dist/types/components/six-avatar/six-avatar.d.ts +1 -2
  633. package/dist/types/components/six-badge/six-badge.d.ts +0 -1
  634. package/dist/types/components/six-button/six-button.d.ts +8 -9
  635. package/dist/types/components/six-checkbox/six-checkbox.d.ts +23 -35
  636. package/dist/types/components/six-datepicker/components/day-selection.d.ts +9 -5
  637. package/dist/types/components/six-datepicker/components/month-selection.d.ts +8 -5
  638. package/dist/types/components/six-datepicker/components/year-selection.d.ts +7 -5
  639. package/dist/types/components/six-datepicker/six-datepicker.d.ts +41 -52
  640. package/dist/types/components/six-details/six-details.d.ts +12 -12
  641. package/dist/types/components/six-dialog/six-dialog.d.ts +12 -13
  642. package/dist/types/components/six-drawer/six-drawer.d.ts +12 -13
  643. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -32
  644. package/dist/types/components/six-error-page/six-error-page.d.ts +1 -1
  645. package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +3 -3
  646. package/dist/types/components/six-file-upload/six-file-upload.d.ts +11 -11
  647. package/dist/types/components/six-group-label/six-group-label.d.ts +5 -5
  648. package/dist/types/components/six-header/six-header.d.ts +16 -27
  649. package/dist/types/components/six-icon-button/six-icon-button.d.ts +4 -4
  650. package/dist/types/components/six-input/six-input.d.ts +32 -67
  651. package/dist/types/components/six-item-picker/six-item-picker.d.ts +13 -16
  652. package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +1 -1
  653. package/dist/types/components/six-menu/six-menu.d.ts +10 -11
  654. package/dist/types/components/six-menu-item/six-menu-item.d.ts +6 -6
  655. package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +2 -2
  656. package/dist/types/components/six-radio/six-radio.d.ts +14 -25
  657. package/dist/types/components/six-range/six-range.d.ts +27 -38
  658. package/dist/types/components/six-root/six-root.d.ts +3 -3
  659. package/dist/types/components/six-search-field/six-search-field.d.ts +4 -5
  660. package/dist/types/components/six-select/six-select.d.ts +41 -58
  661. package/dist/types/components/six-select/util.d.ts +7 -0
  662. package/dist/types/components/six-sidebar/six-sidebar.d.ts +5 -5
  663. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +7 -6
  664. package/dist/types/components/six-spinner/six-spinner.d.ts +2 -2
  665. package/dist/types/components/six-switch/six-switch.d.ts +18 -21
  666. package/dist/types/components/six-tab/six-tab.d.ts +3 -3
  667. package/dist/types/components/six-tab-group/six-tab-group.d.ts +20 -21
  668. package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +1 -1
  669. package/dist/types/components/six-tag/six-tag.d.ts +1 -3
  670. package/dist/types/components/six-textarea/six-textarea.d.ts +27 -55
  671. package/dist/types/components/six-tile/six-tile.d.ts +2 -3
  672. package/dist/types/components/six-timepicker/six-timepicker.d.ts +26 -43
  673. package/dist/types/components/six-tooltip/six-tooltip.d.ts +19 -21
  674. package/dist/types/components.d.ts +209 -684
  675. package/dist/types/functional-components/form-control/form-control.d.ts +5 -6
  676. package/dist/types/index.d.ts +1 -0
  677. package/dist/types/stencil-public-runtime.d.ts +15 -2
  678. package/dist/types/testUtil/delay.d.ts +1 -1
  679. package/dist/types/types.d.ts +2 -0
  680. package/dist/types/utils/date-util.d.ts +18 -10
  681. package/dist/types/utils/error-messages.d.ts +42 -0
  682. package/dist/types/utils/event-listeners.d.ts +4 -3
  683. package/dist/types/utils/execution-control.d.ts +1 -3
  684. package/dist/types/utils/form.d.ts +1 -0
  685. package/dist/types/utils/modal.d.ts +2 -2
  686. package/dist/types/utils/popover.d.ts +5 -5
  687. package/dist/types/utils/popup.d.ts +9 -0
  688. package/dist/types/utils/slot.d.ts +2 -7
  689. package/dist/types/utils/tabbable.d.ts +1 -1
  690. package/dist/types/utils/time.util.d.ts +18 -9
  691. package/dist/types/utils/type-check.d.ts +3 -4
  692. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +1 -1
  693. package/dist/ui-library/index.esm.js +1 -1
  694. package/dist/ui-library/index.esm.js.map +1 -1
  695. package/dist/ui-library/p-02981b91.entry.js +2 -0
  696. package/dist/ui-library/p-02981b91.entry.js.map +1 -0
  697. package/dist/ui-library/{p-25a3bf57.js → p-0f510624.js} +1 -1
  698. package/dist/ui-library/p-0f510624.js.map +1 -0
  699. package/dist/ui-library/p-0fdb185d.js +2 -0
  700. package/dist/ui-library/p-0fdb185d.js.map +1 -0
  701. package/dist/ui-library/{p-12000282.entry.js → p-1256cc0a.entry.js} +2 -2
  702. package/dist/ui-library/p-1256cc0a.entry.js.map +1 -0
  703. package/dist/ui-library/{p-14db57aa.entry.js → p-13b43e04.entry.js} +2 -2
  704. package/dist/ui-library/p-13b43e04.entry.js.map +1 -0
  705. package/dist/ui-library/p-15559d38.js +2 -0
  706. package/dist/ui-library/p-15559d38.js.map +1 -0
  707. package/dist/ui-library/p-19ed7a4c.entry.js +2 -0
  708. package/dist/ui-library/p-19ed7a4c.entry.js.map +1 -0
  709. package/dist/ui-library/{p-3efe46cf.entry.js → p-1d5ee1a0.entry.js} +2 -2
  710. package/dist/ui-library/p-1d5ee1a0.entry.js.map +1 -0
  711. package/dist/ui-library/{p-eb8f05a9.js → p-1f18768a.js} +1 -1
  712. package/dist/ui-library/p-1f18768a.js.map +1 -0
  713. package/dist/ui-library/p-21b3b321.entry.js +2 -0
  714. package/dist/ui-library/p-21b3b321.entry.js.map +1 -0
  715. package/dist/ui-library/p-264d4ea8.entry.js +2 -0
  716. package/dist/ui-library/p-264d4ea8.entry.js.map +1 -0
  717. package/dist/ui-library/{p-ccee090e.entry.js → p-29ac3d7d.entry.js} +2 -2
  718. package/dist/ui-library/p-29ac3d7d.entry.js.map +1 -0
  719. package/dist/ui-library/p-314b2096.entry.js +2 -0
  720. package/dist/ui-library/p-314b2096.entry.js.map +1 -0
  721. package/dist/ui-library/p-330a4988.entry.js +2 -0
  722. package/dist/ui-library/p-330a4988.entry.js.map +1 -0
  723. package/dist/ui-library/{p-eb1ec1b7.entry.js → p-346f9557.entry.js} +2 -2
  724. package/dist/ui-library/p-346f9557.entry.js.map +1 -0
  725. package/dist/ui-library/p-37557787.entry.js +2 -0
  726. package/dist/ui-library/p-37557787.entry.js.map +1 -0
  727. package/dist/ui-library/{p-e1aed7ed.entry.js → p-3cc5addb.entry.js} +2 -2
  728. package/dist/ui-library/p-3cc5addb.entry.js.map +1 -0
  729. package/dist/ui-library/p-3d9de119.entry.js +2 -0
  730. package/dist/ui-library/p-3d9de119.entry.js.map +1 -0
  731. package/dist/ui-library/p-411ed539.entry.js +2 -0
  732. package/dist/ui-library/p-411ed539.entry.js.map +1 -0
  733. package/dist/ui-library/p-4705a51e.entry.js +2 -0
  734. package/dist/ui-library/p-4705a51e.entry.js.map +1 -0
  735. package/dist/ui-library/p-4abed9df.entry.js +2 -0
  736. package/dist/ui-library/p-4abed9df.entry.js.map +1 -0
  737. package/dist/ui-library/p-5654e4c7.js +2 -0
  738. package/dist/ui-library/p-5654e4c7.js.map +1 -0
  739. package/dist/ui-library/p-59210f0b.js +2 -0
  740. package/dist/ui-library/p-59210f0b.js.map +1 -0
  741. package/dist/ui-library/{p-94ab37b2.entry.js → p-5af44076.entry.js} +2 -2
  742. package/dist/ui-library/p-5af44076.entry.js.map +1 -0
  743. package/dist/ui-library/p-5d6b7353.entry.js +2 -0
  744. package/dist/ui-library/p-5d6b7353.entry.js.map +1 -0
  745. package/dist/ui-library/{p-b3974ad4.entry.js → p-613283a7.entry.js} +2 -2
  746. package/dist/ui-library/p-613283a7.entry.js.map +1 -0
  747. package/dist/ui-library/p-6153045b.js +3 -0
  748. package/dist/ui-library/p-6153045b.js.map +1 -0
  749. package/dist/ui-library/{p-8187701c.entry.js → p-6197fe2f.entry.js} +2 -2
  750. package/dist/ui-library/p-6197fe2f.entry.js.map +1 -0
  751. package/dist/ui-library/p-698bb2c8.js +2 -0
  752. package/dist/ui-library/p-698bb2c8.js.map +1 -0
  753. package/dist/ui-library/{p-694829b8.entry.js → p-72254eef.entry.js} +2 -2
  754. package/dist/ui-library/p-72254eef.entry.js.map +1 -0
  755. package/dist/ui-library/p-724875b0.entry.js +2 -0
  756. package/dist/ui-library/p-724875b0.entry.js.map +1 -0
  757. package/dist/ui-library/{p-028a2c54.entry.js → p-7afafb9d.entry.js} +2 -2
  758. package/dist/ui-library/p-7afafb9d.entry.js.map +1 -0
  759. package/dist/ui-library/p-7d95def3.js +2 -0
  760. package/dist/ui-library/p-7d95def3.js.map +1 -0
  761. package/dist/ui-library/{p-524e5804.entry.js → p-7e3ad38a.entry.js} +2 -2
  762. package/dist/ui-library/p-7e3ad38a.entry.js.map +1 -0
  763. package/dist/ui-library/p-83864cfe.entry.js +2 -0
  764. package/dist/ui-library/p-83864cfe.entry.js.map +1 -0
  765. package/dist/ui-library/{p-16732ac1.entry.js → p-878226a0.entry.js} +2 -2
  766. package/dist/ui-library/p-878226a0.entry.js.map +1 -0
  767. package/dist/ui-library/p-8c0971e0.js +2 -0
  768. package/dist/ui-library/p-8c0971e0.js.map +1 -0
  769. package/dist/ui-library/p-91b51800.entry.js +2 -0
  770. package/dist/ui-library/p-91b51800.entry.js.map +1 -0
  771. package/dist/ui-library/p-95fbdd0b.entry.js +2 -0
  772. package/dist/ui-library/p-95fbdd0b.entry.js.map +1 -0
  773. package/dist/ui-library/p-99e24daf.entry.js +2 -0
  774. package/dist/ui-library/p-99e24daf.entry.js.map +1 -0
  775. package/dist/ui-library/{p-4f8394d7.js → p-9ace84c7.js} +2 -2
  776. package/dist/ui-library/p-9ace84c7.js.map +1 -0
  777. package/dist/ui-library/p-9b354f5d.entry.js +2 -0
  778. package/dist/ui-library/p-9b354f5d.entry.js.map +1 -0
  779. package/dist/ui-library/p-9c1be3fb.entry.js +2 -0
  780. package/dist/ui-library/p-9c1be3fb.entry.js.map +1 -0
  781. package/dist/ui-library/p-9f0b43f9.entry.js +2 -0
  782. package/dist/ui-library/p-9f0b43f9.entry.js.map +1 -0
  783. package/dist/ui-library/{p-57a84d7f.entry.js → p-a0f290d0.entry.js} +2 -2
  784. package/dist/ui-library/p-a0f290d0.entry.js.map +1 -0
  785. package/dist/ui-library/p-a55c7258.entry.js +2 -0
  786. package/dist/ui-library/p-a55c7258.entry.js.map +1 -0
  787. package/dist/ui-library/{p-52cb61bd.entry.js → p-a6a9ee96.entry.js} +2 -2
  788. package/dist/ui-library/p-a6a9ee96.entry.js.map +1 -0
  789. package/dist/ui-library/{p-788281d0.entry.js → p-ac099e6b.entry.js} +2 -2
  790. package/dist/ui-library/p-ac099e6b.entry.js.map +1 -0
  791. package/dist/ui-library/p-ae601a0f.entry.js +2 -0
  792. package/dist/ui-library/p-ae601a0f.entry.js.map +1 -0
  793. package/dist/ui-library/{p-6cc82df5.entry.js → p-b351f889.entry.js} +2 -2
  794. package/dist/ui-library/p-b351f889.entry.js.map +1 -0
  795. package/dist/ui-library/p-b550a258.entry.js +2 -0
  796. package/dist/ui-library/p-b550a258.entry.js.map +1 -0
  797. package/dist/ui-library/{p-4bcebd5a.entry.js → p-bf87464b.entry.js} +2 -2
  798. package/dist/ui-library/p-bf87464b.entry.js.map +1 -0
  799. package/dist/ui-library/p-c03ebf7d.entry.js +2 -0
  800. package/dist/ui-library/p-c03ebf7d.entry.js.map +1 -0
  801. package/dist/ui-library/{p-f68b5c54.entry.js → p-cd67da3d.entry.js} +2 -2
  802. package/dist/ui-library/p-cd67da3d.entry.js.map +1 -0
  803. package/dist/ui-library/p-cdaed936.entry.js +2 -0
  804. package/dist/ui-library/p-cdaed936.entry.js.map +1 -0
  805. package/dist/ui-library/{p-e4b6264b.entry.js → p-d367f4f9.entry.js} +2 -2
  806. package/dist/ui-library/p-d367f4f9.entry.js.map +1 -0
  807. package/dist/ui-library/p-d42c2025.js +2 -0
  808. package/dist/ui-library/p-d42c2025.js.map +1 -0
  809. package/dist/ui-library/{p-4d4829db.entry.js → p-dfed33c5.entry.js} +2 -2
  810. package/dist/ui-library/p-dfed33c5.entry.js.map +1 -0
  811. package/dist/ui-library/p-ed381ad9.entry.js +2 -0
  812. package/dist/ui-library/p-ed381ad9.entry.js.map +1 -0
  813. package/dist/ui-library/p-ee8342e1.entry.js +2 -0
  814. package/dist/ui-library/p-ee8342e1.entry.js.map +1 -0
  815. package/dist/ui-library/p-ee950ce2.entry.js +2 -0
  816. package/dist/ui-library/p-ee950ce2.entry.js.map +1 -0
  817. package/dist/ui-library/{p-9f9bef35.entry.js → p-ff90ffd1.entry.js} +2 -2
  818. package/dist/ui-library/p-ff90ffd1.entry.js.map +1 -0
  819. package/dist/ui-library/ui-library.css +2 -2
  820. package/dist/ui-library/ui-library.esm.js +1 -1
  821. package/dist/ui-library/ui-library.esm.js.map +1 -1
  822. package/loader/index.d.ts +1 -1
  823. package/package.json +19 -20
  824. package/dist/cjs/event-listeners-74715e62.js +0 -45
  825. package/dist/cjs/event-listeners-74715e62.js.map +0 -1
  826. package/dist/cjs/execution-control-46f388e0.js.map +0 -1
  827. package/dist/cjs/focus-visible-0b352c74.js.map +0 -1
  828. package/dist/cjs/form-control-8e2ae807.js.map +0 -1
  829. package/dist/cjs/index-b3257a77.js.map +0 -1
  830. package/dist/cjs/modal-48d42228.js.map +0 -1
  831. package/dist/cjs/popover-f743f62b.js.map +0 -1
  832. package/dist/cjs/scroll-76e6f5d7.js.map +0 -1
  833. package/dist/cjs/six-dropdown_3.cjs.entry.js.map +0 -1
  834. package/dist/cjs/six-form.cjs.entry.js +0 -231
  835. package/dist/cjs/six-form.cjs.entry.js.map +0 -1
  836. package/dist/cjs/six-table-cell_4.cjs.entry.js +0 -107
  837. package/dist/cjs/six-table-cell_4.cjs.entry.js.map +0 -1
  838. package/dist/cjs/six-table.cjs.entry.js +0 -167
  839. package/dist/cjs/six-table.cjs.entry.js.map +0 -1
  840. package/dist/cjs/six-timepicker.types-c19ebff3.js +0 -56
  841. package/dist/cjs/six-timepicker.types-c19ebff3.js.map +0 -1
  842. package/dist/cjs/slot-ad537f24.js.map +0 -1
  843. package/dist/cjs/types-64878648.js.map +0 -1
  844. package/dist/collection/components/six-form/six-form.css +0 -11
  845. package/dist/collection/components/six-form/six-form.js +0 -419
  846. package/dist/collection/components/six-form/six-form.js.map +0 -1
  847. package/dist/collection/components/six-table/six-table.css +0 -44
  848. package/dist/collection/components/six-table/six-table.js +0 -219
  849. package/dist/collection/components/six-table/six-table.js.map +0 -1
  850. package/dist/collection/components/six-table/test/helpers.js +0 -14
  851. package/dist/collection/components/six-table/test/helpers.js.map +0 -1
  852. package/dist/collection/components/six-table/types.js +0 -9
  853. package/dist/collection/components/six-table/types.js.map +0 -1
  854. package/dist/collection/components/six-table/util/filter-by.js +0 -34
  855. package/dist/collection/components/six-table/util/filter-by.js.map +0 -1
  856. package/dist/collection/components/six-table/util/from-data.js +0 -32
  857. package/dist/collection/components/six-table/util/from-data.js.map +0 -1
  858. package/dist/collection/components/six-table/util/is.js +0 -4
  859. package/dist/collection/components/six-table/util/is.js.map +0 -1
  860. package/dist/collection/components/six-table/util/quick-filter-by.js +0 -14
  861. package/dist/collection/components/six-table/util/quick-filter-by.js.map +0 -1
  862. package/dist/collection/components/six-table/util/sort-by.js +0 -25
  863. package/dist/collection/components/six-table/util/sort-by.js.map +0 -1
  864. package/dist/collection/components/six-table-cell/six-table-cell.css +0 -13
  865. package/dist/collection/components/six-table-cell/six-table-cell.js +0 -25
  866. package/dist/collection/components/six-table-cell/six-table-cell.js.map +0 -1
  867. package/dist/collection/components/six-table-header/six-table-header.css +0 -17
  868. package/dist/collection/components/six-table-header/six-table-header.js +0 -25
  869. package/dist/collection/components/six-table-header/six-table-header.js.map +0 -1
  870. package/dist/collection/components/six-table-header-cell/get-next-state.js +0 -7
  871. package/dist/collection/components/six-table-header-cell/get-next-state.js.map +0 -1
  872. package/dist/collection/components/six-table-header-cell/icons.js +0 -12
  873. package/dist/collection/components/six-table-header-cell/icons.js.map +0 -1
  874. package/dist/collection/components/six-table-header-cell/six-table-header-cell.css +0 -37
  875. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +0 -179
  876. package/dist/collection/components/six-table-header-cell/six-table-header-cell.js.map +0 -1
  877. package/dist/collection/components/six-table-header-cell/types.js +0 -2
  878. package/dist/collection/components/six-table-header-cell/types.js.map +0 -1
  879. package/dist/collection/components/six-table-header-cell/util/create-model.js +0 -7
  880. package/dist/collection/components/six-table-header-cell/util/create-model.js.map +0 -1
  881. package/dist/collection/components/six-table-header-cell/util/get-next-state.js +0 -7
  882. package/dist/collection/components/six-table-header-cell/util/get-next-state.js.map +0 -1
  883. package/dist/collection/components/six-table-row/six-table-row.css +0 -16
  884. package/dist/collection/components/six-table-row/six-table-row.js +0 -25
  885. package/dist/collection/components/six-table-row/six-table-row.js.map +0 -1
  886. package/dist/collection/components/six-timepicker/six-time-format.js +0 -15
  887. package/dist/collection/components/six-timepicker/six-time-format.js.map +0 -1
  888. package/dist/collection/components/six-timepicker/six-timepicker.types.js +0 -41
  889. package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +0 -1
  890. package/dist/collection/utils/as-array.js +0 -2
  891. package/dist/collection/utils/as-array.js.map +0 -1
  892. package/dist/collection/utils/matchers.js +0 -3
  893. package/dist/collection/utils/matchers.js.map +0 -1
  894. package/dist/collection/utils/testing.js +0 -39
  895. package/dist/collection/utils/testing.js.map +0 -1
  896. package/dist/components/six-form.d.ts +0 -11
  897. package/dist/components/six-form.js +0 -252
  898. package/dist/components/six-form.js.map +0 -1
  899. package/dist/components/six-table-cell.d.ts +0 -11
  900. package/dist/components/six-table-cell.js +0 -8
  901. package/dist/components/six-table-cell.js.map +0 -1
  902. package/dist/components/six-table-cell2.js +0 -32
  903. package/dist/components/six-table-cell2.js.map +0 -1
  904. package/dist/components/six-table-header-cell.d.ts +0 -11
  905. package/dist/components/six-table-header-cell.js +0 -8
  906. package/dist/components/six-table-header-cell.js.map +0 -1
  907. package/dist/components/six-table-header-cell2.js +0 -120
  908. package/dist/components/six-table-header-cell2.js.map +0 -1
  909. package/dist/components/six-table-header.d.ts +0 -11
  910. package/dist/components/six-table-header.js +0 -8
  911. package/dist/components/six-table-header.js.map +0 -1
  912. package/dist/components/six-table-header2.js +0 -32
  913. package/dist/components/six-table-header2.js.map +0 -1
  914. package/dist/components/six-table-row.d.ts +0 -11
  915. package/dist/components/six-table-row.js +0 -8
  916. package/dist/components/six-table-row.js.map +0 -1
  917. package/dist/components/six-table-row2.js +0 -32
  918. package/dist/components/six-table-row2.js.map +0 -1
  919. package/dist/components/six-table.d.ts +0 -11
  920. package/dist/components/six-table.js +0 -252
  921. package/dist/components/six-table.js.map +0 -1
  922. package/dist/esm/event-listeners-570a24ea.js +0 -43
  923. package/dist/esm/event-listeners-570a24ea.js.map +0 -1
  924. package/dist/esm/execution-control-1a60d709.js.map +0 -1
  925. package/dist/esm/focus-visible-97933ea9.js.map +0 -1
  926. package/dist/esm/form-control-bdd1478a.js.map +0 -1
  927. package/dist/esm/index-96b1af5d.js.map +0 -1
  928. package/dist/esm/modal-5ebdc320.js.map +0 -1
  929. package/dist/esm/polyfills/css-shim.js +0 -1
  930. package/dist/esm/popover-bd2c2fca.js.map +0 -1
  931. package/dist/esm/scroll-180b53fd.js.map +0 -1
  932. package/dist/esm/six-dropdown_3.entry.js.map +0 -1
  933. package/dist/esm/six-form.entry.js +0 -227
  934. package/dist/esm/six-form.entry.js.map +0 -1
  935. package/dist/esm/six-table-cell_4.entry.js +0 -100
  936. package/dist/esm/six-table-cell_4.entry.js.map +0 -1
  937. package/dist/esm/six-table.entry.js +0 -163
  938. package/dist/esm/six-table.entry.js.map +0 -1
  939. package/dist/esm/six-timepicker.types-e161a447.js +0 -50
  940. package/dist/esm/six-timepicker.types-e161a447.js.map +0 -1
  941. package/dist/esm/slot-6f3984c7.js.map +0 -1
  942. package/dist/esm/types-4b10b413.js.map +0 -1
  943. package/dist/types/components/six-form/six-form.d.ts +0 -69
  944. package/dist/types/components/six-table/six-table.d.ts +0 -30
  945. package/dist/types/components/six-table/test/helpers.d.ts +0 -2
  946. package/dist/types/components/six-table/types.d.ts +0 -33
  947. package/dist/types/components/six-table/util/filter-by.d.ts +0 -2
  948. package/dist/types/components/six-table/util/from-data.d.ts +0 -8
  949. package/dist/types/components/six-table/util/is.d.ts +0 -3
  950. package/dist/types/components/six-table/util/quick-filter-by.d.ts +0 -2
  951. package/dist/types/components/six-table/util/sort-by.d.ts +0 -2
  952. package/dist/types/components/six-table-cell/six-table-cell.d.ts +0 -9
  953. package/dist/types/components/six-table-header/six-table-header.d.ts +0 -9
  954. package/dist/types/components/six-table-header-cell/get-next-state.d.ts +0 -2
  955. package/dist/types/components/six-table-header-cell/icons.d.ts +0 -3
  956. package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +0 -32
  957. package/dist/types/components/six-table-header-cell/types.d.ts +0 -2
  958. package/dist/types/components/six-table-header-cell/util/create-model.d.ts +0 -4
  959. package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +0 -3
  960. package/dist/types/components/six-table-row/six-table-row.d.ts +0 -9
  961. package/dist/types/components/six-timepicker/six-time-format.d.ts +0 -13
  962. package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +0 -36
  963. package/dist/types/utils/as-array.d.ts +0 -1
  964. package/dist/types/utils/matchers.d.ts +0 -2
  965. package/dist/types/utils/popper.d.ts +0 -33
  966. package/dist/types/utils/testing.d.ts +0 -2
  967. package/dist/ui-library/p-00507165.entry.js +0 -2
  968. package/dist/ui-library/p-00507165.entry.js.map +0 -1
  969. package/dist/ui-library/p-028a2c54.entry.js.map +0 -1
  970. package/dist/ui-library/p-028a2f77.entry.js +0 -2
  971. package/dist/ui-library/p-028a2f77.entry.js.map +0 -1
  972. package/dist/ui-library/p-0786fa7c.js +0 -2
  973. package/dist/ui-library/p-0786fa7c.js.map +0 -1
  974. package/dist/ui-library/p-0c89817e.entry.js +0 -2
  975. package/dist/ui-library/p-0c89817e.entry.js.map +0 -1
  976. package/dist/ui-library/p-0d1fdc4e.entry.js +0 -2
  977. package/dist/ui-library/p-0d1fdc4e.entry.js.map +0 -1
  978. package/dist/ui-library/p-0d9cbb51.entry.js +0 -2
  979. package/dist/ui-library/p-0d9cbb51.entry.js.map +0 -1
  980. package/dist/ui-library/p-12000282.entry.js.map +0 -1
  981. package/dist/ui-library/p-1414a242.entry.js +0 -2
  982. package/dist/ui-library/p-1414a242.entry.js.map +0 -1
  983. package/dist/ui-library/p-14db57aa.entry.js.map +0 -1
  984. package/dist/ui-library/p-16732ac1.entry.js.map +0 -1
  985. package/dist/ui-library/p-16b99232.js +0 -3
  986. package/dist/ui-library/p-16b99232.js.map +0 -1
  987. package/dist/ui-library/p-18ea0c56.js +0 -2
  988. package/dist/ui-library/p-18ea0c56.js.map +0 -1
  989. package/dist/ui-library/p-232d43a6.entry.js +0 -2
  990. package/dist/ui-library/p-232d43a6.entry.js.map +0 -1
  991. package/dist/ui-library/p-25a3bf57.js.map +0 -1
  992. package/dist/ui-library/p-28e6c2eb.entry.js +0 -2
  993. package/dist/ui-library/p-28e6c2eb.entry.js.map +0 -1
  994. package/dist/ui-library/p-2a02734a.entry.js +0 -2
  995. package/dist/ui-library/p-2a02734a.entry.js.map +0 -1
  996. package/dist/ui-library/p-2a61cc66.entry.js +0 -2
  997. package/dist/ui-library/p-2a61cc66.entry.js.map +0 -1
  998. package/dist/ui-library/p-3c100309.js +0 -2
  999. package/dist/ui-library/p-3c100309.js.map +0 -1
  1000. package/dist/ui-library/p-3d5cad2d.entry.js +0 -2
  1001. package/dist/ui-library/p-3d5cad2d.entry.js.map +0 -1
  1002. package/dist/ui-library/p-3e3edcbc.entry.js +0 -2
  1003. package/dist/ui-library/p-3e3edcbc.entry.js.map +0 -1
  1004. package/dist/ui-library/p-3efe46cf.entry.js.map +0 -1
  1005. package/dist/ui-library/p-4b44fa83.entry.js +0 -2
  1006. package/dist/ui-library/p-4b44fa83.entry.js.map +0 -1
  1007. package/dist/ui-library/p-4bcebd5a.entry.js.map +0 -1
  1008. package/dist/ui-library/p-4d4829db.entry.js.map +0 -1
  1009. package/dist/ui-library/p-4f8394d7.js.map +0 -1
  1010. package/dist/ui-library/p-524e5804.entry.js.map +0 -1
  1011. package/dist/ui-library/p-52cb61bd.entry.js.map +0 -1
  1012. package/dist/ui-library/p-55dc28ad.entry.js +0 -2
  1013. package/dist/ui-library/p-55dc28ad.entry.js.map +0 -1
  1014. package/dist/ui-library/p-57a84d7f.entry.js.map +0 -1
  1015. package/dist/ui-library/p-5eb21538.entry.js +0 -2
  1016. package/dist/ui-library/p-5eb21538.entry.js.map +0 -1
  1017. package/dist/ui-library/p-60c5395c.entry.js +0 -2
  1018. package/dist/ui-library/p-60c5395c.entry.js.map +0 -1
  1019. package/dist/ui-library/p-694829b8.entry.js.map +0 -1
  1020. package/dist/ui-library/p-6cc82df5.entry.js.map +0 -1
  1021. package/dist/ui-library/p-7115416e.entry.js +0 -2
  1022. package/dist/ui-library/p-7115416e.entry.js.map +0 -1
  1023. package/dist/ui-library/p-788281d0.entry.js.map +0 -1
  1024. package/dist/ui-library/p-7cbc261b.entry.js +0 -2
  1025. package/dist/ui-library/p-7cbc261b.entry.js.map +0 -1
  1026. package/dist/ui-library/p-80f32909.entry.js +0 -2
  1027. package/dist/ui-library/p-80f32909.entry.js.map +0 -1
  1028. package/dist/ui-library/p-8187701c.entry.js.map +0 -1
  1029. package/dist/ui-library/p-94ab37b2.entry.js.map +0 -1
  1030. package/dist/ui-library/p-9a860acc.js +0 -2
  1031. package/dist/ui-library/p-9a860acc.js.map +0 -1
  1032. package/dist/ui-library/p-9eba5c71.entry.js +0 -2
  1033. package/dist/ui-library/p-9eba5c71.entry.js.map +0 -1
  1034. package/dist/ui-library/p-9f9bef35.entry.js.map +0 -1
  1035. package/dist/ui-library/p-b1683e9c.entry.js +0 -2
  1036. package/dist/ui-library/p-b1683e9c.entry.js.map +0 -1
  1037. package/dist/ui-library/p-b1e66136.js +0 -2
  1038. package/dist/ui-library/p-b1e66136.js.map +0 -1
  1039. package/dist/ui-library/p-b3974ad4.entry.js.map +0 -1
  1040. package/dist/ui-library/p-b4dfb7cf.js +0 -2
  1041. package/dist/ui-library/p-b4dfb7cf.js.map +0 -1
  1042. package/dist/ui-library/p-b66c5c48.entry.js +0 -2
  1043. package/dist/ui-library/p-b66c5c48.entry.js.map +0 -1
  1044. package/dist/ui-library/p-ba6e1f0e.entry.js +0 -2
  1045. package/dist/ui-library/p-ba6e1f0e.entry.js.map +0 -1
  1046. package/dist/ui-library/p-c799a6bf.entry.js +0 -2
  1047. package/dist/ui-library/p-c799a6bf.entry.js.map +0 -1
  1048. package/dist/ui-library/p-ccee090e.entry.js.map +0 -1
  1049. package/dist/ui-library/p-cf2bdd34.entry.js +0 -2
  1050. package/dist/ui-library/p-cf2bdd34.entry.js.map +0 -1
  1051. package/dist/ui-library/p-d12c6092.js +0 -2
  1052. package/dist/ui-library/p-d12c6092.js.map +0 -1
  1053. package/dist/ui-library/p-dd0ac344.entry.js +0 -2
  1054. package/dist/ui-library/p-dd0ac344.entry.js.map +0 -1
  1055. package/dist/ui-library/p-def4a925.entry.js +0 -2
  1056. package/dist/ui-library/p-def4a925.entry.js.map +0 -1
  1057. package/dist/ui-library/p-e0bda772.entry.js +0 -2
  1058. package/dist/ui-library/p-e0bda772.entry.js.map +0 -1
  1059. package/dist/ui-library/p-e1aed7ed.entry.js.map +0 -1
  1060. package/dist/ui-library/p-e4b6264b.entry.js.map +0 -1
  1061. package/dist/ui-library/p-eb1ec1b7.entry.js.map +0 -1
  1062. package/dist/ui-library/p-eb8f05a9.js.map +0 -1
  1063. package/dist/ui-library/p-f65aa796.entry.js +0 -2
  1064. package/dist/ui-library/p-f65aa796.entry.js.map +0 -1
  1065. package/dist/ui-library/p-f68b5c54.entry.js.map +0 -1
  1066. package/dist/ui-library/p-f9c50f81.entry.js +0 -2
  1067. package/dist/ui-library/p-f9c50f81.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixTextareaCss","id","SixTextarea","this","inputId","labelId","helpTextId","errorTextId","customErrorText","customValidation","eventListeners","EventListeners","defaultValue","handleLabelChange","handleSlotChange","handleRowsChange","textarea","setTextareaHeight","handleValueChange","value","invalid","checkValidity","sixValueChange","emit","connectedCallback","handleChange","bind","handleInput","handleInvalid","handleBlur","handleFocus","host","shadowRoot","addEventListener","componentWillLoad","componentDidLoad","resizeObserver","ResizeObserver","observe","add","event","hasErrorTextSlot","errorText","validationMessage","preventDefault","disconnectedCallback","unobserve","removeEventListener","removeAll","async","options","focus","blur","select","selectionStart","selectionEnd","selectionDirection","setSelectionRange","replacement","start","end","selectMode","setRangeText","sixChange","sixInput","reportValidity","validity","valid","message","setCustomValidity","hasFocus","sixBlur","sixFocus","hasLabelSlot","hasSlot","hasHelpTextSlot","resize","style","height","scrollHeight","undefined","displayError","errorOnBlur","render","h","FormControl","label","helpText","size","disabled","required","part","class","_a","length","ref","el","name","placeholder","readOnly","readonly","rows","minLength","minlength","maxLength","maxlength","autoCapitalize","autocapitalize","autoCorrect","autocorrect","autoFocus","autofocus","spellcheck","inputMode","inputmode","onChange","onInput","onInvalid","onFocus","onBlur"],"sources":["./src/components/six-textarea/six-textarea.scss?tag=six-textarea&encapsulation=shadow","./src/components/six-textarea/six-textarea.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n:host {\n display: block;\n}\n\n.textarea {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n font-family: var(--six-font-family);\n font-weight: var(--six-input-font-weight);\n line-height: var(--six-line-height-normal);\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: text;\n\n &:hover:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-hover);\n border-color: var(--six-input-border-color-hover);\n\n .textarea__control {\n color: var(--six-input-color-hover);\n }\n }\n\n &.textarea--focused:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-focus);\n box-shadow: var(--six-input-focus-shadow);\n border-color: var(--six-input-border-color-focus);\n color: var(--six-input-color-focus);\n\n .textarea__control {\n color: var(--six-input-color-focus);\n }\n }\n\n &.textarea--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n cursor: not-allowed;\n\n .textarea__control {\n color: var(--six-input-color-disabled);\n\n &::placeholder {\n color: var(--six-input-placeholder-color-disabled);\n }\n }\n }\n}\n\n.textarea__control {\n flex: 1 1 auto;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: 1.4;\n color: var(--sl-input-color);\n border: none;\n background: none;\n box-shadow: none;\n cursor: inherit;\n -webkit-appearance: none;\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--six-input-placeholder-color);\n user-select: none;\n }\n\n &:focus {\n outline: none;\n }\n}\n\n.textarea--invalid:not(.textarea--disabled):not(.textarea--focused) {\n border-color: var(--six-input-border-color-danger);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--small {\n border-radius: var(--six-input-border-radius-small);\n font-size: var(--six-input-font-size-small);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-small);\n }\n}\n\n.textarea--medium {\n border-radius: var(--six-input-border-radius-medium);\n font-size: var(--six-input-font-size-medium);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-medium);\n }\n}\n\n.textarea--large {\n border-radius: var(--six-input-border-radius-large);\n font-size: var(--six-input-font-size-large);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Resize types\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--resize-none .textarea__control {\n resize: none;\n}\n\n.textarea--resize-vertical .textarea__control {\n resize: vertical;\n}\n\n.textarea--resize-auto .textarea__control {\n height: auto;\n resize: 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 { EventListeners } from '../../utils/event-listeners';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The textarea's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The textarea label.\n * @part textarea - The textarea control.\n * @part help-text - The textarea help text.\n */\n@Component({\n tag: 'six-textarea',\n styleUrl: 'six-textarea.scss',\n shadow: true,\n})\nexport class SixTextarea {\n inputId = `textarea-${++id}`;\n labelId = `textarea-label-${id}`;\n helpTextId = `textarea-help-text-${id}`;\n errorTextId = `input-error-text-${id}`;\n resizeObserver: ResizeObserver;\n textarea: HTMLTextAreaElement;\n customErrorText = '';\n customValidation = false;\n\n readonly eventListeners = new EventListeners();\n\n @Element() host: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasErrorTextSlot = false;\n @State() hasLabelSlot = false;\n\n /** The textarea's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The textarea's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** The textarea's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\n\n /** The textarea's placeholder text. */\n @Prop() placeholder: string;\n\n /** The number of rows to display by default. */\n @Prop() rows = 4;\n\n /** Controls how the textarea can be resized. */\n @Prop() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Set to true to disable the textarea. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true for a readonly textarea. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength: number;\n\n /** The textarea's required attribute. */\n @Prop({ reflect: true }) required: boolean;\n\n /**\n * This will be true when the control is in an invalid state. Validity is determined by props such as `required`,\n * `minlength`, and `maxlength` using the browser's constraint validation API.\n */\n @Prop({ mutable: true, reflect: true }) invalid = false;\n\n /** The textarea's autocaptialize attribute. */\n @Prop() autocapitalize: string;\n\n /** The textarea's autocorrect attribute. */\n @Prop() autocorrect: string;\n\n /** The textarea's autocomplete attribute. */\n @Prop() autocomplete: string;\n\n /** The textarea's autofocus attribute. */\n @Prop() autofocus: boolean;\n\n /** The textarea's spellcheck attribute. */\n @Prop() spellcheck: boolean;\n\n /** The textarea's inputmode attribute. */\n @Prop() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-change' }) sixChange: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-input' }) sixInput: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-textarea-focus' }) sixFocus: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-blur' }) sixBlur: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted whenever the value changes. Access the new value via event.target.value.\n * six-textarea-value-change will emit whenever the value changes.\n * So be it on textarea or when dynamically set. six-textarea-input will only be emitted when the user enters data,\n * but not when a value is dynamically set. six-textarea-change will only be emitted when the user either presses enter\n * or leaves the textarea field after entering some data.\n * */\n\n @Event({ eventName: 'six-textarea-value-change' }) sixValueChange: EventEmitter<EmptyPayload>;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('rows')\n handleRowsChange() {\n if (this.textarea) {\n this.setTextareaHeight();\n }\n }\n\n @Watch('value')\n handleValueChange() {\n if (!this.textarea) {\n return;\n }\n this.textarea.value = this.value;\n this.invalid = !this.textarea.checkValidity();\n this.sixValueChange.emit();\n }\n\n /** default value the textarea will be reverted to when reset is executed */\n private defaultValue = '';\n\n connectedCallback() {\n this.handleChange = this.handleChange.bind(this);\n this.handleInput = this.handleInput.bind(this);\n this.handleInvalid = this.handleInvalid.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleSlotChange = this.handleSlotChange.bind(this);\n\n this.host.shadowRoot.addEventListener('slotchange', this.handleSlotChange);\n }\n\n componentWillLoad() {\n this.defaultValue = this.value || '';\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.setTextareaHeight();\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n this.resizeObserver.observe(this.textarea);\n this.eventListeners.add(this.textarea, 'invalid', (event) => {\n if (this.customValidation || (!this.hasErrorTextSlot && !this.errorText && !this.customErrorText)) {\n this.customErrorText = this.textarea.validationMessage;\n }\n event.preventDefault();\n });\n }\n\n disconnectedCallback() {\n this.resizeObserver.unobserve(this.textarea);\n this.host.shadowRoot.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the textarea. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.textarea.focus(options);\n }\n\n /** Removes focus fromt the textarea. */\n @Method()\n async removeFocus() {\n this.textarea.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.textarea.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.textarea.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n this.textarea.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.textarea.value) {\n this.value = this.textarea.value;\n this.setTextareaHeight();\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.textarea.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n return this.textarea.validity.valid;\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n this.customErrorText = '';\n this.customValidation = message !== '';\n this.textarea.setCustomValidity(message);\n this.invalid = !this.textarea.checkValidity();\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.value = this.defaultValue;\n this.customErrorText = '';\n this.customValidation = false;\n this.textarea.setCustomValidity('');\n this.invalid = false;\n }\n\n handleChange() {\n this.sixChange.emit();\n }\n\n handleInput() {\n this.value = this.textarea.value;\n this.setTextareaHeight();\n this.sixInput.emit();\n }\n\n handleInvalid() {\n this.invalid = true;\n }\n\n handleBlur() {\n this.hasFocus = false;\n this.sixBlur.emit();\n }\n\n handleFocus() {\n this.hasFocus = true;\n this.sixFocus.emit();\n }\n\n handleSlotChange() {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n }\n\n setTextareaHeight() {\n if (this.resize === 'auto') {\n this.textarea.style.height = 'auto';\n this.textarea.style.height = this.textarea.scrollHeight + 'px';\n } else {\n this.textarea.style.height = undefined;\n }\n }\n\n displayError() {\n return this.invalid && (!this.errorOnBlur || !this.hasFocus);\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 helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.customErrorText ? this.customErrorText : this.errorText}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.displayError()}\n >\n <div\n part=\"base\"\n class={{\n textarea: true,\n\n // Sizes\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n\n // States\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': this.value?.length === 0,\n 'textarea--invalid': this.invalid,\n\n // Modifiers\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n }}\n >\n <textarea\n part=\"textarea\"\n ref={(el) => (this.textarea = el)}\n id={this.inputId}\n class=\"textarea__control\"\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n rows={this.rows}\n minLength={this.minlength}\n maxLength={this.maxlength}\n value={this.value}\n autoCapitalize={this.autocapitalize}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onInvalid={this.handleInvalid}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n </FormControl>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAiB,wwKCMvB,IAAIC,EAAK,E,MAuBIC,EAAW,M,uQACtBC,KAAAC,QAAU,cAAcH,IACxBE,KAAAE,QAAU,kBAAkBJ,IAC5BE,KAAAG,WAAa,sBAAsBL,IACnCE,KAAAI,YAAc,oBAAoBN,IAGlCE,KAAAK,gBAAkB,GAClBL,KAAAM,iBAAmB,MAEVN,KAAAO,eAAiB,IAAIC,EA6HtBR,KAAAS,aAAe,G,cAzHH,M,qBACO,M,sBACC,M,kBACJ,M,UAGsC,S,UAG9B,G,WAGgB,G,WAGhC,G,cAGG,G,eAGC,G,qCAML,E,YAGgC,W,cAGX,M,cAGA,M,uFAec,M,kLAqB5B,K,CA2BtBC,oBACEV,KAAKW,kB,CAIPC,mBACE,GAAIZ,KAAKa,SAAU,CACjBb,KAAKc,mB,EAKTC,oBACE,IAAKf,KAAKa,SAAU,CAClB,M,CAEFb,KAAKa,SAASG,MAAQhB,KAAKgB,MAC3BhB,KAAKiB,SAAWjB,KAAKa,SAASK,gBAC9BlB,KAAKmB,eAAeC,M,CAMtBC,oBACErB,KAAKsB,aAAetB,KAAKsB,aAAaC,KAAKvB,MAC3CA,KAAKwB,YAAcxB,KAAKwB,YAAYD,KAAKvB,MACzCA,KAAKyB,cAAgBzB,KAAKyB,cAAcF,KAAKvB,MAC7CA,KAAK0B,WAAa1B,KAAK0B,WAAWH,KAAKvB,MACvCA,KAAK2B,YAAc3B,KAAK2B,YAAYJ,KAAKvB,MACzCA,KAAKW,iBAAmBX,KAAKW,iBAAiBY,KAAKvB,MAEnDA,KAAK4B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SACfT,aAAc9E,KAAK8E,gBAEnBG,EAAA,OACEO,KAAK,OACLC,MAAO,CACL5E,SAAU,KAGV,kBAAmBb,KAAKqF,OAAS,QACjC,mBAAoBrF,KAAKqF,OAAS,SAClC,kBAAmBrF,KAAKqF,OAAS,QAGjC,qBAAsBrF,KAAKsF,SAC3B,oBAAqBtF,KAAKmE,SAC1B,oBAAmBuB,EAAA1F,KAAKgB,SAAK,MAAA0E,SAAA,SAAAA,EAAEC,UAAW,EAC1C,oBAAqB3F,KAAKiB,QAG1B,wBAAyBjB,KAAKyE,SAAW,OACzC,4BAA6BzE,KAAKyE,SAAW,WAC7C,wBAAyBzE,KAAKyE,SAAW,SAG3CQ,EAAA,YACEO,KAAK,WACLI,IAAMC,GAAQ7F,KAAKa,SAAWgF,EAC9B/F,GAAIE,KAAKC,QACTwF,MAAM,oBACNK,KAAM9F,KAAK8F,KACXC,YAAa/F,KAAK+F,YAClBT,SAAUtF,KAAKsF,SACfU,SAAUhG,KAAKiG,SACfC,KAAMlG,KAAKkG,KACXC,UAAWnG,KAAKoG,UAChBC,UAAWrG,KAAKsG,UAChBtF,MAAOhB,KAAKgB,MACZuF,eAAgBvG,KAAKwG,eACrBC,YAAazG,KAAK0G,YAClBC,UAAW3G,KAAK4G,UAChBC,WAAY7G,KAAK6G,WACjBtB,SAAUvF,KAAKuF,SACfuB,UAAW9G,KAAK+G,UAAS,kBACR/G,KAAKE,QACtB8G,SAAUhH,KAAKsB,aACf2F,QAASjH,KAAKwB,YACd0F,UAAWlH,KAAKyB,cAChB0F,QAASnH,KAAK2B,YACdyF,OAAQpH,KAAK0B,c"}
@@ -1,2 +0,0 @@
1
- import{r as i,c as t,h as s,g as e}from"./p-16b99232.js";import{s as n}from"./p-eb8f05a9.js";import{P as o}from"./p-18ea0c56.js";import{E as r}from"./p-9a860acc.js";import{b as h,a as l}from"./p-b4dfb7cf.js";import{D as a,a as d}from"./p-0786fa7c.js";function u(i){const t=i.tabIndex;return t>-1}function c(i){if(u(i)){return i}if(i.shadowRoot){const t=[...i.shadowRoot.children].find(u);if(t){return t}}if(i.children){return[...i.children].map(c)[0]}return null}const f=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}: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{max-height:50vh;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);box-shadow:var(--six-elevation-2dp);opacity:0;overflow:auto;overscroll-behavior:none;pointer-events:none;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;scrollbar-width:thin}.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}";const m=i=>t=>(t===null||t===void 0?void 0:t.tagName.toLowerCase())===i.toLowerCase();const p=m("six-menu");const v=m("six-menu-item");let g=0;const x=class{constructor(e){i(this,e);this.sixShow=t(this,"six-dropdown-show",7);this.sixAfterShow=t(this,"six-dropdown-after-show",7);this.sixHide=t(this,"six-dropdown-hide",7);this.sixAfterHide=t(this,"six-dropdown-after-hide",7);this.sixAutoFilterFired=t(this,"six-dropdown-auto-filter-fired",7);this.sixAsyncFilterFired=t(this,"six-async-filter-fired",7);this.sixScroll=t(this,"six-dropdown-scroll",7);this.componentId=`dropdown-${++g}`;this.isVisible=false;this.hasBeenInitialized=false;this.eventListeners=new r;this.getMenuItems=()=>{if(this._options!==null){return this._options.map((i=>s("six-menu-item",{value:i.value},i.label)))}const[i]=h(this.panel);return h(i)||Array.from(i.querySelectorAll("six-menu-item"))};this.handleFilterInputChange=()=>{var i,t;const s=((t=(i=this.filterInputElement.value)===null||i===void 0?void 0:i.toLowerCase())===null||t===void 0?void 0:t.trim())||"";if(this._options){this.handleFilteringForAttributeItems(s)}else{this.handleFilteringForSlotItems(s)}this.sixAutoFilterFired.emit({filterValue:s})};this.open=false;this.placement="bottom-start";this.closeOnSelect=true;this.distance=0;this.skidding=0;this.hoist=false;this.containingElement=undefined;this.filter=false;this.asyncFilter=false;this.filterPlaceholder="Filter...";this.autofocusFilter=true;this.filterDebounce=a;this.disableHideOnEnterAndSpace=false;this.options=null;this.virtualScroll=false;this._options=null}get hasFilterEnabled(){return this.filter||this.asyncFilter}get container(){return this.containingElement||this.host}handleOpenChange(){this.open?this.show():this.hide();this.updateAccessibleTrigger()}handlePopoverOptionsChange(){this.popover.setOptions({strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding})}handleOptionsChange(){this._options=[...this.options]}connectedCallback(){if(this.virtualScroll&&this.options===null){console.error("Options must be defined when using virtual scrolling")}if(this.options!==null){this._options=[...this.options]}this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this);this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this);this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this);this.handlePanelSelect=this.handlePanelSelect.bind(this);this.handleTriggerClick=this.handleTriggerClick.bind(this);this.handleTriggerKeyDown=this.handleTriggerKeyDown.bind(this);this.handleTriggerKeyUp=this.handleTriggerKeyUp.bind(this);this.handleTriggerSlotChange=this.handleTriggerSlotChange.bind(this);this.handleDropdownScroll=this.handleDropdownScroll.bind(this);if(this.hasBeenInitialized&&!this.popover){this.initializePopover()}}componentDidLoad(){this.hasBeenInitialized=true;this.initializePopover();if(this.open){void this.show()}if(this.filter){this.setupFiltering(this.handleFilterInputChange)}else if(this.asyncFilter){this.setupFiltering((()=>this.sixAsyncFilterFired.emit({filterValue:this.filterInputElement.value})))}}initializePopover(){const i=()=>{if(this.filter){this.filterInputElement.value="";if(this._options!==null){this._options=[...this.options]}else{const i=this.getMenuItems();i.forEach((i=>i.style.display="unset"))}}this.sixAfterHide.emit()};const t=async()=>{if(this.hasFilterEnabled&&this.autofocusFilter){await this.filterInputElement.setFocus()}this.sixAfterShow.emit()};const s=()=>{if(!this.open){this.panel.scrollTop=0}};this.popover=new o(this.trigger,this.positioner,{strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding,transitionElement:this.panel,onAfterHide:i,onAfterShow:t,onTransitionEnd:s})}setupFiltering(i){this.eventListeners.add(this.filterInputElement,"six-input-input",d(i,this.filterDebounce))}handleFilteringForAttributeItems(i){if(i===""){this._options=[...this.options];return}this._options=this.options.filter((t=>{var s,e,n,o;return t.label&&((e=(s=String(t.label))===null||s===void 0?void 0:s.toLowerCase())===null||e===void 0?void 0:e.includes(i))||t.value&&((o=(n=String(t.value))===null||n===void 0?void 0:n.toLowerCase())===null||o===void 0?void 0:o.includes(i))}))}handleFilteringForSlotItems(i){const t=this.getMenuItems();t.forEach((async t=>{var s,e,n,o;const r=((e=(s=t===null||t===void 0?void 0:t.value)===null||s===void 0?void 0:s.toLowerCase())===null||e===void 0?void 0:e.includes(i))||((o=(n=await(t===null||t===void 0?void 0:t.getTextLabel()))===null||n===void 0?void 0:n.toLowerCase())===null||o===void 0?void 0:o.includes(i));t.style.display=r?"unset":"none"}))}disconnectedCallback(){this.eventListeners.removeAll();void this.hide();this.popover.destroy();this.popover=null}async show(){if(this.isVisible){return}const i=this.sixShow.emit();if(i.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;this.popover.show()}async hide(){if(!this.isVisible){return}const i=this.sixHide.emit();if(i.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(){const[i]=h(this.trigger);if(i){if(typeof i.setFocus==="function"){i.setFocus()}else if(typeof i.focus==="function"){i.focus()}}}getMenu(){const[i]=h(this.panel).filter(p);return i}async reposition(){if(!this.open){return}this.popover.reposition()}handleDocumentKeyDown(i){if(i.key==="Escape"){void this.hide();this.focusOnTrigger();return}if(this.filterInputElement===this.host.shadowRoot.activeElement){if(i.key==="ArrowDown"){const i=this.getMenuItems().find((i=>i.style.display!=="none"));if(i){i.setFocus()}}}if(i.key==="Tab"){if(this.open&&v(document.activeElement)){i.preventDefault();void this.hide();this.focusOnTrigger();return}setTimeout((()=>{var i;const t=this.container.getRootNode()instanceof ShadowRoot?(i=document.activeElement.shadowRoot)===null||i===void 0?void 0:i.activeElement:document.activeElement;if((t===null||t===void 0?void 0:t.closest(this.container.tagName.toLowerCase()))!==this.container){void this.hide();return}}))}}handleDocumentMouseDown(i){const t=i.composedPath();if(!t.includes(this.container)){void this.hide();return}}handleMenuItemActivate(i){const t=i.target;n(t,this.panel)}handlePanelSelect(i){const t=i.target;if(this.closeOnSelect&&p(t)){void this.hide();this.focusOnTrigger()}}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(i){const t=this.getMenu();const s=t?[...t.querySelectorAll("six-menu-item")]:null;const e=s[0];const n=s[s.length-1];if(i.key==="Escape"){this.focusOnTrigger();void this.hide();return}if(!this.disableHideOnEnterAndSpace&&[" ","Enter"].includes(i.key)){i.preventDefault();this.open?void this.hide():void this.show();return}if(["ArrowDown","ArrowUp"].includes(i.key)){i.preventDefault();if(!this.open){void this.show()}if(i.key==="ArrowDown"&&e){e.setFocus();return}if(i.key==="ArrowUp"&&n){n.setFocus();return}}const o=["Tab","Shift","Meta","Ctrl","Alt"];if(this.open&&t&&!o.includes(i.key)){void t.typeToSelect(i.key);return}}handleTriggerKeyUp(i){if(i.key===" "){i.preventDefault()}}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDropdownScroll(){this.sixScroll.emit({scrollHeight:this.panel.scrollHeight,scrollTop:this.panel.scrollTop,scrollbarHeight:this.panel.offsetHeight*(this.panel.offsetHeight/this.panel.scrollHeight),scrollRatio:this.panel.scrollTop/(this.panel.scrollHeight-this.panel.clientHeight)})}updateAccessibleTrigger(){const[i]=h(this.trigger).map(c);if(i){i.setAttribute("aria-haspopup","true");i.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:i=>this.trigger=i,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown,onKeyUp:this.handleTriggerKeyUp},s("slot",{name:"trigger",onSlotchange:this.handleTriggerSlotChange})),s("div",{ref:i=>this.positioner=i,class:{dropdown__positioner:true,dropdown__positioner__filtered:(this.filter||this.asyncFilter)&&!this.hoist}},this.hasFilterEnabled&&s("six-input",{class:{"filter-hidden":!this.open},"aria-hidden":this.open?"false":"true",ref:i=>this.filterInputElement=i,placeholder:this.filterPlaceholder}),s("div",{ref:i=>this.panel=i,part:"panel",class:"dropdown__panel",role:"menu","aria-hidden":this.open?"false":"true","aria-labelledby":this.componentId,onScroll:this.handleDropdownScroll},s("slot",null),this._options&&s("six-menu",{part:"menu",items:this._options,virtualScroll:this.virtualScroll}))))}get host(){return e(this)}static get watchers(){return{open:["handleOpenChange"],distance:["handlePopoverOptionsChange"],hoist:["handlePopoverOptionsChange"],placement:["handlePopoverOptionsChange"],skidding:["handlePopoverOptionsChange"],options:["handleOptionsChange"]}}};x.style=f;const w=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.menu{padding:0 0;border:none;box-shadow:var(--six-elevation-2dp)}.menu:focus{outline:none}.menu--noshadow{box-shadow:none}.menu__wrapper--scrollable{overflow-y:auto}";const b=i=>{var t,s,e;return(e=(s=(t=i===null||i===void 0?void 0:i.shadowRoot)===null||t===void 0?void 0:t.querySelector(".menu-item"))===null||s===void 0?void 0:s.classList)===null||e===void 0?void 0:e.contains("menu-item--focused")};const _=i=>(i===null||i===void 0?void 0:i.tagName.toLowerCase())==="six-menu-item";const y=({value:i,label:t})=>s("six-menu-item",{value:i},t);const k=5;const A=64;const C=undefined;const S=class{constructor(s){i(this,s);this.sixMenuItemSelected=t(this,"six-menu-item-selected",7);this.eventListeners=new r;this.typeToSelectString="";this.handleScrolling=()=>{this.scrollingIndex=Math.floor(this.menuWrapper.scrollTop/this.sixMenuItemHeight)};this.removeBoxShadow=false;this.items=null;this.itemsShown=C;this.virtualScroll=false;this.itemSize=10;this.scrollingDebounce=15;this.scrollingIndex=0;this.sixMenuItemHeight=A}connectedCallback(){this.handleClick=this.handleClick.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this)}componentWillLoad(){if(this.items===null){return}}componentDidLoad(){this.setupForVirtualScrollingAfterRendering()}disconnectedCallback(){this.eventListeners.removeAll()}async typeToSelect(i){var t;clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=setTimeout((()=>this.typeToSelectString=""),750);this.typeToSelectString+=i.toLowerCase();const s=this.getItems();for(const i of s){const s=(t=i.shadowRoot)===null||t===void 0?void 0:t.querySelector("slot:not([name])");const e=l(s).toLowerCase().trim();if(e.substring(0,this.typeToSelectString.length)===this.typeToSelectString){i.setFocus();break}}}getItemsShown(){var i;const t=this.virtualScroll?k:C;return(i=this.itemsShown)!==null&&i!==void 0?i:t}setupForVirtualScrollingAfterRendering(){var i,t;if(!this.virtualScroll){return}this.eventListeners.add(this.menuWrapper,"scroll",d(this.handleScrolling,this.scrollingDebounce));const s=(t=(i=this.menu)===null||i===void 0?void 0:i.querySelector("six-menu-item"))===null||t===void 0?void 0:t.clientHeight;if(s&&s>0){this.sixMenuItemHeight=s}}getItems(){if(this.items!==null&&this.items!==undefined){return this.items.map(y)}const i=this.menu.querySelector("slot");return[...i.assignedElements({flatten:true})].filter((i=>_(i)&&!i.disabled))}getActiveItemIndex(){const i=this.getItems();const t=this.getActiveItem();const s=i.indexOf(t);if(s>-1){return s}const e=this.extractItemsFromDOM();return e.findIndex(b)}getActiveItem(){var i;const t=this.getItems().find((i=>i===document.activeElement));if(t){return t}return(i=this.extractItemsFromDOM())===null||i===void 0?void 0:i.find(b)}extractItemsFromDOM(){var i,t;return Array.from((t=(i=this.host)===null||i===void 0?void 0:i.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("six-menu-item"))}setActiveItem(i){i.setFocus()}handleClick(i){const t=i.target;const s=t.closest("six-menu-item");if(s&&!s.disabled){this.sixMenuItemSelected.emit({name:s.value,item:s})}}handleKeyDown(i){if(i.key==="Enter"){const t=this.getActiveItem();i.preventDefault();if(t){this.sixMenuItemSelected.emit({name:t.value,item:t})}}if(i.key===" "){i.preventDefault()}if(["ArrowDown","ArrowUp","Home","End"].includes(i.key)){const t=this.items===null?this.getItems():this.extractItemsFromDOM();let s=this.getActiveItemIndex();if(t.length){i.preventDefault();if(i.key==="ArrowDown"){s++}else if(i.key==="ArrowUp"){s--}else if(i.key==="Home"){s=0}else if(i.key==="End"){s=t.length-1}if(s<0)s=0;if(s>t.length-1)s=t.length-1;this.setActiveItem(t[s]);return}}void this.typeToSelect(i.key)}getMenuWrapperStyle(){const i={};if(this.getItemsShown()>0){i.height=`${this.getItemsShown()*this.sixMenuItemHeight}px`}return Object.assign({},i)}getMenuContainerStyle(){const i={};if(this.virtualScroll){i.transform=`translateY(${this.sixMenuItemHeight*this.scrollingIndex}px)`}return Object.assign({},i)}getScrollbarGhostStyle(){const i={};if(this.virtualScroll&&this.items!==null){i.height=`${this.items.length*this.sixMenuItemHeight-this.itemSize*this.sixMenuItemHeight}px`}return Object.assign({},i)}renderItems(){if(this.items===undefined||this.items===null){return}if(!this.virtualScroll){return this.items.map(y)}return this.items.slice(this.scrollingIndex,Math.min(this.items.length,this.itemSize+this.scrollingIndex)).map(y)}render(){return s("div",{ref:i=>this.menuWrapper=i,style:this.getMenuWrapperStyle(),part:"wrapper",class:{menu:true,"menu--noshadow":this.removeBoxShadow,"menu__wrapper--scrollable":this.getItemsShown()>0}},s("div",{ref:i=>this.menu=i,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)}};S.style=w;const D=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{display:block}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);text-align:left;color:var(--six-input-color);border-radius:var(--six-border-radius-medium);padding:var(--six-spacing-medium) var(--six-spacing-medium);transition:var(--six-transition-fast) fill;user-select:none;white-space:nowrap;cursor:pointer}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto;align-self:center}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(:last-child){margin-right:0.5em}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(:first-child){margin-left:0.5em}.menu-item .menu-item__check{flex:0 0 auto;display:flex;align-items:center;margin-left:var(--six-spacing-small);visibility:hidden;font-size:inherit}.menu-item--checked .menu-item__check{visibility:visible}";const z=class{constructor(t){i(this,t);this.hasFocus=false;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)}async setFocus(i){this.menuItem.focus(i)}async removeFocus(){this.menuItem.blur()}getTextLabel(){return Promise.resolve(l(this.defaultSlot))}handleBlur(){this.hasFocus=false}handleFocus(){this.hasFocus=true}handleMouseEnter(){this.setFocus()}handleMouseLeave(){this.removeFocus()}render(){return s("div",{ref:i=>this.menuItem=i,part:"base",class:{"menu-item":true,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--focused":this.hasFocus},role:"menuitem","aria-disabled":this.disabled?"true":"false","aria-checked":this.checked?"true":"false",tabIndex:!this.disabled?0:null,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},s("span",{part:"prefix",class:"menu-item__prefix"},s("slot",{name:"prefix"})),s("span",{part:"label",class:"menu-item__label"},s("slot",{ref:i=>this.defaultSlot=i})),s("span",{part:"suffix",class:"menu-item__suffix"},s("slot",{name:"suffix"})),s("span",{part:"checked-icon",class:"menu-item__check"},s("six-icon",{size:"small","aria-hidden":"true"},"check")))}};z.style=D;export{x as six_dropdown,S as six_menu,z as six_menu_item};
2
- //# sourceMappingURL=p-0d9cbb51.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isTabbable","el","tabIndex","getNearestTabbableElement","shadowRoot","tabbableShadowChild","children","find","map","sixDropdownCss","isTagName","name","tagName","toLowerCase","isSixMenu","isSixMenuItem","id","SixDropdown","this","componentId","isVisible","hasBeenInitialized","eventListeners","EventListeners","getMenuItems","_options","option","h","value","label","panel","getSlotChildren","Array","from","querySelectorAll","handleFilterInputChange","lowerCaseFilterTerm","_b","_a","filterInputElement","trim","handleFilteringForAttributeItems","handleFilteringForSlotItems","sixAutoFilterFired","emit","filterValue","DEFAULT_DEBOUNCE_FAST","hasFilterEnabled","filter","asyncFilter","container","containingElement","host","handleOpenChange","open","show","hide","updateAccessibleTrigger","handlePopoverOptionsChange","popover","setOptions","strategy","hoist","placement","distance","skidding","handleOptionsChange","options","connectedCallback","virtualScroll","console","error","handleDocumentKeyDown","bind","handleDocumentMouseDown","handleMenuItemActivate","handlePanelSelect","handleTriggerClick","handleTriggerKeyDown","handleTriggerKeyUp","handleTriggerSlotChange","handleDropdownScroll","initializePopover","componentDidLoad","setupFiltering","sixAsyncFilterFired","onAfterHide","menuItems","forEach","item","style","display","sixAfterHide","onAfterShow","async","autofocusFilter","setFocus","sixAfterShow","onTransitionEnd","scrollTop","Popover","trigger","positioner","transitionElement","callback","add","debounce","filterDebounce","String","includes","_d","_c","menuItem","elementContainsFilterTerm","getTextLabel","disconnectedCallback","removeAll","destroy","sixShow","defaultPrevented","document","sixHide","remove","focusOnTrigger","focus","getMenu","menu","reposition","event","key","activeElement","preventDefault","setTimeout","getRootNode","ShadowRoot","closest","path","composedPath","target","scrollIntoView","closeOnSelect","firstMenuItem","lastMenuItem","length","disableHideOnEnterAndSpace","ignoredKeys","typeToSelect","sixScroll","scrollHeight","scrollbarHeight","offsetHeight","scrollRatio","clientHeight","accessibleTrigger","setAttribute","render","part","class","dropdown","ref","onClick","onKeyDown","onKeyUp","onSlotchange","dropdown__positioner","dropdown__positioner__filtered","placeholder","filterPlaceholder","role","onScroll","items","sixMenuCss","isFocusedMenuItem","querySelector","classList","contains","isSIXMenuItemElement","mapToMenuItem","DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING","DEFAULT_SIX_MENU_ITEM_HEIGHT","ITEMS_SHOWN_NOT_SET","undefined","SixMenu","typeToSelectString","handleScrolling","scrollingIndex","Math","floor","menuWrapper","sixMenuItemHeight","handleClick","handleKeyDown","componentWillLoad","setupForVirtualScrollingAfterRendering","clearTimeout","typeToSelectTimeout","getItems","slot","getTextContent","substring","getItemsShown","defaultItemsShown","itemsShown","scrollingDebounce","menuItemHeight","assignedElements","flatten","disabled","getActiveItemIndex","selectedItem","getActiveItem","itemIndex","indexOf","sixMenuItems","extractItemsFromDOM","findIndex","i","setActiveItem","clickedItem","sixMenuItemSelected","activeItem","indexOfActiveItem","getMenuWrapperStyle","styles","height","Object","assign","getMenuContainerStyle","transform","getScrollbarGhostStyle","itemSize","renderItems","slice","min","removeBoxShadow","sixMenuItemCss","SixMenuItem","handleBlur","handleFocus","handleMouseEnter","handleMouseLeave","blur","Promise","resolve","defaultSlot","hasFocus","removeFocus","checked","onFocus","onBlur","onMouseEnter","onMouseLeave","size"],"sources":["./src/utils/tabbable.ts","./src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","./src/components/six-dropdown/six-dropdown.tsx","./src/components/six-menu/six-menu.scss?tag=six-menu&encapsulation=shadow","./src/components/six-menu/six-menu.tsx","./src/components/six-menu-item/six-menu-item.scss?tag=six-menu-item&encapsulation=shadow","./src/components/six-menu-item/six-menu-item.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot) {\n const tabbableShadowChild = [...el.shadowRoot.children].find(isTabbable) as HTMLElement;\n if (tabbableShadowChild) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children) {\n return [...el.children].map(getNearestTabbableElement)[0];\n }\n\n return null;\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: inline-block;\n}\n\n.dropdown {\n position: relative;\n}\n\n.dropdown__trigger {\n display: block;\n}\n\n.dropdown__positioner {\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n\n &__filtered {\n width: 100%;\n }\n}\n\n.dropdown__panel {\n max-height: 50vh;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n color: var(--color);\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--six-elevation-2dp);\n opacity: 0;\n overflow: auto;\n overscroll-behavior: none;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n // fix for firefox scrollbar\n scrollbar-width: thin;\n}\n\n.filter-hidden {\n display: none;\n}\n\n.dropdown__positioner {\n &[data-popper-placement^='top'] .dropdown__panel {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .dropdown__panel {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .dropdown__panel {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .dropdown__panel {\n transform-origin: left;\n }\n\n &.popover-visible .dropdown__panel {\n opacity: 1;\n transform: none;\n pointer-events: all;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { getSlotChildren } from '../../utils/slot';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixMenuItemData } from '../six-menu/six-menu';\n\nexport interface SixDropdownAutoFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownAsyncFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownScrollPayload {\n scrollHeight: number;\n scrollTop: number;\n scrollbarHeight: number;\n scrollRatio: number;\n}\n\nconst isTagName =\n (name: string) =>\n <T extends Element>(el?: T) =>\n el?.tagName.toLowerCase() === name.toLowerCase();\nconst isSixMenu = isTagName('six-menu');\nconst isSixMenuItem = isTagName('six-menu-item');\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot trigger - The dropdown's trigger, usually a `<six-button>` element.\n * @slot - The dropdown's content.\n *\n * @part base - The component's base wrapper.\n * @part trigger - The container that wraps the trigger.\n * @part panel - The panel that gets shown when the dropdown is open.\n */\n\n@Component({\n tag: 'six-dropdown',\n styleUrl: 'six-dropdown.scss',\n shadow: true,\n})\nexport class SixDropdown {\n accessibleTrigger: HTMLElement;\n componentId = `dropdown-${++id}`;\n isVisible = false;\n panel: HTMLElement;\n positioner: HTMLElement;\n popover: Popover;\n trigger: HTMLElement;\n hasBeenInitialized = false;\n\n // the input element shown in the dropdown when filter is set to true\n filterInputElement: HTMLSixInputElement;\n\n @Element() host: HTMLSixDropdownElement;\n\n /** Indicates whether or not the dropdown is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside of the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Determines whether the dropdown should hide when a menu item is selected. */\n @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 0;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @Prop() skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement: HTMLElement;\n\n /**\n * Set to true to allow auto filtering for entries in the dropdown.\n * With this flag the dropdown will automatically filter itsel.\n * If you need to coordinate the shown elements yourself,\n * e.g. because you need to call an endpoint use asyncFilter instead\n */\n @Prop() filter = false;\n\n /**\n * Set to true to allow async filtering.\n * When you enter something in the search field the component will only emit an event but not filter any elements itself.\n * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself\n */\n @Prop() asyncFilter = false;\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder = 'Filter...';\n\n /** By default the search field will be focused when opening a dropdown with filtering enabled. */\n @Prop() autofocusFilter = true;\n\n get hasFilterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop() filterDebounce = DEFAULT_DEBOUNCE_FAST;\n\n /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */\n @Prop() disableHideOnEnterAndSpace = false;\n\n /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/\n @Prop() options: SixMenuItemData[] | null = null;\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n /** Emitted when the dropdown opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dropdown-show' }) sixShow: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown opens and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-show' }) sixAfterShow: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dropdown closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dropdown-hide' }) sixHide: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown closes and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-hide' }) sixAfterHide: EventEmitter<EmptyPayload>;\n\n /** Emitted when the auto filter is triggered */\n @Event({ eventName: 'six-dropdown-auto-filter-fired' })\n sixAutoFilterFired: EventEmitter<SixDropdownAutoFilterPayload>;\n\n /** Emitted when the async filter is triggered */\n @Event({ eventName: 'six-async-filter-fired' }) sixAsyncFilterFired: EventEmitter<SixDropdownAsyncFilterPayload>;\n\n /** Emitted when the user scrolls inside dropdown panel.*/\n @Event({ eventName: 'six-dropdown-scroll' }) sixScroll: EventEmitter<SixDropdownScrollPayload>;\n\n readonly eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State()\n _options: SixMenuItemData[] = null;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n this.updateAccessibleTrigger();\n }\n\n @Watch('distance')\n @Watch('hoist')\n @Watch('placement')\n @Watch('skidding')\n handlePopoverOptionsChange() {\n this.popover.setOptions({\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n });\n }\n\n @Watch('options')\n handleOptionsChange() {\n this._options = [...this.options];\n }\n\n connectedCallback() {\n if (this.virtualScroll && this.options === null) {\n console.error('Options must be defined when using virtual scrolling');\n }\n\n if (this.options !== null) {\n this._options = [...this.options];\n }\n\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n this.handleMenuItemActivate = this.handleMenuItemActivate.bind(this);\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleTriggerClick = this.handleTriggerClick.bind(this);\n this.handleTriggerKeyDown = this.handleTriggerKeyDown.bind(this);\n this.handleTriggerKeyUp = this.handleTriggerKeyUp.bind(this);\n this.handleTriggerSlotChange = this.handleTriggerSlotChange.bind(this);\n this.handleDropdownScroll = this.handleDropdownScroll.bind(this);\n\n if (this.hasBeenInitialized && !this.popover) {\n // there was a weird bug when using six-dropdown inside an ag-grid filter. When closing the ag-grid filter\n // disconnectedCallback() is executed. However, since componentDidLoad() will not be rerendered the popover had\n // no longer a connected transitionEnd callback to the dropdown. To fix this, we have this sanity check here,\n // to re-initialize the popover in case the component has already been initialized but the popover is undefined.\n this.initializePopover();\n }\n }\n\n componentDidLoad() {\n this.hasBeenInitialized = true;\n this.initializePopover();\n\n // Show on init if open\n if (this.open) {\n void this.show();\n }\n\n if (this.filter) {\n this.setupFiltering(this.handleFilterInputChange);\n } else if (this.asyncFilter) {\n this.setupFiltering(() => this.sixAsyncFilterFired.emit({ filterValue: this.filterInputElement.value }));\n }\n }\n\n private initializePopover() {\n const onAfterHide = () => {\n if (this.filter) {\n this.filterInputElement.value = '';\n\n if (this._options !== null) {\n this._options = [...this.options];\n } else {\n const menuItems = this.getMenuItems();\n menuItems.forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n this.sixAfterHide.emit();\n };\n\n const onAfterShow = async () => {\n if (this.hasFilterEnabled && this.autofocusFilter) {\n // if dropdown filter is enabled we should autofocus the search field\n await this.filterInputElement.setFocus();\n }\n\n this.sixAfterShow.emit();\n };\n\n const onTransitionEnd = () => {\n if (!this.open) {\n this.panel.scrollTop = 0;\n }\n };\n\n this.popover = new Popover(this.trigger, this.positioner, {\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.panel,\n onAfterHide,\n onAfterShow,\n onTransitionEnd,\n });\n }\n\n private setupFiltering(callback: () => void) {\n this.eventListeners.add(this.filterInputElement, 'six-input-input', debounce(callback, this.filterDebounce));\n }\n\n getMenuItems = (): HTMLSixMenuItemElement[] => {\n if (this._options !== null) {\n return this._options.map((option) => <six-menu-item value={option.value}>{option.label}</six-menu-item>);\n }\n\n const [panel] = getSlotChildren<HTMLSixMenuElement>(this.panel);\n\n // the menu-items can be in a slot e.g. in six-select or direct children of the panel\n return getSlotChildren(panel) || Array.from(panel.querySelectorAll('six-menu-item'));\n };\n\n handleFilterInputChange = () => {\n const lowerCaseFilterTerm = this.filterInputElement.value?.toLowerCase()?.trim() || '';\n\n if (this._options) {\n this.handleFilteringForAttributeItems(lowerCaseFilterTerm);\n } else {\n this.handleFilteringForSlotItems(lowerCaseFilterTerm);\n }\n\n this.sixAutoFilterFired.emit({ filterValue: lowerCaseFilterTerm });\n };\n\n private handleFilteringForAttributeItems(lowerCaseFilterTerm: string) {\n if (lowerCaseFilterTerm === '') {\n this._options = [...this.options];\n return;\n }\n\n this._options = this.options.filter(\n (option) =>\n (option.label && String(option.label)?.toLowerCase()?.includes(lowerCaseFilterTerm)) ||\n (option.value && String(option.value)?.toLowerCase()?.includes(lowerCaseFilterTerm))\n );\n }\n\n private handleFilteringForSlotItems(lowerCaseFilterTerm: string) {\n const menuItems = this.getMenuItems();\n menuItems.forEach(async (menuItem) => {\n // hide all elements which don't contain the entered substring\n const elementContainsFilterTerm =\n menuItem?.value?.toLowerCase()?.includes(lowerCaseFilterTerm) ||\n (await menuItem?.getTextLabel())?.toLowerCase()?.includes(lowerCaseFilterTerm);\n\n menuItem.style.display = elementContainsFilterTerm ? 'unset' : 'none';\n });\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n\n void this.hide();\n this.popover.destroy();\n this.popover = null;\n }\n\n /** Shows the dropdown panel */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = true;\n this.open = true;\n this.popover.show();\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n focusOnTrigger() {\n const [trigger] = getSlotChildren<HTMLSixButtonElement>(this.trigger);\n if (trigger) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n getMenu() {\n const [menu] = getSlotChildren<HTMLSixMenuElement>(this.panel).filter(isSixMenu);\n return menu;\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n @Method()\n async reposition() {\n if (!this.open) {\n return;\n }\n this.popover.reposition();\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed\n if (event.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot.activeElement) {\n if (event.key === 'ArrowDown') {\n const item = this.getMenuItems().find((item) => item.style.display !== 'none');\n if (item) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && isSixMenuItem(document.activeElement)) {\n event.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.container.getRootNode() instanceof ShadowRoot\n ? document.activeElement.shadowRoot?.activeElement\n : document.activeElement;\n\n if (activeElement?.closest(this.container.tagName.toLowerCase()) !== this.container) {\n void this.hide();\n return;\n }\n });\n }\n }\n\n handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n void this.hide();\n return;\n }\n }\n\n handleMenuItemActivate(event: CustomEvent) {\n const item = event.target as HTMLSixMenuItemElement;\n scrollIntoView(item, this.panel);\n }\n\n handlePanelSelect(event: CustomEvent) {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (this.closeOnSelect && isSixMenu(target)) {\n void this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerClick() {\n this.open ? this.hide() : this.show();\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n const menu = this.getMenu();\n const menuItems = menu ? [...menu.querySelectorAll('six-menu-item')] : null;\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\n // Close when escape or tab is pressed\n if (event.key === 'Escape') {\n this.focusOnTrigger();\n void this.hide();\n return;\n }\n\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {\n event.preventDefault();\n this.open ? void this.hide() : void this.show();\n return;\n }\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n void this.show();\n }\n\n // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem) {\n lastMenuItem.setFocus();\n return;\n }\n }\n\n // Other keys bring focus to the menu and initiate type-to-select behavior\n const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];\n if (this.open && menu && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n handleDropdownScroll() {\n this.sixScroll.emit({\n scrollHeight: this.panel.scrollHeight,\n scrollTop: this.panel.scrollTop,\n scrollbarHeight: this.panel.offsetHeight * (this.panel.offsetHeight / this.panel.scrollHeight),\n scrollRatio: this.panel.scrollTop / (this.panel.scrollHeight - this.panel.clientHeight),\n });\n }\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n updateAccessibleTrigger() {\n const [accessibleTrigger] = getSlotChildren(this.trigger).map(getNearestTabbableElement);\n\n if (accessibleTrigger) {\n accessibleTrigger.setAttribute('aria-haspopup', 'true');\n accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n id={this.componentId}\n class={{\n dropdown: true,\n 'dropdown--open': this.open,\n }}\n >\n <span\n part=\"trigger\"\n class=\"dropdown__trigger\"\n ref={(el) => (this.trigger = el)}\n onClick={this.handleTriggerClick}\n onKeyDown={this.handleTriggerKeyDown}\n onKeyUp={this.handleTriggerKeyUp}\n >\n <slot name=\"trigger\" onSlotchange={this.handleTriggerSlotChange} />\n </span>\n\n {/* Position the panel with a wrapper since the popover makes use of `translate`. This let's us add transitions\n on the panel without interfering with the position. */}\n <div\n ref={(el) => (this.positioner = el)}\n class={{\n dropdown__positioner: true,\n dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,\n }}\n >\n {this.hasFilterEnabled && (\n <six-input\n class={{\n 'filter-hidden': !this.open,\n }}\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\n />\n )}\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dropdown__panel\"\n role=\"menu\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-labelledby={this.componentId}\n onScroll={this.handleDropdownScroll}\n >\n <slot />\n {this._options && (\n <six-menu part=\"menu\" items={this._options} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu {\n padding: 0 0;\n border: none;\n box-shadow: var(--six-elevation-2dp);\n\n &:focus {\n outline: none;\n }\n\n &--noshadow {\n box-shadow: none;\n }\n\n &__wrapper {\n &--scrollable {\n overflow-y: auto;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\nimport { StyleDeclaration } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce } from '../../utils/execution-control';\n\nexport interface SixMenuItemData {\n label: string;\n value: string;\n}\n\nexport interface SixMenuItemSelectedPayload {\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nconst isFocusedMenuItem = (menuItem: HTMLSixMenuItemElement) =>\n menuItem?.shadowRoot?.querySelector('.menu-item')?.classList?.contains('menu-item--focused');\n\nconst isSIXMenuItemElement = (el?: Element): el is HTMLSixMenuItemElement =>\n el?.tagName.toLowerCase() === 'six-menu-item';\n\nconst mapToMenuItem = ({ value, label }) => <six-menu-item value={value}>{label}</six-menu-item>;\n\nconst DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING = 5;\n\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT = 64;\n\nconst ITEMS_SHOWN_NOT_SET = undefined;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu's content, including menu items, menu dividers, and menu labels.\n *\n * @part base - The component's base wrapper.\n */\n@Component({\n tag: 'six-menu',\n styleUrl: 'six-menu.scss',\n shadow: true,\n})\nexport class SixMenu {\n private readonly eventListeners = new EventListeners();\n\n menu: HTMLElement;\n menuWrapper: HTMLElement;\n typeToSelectString = '';\n typeToSelectTimeout: NodeJS.Timeout;\n\n @Element() host: HTMLSixMenuElement;\n\n /** Emitted when a menu item is selected. */\n @Event({ eventName: 'six-menu-item-selected' }) sixMenuItemSelected: EventEmitter<SixMenuItemSelectedPayload>;\n\n /** Set to true to remove the box-shadow */\n @Prop() removeBoxShadow: boolean = false;\n\n /** Set the options to be shown in the dropdown */\n @Prop() items: SixMenuItemData[] | null = null;\n\n /** Defines how many items should be shown. If the number of items is larger than this properties a scrollbar will be shown */\n @Prop() itemsShown?: number = ITEMS_SHOWN_NOT_SET;\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll: boolean = false;\n\n /**\n * Used for virtual scrolling\n * Define how many items should be rendered in the DOM when using virtual scrolling\n */\n @Prop() itemSize: number = 10;\n\n /**\n * Used for virtual scrolling\n * Define the debounce for listening on scrolling changes in milliseconds.\n * The lower the number the more sensitive the component reacts to scrolling changes.\n */\n @Prop() scrollingDebounce: number = 15;\n\n /**\n * Used to calculate which items should be rendered in the DOM\n */\n @State()\n private scrollingIndex: number = 0;\n\n // set a default item height, this variable will be updated with the real value after the first render.\n // However, it's necessary to have a default value because we can only fetch the proper hight after the first render\n @State()\n sixMenuItemHeight = DEFAULT_SIX_MENU_ITEM_HEIGHT;\n\n connectedCallback() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n componentWillLoad() {\n if (this.items === null) {\n return;\n }\n }\n\n private handleScrolling = () => {\n // for performance improvements we only update the DOM if the scrollRatio change \"enough\"\n this.scrollingIndex = Math.floor(this.menuWrapper.scrollTop / this.sixMenuItemHeight);\n };\n\n componentDidLoad() {\n this.setupForVirtualScrollingAfterRendering();\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /**\n * Initiates type-to-select logic, which automatically selects an option based on what the user is currently typing.\n * The key passed will be appended to the internal query and the selection will be updated. After a brief period, the\n * internal query is cleared automatically. This method is intended to be used with the keydown event. Useful for\n * enabling type-to-select when the menu doesn't have focus.\n */\n @Method()\n async typeToSelect(key: string) {\n clearTimeout(this.typeToSelectTimeout);\n this.typeToSelectTimeout = setTimeout(() => (this.typeToSelectString = ''), 750);\n this.typeToSelectString += key.toLowerCase();\n const items = this.getItems();\n for (const item of items) {\n const slot = item.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement;\n const label = getTextContent(slot).toLowerCase().trim();\n if (label.substring(0, this.typeToSelectString.length) === this.typeToSelectString) {\n item.setFocus();\n break;\n }\n }\n }\n\n private getItemsShown() {\n const defaultItemsShown = this.virtualScroll\n ? DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING\n : ITEMS_SHOWN_NOT_SET;\n\n return this.itemsShown ?? defaultItemsShown;\n }\n\n private setupForVirtualScrollingAfterRendering() {\n if (!this.virtualScroll) {\n return;\n }\n\n this.eventListeners.add(this.menuWrapper, 'scroll', debounce(this.handleScrolling, this.scrollingDebounce));\n\n // set menu height to proper height once the item is rendered.\n const menuItemHeight = this.menu?.querySelector('six-menu-item')?.clientHeight;\n if (menuItemHeight && menuItemHeight > 0) {\n this.sixMenuItemHeight = menuItemHeight;\n }\n }\n\n getItems() {\n if (this.items !== null && this.items !== undefined) {\n return this.items.map(mapToMenuItem);\n }\n\n const slot = this.menu.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter((el) => isSIXMenuItemElement(el) && !el.disabled);\n }\n\n private getActiveItemIndex() {\n const items = this.getItems();\n const selectedItem = this.getActiveItem();\n const itemIndex = items.indexOf(selectedItem);\n\n if (itemIndex > -1) {\n return itemIndex;\n }\n\n const sixMenuItems = this.extractItemsFromDOM();\n return sixMenuItems.findIndex(isFocusedMenuItem);\n }\n\n getActiveItem() {\n const activeElement = this.getItems().find((i) => i === document.activeElement);\n\n if (activeElement) {\n return activeElement;\n }\n\n return this.extractItemsFromDOM()?.find(isFocusedMenuItem);\n }\n\n private extractItemsFromDOM() {\n return Array.from(this.host?.shadowRoot?.querySelectorAll('six-menu-item'));\n }\n\n setActiveItem(item: HTMLSixMenuItemElement) {\n item.setFocus();\n }\n\n handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const clickedItem = target.closest('six-menu-item');\n if (clickedItem && !clickedItem.disabled) {\n this.sixMenuItemSelected.emit({ name: clickedItem.value, item: clickedItem });\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Make a selection when pressing enter\n if (event.key === 'Enter') {\n const activeItem = this.getActiveItem();\n event.preventDefault();\n\n if (activeItem) {\n this.sixMenuItemSelected.emit({ name: activeItem.value, item: activeItem });\n }\n }\n\n // Prevent scrolling when space is pressed\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n // Move the selection when pressing down or up\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n const items = this.items === null ? this.getItems() : this.extractItemsFromDOM();\n\n let indexOfActiveItem = this.getActiveItemIndex();\n\n if (items.length) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n indexOfActiveItem++;\n } else if (event.key === 'ArrowUp') {\n indexOfActiveItem--;\n } else if (event.key === 'Home') {\n indexOfActiveItem = 0;\n } else if (event.key === 'End') {\n indexOfActiveItem = items.length - 1;\n }\n\n if (indexOfActiveItem < 0) indexOfActiveItem = 0;\n if (indexOfActiveItem > items.length - 1) indexOfActiveItem = items.length - 1;\n\n this.setActiveItem(items[indexOfActiveItem]);\n\n return;\n }\n }\n\n void this.typeToSelect(event.key);\n }\n\n private getMenuWrapperStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.getItemsShown() > 0) {\n // calculate the proper height to show the correct number of items\n styles.height = `${this.getItemsShown() * this.sixMenuItemHeight}px`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getMenuContainerStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll) {\n // calculate height of content are if all items would be rendered so the scrollbar has the proper size\n styles.transform = `translateY(${this.sixMenuItemHeight * this.scrollingIndex}px)`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getScrollbarGhostStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll && this.items !== null) {\n styles.height = `${this.items.length * this.sixMenuItemHeight - this.itemSize * this.sixMenuItemHeight}px`;\n }\n\n return {\n ...styles,\n };\n }\n\n private renderItems() {\n if (this.items === undefined || this.items === null) {\n return;\n }\n\n if (!this.virtualScroll) {\n return this.items.map(mapToMenuItem);\n }\n\n return this.items\n .slice(this.scrollingIndex, Math.min(this.items.length, this.itemSize + this.scrollingIndex))\n .map(mapToMenuItem);\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuWrapper = el)}\n style={this.getMenuWrapperStyle()}\n part=\"wrapper\"\n class={{\n menu: true,\n 'menu--noshadow': this.removeBoxShadow,\n 'menu__wrapper--scrollable': this.getItemsShown() > 0,\n }}\n >\n <div\n ref={(el) => (this.menu = el)}\n part=\"base\"\n role=\"menu\"\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n tabIndex={0}\n style={this.getMenuContainerStyle()}\n >\n <slot />\n {this.renderItems()}\n </div>\n {this.virtualScroll && <div style={this.getScrollbarGhostStyle()} />}\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu-item {\n position: relative;\n display: flex;\n align-items: stretch;\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-letter-spacing-normal);\n text-align: left;\n color: var(--six-input-color);\n border-radius: var(--six-border-radius-medium);\n padding: var(--six-spacing-medium) var(--six-spacing-medium);\n transition: var(--six-transition-fast) fill;\n user-select: none;\n white-space: nowrap;\n cursor: pointer;\n\n &.menu-item--focused:not(.menu-item--disabled) {\n outline: none;\n background-color: var(--six-menu-item-background-color);\n }\n\n &.menu-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n .menu-item__label {\n flex: 1 1 auto;\n align-self: center;\n }\n\n .menu-item__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:last-child) {\n margin-right: 0.5em;\n }\n }\n\n .menu-item__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n\n ::slotted(:first-child) {\n margin-left: 0.5em;\n }\n }\n\n .menu-item__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: var(--six-spacing-small);\n visibility: hidden;\n font-size: inherit;\n }\n}\n\n.menu-item--checked .menu-item__check {\n visibility: visible;\n}\n","import { Component, Method, Prop, State, h } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu item's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @part base - The component's base wrapper.\n * @part checked-icon - The container that wraps the checked icon.\n * @part prefix - The prefix container.\n * @part label - The menu item label.\n * @part suffix - The suffix container.\n */\n\n@Component({\n tag: 'six-menu-item',\n styleUrl: 'six-menu-item.scss',\n shadow: true,\n})\nexport class SixMenuItem {\n menuItem: HTMLElement;\n defaultSlot: HTMLSlotElement;\n\n @State() hasFocus = false;\n\n /** Set to true to draw the item in a checked state. */\n @Prop({ reflect: true }) checked = false;\n\n /** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the menu item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.menuItem.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.menuItem.blur();\n }\n\n /** Returns a text label based on the contents of the menu item's default slot. */\n @Method()\n getTextLabel() {\n return Promise.resolve(getTextContent(this.defaultSlot));\n }\n\n handleBlur() {\n this.hasFocus = false;\n }\n\n handleFocus() {\n this.hasFocus = true;\n }\n\n handleMouseEnter() {\n this.setFocus();\n }\n\n handleMouseLeave() {\n this.removeFocus();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuItem = el)}\n part=\"base\"\n class={{\n 'menu-item': true,\n 'menu-item--checked': this.checked,\n 'menu-item--disabled': this.disabled,\n 'menu-item--focused': this.hasFocus,\n }}\n role=\"menuitem\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-checked={this.checked ? 'true' : 'false'}\n tabIndex={!this.disabled ? 0 : null}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n <span part=\"prefix\" class=\"menu-item__prefix\">\n <slot name=\"prefix\" />\n </span>\n\n <span part=\"label\" class=\"menu-item__label\">\n <slot ref={(el) => (this.defaultSlot = el as HTMLSlotElement)} />\n </span>\n\n <span part=\"suffix\" class=\"menu-item__suffix\">\n <slot name=\"suffix\" />\n </span>\n\n <span part=\"checked-icon\" class=\"menu-item__check\">\n <six-icon size=\"small\" aria-hidden=\"true\">\n check\n </six-icon>\n </span>\n </div>\n );\n }\n}\n"],"mappings":"oQAAgBA,EAAWC,GACzB,MAAMC,EAAWD,EAAGC,SACpB,OAAOA,GAAY,CACrB,C,SAEgBC,EAA0BF,GAExC,GAAID,EAAWC,GAAK,CAClB,OAAOA,C,CAIT,GAAIA,EAAGG,WAAY,CACjB,MAAMC,EAAsB,IAAIJ,EAAGG,WAAWE,UAAUC,KAAKP,GAC7D,GAAIK,EAAqB,CACvB,OAAOA,C,EAKX,GAAIJ,EAAGK,SAAU,CACf,MAAO,IAAIL,EAAGK,UAAUE,IAAIL,GAA2B,E,CAGzD,OAAO,IACT,CCzBA,MAAMM,EAAiB,+wCCyBvB,MAAMC,EACHC,GACmBV,IAClBA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I,EAAA,QAAMhB,KAAK,YAGbgB,EAAA,QAAMiI,KAAK,QAAQC,MAAM,oBACvBlI,EAAA,QAAMoI,IAAM9J,GAAQiB,KAAKkO,YAAcnP,KAGzC0B,EAAA,QAAMiI,KAAK,SAASC,MAAM,qBACxBlI,EAAA,QAAMhB,KAAK,YAGbgB,EAAA,QAAMiI,KAAK,eAAeC,MAAM,oBAC9BlI,EAAA,YAAUiO,KAAK,QAAO,cAAa,QAAM,U"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixIconButtonCss","SixIconButton","this","handleClickEvent","event","disabled","preventDefault","stopPropagation","componentDidLoad","button","focusVisible","observe","disconnectedCallback","unobserve","render","html","h","innerHTML","onClick","class","ref","el","part","type","label","size","name"],"sources":["./src/components/six-icon-button/six-icon-button.scss?tag=six-icon-button&encapsulation=shadow","./src/components/six-icon-button/six-icon-button.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: inline-block;\n}\n\n.icon-button {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n background: none;\n border: none;\n border-radius: var(--six-border-radius-medium);\n font-size: inherit;\n color: var(--six-input-icon-color);\n padding: var(--six-spacing-x-small);\n cursor: pointer;\n transition: var(--six-transition-medium) color;\n -webkit-appearance: none;\n\n &:hover:not(.icon-button--disabled),\n &:focus:not(.icon-button--disabled) {\n color: var(--six-input-icon-color-hover);\n }\n\n &:active:not(.icon-button--disabled) {\n color: var(--six-input-icon-color);\n }\n\n &:focus {\n outline: none;\n }\n}\n\n.icon-button--disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n\n.icon-button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.focus-visible.icon-button:focus {\n box-shadow: var(--six-button-focus-shadow);\n}\n\n.icon-button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n pointer-events: none;\n}\n\n.icon-button six-icon[size='xLarge'] + ::slotted(six-badge) {\n transform: translateY(40%) translateX(-35%);\n}\n\n.icon-button six-icon[size='large'] + ::slotted(six-badge) {\n transform: translateY(20%) translateX(-20%);\n}\n\n// TODO: tx4u9 should be adjusted for all sizes after design team\n.icon-button six-icon[size='medium'] + ::slotted(six-badge) {\n transform: translateY(10%) translateX(50%);\n}\n\n.icon-button six-icon[size='small'] + ::slotted(six-badge) {\n // no translation necessary\n}\n\n.icon-button six-icon[size='xSmall'] + ::slotted(six-badge) {\n transform: translateY(-25%) translateX(25%);\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-icon-button',\n styleUrl: 'six-icon-button.scss',\n shadow: true,\n})\nexport class SixIconButton {\n button: HTMLButtonElement;\n\n /** The name of the icon to draw. */\n @Prop({ reflect: true }) name: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) size: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge' = 'medium';\n\n /**\n * A description that gets read by screen readers and other assistive devices. For optimal accessibility, you should\n * always include a label that describes what the icon button does.\n */\n @Prop({ reflect: true }) label: string;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** HTML symbol code or entity. */\n @Prop({ reflect: true }) html: string;\n\n componentDidLoad() {\n if (this.button) {\n focusVisible.observe(this.button);\n }\n }\n\n disconnectedCallback() {\n if (this.button) {\n focusVisible.unobserve(this.button);\n }\n }\n\n render() {\n const html = this.html && <span innerHTML={this.html} />;\n\n return (\n <div onClick={this.handleClickEvent} class={{ 'icon-button-wrapper--disabled': this.disabled }}>\n <button\n ref={(el) => (this.button = el)}\n part=\"base\"\n disabled={this.disabled}\n class={{\n 'icon-button': true,\n 'icon-button--disabled': this.disabled,\n }}\n type=\"button\"\n aria-label={this.label}\n >\n <six-icon aria-hidden=\"true\" size={this.size}>\n {this.name}\n </six-icon>\n <slot />\n {html}\n </button>\n </div>\n );\n }\n\n private handleClickEvent = (event) => {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n}\n"],"mappings":"+EAAA,MAAMA,EAAmB,i0C,MCiBZC,EAAa,M,yBA2DhBC,KAAAC,iBAAoBC,IAC1B,GAAIF,KAAKG,SAAU,CACjBD,EAAME,iBACNF,EAAMG,iB,iCAvDmG,S,mCASzE,M,oBAKpCC,mBACE,GAAIN,KAAKO,OAAQ,CACfC,EAAaC,QAAQT,KAAKO,O,EAI9BG,uBACE,GAAIV,KAAKO,OAAQ,CACfC,EAAaG,UAAUX,KAAKO,O,EAIhCK,SACE,MAAMC,EAAOb,KAAKa,MAAQC,EAAA,QAAMC,UAAWf,KAAKa,OAEhD,OACEC,EAAA,OAAKE,QAAShB,KAAKC,iBAAkBgB,MAAO,CAAE,gCAAiCjB,KAAKG,WAClFW,EAAA,UACEI,IAAMC,GAAQnB,KAAKO,OAASY,EAC5BC,KAAK,OACLjB,SAAUH,KAAKG,SACfc,MAAO,CACL,cAAe,KACf,wBAAyBjB,KAAKG,UAEhCkB,KAAK,SAAQ,aACDrB,KAAKsB,OAEjBR,EAAA,0BAAsB,OAAOS,KAAMvB,KAAKuB,MACrCvB,KAAKwB,MAERV,EAAA,aACCD,G"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,g as r}from"./p-16b99232.js";import{u as s,l as a}from"./p-eb8f05a9.js";import{h as o}from"./p-b4dfb7cf.js";import{i as n,M as h}from"./p-4f8394d7.js";const l=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{--size:25rem;display:contents}.drawer{top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden}.drawer:not(.drawer--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.drawer--contained{position:absolute;z-index:initial}.drawer--fixed{position:fixed;z-index:var(--six-z-index-drawer)}.drawer__panel{position:absolute;display:flex;flex-direction:column;z-index:2;max-width:100%;max-height:100%;background-color:var(--six-drawer-background-color);color:var(--six-drawer-color);box-shadow:var(--six-shadow-x-large);transition:var(--six-transition-medium) transform;overflow:auto;pointer-events:all}.drawer__panel:focus{outline:none}.drawer--top .drawer__panel{top:0;right:auto;bottom:auto;left:0;width:100%;height:var(--size);transform:translate(0, -100%)}.drawer--right .drawer__panel{top:0;right:0;bottom:auto;left:auto;width:var(--size);height:100%;transform:translate(100%, 0)}.drawer--bottom .drawer__panel{top:auto;right:auto;bottom:0;left:0;width:100%;height:var(--size);transform:translate(0, 100%)}.drawer--left .drawer__panel{top:0;right:auto;bottom:auto;left:0;width:var(--size);height:100%;transform:translate(-100%, 0)}.drawer--open .drawer__panel{transform:none}.drawer__header{display:flex}.drawer__title{flex:1 1 auto;font-size:var(--six-font-size-large);line-height:var(--six-line-height-dense);padding:var(--six-spacing-large)}.drawer__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-x-large);padding:0 var(--six-spacing-large)}.drawer__body{flex:1 1 auto;padding:var(--six-spacing-large);overflow:auto;-webkit-overflow-scrolling:touch}.drawer__footer{text-align:right;padding:var(--six-spacing-large)}.drawer__footer ::slotted(six-button:not(:last-of-type)){margin-right:var(--six-spacing-x-small)}.drawer:not(.drawer--has-footer) .drawer__footer{display:none}.drawer__overlay{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--six-overlay-background-color);opacity:0;transition:var(--six-transition-medium) opacity;pointer-events:all}.drawer--contained .drawer__overlay{position:absolute}.drawer--open .drawer__overlay{opacity:0.4}";const d=n();let f=0;const p=class{constructor(e){t(this,e);this.sixShow=i(this,"six-drawer-show",7);this.sixAfterShow=i(this,"six-drawer-after-show",7);this.sixHide=i(this,"six-drawer-hide",7);this.sixAfterHide=i(this,"six-drawer-after-hide",7);this.sixInitialFocus=i(this,"six-drawer-initial-focus",7);this.sixOverlayDismiss=i(this,"six-drawer-overlay-dismiss",7);this.componentId=`drawer-${++f}`;this.willShow=false;this.willHide=false;this.hasFooter=false;this.isVisible=false;this.open=false;this.label="";this.placement="right";this.contained=false;this.noHeader=false}handleOpenChange(){this.open?this.show():this.hide()}connectedCallback(){this.handleCloseClick=this.handleCloseClick.bind(this);this.handleTransitionEnd=this.handleTransitionEnd.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleOverlayClick=this.handleOverlayClick.bind(this);this.handleSlotChange=this.handleSlotChange.bind(this);this.modal=new h(this.host,{onFocusOut:()=>this.contained?null:this.panel.focus()})}componentWillLoad(){this.handleSlotChange();if(this.open){this.show();this.resetTransitionVariables()}}disconnectedCallback(){s(this.host)}async show(){if(this.willShow){return}const t=this.sixShow.emit();if(t.defaultPrevented){this.open=false;return}this.willShow=true;this.isVisible=true;this.open=true;if(!this.contained){this.modal.activate();a(this.host)}if(this.open){if(d){requestAnimationFrame((()=>{const t=this.sixInitialFocus.emit();if(!t.defaultPrevented){this.panel.focus({preventScroll:true})}}))}else{this.drawer.addEventListener("transitionend",(()=>{const t=this.sixInitialFocus.emit();if(!t.defaultPrevented){this.panel.focus()}}),{once:true})}}}async hide(){if(this.willHide){return}const t=this.sixHide.emit();if(t.defaultPrevented){this.open=true;return}this.willHide=true;this.open=false;this.modal.deactivate();s(this.host)}handleCloseClick(){this.hide()}handleKeyDown(t){if(t.key==="Escape"){this.hide()}}handleOverlayClick(){const t=this.sixOverlayDismiss.emit();if(!t.defaultPrevented){this.hide()}}handleSlotChange(){this.hasFooter=o(this.host,"footer")}handleTransitionEnd(t){const i=t.target;if(t.propertyName==="transform"&&i.classList.contains("drawer__panel")){this.resetTransitionVariables()}}resetTransitionVariables(){this.isVisible=this.open;this.willShow=false;this.willHide=false;this.open?this.sixAfterShow.emit():this.sixAfterHide.emit()}render(){return e("div",{ref:t=>this.drawer=t,part:"base",class:{drawer:true,"drawer--open":this.open,"drawer--visible":this.isVisible,"drawer--top":this.placement==="top","drawer--right":this.placement==="right","drawer--bottom":this.placement==="bottom","drawer--left":this.placement==="left","drawer--contained":this.contained,"drawer--fixed":!this.contained,"drawer--has-footer":this.hasFooter},onKeyDown:this.handleKeyDown,onTransitionEnd:this.handleTransitionEnd},e("div",{part:"overlay",class:"drawer__overlay",onClick:this.handleOverlayClick,tabIndex:-1}),e("div",{ref:t=>this.panel=t,part:"panel",class:"drawer__panel",role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-label":this.noHeader?this.label:null,"aria-labelledby":!this.noHeader?`${this.componentId}-title`:null,tabIndex:0},!this.noHeader&&e("header",{part:"header",class:"drawer__header"},e("span",{part:"title",class:"drawer__title",id:`${this.componentId}-title`},e("slot",{name:"label"},this.label||String.fromCharCode(65279))),e("six-icon-button",{exportparts:"base:close-button",class:"drawer__close",name:"x",onClick:this.handleCloseClick})),e("div",{part:"body",class:"drawer__body"},e("slot",null)),e("footer",{part:"footer",class:"drawer__footer"},e("slot",{name:"footer",onSlotchange:this.handleSlotChange}))))}get host(){return r(this)}static get watchers(){return{open:["handleOpenChange"]}}};p.style=l;export{p as six_drawer};
2
- //# sourceMappingURL=p-1414a242.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixDrawerCss","hasPreventScroll","isPreventScrollSupported","id","SixDrawer","this","componentId","willShow","willHide","handleOpenChange","open","show","hide","connectedCallback","handleCloseClick","bind","handleTransitionEnd","handleKeyDown","handleOverlayClick","handleSlotChange","modal","Modal","host","onFocusOut","contained","panel","focus","componentWillLoad","resetTransitionVariables","disconnectedCallback","unlockBodyScrolling","async","sixShow","emit","defaultPrevented","isVisible","activate","lockBodyScrolling","requestAnimationFrame","sixInitialFocus","preventScroll","drawer","addEventListener","once","sixHide","deactivate","event","key","sixOverlayDismiss","hasFooter","hasSlot","target","propertyName","classList","contains","sixAfterShow","sixAfterHide","render","h","ref","el","part","class","placement","onKeyDown","onTransitionEnd","onClick","tabIndex","role","noHeader","label","name","String","fromCharCode","exportparts","onSlotchange"],"sources":["./src/components/six-drawer/six-drawer.scss?tag=six-drawer&encapsulation=shadow","./src/components/six-drawer/six-drawer.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --size: The preferred size of the drawer. This will be applied to the drawer's width or height depending on its\n * `placement`. Note that the drawer will shrink to accommodate smaller screens.\n */\n:host {\n --size: 25rem;\n\n display: contents;\n}\n\n.drawer {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n\n &:not(.drawer--visible) {\n @include hidden;\n }\n}\n\n.drawer--contained {\n position: absolute;\n z-index: initial;\n}\n\n.drawer--fixed {\n position: fixed;\n z-index: var(--six-z-index-drawer);\n}\n\n.drawer__panel {\n position: absolute;\n display: flex;\n flex-direction: column;\n z-index: 2;\n max-width: 100%;\n max-height: 100%;\n background-color: var(--six-drawer-background-color);\n color: var(--six-drawer-color);\n box-shadow: var(--six-shadow-x-large);\n transition: var(--six-transition-medium) transform;\n overflow: auto;\n pointer-events: all;\n\n &:focus {\n outline: none;\n }\n}\n\n.drawer--top .drawer__panel {\n top: 0;\n right: auto;\n bottom: auto;\n left: 0;\n width: 100%;\n height: var(--size);\n transform: translate(0, -100%);\n}\n\n.drawer--right .drawer__panel {\n top: 0;\n right: 0;\n bottom: auto;\n left: auto;\n width: var(--size);\n height: 100%;\n transform: translate(100%, 0);\n}\n\n.drawer--bottom .drawer__panel {\n top: auto;\n right: auto;\n bottom: 0;\n left: 0;\n width: 100%;\n height: var(--size);\n transform: translate(0, 100%);\n}\n\n.drawer--left .drawer__panel {\n top: 0;\n right: auto;\n bottom: auto;\n left: 0;\n width: var(--size);\n height: 100%;\n transform: translate(-100%, 0);\n}\n\n.drawer--open .drawer__panel {\n // don't use translate here or it will cause problems with popovers inside the drawer e.g. dropdown, select etc.\n transform: none;\n}\n\n.drawer__header {\n display: flex;\n}\n\n.drawer__title {\n flex: 1 1 auto;\n font-size: var(--six-font-size-large);\n line-height: var(--six-line-height-dense);\n padding: var(--six-spacing-large);\n}\n\n.drawer__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-x-large);\n padding: 0 var(--six-spacing-large);\n}\n\n.drawer__body {\n flex: 1 1 auto;\n padding: var(--six-spacing-large);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.drawer__footer {\n text-align: right;\n padding: var(--six-spacing-large);\n\n ::slotted(six-button:not(:last-of-type)) {\n margin-right: var(--six-spacing-x-small);\n }\n}\n\n.drawer:not(.drawer--has-footer) .drawer__footer {\n display: none;\n}\n\n.drawer__overlay {\n display: block;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: var(--six-overlay-background-color);\n opacity: 0;\n transition: var(--six-transition-medium) opacity;\n pointer-events: all;\n}\n\n.drawer--contained .drawer__overlay {\n position: absolute;\n}\n\n.drawer--open .drawer__overlay {\n opacity: 0.4;\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport { isPreventScrollSupported } from '../../utils/support';\nimport Modal from '../../utils/modal';\nimport { EmptyPayload } from '../../utils/types';\n\nconst hasPreventScroll = isPreventScrollSupported();\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 drawer's content.\n * @slot label - The drawer's label. Alternatively, you can use the label prop.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @part base - The component's base wrapper.\n * @part overlay - The overlay.\n * @part panel - The drawer panel (where the drawer and its content is rendered).\n * @part header - The drawer header.\n * @part title - The drawer title.\n * @part close-button - The close button.\n * @part body - The drawer body.\n * @part footer - The drawer footer.\n */\n\n@Component({\n tag: 'six-drawer',\n styleUrl: 'six-drawer.scss',\n shadow: true,\n})\nexport class SixDrawer {\n componentId = `drawer-${++id}`;\n drawer: HTMLElement;\n modal: Modal;\n panel: HTMLElement;\n willShow = false;\n willHide = false;\n\n @Element() host: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether or not the drawer 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 drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility.\n */\n @Prop() label = '';\n\n /** The direction from which the drawer will open. */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'right';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this prop and add `position: relative` to the parent.\n */\n @Prop() contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the drawer opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-drawer-show' }) sixShow: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer opens and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-show' }) sixAfterShow: EventEmitter<EmptyPayload>;\n\n /** Emitted when the drawer closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-drawer-hide' }) sixHide: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer closes and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-hide' }) sixAfterHide: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the drawer opens and the panel gains focus. Calling `event.preventDefault()` will prevent focus and\n * allow you to set it on a different element in the drawer, such as an input or button.\n */\n @Event({ eventName: 'six-drawer-initial-focus' }) sixInitialFocus: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the drawer from closing. */\n @Event({ eventName: 'six-drawer-overlay-dismiss' }) sixOverlayDismiss: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n this.handleTransitionEnd = this.handleTransitionEnd.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleOverlayClick = this.handleOverlayClick.bind(this);\n this.handleSlotChange = this.handleSlotChange.bind(this);\n\n this.modal = new Modal(this.host, {\n onFocusOut: () => (this.contained ? null : this.panel.focus()),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n\n // Show on init if open\n if (this.open) {\n this.show();\n // if the sidebar is open by default we need to manually reset the\n // transition variables since there will be no transition event\n this.resetTransitionVariables();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the drawer */\n @Method()\n async show() {\n if (this.willShow) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this.host);\n }\n\n if (this.open) {\n if (hasPreventScroll) {\n // Wait for the next frame before setting initial focus so the dialog is technically visible\n requestAnimationFrame(() => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n this.panel.focus({ preventScroll: true });\n }\n });\n } else {\n // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to\n // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its\n // out of view initially.\n //\n // Fiddle: https://jsfiddle.net/g6buoafq/1/\n // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583\n //\n this.drawer.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n this.panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the drawer */\n @Method()\n async hide() {\n if (this.willHide) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n handleCloseClick() {\n this.hide();\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n this.hide();\n }\n }\n\n handleOverlayClick() {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n }\n\n handleSlotChange() {\n this.hasFooter = hasSlot(this.host, 'footer');\n }\n\n handleTransitionEnd(event: TransitionEvent) {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'transform' && target.classList.contains('drawer__panel')) {\n this.resetTransitionVariables();\n }\n }\n\n private resetTransitionVariables() {\n this.isVisible = this.open;\n this.willShow = false;\n this.willHide = false;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.drawer = el)}\n part=\"base\"\n class={{\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--visible': this.isVisible,\n 'drawer--top': this.placement === 'top',\n 'drawer--right': this.placement === 'right',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--left': this.placement === 'left',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" onClick={this.handleOverlayClick} tabIndex={-1} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-label={this.noHeader ? this.label : null}\n aria-labelledby={!this.noHeader ? `${this.componentId}-title` : null}\n tabIndex={0}\n >\n {!this.noHeader && (\n <header part=\"header\" class=\"drawer__header\">\n <span part=\"title\" class=\"drawer__title\" id={`${this.componentId}-title`}>\n <slot name=\"label\">\n {/* If there's no label, use an invisible character to prevent the heading from collapsing */}\n {this.label || String.fromCharCode(65279)}\n </slot>\n </span>\n <six-icon-button\n exportparts=\"base:close-button\"\n class=\"drawer__close\"\n name=\"x\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"drawer__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"mLAAA,MAAMA,EAAe,0xECOrB,MAAMC,EAAmBC,IACzB,IAAIC,EAAK,E,MA2BIC,EAAS,M,2UACpBC,KAAAC,YAAc,YAAYH,IAI1BE,KAAAE,SAAW,MACXF,KAAAG,SAAW,M,eAIU,M,eACA,M,UAG0B,M,WAM/B,G,eAGyC,Q,eAMrC,M,cAMD,K,CAGnBC,mBACEJ,KAAKK,KAAOL,KAAKM,OAASN,KAAKO,M,CAwBjCC,oBACER,KAAKS,iBAAmBT,KAAKS,iBAAiBC,KAAKV,MACnDA,KAAKW,oBAAsBX,KAAKW,oBAAoBD,KAAKV,MACzDA,KAAKY,cAAgBZ,KAAKY,cAAcF,KAAKV,MAC7CA,KAAKa,mBAAqBb,KAAKa,mBAAmBH,KAAKV,MACvDA,KAAKc,iBAAmBd,KAAKc,iBAAiBJ,KAAKV,MAEnDA,KAAKe,MAAQ,IAAIC,EAAMhB,KAAKiB,KAAM,CAChCC,WAAY,IAAOlB,KAAKmB,UAAY,KAAOnB,KAAKoB,MAAMC,S,CAI1DC,oBACEtB,KAAKc,mBAGL,GAAId,KAAKK,KAAM,CACbL,KAAKM,OAGLN,KAAKuB,0B,EAITC,uBACEC,EAAoBzB,KAAKiB,K,CAK3BS,aACE,GAAI1B,KAAKE,SAAU,CACjB,M,CAGF,MAAMyB,EAAU3B,KAAK2B,QAAQC,OAC7B,GAAID,EAAQE,iBAAkB,CAC5B7B,KAAK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