@six-group/ui-library 4.1.2 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (670) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/{form-control-8d64e974.js → form-control-b6ca8224.js} +2 -2
  4. package/dist/cjs/{form-control-8d64e974.js.map → form-control-b6ca8224.js.map} +1 -1
  5. package/dist/cjs/{index-d7748d51.js → index-5bfcf88b.js} +60 -27
  6. package/dist/cjs/index-5bfcf88b.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +5 -3
  8. package/dist/cjs/loader.cjs.js.map +1 -1
  9. package/dist/cjs/{modal-3ce015be.js → modal-bd7fc5bc.js} +1 -18
  10. package/dist/cjs/modal-bd7fc5bc.js.map +1 -0
  11. package/dist/cjs/six-alert.cjs.entry.js +5 -4
  12. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  13. package/dist/cjs/six-avatar.cjs.entry.js +4 -3
  14. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/six-badge.cjs.entry.js +5 -4
  16. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  17. package/dist/cjs/six-button.cjs.entry.js +5 -4
  18. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  19. package/dist/cjs/six-card.cjs.entry.js +4 -3
  20. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  21. package/dist/cjs/six-checkbox_2.cjs.entry.js +10 -8
  22. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -1
  23. package/dist/cjs/six-datepicker.cjs.entry.js +4 -3
  24. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  25. package/dist/cjs/six-details.cjs.entry.js +6 -5
  26. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  27. package/dist/cjs/six-dialog.cjs.entry.js +12 -30
  28. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/six-drawer.cjs.entry.js +13 -30
  30. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-dropdown_2.cjs.entry.js +12 -10
  32. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-error-page.cjs.entry.js +4 -3
  34. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-error.cjs.entry.js +4 -3
  36. package/dist/cjs/six-error.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-file-list-item.cjs.entry.js +5 -4
  38. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-file-list.cjs.entry.js +4 -3
  40. package/dist/cjs/six-file-list.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-file-upload.cjs.entry.js +11 -9
  42. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-footer.cjs.entry.js +4 -3
  44. package/dist/cjs/six-footer.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-group-label.cjs.entry.js +5 -4
  46. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  47. package/dist/cjs/six-header.cjs.entry.js +13 -12
  48. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-icon-button.cjs.entry.js +6 -5
  50. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-icon.cjs.entry.js +5 -4
  52. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-input.cjs.entry.js +7 -6
  54. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-item-picker.cjs.entry.js +6 -5
  56. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-language-switcher.cjs.entry.js +6 -5
  58. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-layout-grid.cjs.entry.js +4 -3
  60. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-main-container.cjs.entry.js +4 -3
  62. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-menu-divider.cjs.entry.js +4 -3
  64. package/dist/cjs/six-menu-divider.cjs.entry.js.map +1 -1
  65. package/dist/cjs/six-menu-label.cjs.entry.js +4 -3
  66. package/dist/cjs/six-menu-label.cjs.entry.js.map +1 -1
  67. package/dist/cjs/six-picto.cjs.entry.js +4 -3
  68. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  69. package/dist/cjs/six-progress-bar.cjs.entry.js +5 -4
  70. package/dist/cjs/six-progress-bar.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-progress-ring.cjs.entry.js +4 -3
  72. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  73. package/dist/cjs/six-radio.cjs.entry.js +5 -4
  74. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  75. package/dist/cjs/six-range.cjs.entry.js +17 -6
  76. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  77. package/dist/cjs/six-root.cjs.entry.js +4 -3
  78. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  79. package/dist/cjs/six-search-field.cjs.entry.js +4 -3
  80. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  81. package/dist/cjs/six-select.cjs.entry.js +10 -9
  82. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  83. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +3 -2
  84. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-sidebar-item.cjs.entry.js +5 -4
  86. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-sidebar.cjs.entry.js +5 -4
  88. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-spinner.cjs.entry.js +3 -2
  90. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-stage-indicator.cjs.entry.js +3 -2
  92. package/dist/cjs/six-stage-indicator.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-switch.cjs.entry.js +6 -5
  94. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-tab-group.cjs.entry.js +34 -8
  96. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  97. package/dist/cjs/six-tab-panel.cjs.entry.js +4 -3
  98. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  99. package/dist/cjs/six-tab.cjs.entry.js +5 -4
  100. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-tag.cjs.entry.js +5 -4
  102. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  103. package/dist/cjs/six-textarea.cjs.entry.js +6 -5
  104. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  105. package/dist/cjs/six-tile.cjs.entry.js +6 -5
  106. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  107. package/dist/cjs/six-timepicker.cjs.entry.js +4 -3
  108. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  109. package/dist/cjs/six-tooltip.cjs.entry.js +5 -4
  110. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  111. package/dist/cjs/ui-library.cjs.js +6 -4
  112. package/dist/cjs/ui-library.cjs.js.map +1 -1
  113. package/dist/collection/collection-manifest.json +2 -2
  114. package/dist/collection/components/six-alert/six-alert.js +2 -2
  115. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  116. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  117. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  118. package/dist/collection/components/six-badge/six-badge.js +2 -2
  119. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  120. package/dist/collection/components/six-button/six-button.js +2 -2
  121. package/dist/collection/components/six-button/six-button.js.map +1 -1
  122. package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -1
  123. package/dist/collection/components/six-card/six-card.js +1 -1
  124. package/dist/collection/components/six-card/six-card.js.map +1 -1
  125. package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
  126. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  127. package/dist/collection/components/six-datepicker/six-datepicker.js +1 -1
  128. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  129. package/dist/collection/components/six-details/six-details.js +3 -3
  130. package/dist/collection/components/six-details/six-details.js.map +1 -1
  131. package/dist/collection/components/six-dialog/six-dialog.js +8 -28
  132. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  133. package/dist/collection/components/six-drawer/six-drawer.js +9 -28
  134. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  135. package/dist/collection/components/six-dropdown/six-dropdown.js +5 -5
  136. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  137. package/dist/collection/components/six-error/six-error.js +1 -1
  138. package/dist/collection/components/six-error/six-error.js.map +1 -1
  139. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  140. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  141. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  142. package/dist/collection/components/six-file-list/six-file-list.js.map +1 -1
  143. package/dist/collection/components/six-file-list-item/six-file-list-item.js +2 -2
  144. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  145. package/dist/collection/components/six-file-upload/six-file-upload.css +8 -0
  146. package/dist/collection/components/six-file-upload/six-file-upload.js +25 -6
  147. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  148. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +76 -21
  149. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
  150. package/dist/collection/components/six-footer/six-footer.js +1 -1
  151. package/dist/collection/components/six-footer/six-footer.js.map +1 -1
  152. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  153. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  154. package/dist/collection/components/six-header/six-header.js +10 -10
  155. package/dist/collection/components/six-header/six-header.js.map +1 -1
  156. package/dist/collection/components/six-icon/six-icon.js +2 -2
  157. package/dist/collection/components/six-icon/six-icon.js.map +1 -1
  158. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  159. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  160. package/dist/collection/components/six-input/six-input.js +3 -3
  161. package/dist/collection/components/six-input/six-input.js.map +1 -1
  162. package/dist/collection/components/six-item-picker/six-item-picker.js +3 -3
  163. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  164. package/dist/collection/components/six-language-switcher/six-language-switcher.css +3 -2
  165. package/dist/collection/components/six-language-switcher/six-language-switcher.js +2 -2
  166. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  167. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +8 -8
  168. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -1
  169. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  170. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  171. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  172. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  173. package/dist/collection/components/six-menu/six-menu.js +2 -2
  174. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  175. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  176. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  177. package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -1
  178. package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
  179. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  180. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  181. package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -1
  182. package/dist/collection/components/six-picto/six-picto.js +1 -1
  183. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  184. package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
  185. package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -1
  186. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  187. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  188. package/dist/collection/components/six-radio/six-radio.js +2 -2
  189. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  190. package/dist/collection/components/six-range/six-range.css +1 -1
  191. package/dist/collection/components/six-range/six-range.js +12 -2
  192. package/dist/collection/components/six-range/six-range.js.map +1 -1
  193. package/dist/collection/components/six-root/six-root.js +1 -1
  194. package/dist/collection/components/six-root/six-root.js.map +1 -1
  195. package/dist/collection/components/six-search-field/six-search-field.js +1 -1
  196. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  197. package/dist/collection/components/six-select/six-select.js +6 -6
  198. package/dist/collection/components/six-select/six-select.js.map +1 -1
  199. package/dist/collection/components/six-select/util.js.map +1 -1
  200. package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
  201. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  202. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  203. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  204. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  205. package/dist/collection/components/six-switch/six-switch.js +2 -2
  206. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  207. package/dist/collection/components/six-tab/six-tab.js +2 -2
  208. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  209. package/dist/collection/components/six-tab-group/six-tab-group.js +33 -7
  210. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  211. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  212. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  213. package/dist/collection/components/six-tag/six-tag.js +2 -2
  214. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  215. package/dist/collection/components/six-textarea/six-textarea.js +2 -2
  216. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  217. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
  218. package/dist/collection/components/six-tile/six-tile.js +3 -3
  219. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  220. package/dist/collection/components/six-timepicker/six-timepicker.js +1 -1
  221. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  222. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
  223. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  224. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  225. package/dist/collection/utils/alert.js.map +1 -1
  226. package/dist/collection/utils/date-util.js.map +1 -1
  227. package/dist/collection/utils/date-util.spec.js.map +1 -1
  228. package/dist/collection/utils/error-messages.js.map +1 -1
  229. package/dist/collection/utils/event-listeners.js.map +1 -1
  230. package/dist/collection/utils/focus-visible.js.map +1 -1
  231. package/dist/collection/utils/form.js.map +1 -1
  232. package/dist/collection/utils/modal.js.map +1 -1
  233. package/dist/collection/utils/popover.js.map +1 -1
  234. package/dist/collection/utils/popup.js.map +1 -1
  235. package/dist/collection/utils/scroll.js.map +1 -1
  236. package/dist/collection/utils/slot.js.map +1 -1
  237. package/dist/collection/utils/tabbable.js.map +1 -1
  238. package/dist/collection/utils/time.util.js.map +1 -1
  239. package/dist/collection/utils/time.util.spec.js.map +1 -1
  240. package/dist/components/modal.js +1 -17
  241. package/dist/components/modal.js.map +1 -1
  242. package/dist/components/six-alert.js +4 -3
  243. package/dist/components/six-alert.js.map +1 -1
  244. package/dist/components/six-avatar.js +3 -2
  245. package/dist/components/six-avatar.js.map +1 -1
  246. package/dist/components/six-badge.js +4 -3
  247. package/dist/components/six-badge.js.map +1 -1
  248. package/dist/components/six-button2.js +4 -3
  249. package/dist/components/six-button2.js.map +1 -1
  250. package/dist/components/six-card.js +3 -2
  251. package/dist/components/six-card.js.map +1 -1
  252. package/dist/components/six-checkbox2.js +4 -3
  253. package/dist/components/six-checkbox2.js.map +1 -1
  254. package/dist/components/six-datepicker.js +3 -2
  255. package/dist/components/six-datepicker.js.map +1 -1
  256. package/dist/components/six-details2.js +5 -4
  257. package/dist/components/six-details2.js.map +1 -1
  258. package/dist/components/six-dialog.js +11 -29
  259. package/dist/components/six-dialog.js.map +1 -1
  260. package/dist/components/six-drawer.js +12 -29
  261. package/dist/components/six-drawer.js.map +1 -1
  262. package/dist/components/six-dropdown2.js +7 -6
  263. package/dist/components/six-dropdown2.js.map +1 -1
  264. package/dist/components/six-error-page.js +3 -2
  265. package/dist/components/six-error-page.js.map +1 -1
  266. package/dist/components/six-error2.js +3 -2
  267. package/dist/components/six-error2.js.map +1 -1
  268. package/dist/components/six-file-list-item.js +4 -3
  269. package/dist/components/six-file-list-item.js.map +1 -1
  270. package/dist/components/six-file-list.js +3 -2
  271. package/dist/components/six-file-list.js.map +1 -1
  272. package/dist/components/six-file-upload.js +19 -10
  273. package/dist/components/six-file-upload.js.map +1 -1
  274. package/dist/components/six-footer.js +3 -2
  275. package/dist/components/six-footer.js.map +1 -1
  276. package/dist/components/six-group-label.js +3 -2
  277. package/dist/components/six-group-label.js.map +1 -1
  278. package/dist/components/six-header.js +12 -11
  279. package/dist/components/six-header.js.map +1 -1
  280. package/dist/components/six-icon-button2.js +5 -4
  281. package/dist/components/six-icon-button2.js.map +1 -1
  282. package/dist/components/six-icon2.js +4 -3
  283. package/dist/components/six-icon2.js.map +1 -1
  284. package/dist/components/six-input2.js +5 -4
  285. package/dist/components/six-input2.js.map +1 -1
  286. package/dist/components/six-item-picker2.js +5 -4
  287. package/dist/components/six-item-picker2.js.map +1 -1
  288. package/dist/components/six-language-switcher.js +5 -4
  289. package/dist/components/six-language-switcher.js.map +1 -1
  290. package/dist/components/six-layout-grid.js +3 -2
  291. package/dist/components/six-layout-grid.js.map +1 -1
  292. package/dist/components/six-main-container.js +3 -2
  293. package/dist/components/six-main-container.js.map +1 -1
  294. package/dist/components/six-menu-divider.js +3 -2
  295. package/dist/components/six-menu-divider.js.map +1 -1
  296. package/dist/components/six-menu-item2.js +4 -3
  297. package/dist/components/six-menu-item2.js.map +1 -1
  298. package/dist/components/six-menu-label.js +3 -2
  299. package/dist/components/six-menu-label.js.map +1 -1
  300. package/dist/components/six-menu2.js +4 -3
  301. package/dist/components/six-menu2.js.map +1 -1
  302. package/dist/components/six-picto2.js +3 -2
  303. package/dist/components/six-picto2.js.map +1 -1
  304. package/dist/components/six-progress-bar.js +4 -3
  305. package/dist/components/six-progress-bar.js.map +1 -1
  306. package/dist/components/six-progress-ring.js +3 -2
  307. package/dist/components/six-progress-ring.js.map +1 -1
  308. package/dist/components/six-radio.js +4 -3
  309. package/dist/components/six-radio.js.map +1 -1
  310. package/dist/components/six-range.js +15 -4
  311. package/dist/components/six-range.js.map +1 -1
  312. package/dist/components/six-root.js +3 -2
  313. package/dist/components/six-root.js.map +1 -1
  314. package/dist/components/six-search-field.js +3 -2
  315. package/dist/components/six-search-field.js.map +1 -1
  316. package/dist/components/six-select.js +8 -7
  317. package/dist/components/six-select.js.map +1 -1
  318. package/dist/components/six-sidebar-item-group.js +2 -1
  319. package/dist/components/six-sidebar-item-group.js.map +1 -1
  320. package/dist/components/six-sidebar-item.js +4 -3
  321. package/dist/components/six-sidebar-item.js.map +1 -1
  322. package/dist/components/six-sidebar.js +4 -3
  323. package/dist/components/six-sidebar.js.map +1 -1
  324. package/dist/components/six-spinner2.js +2 -1
  325. package/dist/components/six-spinner2.js.map +1 -1
  326. package/dist/components/six-stage-indicator2.js +2 -1
  327. package/dist/components/six-stage-indicator2.js.map +1 -1
  328. package/dist/components/six-switch.js +4 -3
  329. package/dist/components/six-switch.js.map +1 -1
  330. package/dist/components/six-tab-group.js +35 -8
  331. package/dist/components/six-tab-group.js.map +1 -1
  332. package/dist/components/six-tab-panel.js +3 -2
  333. package/dist/components/six-tab-panel.js.map +1 -1
  334. package/dist/components/six-tab.js +4 -3
  335. package/dist/components/six-tab.js.map +1 -1
  336. package/dist/components/six-tag.js +4 -3
  337. package/dist/components/six-tag.js.map +1 -1
  338. package/dist/components/six-textarea.js +4 -3
  339. package/dist/components/six-textarea.js.map +1 -1
  340. package/dist/components/six-tile.js +5 -4
  341. package/dist/components/six-tile.js.map +1 -1
  342. package/dist/components/six-timepicker2.js +3 -2
  343. package/dist/components/six-timepicker2.js.map +1 -1
  344. package/dist/components/six-tooltip2.js +4 -3
  345. package/dist/components/six-tooltip2.js.map +1 -1
  346. package/dist/components.json +34 -6
  347. package/dist/esm/app-globals-0f993ce5.js +5 -0
  348. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  349. package/dist/esm/{form-control-d403a9cf.js → form-control-5d3cf9d4.js} +2 -2
  350. package/dist/esm/{form-control-d403a9cf.js.map → form-control-5d3cf9d4.js.map} +1 -1
  351. package/dist/esm/{index-79d4ef67.js → index-d415464d.js} +60 -27
  352. package/dist/esm/index-d415464d.js.map +1 -0
  353. package/dist/esm/loader.js +6 -4
  354. package/dist/esm/loader.js.map +1 -1
  355. package/dist/esm/{modal-96526245.js → modal-6c1288e3.js} +2 -18
  356. package/dist/esm/modal-6c1288e3.js.map +1 -0
  357. package/dist/esm/six-alert.entry.js +5 -4
  358. package/dist/esm/six-alert.entry.js.map +1 -1
  359. package/dist/esm/six-avatar.entry.js +4 -3
  360. package/dist/esm/six-avatar.entry.js.map +1 -1
  361. package/dist/esm/six-badge.entry.js +5 -4
  362. package/dist/esm/six-badge.entry.js.map +1 -1
  363. package/dist/esm/six-button.entry.js +5 -4
  364. package/dist/esm/six-button.entry.js.map +1 -1
  365. package/dist/esm/six-card.entry.js +4 -3
  366. package/dist/esm/six-card.entry.js.map +1 -1
  367. package/dist/esm/six-checkbox_2.entry.js +10 -8
  368. package/dist/esm/six-checkbox_2.entry.js.map +1 -1
  369. package/dist/esm/six-datepicker.entry.js +4 -3
  370. package/dist/esm/six-datepicker.entry.js.map +1 -1
  371. package/dist/esm/six-details.entry.js +6 -5
  372. package/dist/esm/six-details.entry.js.map +1 -1
  373. package/dist/esm/six-dialog.entry.js +12 -30
  374. package/dist/esm/six-dialog.entry.js.map +1 -1
  375. package/dist/esm/six-drawer.entry.js +13 -30
  376. package/dist/esm/six-drawer.entry.js.map +1 -1
  377. package/dist/esm/six-dropdown_2.entry.js +12 -10
  378. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  379. package/dist/esm/six-error-page.entry.js +4 -3
  380. package/dist/esm/six-error-page.entry.js.map +1 -1
  381. package/dist/esm/six-error.entry.js +4 -3
  382. package/dist/esm/six-error.entry.js.map +1 -1
  383. package/dist/esm/six-file-list-item.entry.js +5 -4
  384. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  385. package/dist/esm/six-file-list.entry.js +4 -3
  386. package/dist/esm/six-file-list.entry.js.map +1 -1
  387. package/dist/esm/six-file-upload.entry.js +11 -9
  388. package/dist/esm/six-file-upload.entry.js.map +1 -1
  389. package/dist/esm/six-footer.entry.js +4 -3
  390. package/dist/esm/six-footer.entry.js.map +1 -1
  391. package/dist/esm/six-group-label.entry.js +5 -4
  392. package/dist/esm/six-group-label.entry.js.map +1 -1
  393. package/dist/esm/six-header.entry.js +13 -12
  394. package/dist/esm/six-header.entry.js.map +1 -1
  395. package/dist/esm/six-icon-button.entry.js +6 -5
  396. package/dist/esm/six-icon-button.entry.js.map +1 -1
  397. package/dist/esm/six-icon.entry.js +5 -4
  398. package/dist/esm/six-icon.entry.js.map +1 -1
  399. package/dist/esm/six-input.entry.js +7 -6
  400. package/dist/esm/six-input.entry.js.map +1 -1
  401. package/dist/esm/six-item-picker.entry.js +6 -5
  402. package/dist/esm/six-item-picker.entry.js.map +1 -1
  403. package/dist/esm/six-language-switcher.entry.js +6 -5
  404. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  405. package/dist/esm/six-layout-grid.entry.js +4 -3
  406. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  407. package/dist/esm/six-main-container.entry.js +4 -3
  408. package/dist/esm/six-main-container.entry.js.map +1 -1
  409. package/dist/esm/six-menu-divider.entry.js +4 -3
  410. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  411. package/dist/esm/six-menu-label.entry.js +4 -3
  412. package/dist/esm/six-menu-label.entry.js.map +1 -1
  413. package/dist/esm/six-picto.entry.js +4 -3
  414. package/dist/esm/six-picto.entry.js.map +1 -1
  415. package/dist/esm/six-progress-bar.entry.js +5 -4
  416. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  417. package/dist/esm/six-progress-ring.entry.js +4 -3
  418. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  419. package/dist/esm/six-radio.entry.js +5 -4
  420. package/dist/esm/six-radio.entry.js.map +1 -1
  421. package/dist/esm/six-range.entry.js +17 -6
  422. package/dist/esm/six-range.entry.js.map +1 -1
  423. package/dist/esm/six-root.entry.js +4 -3
  424. package/dist/esm/six-root.entry.js.map +1 -1
  425. package/dist/esm/six-search-field.entry.js +4 -3
  426. package/dist/esm/six-search-field.entry.js.map +1 -1
  427. package/dist/esm/six-select.entry.js +10 -9
  428. package/dist/esm/six-select.entry.js.map +1 -1
  429. package/dist/esm/six-sidebar-item-group.entry.js +3 -2
  430. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  431. package/dist/esm/six-sidebar-item.entry.js +5 -4
  432. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  433. package/dist/esm/six-sidebar.entry.js +5 -4
  434. package/dist/esm/six-sidebar.entry.js.map +1 -1
  435. package/dist/esm/six-spinner.entry.js +3 -2
  436. package/dist/esm/six-spinner.entry.js.map +1 -1
  437. package/dist/esm/six-stage-indicator.entry.js +3 -2
  438. package/dist/esm/six-stage-indicator.entry.js.map +1 -1
  439. package/dist/esm/six-switch.entry.js +6 -5
  440. package/dist/esm/six-switch.entry.js.map +1 -1
  441. package/dist/esm/six-tab-group.entry.js +34 -8
  442. package/dist/esm/six-tab-group.entry.js.map +1 -1
  443. package/dist/esm/six-tab-panel.entry.js +4 -3
  444. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  445. package/dist/esm/six-tab.entry.js +5 -4
  446. package/dist/esm/six-tab.entry.js.map +1 -1
  447. package/dist/esm/six-tag.entry.js +5 -4
  448. package/dist/esm/six-tag.entry.js.map +1 -1
  449. package/dist/esm/six-textarea.entry.js +6 -5
  450. package/dist/esm/six-textarea.entry.js.map +1 -1
  451. package/dist/esm/six-tile.entry.js +6 -5
  452. package/dist/esm/six-tile.entry.js.map +1 -1
  453. package/dist/esm/six-timepicker.entry.js +4 -3
  454. package/dist/esm/six-timepicker.entry.js.map +1 -1
  455. package/dist/esm/six-tooltip.entry.js +5 -4
  456. package/dist/esm/six-tooltip.entry.js.map +1 -1
  457. package/dist/esm/ui-library.js +7 -5
  458. package/dist/esm/ui-library.js.map +1 -1
  459. package/dist/types/components/six-file-upload/six-file-upload.d.ts +2 -0
  460. package/dist/types/components/six-range/six-range.d.ts +2 -0
  461. package/dist/types/components/six-tab-group/six-tab-group.d.ts +4 -1
  462. package/dist/types/components.d.ts +8 -0
  463. package/dist/ui-library/{p-ac57ba5c.entry.js → p-0054410d.entry.js} +2 -2
  464. package/dist/ui-library/p-0054410d.entry.js.map +1 -0
  465. package/dist/ui-library/{p-0440335d.entry.js → p-034b3bb1.entry.js} +2 -2
  466. package/dist/ui-library/p-034b3bb1.entry.js.map +1 -0
  467. package/dist/ui-library/{p-8888a367.entry.js → p-1903aa37.entry.js} +2 -2
  468. package/dist/ui-library/p-1903aa37.entry.js.map +1 -0
  469. package/dist/ui-library/{p-ed279165.entry.js → p-1a17a806.entry.js} +2 -2
  470. package/dist/ui-library/p-1a17a806.entry.js.map +1 -0
  471. package/dist/ui-library/p-1c5e8dec.entry.js +2 -0
  472. package/dist/ui-library/p-1c5e8dec.entry.js.map +1 -0
  473. package/dist/ui-library/p-23f5dae2.entry.js +2 -0
  474. package/dist/ui-library/p-23f5dae2.entry.js.map +1 -0
  475. package/dist/ui-library/p-24c42aab.entry.js +2 -0
  476. package/dist/ui-library/p-24c42aab.entry.js.map +1 -0
  477. package/dist/ui-library/p-2b7e2bcb.entry.js +2 -0
  478. package/dist/ui-library/p-2b7e2bcb.entry.js.map +1 -0
  479. package/dist/ui-library/{p-8ced18d8.entry.js → p-2e7312fc.entry.js} +2 -2
  480. package/dist/ui-library/p-2e7312fc.entry.js.map +1 -0
  481. package/dist/ui-library/p-380ba2b7.entry.js +2 -0
  482. package/dist/ui-library/p-380ba2b7.entry.js.map +1 -0
  483. package/dist/ui-library/{p-04cc397c.entry.js → p-38271a5e.entry.js} +2 -2
  484. package/dist/ui-library/p-38271a5e.entry.js.map +1 -0
  485. package/dist/ui-library/{p-870b988d.entry.js → p-3a879e1d.entry.js} +2 -2
  486. package/dist/ui-library/p-3a879e1d.entry.js.map +1 -0
  487. package/dist/ui-library/p-3c05fdf3.entry.js +2 -0
  488. package/dist/ui-library/p-3c05fdf3.entry.js.map +1 -0
  489. package/dist/ui-library/p-3c582981.entry.js +2 -0
  490. package/dist/ui-library/p-3c582981.entry.js.map +1 -0
  491. package/dist/ui-library/{p-961bd001.entry.js → p-3f8ed1d4.entry.js} +2 -2
  492. package/dist/ui-library/p-3f8ed1d4.entry.js.map +1 -0
  493. package/dist/ui-library/p-4272021f.entry.js +2 -0
  494. package/dist/ui-library/p-4272021f.entry.js.map +1 -0
  495. package/dist/ui-library/p-499480a2.entry.js +2 -0
  496. package/dist/ui-library/p-499480a2.entry.js.map +1 -0
  497. package/dist/ui-library/p-50d589eb.entry.js +2 -0
  498. package/dist/ui-library/p-50d589eb.entry.js.map +1 -0
  499. package/dist/ui-library/{p-884c5cf9.entry.js → p-52e2a64b.entry.js} +2 -2
  500. package/dist/ui-library/p-52e2a64b.entry.js.map +1 -0
  501. package/dist/ui-library/p-57ab8f42.entry.js +2 -0
  502. package/dist/ui-library/p-57ab8f42.entry.js.map +1 -0
  503. package/dist/ui-library/p-59744f17.entry.js +2 -0
  504. package/dist/ui-library/p-59744f17.entry.js.map +1 -0
  505. package/dist/ui-library/p-5cde0403.entry.js +2 -0
  506. package/dist/ui-library/p-5cde0403.entry.js.map +1 -0
  507. package/dist/ui-library/p-61c91764.entry.js +2 -0
  508. package/dist/ui-library/p-61c91764.entry.js.map +1 -0
  509. package/dist/ui-library/p-651293e7.js +2 -0
  510. package/dist/ui-library/p-651293e7.js.map +1 -0
  511. package/dist/ui-library/{p-61e66671.js → p-6ee48e81.js} +2 -2
  512. package/dist/ui-library/{p-50dae789.entry.js → p-716019b6.entry.js} +2 -2
  513. package/dist/ui-library/p-716019b6.entry.js.map +1 -0
  514. package/dist/ui-library/p-71ff0e72.entry.js +2 -0
  515. package/dist/ui-library/p-71ff0e72.entry.js.map +1 -0
  516. package/dist/ui-library/p-740d3c8b.entry.js +2 -0
  517. package/dist/ui-library/p-740d3c8b.entry.js.map +1 -0
  518. package/dist/ui-library/p-786148a6.entry.js +2 -0
  519. package/dist/ui-library/p-786148a6.entry.js.map +1 -0
  520. package/dist/ui-library/p-7ad67887.entry.js +2 -0
  521. package/dist/ui-library/p-7ad67887.entry.js.map +1 -0
  522. package/dist/ui-library/{p-9c79341d.entry.js → p-81390410.entry.js} +2 -2
  523. package/dist/ui-library/p-81390410.entry.js.map +1 -0
  524. package/dist/ui-library/p-9a7c45c4.entry.js +2 -0
  525. package/dist/ui-library/p-9a7c45c4.entry.js.map +1 -0
  526. package/dist/ui-library/{p-caea1eb6.entry.js → p-9e14b37a.entry.js} +2 -2
  527. package/dist/ui-library/p-9e14b37a.entry.js.map +1 -0
  528. package/dist/ui-library/p-a2dad0ab.entry.js +2 -0
  529. package/dist/ui-library/p-a2dad0ab.entry.js.map +1 -0
  530. package/dist/ui-library/p-a67b3f42.entry.js +2 -0
  531. package/dist/ui-library/p-a67b3f42.entry.js.map +1 -0
  532. package/dist/ui-library/p-a69ba529.entry.js +2 -0
  533. package/dist/ui-library/p-a69ba529.entry.js.map +1 -0
  534. package/dist/ui-library/p-ab22dafd.entry.js +2 -0
  535. package/dist/ui-library/p-ab22dafd.entry.js.map +1 -0
  536. package/dist/ui-library/p-ad244587.entry.js +2 -0
  537. package/dist/ui-library/p-ad244587.entry.js.map +1 -0
  538. package/dist/ui-library/p-b68f4556.entry.js +2 -0
  539. package/dist/ui-library/p-b68f4556.entry.js.map +1 -0
  540. package/dist/ui-library/p-b863dcc4.entry.js +2 -0
  541. package/dist/ui-library/p-b863dcc4.entry.js.map +1 -0
  542. package/dist/ui-library/p-b902eb65.entry.js +2 -0
  543. package/dist/ui-library/p-b902eb65.entry.js.map +1 -0
  544. package/dist/ui-library/p-b922e8ac.entry.js +2 -0
  545. package/dist/ui-library/p-b922e8ac.entry.js.map +1 -0
  546. package/dist/ui-library/p-c297662b.entry.js +2 -0
  547. package/dist/ui-library/p-c297662b.entry.js.map +1 -0
  548. package/dist/ui-library/p-ce59d17f.entry.js +2 -0
  549. package/dist/ui-library/p-ce59d17f.entry.js.map +1 -0
  550. package/dist/ui-library/{p-d95e292e.entry.js → p-dea8f89c.entry.js} +2 -2
  551. package/dist/ui-library/p-dea8f89c.entry.js.map +1 -0
  552. package/dist/ui-library/p-e1255160.js +2 -0
  553. package/dist/ui-library/p-e1255160.js.map +1 -0
  554. package/dist/ui-library/{p-da7f3dbd.entry.js → p-e6db01a9.entry.js} +2 -2
  555. package/dist/ui-library/p-e6db01a9.entry.js.map +1 -0
  556. package/dist/ui-library/p-e6db442b.entry.js +2 -0
  557. package/dist/ui-library/p-e6db442b.entry.js.map +1 -0
  558. package/dist/ui-library/p-e8d5a789.js +3 -0
  559. package/dist/ui-library/p-e8d5a789.js.map +1 -0
  560. package/dist/ui-library/p-e924132d.entry.js +2 -0
  561. package/dist/ui-library/p-e924132d.entry.js.map +1 -0
  562. package/dist/ui-library/p-e9726db2.entry.js +2 -0
  563. package/dist/ui-library/p-e9726db2.entry.js.map +1 -0
  564. package/dist/ui-library/p-f2320c65.entry.js +2 -0
  565. package/dist/ui-library/p-f2320c65.entry.js.map +1 -0
  566. package/dist/ui-library/p-fdf271fd.entry.js +2 -0
  567. package/dist/ui-library/p-fdf271fd.entry.js.map +1 -0
  568. package/dist/ui-library/p-fe483fc6.entry.js +2 -0
  569. package/dist/ui-library/p-fe483fc6.entry.js.map +1 -0
  570. package/dist/ui-library/ui-library.esm.js +1 -1
  571. package/dist/ui-library/ui-library.esm.js.map +1 -1
  572. package/package.json +5 -5
  573. package/dist/cjs/index-d7748d51.js.map +0 -1
  574. package/dist/cjs/modal-3ce015be.js.map +0 -1
  575. package/dist/collection/utils/support.js +0 -16
  576. package/dist/collection/utils/support.js.map +0 -1
  577. package/dist/esm/index-79d4ef67.js.map +0 -1
  578. package/dist/esm/modal-96526245.js.map +0 -1
  579. package/dist/types/utils/support.d.ts +0 -1
  580. package/dist/ui-library/p-0440335d.entry.js.map +0 -1
  581. package/dist/ui-library/p-04cc397c.entry.js.map +0 -1
  582. package/dist/ui-library/p-0edd3091.entry.js +0 -2
  583. package/dist/ui-library/p-0edd3091.entry.js.map +0 -1
  584. package/dist/ui-library/p-150b7664.entry.js +0 -2
  585. package/dist/ui-library/p-150b7664.entry.js.map +0 -1
  586. package/dist/ui-library/p-1f5840b5.entry.js +0 -2
  587. package/dist/ui-library/p-1f5840b5.entry.js.map +0 -1
  588. package/dist/ui-library/p-28cc013e.entry.js +0 -2
  589. package/dist/ui-library/p-28cc013e.entry.js.map +0 -1
  590. package/dist/ui-library/p-3424bbc0.entry.js +0 -2
  591. package/dist/ui-library/p-3424bbc0.entry.js.map +0 -1
  592. package/dist/ui-library/p-348c68a8.entry.js +0 -2
  593. package/dist/ui-library/p-348c68a8.entry.js.map +0 -1
  594. package/dist/ui-library/p-3723ca06.entry.js +0 -2
  595. package/dist/ui-library/p-3723ca06.entry.js.map +0 -1
  596. package/dist/ui-library/p-37aeac5e.entry.js +0 -2
  597. package/dist/ui-library/p-37aeac5e.entry.js.map +0 -1
  598. package/dist/ui-library/p-3d7fb086.entry.js +0 -2
  599. package/dist/ui-library/p-3d7fb086.entry.js.map +0 -1
  600. package/dist/ui-library/p-457f7373.entry.js +0 -2
  601. package/dist/ui-library/p-457f7373.entry.js.map +0 -1
  602. package/dist/ui-library/p-4a667f31.entry.js +0 -2
  603. package/dist/ui-library/p-4a667f31.entry.js.map +0 -1
  604. package/dist/ui-library/p-50dae789.entry.js.map +0 -1
  605. package/dist/ui-library/p-546e33d9.entry.js +0 -2
  606. package/dist/ui-library/p-546e33d9.entry.js.map +0 -1
  607. package/dist/ui-library/p-5db3a705.entry.js +0 -2
  608. package/dist/ui-library/p-5db3a705.entry.js.map +0 -1
  609. package/dist/ui-library/p-6296779b.entry.js +0 -2
  610. package/dist/ui-library/p-6296779b.entry.js.map +0 -1
  611. package/dist/ui-library/p-64b4755d.entry.js +0 -2
  612. package/dist/ui-library/p-64b4755d.entry.js.map +0 -1
  613. package/dist/ui-library/p-6c1b046e.entry.js +0 -2
  614. package/dist/ui-library/p-6c1b046e.entry.js.map +0 -1
  615. package/dist/ui-library/p-7115316e.entry.js +0 -2
  616. package/dist/ui-library/p-7115316e.entry.js.map +0 -1
  617. package/dist/ui-library/p-73dd493f.entry.js +0 -2
  618. package/dist/ui-library/p-73dd493f.entry.js.map +0 -1
  619. package/dist/ui-library/p-870b988d.entry.js.map +0 -1
  620. package/dist/ui-library/p-884c5cf9.entry.js.map +0 -1
  621. package/dist/ui-library/p-8888a367.entry.js.map +0 -1
  622. package/dist/ui-library/p-8ced18d8.entry.js.map +0 -1
  623. package/dist/ui-library/p-935c78a7.entry.js +0 -2
  624. package/dist/ui-library/p-935c78a7.entry.js.map +0 -1
  625. package/dist/ui-library/p-961bd001.entry.js.map +0 -1
  626. package/dist/ui-library/p-998de05d.js +0 -2
  627. package/dist/ui-library/p-998de05d.js.map +0 -1
  628. package/dist/ui-library/p-9b08068d.entry.js +0 -2
  629. package/dist/ui-library/p-9b08068d.entry.js.map +0 -1
  630. package/dist/ui-library/p-9c79341d.entry.js.map +0 -1
  631. package/dist/ui-library/p-a9c159f2.entry.js +0 -2
  632. package/dist/ui-library/p-a9c159f2.entry.js.map +0 -1
  633. package/dist/ui-library/p-ac57ba5c.entry.js.map +0 -1
  634. package/dist/ui-library/p-af15381b.js +0 -3
  635. package/dist/ui-library/p-af15381b.js.map +0 -1
  636. package/dist/ui-library/p-b1a5f3cd.entry.js +0 -2
  637. package/dist/ui-library/p-b1a5f3cd.entry.js.map +0 -1
  638. package/dist/ui-library/p-b385a241.entry.js +0 -2
  639. package/dist/ui-library/p-b385a241.entry.js.map +0 -1
  640. package/dist/ui-library/p-b74c5d6b.entry.js +0 -2
  641. package/dist/ui-library/p-b74c5d6b.entry.js.map +0 -1
  642. package/dist/ui-library/p-bf2fb53f.entry.js +0 -2
  643. package/dist/ui-library/p-bf2fb53f.entry.js.map +0 -1
  644. package/dist/ui-library/p-c2c7370b.entry.js +0 -2
  645. package/dist/ui-library/p-c2c7370b.entry.js.map +0 -1
  646. package/dist/ui-library/p-caea1eb6.entry.js.map +0 -1
  647. package/dist/ui-library/p-d3f5b9a8.entry.js +0 -2
  648. package/dist/ui-library/p-d3f5b9a8.entry.js.map +0 -1
  649. package/dist/ui-library/p-d42b18eb.entry.js +0 -2
  650. package/dist/ui-library/p-d42b18eb.entry.js.map +0 -1
  651. package/dist/ui-library/p-d95e292e.entry.js.map +0 -1
  652. package/dist/ui-library/p-da7f3dbd.entry.js.map +0 -1
  653. package/dist/ui-library/p-dfb89b6a.entry.js +0 -2
  654. package/dist/ui-library/p-dfb89b6a.entry.js.map +0 -1
  655. package/dist/ui-library/p-e6032375.entry.js +0 -2
  656. package/dist/ui-library/p-e6032375.entry.js.map +0 -1
  657. package/dist/ui-library/p-e60d2324.entry.js +0 -2
  658. package/dist/ui-library/p-e60d2324.entry.js.map +0 -1
  659. package/dist/ui-library/p-e8298c6e.entry.js +0 -2
  660. package/dist/ui-library/p-e8298c6e.entry.js.map +0 -1
  661. package/dist/ui-library/p-ed279165.entry.js.map +0 -1
  662. package/dist/ui-library/p-ed61b75c.entry.js +0 -2
  663. package/dist/ui-library/p-ed61b75c.entry.js.map +0 -1
  664. package/dist/ui-library/p-f1ab3384.entry.js +0 -2
  665. package/dist/ui-library/p-f1ab3384.entry.js.map +0 -1
  666. package/dist/ui-library/p-f4ef481c.entry.js +0 -2
  667. package/dist/ui-library/p-f4ef481c.entry.js.map +0 -1
  668. package/dist/ui-library/p-f8cbb8da.entry.js +0 -2
  669. package/dist/ui-library/p-f8cbb8da.entry.js.map +0 -1
  670. /package/dist/ui-library/{p-61e66671.js.map → p-6ee48e81.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"six-details2.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,4tEAA4tE;;ACIlvE,IAAI,EAAE,GAAG,CAAC,CAAC;MAuBE,UAAU;;;;;;;;;QAQb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;QAChC,cAAS,GAAG,KAAK,CAAC;QA8HlB,4BAAuB,GAAG,CAAC,KAAsB;YACvD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;gBAAE,OAAO;YAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;;YAG3C,IAAI,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBACjF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;gBAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,GAAG,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;gBAChE,IAAI,CAAC,IAAI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I,GAAG,MAAM,GAAG,OAAO,mBAC5B,GAAG,IAAI,CAAC,WAAW,UAAU,mBAC7B,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,EAChC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAChC,SAAS,EAAE,IAAI,CAAC,oBAAoB,IAEpC,WAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,kBAAkB,IAC1C,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,EAEN,YACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;gBACL,uBAAuB,EAAE,IAAI;gBAC7B,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;aAC1D,IAED,YAAM,IAAI,EAAC,cAAc,EAAC,YAAY,EAAE,OAAO,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,IAC5E,WAAW,IAAI,gBAAU,IAAI,EAAE,IAAI,CAAC,eAAe,IAAG,WAAW,CAAY,CACzE,CACF,CACA,EAET,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,eAAe,EAAC,eAAe,EAAE,IAAI,CAAC,uBAAuB,IACrG,WACE,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,UAAU,EACjC,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,QAAQ,qBACI,GAAG,IAAI,CAAC,WAAW,SAAS,IAE7C,eAAQ,CACJ,CACF,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/six-details/six-details.scss?tag=six-details&encapsulation=shadow","src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n * @prop --horizontal-padding: The horizontal padding\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n --horizontal-padding: var(--six-spacing-medium);\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium) var(--horizontal-padding);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\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 - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\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 === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-details2.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,4tEAA4tE,CAAC;AACnvE,yBAAe,aAAa;;ACG5B,IAAI,EAAE,GAAG,CAAC,CAAC;MAuBE,UAAU;;;;;;;;;QAQb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;QAChC,cAAS,GAAG,KAAK,CAAC;QA8HlB,4BAAuB,GAAG,CAAC,KAAsB;YACvD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;gBAAE,OAAO;YAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;;YAG3C,IAAI,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBACjF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;gBAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,GAAG,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,I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src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n * @prop --horizontal-padding: The horizontal padding\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n --horizontal-padding: var(--six-spacing-medium);\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium) var(--horizontal-padding);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\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 - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\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 === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,13 +1,13 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { u as unlockBodyScrolling, l as lockBodyScrolling } from './scroll.js';
3
3
  import { h as hasSlot } from './slot.js';
4
- import { i as isPreventScrollSupported, M as Modal } from './modal.js';
4
+ import { M as Modal } from './modal.js';
5
5
  import { d as defineCustomElement$3 } from './six-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './six-icon-button2.js';
7
7
 
8
8
  const sixDialogCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--width:31rem;display:contents}.dialog{display:flex;align-items:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--six-z-index-dialog);color:var(--six-color-web-rock-900)}.dialog:not(.dialog--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.dialog__panel{display:flex;flex-direction:column;z-index:2;width:var(--width);max-width:calc(100% - var(--six-spacing-xx-large));max-height:calc(100% - var(--six-spacing-xx-large));background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);box-shadow:var(--six-shadow-large);opacity:0;transform:scale(0.8);transition:var(--six-transition-medium) opacity, var(--six-transition-medium) transform}.dialog__panel:focus{outline:none}@media screen and (max-width: 420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{display:flex;opacity:1;transform:none}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{flex:1 1 auto;font-size:var(--six-font-size-x-large);font-weight:var(--six-font-weight-bold);line-height:var(--six-line-height-dense);padding:var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small)}.dialog__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-x-large);padding:0 var(--six-spacing-x-small)}.dialog__body{flex:1 1 auto;padding:var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);overflow:auto;-webkit-overflow-scrolling:touch}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--six-spacing-large)}.dialog__footer ::slotted(six-button:not(:first-of-type)){margin-left:var(--six-spacing-xx-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog__overlay{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}.dialog--open .dialog__overlay{opacity:0.8}";
9
+ const SixDialogStyle0 = sixDialogCss;
9
10
 
10
- const hasPreventScroll = isPreventScrollSupported();
11
11
  let id = 0;
12
12
  const SixDialog$1 = /*@__PURE__*/ proxyCustomElement(class SixDialog extends HTMLElement {
13
13
  constructor() {
@@ -93,30 +93,12 @@ const SixDialog$1 = /*@__PURE__*/ proxyCustomElement(class SixDialog extends HTM
93
93
  this.modal.activate();
94
94
  lockBodyScrolling(this.host);
95
95
  if (this.open) {
96
- if (hasPreventScroll) {
97
- // Wait for the next frame before setting initial focus so the dialog is technically visible
98
- requestAnimationFrame(() => {
99
- const sixInitialFocus = this.sixInitialFocus.emit();
100
- if (!sixInitialFocus.defaultPrevented) {
101
- panel.focus({ preventScroll: true });
102
- }
103
- });
104
- }
105
- else {
106
- // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to
107
- // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its
108
- // out of view initially.
109
- //
110
- // Fiddle: https://jsfiddle.net/g6buoafq/1/
111
- // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583
112
- //
113
- this.dialog.addEventListener('transitionend', () => {
114
- const sixInitialFocus = this.sixInitialFocus.emit();
115
- if (!sixInitialFocus.defaultPrevented) {
116
- panel.focus();
117
- }
118
- }, { once: true });
119
- }
96
+ requestAnimationFrame(() => {
97
+ const sixInitialFocus = this.sixInitialFocus.emit();
98
+ if (!sixInitialFocus.defaultPrevented) {
99
+ panel.focus({ preventScroll: true });
100
+ }
101
+ });
120
102
  }
121
103
  }
122
104
  /** Hides the dialog */
@@ -135,18 +117,18 @@ const SixDialog$1 = /*@__PURE__*/ proxyCustomElement(class SixDialog extends HTM
135
117
  unlockBodyScrolling(this.host);
136
118
  }
137
119
  render() {
138
- return (h("div", { ref: (el) => (this.dialog = el), part: "base", class: {
120
+ return (h("div", { key: 'df1ad36ca5c4f01bdd0607fbb305158c820cba61', ref: (el) => (this.dialog = el), part: "base", class: {
139
121
  dialog: true,
140
122
  'dialog--open': this.open,
141
123
  'dialog--visible': this.isVisible,
142
124
  'dialog--has-footer': this.hasFooter,
143
- }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "dialog__overlay", onClick: this.handleOverlayClick }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "dialog__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 && (h("header", { part: "header", class: "dialog__header" }, h("span", { part: "title", class: "dialog__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "dialog__close", name: "close", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "dialog__body" }, h("slot", null)), h("footer", { part: "footer", class: "dialog__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
125
+ }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { key: 'c8bb4895e3c4a324128797a5c5d214e6400ad34d', part: "overlay", class: "dialog__overlay", onClick: this.handleOverlayClick }), h("div", { key: '45dd7b4ab7aa300c434e3ae31772ea76da8cafc5', ref: (el) => (this.panel = el), part: "panel", class: "dialog__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 && (h("header", { part: "header", class: "dialog__header" }, h("span", { part: "title", class: "dialog__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "dialog__close", name: "close", onClick: this.handleCloseClick }))), h("div", { key: '2b2e44b8a06742c7d0648cc0d3b57064ce52d4af', part: "body", class: "dialog__body" }, h("slot", { key: 'c5a11acaeb1dfb4560b4ce1c8407c8468fd3858a' })), h("footer", { key: '0ec839c1ea9cb891a3af893a1209805c85796653', part: "footer", class: "dialog__footer" }, h("slot", { key: '6618d5255dac86544ce238014e374908d1b4935e', name: "footer", onSlotchange: this.handleSlotChange })))));
144
126
  }
145
127
  get host() { return this; }
146
128
  static get watchers() { return {
147
129
  "open": ["handleOpenChange"]
148
130
  }; }
149
- static get style() { return sixDialogCss; }
131
+ static get style() { return SixDialogStyle0; }
150
132
  }, [1, "six-dialog", {
151
133
  "open": [1540],
152
134
  "label": [1],
@@ -1 +1 @@
1
- {"file":"six-dialog.js","mappings":";;;;;;;AAAA,MAAM,YAAY,GAAG,kkEAAkkE;;ACOvlE,MAAM,gBA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AY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACpD,CACL,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixDialog"],"sources":["src/components/six-dialog/six-dialog.scss?tag=six-dialog&encapsulation=shadow","src/components/six-dialog/six-dialog.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --width: The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.\n */\n:host {\n --width: 31rem;\n\n display: contents;\n}\n\n.dialog {\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: var(--six-z-index-dialog);\n color: var(--six-color-web-rock-900);\n\n &:not(.dialog--visible) {\n @include hidden;\n }\n}\n\n.dialog__panel {\n display: flex;\n flex-direction: column;\n z-index: 2;\n width: var(--width);\n max-width: calc(100% - var(--six-spacing-xx-large));\n max-height: calc(100% - var(--six-spacing-xx-large));\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--six-shadow-large);\n opacity: 0;\n transform: scale(0.8);\n transition: var(--six-transition-medium) opacity, var(--six-transition-medium) transform;\n\n &:focus {\n outline: none;\n }\n}\n\n// Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone)\n@media screen and (max-width: 420px) {\n .dialog__panel {\n max-height: 80vh;\n }\n}\n\n.dialog--open .dialog__panel {\n display: flex;\n opacity: 1;\n transform: none;\n}\n\n.dialog__header {\n flex: 0 0 auto;\n display: flex;\n}\n\n.dialog__title {\n flex: 1 1 auto;\n font-size: var(--six-font-size-x-large);\n font-weight: var(--six-font-weight-bold);\n line-height: var(--six-line-height-dense);\n padding: var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small);\n}\n\n.dialog__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-x-small);\n}\n\n.dialog__body {\n flex: 1 1 auto;\n padding: var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.dialog__footer {\n flex: 0 0 auto;\n text-align: right;\n padding: var(--six-spacing-large);\n\n ::slotted(six-button:not(:first-of-type)) {\n margin-left: var(--six-spacing-xx-small);\n }\n}\n\n.dialog:not(.dialog--has-footer) .dialog__footer {\n display: none;\n}\n\n.dialog__overlay {\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}\n\n.dialog--open .dialog__overlay {\n opacity: 0.8;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } 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();\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The dialog's content.\n * @slot label - The dialog's label. Alternatively, you can use the label prop.\n * @slot footer - The dialog'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 dialog panel (where the dialog and its content is rendered).\n * @part header - The dialog header.\n * @part title - The dialog title.\n * @part close-button - The close button.\n * @part body - The dialog body.\n * @part footer - The dialog footer.\n *\n */\n@Component({\n tag: 'six-dialog',\n styleUrl: 'six-dialog.scss',\n shadow: true,\n})\nexport class SixDialog {\n private componentId = `dialog-${++id}`;\n private dialog?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDialogElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the dialog 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 dialog'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 /**\n * Set to true to disable the header. This will also remove the default close button, so please ensure you provide an\n * easy, accessible way for users to dismiss the dialog.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the dialog opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dialog-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog opens and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dialog closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dialog-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog closes and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the dialog 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 dialog, such as an input or button.\n */\n @Event({ eventName: 'six-dialog-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the dialog from closing. */\n @Event({ eventName: 'six-dialog-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => this.panel?.focus(),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the dialog */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.dialog == null) {\n return;\n }\n const panel = this.panel;\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 this.modal.activate();\n\n lockBodyScrolling(this.host);\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 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.dialog.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the dialog */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private 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 === 'opacity' && target.classList.contains('dialog__panel')) {\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\n render() {\n return (\n <div\n ref={(el) => (this.dialog = el)}\n part=\"base\"\n class={{\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--visible': this.isVisible,\n 'dialog--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"dialog__overlay\" onClick={this.handleOverlayClick} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dialog__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=\"dialog__header\">\n <span part=\"title\" class=\"dialog__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=\"dialog__close\"\n name=\"close\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"dialog__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-dialog.js","mappings":";;;;;;;AAAA,MAAM,YAAY,GAAG,kkEAAkkE,CAAC;AACxlE,wBAAe,YAAY;;ACK3B,IAAI,EAAE,GAAG,CAAC,CAAC;MA2BEA,WAAS;;;;;;;;;;;QACZ,gBAAW,GAAG,UAAU,EAAE,EAAE,EAAE,CAAC;QAI/B,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAwHjB,qBAA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,QAAQ,GAAG,GAAG,IAAI,CAAC,WAAW,QAAQ,GAAG,IAAI,EACpE,QAAQ,EAAE,CAAC,IAEV,CAAC,IAAI,CAAC,QAAQ,KACb,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB,IAC1C,YAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,eAAe,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,QAAQ,IACtE,YAAM,IAAI,EAAC,OAAO,IAEf,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CACpC,CACF,EACP,uBACE,WAAW,EAAC,mBAAmB,EAC/B,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACK,CACV,EAED,4DAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,IACnC,8DAAQ,CACJ,EAEN,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB,IAC1C,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACpD,CACL,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixDialog"],"sources":["src/components/six-dialog/six-dialog.scss?tag=six-dialog&encapsulation=shadow","src/components/six-dialog/six-dialog.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --width: The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.\n */\n:host {\n --width: 31rem;\n\n display: contents;\n}\n\n.dialog {\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: var(--six-z-index-dialog);\n color: var(--six-color-web-rock-900);\n\n &:not(.dialog--visible) {\n @include hidden;\n }\n}\n\n.dialog__panel {\n display: flex;\n flex-direction: column;\n z-index: 2;\n width: var(--width);\n max-width: calc(100% - var(--six-spacing-xx-large));\n max-height: calc(100% - var(--six-spacing-xx-large));\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--six-shadow-large);\n opacity: 0;\n transform: scale(0.8);\n transition: var(--six-transition-medium) opacity, var(--six-transition-medium) transform;\n\n &:focus {\n outline: none;\n }\n}\n\n// Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone)\n@media screen and (max-width: 420px) {\n .dialog__panel {\n max-height: 80vh;\n }\n}\n\n.dialog--open .dialog__panel {\n display: flex;\n opacity: 1;\n transform: none;\n}\n\n.dialog__header {\n flex: 0 0 auto;\n display: flex;\n}\n\n.dialog__title {\n flex: 1 1 auto;\n font-size: var(--six-font-size-x-large);\n font-weight: var(--six-font-weight-bold);\n line-height: var(--six-line-height-dense);\n padding: var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small);\n}\n\n.dialog__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-x-small);\n}\n\n.dialog__body {\n flex: 1 1 auto;\n padding: var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.dialog__footer {\n flex: 0 0 auto;\n text-align: right;\n padding: var(--six-spacing-large);\n\n ::slotted(six-button:not(:first-of-type)) {\n margin-left: var(--six-spacing-xx-small);\n }\n}\n\n.dialog:not(.dialog--has-footer) .dialog__footer {\n display: none;\n}\n\n.dialog__overlay {\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}\n\n.dialog--open .dialog__overlay {\n opacity: 0.8;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport Modal from '../../utils/modal';\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 - The dialog's content.\n * @slot label - The dialog's label. Alternatively, you can use the label prop.\n * @slot footer - The dialog'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 dialog panel (where the dialog and its content is rendered).\n * @part header - The dialog header.\n * @part title - The dialog title.\n * @part close-button - The close button.\n * @part body - The dialog body.\n * @part footer - The dialog footer.\n *\n */\n@Component({\n tag: 'six-dialog',\n styleUrl: 'six-dialog.scss',\n shadow: true,\n})\nexport class SixDialog {\n private componentId = `dialog-${++id}`;\n private dialog?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDialogElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the dialog 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 dialog'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 /**\n * Set to true to disable the header. This will also remove the default close button, so please ensure you provide an\n * easy, accessible way for users to dismiss the dialog.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the dialog opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dialog-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog opens and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dialog closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dialog-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dialog closes and all transitions are complete. */\n @Event({ eventName: 'six-dialog-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the dialog 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 dialog, such as an input or button.\n */\n @Event({ eventName: 'six-dialog-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the dialog from closing. */\n @Event({ eventName: 'six-dialog-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => this.panel?.focus(),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the dialog */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.dialog == null) {\n return;\n }\n const panel = this.panel;\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 this.modal.activate();\n\n lockBodyScrolling(this.host);\n\n if (this.open) {\n requestAnimationFrame(() => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus({ preventScroll: true });\n }\n });\n }\n }\n\n /** Hides the dialog */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private 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 === 'opacity' && target.classList.contains('dialog__panel')) {\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\n render() {\n return (\n <div\n ref={(el) => (this.dialog = el)}\n part=\"base\"\n class={{\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--visible': this.isVisible,\n 'dialog--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"dialog__overlay\" onClick={this.handleOverlayClick} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dialog__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=\"dialog__header\">\n <span part=\"title\" class=\"dialog__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=\"dialog__close\"\n name=\"close\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"dialog__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,13 +1,13 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { u as unlockBodyScrolling, l as lockBodyScrolling } from './scroll.js';
3
3
  import { h as hasSlot } from './slot.js';
4
- import { i as isPreventScrollSupported, M as Modal } from './modal.js';
4
+ import { M as Modal } from './modal.js';
5
5
  import { d as defineCustomElement$3 } from './six-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './six-icon-button2.js';
7
7
 
8
8
  const sixDrawerCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}: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-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}";
9
+ const SixDrawerStyle0 = sixDrawerCss;
9
10
 
10
- const hasPreventScroll = isPreventScrollSupported();
11
11
  let id = 0;
12
12
  const SixDrawer$1 = /*@__PURE__*/ proxyCustomElement(class SixDrawer extends HTMLElement {
13
13
  constructor() {
@@ -96,30 +96,13 @@ const SixDrawer$1 = /*@__PURE__*/ proxyCustomElement(class SixDrawer extends HTM
96
96
  lockBodyScrolling(this.host);
97
97
  }
98
98
  if (this.open) {
99
- if (hasPreventScroll) {
100
- // Wait for the next frame before setting initial focus so the dialog is technically visible
101
- requestAnimationFrame(() => {
102
- const sixInitialFocus = this.sixInitialFocus.emit();
103
- if (!sixInitialFocus.defaultPrevented) {
104
- panel.focus({ preventScroll: true });
105
- }
106
- });
107
- }
108
- else {
109
- // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to
110
- // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its
111
- // out of view initially.
112
- //
113
- // Fiddle: https://jsfiddle.net/g6buoafq/1/
114
- // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583
115
- //
116
- this.drawer.addEventListener('transitionend', () => {
117
- const sixInitialFocus = this.sixInitialFocus.emit();
118
- if (!sixInitialFocus.defaultPrevented) {
119
- panel.focus();
120
- }
121
- }, { once: true });
122
- }
99
+ // Wait for the next frame before setting initial focus so the dialog is technically visible
100
+ requestAnimationFrame(() => {
101
+ const sixInitialFocus = this.sixInitialFocus.emit();
102
+ if (!sixInitialFocus.defaultPrevented) {
103
+ panel.focus({ preventScroll: true });
104
+ }
105
+ });
123
106
  }
124
107
  }
125
108
  /** Hides the drawer */
@@ -144,7 +127,7 @@ const SixDrawer$1 = /*@__PURE__*/ proxyCustomElement(class SixDrawer extends HTM
144
127
  this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
145
128
  }
146
129
  render() {
147
- return (h("div", { ref: (el) => (this.drawer = el), part: "base", class: {
130
+ return (h("div", { key: 'c863c7d4440416870b4d9e86b9e1ca7922948a38', ref: (el) => (this.drawer = el), part: "base", class: {
148
131
  drawer: true,
149
132
  'drawer--open': this.open,
150
133
  'drawer--visible': this.isVisible,
@@ -155,13 +138,13 @@ const SixDrawer$1 = /*@__PURE__*/ proxyCustomElement(class SixDrawer extends HTM
155
138
  'drawer--contained': this.contained,
156
139
  'drawer--fixed': !this.contained,
157
140
  'drawer--has-footer': this.hasFooter,
158
- }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "drawer__overlay", onClick: this.handleOverlayClick, tabIndex: -1 }), h("div", { ref: (el) => (this.panel = el), 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 && (h("header", { part: "header", class: "drawer__header" }, h("span", { part: "title", class: "drawer__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "drawer__close", name: "close", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "drawer__body" }, h("slot", null)), h("footer", { part: "footer", class: "drawer__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
141
+ }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { key: 'c3658d2eaac5636cc64035878a590794b1785458', part: "overlay", class: "drawer__overlay", onClick: this.handleOverlayClick, tabIndex: -1 }), h("div", { key: '07f187570fc25af621c7be4259b90e1a4999b2d7', ref: (el) => (this.panel = el), 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 && (h("header", { part: "header", class: "drawer__header" }, h("span", { part: "title", class: "drawer__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "drawer__close", name: "close", onClick: this.handleCloseClick }))), h("div", { key: 'e5b565a175f65e9990ba7de28b12ec4ebb69025d', part: "body", class: "drawer__body" }, h("slot", { key: 'f92f461ccb9fe322e6fe958aa03db86f5e5b8121' })), h("footer", { key: 'a04d817305d2f5f98b2a17019bfc9e8401fb3941', part: "footer", class: "drawer__footer" }, h("slot", { key: 'e035c9fbf453cd2d4fd69b32ad876499f273ad48', name: "footer", onSlotchange: this.handleSlotChange })))));
159
142
  }
160
143
  get host() { return this; }
161
144
  static get watchers() { return {
162
145
  "open": ["handleOpenChange"]
163
146
  }; }
164
- static get style() { return sixDrawerCss; }
147
+ static get style() { return SixDrawerStyle0; }
165
148
  }, [1, "six-drawer", {
166
149
  "open": [1540],
167
150
  "label": [1],
@@ -1 +1 @@
1
- {"file":"six-drawer.js","mappings":";;;;;;;AAAA,MAAM,YAAY,GAAG,0xEAA0xE;;ACO/yE,MAAM,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AACpD,IAAI,EAAE,GAAG,CAAC,CAAC;MA2BEA,WAAS;;;;;;;;;;;QACZ,gBAAW,GAAG,UAAU,EAAE,EAAE,EAAE,CAAC;QAI/B,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QA0JjB,qBAAgB,GAAG;YACzB,IAAI,CAAC,IAAI,EAAE,CAA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,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACK,CACV,EAED,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,IACnC,eAAQ,CACJ,EAEN,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB,IAC1C,YAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACpD,CACL,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixDrawer"],"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-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, h, Method, Prop, State, Watch } 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 private componentId = `drawer-${++id}`;\n private drawer?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether 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.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 || this.modal == null || this.panel == null || this.drawer == null) {\n return;\n }\n const panel = this.panel;\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 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 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 || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private 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=\"close\"\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"],"version":3}
1
+ {"file":"six-drawer.js","mappings":";;;;;;;AAAA,MAAM,YAAY,GAAG,0xEAA0xE,CAAC;AAChzE,wBAAe,YAAY;;ACK3B,IAAI,EAAE,GAAG,CAAC,CAAC;MA2BEA,WAAS;;;;;;;;;;;QACZ,gBAAW,GAAG,UAAU,EAAE,EAAE,EAAE,CAAC;QAI/B,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAsIjB,qBAAgB,GAAG;YACzB,IAAI,CAAC,IAAI,EAAE,CAAC;SACb,CAAC;QAEM,kBAAa,GAAG,CAAC,KAAoB;YAC3C,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;gBAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;aACb;SACF,CAAC;QAEM,uBAAkB,GAAG;YAC3B,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAA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EAAE,CAAC,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,QAAQ,gBACF,MAAM,iBACJ,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,gBAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,qBAC5B,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,WAAW,QAAQ,GAAG,IAAI,EACpE,QAAQ,EAAE,CAAC,IAEV,CAAC,IAAI,CAAC,QAAQ,KACb,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB,IAC1C,YAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,eAAe,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,QAAQ,IACtE,YAAM,IAAI,EAAC,OAAO,IAEf,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CACpC,CACF,EACP,uBACE,WAAW,EAAC,mBAAmB,EAC/B,KAAK,EAAC,eAAe,EACrB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACK,CACV,EAED,4DAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,IACnC,8DAAQ,CACJ,EAEN,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB,IAC1C,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACpD,CACL,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SixDrawer"],"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-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, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport Modal from '../../utils/modal';\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 - 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 private componentId = `drawer-${++id}`;\n private drawer?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether 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.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 || this.modal == null || this.panel == null || this.drawer == null) {\n return;\n }\n const panel = this.panel;\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 // 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 panel.focus({ preventScroll: true });\n }\n });\n }\n }\n\n /** Hides the drawer */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private 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=\"close\"\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"],"version":3}
@@ -33,6 +33,7 @@ function getNearestTabbableElement(el) {
33
33
  }
34
34
 
35
35
  const sixDropdownCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block}.dropdown{position:relative}.dropdown__trigger{display:block}.dropdown__positioner{position:absolute;z-index:var(--six-z-index-dropdown)}.dropdown__positioner__filtered{width:100%}.dropdown__panel{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);color:var(--color);background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);border:1px solid var(--six-color-web-rock-300);box-shadow:var(--six-shadow-small);opacity:0;pointer-events:none;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;max-width:90vw}.dropdown__panel__scroll{max-height:18.75rem;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none}.dropdown__panel__scroll--virtual{overflow-y:hidden;overflow-x:hidden}.filter-hidden{display:none}.dropdown__positioner[data-popper-placement^=top] .dropdown__panel{transform-origin:bottom}.dropdown__positioner[data-popper-placement^=bottom] .dropdown__panel{transform-origin:top}.dropdown__positioner[data-popper-placement^=left] .dropdown__panel{transform-origin:right}.dropdown__positioner[data-popper-placement^=right] .dropdown__panel{transform-origin:left}.dropdown__positioner.popover-visible .dropdown__panel{opacity:1;transform:none;pointer-events:all}.filter{border-bottom:1px solid var(--six-color-web-rock-300)}.filter__icon{color:var(--six-color-web-rock-600)}";
36
+ const SixDropdownStyle0 = sixDropdownCss;
36
37
 
37
38
  let id = 0;
38
39
  const SixDropdown = /*@__PURE__*/ proxyCustomElement(class SixDropdown extends HTMLElement {
@@ -482,19 +483,19 @@ const SixDropdown = /*@__PURE__*/ proxyCustomElement(class SixDropdown extends H
482
483
  }
483
484
  }
484
485
  render() {
485
- return (h("div", { part: "base", id: this.componentId, class: {
486
+ return (h("div", { key: '6569a6e118fd68e19f14dcae0553e25f81987923', part: "base", id: this.componentId, class: {
486
487
  dropdown: true,
487
488
  'dropdown--open': this.open,
488
- } }, h("span", { part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown, onKeyUp: this.handleTriggerKeyUp }, h("slot", { name: "trigger", ref: (el) => (this.triggerSlot = el), onSlotchange: this.handleTriggerSlotChange })), h("div", { ref: (el) => (this.positioner = el), class: {
489
+ } }, h("span", { key: 'be04c5d687eafa3c58c9fed9cf43f72d43aa45ef', part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown, onKeyUp: this.handleTriggerKeyUp }, h("slot", { key: 'fba562d4fc45a0874e5cf8caad5e9710d6dd34e0', name: "trigger", ref: (el) => (this.triggerSlot = el), onSlotchange: this.handleTriggerSlotChange })), h("div", { key: 'd37f1cb0246d47ca34004f35e3575e8433d998c8', ref: (el) => (this.positioner = el), class: {
489
490
  dropdown__positioner: true,
490
491
  dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,
491
- } }, h("div", { ref: (el) => (this.panel = el), part: "panel", class: "dropdown__panel", role: "menu", "aria-hidden": this.open ? 'false' : 'true', "aria-labelledby": this.componentId }, this.filterEnabled && (h("six-input", { class: {
492
+ } }, h("div", { key: 'e6c08b51f39a12259b4d8911770e1e1754dc4b8e', ref: (el) => (this.panel = el), part: "panel", class: "dropdown__panel", role: "menu", "aria-hidden": this.open ? 'false' : 'true', "aria-labelledby": this.componentId }, this.filterEnabled && (h("six-input", { class: {
492
493
  filter: true,
493
494
  'filter-hidden': !this.open,
494
- }, "dropdown-search": true, "aria-hidden": this.open ? 'false' : 'true', ref: (el) => (this.filterInputElement = el), placeholder: this.filterPlaceholder }, h("six-icon", { class: "filter__icon", slot: "suffix", size: "small" }, "search"))), h("div", { class: {
495
+ }, "dropdown-search": true, "aria-hidden": this.open ? 'false' : 'true', ref: (el) => (this.filterInputElement = el), placeholder: this.filterPlaceholder }, h("six-icon", { class: "filter__icon", slot: "suffix", size: "small" }, "search"))), h("div", { key: '174d0a5dd5965877e9278475112e2f14d959966d', class: {
495
496
  dropdown__panel__scroll: true,
496
497
  'dropdown__panel__scroll--virtual': this.virtualScroll,
497
- }, onScroll: this.handleDropdownScroll, ref: (el) => (this.scrollPanel = el) }, h("slot", { ref: (el) => (this.panelSlot = el) }), this.options.length > 0 && (h("six-menu", { part: "menu", items: this.renderedOptions, virtualScroll: this.virtualScroll }))), h("slot", { name: "dropdown-footer" })))));
498
+ }, onScroll: this.handleDropdownScroll, ref: (el) => (this.scrollPanel = el) }, h("slot", { key: 'fa0fc63a45e693cc6655db03b0382f028aea9473', ref: (el) => (this.panelSlot = el) }), this.options.length > 0 && (h("six-menu", { part: "menu", items: this.renderedOptions, virtualScroll: this.virtualScroll }))), h("slot", { key: 'f24f41a9a70f0624078d43eb60b41e841ee90bf7', name: "dropdown-footer" })))));
498
499
  }
499
500
  get host() { return this; }
500
501
  static get watchers() { return {
@@ -506,7 +507,7 @@ const SixDropdown = /*@__PURE__*/ proxyCustomElement(class SixDropdown extends H
506
507
  "options": ["handleOptionsChange"],
507
508
  "virtualScroll": ["handleOptionsChange"]
508
509
  }; }
509
- static get style() { return sixDropdownCss; }
510
+ static get style() { return SixDropdownStyle0; }
510
511
  }, [1, "six-dropdown", {
511
512
  "open": [1540],
512
513
  "placement": [1],