@six-group/ui-library 0.0.0-insider.3adc11d → 0.0.0-insider.424223

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 (412) hide show
  1. package/dist/cjs/{form-control-9769b310.js → form-control-19303ed2.js} +2 -2
  2. package/dist/cjs/{form-control-9769b310.js.map → form-control-19303ed2.js.map} +1 -1
  3. package/dist/cjs/{index-900437fc.js → index-7d73cbd6.js} +281 -121
  4. package/dist/cjs/index-7d73cbd6.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +15 -0
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{scroll-03678de1.js → scroll-2c4200dc.js} +1 -2
  9. package/dist/cjs/scroll-2c4200dc.js.map +1 -0
  10. package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
  11. package/dist/cjs/six-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/six-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  14. package/dist/cjs/six-button.cjs.entry.js +4 -4
  15. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  16. package/dist/cjs/six-card.cjs.entry.js +1 -1
  17. package/dist/cjs/six-checkbox.cjs.entry.js +3 -3
  18. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/six-datepicker.cjs.entry.js +1 -1
  20. package/dist/cjs/six-details.cjs.entry.js +2 -2
  21. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-dialog.cjs.entry.js +2 -2
  23. package/dist/cjs/six-drawer.cjs.entry.js +3 -3
  24. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  25. package/dist/cjs/six-dropdown_2.cjs.entry.js +1 -1
  26. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  27. package/dist/cjs/six-error.cjs.entry.js +1 -1
  28. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  29. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  30. package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
  31. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/six-group-label.cjs.entry.js +3 -3
  33. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  34. package/dist/cjs/six-header.cjs.entry.js +1 -1
  35. package/dist/cjs/six-icon-button.cjs.entry.js +2 -2
  36. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-icon.cjs.entry.js +1 -1
  38. package/dist/cjs/six-input.cjs.entry.js +3 -3
  39. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  40. package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
  41. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  42. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  43. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  44. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  45. package/dist/cjs/six-menu-item.cjs.entry.js +1 -1
  46. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  47. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  48. package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
  49. package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
  50. package/dist/cjs/six-radio.cjs.entry.js +1 -1
  51. package/dist/cjs/six-range.cjs.entry.js +3 -3
  52. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-root.cjs.entry.js +1 -1
  54. package/dist/cjs/six-search-field.cjs.entry.js +1 -1
  55. package/dist/cjs/six-select.cjs.entry.js +3 -3
  56. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +14 -3
  58. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-sidebar-item.cjs.entry.js +6 -4
  60. package/dist/cjs/six-sidebar-item.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-sidebar.cjs.entry.js +3 -3
  62. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-spinner.cjs.entry.js +1 -1
  64. package/dist/cjs/six-switch.cjs.entry.js +3 -3
  65. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  66. package/dist/cjs/six-tab-group.cjs.entry.js +46 -51
  67. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  68. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  69. package/dist/cjs/six-tab.cjs.entry.js +20 -4
  70. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  71. package/dist/cjs/six-tag.cjs.entry.js +1 -1
  72. package/dist/cjs/six-textarea.cjs.entry.js +3 -3
  73. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  74. package/dist/cjs/six-tile.cjs.entry.js +1 -1
  75. package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
  76. package/dist/cjs/six-tooltip.cjs.entry.js +1 -1
  77. package/dist/cjs/ui-library.cjs.js +3 -3
  78. package/dist/cjs/ui-library.cjs.js.map +1 -1
  79. package/dist/collection/collection-manifest.json +2 -2
  80. package/dist/collection/components/six-button/six-button.css +5 -30
  81. package/dist/collection/components/six-button/six-button.js +2 -2
  82. package/dist/collection/components/six-button/six-button.js.map +1 -1
  83. package/dist/collection/components/six-checkbox/six-checkbox.css +3 -0
  84. package/dist/collection/components/six-details/six-details.css +3 -1
  85. package/dist/collection/components/six-drawer/six-drawer.js +1 -1
  86. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  87. package/dist/collection/components/six-drawer/test/six-drawer.spec.js +1 -1
  88. package/dist/collection/components/six-drawer/test/six-drawer.spec.js.map +1 -1
  89. package/dist/collection/components/six-group-label/six-group-label.css +3 -0
  90. package/dist/collection/components/six-icon-button/six-icon-button.css +4 -4
  91. package/dist/collection/components/six-input/six-input.css +3 -0
  92. package/dist/collection/components/six-range/six-range.css +3 -0
  93. package/dist/collection/components/six-select/six-select.css +3 -0
  94. package/dist/collection/components/six-sidebar/six-sidebar.css +0 -1
  95. package/dist/collection/components/six-sidebar-item/six-sidebar-item.css +6 -1
  96. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +21 -2
  97. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js.map +1 -1
  98. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.css +11 -0
  99. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +29 -1
  100. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  101. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js +2 -2
  102. package/dist/collection/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.js.map +1 -1
  103. package/dist/collection/components/six-switch/six-switch.css +3 -0
  104. package/dist/collection/components/six-tab/six-tab.css +54 -5
  105. package/dist/collection/components/six-tab/six-tab.js +18 -2
  106. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  107. package/dist/collection/components/six-tab-group/six-tab-group.css +0 -31
  108. package/dist/collection/components/six-tab-group/six-tab-group.js +10 -51
  109. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  110. package/dist/collection/components/six-textarea/six-textarea.css +3 -0
  111. package/dist/collection/utils/animation.js +34 -0
  112. package/dist/collection/utils/animation.js.map +1 -0
  113. package/dist/collection/utils/error-messages.js +14 -0
  114. package/dist/collection/utils/error-messages.js.map +1 -1
  115. package/dist/components/index.d.ts +6 -0
  116. package/dist/components/index.js +16 -2
  117. package/dist/components/index.js.map +1 -1
  118. package/dist/components/scroll.js +1 -1
  119. package/dist/components/set-attributes2.js +2 -0
  120. package/dist/components/set-attributes2.js.map +1 -1
  121. package/dist/components/six-alert.js +3 -0
  122. package/dist/components/six-alert.js.map +1 -1
  123. package/dist/components/six-button.js +3 -3
  124. package/dist/components/six-button.js.map +1 -1
  125. package/dist/components/six-checkbox.js +6 -1
  126. package/dist/components/six-checkbox.js.map +1 -1
  127. package/dist/components/six-datepicker.js +4 -1
  128. package/dist/components/six-datepicker.js.map +1 -1
  129. package/dist/components/six-details2.js +3 -1
  130. package/dist/components/six-details2.js.map +1 -1
  131. package/dist/components/six-dialog.js +2 -0
  132. package/dist/components/six-dialog.js.map +1 -1
  133. package/dist/components/six-drawer.js +3 -1
  134. package/dist/components/six-drawer.js.map +1 -1
  135. package/dist/components/six-dropdown2.js +7 -0
  136. package/dist/components/six-dropdown2.js.map +1 -1
  137. package/dist/components/six-group-label.js +4 -1
  138. package/dist/components/six-group-label.js.map +1 -1
  139. package/dist/components/six-header.js +2 -0
  140. package/dist/components/six-header.js.map +1 -1
  141. package/dist/components/six-icon-button2.js +1 -1
  142. package/dist/components/six-icon-button2.js.map +1 -1
  143. package/dist/components/six-input2.js +6 -1
  144. package/dist/components/six-input2.js.map +1 -1
  145. package/dist/components/six-item-picker2.js +4 -0
  146. package/dist/components/six-item-picker2.js.map +1 -1
  147. package/dist/components/six-language-switcher.js +2 -0
  148. package/dist/components/six-language-switcher.js.map +1 -1
  149. package/dist/components/six-layout-grid.js +2 -0
  150. package/dist/components/six-layout-grid.js.map +1 -1
  151. package/dist/components/six-progress-ring.js +2 -0
  152. package/dist/components/six-progress-ring.js.map +1 -1
  153. package/dist/components/six-radio.js +3 -0
  154. package/dist/components/six-radio.js.map +1 -1
  155. package/dist/components/six-range.js +8 -1
  156. package/dist/components/six-range.js.map +1 -1
  157. package/dist/components/six-root.js +2 -0
  158. package/dist/components/six-root.js.map +1 -1
  159. package/dist/components/six-search-field.js +2 -0
  160. package/dist/components/six-search-field.js.map +1 -1
  161. package/dist/components/six-select.js +8 -1
  162. package/dist/components/six-select.js.map +1 -1
  163. package/dist/components/six-sidebar-item-group.js +14 -2
  164. package/dist/components/six-sidebar-item-group.js.map +1 -1
  165. package/dist/components/six-sidebar-item.js +7 -4
  166. package/dist/components/six-sidebar-item.js.map +1 -1
  167. package/dist/components/six-sidebar.js +3 -1
  168. package/dist/components/six-sidebar.js.map +1 -1
  169. package/dist/components/six-switch.js +5 -1
  170. package/dist/components/six-switch.js.map +1 -1
  171. package/dist/components/six-tab-group.js +47 -50
  172. package/dist/components/six-tab-group.js.map +1 -1
  173. package/dist/components/six-tab.js +19 -3
  174. package/dist/components/six-tab.js.map +1 -1
  175. package/dist/components/six-textarea.js +7 -1
  176. package/dist/components/six-textarea.js.map +1 -1
  177. package/dist/components/six-timepicker2.js +3 -1
  178. package/dist/components/six-timepicker2.js.map +1 -1
  179. package/dist/components/six-tooltip2.js +2 -0
  180. package/dist/components/six-tooltip2.js.map +1 -1
  181. package/dist/components.json +57 -10
  182. package/dist/esm/{form-control-b0febe88.js → form-control-079f7fb6.js} +2 -2
  183. package/dist/esm/{form-control-b0febe88.js.map → form-control-079f7fb6.js.map} +1 -1
  184. package/dist/esm/{index-8a74f992.js → index-4ee8b33e.js} +281 -121
  185. package/dist/esm/index-4ee8b33e.js.map +1 -0
  186. package/dist/esm/index.js +15 -1
  187. package/dist/esm/index.js.map +1 -1
  188. package/dist/esm/loader.js +3 -3
  189. package/dist/esm/{scroll-3fb087a2.js → scroll-774762d6.js} +2 -2
  190. package/dist/esm/{scroll-3fb087a2.js.map → scroll-774762d6.js.map} +1 -1
  191. package/dist/esm/set-attributes_2.entry.js +1 -1
  192. package/dist/esm/six-alert.entry.js +1 -1
  193. package/dist/esm/six-avatar.entry.js +1 -1
  194. package/dist/esm/six-badge.entry.js +1 -1
  195. package/dist/esm/six-button.entry.js +4 -4
  196. package/dist/esm/six-button.entry.js.map +1 -1
  197. package/dist/esm/six-card.entry.js +1 -1
  198. package/dist/esm/six-checkbox.entry.js +3 -3
  199. package/dist/esm/six-checkbox.entry.js.map +1 -1
  200. package/dist/esm/six-datepicker.entry.js +1 -1
  201. package/dist/esm/six-details.entry.js +2 -2
  202. package/dist/esm/six-details.entry.js.map +1 -1
  203. package/dist/esm/six-dialog.entry.js +2 -2
  204. package/dist/esm/six-drawer.entry.js +3 -3
  205. package/dist/esm/six-drawer.entry.js.map +1 -1
  206. package/dist/esm/six-dropdown_2.entry.js +1 -1
  207. package/dist/esm/six-error-page.entry.js +1 -1
  208. package/dist/esm/six-error.entry.js +1 -1
  209. package/dist/esm/six-file-list-item.entry.js +1 -1
  210. package/dist/esm/six-file-list.entry.js +1 -1
  211. package/dist/esm/six-file-upload.entry.js +1 -1
  212. package/dist/esm/six-footer.entry.js +1 -1
  213. package/dist/esm/six-group-label.entry.js +3 -3
  214. package/dist/esm/six-group-label.entry.js.map +1 -1
  215. package/dist/esm/six-header.entry.js +1 -1
  216. package/dist/esm/six-icon-button.entry.js +2 -2
  217. package/dist/esm/six-icon-button.entry.js.map +1 -1
  218. package/dist/esm/six-icon.entry.js +1 -1
  219. package/dist/esm/six-input.entry.js +3 -3
  220. package/dist/esm/six-input.entry.js.map +1 -1
  221. package/dist/esm/six-item-picker.entry.js +1 -1
  222. package/dist/esm/six-language-switcher.entry.js +1 -1
  223. package/dist/esm/six-layout-grid.entry.js +1 -1
  224. package/dist/esm/six-main-container.entry.js +1 -1
  225. package/dist/esm/six-menu-divider.entry.js +1 -1
  226. package/dist/esm/six-menu-item.entry.js +1 -1
  227. package/dist/esm/six-menu-label.entry.js +1 -1
  228. package/dist/esm/six-picto.entry.js +1 -1
  229. package/dist/esm/six-progress-bar.entry.js +1 -1
  230. package/dist/esm/six-progress-ring.entry.js +1 -1
  231. package/dist/esm/six-radio.entry.js +1 -1
  232. package/dist/esm/six-range.entry.js +3 -3
  233. package/dist/esm/six-range.entry.js.map +1 -1
  234. package/dist/esm/six-root.entry.js +1 -1
  235. package/dist/esm/six-search-field.entry.js +1 -1
  236. package/dist/esm/six-select.entry.js +3 -3
  237. package/dist/esm/six-select.entry.js.map +1 -1
  238. package/dist/esm/six-sidebar-item-group.entry.js +14 -3
  239. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  240. package/dist/esm/six-sidebar-item.entry.js +6 -4
  241. package/dist/esm/six-sidebar-item.entry.js.map +1 -1
  242. package/dist/esm/six-sidebar.entry.js +3 -3
  243. package/dist/esm/six-sidebar.entry.js.map +1 -1
  244. package/dist/esm/six-spinner.entry.js +1 -1
  245. package/dist/esm/six-switch.entry.js +3 -3
  246. package/dist/esm/six-switch.entry.js.map +1 -1
  247. package/dist/esm/six-tab-group.entry.js +46 -51
  248. package/dist/esm/six-tab-group.entry.js.map +1 -1
  249. package/dist/esm/six-tab-panel.entry.js +1 -1
  250. package/dist/esm/six-tab.entry.js +20 -4
  251. package/dist/esm/six-tab.entry.js.map +1 -1
  252. package/dist/esm/six-tag.entry.js +1 -1
  253. package/dist/esm/six-textarea.entry.js +3 -3
  254. package/dist/esm/six-textarea.entry.js.map +1 -1
  255. package/dist/esm/six-tile.entry.js +1 -1
  256. package/dist/esm/six-timepicker.entry.js +1 -1
  257. package/dist/esm/six-tooltip.entry.js +1 -1
  258. package/dist/esm/ui-library.js +4 -4
  259. package/dist/esm/ui-library.js.map +1 -1
  260. package/dist/types/components/six-sidebar-item/six-sidebar-item.d.ts +5 -0
  261. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +6 -0
  262. package/dist/types/components/six-tab-group/six-tab-group.d.ts +0 -3
  263. package/dist/types/components.d.ts +396 -0
  264. package/dist/types/stencil-public-runtime.d.ts +26 -3
  265. package/dist/types/utils/animation.d.ts +12 -0
  266. package/dist/types/utils/error-messages.d.ts +2 -1
  267. package/dist/ui-library/index.esm.js +1 -1
  268. package/dist/ui-library/index.esm.js.map +1 -1
  269. package/dist/ui-library/p-0416ec85.entry.js +2 -0
  270. package/dist/ui-library/p-0416ec85.entry.js.map +1 -0
  271. package/dist/ui-library/{p-1f18768a.js → p-052aa8d3.js} +2 -2
  272. package/dist/ui-library/{p-ae601a0f.entry.js → p-0d8154b1.entry.js} +2 -2
  273. package/dist/ui-library/p-120a1b66.entry.js +2 -0
  274. package/dist/ui-library/{p-538f3c50.entry.js.map → p-120a1b66.entry.js.map} +1 -1
  275. package/dist/ui-library/{p-9c1be3fb.entry.js → p-16eb37cd.entry.js} +2 -2
  276. package/dist/ui-library/{p-878226a0.entry.js → p-1f7dac36.entry.js} +2 -2
  277. package/dist/ui-library/{p-a6a9ee96.entry.js → p-20cb60c9.entry.js} +2 -2
  278. package/dist/ui-library/{p-613283a7.entry.js → p-21606e14.entry.js} +2 -2
  279. package/dist/ui-library/{p-411ed539.entry.js → p-2280038f.entry.js} +2 -2
  280. package/dist/ui-library/{p-e775dcb4.entry.js → p-24e80289.entry.js} +2 -2
  281. package/dist/ui-library/{p-264d4ea8.entry.js → p-27987d45.entry.js} +2 -2
  282. package/dist/ui-library/{p-cd67da3d.entry.js → p-2945a132.entry.js} +2 -2
  283. package/dist/ui-library/{p-3cc5addb.entry.js → p-2e99f389.entry.js} +2 -2
  284. package/dist/ui-library/p-3d7678a8.entry.js +2 -0
  285. package/dist/ui-library/p-3d7678a8.entry.js.map +1 -0
  286. package/dist/ui-library/p-4196a75a.entry.js +2 -0
  287. package/dist/ui-library/{p-a457fee8.entry.js.map → p-4196a75a.entry.js.map} +1 -1
  288. package/dist/ui-library/{p-dc4f41d8.entry.js → p-48b7c199.entry.js} +2 -2
  289. package/dist/ui-library/{p-37557787.entry.js → p-51630491.entry.js} +2 -2
  290. package/dist/ui-library/{p-14c1ec31.entry.js → p-5218986b.entry.js} +2 -2
  291. package/dist/ui-library/p-5904d3c3.entry.js +2 -0
  292. package/dist/ui-library/p-5904d3c3.entry.js.map +1 -0
  293. package/dist/ui-library/p-66a48dc4.entry.js +2 -0
  294. package/dist/ui-library/{p-db936ad7.entry.js.map → p-66a48dc4.entry.js.map} +1 -1
  295. package/dist/ui-library/{p-91b51800.entry.js → p-66d1d93d.entry.js} +2 -2
  296. package/dist/ui-library/{p-25bb1752.entry.js → p-6aced322.entry.js} +2 -2
  297. package/dist/ui-library/p-6e87aeea.entry.js +2 -0
  298. package/dist/ui-library/p-6e87aeea.entry.js.map +1 -0
  299. package/dist/ui-library/p-74179b03.entry.js +2 -0
  300. package/dist/ui-library/{p-ab91c2a9.entry.js.map → p-74179b03.entry.js.map} +1 -1
  301. package/dist/ui-library/{p-1d5ee1a0.entry.js → p-77424c6b.entry.js} +2 -2
  302. package/dist/ui-library/{p-13b43e04.entry.js → p-7d00de3a.entry.js} +2 -2
  303. package/dist/ui-library/{p-cdaed936.entry.js → p-7e9257f3.entry.js} +2 -2
  304. package/dist/ui-library/p-8226e363.entry.js +2 -0
  305. package/dist/ui-library/{p-b57afbe4.entry.js.map → p-8226e363.entry.js.map} +1 -1
  306. package/dist/ui-library/{p-99e24daf.entry.js → p-8296e24c.entry.js} +2 -2
  307. package/dist/ui-library/{p-99e24daf.entry.js.map → p-8296e24c.entry.js.map} +1 -1
  308. package/dist/ui-library/{p-7e3ad38a.entry.js → p-93a9b693.entry.js} +2 -2
  309. package/dist/ui-library/{p-5af44076.entry.js → p-94bd8347.entry.js} +2 -2
  310. package/dist/ui-library/{p-ee950ce2.entry.js → p-9bec3e14.entry.js} +2 -2
  311. package/dist/ui-library/{p-9b354f5d.entry.js → p-a15928c4.entry.js} +2 -2
  312. package/dist/ui-library/p-a4348ad4.entry.js +2 -0
  313. package/dist/ui-library/p-a4348ad4.entry.js.map +1 -0
  314. package/dist/ui-library/{p-7afafb9d.entry.js → p-acd3ecfd.entry.js} +2 -2
  315. package/dist/ui-library/{p-f1dc3a88.entry.js → p-ae383f66.entry.js} +2 -2
  316. package/dist/ui-library/p-af0e163e.entry.js +2 -0
  317. package/dist/ui-library/p-af0e163e.entry.js.map +1 -0
  318. package/dist/ui-library/p-b3a14438.entry.js +2 -0
  319. package/dist/ui-library/p-b3a14438.entry.js.map +1 -0
  320. package/dist/ui-library/{p-dfed33c5.entry.js → p-b42fd9c3.entry.js} +2 -2
  321. package/dist/ui-library/p-b5fdfa6a.js +3 -0
  322. package/dist/ui-library/p-b5fdfa6a.js.map +1 -0
  323. package/dist/ui-library/p-b7597736.entry.js +2 -0
  324. package/dist/ui-library/{p-4435ff73.entry.js.map → p-b7597736.entry.js.map} +1 -1
  325. package/dist/ui-library/{p-c03ebf7d.entry.js → p-b906a605.entry.js} +2 -2
  326. package/dist/ui-library/{p-ac099e6b.entry.js → p-b97764a1.entry.js} +2 -2
  327. package/dist/ui-library/p-bbefcec9.entry.js +2 -0
  328. package/dist/ui-library/{p-db34a6cc.entry.js.map → p-bbefcec9.entry.js.map} +1 -1
  329. package/dist/ui-library/{p-b351f889.entry.js → p-c75694df.entry.js} +2 -2
  330. package/dist/ui-library/{p-b6f47c9d.entry.js → p-cb32f8d2.entry.js} +2 -2
  331. package/dist/ui-library/{p-a0f290d0.entry.js → p-cd3281fb.entry.js} +2 -2
  332. package/dist/ui-library/{p-19ed7a4c.entry.js → p-cec8c149.entry.js} +2 -2
  333. package/dist/ui-library/{p-724875b0.entry.js → p-d1ba2ad5.entry.js} +2 -2
  334. package/dist/ui-library/{p-346f9557.entry.js → p-d2196113.entry.js} +2 -2
  335. package/dist/ui-library/p-de7a9448.entry.js +2 -0
  336. package/dist/ui-library/p-de7a9448.entry.js.map +1 -0
  337. package/dist/ui-library/{p-a55c7258.entry.js → p-df1c4a1f.entry.js} +2 -2
  338. package/dist/ui-library/{p-95fbdd0b.entry.js → p-e740215a.entry.js} +2 -2
  339. package/dist/ui-library/{p-e5020f0d.js → p-f3fdc121.js} +2 -2
  340. package/dist/ui-library/ui-library.css +2 -2
  341. package/dist/ui-library/ui-library.esm.js +1 -1
  342. package/dist/ui-library/ui-library.esm.js.map +1 -1
  343. package/package.json +13 -10
  344. package/dist/cjs/index-900437fc.js.map +0 -1
  345. package/dist/cjs/scroll-03678de1.js.map +0 -1
  346. package/dist/collection/components/six-tab/test/six-tab.spec.js +0 -20
  347. package/dist/collection/components/six-tab/test/six-tab.spec.js.map +0 -1
  348. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js +0 -45
  349. package/dist/collection/components/six-tab-group/test/six-tab-group.spec.js.map +0 -1
  350. package/dist/esm/index-8a74f992.js.map +0 -1
  351. package/dist/ui-library/p-1256cc0a.entry.js +0 -2
  352. package/dist/ui-library/p-1256cc0a.entry.js.map +0 -1
  353. package/dist/ui-library/p-21b3b321.entry.js +0 -2
  354. package/dist/ui-library/p-21b3b321.entry.js.map +0 -1
  355. package/dist/ui-library/p-29ac3d7d.entry.js +0 -2
  356. package/dist/ui-library/p-29ac3d7d.entry.js.map +0 -1
  357. package/dist/ui-library/p-2a141e10.entry.js +0 -2
  358. package/dist/ui-library/p-2a141e10.entry.js.map +0 -1
  359. package/dist/ui-library/p-4435ff73.entry.js +0 -2
  360. package/dist/ui-library/p-4705a51e.entry.js +0 -2
  361. package/dist/ui-library/p-4705a51e.entry.js.map +0 -1
  362. package/dist/ui-library/p-538f3c50.entry.js +0 -2
  363. package/dist/ui-library/p-6153045b.js +0 -3
  364. package/dist/ui-library/p-6153045b.js.map +0 -1
  365. package/dist/ui-library/p-6197fe2f.entry.js +0 -2
  366. package/dist/ui-library/p-6197fe2f.entry.js.map +0 -1
  367. package/dist/ui-library/p-83864cfe.entry.js +0 -2
  368. package/dist/ui-library/p-83864cfe.entry.js.map +0 -1
  369. package/dist/ui-library/p-a457fee8.entry.js +0 -2
  370. package/dist/ui-library/p-ab91c2a9.entry.js +0 -2
  371. package/dist/ui-library/p-b57afbe4.entry.js +0 -2
  372. package/dist/ui-library/p-db34a6cc.entry.js +0 -2
  373. package/dist/ui-library/p-db936ad7.entry.js +0 -2
  374. package/dist/ui-library/p-ee8342e1.entry.js +0 -2
  375. package/dist/ui-library/p-ee8342e1.entry.js.map +0 -1
  376. /package/dist/ui-library/{p-1f18768a.js.map → p-052aa8d3.js.map} +0 -0
  377. /package/dist/ui-library/{p-ae601a0f.entry.js.map → p-0d8154b1.entry.js.map} +0 -0
  378. /package/dist/ui-library/{p-9c1be3fb.entry.js.map → p-16eb37cd.entry.js.map} +0 -0
  379. /package/dist/ui-library/{p-878226a0.entry.js.map → p-1f7dac36.entry.js.map} +0 -0
  380. /package/dist/ui-library/{p-a6a9ee96.entry.js.map → p-20cb60c9.entry.js.map} +0 -0
  381. /package/dist/ui-library/{p-613283a7.entry.js.map → p-21606e14.entry.js.map} +0 -0
  382. /package/dist/ui-library/{p-411ed539.entry.js.map → p-2280038f.entry.js.map} +0 -0
  383. /package/dist/ui-library/{p-e775dcb4.entry.js.map → p-24e80289.entry.js.map} +0 -0
  384. /package/dist/ui-library/{p-264d4ea8.entry.js.map → p-27987d45.entry.js.map} +0 -0
  385. /package/dist/ui-library/{p-cd67da3d.entry.js.map → p-2945a132.entry.js.map} +0 -0
  386. /package/dist/ui-library/{p-3cc5addb.entry.js.map → p-2e99f389.entry.js.map} +0 -0
  387. /package/dist/ui-library/{p-dc4f41d8.entry.js.map → p-48b7c199.entry.js.map} +0 -0
  388. /package/dist/ui-library/{p-37557787.entry.js.map → p-51630491.entry.js.map} +0 -0
  389. /package/dist/ui-library/{p-14c1ec31.entry.js.map → p-5218986b.entry.js.map} +0 -0
  390. /package/dist/ui-library/{p-91b51800.entry.js.map → p-66d1d93d.entry.js.map} +0 -0
  391. /package/dist/ui-library/{p-25bb1752.entry.js.map → p-6aced322.entry.js.map} +0 -0
  392. /package/dist/ui-library/{p-1d5ee1a0.entry.js.map → p-77424c6b.entry.js.map} +0 -0
  393. /package/dist/ui-library/{p-13b43e04.entry.js.map → p-7d00de3a.entry.js.map} +0 -0
  394. /package/dist/ui-library/{p-cdaed936.entry.js.map → p-7e9257f3.entry.js.map} +0 -0
  395. /package/dist/ui-library/{p-7e3ad38a.entry.js.map → p-93a9b693.entry.js.map} +0 -0
  396. /package/dist/ui-library/{p-5af44076.entry.js.map → p-94bd8347.entry.js.map} +0 -0
  397. /package/dist/ui-library/{p-ee950ce2.entry.js.map → p-9bec3e14.entry.js.map} +0 -0
  398. /package/dist/ui-library/{p-9b354f5d.entry.js.map → p-a15928c4.entry.js.map} +0 -0
  399. /package/dist/ui-library/{p-7afafb9d.entry.js.map → p-acd3ecfd.entry.js.map} +0 -0
  400. /package/dist/ui-library/{p-f1dc3a88.entry.js.map → p-ae383f66.entry.js.map} +0 -0
  401. /package/dist/ui-library/{p-dfed33c5.entry.js.map → p-b42fd9c3.entry.js.map} +0 -0
  402. /package/dist/ui-library/{p-c03ebf7d.entry.js.map → p-b906a605.entry.js.map} +0 -0
  403. /package/dist/ui-library/{p-ac099e6b.entry.js.map → p-b97764a1.entry.js.map} +0 -0
  404. /package/dist/ui-library/{p-b351f889.entry.js.map → p-c75694df.entry.js.map} +0 -0
  405. /package/dist/ui-library/{p-b6f47c9d.entry.js.map → p-cb32f8d2.entry.js.map} +0 -0
  406. /package/dist/ui-library/{p-a0f290d0.entry.js.map → p-cd3281fb.entry.js.map} +0 -0
  407. /package/dist/ui-library/{p-19ed7a4c.entry.js.map → p-cec8c149.entry.js.map} +0 -0
  408. /package/dist/ui-library/{p-724875b0.entry.js.map → p-d1ba2ad5.entry.js.map} +0 -0
  409. /package/dist/ui-library/{p-346f9557.entry.js.map → p-d2196113.entry.js.map} +0 -0
  410. /package/dist/ui-library/{p-a55c7258.entry.js.map → p-df1c4a1f.entry.js.map} +0 -0
  411. /package/dist/ui-library/{p-95fbdd0b.entry.js.map → p-e740215a.entry.js.map} +0 -0
  412. /package/dist/ui-library/{p-e5020f0d.js.map → p-f3fdc121.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"six-button.js","sourceRoot":"","sources":["../../../src/components/six-button/six-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,SAAS;;IA2EZ,qBAAgB,GAAG,GAAG,EAAE;MAC9B,IAA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, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\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 button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-button.js","sourceRoot":"","sources":["../../../src/components/six-button/six-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;GAeG;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\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 button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type: 'secondary' | 'primary' | 'link' | 'success' | 'warning' | 'danger' | 'action' =\n 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n"]}
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -11,12 +11,14 @@
11
11
  * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.
12
12
  * @prop --show-duration: The length of the show transition.
13
13
  * @prop --show-timing-function: The timing function (easing) to use for the show transition.
14
+ * @prop --horizontal-padding: The horizontal padding
14
15
  */
15
16
  :host {
16
17
  --hide-duration: var(--six-transition-medium);
17
18
  --hide-timing-function: ease;
18
19
  --show-duration: var(--six-transition-medium);
19
20
  --show-timing-function: ease;
21
+ --horizontal-padding: var(--six-spacing-medium);
20
22
  font-family: var(--six-font-family);
21
23
  display: block;
22
24
  }
@@ -61,7 +63,7 @@
61
63
  display: flex;
62
64
  align-items: center;
63
65
  border-radius: inherit;
64
- padding: var(--six-spacing-medium);
66
+ padding: var(--six-spacing-medium) var(--horizontal-padding);
65
67
  user-select: none;
66
68
  cursor: pointer;
67
69
  }
@@ -161,7 +161,7 @@ export class SixDrawer {
161
161
  'drawer--contained': this.contained,
162
162
  'drawer--fixed': !this.contained,
163
163
  'drawer--has-footer': this.hasFooter,
164
- }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "drawer__overlay", onClick: this.handleOverlayClick, tabIndex: -1 }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "drawer__panel", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": this.noHeader ? this.label : null, "aria-labelledby": !this.noHeader ? `${this.componentId}-title` : null, tabIndex: 0 }, !this.noHeader && (h("header", { part: "header", class: "drawer__header" }, h("span", { part: "title", class: "drawer__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "drawer__close", name: "x", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "drawer__body" }, h("slot", null)), h("footer", { part: "footer", class: "drawer__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
164
+ }, onKeyDown: this.handleKeyDown, onTransitionEnd: this.handleTransitionEnd }, h("div", { part: "overlay", class: "drawer__overlay", onClick: this.handleOverlayClick, tabIndex: -1 }), h("div", { ref: (el) => (this.panel = el), part: "panel", class: "drawer__panel", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": this.noHeader ? this.label : null, "aria-labelledby": !this.noHeader ? `${this.componentId}-title` : null, tabIndex: 0 }, !this.noHeader && (h("header", { part: "header", class: "drawer__header" }, h("span", { part: "title", class: "drawer__title", id: `${this.componentId}-title` }, h("slot", { name: "label" }, this.label || String.fromCharCode(65279))), h("six-icon-button", { exportparts: "base:close-button", class: "drawer__close", name: "close", onClick: this.handleCloseClick }))), h("div", { part: "body", class: "drawer__body" }, h("slot", null)), h("footer", { part: "footer", class: "drawer__footer" }, h("slot", { name: "footer", onSlotchange: this.handleSlotChange })))));
165
165
  }
166
166
  static get is() { return "six-drawer"; }
167
167
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"six-drawer.js","sourceRoot":"","sources":["../../../src/components/six-drawer/six-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAGtC,MAAM,gBAAgB,GAAG,wBAAwB,EAAE,CAAC;AACpD,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AAOH,MAAM,OAAO,SAAS;;IACZ,g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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport { isPreventScrollSupported } from '../../utils/support';\nimport Modal from '../../utils/modal';\nimport { EmptyPayload } from '../../utils/types';\n\nconst hasPreventScroll = isPreventScrollSupported();\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The drawer's content.\n * @slot label - The drawer's label. Alternatively, you can use the label prop.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @part base - The component's base wrapper.\n * @part overlay - The overlay.\n * @part panel - The drawer panel (where the drawer and its content is rendered).\n * @part header - The drawer header.\n * @part title - The drawer title.\n * @part close-button - The close button.\n * @part body - The drawer body.\n * @part footer - The drawer footer.\n */\n\n@Component({\n tag: 'six-drawer',\n styleUrl: 'six-drawer.scss',\n shadow: true,\n})\nexport class SixDrawer {\n private componentId = `drawer-${++id}`;\n private drawer?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the drawer is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility.\n */\n @Prop() label = '';\n\n /** The direction from which the drawer will open. */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'right';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this prop and add `position: relative` to the parent.\n */\n @Prop() contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the drawer opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-drawer-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer opens and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the drawer closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-drawer-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer closes and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the drawer opens and the panel gains focus. Calling `event.preventDefault()` will prevent focus and\n * allow you to set it on a different element in the drawer, such as an input or button.\n */\n @Event({ eventName: 'six-drawer-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the drawer from closing. */\n @Event({ eventName: 'six-drawer-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => (this.contained ? null : this.panel?.focus()),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n\n // Show on init if open\n if (this.open) {\n this.show();\n // if the sidebar is open by default we need to manually reset the\n // transition variables since there will be no transition event\n this.resetTransitionVariables();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the drawer */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.drawer == null) {\n return;\n }\n const panel = this.panel;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this.host);\n }\n\n if (this.open) {\n if (hasPreventScroll) {\n // Wait for the next frame before setting initial focus so the dialog is technically visible\n requestAnimationFrame(() => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus({ preventScroll: true });\n }\n });\n } else {\n // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to\n // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its\n // out of view initially.\n //\n // Fiddle: https://jsfiddle.net/g6buoafq/1/\n // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583\n //\n this.drawer.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the drawer */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'transform' && target.classList.contains('drawer__panel')) {\n this.resetTransitionVariables();\n }\n };\n\n private resetTransitionVariables() {\n this.isVisible = this.open;\n this.willShow = false;\n this.willHide = false;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.drawer = el)}\n part=\"base\"\n class={{\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--visible': this.isVisible,\n 'drawer--top': this.placement === 'top',\n 'drawer--right': this.placement === 'right',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--left': this.placement === 'left',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" onClick={this.handleOverlayClick} tabIndex={-1} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-label={this.noHeader ? this.label : null}\n aria-labelledby={!this.noHeader ? `${this.componentId}-title` : null}\n tabIndex={0}\n >\n {!this.noHeader && (\n <header part=\"header\" class=\"drawer__header\">\n <span part=\"title\" class=\"drawer__title\" id={`${this.componentId}-title`}>\n <slot name=\"label\">\n {/* If there's no label, use an invisible character to prevent the heading from collapsing */}\n {this.label || String.fromCharCode(65279)}\n </slot>\n </span>\n <six-icon-button\n exportparts=\"base:close-button\"\n class=\"drawer__close\"\n name=\"x\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"drawer__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-drawer.js","sourceRoot":"","sources":["../../../src/components/six-drawer/six-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC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V;QAED,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc;UACnC,eAAQ,CACJ;QAEN,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,gBAAgB;UAC1C,YAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACpD,CACL,CACF,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../../utils/scroll';\nimport { hasSlot } from '../../utils/slot';\nimport { isPreventScrollSupported } from '../../utils/support';\nimport Modal from '../../utils/modal';\nimport { EmptyPayload } from '../../utils/types';\n\nconst hasPreventScroll = isPreventScrollSupported();\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The drawer's content.\n * @slot label - The drawer's label. Alternatively, you can use the label prop.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @part base - The component's base wrapper.\n * @part overlay - The overlay.\n * @part panel - The drawer panel (where the drawer and its content is rendered).\n * @part header - The drawer header.\n * @part title - The drawer title.\n * @part close-button - The close button.\n * @part body - The drawer body.\n * @part footer - The drawer footer.\n */\n\n@Component({\n tag: 'six-drawer',\n styleUrl: 'six-drawer.scss',\n shadow: true,\n})\nexport class SixDrawer {\n private componentId = `drawer-${++id}`;\n private drawer?: HTMLElement;\n private modal?: Modal;\n private panel?: HTMLElement;\n private willShow = false;\n private willHide = false;\n\n @Element() host!: HTMLSixDrawerElement;\n\n @State() hasFooter = false;\n @State() isVisible = false;\n\n /** Indicates whether the drawer is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility.\n */\n @Prop() label = '';\n\n /** The direction from which the drawer will open. */\n @Prop() placement: 'top' | 'right' | 'bottom' | 'left' = 'right';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this prop and add `position: relative` to the parent.\n */\n @Prop() contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @Prop() noHeader = false;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the drawer opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-drawer-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer opens and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the drawer closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-drawer-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the drawer closes and all transitions are complete. */\n @Event({ eventName: 'six-drawer-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /**\n * Emitted when the drawer opens and the panel gains focus. Calling `event.preventDefault()` will prevent focus and\n * allow you to set it on a different element in the drawer, such as an input or button.\n */\n @Event({ eventName: 'six-drawer-initial-focus' }) sixInitialFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the overlay is clicked. Calling `event.preventDefault()` will prevent the drawer from closing. */\n @Event({ eventName: 'six-drawer-overlay-dismiss' }) sixOverlayDismiss!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.modal = new Modal(this.host, {\n onFocusOut: () => (this.contained ? null : this.panel?.focus()),\n });\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n\n // Show on init if open\n if (this.open) {\n this.show();\n // if the sidebar is open by default we need to manually reset the\n // transition variables since there will be no transition event\n this.resetTransitionVariables();\n }\n }\n\n disconnectedCallback() {\n unlockBodyScrolling(this.host);\n }\n\n /** Shows the drawer */\n @Method()\n async show() {\n if (this.willShow || this.modal == null || this.panel == null || this.drawer == null) {\n return;\n }\n const panel = this.panel;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.willShow = true;\n this.isVisible = true;\n this.open = true;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this.host);\n }\n\n if (this.open) {\n if (hasPreventScroll) {\n // Wait for the next frame before setting initial focus so the dialog is technically visible\n requestAnimationFrame(() => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus({ preventScroll: true });\n }\n });\n } else {\n // Once Safari supports { preventScroll: true } we can remove this nasty little hack, but until then we need to\n // wait for the transition to complete before setting focus, otherwise the panel may render in a buggy way its\n // out of view initially.\n //\n // Fiddle: https://jsfiddle.net/g6buoafq/1/\n // Safari: https://bugs.webkit.org/show_bug.cgi?id=178583\n //\n this.drawer.addEventListener(\n 'transitionend',\n () => {\n const sixInitialFocus = this.sixInitialFocus.emit();\n if (!sixInitialFocus.defaultPrevented) {\n panel.focus();\n }\n },\n { once: true }\n );\n }\n }\n }\n\n /** Hides the drawer */\n @Method()\n async hide() {\n if (this.willHide || this.modal == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.willHide = true;\n this.open = false;\n this.modal.deactivate();\n\n unlockBodyScrolling(this.host);\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private handleOverlayClick = () => {\n const sixOverlayDismiss = this.sixOverlayDismiss.emit();\n\n if (!sixOverlayDismiss.defaultPrevented) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n this.hasFooter = hasSlot(this.host, 'footer');\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'transform' && target.classList.contains('drawer__panel')) {\n this.resetTransitionVariables();\n }\n };\n\n private resetTransitionVariables() {\n this.isVisible = this.open;\n this.willShow = false;\n this.willHide = false;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.drawer = el)}\n part=\"base\"\n class={{\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--visible': this.isVisible,\n 'drawer--top': this.placement === 'top',\n 'drawer--right': this.placement === 'right',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--left': this.placement === 'left',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--has-footer': this.hasFooter,\n }}\n onKeyDown={this.handleKeyDown}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" onClick={this.handleOverlayClick} tabIndex={-1} />\n\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-label={this.noHeader ? this.label : null}\n aria-labelledby={!this.noHeader ? `${this.componentId}-title` : null}\n tabIndex={0}\n >\n {!this.noHeader && (\n <header part=\"header\" class=\"drawer__header\">\n <span part=\"title\" class=\"drawer__title\" id={`${this.componentId}-title`}>\n <slot name=\"label\">\n {/* If there's no label, use an invisible character to prevent the heading from collapsing */}\n {this.label || String.fromCharCode(65279)}\n </slot>\n </span>\n <six-icon-button\n exportparts=\"base:close-button\"\n class=\"drawer__close\"\n name=\"close\"\n onClick={this.handleCloseClick}\n />\n </header>\n )}\n\n <div part=\"body\" class=\"drawer__body\">\n <slot />\n </div>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </footer>\n </div>\n </div>\n );\n }\n}\n"]}
@@ -16,7 +16,7 @@ describe('six-drawer', () => {
16
16
  <span class="drawer__title" id="drawer-1-title" part="title">
17
17
  <slot name="label"></slot>
18
18
  </span>
19
- <six-icon-button class="drawer__close" exportparts="base:close-button" name="x"></six-icon-button>
19
+ <six-icon-button class="drawer__close" exportparts="base:close-button" name="close"></six-icon-button>
20
20
  </header>
21
21
  <div class="drawer__body" part="body">
22
22
  <slot></slot>
@@ -1 +1 @@
1
- {"version":3,"file":"six-drawer.spec.js","sourceRoot":"","sources":["../../../../src/components/six-drawer/test/six-drawer.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;KAsB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixDrawer } from '../six-drawer';\n\ndescribe('six-drawer', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixDrawer],\n html: `<six-drawer></six-drawer>`,\n });\n expect(page.root).toEqualHtml(`\n <six-drawer>\n <mock:shadow-root>\n <div class=\"drawer drawer--fixed drawer--right\" part=\"base\">\n <div class=\"drawer__overlay\" part=\"overlay\" tabindex=\"-1\"></div>\n <div aria-hidden=\"true\" aria-labelledby=\"drawer-1-title\" aria-modal=\"true\" class=\"drawer__panel\" part=\"panel\" role=\"dialog\" tabindex=\"0\">\n <header class=\"drawer__header\" part=\"header\">\n <span class=\"drawer__title\" id=\"drawer-1-title\" part=\"title\">\n <slot name=\"label\"></slot>\n </span>\n <six-icon-button class=\"drawer__close\" exportparts=\"base:close-button\" name=\"x\"></six-icon-button>\n </header>\n <div class=\"drawer__body\" part=\"body\">\n <slot></slot>\n </div>\n <footer class=\"drawer__footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n </mock:shadow-root>\n </six-drawer>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-drawer.spec.js","sourceRoot":"","sources":["../../../../src/components/six-drawer/test/six-drawer.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;KAsB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixDrawer } from '../six-drawer';\n\ndescribe('six-drawer', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [SixDrawer],\n html: `<six-drawer></six-drawer>`,\n });\n expect(page.root).toEqualHtml(`\n <six-drawer>\n <mock:shadow-root>\n <div class=\"drawer drawer--fixed drawer--right\" part=\"base\">\n <div class=\"drawer__overlay\" part=\"overlay\" tabindex=\"-1\"></div>\n <div aria-hidden=\"true\" aria-labelledby=\"drawer-1-title\" aria-modal=\"true\" class=\"drawer__panel\" part=\"panel\" role=\"dialog\" tabindex=\"0\">\n <header class=\"drawer__header\" part=\"header\">\n <span class=\"drawer__title\" id=\"drawer-1-title\" part=\"title\">\n <slot name=\"label\"></slot>\n </span>\n <six-icon-button class=\"drawer__close\" exportparts=\"base:close-button\" name=\"close\"></six-icon-button>\n </header>\n <div class=\"drawer__body\" part=\"body\">\n <slot></slot>\n </div>\n <footer class=\"drawer__footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n </mock:shadow-root>\n </six-drawer>\n `);\n });\n});\n"]}
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -33,6 +33,10 @@
33
33
  .icon-button:focus {
34
34
  outline: none;
35
35
  }
36
+ .icon-button:focus-visible {
37
+ outline: var(--six-focus-ring);
38
+ outline-offset: var(--six-focus-ring-offset);
39
+ }
36
40
 
37
41
  .icon-button--disabled {
38
42
  opacity: 0.5;
@@ -43,10 +47,6 @@
43
47
  cursor: not-allowed;
44
48
  }
45
49
 
46
- .focus-visible.icon-button:focus {
47
- box-shadow: var(--six-button-focus-shadow);
48
- }
49
-
50
50
  .icon-button ::slotted(six-badge) {
51
51
  position: absolute;
52
52
  top: 0;
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -17,7 +17,6 @@
17
17
  }
18
18
  .sidebar__container.sidebar--open {
19
19
  box-shadow: var(--six-elevation-1dp);
20
- padding: 0 var(--six-spacing-small);
21
20
  }
22
21
  .sidebar__container:not(.sidebar--visible) {
23
22
  position: absolute;
@@ -2,11 +2,16 @@
2
2
  display: block;
3
3
  }
4
4
 
5
+ a {
6
+ text-decoration: none;
7
+ display: block;
8
+ }
9
+
5
10
  .sidebar-item {
11
+ padding: 8px 8px 16px 16px;
6
12
  font-size: 0.9rem;
7
13
  color: var(--six-sidebar-color);
8
14
  cursor: pointer;
9
- padding: 8px 8px 16px 16px;
10
15
  font-family: var(--six-font-family);
11
16
  }
12
17
  .sidebar-item:hover:not(.sidebar-item--disabled) {
@@ -10,13 +10,15 @@ export class SixSidebarItem {
10
10
  this.value = '';
11
11
  this.selected = false;
12
12
  this.disabled = false;
13
+ this.href = undefined;
13
14
  }
14
15
  render() {
15
- return (h("div", { class: {
16
+ const Tag = this.href != null ? 'a' : 'div';
17
+ return (h(Tag, { class: {
16
18
  'sidebar-item': true,
17
19
  'sidebar-item--selected': this.selected,
18
20
  'sidebar-item--disabled': this.disabled,
19
- }, role: "menuitem", "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", null)));
21
+ }, role: "menuitem", href: this.href, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("slot", null)));
20
22
  }
21
23
  static get is() { return "six-sidebar-item"; }
22
24
  static get encapsulation() { return "shadow"; }
@@ -85,6 +87,23 @@ export class SixSidebarItem {
85
87
  "attribute": "disabled",
86
88
  "reflect": true,
87
89
  "defaultValue": "false"
90
+ },
91
+ "href": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "string | undefined",
96
+ "resolved": "string | undefined",
97
+ "references": {}
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": "Provide if the item should be rendered as anchor tag.\nNote, that the href is added automatically when using routerLink in Angular."
104
+ },
105
+ "attribute": "href",
106
+ "reflect": true
88
107
  }
89
108
  };
90
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"six-sidebar-item.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item/six-sidebar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AAOH,MAAM,OAAO,cAAc;;iBAEQ,EAAE;oBAGC,KAAK;oBAGL,KAAK;;EAEzC,MAAM;IACJ,OAAO,CACL,WACE,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,wBAAwB,EAAE,IAAI,CAAC,QAAQ;QACvC,wBAAwB,EAAE,IAAI,CAAC,QAAQ;OACxC,EACD,IAAI,EAAC,UAAU,mBACA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,mBAChC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;MAE/C,eAAa,CACT,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 render() {\n return (\n <div\n class={{\n 'sidebar-item': true,\n 'sidebar-item--selected': this.selected,\n 'sidebar-item--disabled': this.disabled,\n }}\n role=\"menuitem\"\n aria-selected={this.selected ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n >\n <slot></slot>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-sidebar-item.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item/six-sidebar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AAOH,MAAM,OAAO,cAAc;;iBAEQ,EAAE;oBAGC,KAAK;oBAGL,KAAK;;;EAQzC,MAAM;IACJ,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5C,OAAO,CACL,EAAC,GAAG,IACF,KAAK,EAAE;QACL,cAAc,EAAE,IAAI;QACpB,wBAAwB,EAAE,IAAI,CAAC,QAAQ;QACvC,wBAAwB,EAAE,IAAI,CAAC,QAAQ;OACxC,EACD,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,mBACA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,mBAChC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;MAE/C,eAAa,CACT,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
@@ -10,6 +10,10 @@
10
10
  display: block;
11
11
  }
12
12
 
13
+ .six-sidebar-item-group {
14
+ --horizontal-padding: var(--six-spacing-x-large);
15
+ }
16
+
13
17
  .six-sidebar-item-group--childless::part(content) {
14
18
  padding: 0 !important;
15
19
  }
@@ -29,4 +33,11 @@
29
33
 
30
34
  .six-sidebar-details__header-icon {
31
35
  margin-right: 1em;
36
+ }
37
+
38
+ .six-sidebar-details__link {
39
+ text-decoration: none;
40
+ display: block;
41
+ color: inherit;
42
+ width: 100%;
32
43
  }
@@ -27,6 +27,7 @@ export class SixSidebarItemGroup {
27
27
  this.open = false;
28
28
  this.summaryIcon = undefined;
29
29
  this.summaryIconHasContent = false;
30
+ this.href = undefined;
30
31
  }
31
32
  connectedCallback() {
32
33
  this.handleSlotChange = this.handleSlotChange.bind(this);
@@ -41,11 +42,21 @@ export class SixSidebarItemGroup {
41
42
  var _a;
42
43
  return ((_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.closest('six-sidebar-item-group')) != null;
43
44
  }
45
+ renderAsHref() {
46
+ return this.href != null && !this.hasItems;
47
+ }
44
48
  render() {
45
- return (h("six-details", { class: {
49
+ const element = (h("six-details", { class: {
50
+ 'six-sidebar-item-group': true,
46
51
  'six-sidebar-item-group--childless': !this.hasItems,
47
52
  'six-sidebar-item-group--subgroup': this.isSubgroup(),
48
53
  }, inline: true, open: this.open, "summary-icon": this.summaryIcon, hasContent: this.hasItems }, h("div", { slot: "summary" }, h("div", { class: "six-sidebar-details__header" }, this.icon && h("six-icon", { class: "six-sidebar-details__header-icon" }, this.icon), this.name)), this.provideSlot('summary-icon'), h("slot", null)));
54
+ if (this.renderAsHref()) {
55
+ return (h("a", { class: "six-sidebar-details__link", href: this.href }, element));
56
+ }
57
+ else {
58
+ return element;
59
+ }
49
60
  }
50
61
  static get is() { return "six-sidebar-item-group"; }
51
62
  static get encapsulation() { return "shadow"; }
@@ -149,6 +160,23 @@ export class SixSidebarItemGroup {
149
160
  },
150
161
  "attribute": "summary-icon",
151
162
  "reflect": false
163
+ },
164
+ "href": {
165
+ "type": "string",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "string | undefined",
169
+ "resolved": "string | undefined",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Provide if the item should be rendered as anchor tag.\nNote, that the href is added automatically when using routerLink in Angular."
177
+ },
178
+ "attribute": "href",
179
+ "reflect": true
152
180
  }
153
181
  };
154
182
  }
@@ -1 +1 @@
1
- {"version":3,"file":"six-sidebar-item-group.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item-group/six-sidebar-item-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;;;;GAKG;AAOH,MAAM,OAAO,mBAAmB;;IAsCtB,gBAAW,GAAG,CAAC,IAAY,EAAE,EAAE;MACrC,IAAI,IAAI,CAAC,qBAAqB,EAAE;QAC9B,OAAO,CACL,WAAK,IAAI,EAAE,IAAI;UACb,YAAM,IAAI,EAAE,IAAI,GAAS,CACrB,CACP,CAAC;OACH;MAED,OAAO,CACL,YACE,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,GAAG,EAAE;;UACjB,MAAM,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAkB,cAAc,IAAI,IAAI,CAAC,CAAC;UAC1F,IAAI,IAAI,IAAI,IAAI,EAAE;YAChB,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;WAC9D;QACH,CAAC,GACK,CACT,CAAC;IACJ,CAAC,CAAC;oBAvDkB,KAAK;gBAGV,EAAE;gBAGF,EAAE;iBAGgB,EAAE;gBAGH,KAAK;;iCAKJ,KAAK;;EAEtC,iBAAiB;IACf,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EAC3D,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;EAC1B,CAAC;EAEO,gBAAgB;IACtB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EACrC,CAAC;EAEO,UAAU;;IAChB,OAAO,CAAA,MAAA,IAAI,CAAC,IAAI,CAAC,aAAa,0CAAE,OAAO,CAAC,wBAAwB,CAAC,KAAI,IAAI,CAAC;EAC5E,CAAC;EAwBD,MAAM;IACJ,OAAO,CACL,mBACE,KAAK,EAAE;QACL,mCAAmC,EAAE,CAAC,IAAI,CAAC,QAAQ;QACnD,kCAAkC,EAAE,IAAI,CAAC,UAAU,EAAE;OACtD,EACD,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,kBACD,IAAI,CAAC,WAAW,EAC9B,UAAU,EAAE,IAAI,CAAC,QAAQ;MAEzB,WAAK,IAAI,EAAC,SAAS;QACjB,WAAK,KAAK,EAAC,6BAA6B;UACrC,IAAI,CAAC,IAAI,IAAI,gBAAU,KAAK,EAAC,kCAAkC,IAAE,IAAI,CAAC,IAAI,CAAY;UACtF,IAAI,CAAC,IAAI,CACN,CACF;MACL,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;MACjC,eAAQ,CACI,CACf,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested sidebar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar-item-group',\n styleUrl: 'six-sidebar-item-group.scss',\n shadow: true,\n})\nexport class SixSidebarItemGroup {\n @Element() readonly host!: HTMLSixSidebarItemGroupElement;\n\n @State() hasItems = false;\n\n /** Title of item group */\n @Prop() name = '';\n\n /** Icon of the group */\n @Prop() icon = '';\n\n /** A unique value to store in the sidebar item of the group label. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Indicates whether the sidebar is shown */\n @Prop({ reflect: true }) open = false;\n\n /** Custom summary icon name. */\n @Prop() summaryIcon?: string;\n\n @State() summaryIconHasContent = false;\n\n connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange() {\n this.hasItems = hasSlot(this.host);\n }\n\n private isSubgroup() {\n return this.host.parentElement?.closest('six-sidebar-item-group') != null;\n }\n\n private provideSlot = (name: string) => {\n if (this.summaryIconHasContent) {\n return (\n <div slot={name}>\n <slot name={name}></slot>\n </div>\n );\n }\n\n return (\n <slot\n name={name}\n onSlotchange={() => {\n const slot = this.host.shadowRoot?.querySelector<HTMLSlotElement>(`slot[name=\"${name}\"]`);\n if (slot != null) {\n this.summaryIconHasContent = slot.assignedNodes().length > 0;\n }\n }}\n ></slot>\n );\n };\n\n render() {\n return (\n <six-details\n class={{\n 'six-sidebar-item-group--childless': !this.hasItems,\n 'six-sidebar-item-group--subgroup': this.isSubgroup(),\n }}\n inline={true}\n open={this.open}\n summary-icon={this.summaryIcon}\n hasContent={this.hasItems}\n >\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\">\n {this.icon && <six-icon class=\"six-sidebar-details__header-icon\">{this.icon}</six-icon>}\n {this.name}\n </div>\n </div>\n {this.provideSlot('summary-icon')}\n <slot />\n </six-details>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-sidebar-item-group.js","sourceRoot":"","sources":["../../../src/components/six-sidebar-item-group/six-sidebar-item-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;A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CAAC;EAwBD,MAAM;IACJ,MAAM,OAAO,GAAG,CACd,mBACE,KAAK,EAAE;QACL,wBAAwB,EAAE,IAAI;QAC9B,mCAAmC,EAAE,CAAC,IAAI,CAAC,QAAQ;QACnD,kCAAkC,EAAE,IAAI,CAAC,UAAU,EAAE;OACtD,EACD,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,kBACD,IAAI,CAAC,WAAW,EAC9B,UAAU,EAAE,IAAI,CAAC,QAAQ;MAEzB,WAAK,IAAI,EAAC,SAAS;QACjB,WAAK,KAAK,EAAC,6BAA6B;UACrC,IAAI,CAAC,IAAI,IAAI,gBAAU,KAAK,EAAC,kCAAkC,IAAE,IAAI,CAAC,IAAI,CAAY;UACtF,IAAI,CAAC,IAAI,CACN,CACF;MACL,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;MACjC,eAAQ,CACI,CACf,CAAC;IAEF,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE;MACvB,OAAO,CACL,SAAG,KAAK,EAAC,2BAA2B,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IACjD,OAAO,CACN,CACL,CAAC;KACH;SAAM;MACL,OAAO,OAAO,CAAC;KAChB;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the nested sidebar [group] items.\n */\n\n@Component({\n tag: 'six-sidebar-item-group',\n styleUrl: 'six-sidebar-item-group.scss',\n shadow: true,\n})\nexport class SixSidebarItemGroup {\n @Element() readonly host!: HTMLSixSidebarItemGroupElement;\n\n @State() hasItems = false;\n\n /** Title of item group */\n @Prop() name = '';\n\n /** Icon of the group */\n @Prop() icon = '';\n\n /** A unique value to store in the sidebar item of the group label. This can be used as a way to identify sidebar items when selected. */\n @Prop({ reflect: true }) value = '';\n\n /** Indicates whether the sidebar is shown */\n @Prop({ reflect: true }) open = false;\n\n /** Custom summary icon name. */\n @Prop() summaryIcon?: string;\n\n @State() summaryIconHasContent = 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 connectedCallback() {\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n private handleSlotChange() {\n this.hasItems = hasSlot(this.host);\n }\n\n private isSubgroup() {\n return this.host.parentElement?.closest('six-sidebar-item-group') != null;\n }\n\n private renderAsHref(): boolean {\n return this.href != null && !this.hasItems;\n }\n\n private provideSlot = (name: string) => {\n if (this.summaryIconHasContent) {\n return (\n <div slot={name}>\n <slot name={name}></slot>\n </div>\n );\n }\n\n return (\n <slot\n name={name}\n onSlotchange={() => {\n const slot = this.host.shadowRoot?.querySelector<HTMLSlotElement>(`slot[name=\"${name}\"]`);\n if (slot != null) {\n this.summaryIconHasContent = slot.assignedNodes().length > 0;\n }\n }}\n ></slot>\n );\n };\n\n render() {\n const element = (\n <six-details\n class={{\n 'six-sidebar-item-group': true,\n 'six-sidebar-item-group--childless': !this.hasItems,\n 'six-sidebar-item-group--subgroup': this.isSubgroup(),\n }}\n inline={true}\n open={this.open}\n summary-icon={this.summaryIcon}\n hasContent={this.hasItems}\n >\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\">\n {this.icon && <six-icon class=\"six-sidebar-details__header-icon\">{this.icon}</six-icon>}\n {this.name}\n </div>\n </div>\n {this.provideSlot('summary-icon')}\n <slot />\n </six-details>\n );\n\n if (this.renderAsHref()) {\n return (\n <a class=\"six-sidebar-details__link\" href={this.href}>\n {element}\n </a>\n );\n } else {\n return element;\n }\n }\n}\n"]}
@@ -10,7 +10,7 @@ describe('six-sidebar-item-group', () => {
10
10
  expect(page.root).toEqualHtml(`
11
11
  <six-sidebar-item-group value="">
12
12
  <mock:shadow-root>
13
- <six-details class="six-sidebar-item-group--childless" inline="">
13
+ <six-details class="six-sidebar-item-group six-sidebar-item-group--childless" inline="">
14
14
  <div slot="summary">
15
15
  <div class="six-sidebar-details__header"></div>
16
16
  </div>
@@ -30,7 +30,7 @@ describe('six-sidebar-item-group', () => {
30
30
  expect(page.root).toEqualHtml(`
31
31
  <six-sidebar-item-group value="">
32
32
  <mock:shadow-root>
33
- <six-details class="six-sidebar-item-group--childless" inline="">
33
+ <six-details class="six-sidebar-item-group six-sidebar-item-group--childless" inline="">
34
34
  <div slot="summary">
35
35
  <div class="six-sidebar-details__header"></div>
36
36
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"six-sidebar-item-group.spec.js","sourceRoot":"","sources":["../../../../src/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;EACtC,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACnC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,mBAAmB,CAAC;MACjC,IAAI,EAAE,mDAAmD;KAC1D,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;KAY7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;IACvC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,mBAAmB,EAAE,cAAc,CAAC;MACjD,IAAI,EAAE,yGAAyG;KAChH,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;KAoB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixSidebarItemGroup } from '../six-sidebar-item-group';\nimport { SixSidebarItem } from '../../six-sidebar-item/six-sidebar-item';\n\ndescribe('six-sidebar-item-group', () => {\n it('renders empty group', async () => {\n const page = await newSpecPage({\n components: [SixSidebarItemGroup],\n html: `<six-sidebar-item-group></six-sidebar-item-group>`,\n });\n expect(page.root).toEqualHtml(`\n <six-sidebar-item-group value=\"\">\n <mock:shadow-root>\n <six-details class=\"six-sidebar-item-group--childless\" inline=\"\">\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\"></div>\n </div>\n <slot name=\"summary-icon\"></slot>\n <slot></slot>\n </six-details>\n </mock:shadow-root>\n </six-sidebar-item-group>\n `);\n });\n\n it('renders group with item', async () => {\n const page = await newSpecPage({\n components: [SixSidebarItemGroup, SixSidebarItem],\n html: `<six-sidebar-item-group><six-sidebar-item value=\"data\">Data</six-sidebar-item></six-sidebar-item-group>`,\n });\n\n await page.waitForChanges();\n\n expect(page.root).toEqualHtml(`\n <six-sidebar-item-group value=\"\">\n <mock:shadow-root>\n <six-details class=\"six-sidebar-item-group--childless\" inline=\"\">\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\"></div>\n </div>\n <slot name=\"summary-icon\"></slot>\n <slot></slot>\n </six-details>\n </mock:shadow-root>\n <six-sidebar-item value=\"data\">\n <mock:shadow-root>\n <div aria-disabled=\"false\" aria-selected=\"false\" class=\"sidebar-item\" role=\"menuitem\">\n <slot></slot>\n </div>\n </mock:shadow-root>\n Data\n </six-sidebar-item>\n </six-sidebar-item-group>\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"six-sidebar-item-group.spec.js","sourceRoot":"","sources":["../../../../src/components/six-sidebar-item-group/test/six-sidebar-item-group.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;EACtC,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACnC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,mBAAmB,CAAC;MACjC,IAAI,EAAE,mDAAmD;KAC1D,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;KAY7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;IACvC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,mBAAmB,EAAE,cAAc,CAAC;MACjD,IAAI,EAAE,yGAAyG;KAChH,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;KAoB7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { SixSidebarItemGroup } from '../six-sidebar-item-group';\nimport { SixSidebarItem } from '../../six-sidebar-item/six-sidebar-item';\n\ndescribe('six-sidebar-item-group', () => {\n it('renders empty group', async () => {\n const page = await newSpecPage({\n components: [SixSidebarItemGroup],\n html: `<six-sidebar-item-group></six-sidebar-item-group>`,\n });\n expect(page.root).toEqualHtml(`\n <six-sidebar-item-group value=\"\">\n <mock:shadow-root>\n <six-details class=\"six-sidebar-item-group six-sidebar-item-group--childless\" inline=\"\">\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\"></div>\n </div>\n <slot name=\"summary-icon\"></slot>\n <slot></slot>\n </six-details>\n </mock:shadow-root>\n </six-sidebar-item-group>\n `);\n });\n\n it('renders group with item', async () => {\n const page = await newSpecPage({\n components: [SixSidebarItemGroup, SixSidebarItem],\n html: `<six-sidebar-item-group><six-sidebar-item value=\"data\">Data</six-sidebar-item></six-sidebar-item-group>`,\n });\n\n await page.waitForChanges();\n\n expect(page.root).toEqualHtml(`\n <six-sidebar-item-group value=\"\">\n <mock:shadow-root>\n <six-details class=\"six-sidebar-item-group six-sidebar-item-group--childless\" inline=\"\">\n <div slot=\"summary\">\n <div class=\"six-sidebar-details__header\"></div>\n </div>\n <slot name=\"summary-icon\"></slot>\n <slot></slot>\n </six-details>\n </mock:shadow-root>\n <six-sidebar-item value=\"data\">\n <mock:shadow-root>\n <div aria-disabled=\"false\" aria-selected=\"false\" class=\"sidebar-item\" role=\"menuitem\">\n <slot></slot>\n </div>\n </mock:shadow-root>\n Data\n </six-sidebar-item>\n </six-sidebar-item-group>\n `);\n });\n});\n"]}
@@ -26,6 +26,9 @@
26
26
  .form-control--has-label .form-control__label__required::after {
27
27
  color: var(--six-color-danger-800);
28
28
  content: "*";
29
+ transform: scale(1.1);
30
+ margin-left: var(--six-spacing-xxx-small);
31
+ position: absolute;
29
32
  }
30
33
  .form-control--has-label.form-control--small .form-control__label {
31
34
  font-size: var(--six-input-label-font-size-small);
@@ -7,7 +7,7 @@
7
7
  }
8
8
 
9
9
  :host {
10
- display: inline-block;
10
+ display: flex;
11
11
  }
12
12
 
13
13
  .tab {
@@ -16,19 +16,19 @@
16
16
  font-family: var(--six-font-family);
17
17
  font-size: var(--six-font-size-small);
18
18
  font-weight: var(--six-font-weight-semibold);
19
- border-radius: 4px;
20
19
  color: var(--six-tab-color);
21
20
  padding: var(--six-spacing-medium) var(--six-spacing-large);
22
21
  white-space: nowrap;
23
22
  user-select: none;
24
23
  cursor: pointer;
25
- transition: var(--six-transition-fast) box-shadow, var(--six-transition-fast) color;
24
+ width: 100%;
26
25
  }
27
26
  .tab:focus {
28
27
  outline: none;
29
28
  }
30
- .tab:focus:not(.tab--disabled) {
31
- color: var(--six-tab-color-active);
29
+ .tab:focus-visible {
30
+ outline: var(--six-focus-ring);
31
+ outline-offset: calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset));
32
32
  }
33
33
  .tab.tab--active:not(.tab--disabled) {
34
34
  color: var(--six-tab-color-active);
@@ -51,4 +51,53 @@
51
51
  }
52
52
  .tab__close-button::part(base) {
53
53
  padding: var(--six-spacing-xxx-small);
54
+ }
55
+
56
+ .tab__indicator {
57
+ position: absolute;
58
+ }
59
+ .tab__indicator.tab__indicator--active {
60
+ background-color: var(--six-tab-border-color-active);
61
+ }
62
+
63
+ .tab--top {
64
+ margin-bottom: var(--six-spacing-xxx-small);
65
+ }
66
+
67
+ .tab__indicator--top {
68
+ width: 100%;
69
+ bottom: 0;
70
+ height: var(--six-tab-border-width);
71
+ }
72
+
73
+ .tab--bottom {
74
+ margin-top: var(--six-spacing-xxx-small);
75
+ }
76
+
77
+ .tab__indicator--bottom {
78
+ width: 100%;
79
+ top: 0;
80
+ height: var(--six-tab-border-width);
81
+ }
82
+
83
+ .tab--left {
84
+ margin-right: var(--six-spacing-xxx-small);
85
+ }
86
+
87
+ .tab__indicator--left {
88
+ height: 100%;
89
+ right: 0;
90
+ top: 0;
91
+ width: var(--six-tab-border-width);
92
+ }
93
+
94
+ .tab--right {
95
+ margin-left: var(--six-spacing-xxx-small);
96
+ }
97
+
98
+ .tab__indicator--right {
99
+ height: 100%;
100
+ left: 0;
101
+ top: 0;
102
+ width: var(--six-tab-border-width);
54
103
  }