@six-group/ui-library 0.0.0-insider.3edb656 → 0.0.0-insider.3f62f6b

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 (694) 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-de259450.js} +2 -2
  4. package/dist/cjs/{form-control-8d64e974.js.map → form-control-de259450.js.map} +1 -1
  5. package/dist/cjs/{index-d7748d51.js → index-1f707a55.js} +524 -36
  6. package/dist/cjs/index-1f707a55.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 +17 -7
  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 +7 -5
  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 +11 -9
  22. package/dist/cjs/six-checkbox_2.cjs.entry.js.map +1 -1
  23. package/dist/cjs/six-datepicker.cjs.entry.js +40 -12
  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 +14 -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 +17 -13
  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 +5 -4
  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 +34 -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 +24 -16
  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 +11 -6
  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 +70 -44
  82. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  83. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +4 -3
  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/assets/TRADEMARKS.md +3 -3
  114. package/dist/collection/collection-manifest.json +2 -2
  115. package/dist/collection/components/six-alert/six-alert.js +15 -6
  116. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  117. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  118. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  119. package/dist/collection/components/six-badge/six-badge.js +2 -2
  120. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  121. package/dist/collection/components/six-button/six-button.css +17 -0
  122. package/dist/collection/components/six-button/six-button.js +5 -4
  123. package/dist/collection/components/six-button/six-button.js.map +1 -1
  124. package/dist/collection/components/six-button/test/six-button.spec.js.map +1 -1
  125. package/dist/collection/components/six-card/six-card.js +1 -1
  126. package/dist/collection/components/six-card/six-card.js.map +1 -1
  127. package/dist/collection/components/six-checkbox/six-checkbox.css +2 -0
  128. package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
  129. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  130. package/dist/collection/components/six-datepicker/six-datepicker.js +14 -12
  131. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  132. package/dist/collection/components/six-details/six-details.js +3 -3
  133. package/dist/collection/components/six-details/six-details.js.map +1 -1
  134. package/dist/collection/components/six-dialog/six-dialog.js +10 -28
  135. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  136. package/dist/collection/components/six-drawer/six-drawer.js +9 -28
  137. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  138. package/dist/collection/components/six-dropdown/six-dropdown.js +10 -8
  139. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  140. package/dist/collection/components/six-error/six-error.css +1 -0
  141. package/dist/collection/components/six-error/six-error.js +1 -1
  142. package/dist/collection/components/six-error/six-error.js.map +1 -1
  143. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  144. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  145. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  146. package/dist/collection/components/six-file-list/six-file-list.js.map +1 -1
  147. package/dist/collection/components/six-file-list-item/six-file-list-item.js +2 -2
  148. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  149. package/dist/collection/components/six-file-upload/six-file-upload.css +11 -0
  150. package/dist/collection/components/six-file-upload/six-file-upload.js +87 -7
  151. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  152. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js +187 -24
  153. package/dist/collection/components/six-file-upload/test/six-file-upload.spec.js.map +1 -1
  154. package/dist/collection/components/six-footer/six-footer.js +1 -1
  155. package/dist/collection/components/six-footer/six-footer.js.map +1 -1
  156. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  157. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  158. package/dist/collection/components/six-header/six-header.css +9 -0
  159. package/dist/collection/components/six-header/six-header.js +38 -13
  160. package/dist/collection/components/six-header/six-header.js.map +1 -1
  161. package/dist/collection/components/six-icon/six-icon.js +2 -2
  162. package/dist/collection/components/six-icon/six-icon.js.map +1 -1
  163. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  164. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  165. package/dist/collection/components/six-input/six-input.js +3 -3
  166. package/dist/collection/components/six-input/six-input.js.map +1 -1
  167. package/dist/collection/components/six-item-picker/six-item-picker.js +3 -3
  168. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  169. package/dist/collection/components/six-language-switcher/six-language-switcher.css +7 -2
  170. package/dist/collection/components/six-language-switcher/six-language-switcher.js +7 -3
  171. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  172. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js +20 -20
  173. package/dist/collection/components/six-language-switcher/test/six-language-switcher.spec.js.map +1 -1
  174. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  175. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  176. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  177. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  178. package/dist/collection/components/six-menu/six-menu.js +2 -2
  179. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  180. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  181. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  182. package/dist/collection/components/six-menu-divider/six-menu-divider.js.map +1 -1
  183. package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
  184. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  185. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  186. package/dist/collection/components/six-menu-label/six-menu-label.js.map +1 -1
  187. package/dist/collection/components/six-picto/six-picto.js +1 -1
  188. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  189. package/dist/collection/components/six-progress-bar/six-progress-bar.js +2 -2
  190. package/dist/collection/components/six-progress-bar/six-progress-bar.js.map +1 -1
  191. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  192. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  193. package/dist/collection/components/six-radio/six-radio.js +2 -2
  194. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  195. package/dist/collection/components/six-range/six-range.css +1 -1
  196. package/dist/collection/components/six-range/six-range.js +12 -2
  197. package/dist/collection/components/six-range/six-range.js.map +1 -1
  198. package/dist/collection/components/six-root/six-root.js +1 -1
  199. package/dist/collection/components/six-root/six-root.js.map +1 -1
  200. package/dist/collection/components/six-search-field/six-search-field.js +1 -1
  201. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  202. package/dist/collection/components/six-select/six-select.js +33 -41
  203. package/dist/collection/components/six-select/six-select.js.map +1 -1
  204. package/dist/collection/components/six-select/test/util.spec.js +23 -1
  205. package/dist/collection/components/six-select/test/util.spec.js.map +1 -1
  206. package/dist/collection/components/six-select/util.js +24 -0
  207. package/dist/collection/components/six-select/util.js.map +1 -1
  208. package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
  209. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  210. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  211. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  212. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +1 -0
  213. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  214. package/dist/collection/components/six-switch/six-switch.js +2 -2
  215. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  216. package/dist/collection/components/six-tab/six-tab.js +2 -2
  217. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  218. package/dist/collection/components/six-tab-group/six-tab-group.js +33 -7
  219. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  220. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  221. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  222. package/dist/collection/components/six-tag/six-tag.js +2 -2
  223. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  224. package/dist/collection/components/six-textarea/six-textarea.js +2 -2
  225. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  226. package/dist/collection/components/six-textarea/test/six-textarea.spec.js.map +1 -1
  227. package/dist/collection/components/six-tile/six-tile.js +3 -3
  228. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  229. package/dist/collection/components/six-timepicker/six-timepicker.js +1 -1
  230. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  231. package/dist/collection/components/six-timepicker/test/six-timepicker.spec.js.map +1 -1
  232. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  233. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  234. package/dist/collection/utils/alert.js.map +1 -1
  235. package/dist/collection/utils/date-util.js +25 -0
  236. package/dist/collection/utils/date-util.js.map +1 -1
  237. package/dist/collection/utils/date-util.spec.js.map +1 -1
  238. package/dist/collection/utils/error-messages.js.map +1 -1
  239. package/dist/collection/utils/event-listeners.js.map +1 -1
  240. package/dist/collection/utils/focus-visible.js.map +1 -1
  241. package/dist/collection/utils/form.js.map +1 -1
  242. package/dist/collection/utils/modal.js.map +1 -1
  243. package/dist/collection/utils/popover.js.map +1 -1
  244. package/dist/collection/utils/popup.js.map +1 -1
  245. package/dist/collection/utils/scroll.js.map +1 -1
  246. package/dist/collection/utils/slot.js.map +1 -1
  247. package/dist/collection/utils/tabbable.js.map +1 -1
  248. package/dist/collection/utils/time.util.js.map +1 -1
  249. package/dist/collection/utils/time.util.spec.js.map +1 -1
  250. package/dist/components/modal.js +1 -17
  251. package/dist/components/modal.js.map +1 -1
  252. package/dist/components/six-alert.js +16 -6
  253. package/dist/components/six-alert.js.map +1 -1
  254. package/dist/components/six-avatar.js +3 -2
  255. package/dist/components/six-avatar.js.map +1 -1
  256. package/dist/components/six-badge.js +4 -3
  257. package/dist/components/six-badge.js.map +1 -1
  258. package/dist/components/six-button2.js +6 -4
  259. package/dist/components/six-button2.js.map +1 -1
  260. package/dist/components/six-card.js +3 -2
  261. package/dist/components/six-card.js.map +1 -1
  262. package/dist/components/six-checkbox2.js +5 -4
  263. package/dist/components/six-checkbox2.js.map +1 -1
  264. package/dist/components/six-datepicker.js +39 -11
  265. package/dist/components/six-datepicker.js.map +1 -1
  266. package/dist/components/six-details2.js +5 -4
  267. package/dist/components/six-details2.js.map +1 -1
  268. package/dist/components/six-dialog.js +13 -29
  269. package/dist/components/six-dialog.js.map +1 -1
  270. package/dist/components/six-drawer.js +12 -29
  271. package/dist/components/six-drawer.js.map +1 -1
  272. package/dist/components/six-dropdown2.js +12 -9
  273. package/dist/components/six-dropdown2.js.map +1 -1
  274. package/dist/components/six-error-page.js +3 -2
  275. package/dist/components/six-error-page.js.map +1 -1
  276. package/dist/components/six-error2.js +4 -3
  277. package/dist/components/six-error2.js.map +1 -1
  278. package/dist/components/six-file-list-item.js +4 -3
  279. package/dist/components/six-file-list-item.js.map +1 -1
  280. package/dist/components/six-file-list.js +3 -2
  281. package/dist/components/six-file-list.js.map +1 -1
  282. package/dist/components/six-file-upload.js +53 -12
  283. package/dist/components/six-file-upload.js.map +1 -1
  284. package/dist/components/six-footer.js +3 -2
  285. package/dist/components/six-footer.js.map +1 -1
  286. package/dist/components/six-group-label.js +3 -2
  287. package/dist/components/six-group-label.js.map +1 -1
  288. package/dist/components/six-header.js +24 -15
  289. package/dist/components/six-header.js.map +1 -1
  290. package/dist/components/six-icon-button2.js +5 -4
  291. package/dist/components/six-icon-button2.js.map +1 -1
  292. package/dist/components/six-icon2.js +4 -3
  293. package/dist/components/six-icon2.js.map +1 -1
  294. package/dist/components/six-input2.js +5 -4
  295. package/dist/components/six-input2.js.map +1 -1
  296. package/dist/components/six-item-picker2.js +5 -4
  297. package/dist/components/six-item-picker2.js.map +1 -1
  298. package/dist/components/six-language-switcher.js +10 -5
  299. package/dist/components/six-language-switcher.js.map +1 -1
  300. package/dist/components/six-layout-grid.js +3 -2
  301. package/dist/components/six-layout-grid.js.map +1 -1
  302. package/dist/components/six-main-container.js +3 -2
  303. package/dist/components/six-main-container.js.map +1 -1
  304. package/dist/components/six-menu-divider.js +3 -2
  305. package/dist/components/six-menu-divider.js.map +1 -1
  306. package/dist/components/six-menu-item2.js +4 -3
  307. package/dist/components/six-menu-item2.js.map +1 -1
  308. package/dist/components/six-menu-label.js +3 -2
  309. package/dist/components/six-menu-label.js.map +1 -1
  310. package/dist/components/six-menu2.js +4 -3
  311. package/dist/components/six-menu2.js.map +1 -1
  312. package/dist/components/six-picto2.js +3 -2
  313. package/dist/components/six-picto2.js.map +1 -1
  314. package/dist/components/six-progress-bar.js +4 -3
  315. package/dist/components/six-progress-bar.js.map +1 -1
  316. package/dist/components/six-progress-ring.js +3 -2
  317. package/dist/components/six-progress-ring.js.map +1 -1
  318. package/dist/components/six-radio.js +4 -3
  319. package/dist/components/six-radio.js.map +1 -1
  320. package/dist/components/six-range.js +15 -4
  321. package/dist/components/six-range.js.map +1 -1
  322. package/dist/components/six-root.js +3 -2
  323. package/dist/components/six-root.js.map +1 -1
  324. package/dist/components/six-search-field.js +3 -2
  325. package/dist/components/six-search-field.js.map +1 -1
  326. package/dist/components/six-select.js +68 -42
  327. package/dist/components/six-select.js.map +1 -1
  328. package/dist/components/six-sidebar-item-group.js +3 -2
  329. package/dist/components/six-sidebar-item-group.js.map +1 -1
  330. package/dist/components/six-sidebar-item.js +4 -3
  331. package/dist/components/six-sidebar-item.js.map +1 -1
  332. package/dist/components/six-sidebar.js +4 -3
  333. package/dist/components/six-sidebar.js.map +1 -1
  334. package/dist/components/six-spinner2.js +2 -1
  335. package/dist/components/six-spinner2.js.map +1 -1
  336. package/dist/components/six-stage-indicator2.js +2 -1
  337. package/dist/components/six-stage-indicator2.js.map +1 -1
  338. package/dist/components/six-switch.js +4 -3
  339. package/dist/components/six-switch.js.map +1 -1
  340. package/dist/components/six-tab-group.js +35 -8
  341. package/dist/components/six-tab-group.js.map +1 -1
  342. package/dist/components/six-tab-panel.js +3 -2
  343. package/dist/components/six-tab-panel.js.map +1 -1
  344. package/dist/components/six-tab.js +4 -3
  345. package/dist/components/six-tab.js.map +1 -1
  346. package/dist/components/six-tag.js +4 -3
  347. package/dist/components/six-tag.js.map +1 -1
  348. package/dist/components/six-textarea.js +4 -3
  349. package/dist/components/six-textarea.js.map +1 -1
  350. package/dist/components/six-tile.js +5 -4
  351. package/dist/components/six-tile.js.map +1 -1
  352. package/dist/components/six-timepicker2.js +3 -2
  353. package/dist/components/six-timepicker2.js.map +1 -1
  354. package/dist/components/six-tooltip2.js +4 -3
  355. package/dist/components/six-tooltip2.js.map +1 -1
  356. package/dist/components.json +147 -17
  357. package/dist/esm/app-globals-0f993ce5.js +5 -0
  358. package/dist/esm/app-globals-0f993ce5.js.map +1 -0
  359. package/dist/esm/{form-control-d403a9cf.js → form-control-30c5bd8b.js} +2 -2
  360. package/dist/esm/{form-control-d403a9cf.js.map → form-control-30c5bd8b.js.map} +1 -1
  361. package/dist/esm/{index-79d4ef67.js → index-5390c1d6.js} +524 -36
  362. package/dist/esm/index-5390c1d6.js.map +1 -0
  363. package/dist/esm/loader.js +6 -4
  364. package/dist/esm/loader.js.map +1 -1
  365. package/dist/esm/{modal-96526245.js → modal-6c1288e3.js} +2 -18
  366. package/dist/esm/modal-6c1288e3.js.map +1 -0
  367. package/dist/esm/six-alert.entry.js +17 -7
  368. package/dist/esm/six-alert.entry.js.map +1 -1
  369. package/dist/esm/six-avatar.entry.js +4 -3
  370. package/dist/esm/six-avatar.entry.js.map +1 -1
  371. package/dist/esm/six-badge.entry.js +5 -4
  372. package/dist/esm/six-badge.entry.js.map +1 -1
  373. package/dist/esm/six-button.entry.js +7 -5
  374. package/dist/esm/six-button.entry.js.map +1 -1
  375. package/dist/esm/six-card.entry.js +4 -3
  376. package/dist/esm/six-card.entry.js.map +1 -1
  377. package/dist/esm/six-checkbox_2.entry.js +11 -9
  378. package/dist/esm/six-checkbox_2.entry.js.map +1 -1
  379. package/dist/esm/six-datepicker.entry.js +40 -12
  380. package/dist/esm/six-datepicker.entry.js.map +1 -1
  381. package/dist/esm/six-details.entry.js +6 -5
  382. package/dist/esm/six-details.entry.js.map +1 -1
  383. package/dist/esm/six-dialog.entry.js +14 -30
  384. package/dist/esm/six-dialog.entry.js.map +1 -1
  385. package/dist/esm/six-drawer.entry.js +13 -30
  386. package/dist/esm/six-drawer.entry.js.map +1 -1
  387. package/dist/esm/six-dropdown_2.entry.js +17 -13
  388. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  389. package/dist/esm/six-error-page.entry.js +4 -3
  390. package/dist/esm/six-error-page.entry.js.map +1 -1
  391. package/dist/esm/six-error.entry.js +5 -4
  392. package/dist/esm/six-error.entry.js.map +1 -1
  393. package/dist/esm/six-file-list-item.entry.js +5 -4
  394. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  395. package/dist/esm/six-file-list.entry.js +4 -3
  396. package/dist/esm/six-file-list.entry.js.map +1 -1
  397. package/dist/esm/six-file-upload.entry.js +34 -9
  398. package/dist/esm/six-file-upload.entry.js.map +1 -1
  399. package/dist/esm/six-footer.entry.js +4 -3
  400. package/dist/esm/six-footer.entry.js.map +1 -1
  401. package/dist/esm/six-group-label.entry.js +5 -4
  402. package/dist/esm/six-group-label.entry.js.map +1 -1
  403. package/dist/esm/six-header.entry.js +24 -16
  404. package/dist/esm/six-header.entry.js.map +1 -1
  405. package/dist/esm/six-icon-button.entry.js +6 -5
  406. package/dist/esm/six-icon-button.entry.js.map +1 -1
  407. package/dist/esm/six-icon.entry.js +5 -4
  408. package/dist/esm/six-icon.entry.js.map +1 -1
  409. package/dist/esm/six-input.entry.js +7 -6
  410. package/dist/esm/six-input.entry.js.map +1 -1
  411. package/dist/esm/six-item-picker.entry.js +6 -5
  412. package/dist/esm/six-item-picker.entry.js.map +1 -1
  413. package/dist/esm/six-language-switcher.entry.js +11 -6
  414. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  415. package/dist/esm/six-layout-grid.entry.js +4 -3
  416. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  417. package/dist/esm/six-main-container.entry.js +4 -3
  418. package/dist/esm/six-main-container.entry.js.map +1 -1
  419. package/dist/esm/six-menu-divider.entry.js +4 -3
  420. package/dist/esm/six-menu-divider.entry.js.map +1 -1
  421. package/dist/esm/six-menu-label.entry.js +4 -3
  422. package/dist/esm/six-menu-label.entry.js.map +1 -1
  423. package/dist/esm/six-picto.entry.js +4 -3
  424. package/dist/esm/six-picto.entry.js.map +1 -1
  425. package/dist/esm/six-progress-bar.entry.js +5 -4
  426. package/dist/esm/six-progress-bar.entry.js.map +1 -1
  427. package/dist/esm/six-progress-ring.entry.js +4 -3
  428. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  429. package/dist/esm/six-radio.entry.js +5 -4
  430. package/dist/esm/six-radio.entry.js.map +1 -1
  431. package/dist/esm/six-range.entry.js +17 -6
  432. package/dist/esm/six-range.entry.js.map +1 -1
  433. package/dist/esm/six-root.entry.js +4 -3
  434. package/dist/esm/six-root.entry.js.map +1 -1
  435. package/dist/esm/six-search-field.entry.js +4 -3
  436. package/dist/esm/six-search-field.entry.js.map +1 -1
  437. package/dist/esm/six-select.entry.js +70 -44
  438. package/dist/esm/six-select.entry.js.map +1 -1
  439. package/dist/esm/six-sidebar-item-group.entry.js +4 -3
  440. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  441. package/dist/esm/six-sidebar-item.entry.js +5 -4
  442. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  443. package/dist/esm/six-sidebar.entry.js +5 -4
  444. package/dist/esm/six-sidebar.entry.js.map +1 -1
  445. package/dist/esm/six-spinner.entry.js +3 -2
  446. package/dist/esm/six-spinner.entry.js.map +1 -1
  447. package/dist/esm/six-stage-indicator.entry.js +3 -2
  448. package/dist/esm/six-stage-indicator.entry.js.map +1 -1
  449. package/dist/esm/six-switch.entry.js +6 -5
  450. package/dist/esm/six-switch.entry.js.map +1 -1
  451. package/dist/esm/six-tab-group.entry.js +34 -8
  452. package/dist/esm/six-tab-group.entry.js.map +1 -1
  453. package/dist/esm/six-tab-panel.entry.js +4 -3
  454. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  455. package/dist/esm/six-tab.entry.js +5 -4
  456. package/dist/esm/six-tab.entry.js.map +1 -1
  457. package/dist/esm/six-tag.entry.js +5 -4
  458. package/dist/esm/six-tag.entry.js.map +1 -1
  459. package/dist/esm/six-textarea.entry.js +6 -5
  460. package/dist/esm/six-textarea.entry.js.map +1 -1
  461. package/dist/esm/six-tile.entry.js +6 -5
  462. package/dist/esm/six-tile.entry.js.map +1 -1
  463. package/dist/esm/six-timepicker.entry.js +4 -3
  464. package/dist/esm/six-timepicker.entry.js.map +1 -1
  465. package/dist/esm/six-tooltip.entry.js +5 -4
  466. package/dist/esm/six-tooltip.entry.js.map +1 -1
  467. package/dist/esm/ui-library.js +7 -5
  468. package/dist/esm/ui-library.js.map +1 -1
  469. package/dist/types/components/six-alert/six-alert.d.ts +8 -4
  470. package/dist/types/components/six-button/six-button.d.ts +1 -1
  471. package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
  472. package/dist/types/components/six-dialog/six-dialog.d.ts +1 -0
  473. package/dist/types/components/six-file-upload/six-file-upload.d.ts +10 -0
  474. package/dist/types/components/six-header/six-header.d.ts +3 -1
  475. package/dist/types/components/six-range/six-range.d.ts +2 -0
  476. package/dist/types/components/six-select/six-select.d.ts +0 -2
  477. package/dist/types/components/six-select/util.d.ts +2 -0
  478. package/dist/types/components/six-tab-group/six-tab-group.d.ts +4 -1
  479. package/dist/types/components.d.ts +52 -6
  480. package/dist/types/utils/date-util.d.ts +9 -1
  481. package/dist/ui-library/assets/TRADEMARKS.md +3 -3
  482. package/dist/ui-library/p-030fa1fa.entry.js +2 -0
  483. package/dist/ui-library/p-030fa1fa.entry.js.map +1 -0
  484. package/dist/ui-library/{p-8888a367.entry.js → p-03d1b956.entry.js} +2 -2
  485. package/dist/ui-library/p-03d1b956.entry.js.map +1 -0
  486. package/dist/ui-library/p-047d02ad.entry.js +2 -0
  487. package/dist/ui-library/p-047d02ad.entry.js.map +1 -0
  488. package/dist/ui-library/p-05eb1bab.js +3 -0
  489. package/dist/ui-library/p-05eb1bab.js.map +1 -0
  490. package/dist/ui-library/{p-ed279165.entry.js → p-060069d4.entry.js} +2 -2
  491. package/dist/ui-library/p-060069d4.entry.js.map +1 -0
  492. package/dist/ui-library/p-06ba653e.entry.js +2 -0
  493. package/dist/ui-library/p-06ba653e.entry.js.map +1 -0
  494. package/dist/ui-library/p-07c8de65.entry.js +2 -0
  495. package/dist/ui-library/p-07c8de65.entry.js.map +1 -0
  496. package/dist/ui-library/p-14e5fccc.entry.js +2 -0
  497. package/dist/ui-library/p-14e5fccc.entry.js.map +1 -0
  498. package/dist/ui-library/p-189602e4.entry.js +2 -0
  499. package/dist/ui-library/p-189602e4.entry.js.map +1 -0
  500. package/dist/ui-library/p-19560508.entry.js +2 -0
  501. package/dist/ui-library/p-19560508.entry.js.map +1 -0
  502. package/dist/ui-library/{p-9c79341d.entry.js → p-2386627e.entry.js} +2 -2
  503. package/dist/ui-library/p-2386627e.entry.js.map +1 -0
  504. package/dist/ui-library/p-2c25cb61.entry.js +2 -0
  505. package/dist/ui-library/p-2c25cb61.entry.js.map +1 -0
  506. package/dist/ui-library/p-32e421a3.entry.js +2 -0
  507. package/dist/ui-library/p-32e421a3.entry.js.map +1 -0
  508. package/dist/ui-library/p-3603dd96.entry.js +2 -0
  509. package/dist/ui-library/p-3603dd96.entry.js.map +1 -0
  510. package/dist/ui-library/p-39ff5f61.entry.js +2 -0
  511. package/dist/ui-library/p-39ff5f61.entry.js.map +1 -0
  512. package/dist/ui-library/{p-caea1eb6.entry.js → p-3b5a76ea.entry.js} +2 -2
  513. package/dist/ui-library/p-3b5a76ea.entry.js.map +1 -0
  514. package/dist/ui-library/p-419ed003.entry.js +2 -0
  515. package/dist/ui-library/p-419ed003.entry.js.map +1 -0
  516. package/dist/ui-library/p-45003bae.entry.js +2 -0
  517. package/dist/ui-library/p-45003bae.entry.js.map +1 -0
  518. package/dist/ui-library/{p-ac57ba5c.entry.js → p-4963f03c.entry.js} +2 -2
  519. package/dist/ui-library/p-4963f03c.entry.js.map +1 -0
  520. package/dist/ui-library/{p-da7f3dbd.entry.js → p-4d89932f.entry.js} +2 -2
  521. package/dist/ui-library/p-4d89932f.entry.js.map +1 -0
  522. package/dist/ui-library/{p-61e66671.js → p-605bdd81.js} +2 -2
  523. package/dist/ui-library/p-63acceb6.entry.js +2 -0
  524. package/dist/ui-library/p-63acceb6.entry.js.map +1 -0
  525. package/dist/ui-library/p-651293e7.js +2 -0
  526. package/dist/ui-library/p-651293e7.js.map +1 -0
  527. package/dist/ui-library/p-6888b9ee.entry.js +2 -0
  528. package/dist/ui-library/p-6888b9ee.entry.js.map +1 -0
  529. package/dist/ui-library/{p-961bd001.entry.js → p-6f9153be.entry.js} +2 -2
  530. package/dist/ui-library/p-6f9153be.entry.js.map +1 -0
  531. package/dist/ui-library/p-7561b336.entry.js +2 -0
  532. package/dist/ui-library/p-7561b336.entry.js.map +1 -0
  533. package/dist/ui-library/p-785810fa.entry.js +2 -0
  534. package/dist/ui-library/p-785810fa.entry.js.map +1 -0
  535. package/dist/ui-library/p-7c18b8ca.entry.js +2 -0
  536. package/dist/ui-library/p-7c18b8ca.entry.js.map +1 -0
  537. package/dist/ui-library/p-82bd8781.entry.js +2 -0
  538. package/dist/ui-library/p-82bd8781.entry.js.map +1 -0
  539. package/dist/ui-library/p-89db9a8b.entry.js +2 -0
  540. package/dist/ui-library/p-89db9a8b.entry.js.map +1 -0
  541. package/dist/ui-library/{p-884c5cf9.entry.js → p-8f1d3461.entry.js} +2 -2
  542. package/dist/ui-library/p-8f1d3461.entry.js.map +1 -0
  543. package/dist/ui-library/p-8fb96142.entry.js +2 -0
  544. package/dist/ui-library/p-8fb96142.entry.js.map +1 -0
  545. package/dist/ui-library/p-96d441e9.entry.js +2 -0
  546. package/dist/ui-library/p-96d441e9.entry.js.map +1 -0
  547. package/dist/ui-library/{p-d95e292e.entry.js → p-9bc1639b.entry.js} +2 -2
  548. package/dist/ui-library/p-9bc1639b.entry.js.map +1 -0
  549. package/dist/ui-library/p-9cb83369.entry.js +2 -0
  550. package/dist/ui-library/p-9cb83369.entry.js.map +1 -0
  551. package/dist/ui-library/p-a398e3eb.entry.js +2 -0
  552. package/dist/ui-library/p-a398e3eb.entry.js.map +1 -0
  553. package/dist/ui-library/p-a7e2f511.entry.js +2 -0
  554. package/dist/ui-library/p-a7e2f511.entry.js.map +1 -0
  555. package/dist/ui-library/{p-04cc397c.entry.js → p-a8863197.entry.js} +2 -2
  556. package/dist/ui-library/p-a8863197.entry.js.map +1 -0
  557. package/dist/ui-library/p-a9e009af.entry.js +2 -0
  558. package/dist/ui-library/p-a9e009af.entry.js.map +1 -0
  559. package/dist/ui-library/p-ab921403.entry.js +2 -0
  560. package/dist/ui-library/p-ab921403.entry.js.map +1 -0
  561. package/dist/ui-library/{p-870b988d.entry.js → p-ac00076d.entry.js} +2 -2
  562. package/dist/ui-library/p-ac00076d.entry.js.map +1 -0
  563. package/dist/ui-library/p-b4bc4915.entry.js +2 -0
  564. package/dist/ui-library/p-b4bc4915.entry.js.map +1 -0
  565. package/dist/ui-library/p-b5acf54d.entry.js +2 -0
  566. package/dist/ui-library/p-b5acf54d.entry.js.map +1 -0
  567. package/dist/ui-library/p-b60c20aa.entry.js +2 -0
  568. package/dist/ui-library/p-b60c20aa.entry.js.map +1 -0
  569. package/dist/ui-library/p-c1d68730.entry.js +2 -0
  570. package/dist/ui-library/p-c1d68730.entry.js.map +1 -0
  571. package/dist/ui-library/p-c35a7cef.entry.js +2 -0
  572. package/dist/ui-library/p-c35a7cef.entry.js.map +1 -0
  573. package/dist/ui-library/p-c62893e5.entry.js +2 -0
  574. package/dist/ui-library/p-c62893e5.entry.js.map +1 -0
  575. package/dist/ui-library/p-c6464bfe.entry.js +2 -0
  576. package/dist/ui-library/p-c6464bfe.entry.js.map +1 -0
  577. package/dist/ui-library/{p-0440335d.entry.js → p-cf109cbf.entry.js} +2 -2
  578. package/dist/ui-library/p-cf109cbf.entry.js.map +1 -0
  579. package/dist/ui-library/p-d07b549f.entry.js +2 -0
  580. package/dist/ui-library/p-d07b549f.entry.js.map +1 -0
  581. package/dist/ui-library/{p-50dae789.entry.js → p-d42f1ea9.entry.js} +2 -2
  582. package/dist/ui-library/p-d42f1ea9.entry.js.map +1 -0
  583. package/dist/ui-library/p-e1255160.js +2 -0
  584. package/dist/ui-library/p-e1255160.js.map +1 -0
  585. package/dist/ui-library/p-fe37dadf.entry.js +2 -0
  586. package/dist/ui-library/p-fe37dadf.entry.js.map +1 -0
  587. package/dist/ui-library/p-fe89a7c4.entry.js +2 -0
  588. package/dist/ui-library/p-fe89a7c4.entry.js.map +1 -0
  589. package/dist/ui-library/ui-library.esm.js +1 -1
  590. package/dist/ui-library/ui-library.esm.js.map +1 -1
  591. package/package.json +6 -6
  592. package/dist/cjs/index-d7748d51.js.map +0 -1
  593. package/dist/cjs/modal-3ce015be.js.map +0 -1
  594. package/dist/collection/components/six-header/assets/six-logo.svg +0 -1
  595. package/dist/collection/components/six-header/test/six-header.spec.js +0 -177
  596. package/dist/collection/components/six-header/test/six-header.spec.js.map +0 -1
  597. package/dist/collection/utils/support.js +0 -16
  598. package/dist/collection/utils/support.js.map +0 -1
  599. package/dist/esm/index-79d4ef67.js.map +0 -1
  600. package/dist/esm/modal-96526245.js.map +0 -1
  601. package/dist/types/utils/support.d.ts +0 -1
  602. package/dist/ui-library/assets/six-logo.svg +0 -1
  603. package/dist/ui-library/p-0440335d.entry.js.map +0 -1
  604. package/dist/ui-library/p-04cc397c.entry.js.map +0 -1
  605. package/dist/ui-library/p-0edd3091.entry.js +0 -2
  606. package/dist/ui-library/p-0edd3091.entry.js.map +0 -1
  607. package/dist/ui-library/p-150b7664.entry.js +0 -2
  608. package/dist/ui-library/p-150b7664.entry.js.map +0 -1
  609. package/dist/ui-library/p-1f5840b5.entry.js +0 -2
  610. package/dist/ui-library/p-1f5840b5.entry.js.map +0 -1
  611. package/dist/ui-library/p-28cc013e.entry.js +0 -2
  612. package/dist/ui-library/p-28cc013e.entry.js.map +0 -1
  613. package/dist/ui-library/p-3424bbc0.entry.js +0 -2
  614. package/dist/ui-library/p-3424bbc0.entry.js.map +0 -1
  615. package/dist/ui-library/p-348c68a8.entry.js +0 -2
  616. package/dist/ui-library/p-348c68a8.entry.js.map +0 -1
  617. package/dist/ui-library/p-3723ca06.entry.js +0 -2
  618. package/dist/ui-library/p-3723ca06.entry.js.map +0 -1
  619. package/dist/ui-library/p-37aeac5e.entry.js +0 -2
  620. package/dist/ui-library/p-37aeac5e.entry.js.map +0 -1
  621. package/dist/ui-library/p-3d7fb086.entry.js +0 -2
  622. package/dist/ui-library/p-3d7fb086.entry.js.map +0 -1
  623. package/dist/ui-library/p-457f7373.entry.js +0 -2
  624. package/dist/ui-library/p-457f7373.entry.js.map +0 -1
  625. package/dist/ui-library/p-4a667f31.entry.js +0 -2
  626. package/dist/ui-library/p-4a667f31.entry.js.map +0 -1
  627. package/dist/ui-library/p-50dae789.entry.js.map +0 -1
  628. package/dist/ui-library/p-546e33d9.entry.js +0 -2
  629. package/dist/ui-library/p-546e33d9.entry.js.map +0 -1
  630. package/dist/ui-library/p-5db3a705.entry.js +0 -2
  631. package/dist/ui-library/p-5db3a705.entry.js.map +0 -1
  632. package/dist/ui-library/p-6296779b.entry.js +0 -2
  633. package/dist/ui-library/p-6296779b.entry.js.map +0 -1
  634. package/dist/ui-library/p-64b4755d.entry.js +0 -2
  635. package/dist/ui-library/p-64b4755d.entry.js.map +0 -1
  636. package/dist/ui-library/p-664b7913.entry.js +0 -2
  637. package/dist/ui-library/p-664b7913.entry.js.map +0 -1
  638. package/dist/ui-library/p-6c1b046e.entry.js +0 -2
  639. package/dist/ui-library/p-6c1b046e.entry.js.map +0 -1
  640. package/dist/ui-library/p-7115316e.entry.js +0 -2
  641. package/dist/ui-library/p-7115316e.entry.js.map +0 -1
  642. package/dist/ui-library/p-870b988d.entry.js.map +0 -1
  643. package/dist/ui-library/p-884c5cf9.entry.js.map +0 -1
  644. package/dist/ui-library/p-8888a367.entry.js.map +0 -1
  645. package/dist/ui-library/p-935c78a7.entry.js +0 -2
  646. package/dist/ui-library/p-935c78a7.entry.js.map +0 -1
  647. package/dist/ui-library/p-961bd001.entry.js.map +0 -1
  648. package/dist/ui-library/p-998de05d.js +0 -2
  649. package/dist/ui-library/p-998de05d.js.map +0 -1
  650. package/dist/ui-library/p-9b08068d.entry.js +0 -2
  651. package/dist/ui-library/p-9b08068d.entry.js.map +0 -1
  652. package/dist/ui-library/p-9c79341d.entry.js.map +0 -1
  653. package/dist/ui-library/p-a9c159f2.entry.js +0 -2
  654. package/dist/ui-library/p-a9c159f2.entry.js.map +0 -1
  655. package/dist/ui-library/p-ac57ba5c.entry.js.map +0 -1
  656. package/dist/ui-library/p-ae45f6f4.entry.js +0 -2
  657. package/dist/ui-library/p-ae45f6f4.entry.js.map +0 -1
  658. package/dist/ui-library/p-af15381b.js +0 -3
  659. package/dist/ui-library/p-af15381b.js.map +0 -1
  660. package/dist/ui-library/p-b1a5f3cd.entry.js +0 -2
  661. package/dist/ui-library/p-b1a5f3cd.entry.js.map +0 -1
  662. package/dist/ui-library/p-b385a241.entry.js +0 -2
  663. package/dist/ui-library/p-b385a241.entry.js.map +0 -1
  664. package/dist/ui-library/p-c2c7370b.entry.js +0 -2
  665. package/dist/ui-library/p-c2c7370b.entry.js.map +0 -1
  666. package/dist/ui-library/p-caea1eb6.entry.js.map +0 -1
  667. package/dist/ui-library/p-d3f5b9a8.entry.js +0 -2
  668. package/dist/ui-library/p-d3f5b9a8.entry.js.map +0 -1
  669. package/dist/ui-library/p-d42b18eb.entry.js +0 -2
  670. package/dist/ui-library/p-d42b18eb.entry.js.map +0 -1
  671. package/dist/ui-library/p-d769cc36.entry.js +0 -2
  672. package/dist/ui-library/p-d769cc36.entry.js.map +0 -1
  673. package/dist/ui-library/p-d95e292e.entry.js.map +0 -1
  674. package/dist/ui-library/p-da7f3dbd.entry.js.map +0 -1
  675. package/dist/ui-library/p-dfb89b6a.entry.js +0 -2
  676. package/dist/ui-library/p-dfb89b6a.entry.js.map +0 -1
  677. package/dist/ui-library/p-e6032375.entry.js +0 -2
  678. package/dist/ui-library/p-e6032375.entry.js.map +0 -1
  679. package/dist/ui-library/p-e60d2324.entry.js +0 -2
  680. package/dist/ui-library/p-e60d2324.entry.js.map +0 -1
  681. package/dist/ui-library/p-e8298c6e.entry.js +0 -2
  682. package/dist/ui-library/p-e8298c6e.entry.js.map +0 -1
  683. package/dist/ui-library/p-ed279165.entry.js.map +0 -1
  684. package/dist/ui-library/p-ed61b75c.entry.js +0 -2
  685. package/dist/ui-library/p-ed61b75c.entry.js.map +0 -1
  686. package/dist/ui-library/p-ee872c04.entry.js +0 -2
  687. package/dist/ui-library/p-ee872c04.entry.js.map +0 -1
  688. package/dist/ui-library/p-f1ab3384.entry.js +0 -2
  689. package/dist/ui-library/p-f1ab3384.entry.js.map +0 -1
  690. package/dist/ui-library/p-f4ef481c.entry.js +0 -2
  691. package/dist/ui-library/p-f4ef481c.entry.js.map +0 -1
  692. package/dist/ui-library/p-f8cbb8da.entry.js +0 -2
  693. package/dist/ui-library/p-f8cbb8da.entry.js.map +0 -1
  694. /package/dist/ui-library/{p-61e66671.js.map → p-605bdd81.js.map} +0 -0
@@ -1,6 +1,7 @@
1
- import { r as registerInstance, h } from './index-79d4ef67.js';
1
+ import { r as registerInstance, h } from './index-5390c1d6.js';
2
2
 
3
3
  const sixSidebarItemCss = ":host{display:block}a{text-decoration:none;display:block}.sidebar-item{padding:8px 8px 16px 16px;font-size:0.9rem;color:var(--six-sidebar-color);cursor:pointer;font-family:var(--six-font-family)}.sidebar-item:hover:not(.sidebar-item--disabled){color:var(--six-color-web-rock-600)}.sidebar-item.sidebar-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.sidebar-item.sidebar-item--selected{font-weight:var(--six-font-weight-bold)}";
4
+ const SixSidebarItemStyle0 = sixSidebarItemCss;
4
5
 
5
6
  const SixSidebarItem = class {
6
7
  constructor(hostRef) {
@@ -12,14 +13,14 @@ const SixSidebarItem = class {
12
13
  }
13
14
  render() {
14
15
  const Tag = this.href != null ? 'a' : 'div';
15
- return (h(Tag, { class: {
16
+ return (h(Tag, { key: '669dd93655dc6e510003396e85ce239613abcf09', class: {
16
17
  'sidebar-item': true,
17
18
  'sidebar-item--selected': this.selected,
18
19
  'sidebar-item--disabled': this.disabled,
19
- }, role: "menuitem", href: this.href, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", null)));
20
+ }, role: "menuitem", href: this.href, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", { key: '1726facf8ac8607c2cf383034a9bd5475e7cb0e5' })));
20
21
  }
21
22
  };
22
- SixSidebarItem.style = sixSidebarItemCss;
23
+ SixSidebarItem.style = SixSidebarItemStyle0;
23
24
 
24
25
  export { SixSidebarItem as six_sidebar_item };
25
26
 
@@ -1 +1 @@
1
- {"file":"six-sidebar-item.entry.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,kdAAkd;;MCc/d,cAAc;;;qBAEQ,EAAE;wBAGC,KAAK;wBAGL,KAAK;;;IAQzC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC;QAC5C,QACE,EAAC,GAAG,IACF,KAAK,EAAE;gBACL,cAAc,EAAE,IAAI;gBACpB,wBAAwB,EAAE,IAAI,CAAC,QAAQ;gBACvC,wBAAwB,EAAE,IAAI,CAAC,QAAQ;aACxC,EACD,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,mBACA,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,mBAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,IAE/C,eAAa,CACT,EACN;KACH;;;;;;","names":[],"sources":["src/components/six-sidebar-item/six-sidebar-item.scss?tag=six-sidebar-item&encapsulation=shadow","src/components/six-sidebar-item/six-sidebar-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\na {\n text-decoration: none;\n display: block;\n}\n\n.sidebar-item {\n padding: 8px 8px 16px 16px;\n font-size: 0.9rem;\n color: var(--six-sidebar-color);\n cursor: pointer;\n font-family: var(--six-font-family);\n\n &:hover:not(.sidebar-item--disabled) {\n color: var(--six-color-web-rock-600);\n }\n\n &.sidebar-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n &.sidebar-item--selected {\n font-weight: var(--six-font-weight-bold);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested displayed text of the item.\n */\n\n@Component({\n tag: 'six-sidebar-item',\n styleUrl: 'six-sidebar-item.scss',\n shadow: true,\n})\nexport class SixSidebarItem {\n /** A unique value to store in the sidebar item. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the item in a selected state. */\n @Prop({ reflect: true }) selected = false;\n\n /** Set to true to draw the sidebar item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Provide if the item should be rendered as anchor tag.\n * Note, that the href is added automatically when using routerLink in Angular.\n */\n @Prop({ reflect: true }) href: string | undefined;\n\n render() {\n const Tag = this.href != null ? 'a' : 'div';\n return (\n <Tag\n class={{\n 'sidebar-item': true,\n 'sidebar-item--selected': this.selected,\n 'sidebar-item--disabled': this.disabled,\n }}\n role=\"menuitem\"\n href={this.href}\n aria-selected={this.selected ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <slot></slot>\n </Tag>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-sidebar-item.entry.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,kdAAkd,CAAC;AAC7e,6BAAe,iBAAiB;;MCanB,cAAc;;;qBAEQ,EAAE;wBAGC,KAAK;wBAGL,KAAK;;;IAQzC,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC;QAC5C,QACE,EAAC,GAAG,qDACF,KAAK,EAAE;gBACL,cAAc,EAAE,IAAI;gBACpB,wBAAwB,EAAE,IAAI,CAAC,QAAQ;gBACvC,wBAAwB,EAAE,IAAI,CAAC,QAAQ;aACxC,EACD,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,mBACA,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,mBAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,IAE/C,8DAAa,CACT,EACN;KACH;;;;;;","names":[],"sources":["src/components/six-sidebar-item/six-sidebar-item.scss?tag=six-sidebar-item&encapsulation=shadow","src/components/six-sidebar-item/six-sidebar-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\na {\n text-decoration: none;\n display: block;\n}\n\n.sidebar-item {\n padding: 8px 8px 16px 16px;\n font-size: 0.9rem;\n color: var(--six-sidebar-color);\n cursor: pointer;\n font-family: var(--six-font-family);\n\n &:hover:not(.sidebar-item--disabled) {\n color: var(--six-color-web-rock-600);\n }\n\n &.sidebar-item--disabled {\n outline: none;\n color: var(--six-input-color-disabled);\n cursor: not-allowed;\n }\n\n &.sidebar-item--selected {\n font-weight: var(--six-font-weight-bold);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested displayed text of the item.\n */\n\n@Component({\n tag: 'six-sidebar-item',\n styleUrl: 'six-sidebar-item.scss',\n shadow: true,\n})\nexport class SixSidebarItem {\n /** A unique value to store in the sidebar item. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Set to true to draw the item in a selected state. */\n @Prop({ reflect: true }) selected = false;\n\n /** Set to true to draw the sidebar item in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Provide if the item should be rendered as anchor tag.\n * Note, that the href is added automatically when using routerLink in Angular.\n */\n @Prop({ reflect: true }) href: string | undefined;\n\n render() {\n const Tag = this.href != null ? 'a' : 'div';\n return (\n <Tag\n class={{\n 'sidebar-item': true,\n 'sidebar-item--selected': this.selected,\n 'sidebar-item--disabled': this.disabled,\n }}\n role=\"menuitem\"\n href={this.href}\n aria-selected={this.selected ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <slot></slot>\n </Tag>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,8 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-79d4ef67.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-5390c1d6.js';
2
2
  import { s as scrollIntoView } from './scroll-3e16851e.js';
3
3
 
4
4
  const sixSidebarCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;height:100%}.sidebar__container{height:100%;overflow:auto}.sidebar__container.sidebar--open{border-right:1px solid var(--six-color-web-rock-300)}.sidebar__container:not(.sidebar--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.sidebar--left{color:var(--six-sidebar-color);background-color:var(--six-sidebar-background-color);transition:var(--six-transition-medium) margin-left;background-size:300vw 70%;background-position:bottom;background-repeat:no-repeat}.sidebar--right{transition:var(--six-transition-medium) margin-right}.sidebar--open.sidebar--left{margin-right:2px}.sidebar--open.sidebar--right{margin-left:2px}";
5
+ const SixSidebarStyle0 = sixSidebarCss;
5
6
 
6
7
  const isSidebarItemGroup = (node) => { var _a; return ((_a = node === null || node === void 0 ? void 0 : node.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'six-sidebar-item-group'; };
7
8
  const SixSidebar = class {
@@ -175,7 +176,7 @@ const SixSidebar = class {
175
176
  this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();
176
177
  }
177
178
  render() {
178
- return (h("host", { class: "six-sidebar" }, h("div", { class: {
179
+ return (h("host", { key: '9d2b3038cf6af596590bbe0392c5197d49ae9ba1', class: "six-sidebar" }, h("div", { key: '81390d2ad8a8fc2d9e344a62197983d11b27d389', class: {
179
180
  sidebar__container: true,
180
181
  'sidebar--visible': this.isVisible,
181
182
  'sidebar--open': this.open,
@@ -184,13 +185,13 @@ const SixSidebar = class {
184
185
  }, style: {
185
186
  width: this.width,
186
187
  [`margin-${this.position}`]: this.open ? '0' : `calc(1rem - ${this.width})`,
187
- }, ref: (el) => (this.sidebar = el), "aria-hidden": this.open ? 'false' : 'true', onTransitionEnd: this.handleTransitionEnd }, h("slot", null))));
188
+ }, ref: (el) => (this.sidebar = el), "aria-hidden": this.open ? 'false' : 'true', onTransitionEnd: this.handleTransitionEnd }, h("slot", { key: 'e48036d762b116330fa687a71bb50ca87a8bed74' }))));
188
189
  }
189
190
  static get watchers() { return {
190
191
  "open": ["handleOpenChange"]
191
192
  }; }
192
193
  };
193
- SixSidebar.style = sixSidebarCss;
194
+ SixSidebar.style = SixSidebarStyle0;
194
195
 
195
196
  export { SixSidebar as six_sidebar };
196
197
 
@@ -1 +1 @@
1
- {"file":"six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,GAAG,OAAO,GAAG,MAAM,EACzC,eAAe,EAAE,IAAI,CAAC,mBAAmB,IAEzC,eAAQ,CACJ,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/six-sidebar/six-sidebar.scss?tag=six-sidebar&encapsulation=shadow","src/components/six-sidebar/six-sidebar.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: block;\n height: 100%;\n}\n\n.sidebar {\n &__container {\n // scroll\n height: 100%;\n overflow: auto;\n\n &.sidebar--open {\n border-right: 1px solid var(--six-color-web-rock-300);\n }\n\n &:not(.sidebar--visible) {\n @include hidden;\n }\n }\n\n &--left {\n color: var(--six-sidebar-color);\n background-color: var(--six-sidebar-background-color);\n // collapse\n transition: var(--six-transition-medium) margin-left;\n // six background\n background-size: 300vw 70%;\n background-position: bottom;\n background-repeat: no-repeat;\n }\n\n &--right {\n // collapse\n transition: var(--six-transition-medium) margin-right;\n }\n\n // if the sidebar is embedded within six-root it cuts-off the border styling, for thus we need to guarante a margin\n &--open {\n &.sidebar--left {\n margin-right: 2px;\n }\n\n &.sidebar--right {\n margin-left: 2px;\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { scrollIntoView } from '../../utils/scroll';\n\nconst isSidebarItemGroup = (node?: Element | null): boolean =>\n node?.tagName?.toLowerCase() === 'six-sidebar-item-group';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested side bar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar',\n styleUrl: 'six-sidebar.scss',\n shadow: true,\n})\nexport class SixSidebar {\n private willShow = false;\n private willHide = false;\n\n private sidebar?: HTMLElement;\n\n @State() isVisible = false;\n\n /** Sidebar position */\n @Prop() position: 'left' | 'right' = 'left';\n\n /** Indicates whether the sidebar is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Sidebar width */\n @Prop() width = '16rem';\n\n /** Define whether sidebar is toggled meaning only one menu can be open at the same time*/\n @Prop() toggled = false;\n\n /** Emitted when the sidebar opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-sidebar-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the sidebar opens and all transitions are complete. */\n @Event({ eventName: 'six-sidebar-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the sidebar closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-sidebar-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the sidebar closes and all transitions are complete. */\n @Event({ eventName: 'six-sidebar-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the sidebar 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 sidebar, such as an input or button.\n */\n @Event({ eventName: 'six-sidebar-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\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.type === 'transitionend' && target.classList.contains('sidebar__container')) {\n this.resetTransitionVariables();\n }\n };\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n void 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 componentDidRender() {\n this.setupTogglableMenuItems();\n }\n\n disconnectedCallback() {\n this.sidebar?.removeEventListener('six-details-show', this.closeSiblingDetailsOnShow);\n }\n\n private closeSiblingDetailsOnShow = (event: Event) => {\n const clickedMenuItem = event.target as HTMLElement;\n if (this.sidebar != null) {\n scrollIntoView(clickedMenuItem, this.sidebar);\n }\n\n const closeAllSiblingsBySiblingProperty = (\n getSibling: (node: Element | null | undefined) => Element | null | undefined\n ) => {\n let node: Element | null | undefined = clickedMenuItem;\n while (getSibling(node) != null) {\n node = getSibling(node);\n if (isSidebarItemGroup(node)) {\n const detailsElement = node?.shadowRoot?.querySelector('six-details');\n if (detailsElement != null) {\n detailsElement.open = false;\n }\n }\n }\n };\n\n // close all previous siblings\n closeAllSiblingsBySiblingProperty((node) => node?.previousElementSibling);\n // close all further siblings\n closeAllSiblingsBySiblingProperty((node) => node?.nextElementSibling);\n };\n\n private setupTogglableMenuItems() {\n if (!this.toggled || this.sidebar == null) return;\n this.markAllMenuItemsAsSelectableEmpty();\n this.sidebar.addEventListener('six-details-show', this.closeSiblingDetailsOnShow);\n }\n\n private markAllMenuItemsAsSelectableEmpty() {\n // when you have a toggled menu you also want to close other menu items when you click on an item without children\n // nice benefit this item will then also be highlighted\n const slot = this.sidebar?.querySelector('slot');\n const nodes = slot?.assignedElements() || [];\n\n // since we don't just want to make the top level empty menuItems selectable in toggled mode,\n // but also nested items we need to traverse the whole menu item tree\n const menuItems = [];\n while (nodes.length > 0) {\n const node = nodes.pop();\n if (node?.shadowRoot == null) {\n continue;\n }\n\n // collect six-details in the current shadowDOM\n const menuItemsForCurrentNode = node.shadowRoot.querySelectorAll('six-details');\n menuItems.push(...menuItemsForCurrentNode);\n\n // collect all six-sidebar-item-group children of the current node to afterwards check their shadowDOM too\n const newItemGroups = Array.from(node.children).filter(isSidebarItemGroup);\n nodes.push(...newItemGroups);\n }\n\n menuItems.forEach((details) => (details.selectableEmpty = true));\n }\n\n /** Toggles whether the sidebar should be shown or hidden */\n @Method()\n async toggle() {\n if (this.willShow || this.willHide) {\n return;\n }\n\n if (this.open) {\n await this.hide();\n } else {\n await this.show();\n }\n }\n\n /** Shows the sidebar */\n @Method()\n async show() {\n if (this.willShow) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the sidebar */\n @Method()\n async hide() {\n if (this.willHide) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n }\n\n /** Allows to select a menu item programmatically by index */\n @Method()\n async selectItemByIndex(index: number) {\n if (this.sidebar == null) return;\n\n const slot = this.sidebar.querySelector('slot');\n const menuItemsOnRootLevel: HTMLSixDetailsElement[] = (slot?.assignedElements() || []).flatMap((el) => {\n const detailsElement = el.shadowRoot?.querySelector('six-details');\n if (detailsElement == null) {\n return [];\n }\n return [detailsElement];\n });\n if (index < 0 || index > menuItemsOnRootLevel.length - 1) {\n console.error(\n `Tried to access sidebar menu item by index, but provided index out of range. Provided index: ${index}`\n );\n return;\n }\n await menuItemsOnRootLevel[index].show();\n }\n\n /** Allows to select a menu item programmatically by name */\n @Method()\n async selectItemByName(value: string) {\n const slot = this.sidebar?.querySelector('slot');\n const sidebarItemGroups = slot?.assignedElements() as HTMLSixSidebarItemGroupElement[];\n if (sidebarItemGroups == null) {\n return;\n }\n\n const indexOfSelectedElement = sidebarItemGroups.findIndex((el) => el?.name === value);\n const selectedItem = sidebarItemGroups.at(indexOfSelectedElement)?.shadowRoot?.querySelector('six-details');\n await selectedItem?.show();\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 <host class=\"six-sidebar\">\n <div\n class={{\n sidebar__container: true,\n 'sidebar--visible': this.isVisible,\n 'sidebar--open': this.open,\n 'sidebar--left': this.position === 'left',\n 'sidebar--right': this.position === 'right',\n }}\n style={{\n width: this.width,\n [`margin-${this.position}`]: this.open ? '0' : `calc(1rem - ${this.width})`,\n }}\n ref={(el) => (this.sidebar = el)}\n aria-hidden={this.open ? 'false' : 'true'}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <slot />\n </div>\n </host>\n );\n }\n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AAC,OAAO,GAAG,EAAE,CAAC,iBACnB,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,EACzC,eAAe,EAAE,IAAI,CAAC,mBAAmB,IAEzC,8DAAQ,CACJ,CACD,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/six-sidebar/six-sidebar.scss?tag=six-sidebar&encapsulation=shadow","src/components/six-sidebar/six-sidebar.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: block;\n height: 100%;\n}\n\n.sidebar {\n &__container {\n // scroll\n height: 100%;\n overflow: auto;\n\n &.sidebar--open {\n border-right: 1px solid var(--six-color-web-rock-300);\n }\n\n &:not(.sidebar--visible) {\n @include hidden;\n }\n }\n\n &--left {\n color: var(--six-sidebar-color);\n background-color: var(--six-sidebar-background-color);\n // collapse\n transition: var(--six-transition-medium) margin-left;\n // six background\n background-size: 300vw 70%;\n background-position: bottom;\n background-repeat: no-repeat;\n }\n\n &--right {\n // collapse\n transition: var(--six-transition-medium) margin-right;\n }\n\n // if the sidebar is embedded within six-root it cuts-off the border styling, for thus we need to guarante a margin\n &--open {\n &.sidebar--left {\n margin-right: 2px;\n }\n\n &.sidebar--right {\n margin-left: 2px;\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { scrollIntoView } from '../../utils/scroll';\n\nconst isSidebarItemGroup = (node?: Element | null): boolean =>\n node?.tagName?.toLowerCase() === 'six-sidebar-item-group';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested side bar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar',\n styleUrl: 'six-sidebar.scss',\n shadow: true,\n})\nexport class SixSidebar {\n private willShow = false;\n private willHide = false;\n\n private sidebar?: HTMLElement;\n\n @State() isVisible = false;\n\n /** Sidebar position */\n @Prop() position: 'left' | 'right' = 'left';\n\n /** Indicates whether the sidebar is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Sidebar width */\n @Prop() width = '16rem';\n\n /** Define whether sidebar is toggled meaning only one menu can be open at the same time*/\n @Prop() toggled = false;\n\n /** Emitted when the sidebar opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-sidebar-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the sidebar opens and all transitions are complete. */\n @Event({ eventName: 'six-sidebar-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the sidebar closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-sidebar-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the sidebar closes and all transitions are complete. */\n @Event({ eventName: 'six-sidebar-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the sidebar 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 sidebar, such as an input or button.\n */\n @Event({ eventName: 'six-sidebar-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\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.type === 'transitionend' && target.classList.contains('sidebar__container')) {\n this.resetTransitionVariables();\n }\n };\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n void 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 componentDidRender() {\n this.setupTogglableMenuItems();\n }\n\n disconnectedCallback() {\n this.sidebar?.removeEventListener('six-details-show', this.closeSiblingDetailsOnShow);\n }\n\n private closeSiblingDetailsOnShow = (event: Event) => {\n const clickedMenuItem = event.target as HTMLElement;\n if (this.sidebar != null) {\n scrollIntoView(clickedMenuItem, this.sidebar);\n }\n\n const closeAllSiblingsBySiblingProperty = (\n getSibling: (node: Element | null | undefined) => Element | null | undefined\n ) => {\n let node: Element | null | undefined = clickedMenuItem;\n while (getSibling(node) != null) {\n node = getSibling(node);\n if (isSidebarItemGroup(node)) {\n const detailsElement = node?.shadowRoot?.querySelector('six-details');\n if (detailsElement != null) {\n detailsElement.open = false;\n }\n }\n }\n };\n\n // close all previous siblings\n closeAllSiblingsBySiblingProperty((node) => node?.previousElementSibling);\n // close all further siblings\n closeAllSiblingsBySiblingProperty((node) => node?.nextElementSibling);\n };\n\n private setupTogglableMenuItems() {\n if (!this.toggled || this.sidebar == null) return;\n this.markAllMenuItemsAsSelectableEmpty();\n this.sidebar.addEventListener('six-details-show', this.closeSiblingDetailsOnShow);\n }\n\n private markAllMenuItemsAsSelectableEmpty() {\n // when you have a toggled menu you also want to close other menu items when you click on an item without children\n // nice benefit this item will then also be highlighted\n const slot = this.sidebar?.querySelector('slot');\n const nodes = slot?.assignedElements() || [];\n\n // since we don't just want to make the top level empty menuItems selectable in toggled mode,\n // but also nested items we need to traverse the whole menu item tree\n const menuItems = [];\n while (nodes.length > 0) {\n const node = nodes.pop();\n if (node?.shadowRoot == null) {\n continue;\n }\n\n // collect six-details in the current shadowDOM\n const menuItemsForCurrentNode = node.shadowRoot.querySelectorAll('six-details');\n menuItems.push(...menuItemsForCurrentNode);\n\n // collect all six-sidebar-item-group children of the current node to afterwards check their shadowDOM too\n const newItemGroups = Array.from(node.children).filter(isSidebarItemGroup);\n nodes.push(...newItemGroups);\n }\n\n menuItems.forEach((details) => (details.selectableEmpty = true));\n }\n\n /** Toggles whether the sidebar should be shown or hidden */\n @Method()\n async toggle() {\n if (this.willShow || this.willHide) {\n return;\n }\n\n if (this.open) {\n await this.hide();\n } else {\n await this.show();\n }\n }\n\n /** Shows the sidebar */\n @Method()\n async show() {\n if (this.willShow) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the sidebar */\n @Method()\n async hide() {\n if (this.willHide) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n }\n\n /** Allows to select a menu item programmatically by index */\n @Method()\n async selectItemByIndex(index: number) {\n if (this.sidebar == null) return;\n\n const slot = this.sidebar.querySelector('slot');\n const menuItemsOnRootLevel: HTMLSixDetailsElement[] = (slot?.assignedElements() || []).flatMap((el) => {\n const detailsElement = el.shadowRoot?.querySelector('six-details');\n if (detailsElement == null) {\n return [];\n }\n return [detailsElement];\n });\n if (index < 0 || index > menuItemsOnRootLevel.length - 1) {\n console.error(\n `Tried to access sidebar menu item by index, but provided index out of range. Provided index: ${index}`\n );\n return;\n }\n await menuItemsOnRootLevel[index].show();\n }\n\n /** Allows to select a menu item programmatically by name */\n @Method()\n async selectItemByName(value: string) {\n const slot = this.sidebar?.querySelector('slot');\n const sidebarItemGroups = slot?.assignedElements() as HTMLSixSidebarItemGroupElement[];\n if (sidebarItemGroups == null) {\n return;\n }\n\n const indexOfSelectedElement = sidebarItemGroups.findIndex((el) => el?.name === value);\n const selectedItem = sidebarItemGroups.at(indexOfSelectedElement)?.shadowRoot?.querySelector('six-details');\n await selectedItem?.show();\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 <host class=\"six-sidebar\">\n <div\n class={{\n sidebar__container: true,\n 'sidebar--visible': this.isVisible,\n 'sidebar--open': this.open,\n 'sidebar--left': this.position === 'left',\n 'sidebar--right': this.position === 'right',\n }}\n style={{\n width: this.width,\n [`margin-${this.position}`]: this.open ? '0' : `calc(1rem - ${this.width})`,\n }}\n ref={(el) => (this.sidebar = el)}\n aria-hidden={this.open ? 'false' : 'true'}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <slot />\n </div>\n </host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
- import { r as registerInstance, h } from './index-79d4ef67.js';
1
+ import { r as registerInstance, h } from './index-5390c1d6.js';
2
2
 
3
3
  const sixSpinnerCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--track-color:var(--six-progress-track-color);--indicator-color:var(--six-progress-indicator-color);--stroke-width:2px;display:inline-flex}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.six-spinner{width:auto;height:auto;position:relative}.six-spinner .six-spinner__container{margin:0;transform:translateX(0)}.six-spinner .six-spinner__container svg{transform:translateX(0)}.six-spinner__container{position:relative;margin:0 auto;top:calc(50% - 20px);z-index:1}.six-spinner__container,.six-spinner__container svg{width:40px;height:40px;display:block;transform:translateX(40px)}.six-spinner path{stroke-dashoffset:70px;stroke-dasharray:70, 444;-webkit-animation:six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;animation:six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite}@-webkit-keyframes six-spinner{to{stroke-dashoffset:-444}}@keyframes six-spinner{to{stroke-dashoffset:-444}}";
4
+ const SixSpinnerStyle0 = sixSpinnerCss;
4
5
 
5
6
  const SixSpinner = class {
6
7
  constructor(hostRef) {
@@ -17,7 +18,7 @@ const SixSpinner = class {
17
18
  return this.six ? this.renderSIXLogo() : this.renderSimple();
18
19
  }
19
20
  };
20
- SixSpinner.style = sixSpinnerCss;
21
+ SixSpinner.style = SixSpinnerStyle0;
21
22
 
22
23
  export { SixSpinner as six_spinner };
23
24
 
@@ -1 +1 @@
1
- {"file":"six-spinner.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,8vCAA8vC;;MCgBvwC,UAAU;;;mBAEP,KAAK;;IAEX,aAAa;QACnB,QACE,YAAM,KAAK,EAAC,aAAa,eAAW,MAAM,eAAW,QAAQ,IAC3D,WAAK,KAAK,EAAC,wBAAwB,IACjC,WAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,KAAK,IACjC,YACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,kBACH,GAAG,oBACD,OAAO,EACtB,CAAC,EAAC,mHAAmH,GAC/G,CACJ,CACF,CACD,EACP;KACH;IAEO,YAAY;QAClB,OAAO,YAAM,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,SAAS,eAAW,MAAM,eAAW,QAAQ,GAAG,CAAC;KACjF;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;KAC9D;;;;;;","names":[],"sources":["src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n$color-six-spinner-background: rgba(255, 255, 255, 0.7);\n\n.six-spinner {\n width: auto;\n height: auto;\n position: relative;\n\n .six-spinner__container {\n margin: 0;\n transform: translateX(0);\n }\n\n .six-spinner__container svg {\n transform: translateX(0);\n }\n\n &__container {\n position: relative;\n margin: 0 auto;\n top: calc(50% - 20px);\n z-index: 1;\n }\n\n &__container,\n &__container svg {\n width: 40px;\n height: 40px;\n display: block;\n transform: translateX(40px);\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n * @part svg - The spinner icon\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX logo or simple spinner. */\n @Prop() six = false;\n\n private renderSIXLogo() {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n </div>\n </span>\n );\n }\n\n private renderSimple() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n return this.six ? this.renderSIXLogo() : this.renderSimple();\n }\n}\n"],"version":3}
1
+ {"file":"six-spinner.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,8vCAA8vC,CAAC;AACrxC,yBAAe,aAAa;;MCef,UAAU;;;mBAEP,KAAK;;IAEX,aAAa;QACnB,QACE,YAAM,KAAK,EAAC,aAAa,eAAW,MAAM,eAAW,QAAQ,IAC3D,WAAK,KAAK,EAAC,wBAAwB,IACjC,WAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,KAAK,IACjC,YACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,kBACH,GAAG,oBACD,OAAO,EACtB,CAAC,EAAC,mHAAmH,GAC/G,CACJ,CACF,CACD,EACP;KACH;IAEO,YAAY;QAClB,OAAO,YAAM,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,SAAS,eAAW,MAAM,eAAW,QAAQ,GAAG,CAAC;KACjF;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;KAC9D;;;;;;","names":[],"sources":["src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n$color-six-spinner-background: rgba(255, 255, 255, 0.7);\n\n.six-spinner {\n width: auto;\n height: auto;\n position: relative;\n\n .six-spinner__container {\n margin: 0;\n transform: translateX(0);\n }\n\n .six-spinner__container svg {\n transform: translateX(0);\n }\n\n &__container {\n position: relative;\n margin: 0 auto;\n top: calc(50% - 20px);\n z-index: 1;\n }\n\n &__container,\n &__container svg {\n width: 40px;\n height: 40px;\n display: block;\n transform: translateX(40px);\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n * @part svg - The spinner icon\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX logo or simple spinner. */\n @Prop() six = false;\n\n private renderSIXLogo() {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n </div>\n </span>\n );\n }\n\n private renderSimple() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n return this.six ? this.renderSIXLogo() : this.renderSimple();\n }\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
- import { r as registerInstance, h } from './index-79d4ef67.js';
1
+ import { r as registerInstance, h } from './index-5390c1d6.js';
2
2
 
3
3
  const sixStageIndicatorCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:grid}.center-content{display:grid;align-self:center;justify-self:center;grid-gap:5px;grid-auto-flow:column}.align-item{margin:auto}.indicator,.indicator--acceptance,.indicator--etu,.indicator--dev,.indicator--itu{font-family:var(--six-font-family);font-size:14px;font-weight:var(--six-font-weight-bold);display:grid;align-content:center;width:100%;height:24px}.indicator--itu{background-color:var(--six-color-success-600);color:var(--six-color-web-rock-900)}.indicator--dev{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.indicator--etu{background-color:var(--six-color-action-600);color:var(--six-color-white)}.indicator--acceptance{background-color:var(--six-color-warning-800);color:var(--six-color-web-rock-900)}";
4
+ const SixStageIndicatorStyle0 = sixStageIndicatorCss;
4
5
 
5
6
  const SixStageIndicator = class {
6
7
  constructor(hostRef) {
@@ -11,7 +12,7 @@ const SixStageIndicator = class {
11
12
  return this.stage == null || this.stage == 'PROD' ? null : (h("div", { class: `indicator--${this.stage.toLowerCase()}` }, h("div", { class: "center-content" }, h("six-icon", { class: "align-item", size: "small" }, "error_outline"), h("span", { class: 'align-item' }, h("slot", null)))));
12
13
  }
13
14
  };
14
- SixStageIndicator.style = sixStageIndicatorCss;
15
+ SixStageIndicator.style = SixStageIndicatorStyle0;
15
16
 
16
17
  export { SixStageIndicator as six_stage_indicator };
17
18
 
@@ -1 +1 @@
1
- {"file":"six-stage-indicator.entry.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,k2BAAk2B;;MCSl3B,iBAAiB;;;qBAED,IAAI;;IAE/B,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM,GAAG,IAAI,IACtD,WAAK,KAAK,EAAE,cAAc,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAClD,WAAK,KAAK,EAAC,gBAAgB,IACzB,gBAAU,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,oBAE9B,EACX,YAAM,KAAK,EAAE,YAAY,IACvB,eAAQ,CACH,CACH,CACF,CACP,CAAC;KACH;;;;;;","names":[],"sources":["src/components/six-stage-indicator/six-stage-indicator.scss?tag=six-stage-indicator&encapsulation=shadow","src/components/six-stage-indicator/six-stage-indicator.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: grid;\n}\n\n.center-content {\n display: grid;\n align-self: center;\n justify-self: center;\n grid-gap: 5px;\n grid-auto-flow: column;\n}\n\n.align-item {\n margin: auto;\n}\n\n.indicator {\n font-family: var(--six-font-family);\n font-size: 14px;\n font-weight: var(--six-font-weight-bold);\n display: grid;\n align-content: center;\n width: 100%;\n height: 24px;\n\n &--itu {\n @extend .indicator;\n background-color: var(--six-color-success-600);\n color: var(--six-color-web-rock-900);\n }\n\n &--dev {\n @extend .indicator;\n background-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n }\n\n &--etu {\n @extend .indicator;\n background-color: var(--six-color-action-600);\n color: var(--six-color-white);\n }\n\n &--acceptance {\n @extend .indicator;\n background-color: var(--six-color-warning-800);\n color: var(--six-color-web-rock-900);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\nexport type StageType = 'DEV' | 'ITU' | 'ETU' | 'ACCEPTANCE' | 'PROD' | null;\n\n@Component({\n tag: 'six-stage-indicator',\n styleUrl: 'six-stage-indicator.scss',\n shadow: true,\n})\nexport class SixStageIndicator {\n /** The indicators value attribute */\n @Prop() stage: StageType = null;\n\n render() {\n return this.stage == null || this.stage == 'PROD' ? null : (\n <div class={`indicator--${this.stage.toLowerCase()}`}>\n <div class=\"center-content\">\n <six-icon class=\"align-item\" size=\"small\">\n error_outline\n </six-icon>\n <span class={'align-item'}>\n <slot />\n </span>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-stage-indicator.entry.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,k2BAAk2B,CAAC;AACh4B,gCAAe,oBAAoB;;MCQtB,iBAAiB;;;qBAED,IAAI;;IAE/B,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM,GAAG,IAAI,IACtD,WAAK,KAAK,EAAE,cAAc,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,IAClD,WAAK,KAAK,EAAC,gBAAgB,IACzB,gBAAU,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,oBAE9B,EACX,YAAM,KAAK,EAAE,YAAY,IACvB,eAAQ,CACH,CACH,CACF,CACP,CAAC;KACH;;;;;;","names":[],"sources":["src/components/six-stage-indicator/six-stage-indicator.scss?tag=six-stage-indicator&encapsulation=shadow","src/components/six-stage-indicator/six-stage-indicator.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: grid;\n}\n\n.center-content {\n display: grid;\n align-self: center;\n justify-self: center;\n grid-gap: 5px;\n grid-auto-flow: column;\n}\n\n.align-item {\n margin: auto;\n}\n\n.indicator {\n font-family: var(--six-font-family);\n font-size: 14px;\n font-weight: var(--six-font-weight-bold);\n display: grid;\n align-content: center;\n width: 100%;\n height: 24px;\n\n &--itu {\n @extend .indicator;\n background-color: var(--six-color-success-600);\n color: var(--six-color-web-rock-900);\n }\n\n &--dev {\n @extend .indicator;\n background-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n }\n\n &--etu {\n @extend .indicator;\n background-color: var(--six-color-action-600);\n color: var(--six-color-white);\n }\n\n &--acceptance {\n @extend .indicator;\n background-color: var(--six-color-warning-800);\n color: var(--six-color-web-rock-900);\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\nexport type StageType = 'DEV' | 'ITU' | 'ETU' | 'ACCEPTANCE' | 'PROD' | null;\n\n@Component({\n tag: 'six-stage-indicator',\n styleUrl: 'six-stage-indicator.scss',\n shadow: true,\n})\nexport class SixStageIndicator {\n /** The indicators value attribute */\n @Prop() stage: StageType = null;\n\n render() {\n return this.stage == null || this.stage == 'PROD' ? null : (\n <div class={`indicator--${this.stage.toLowerCase()}`}>\n <div class=\"center-content\">\n <six-icon class=\"align-item\" size=\"small\">\n error_outline\n </six-icon>\n <span class={'align-item'}>\n <slot />\n </span>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,9 +1,10 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5390c1d6.js';
2
2
  import { E as EventListeners } from './event-listeners-706d4309.js';
3
- import { F as FormControl } from './form-control-d403a9cf.js';
3
+ import { F as FormControl } from './form-control-30c5bd8b.js';
4
4
  import { h as hasSlot } from './slot-56531341.js';
5
5
 
6
6
  const sixSwitchCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:\"*\";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{--height:var(--six-selection-control-toggle-size);--thumb-size:calc(var(--six-selection-control-toggle-size) - 4px);--width:calc(var(--height) * 2);display:inline-block}.switch{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-input-font-size-medium);font-weight:var(--six-input-font-weight);color:var(--six-input-color);vertical-align:middle;cursor:pointer}.switch__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--width);height:var(--height);background-color:var(--six-selection-control-color-disabled);border-radius:var(--height);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color}.switch__control .switch__thumb{width:var(--thumb-size);height:var(--thumb-size);background-color:var(--six-input-background-color);border-radius:50%;transform:translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));transition:var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color, var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow}.switch__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover{background-color:var(--six-input-border-color-hover)}.switch--checked .switch__control{background-color:var(--six-selection-control-color)}.switch--checked .switch__control .switch__thumb{background-color:var(--six-color-white);transform:translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2))}.switch.switch--checked:not(.switch--disabled) .switch__control:hover{background-color:var(--six-input-border-color-focus)}.switch--disabled{cursor:not-allowed;color:var(--six-selection-control-color-disabled)}.switch--disabled .switch__control{background-color:var(--six-selection-control-color-disabled)}.switch--disabled.switch--checked .switch__control{background-color:var(--six-selection-control-color-disabled)}.switch__label{line-height:var(--height);margin-left:0.5em;user-select:none}";
7
+ const SixSwitchStyle0 = sixSwitchCss;
7
8
 
8
9
  let id = 0;
9
10
  const SixSwitch = class {
@@ -98,12 +99,12 @@ const SixSwitch = class {
98
99
  (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.blur();
99
100
  }
100
101
  render() {
101
- return (h(FormControl, { inputId: this.switchId, label: this.label, labelId: this.labelId, hasLabelSlot: false, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { part: "base", htmlFor: this.switchId, class: {
102
+ return (h(FormControl, { key: '9d6b19d30b6fbe9edaca09765fb987496085af3d', inputId: this.switchId, label: this.label, labelId: this.labelId, hasLabelSlot: false, errorTextId: this.errorTextId, errorText: this.errorText, errorTextCount: this.errorTextCount, hasErrorTextSlot: this.hasErrorTextSlot, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { key: '3e17b60e405ebdbb9a2329677b7ba58bf5b39506', part: "base", htmlFor: this.switchId, class: {
102
103
  switch: true,
103
104
  'switch--checked': this.checked,
104
105
  'switch--disabled': this.disabled,
105
106
  'switch--focused': this.hasFocus,
106
- }, onMouseDown: this.handleMouseDown }, h("span", { part: "control", class: "switch__control" }, h("span", { part: "thumb", class: "switch__thumb" }), h("input", { ref: (el) => (this.inputElement = el), id: this.switchId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown })), h("span", { part: "label", id: this.labelId, class: "switch__label" }, h("slot", null)))));
107
+ }, onMouseDown: this.handleMouseDown }, h("span", { key: 'a8f0a78413ef612287e59d371ecc4a4de3f95d86', part: "control", class: "switch__control" }, h("span", { key: '02e2e4f0ebea74189adaae5c5820e72c317fb3c8', part: "thumb", class: "switch__thumb" }), h("input", { key: '50f37e2801b211be3a3f378f3f59c736f10900ea', ref: (el) => (this.inputElement = el), id: this.switchId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown })), h("span", { key: '9a4e42a33a099be2301b47553f1238f2e4acf027', part: "label", id: this.labelId, class: "switch__label" }, h("slot", { key: 'f393ef7b2eb5621a4a203d0502017a428412080d' })))));
107
108
  }
108
109
  get host() { return getElement(this); }
109
110
  static get watchers() { return {
@@ -112,7 +113,7 @@ const SixSwitch = class {
112
113
  "label": ["handleLabelChange"]
113
114
  }; }
114
115
  };
115
- SixSwitch.style = sixSwitchCss;
116
+ SixSwitch.style = SixSwitchStyle0;
116
117
 
117
118
  export { SixSwitch as six_switch };
118
119
 
@@ -1 +1 @@
1
- {"file":"six-switch.entry.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,6mJAA6mJ;;ACMloJ,IAAI,EAAE,GAAG,CAAC,CAAC;MAsBE,SAAS;;;;;;QACZ,aAAQ,GAAG,UAAU,EAAE,EAAE,EAAE,CAAC;QAC5B,YAAO,GAAG,gBAAgB,EAAE,EAAE,CAAC;QAC/B,gBAAW,GAAG,oBAAoB,EAAE,EAAE,CAAC;QAGvC,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QAyEtC,qBAAgB,GAAG;YACzB,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;SAC1D,CAAC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AU,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,SAAS,EAAE,IAAI,CAAC,aAAa,GAC7B,CACG,EAEP,YAAM,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAC,eAAe,IACxD,eAAQ,CACH,CACD,CACI,EACd;KACH;;;;;;;;;;;;","names":[],"sources":["src/components/six-switch/six-switch.scss?tag=six-switch&encapsulation=shadow","src/components/six-switch/six-switch.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n/**\n * @prop --width: The width of the switch.\n * @prop --height: The height of the switch.\n * @prop --thumb-size: The size of the thumb.\n */\n:host {\n --height: var(--six-selection-control-toggle-size);\n --thumb-size: calc(var(--six-selection-control-toggle-size) - 4px);\n --width: calc(var(--height) * 2);\n\n display: inline-block;\n}\n\n.switch {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.switch__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--six-selection-control-color-disabled);\n border-radius: var(--height);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color;\n\n .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--six-input-background-color);\n border-radius: 50%;\n transform: translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));\n transition: var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color,\n var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n}\n\n// Hover\n.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-hover);\n}\n\n// Checked\n.switch--checked .switch__control {\n background-color: var(--six-selection-control-color);\n\n .switch__thumb {\n background-color: var(--six-color-white);\n transform: translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2));\n }\n}\n\n// Checked + hover\n.switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.switch--disabled {\n cursor: not-allowed;\n color: var(--six-selection-control-color-disabled);\n\n .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n\n &.switch--checked .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n}\n\n.switch__label {\n line-height: var(--height);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\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 switch's label.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part control - The switch control.\n * @part thumb - The switch position indicator.\n * @part label - The switch label.\n */\n\n@Component({\n tag: 'six-switch',\n styleUrl: 'six-switch.scss',\n shadow: true,\n})\nexport class SixSwitch {\n private switchId = `switch-${++id}`;\n private labelId = `switch-label-${id}`;\n private errorTextId = `input-error-text-${id}`;\n\n private inputElement?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixSwitchElement;\n\n @State() hasFocus = false;\n @State() hasErrorTextSlot = false;\n\n /** The switch's name attribute. */\n @Prop() name = '';\n\n /** The switch's value attribute. */\n @Prop() value = 'on';\n\n /** Set to true to disable the switch. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** Set to true to draw the switch in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.inputElement != null) {\n this.inputElement.checked = this.checked;\n this.checked = this.inputElement.checked;\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-switch-blur' }) sixBlur!: EventEmitter<boolean>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-switch-change' }) sixChange!: EventEmitter<boolean>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-switch-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-switch-change', 'change', this.host);\n this.eventListeners.forward('six-switch-blur', 'blur', this.host);\n this.eventListeners.forward('six-switch-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n private handleSlotChange = () => {\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n /** Sets focus on the switch. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.focus(options);\n }\n\n /** Removes focus from the switch. */\n @Method()\n async removeFocus() {\n this.inputElement?.blur();\n }\n\n private handleClick = () => {\n if (this.inputElement != null) {\n this.checked = this.inputElement.checked;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit(this.checked);\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.checked = false;\n this.sixChange.emit(this.checked);\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.checked = true;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.inputElement?.focus();\n };\n\n render() {\n return (\n <FormControl\n inputId={this.switchId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={false}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n htmlFor={this.switchId}\n class={{\n switch: true,\n 'switch--checked': this.checked,\n 'switch--disabled': this.disabled,\n 'switch--focused': this.hasFocus,\n }}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\" />\n\n <input\n ref={(el) => (this.inputElement = el)}\n id={this.switchId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"switch\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"switch__label\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-switch.entry.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,6mJAA6mJ,CAAC;AACnoJ,wBAAe,YAAY;;ACK3B,IAAI,EAAE,GAAG,CAAC,CA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,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,QAAQ,kBACC,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,qBAC5B,IAAI,CAAC,OAAO,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,SAAS,EAAE,IAAI,CAAC,aAAa,GAC7B,CACG,EAEP,6DAAM,IAAI,EAAC,OAAO,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAC,eAAe,IACxD,8DAAQ,CACH,CACD,CACI,EACd;KACH;;;;;;;;;;;;","names":[],"sources":["src/components/six-switch/six-switch.scss?tag=six-switch&encapsulation=shadow","src/components/six-switch/six-switch.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n/**\n * @prop --width: The width of the switch.\n * @prop --height: The height of the switch.\n * @prop --thumb-size: The size of the thumb.\n */\n:host {\n --height: var(--six-selection-control-toggle-size);\n --thumb-size: calc(var(--six-selection-control-toggle-size) - 4px);\n --width: calc(var(--height) * 2);\n\n display: inline-block;\n}\n\n.switch {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-input-font-size-medium);\n font-weight: var(--six-input-font-weight);\n color: var(--six-input-color);\n vertical-align: middle;\n cursor: pointer;\n}\n\n.switch__control {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--six-selection-control-color-disabled);\n border-radius: var(--height);\n transition: var(--six-transition-fast) border-color, var(--six-transition-fast) background-color;\n\n .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--six-input-background-color);\n border-radius: 50%;\n transform: translateX(calc(var(--width) / -2 + var(--thumb-size) / 2 - (var(--thumb-size) - var(--height)) / 2));\n transition: var(--six-transition-fast) transform ease, var(--six-transition-fast) background-color,\n var(--six-transition-fast) border-color, var(--six-transition-fast) box-shadow;\n }\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n}\n\n// Hover\n.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-hover);\n}\n\n// Checked\n.switch--checked .switch__control {\n background-color: var(--six-selection-control-color);\n\n .switch__thumb {\n background-color: var(--six-color-white);\n transform: translateX(calc(var(--width) / 2 - var(--thumb-size) / 2 + (var(--thumb-size) - var(--height)) / 2));\n }\n}\n\n// Checked + hover\n.switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--six-input-border-color-focus);\n}\n\n// Disabled\n.switch--disabled {\n cursor: not-allowed;\n color: var(--six-selection-control-color-disabled);\n\n .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n\n &.switch--checked .switch__control {\n background-color: var(--six-selection-control-color-disabled);\n }\n}\n\n.switch__label {\n line-height: var(--height);\n margin-left: 0.5em;\n user-select: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\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 switch's label.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part control - The switch control.\n * @part thumb - The switch position indicator.\n * @part label - The switch label.\n */\n\n@Component({\n tag: 'six-switch',\n styleUrl: 'six-switch.scss',\n shadow: true,\n})\nexport class SixSwitch {\n private switchId = `switch-${++id}`;\n private labelId = `switch-label-${id}`;\n private errorTextId = `input-error-text-${id}`;\n\n private inputElement?: HTMLInputElement;\n private eventListeners = new EventListeners();\n\n @Element() host!: HTMLSixSwitchElement;\n\n @State() hasFocus = false;\n @State() hasErrorTextSlot = false;\n\n /** The switch's name attribute. */\n @Prop() name = '';\n\n /** The switch's value attribute. */\n @Prop() value = 'on';\n\n /** Set to true to disable the switch. */\n @Prop() disabled = false;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** Set to true to draw the switch in a checked state. */\n @Prop({ mutable: true, reflect: true }) checked = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n @Watch('checked')\n handleCheckedChange() {\n if (this.inputElement != null) {\n this.inputElement.checked = this.checked;\n this.checked = this.inputElement.checked;\n }\n }\n\n /** Emitted when the control loses focus. */\n @Event({ eventName: 'six-switch-blur' }) sixBlur!: EventEmitter<boolean>;\n\n /** Emitted when the control's checked state changes. */\n @Event({ eventName: 'six-switch-change' }) sixChange!: EventEmitter<boolean>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-switch-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-switch-change', 'change', this.host);\n this.eventListeners.forward('six-switch-blur', 'blur', this.host);\n this.eventListeners.forward('six-switch-focus', 'focus', this.host);\n }\n\n disconnectedCallback() {\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n private handleSlotChange = () => {\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n /** Sets focus on the switch. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.focus(options);\n }\n\n /** Removes focus from the switch. */\n @Method()\n async removeFocus() {\n this.inputElement?.blur();\n }\n\n private handleClick = () => {\n if (this.inputElement != null) {\n this.checked = this.inputElement.checked;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit(this.checked);\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n this.checked = false;\n this.sixChange.emit(this.checked);\n }\n\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n this.checked = true;\n this.sixChange.emit(this.checked);\n }\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent clicks on the label from briefly blurring the input\n event.preventDefault();\n this.inputElement?.focus();\n };\n\n render() {\n return (\n <FormControl\n inputId={this.switchId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={false}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size=\"medium\"\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <label\n part=\"base\"\n htmlFor={this.switchId}\n class={{\n switch: true,\n 'switch--checked': this.checked,\n 'switch--disabled': this.disabled,\n 'switch--focused': this.hasFocus,\n }}\n onMouseDown={this.handleMouseDown}\n >\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\" />\n\n <input\n ref={(el) => (this.inputElement = el)}\n id={this.switchId}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n role=\"switch\"\n aria-checked={this.checked ? 'true' : 'false'}\n aria-labelledby={this.labelId}\n onClick={this.handleClick}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onKeyDown={this.handleKeyDown}\n />\n </span>\n\n <span part=\"label\" id={this.labelId} class=\"switch__label\">\n <slot />\n </span>\n </label>\n </FormControl>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5390c1d6.js';
2
2
  import { s as scrollIntoView } from './scroll-3e16851e.js';
3
3
 
4
4
  /**
@@ -36,6 +36,7 @@ function flipAnimate(element, fromElement, options = {
36
36
  }
37
37
 
38
38
  const sixTabGroupCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.tab-group{display:flex;border:solid 1px transparent;border-radius:0}.tab-group .tab-group__tabs{display:flex;position:relative}.tab-group--has-scroll-controls .tab-group__nav-container{position:relative;padding:0 var(--six-spacing-x-large)}.tab-group__scroll-button{display:flex;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;width:var(--six-spacing-x-large)}.tab-group__scroll-button--left{left:0}.tab-group__scroll-button--right{right:0}.tab-group--top{flex-direction:column}.tab-group--top .tab-group__nav-container{order:1}.tab-group--top .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--top .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--top .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--top .tab-group__body{order:2}.tab-group--bottom{flex-direction:column}.tab-group--bottom .tab-group__nav-container{order:2}.tab-group--bottom .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--bottom .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--bottom .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--bottom .tab-group__body{order:1}.tab-group--left{flex-direction:row}.tab-group--left .tab-group__nav-container{order:1}.tab-group--left .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--left .tab-group__body{flex:1 1 auto;order:2}.tab-group--right{flex-direction:row}.tab-group--right .tab-group__nav-container{order:2}.tab-group--right .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--right .tab-group__body{flex:1 1 auto;order:1}";
39
+ const SixTabGroupStyle0 = sixTabGroupCss;
39
40
 
40
41
  const SixTabGroup = class {
41
42
  constructor(hostRef) {
@@ -107,7 +108,8 @@ const SixTabGroup = class {
107
108
  behavior: 'smooth',
108
109
  });
109
110
  };
110
- this.hasScrollControls = false;
111
+ this.hasLeftControl = false;
112
+ this.hasRightControl = false;
111
113
  this.placement = 'top';
112
114
  this.noScrollControls = false;
113
115
  }
@@ -129,6 +131,13 @@ const SixTabGroup = class {
129
131
  this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());
130
132
  this.resizeObserver.observe(this.nav);
131
133
  requestAnimationFrame(() => this.updateScrollControls());
134
+ this.nav.addEventListener('scroll', () => {
135
+ if (this.nav == null) {
136
+ return;
137
+ }
138
+ this.hasRightControl = this.calculateRightControlVisibility();
139
+ this.hasLeftControl = this.calculateLeftControlVisibility();
140
+ });
132
141
  // Update aria labels if the DOM changes
133
142
  this.mutationObserver = new MutationObserver((mutations) => {
134
143
  if (mutations.some((mutation) => {
@@ -176,12 +185,29 @@ const SixTabGroup = class {
176
185
  getActiveTab() {
177
186
  return this.getAllTabs().find((el) => el.active);
178
187
  }
188
+ calculateRightControlVisibility() {
189
+ var _a, _b, _c;
190
+ if (this.nav == null) {
191
+ return false;
192
+ }
193
+ return Math.abs((_a = this.nav) === null || _a === void 0 ? void 0 : _a.scrollLeft) + ((_b = this.nav) === null || _b === void 0 ? void 0 : _b.clientWidth) < ((_c = this.nav) === null || _c === void 0 ? void 0 : _c.scrollWidth) - 1;
194
+ }
195
+ calculateLeftControlVisibility() {
196
+ var _a;
197
+ if (this.nav == null) {
198
+ return false;
199
+ }
200
+ return Math.abs((_a = this.nav) === null || _a === void 0 ? void 0 : _a.scrollLeft) > 0;
201
+ }
179
202
  updateScrollControls() {
180
203
  if (this.nav == null)
181
204
  return;
182
- this.hasScrollControls = this.noScrollControls
205
+ this.hasRightControl = this.noScrollControls
206
+ ? false
207
+ : ['top', 'bottom'].includes(this.placement) && this.calculateRightControlVisibility();
208
+ this.hasLeftControl = this.noScrollControls
183
209
  ? false
184
- : ['top', 'bottom'].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;
210
+ : ['top', 'bottom'].includes(this.placement) && this.calculateLeftControlVisibility();
185
211
  }
186
212
  setActiveTab(tab, emitEvents = true) {
187
213
  var _a, _b, _c;
@@ -224,22 +250,22 @@ const SixTabGroup = class {
224
250
  });
225
251
  }
226
252
  render() {
227
- return (h("div", { part: "base", ref: (el) => (this.tabGroup = el), class: {
253
+ return (h("div", { key: '36be38a8a29e4c551a670e6ab4e3efed68dda0b8', part: "base", ref: (el) => (this.tabGroup = el), class: {
228
254
  'tab-group': true,
229
255
  // Placements
230
256
  'tab-group--top': this.placement === 'top',
231
257
  'tab-group--bottom': this.placement === 'bottom',
232
258
  'tab-group--left': this.placement === 'left',
233
259
  'tab-group--right': this.placement === 'right',
234
- 'tab-group--has-scroll-controls': this.hasScrollControls,
235
- }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { class: "tab-group__nav-container" }, this.hasScrollControls && (h("six-icon-button", { class: "tab-group__scroll-button tab-group__scroll-button--left", exportparts: "base:scroll-button", name: "chevron_left", onClick: this.handleScrollLeft })), h("div", { ref: (el) => (this.nav = el), key: "nav", part: "nav", class: "tab-group__nav" }, h("div", { ref: (el) => (this.tabs = el), part: "tabs", class: "tab-group__tabs", role: "tablist" }, h("slot", { name: "nav" }))), this.hasScrollControls && (h("six-icon-button", { class: "tab-group__scroll-button tab-group__scroll-button--right", exportparts: "base:scroll-button", name: "chevron_right", onClick: this.handleScrollRight }))), h("div", { ref: (el) => (this.body = el), part: "body", class: "tab-group__body" }, h("slot", null))));
260
+ 'tab-group--has-scroll-controls': this.hasRightControl || this.hasLeftControl,
261
+ }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: '04b3f5dea207ac614d91bafa647bcef07bd89dfc', class: "tab-group__nav-container" }, this.hasLeftControl && (h("six-icon-button", { class: "tab-group__scroll-button tab-group__scroll-button--left", exportparts: "base:scroll-button", name: "chevron_left", onClick: this.handleScrollLeft })), h("div", { ref: (el) => (this.nav = el), key: "nav", part: "nav", class: "tab-group__nav" }, h("div", { key: '5f8fdd3dbb4589b9616e048fb5cc59ffe41fb534', ref: (el) => (this.tabs = el), part: "tabs", class: "tab-group__tabs", role: "tablist" }, h("slot", { key: 'a1d71effb433bdf3cca519eb2639af35ae481114', name: "nav" }))), this.hasRightControl && (h("six-icon-button", { class: "tab-group__scroll-button tab-group__scroll-button--right", exportparts: "base:scroll-button", name: "chevron_right", onClick: this.handleScrollRight }))), h("div", { key: 'e8a619a1263d91f502ae3301e96bd439979b1c70', ref: (el) => (this.body = el), part: "body", class: "tab-group__body" }, h("slot", { key: 'df7a1ab8629777eb970258b76633c2282ed1169b' }))));
236
262
  }
237
263
  get host() { return getElement(this); }
238
264
  static get watchers() { return {
239
265
  "noScrollControls": ["handleNoScrollControlsChange"]
240
266
  }; }
241
267
  };
242
- SixTabGroup.style = sixTabGroupCss;
268
+ SixTabGroup.style = SixTabGroupStyle0;
243
269
 
244
270
  export { SixTabGroup as six_tab_group };
245
271
 
@@ -1 +1 @@
1
- {"file":"six-tab-group.entry.js","mappings":";;;AAAA;;;;;;;;;;;SAWgB,WAAW,CACzB,OAAgB,EAChB,WAAoB,EACpB,UAAoC;IAClC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;CACb;IAED,MAAM,YAAY,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,qBAAqB,EA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src/utils/animation.ts","src/components/six-tab-group/six-tab-group.scss?tag=six-tab-group&encapsulation=shadow","src/components/six-tab-group/six-tab-group.tsx"],"sourcesContent":["/**\n * Animates a given `element` from the position and dimension of `fromElement` to\n * its current position and dimension. Can be useful to implement the FLIP animation technique.\n *\n * @see {@link https://css-tricks.com/animating-layouts-with-the-flip-technique/} for details on the FLIP technique.\n *\n * @param {Element} element - The element to animate.\n * @param {Element} fromElement - The element representing the initial position and dimensions.\n * @param {KeyframeAnimationOptions} [options={ duration: 150, easing: 'ease', fill: 'both' }] - Optional animation parameters.\n *\n */\nexport function flipAnimate(\n element: Element,\n fromElement: Element,\n options: KeyframeAnimationOptions = {\n duration: 150,\n easing: 'ease',\n fill: 'both',\n }\n) {\n const dimensionsTo = fromElement.getBoundingClientRect();\n const dimensionsFrom = element.getBoundingClientRect();\n\n const deltaX = dimensionsTo.left - dimensionsFrom.left;\n const deltaY = dimensionsTo.top - dimensionsFrom.top;\n const deltaW = dimensionsTo.width / dimensionsFrom.width;\n const deltaH = dimensionsTo.height / dimensionsFrom.height;\n\n element.animate(\n [\n {\n transformOrigin: 'top left',\n transform: `translate(${deltaX}px, ${deltaY}px) scale(${deltaW}, ${deltaH})`,\n },\n {\n transformOrigin: 'top left',\n transform: 'none',\n },\n ],\n options\n );\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/hide-scrollbar';\n\n:host {\n display: block;\n}\n\n.tab-group {\n display: flex;\n border: solid 1px transparent;\n border-radius: 0;\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n }\n}\n\n.tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button--left {\n left: 0;\n}\n\n.tab-group__scroll-button--right {\n right: 0;\n}\n\n// TOP\n.tab-group--top {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 2;\n }\n}\n\n// Bottom\n.tab-group--bottom {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 1;\n }\n}\n\n// Left\n\n.tab-group--left {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n}\n\n// Right\n.tab-group--right {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { flipAnimate } from '../../utils/animation';\n\nexport interface SixTabShowPayload {\n name: string;\n}\n\nexport interface SixTabHidePayload {\n name: string;\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot nav - Used for grouping tabs in the tab group.\n * @slot - Used for grouping tab panels in the tab group.\n *\n * @part base - The component's base wrapper.\n * @part nav - The tab group navigation container.\n * @part tabs - The container that wraps the slotted tabs.\n * @part active-tab-indicator - An element that displays the currently selected tab. This is a child of the tab's container.\n * @part body - The tab group body where tab panels are slotted in.\n * @part scroll-button - The previous and next scroll buttons that appear when tabs are scrollable.\n */\n@Component({\n tag: 'six-tab-group',\n styleUrl: 'six-tab-group.scss',\n shadow: true,\n})\nexport class SixTabGroup {\n private activeTab?: HTMLSixTabElement;\n private body?: HTMLElement;\n private mutationObserver?: MutationObserver;\n private nav?: HTMLElement;\n private resizeObserver?: ResizeObserver;\n private tabGroup?: HTMLElement;\n private tabs?: HTMLElement;\n\n @Element() host!: HTMLSixTabGroupElement;\n\n @State() hasScrollControls = false;\n\n /** The placement of the tabs. */\n @Prop() placement: 'top' | 'bottom' | 'left' | 'right' = 'top';\n\n /** Disables the scroll arrows that appear when tabs overflow. */\n @Prop() noScrollControls = false;\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n /** Emitted when a tab is shown. */\n @Event({ eventName: 'six-tab-show' }) sixTabShow!: EventEmitter<SixTabShowPayload>;\n\n /** Emitted when a tab is hidden. */\n @Event({ eventName: 'six-tab-hide' }) sixTabHide!: EventEmitter<SixTabHidePayload>;\n\n componentDidLoad() {\n if (this.tabGroup == null || this.nav == null) return;\n\n // Set initial tab state when the tabs first become visible\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab() || this.getAllTabs()[0], false);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());\n this.resizeObserver.observe(this.nav);\n requestAnimationFrame(() => this.updateScrollControls());\n\n // Update aria labels if the DOM changes\n this.mutationObserver = new MutationObserver((mutations) => {\n if (\n mutations.some((mutation) => {\n return !['aria-labelledby', 'aria-controls'].includes(mutation.attributeName ?? '');\n })\n ) {\n setTimeout(() => this.setAriaLabels());\n }\n });\n this.mutationObserver.observe(this.host, { attributes: true, childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mutationObserver == null || this.tabGroup == null || this.nav == null || this.resizeObserver == null) {\n return;\n }\n this.mutationObserver.disconnect();\n this.resizeObserver.unobserve(this.nav);\n }\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n const tabs = this.getAllTabs();\n const tab = tabs.find((el) => el.panel === panel);\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n }\n\n private getAllTabs(includeDisabled = false): HTMLSixTabElement[] {\n const slot = this.tabs?.querySelector('slot');\n if (slot == null) return [];\n\n return [...slot.assignedElements()].filter((el: Element) => {\n return includeDisabled\n ? el.tagName.toLowerCase() === 'six-tab'\n : el.tagName.toLowerCase() === 'six-tab' && !(el as HTMLSixTabElement).disabled;\n }) as [HTMLSixTabElement];\n }\n\n private getAllPanels(): HTMLSixTabPanelElement[] {\n const slot = this.body?.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements()].filter((el: Element) => el.tagName.toLowerCase() === 'six-tab-panel') as [\n HTMLSixTabPanelElement\n ];\n }\n\n private getActiveTab() {\n return this.getAllTabs().find((el) => el.active);\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.nav == null) return;\n\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n // Move focus left or right\n if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const activeEl = document.activeElement as HTMLSixTabElement;\n\n if (activeEl && activeEl.tagName.toLowerCase() === 'six-tab') {\n const tabs = this.getAllTabs();\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') {\n index = 0;\n } else if (event.key === 'End') {\n index = tabs.length - 1;\n } else if (event.key === 'ArrowLeft') {\n index = Math.max(0, index - 1);\n } else if (event.key === 'ArrowRight') {\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus({ preventScroll: true });\n this.setActiveTab(tabs[index]);\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(tabs[index], this.nav, 'horizontal');\n }\n\n event.preventDefault();\n }\n }\n };\n\n private handleScrollLeft = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft - this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private handleScrollRight = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft + this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private updateScrollControls() {\n if (this.nav == null) return;\n\n this.hasScrollControls = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;\n }\n\n private setActiveTab(tab: HTMLSixTabElement, emitEvents = true) {\n if (this.nav == null) return;\n\n const newIndicator = tab?.shadowRoot?.querySelector('.tab__indicator');\n const oldIndicator = this.getActiveTab()?.shadowRoot?.querySelector('.tab__indicator');\n\n if (oldIndicator != null && newIndicator != null) {\n flipAnimate(newIndicator, oldIndicator);\n }\n\n if (tab !== this.activeTab && !tab.disabled) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n\n // Sync tabs and panels\n this.getAllTabs().map((el) => (el.active = el === this.activeTab));\n this.getAllPanels().map((el) => (el.active = el.name === this.activeTab?.panel));\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab != null) {\n this.sixTabHide.emit({ name: previousTab.panel });\n }\n\n this.sixTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllTabs();\n const panels = this.getAllPanels();\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel != null) {\n tab.setAttribute('aria-controls', panel.getAttribute('id') ?? '');\n panel.setAttribute('aria-labelledby', tab.getAttribute('id') ?? '');\n }\n });\n }\n\n render() {\n return (\n <div\n part=\"base\"\n ref={(el) => (this.tabGroup = el)}\n class={{\n 'tab-group': true,\n\n // Placements\n 'tab-group--top': this.placement === 'top',\n 'tab-group--bottom': this.placement === 'bottom',\n 'tab-group--left': this.placement === 'left',\n 'tab-group--right': this.placement === 'right',\n\n 'tab-group--has-scroll-controls': this.hasScrollControls,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"tab-group__nav-container\">\n {this.hasScrollControls && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--left\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_left\"\n onClick={this.handleScrollLeft}\n />\n )}\n <div ref={(el) => (this.nav = el)} key=\"nav\" part=\"nav\" class=\"tab-group__nav\">\n <div ref={(el) => (this.tabs = el)} part=\"tabs\" class=\"tab-group__tabs\" role=\"tablist\">\n <slot name=\"nav\" />\n </div>\n </div>\n {this.hasScrollControls && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--right\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_right\"\n onClick={this.handleScrollRight}\n />\n )}\n </div>\n\n <div ref={(el) => (this.body = el)} part=\"body\" class=\"tab-group__body\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"six-tab-group.entry.js","mappings":";;;AAAA;;;;;;;;;;;SAWgB,WAAW,CACzB,OAAgB,EAChB,WAAoB,EACpB,UAAoC;IAClC,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;CACb;IAED,MAAM,YAAY,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAEvD,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IACvD,MAAM,MAA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IAClC,IAAI,CAAC,cAAc,KAClB,uBACE,KAAK,EAAC,yDAAyD,EAC/D,WAAW,EAAC,oBAAoB,EAChC,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAC9B,CACH,EACD,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,gBAAgB,IAC5E,4DAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,SAAS,IACpF,6DAAM,IAAI,EAAC,KAAK,GAAG,CACf,CACF,EACL,IAAI,CAAC,eAAe,KACnB,uBACE,KAAK,EAAC,0DAA0D,EAChE,WAAW,EAAC,oBAAoB,EAChC,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC/B,CACH,CACG,EAEN,4DAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,IACrE,8DAAQ,CACJ,CACF,EACN;KACH;;;;;;;;;;","names":[],"sources":["src/utils/animation.ts","src/components/six-tab-group/six-tab-group.scss?tag=six-tab-group&encapsulation=shadow","src/components/six-tab-group/six-tab-group.tsx"],"sourcesContent":["/**\n * Animates a given `element` from the position and dimension of `fromElement` to\n * its current position and dimension. Can be useful to implement the FLIP animation technique.\n *\n * @see {@link https://css-tricks.com/animating-layouts-with-the-flip-technique/} for details on the FLIP technique.\n *\n * @param {Element} element - The element to animate.\n * @param {Element} fromElement - The element representing the initial position and dimensions.\n * @param {KeyframeAnimationOptions} [options={ duration: 150, easing: 'ease', fill: 'both' }] - Optional animation parameters.\n *\n */\nexport function flipAnimate(\n element: Element,\n fromElement: Element,\n options: KeyframeAnimationOptions = {\n duration: 150,\n easing: 'ease',\n fill: 'both',\n }\n) {\n const dimensionsTo = fromElement.getBoundingClientRect();\n const dimensionsFrom = element.getBoundingClientRect();\n\n const deltaX = dimensionsTo.left - dimensionsFrom.left;\n const deltaY = dimensionsTo.top - dimensionsFrom.top;\n const deltaW = dimensionsTo.width / dimensionsFrom.width;\n const deltaH = dimensionsTo.height / dimensionsFrom.height;\n\n element.animate(\n [\n {\n transformOrigin: 'top left',\n transform: `translate(${deltaX}px, ${deltaY}px) scale(${deltaW}, ${deltaH})`,\n },\n {\n transformOrigin: 'top left',\n transform: 'none',\n },\n ],\n options\n );\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/hide-scrollbar';\n\n:host {\n display: block;\n}\n\n.tab-group {\n display: flex;\n border: solid 1px transparent;\n border-radius: 0;\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n }\n}\n\n.tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--six-spacing-x-large);\n}\n\n.tab-group__scroll-button--left {\n left: 0;\n}\n\n.tab-group__scroll-button--right {\n right: 0;\n}\n\n// TOP\n.tab-group--top {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 2;\n }\n}\n\n// Bottom\n.tab-group--bottom {\n flex-direction: column;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__nav {\n display: flex;\n overflow-x: auto;\n @include hide-scrollbar();\n }\n\n .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n }\n\n .tab-group__body {\n order: 1;\n }\n}\n\n// Left\n\n.tab-group--left {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n}\n\n// Right\n.tab-group--right {\n flex-direction: row;\n\n .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n }\n\n .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { scrollIntoView } from '../../utils/scroll';\nimport { flipAnimate } from '../../utils/animation';\n\nexport interface SixTabShowPayload {\n name: string;\n}\n\nexport interface SixTabHidePayload {\n name: string;\n}\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot nav - Used for grouping tabs in the tab group.\n * @slot - Used for grouping tab panels in the tab group.\n *\n * @part base - The component's base wrapper.\n * @part nav - The tab group navigation container.\n * @part tabs - The container that wraps the slotted tabs.\n * @part active-tab-indicator - An element that displays the currently selected tab. This is a child of the tab's container.\n * @part body - The tab group body where tab panels are slotted in.\n * @part scroll-button - The previous and next scroll buttons that appear when tabs are scrollable.\n */\n@Component({\n tag: 'six-tab-group',\n styleUrl: 'six-tab-group.scss',\n shadow: true,\n})\nexport class SixTabGroup {\n private activeTab?: HTMLSixTabElement;\n private body?: HTMLElement;\n private mutationObserver?: MutationObserver;\n private nav?: HTMLElement;\n private resizeObserver?: ResizeObserver;\n private tabGroup?: HTMLElement;\n private tabs?: HTMLElement;\n\n @Element() host!: HTMLSixTabGroupElement;\n\n @State() hasLeftControl = false;\n @State() hasRightControl = false;\n\n /** The placement of the tabs. */\n @Prop() placement: 'top' | 'bottom' | 'left' | 'right' = 'top';\n\n /** Disables the scroll arrows that appear when tabs overflow. */\n @Prop() noScrollControls = false;\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n /** Emitted when a tab is shown. */\n @Event({ eventName: 'six-tab-show' }) sixTabShow!: EventEmitter<SixTabShowPayload>;\n\n /** Emitted when a tab is hidden. */\n @Event({ eventName: 'six-tab-hide' }) sixTabHide!: EventEmitter<SixTabHidePayload>;\n\n componentDidLoad() {\n if (this.tabGroup == null || this.nav == null) return;\n\n // Set initial tab state when the tabs first become visible\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab() || this.getAllTabs()[0], false);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n this.resizeObserver = new ResizeObserver(() => this.updateScrollControls());\n this.resizeObserver.observe(this.nav);\n requestAnimationFrame(() => this.updateScrollControls());\n\n this.nav.addEventListener('scroll', () => {\n if (this.nav == null) {\n return;\n }\n this.hasRightControl = this.calculateRightControlVisibility();\n\n this.hasLeftControl = this.calculateLeftControlVisibility();\n });\n\n // Update aria labels if the DOM changes\n this.mutationObserver = new MutationObserver((mutations) => {\n if (\n mutations.some((mutation) => {\n return !['aria-labelledby', 'aria-controls'].includes(mutation.attributeName ?? '');\n })\n ) {\n setTimeout(() => this.setAriaLabels());\n }\n });\n this.mutationObserver.observe(this.host, { attributes: true, childList: true, subtree: true });\n }\n\n disconnectedCallback() {\n if (this.mutationObserver == null || this.tabGroup == null || this.nav == null || this.resizeObserver == null) {\n return;\n }\n this.mutationObserver.disconnect();\n this.resizeObserver.unobserve(this.nav);\n }\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n const tabs = this.getAllTabs();\n const tab = tabs.find((el) => el.panel === panel);\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n }\n\n private getAllTabs(includeDisabled = false): HTMLSixTabElement[] {\n const slot = this.tabs?.querySelector('slot');\n if (slot == null) return [];\n\n return [...slot.assignedElements()].filter((el: Element) => {\n return includeDisabled\n ? el.tagName.toLowerCase() === 'six-tab'\n : el.tagName.toLowerCase() === 'six-tab' && !(el as HTMLSixTabElement).disabled;\n }) as [HTMLSixTabElement];\n }\n\n private getAllPanels(): HTMLSixTabPanelElement[] {\n const slot = this.body?.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements()].filter((el: Element) => el.tagName.toLowerCase() === 'six-tab-panel') as [\n HTMLSixTabPanelElement\n ];\n }\n\n private getActiveTab() {\n return this.getAllTabs().find((el) => el.active);\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n if (tab != null) {\n this.setActiveTab(tab);\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.nav == null) return;\n\n const target = event.target as HTMLElement;\n const tab = target.closest('six-tab');\n const tabGroup = tab?.closest('six-tab-group');\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this.host) {\n return false;\n }\n\n // Move focus left or right\n if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const activeEl = document.activeElement as HTMLSixTabElement;\n\n if (activeEl && activeEl.tagName.toLowerCase() === 'six-tab') {\n const tabs = this.getAllTabs();\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') {\n index = 0;\n } else if (event.key === 'End') {\n index = tabs.length - 1;\n } else if (event.key === 'ArrowLeft') {\n index = Math.max(0, index - 1);\n } else if (event.key === 'ArrowRight') {\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus({ preventScroll: true });\n this.setActiveTab(tabs[index]);\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(tabs[index], this.nav, 'horizontal');\n }\n\n event.preventDefault();\n }\n }\n };\n\n private handleScrollLeft = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft - this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private handleScrollRight = () => {\n if (this.nav == null) return;\n\n this.nav.scroll({\n left: this.nav.scrollLeft + this.nav.clientWidth,\n behavior: 'smooth',\n });\n };\n\n private calculateRightControlVisibility() {\n if (this.nav == null) {\n return false;\n }\n return Math.abs(this.nav?.scrollLeft) + this.nav?.clientWidth < this.nav?.scrollWidth - 1;\n }\n\n private calculateLeftControlVisibility() {\n if (this.nav == null) {\n return false;\n }\n return Math.abs(this.nav?.scrollLeft) > 0;\n }\n\n private updateScrollControls() {\n if (this.nav == null) return;\n\n this.hasRightControl = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.calculateRightControlVisibility();\n\n this.hasLeftControl = this.noScrollControls\n ? false\n : ['top', 'bottom'].includes(this.placement) && this.calculateLeftControlVisibility();\n }\n\n private setActiveTab(tab: HTMLSixTabElement, emitEvents = true) {\n if (this.nav == null) return;\n\n const newIndicator = tab?.shadowRoot?.querySelector('.tab__indicator');\n const oldIndicator = this.getActiveTab()?.shadowRoot?.querySelector('.tab__indicator');\n\n if (oldIndicator != null && newIndicator != null) {\n flipAnimate(newIndicator, oldIndicator);\n }\n\n if (tab !== this.activeTab && !tab.disabled) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n\n // Sync tabs and panels\n this.getAllTabs().map((el) => (el.active = el === this.activeTab));\n this.getAllPanels().map((el) => (el.active = el.name === this.activeTab?.panel));\n\n if (['top', 'bottom'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab != null) {\n this.sixTabHide.emit({ name: previousTab.panel });\n }\n\n this.sixTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllTabs();\n const panels = this.getAllPanels();\n\n // Link each tab with its corresponding panel\n tabs.map((tab) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel != null) {\n tab.setAttribute('aria-controls', panel.getAttribute('id') ?? '');\n panel.setAttribute('aria-labelledby', tab.getAttribute('id') ?? '');\n }\n });\n }\n\n render() {\n return (\n <div\n part=\"base\"\n ref={(el) => (this.tabGroup = el)}\n class={{\n 'tab-group': true,\n\n // Placements\n 'tab-group--top': this.placement === 'top',\n 'tab-group--bottom': this.placement === 'bottom',\n 'tab-group--left': this.placement === 'left',\n 'tab-group--right': this.placement === 'right',\n\n 'tab-group--has-scroll-controls': this.hasRightControl || this.hasLeftControl,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"tab-group__nav-container\">\n {this.hasLeftControl && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--left\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_left\"\n onClick={this.handleScrollLeft}\n />\n )}\n <div ref={(el) => (this.nav = el)} key=\"nav\" part=\"nav\" class=\"tab-group__nav\">\n <div ref={(el) => (this.tabs = el)} part=\"tabs\" class=\"tab-group__tabs\" role=\"tablist\">\n <slot name=\"nav\" />\n </div>\n </div>\n {this.hasRightControl && (\n <six-icon-button\n class=\"tab-group__scroll-button tab-group__scroll-button--right\"\n exportparts=\"base:scroll-button\"\n name=\"chevron_right\"\n onClick={this.handleScrollRight}\n />\n )}\n </div>\n\n <div ref={(el) => (this.body = el)} part=\"body\" class=\"tab-group__body\">\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-79d4ef67.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-5390c1d6.js';
2
2
 
3
3
  const sixTabPanelCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block;font-family:var(--six-font-family)}.tab-panel{border:solid 1px transparent;padding:20px 20px}";
4
+ const SixTabPanelStyle0 = sixTabPanelCss;
4
5
 
5
6
  let id = 0;
6
7
  const SixTabPanel = class {
@@ -13,11 +14,11 @@ const SixTabPanel = class {
13
14
  render() {
14
15
  return (
15
16
  // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels
16
- h(Host, { id: this.host.id || this.componentId, style: { display: this.active ? 'block' : 'none' } }, h("div", { part: "base", class: "tab-panel", role: "tabpanel", "aria-selected": this.active ? 'true' : 'false', "aria-hidden": this.active ? 'false' : 'true' }, h("slot", null))));
17
+ h(Host, { key: '9c332526981d228cc31dc50a84ebcb530b80fafd', id: this.host.id || this.componentId, style: { display: this.active ? 'block' : 'none' } }, h("div", { key: 'f83c683193cd57ae41b8d0a5192b77ecfe4e1f20', part: "base", class: "tab-panel", role: "tabpanel", "aria-selected": this.active ? 'true' : 'false', "aria-hidden": this.active ? 'false' : 'true' }, h("slot", { key: '4f86b7b5bb9aa47f2ea11dc2b76ace19bc2f458a' }))));
17
18
  }
18
19
  get host() { return getElement(this); }
19
20
  };
20
- SixTabPanel.style = sixTabPanelCss;
21
+ SixTabPanel.style = SixTabPanelStyle0;
21
22
 
22
23
  export { SixTabPanel as six_tab_panel };
23
24