@six-group/ui-library 5.0.0-rc.2 → 5.1.0-rc.1

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 (444) hide show
  1. package/dist/cjs/icon-4irykc7V.js +17 -0
  2. package/dist/cjs/icon-4irykc7V.js.map +1 -0
  3. package/dist/cjs/index-C8rK7OAe.js +12 -8
  4. package/dist/cjs/index.cjs.js +3 -0
  5. package/dist/cjs/index.cjs.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/six-breadcrumbs-item.cjs.entry.js +25 -0
  8. package/dist/cjs/six-breadcrumbs-item.cjs.entry.js.map +1 -0
  9. package/dist/cjs/six-breadcrumbs-item.entry.cjs.js.map +1 -0
  10. package/dist/cjs/six-breadcrumbs.cjs.entry.js +73 -0
  11. package/dist/cjs/six-breadcrumbs.cjs.entry.js.map +1 -0
  12. package/dist/cjs/six-breadcrumbs.entry.cjs.js.map +1 -0
  13. package/dist/cjs/six-button.six-spinner.entry.cjs.js.map +1 -0
  14. package/dist/cjs/{six-button.cjs.entry.js → six-button_2.cjs.entry.js} +55 -4
  15. package/dist/cjs/six-button_2.cjs.entry.js.map +1 -0
  16. package/dist/cjs/six-card.cjs.entry.js +1 -1
  17. package/dist/cjs/six-checkbox_2.cjs.entry.js +4 -4
  18. package/dist/cjs/six-date.cjs.entry.js +38 -33
  19. package/dist/cjs/six-date.cjs.entry.js.map +1 -1
  20. package/dist/cjs/six-date.entry.cjs.js.map +1 -1
  21. package/dist/cjs/six-datepicker.cjs.entry.js +3 -3
  22. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  23. package/dist/cjs/six-datepicker.entry.cjs.js.map +1 -1
  24. package/dist/cjs/six-details.cjs.entry.js +3 -3
  25. package/dist/cjs/six-dropdown.six-menu.entry.cjs.js.map +1 -1
  26. package/dist/cjs/six-dropdown_2.cjs.entry.js +3 -3
  27. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  28. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  29. package/dist/cjs/six-error.cjs.entry.js +1 -1
  30. package/dist/cjs/six-file-list.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 +1 -1
  33. package/dist/cjs/six-header-dropdown-item.cjs.entry.js +2 -2
  34. package/dist/cjs/six-header-item.cjs.entry.js +1 -1
  35. package/dist/cjs/six-header-menu-button.cjs.entry.js +1 -1
  36. package/dist/cjs/six-header.cjs.entry.js +2 -2
  37. package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
  38. package/dist/cjs/six-icon.cjs.entry.js +15 -6
  39. package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
  40. package/dist/cjs/six-icon.entry.cjs.js.map +1 -1
  41. package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
  42. package/dist/cjs/six-main-container.cjs.entry.js +1 -1
  43. package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
  44. package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
  45. package/dist/cjs/six-picto.cjs.entry.js +1 -1
  46. package/dist/cjs/six-progress-bar.cjs.entry.js +3 -3
  47. package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
  48. package/dist/cjs/six-radio.cjs.entry.js +2 -2
  49. package/dist/cjs/six-range.cjs.entry.js +2 -2
  50. package/dist/cjs/six-rating.cjs.entry.js +2 -2
  51. package/dist/cjs/six-root.cjs.entry.js +1 -1
  52. package/dist/cjs/six-sidebar-item.cjs.entry.js +2 -2
  53. package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
  54. package/dist/cjs/six-switch.cjs.entry.js +2 -2
  55. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  56. package/dist/cjs/six-tab.cjs.entry.js +2 -2
  57. package/dist/cjs/six-tag.cjs.entry.js +2 -2
  58. package/dist/cjs/six-textarea.cjs.entry.js +2 -2
  59. package/dist/cjs/six-tile.cjs.entry.js +5 -5
  60. package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
  61. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  62. package/dist/cjs/six-timepicker.entry.cjs.js.map +1 -1
  63. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  64. package/dist/cjs/ui-library.cjs.js +1 -1
  65. package/dist/collection/collection-manifest.json +2 -0
  66. package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.css +27 -0
  67. package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.js +109 -0
  68. package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.js.map +1 -0
  69. package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.css +61 -0
  70. package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.js +123 -0
  71. package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.js.map +1 -0
  72. package/dist/collection/components/six-button/six-button.js +2 -2
  73. package/dist/collection/components/six-card/six-card.js +1 -1
  74. package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
  75. package/dist/collection/components/six-date/iso-date.js +32 -0
  76. package/dist/collection/components/six-date/iso-date.js.map +1 -1
  77. package/dist/collection/components/six-date/six-date.js +7 -34
  78. package/dist/collection/components/six-date/six-date.js.map +1 -1
  79. package/dist/collection/components/six-datepicker/six-datepicker.js +4 -4
  80. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  81. package/dist/collection/components/six-details/six-details.js +3 -3
  82. package/dist/collection/components/six-error/six-error.js +1 -1
  83. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  84. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  85. package/dist/collection/components/six-footer/six-footer.js +1 -1
  86. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  87. package/dist/collection/components/six-header/six-header.js +2 -2
  88. package/dist/collection/components/six-header-dropdown-item/six-header-dropdown-item.js +2 -2
  89. package/dist/collection/components/six-header-item/six-header-item.js +1 -1
  90. package/dist/collection/components/six-header-menu-button/six-header-menu-button.js +1 -1
  91. package/dist/collection/components/six-icon/six-icon.css +48 -34
  92. package/dist/collection/components/six-icon/six-icon.js +39 -5
  93. package/dist/collection/components/six-icon/six-icon.js.map +1 -1
  94. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  95. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  96. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  97. package/dist/collection/components/six-menu/six-menu.js +3 -3
  98. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  99. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  100. package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
  101. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  102. package/dist/collection/components/six-picto/six-picto.js +1 -1
  103. package/dist/collection/components/six-progress-bar/six-progress-bar.js +3 -3
  104. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  105. package/dist/collection/components/six-radio/six-radio.js +2 -2
  106. package/dist/collection/components/six-range/six-range.js +2 -2
  107. package/dist/collection/components/six-rating/six-rating.js +2 -2
  108. package/dist/collection/components/six-root/six-root.js +1 -1
  109. package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
  110. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  111. package/dist/collection/components/six-switch/six-switch.js +2 -2
  112. package/dist/collection/components/six-tab/six-tab.js +2 -2
  113. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  114. package/dist/collection/components/six-tag/six-tag.js +2 -2
  115. package/dist/collection/components/six-textarea/six-textarea.js +2 -2
  116. package/dist/collection/components/six-tile/six-tile.js +5 -5
  117. package/dist/collection/components/six-timepicker/six-timepicker.js +1 -1
  118. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  119. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  120. package/dist/collection/files/material-symbols-outlined-latin-fill-normal.woff2 +0 -0
  121. package/dist/collection/files/material-symbols-outlined-latin-full-normal.woff2 +0 -0
  122. package/dist/collection/files/material-symbols-outlined-latin-grad-normal.woff2 +0 -0
  123. package/dist/collection/files/material-symbols-outlined-latin-opsz-normal.woff2 +0 -0
  124. package/dist/collection/files/material-symbols-outlined-latin-standard-normal.woff2 +0 -0
  125. package/dist/collection/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
  126. package/dist/collection/files/material-symbols-rounded-latin-fill-normal.woff2 +0 -0
  127. package/dist/collection/files/material-symbols-rounded-latin-full-normal.woff2 +0 -0
  128. package/dist/collection/files/material-symbols-rounded-latin-grad-normal.woff2 +0 -0
  129. package/dist/collection/files/material-symbols-rounded-latin-opsz-normal.woff2 +0 -0
  130. package/dist/collection/files/material-symbols-rounded-latin-standard-normal.woff2 +0 -0
  131. package/dist/collection/files/material-symbols-rounded-latin-wght-normal.woff2 +0 -0
  132. package/dist/collection/files/material-symbols-sharp-latin-fill-normal.woff2 +0 -0
  133. package/dist/collection/files/material-symbols-sharp-latin-full-normal.woff2 +0 -0
  134. package/dist/collection/files/material-symbols-sharp-latin-grad-normal.woff2 +0 -0
  135. package/dist/collection/files/material-symbols-sharp-latin-opsz-normal.woff2 +0 -0
  136. package/dist/collection/files/material-symbols-sharp-latin-standard-normal.woff2 +0 -0
  137. package/dist/collection/files/material-symbols-sharp-latin-wght-normal.woff2 +0 -0
  138. package/dist/collection/index.js +1 -0
  139. package/dist/collection/index.js.map +1 -1
  140. package/dist/collection/utils/icon.js +10 -0
  141. package/dist/collection/utils/icon.js.map +1 -0
  142. package/dist/components/index.js +5 -0
  143. package/dist/components/index.js.map +1 -1
  144. package/dist/components/{p-Cs1jspzx.js → p-B5aFlIg7.js} +6 -6
  145. package/dist/components/{p-Cs1jspzx.js.map → p-B5aFlIg7.js.map} +1 -1
  146. package/dist/components/{p-BUN8hFmL.js → p-BDCdPEjW.js} +4 -4
  147. package/dist/components/p-BDCdPEjW.js.map +1 -0
  148. package/dist/components/{p-Cfyrva2T.js → p-BKl-wAjt.js} +5 -5
  149. package/dist/components/{p-Cfyrva2T.js.map → p-BKl-wAjt.js.map} +1 -1
  150. package/dist/components/{p-CWKq6Dyt.js → p-BLocui1Z.js} +3 -3
  151. package/dist/components/{p-CWKq6Dyt.js.map → p-BLocui1Z.js.map} +1 -1
  152. package/dist/components/{p-DYlDF9Rw.js → p-CH82uB3t.js} +3 -3
  153. package/dist/components/{p-DYlDF9Rw.js.map → p-CH82uB3t.js.map} +1 -1
  154. package/dist/components/{p-CAJFkiLw.js → p-CIsPrMgs.js} +7 -7
  155. package/dist/components/{p-CAJFkiLw.js.map → p-CIsPrMgs.js.map} +1 -1
  156. package/dist/components/p-CT4IVFqs.js +71 -0
  157. package/dist/components/p-CT4IVFqs.js.map +1 -0
  158. package/dist/components/{p-9aUb96SZ.js → p-CcWikBVi.js} +8 -8
  159. package/dist/components/{p-9aUb96SZ.js.map → p-CcWikBVi.js.map} +1 -1
  160. package/dist/components/{p-C28WDWgL.js → p-Cj4iCimX.js} +7 -7
  161. package/dist/components/{p-C28WDWgL.js.map → p-Cj4iCimX.js.map} +1 -1
  162. package/dist/components/{p-Cosz73fX.js → p-CoOyRFuR.js} +6 -6
  163. package/dist/components/{p-Cosz73fX.js.map → p-CoOyRFuR.js.map} +1 -1
  164. package/dist/components/{p-DsGIkEDB.js → p-CzGRjc9h.js} +4 -4
  165. package/dist/components/{p-DsGIkEDB.js.map → p-CzGRjc9h.js.map} +1 -1
  166. package/dist/components/{p-BR2t7cws.js → p-Dirhd_mz.js} +3 -3
  167. package/dist/components/{p-BR2t7cws.js.map → p-Dirhd_mz.js.map} +1 -1
  168. package/dist/components/{p-DyYwMIDQ.js → p-DkoOhgRO.js} +3 -3
  169. package/dist/components/{p-DyYwMIDQ.js.map → p-DkoOhgRO.js.map} +1 -1
  170. package/dist/components/{p-CSL17OWk.js → p-KU002yza.js} +9 -9
  171. package/dist/components/{p-CSL17OWk.js.map → p-KU002yza.js.map} +1 -1
  172. package/dist/components/{p-ClylOmYH.js → p-jflTvJ8E.js} +4 -4
  173. package/dist/components/{p-ClylOmYH.js.map → p-jflTvJ8E.js.map} +1 -1
  174. package/dist/components/six-alert.js +2 -2
  175. package/dist/components/six-avatar.js +1 -1
  176. package/dist/components/six-breadcrumbs-item.d.ts +11 -0
  177. package/dist/components/six-breadcrumbs-item.js +58 -0
  178. package/dist/components/six-breadcrumbs-item.js.map +1 -0
  179. package/dist/components/six-breadcrumbs.d.ts +11 -0
  180. package/dist/components/six-breadcrumbs.js +97 -0
  181. package/dist/components/six-breadcrumbs.js.map +1 -0
  182. package/dist/components/six-button.js +1 -1
  183. package/dist/components/six-card.js +1 -1
  184. package/dist/components/six-checkbox.js +1 -1
  185. package/dist/components/six-date.js +42 -37
  186. package/dist/components/six-date.js.map +1 -1
  187. package/dist/components/six-datepicker.js +8 -8
  188. package/dist/components/six-datepicker.js.map +1 -1
  189. package/dist/components/six-details.js +1 -1
  190. package/dist/components/six-dialog.js +2 -2
  191. package/dist/components/six-drawer.js +2 -2
  192. package/dist/components/six-dropdown.js +1 -1
  193. package/dist/components/six-error-page.js +2 -2
  194. package/dist/components/six-error.js +1 -1
  195. package/dist/components/six-file-list-item.js +1 -1
  196. package/dist/components/six-file-list.js +1 -1
  197. package/dist/components/six-file-upload.js +2 -2
  198. package/dist/components/six-footer.js +1 -1
  199. package/dist/components/six-group-label.js +2 -2
  200. package/dist/components/six-header-dropdown-item.js +9 -9
  201. package/dist/components/six-header-item.js +1 -1
  202. package/dist/components/six-header-menu-button.js +2 -2
  203. package/dist/components/six-header.js +2 -2
  204. package/dist/components/six-icon-button.js +1 -1
  205. package/dist/components/six-icon.js +1 -1
  206. package/dist/components/six-input.js +1 -1
  207. package/dist/components/six-item-picker.js +1 -1
  208. package/dist/components/six-layout-grid.js +1 -1
  209. package/dist/components/six-main-container.js +1 -1
  210. package/dist/components/six-menu-divider.js +1 -1
  211. package/dist/components/six-menu-item.js +1 -1
  212. package/dist/components/six-menu-label.js +1 -1
  213. package/dist/components/six-menu.js +1 -1
  214. package/dist/components/six-picto.js +1 -1
  215. package/dist/components/six-progress-bar.js +3 -3
  216. package/dist/components/six-progress-ring.js +1 -1
  217. package/dist/components/six-radio.js +2 -2
  218. package/dist/components/six-range.js +3 -3
  219. package/dist/components/six-rating.js +4 -4
  220. package/dist/components/six-root.js +3 -3
  221. package/dist/components/six-search-field.js +3 -3
  222. package/dist/components/six-select.js +9 -9
  223. package/dist/components/six-sidebar-item-group.js +2 -2
  224. package/dist/components/six-sidebar-item.js +3 -3
  225. package/dist/components/six-sidebar.js +2 -2
  226. package/dist/components/six-stage-indicator.js +1 -1
  227. package/dist/components/six-switch.js +3 -3
  228. package/dist/components/six-tab-group.js +2 -2
  229. package/dist/components/six-tab-panel.js +1 -1
  230. package/dist/components/six-tab.js +4 -4
  231. package/dist/components/six-tag.js +5 -5
  232. package/dist/components/six-textarea.js +3 -3
  233. package/dist/components/six-tile.js +8 -8
  234. package/dist/components/six-timepicker.js +1 -1
  235. package/dist/components/six-tooltip.js +1 -1
  236. package/dist/components.json +383 -4
  237. package/dist/esm/icon-DqHJRLQQ.js +14 -0
  238. package/dist/esm/icon-DqHJRLQQ.js.map +1 -0
  239. package/dist/esm/index-JoG9I7EO.js +12 -8
  240. package/dist/esm/index.js +1 -0
  241. package/dist/esm/index.js.map +1 -1
  242. package/dist/esm/loader.js +1 -1
  243. package/dist/esm/six-breadcrumbs-item.entry.js +23 -0
  244. package/dist/esm/six-breadcrumbs-item.entry.js.map +1 -0
  245. package/dist/esm/six-breadcrumbs.entry.js +71 -0
  246. package/dist/esm/six-breadcrumbs.entry.js.map +1 -0
  247. package/dist/esm/six-button.six-spinner.entry.js.map +1 -0
  248. package/dist/esm/{six-button.entry.js → six-button_2.entry.js} +55 -5
  249. package/dist/esm/six-button_2.entry.js.map +1 -0
  250. package/dist/esm/six-card.entry.js +1 -1
  251. package/dist/esm/six-checkbox_2.entry.js +4 -4
  252. package/dist/esm/six-date.entry.js +38 -33
  253. package/dist/esm/six-date.entry.js.map +1 -1
  254. package/dist/esm/six-datepicker.entry.js +3 -3
  255. package/dist/esm/six-datepicker.entry.js.map +1 -1
  256. package/dist/esm/six-details.entry.js +3 -3
  257. package/dist/esm/six-dropdown.six-menu.entry.js.map +1 -1
  258. package/dist/esm/six-dropdown_2.entry.js +3 -3
  259. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  260. package/dist/esm/six-error-page.entry.js +1 -1
  261. package/dist/esm/six-error.entry.js +1 -1
  262. package/dist/esm/six-file-list.entry.js +1 -1
  263. package/dist/esm/six-footer.entry.js +1 -1
  264. package/dist/esm/six-group-label.entry.js +1 -1
  265. package/dist/esm/six-header-dropdown-item.entry.js +2 -2
  266. package/dist/esm/six-header-item.entry.js +1 -1
  267. package/dist/esm/six-header-menu-button.entry.js +1 -1
  268. package/dist/esm/six-header.entry.js +2 -2
  269. package/dist/esm/six-icon-button.entry.js +3 -3
  270. package/dist/esm/six-icon.entry.js +15 -6
  271. package/dist/esm/six-icon.entry.js.map +1 -1
  272. package/dist/esm/six-layout-grid.entry.js +1 -1
  273. package/dist/esm/six-main-container.entry.js +1 -1
  274. package/dist/esm/six-menu-divider.entry.js +1 -1
  275. package/dist/esm/six-menu-label.entry.js +1 -1
  276. package/dist/esm/six-picto.entry.js +1 -1
  277. package/dist/esm/six-progress-bar.entry.js +3 -3
  278. package/dist/esm/six-progress-ring.entry.js +1 -1
  279. package/dist/esm/six-radio.entry.js +2 -2
  280. package/dist/esm/six-range.entry.js +2 -2
  281. package/dist/esm/six-rating.entry.js +2 -2
  282. package/dist/esm/six-root.entry.js +1 -1
  283. package/dist/esm/six-sidebar-item.entry.js +2 -2
  284. package/dist/esm/six-sidebar.entry.js +2 -2
  285. package/dist/esm/six-switch.entry.js +2 -2
  286. package/dist/esm/six-tab-panel.entry.js +1 -1
  287. package/dist/esm/six-tab.entry.js +2 -2
  288. package/dist/esm/six-tag.entry.js +2 -2
  289. package/dist/esm/six-textarea.entry.js +2 -2
  290. package/dist/esm/six-tile.entry.js +5 -5
  291. package/dist/esm/six-timepicker.entry.js +1 -1
  292. package/dist/esm/six-timepicker.entry.js.map +1 -1
  293. package/dist/esm/six-tooltip.entry.js +2 -2
  294. package/dist/esm/ui-library.js +1 -1
  295. package/dist/types/components/six-breadcrumbs/six-breadcrumbs.d.ts +20 -0
  296. package/dist/types/components/six-breadcrumbs-item/six-breadcrumbs-item.d.ts +27 -0
  297. package/dist/types/components/six-date/iso-date.d.ts +2 -0
  298. package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
  299. package/dist/types/components/six-icon/six-icon.d.ts +17 -0
  300. package/dist/types/components.d.ts +126 -4
  301. package/dist/types/index.d.ts +1 -0
  302. package/dist/types/types.d.ts +1 -0
  303. package/dist/types/utils/icon.d.ts +5 -0
  304. package/dist/ui-library/files/material-symbols-outlined-latin-fill-normal.woff2 +0 -0
  305. package/dist/ui-library/files/material-symbols-outlined-latin-full-normal.woff2 +0 -0
  306. package/dist/ui-library/files/material-symbols-outlined-latin-grad-normal.woff2 +0 -0
  307. package/dist/ui-library/files/material-symbols-outlined-latin-opsz-normal.woff2 +0 -0
  308. package/dist/ui-library/files/material-symbols-outlined-latin-standard-normal.woff2 +0 -0
  309. package/dist/ui-library/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
  310. package/dist/ui-library/files/material-symbols-rounded-latin-fill-normal.woff2 +0 -0
  311. package/dist/ui-library/files/material-symbols-rounded-latin-full-normal.woff2 +0 -0
  312. package/dist/ui-library/files/material-symbols-rounded-latin-grad-normal.woff2 +0 -0
  313. package/dist/ui-library/files/material-symbols-rounded-latin-opsz-normal.woff2 +0 -0
  314. package/dist/ui-library/files/material-symbols-rounded-latin-standard-normal.woff2 +0 -0
  315. package/dist/ui-library/files/material-symbols-rounded-latin-wght-normal.woff2 +0 -0
  316. package/dist/ui-library/files/material-symbols-sharp-latin-fill-normal.woff2 +0 -0
  317. package/dist/ui-library/files/material-symbols-sharp-latin-full-normal.woff2 +0 -0
  318. package/dist/ui-library/files/material-symbols-sharp-latin-grad-normal.woff2 +0 -0
  319. package/dist/ui-library/files/material-symbols-sharp-latin-opsz-normal.woff2 +0 -0
  320. package/dist/ui-library/files/material-symbols-sharp-latin-standard-normal.woff2 +0 -0
  321. package/dist/ui-library/files/material-symbols-sharp-latin-wght-normal.woff2 +0 -0
  322. package/dist/ui-library/index.esm.js +1 -1
  323. package/dist/ui-library/index.esm.js.map +1 -1
  324. package/dist/ui-library/{p-336610a9.entry.js → p-014f44f4.entry.js} +2 -2
  325. package/dist/ui-library/p-014f44f4.entry.js.map +1 -0
  326. package/dist/ui-library/p-05ca516d.entry.js +2 -0
  327. package/dist/ui-library/{p-a43843d6.entry.js → p-06c6b189.entry.js} +2 -2
  328. package/dist/ui-library/{p-850aff56.entry.js → p-12a2cc6b.entry.js} +2 -2
  329. package/dist/ui-library/p-22f924a1.entry.js +2 -0
  330. package/dist/ui-library/{p-f6a1c20b.entry.js → p-26219330.entry.js} +2 -2
  331. package/dist/ui-library/{p-fe7d3665.entry.js → p-29994dc3.entry.js} +2 -2
  332. package/dist/ui-library/{p-d9e770ab.entry.js → p-29aac7ea.entry.js} +2 -2
  333. package/dist/ui-library/p-38c51fd1.entry.js +2 -0
  334. package/dist/ui-library/p-38c51fd1.entry.js.map +1 -0
  335. package/dist/ui-library/{p-c8fbf085.entry.js → p-3c1285ad.entry.js} +2 -2
  336. package/dist/ui-library/{p-5b52d097.entry.js → p-3d9e03b5.entry.js} +2 -2
  337. package/dist/ui-library/{p-1cfa2df4.entry.js → p-4d9785bd.entry.js} +2 -2
  338. package/dist/ui-library/p-4decf969.entry.js +2 -0
  339. package/dist/ui-library/p-4decf969.entry.js.map +1 -0
  340. package/dist/ui-library/{p-c47f11e4.entry.js → p-59568c0f.entry.js} +2 -2
  341. package/dist/ui-library/{p-c47f11e4.entry.js.map → p-59568c0f.entry.js.map} +1 -1
  342. package/dist/ui-library/{p-174dd242.entry.js → p-664ddbab.entry.js} +2 -2
  343. package/dist/ui-library/{p-21cbccb1.entry.js → p-66b94978.entry.js} +2 -2
  344. package/dist/ui-library/{p-371ef302.entry.js → p-66d616e8.entry.js} +2 -2
  345. package/dist/ui-library/{p-811ce2a0.entry.js → p-6cd4fbd8.entry.js} +2 -2
  346. package/dist/ui-library/{p-8884a48b.entry.js → p-70388108.entry.js} +2 -2
  347. package/dist/ui-library/p-72d3f332.entry.js +2 -0
  348. package/dist/ui-library/p-72d3f332.entry.js.map +1 -0
  349. package/dist/ui-library/{p-18e755bc.entry.js → p-7f7413db.entry.js} +2 -2
  350. package/dist/ui-library/p-7f7413db.entry.js.map +1 -0
  351. package/dist/ui-library/{p-3d49deae.entry.js → p-8c2edb7f.entry.js} +2 -2
  352. package/dist/ui-library/{p-65e53a1b.entry.js → p-984a1f6d.entry.js} +2 -2
  353. package/dist/ui-library/{p-03ca4af8.entry.js → p-9b75e009.entry.js} +2 -2
  354. package/dist/ui-library/{p-14f79bfc.entry.js → p-9deca0d0.entry.js} +2 -2
  355. package/dist/ui-library/p-DqHJRLQQ.js +2 -0
  356. package/dist/ui-library/p-DqHJRLQQ.js.map +1 -0
  357. package/dist/ui-library/{p-b6244904.entry.js → p-a6d7d618.entry.js} +2 -2
  358. package/dist/ui-library/p-a7f9c92d.entry.js +2 -0
  359. package/dist/ui-library/{p-09de2bda.entry.js.map → p-a7f9c92d.entry.js.map} +1 -1
  360. package/dist/ui-library/{p-a4b523ed.entry.js → p-aaea0f73.entry.js} +2 -2
  361. package/dist/ui-library/{p-ee980a0f.entry.js → p-bea434d1.entry.js} +2 -2
  362. package/dist/ui-library/{p-83b35622.entry.js → p-ccc7e227.entry.js} +2 -2
  363. package/dist/ui-library/p-cf2fc033.entry.js +2 -0
  364. package/dist/ui-library/p-cf2fc033.entry.js.map +1 -0
  365. package/dist/ui-library/{p-cea7f777.entry.js → p-d81265f4.entry.js} +2 -2
  366. package/dist/ui-library/{p-9ec79195.entry.js → p-da5f40ed.entry.js} +2 -2
  367. package/dist/ui-library/{p-f54d3616.entry.js → p-df2b8f01.entry.js} +2 -2
  368. package/dist/ui-library/p-e100aff2.entry.js +2 -0
  369. package/dist/ui-library/{p-12e7a9e1.entry.js → p-e56c5237.entry.js} +2 -2
  370. package/dist/ui-library/{p-12e7a9e1.entry.js.map → p-e56c5237.entry.js.map} +1 -1
  371. package/dist/ui-library/{p-6c8182fa.entry.js → p-e8e5445e.entry.js} +2 -2
  372. package/dist/ui-library/{p-d7c7398d.entry.js → p-fc2d893f.entry.js} +2 -2
  373. package/dist/ui-library/p-fcd3305f.entry.js +2 -0
  374. package/dist/ui-library/{p-e85be7d2.entry.js.map → p-fcd3305f.entry.js.map} +1 -1
  375. package/dist/ui-library/{p-39668d61.entry.js → p-fd97bc8a.entry.js} +2 -2
  376. package/dist/ui-library/{p-dc2109d2.entry.js → p-fe2ef0a4.entry.js} +2 -2
  377. package/dist/ui-library/six-breadcrumbs-item.entry.esm.js.map +1 -0
  378. package/dist/ui-library/six-breadcrumbs.entry.esm.js.map +1 -0
  379. package/dist/ui-library/six-button.six-spinner.entry.esm.js.map +1 -0
  380. package/dist/ui-library/six-date.entry.esm.js.map +1 -1
  381. package/dist/ui-library/six-datepicker.entry.esm.js.map +1 -1
  382. package/dist/ui-library/six-dropdown.six-menu.entry.esm.js.map +1 -1
  383. package/dist/ui-library/six-icon.entry.esm.js.map +1 -1
  384. package/dist/ui-library/six-timepicker.entry.esm.js.map +1 -1
  385. package/dist/ui-library/ui-library.css +1 -1
  386. package/dist/ui-library/ui-library.esm.js +1 -1
  387. package/package.json +6 -3
  388. package/dist/cjs/six-button.cjs.entry.js.map +0 -1
  389. package/dist/cjs/six-button.entry.cjs.js.map +0 -1
  390. package/dist/cjs/six-spinner.cjs.entry.js +0 -58
  391. package/dist/cjs/six-spinner.cjs.entry.js.map +0 -1
  392. package/dist/cjs/six-spinner.entry.cjs.js.map +0 -1
  393. package/dist/components/p-BSHZAiyG.js +0 -52
  394. package/dist/components/p-BSHZAiyG.js.map +0 -1
  395. package/dist/components/p-BUN8hFmL.js.map +0 -1
  396. package/dist/esm/six-button.entry.js.map +0 -1
  397. package/dist/esm/six-spinner.entry.js +0 -56
  398. package/dist/esm/six-spinner.entry.js.map +0 -1
  399. package/dist/ui-library/p-09de2bda.entry.js +0 -2
  400. package/dist/ui-library/p-18e755bc.entry.js.map +0 -1
  401. package/dist/ui-library/p-2a82de6c.entry.js +0 -2
  402. package/dist/ui-library/p-2a82de6c.entry.js.map +0 -1
  403. package/dist/ui-library/p-2fb16281.entry.js +0 -2
  404. package/dist/ui-library/p-2fb16281.entry.js.map +0 -1
  405. package/dist/ui-library/p-31c5f8fa.entry.js +0 -2
  406. package/dist/ui-library/p-336610a9.entry.js.map +0 -1
  407. package/dist/ui-library/p-3dc98466.entry.js +0 -2
  408. package/dist/ui-library/p-3dc98466.entry.js.map +0 -1
  409. package/dist/ui-library/p-c90a59fc.entry.js +0 -2
  410. package/dist/ui-library/p-e85be7d2.entry.js +0 -2
  411. package/dist/ui-library/p-ea3bf68d.entry.js +0 -2
  412. package/dist/ui-library/six-button.entry.esm.js.map +0 -1
  413. package/dist/ui-library/six-spinner.entry.esm.js.map +0 -1
  414. /package/dist/ui-library/{p-31c5f8fa.entry.js.map → p-05ca516d.entry.js.map} +0 -0
  415. /package/dist/ui-library/{p-a43843d6.entry.js.map → p-06c6b189.entry.js.map} +0 -0
  416. /package/dist/ui-library/{p-850aff56.entry.js.map → p-12a2cc6b.entry.js.map} +0 -0
  417. /package/dist/ui-library/{p-c90a59fc.entry.js.map → p-22f924a1.entry.js.map} +0 -0
  418. /package/dist/ui-library/{p-f6a1c20b.entry.js.map → p-26219330.entry.js.map} +0 -0
  419. /package/dist/ui-library/{p-fe7d3665.entry.js.map → p-29994dc3.entry.js.map} +0 -0
  420. /package/dist/ui-library/{p-d9e770ab.entry.js.map → p-29aac7ea.entry.js.map} +0 -0
  421. /package/dist/ui-library/{p-c8fbf085.entry.js.map → p-3c1285ad.entry.js.map} +0 -0
  422. /package/dist/ui-library/{p-5b52d097.entry.js.map → p-3d9e03b5.entry.js.map} +0 -0
  423. /package/dist/ui-library/{p-1cfa2df4.entry.js.map → p-4d9785bd.entry.js.map} +0 -0
  424. /package/dist/ui-library/{p-174dd242.entry.js.map → p-664ddbab.entry.js.map} +0 -0
  425. /package/dist/ui-library/{p-21cbccb1.entry.js.map → p-66b94978.entry.js.map} +0 -0
  426. /package/dist/ui-library/{p-371ef302.entry.js.map → p-66d616e8.entry.js.map} +0 -0
  427. /package/dist/ui-library/{p-811ce2a0.entry.js.map → p-6cd4fbd8.entry.js.map} +0 -0
  428. /package/dist/ui-library/{p-8884a48b.entry.js.map → p-70388108.entry.js.map} +0 -0
  429. /package/dist/ui-library/{p-3d49deae.entry.js.map → p-8c2edb7f.entry.js.map} +0 -0
  430. /package/dist/ui-library/{p-65e53a1b.entry.js.map → p-984a1f6d.entry.js.map} +0 -0
  431. /package/dist/ui-library/{p-03ca4af8.entry.js.map → p-9b75e009.entry.js.map} +0 -0
  432. /package/dist/ui-library/{p-14f79bfc.entry.js.map → p-9deca0d0.entry.js.map} +0 -0
  433. /package/dist/ui-library/{p-b6244904.entry.js.map → p-a6d7d618.entry.js.map} +0 -0
  434. /package/dist/ui-library/{p-a4b523ed.entry.js.map → p-aaea0f73.entry.js.map} +0 -0
  435. /package/dist/ui-library/{p-ee980a0f.entry.js.map → p-bea434d1.entry.js.map} +0 -0
  436. /package/dist/ui-library/{p-83b35622.entry.js.map → p-ccc7e227.entry.js.map} +0 -0
  437. /package/dist/ui-library/{p-cea7f777.entry.js.map → p-d81265f4.entry.js.map} +0 -0
  438. /package/dist/ui-library/{p-9ec79195.entry.js.map → p-da5f40ed.entry.js.map} +0 -0
  439. /package/dist/ui-library/{p-f54d3616.entry.js.map → p-df2b8f01.entry.js.map} +0 -0
  440. /package/dist/ui-library/{p-ea3bf68d.entry.js.map → p-e100aff2.entry.js.map} +0 -0
  441. /package/dist/ui-library/{p-6c8182fa.entry.js.map → p-e8e5445e.entry.js.map} +0 -0
  442. /package/dist/ui-library/{p-d7c7398d.entry.js.map → p-fc2d893f.entry.js.map} +0 -0
  443. /package/dist/ui-library/{p-39668d61.entry.js.map → p-fd97bc8a.entry.js.map} +0 -0
  444. /package/dist/ui-library/{p-dc2109d2.entry.js.map → p-fe2ef0a4.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"six-timepicker.js","sourceRoot":"","sources":["../../../src/components/six-timepicker/six-timepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAIhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAEhH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkBtE,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,aAAa;IAL1B;QAMU,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QAO9C;;;;;;;;;;;;;;;;;;;;aAoBK;QACG,WAAM,GAAe,UAAU,CAAC;QAExC;;;;aAIK;QACG,cAAS,GAAG,GAAG,CAAC;QAExB;;WAEG;QACsB,UAAK,GAAG,EAAE,CAAC;QAEpC,uHAAuH;QAC/E,SAAI,GAAG,KAAK,CAAC;QAErD,4FAA4F;QACnE,WAAM,GAAG,KAAK,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CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerType } from '../six-item-picker/types';\nimport {\n createTimeString,\n getCurrentTime,\n isValidTimeString,\n parseTimeString,\n Time,\n TimeFormat,\n TimeProperties,\n} from '../../utils/time.util';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { SixItemPickerChangePayload } from '../six-item-picker/six-item-picker';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { adjustPopupForHoisting, movePopup } from '../../utils/popup';\n\nexport interface SixTimepickerChange {\n value?: Time;\n valueAsString: string;\n changedProperty?: string;\n}\n\ninterface SixTimeUnitPickerParams {\n min?: number;\n max?: number;\n items?: string[];\n type?: ItemPickerType;\n class?: string;\n paddingLength?: number;\n propertyName: TimeProperties;\n}\n\nconst MIN_POPUP_HEIGHT = 145;\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part input - The input field\n * @part container - The container of whole component\n * @part popup - The popup of the timepicker component\n *\n */\n@Component({\n tag: 'six-timepicker',\n styleUrl: 'six-timepicker.scss',\n shadow: true,\n})\nexport class SixTimepicker {\n private eventListeners = new EventListeners();\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private inputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixTimepickerElement;\n\n /**\n * Define the time format. Valid formats are:\n *\n * HH:mm:ss\n * hh:mm:ss:aa\n * HH:mm:ss:ms\n * hh:mm:ss:ms:aa\n * HH:mm\n * hh:mm:aa\n * HH\n * hh:aa\n * mm\n * ss\n * ms\n *\n * where HH is the 24 hour format\n * and hh is the 12 hour format\n *\n * Please notice that when using the 12-hour-clock (hh)\n * you always need a period indicator (aa). So the time can be parsed as either am or pm\n * */\n @Prop() format: TimeFormat = 'HH:mm:ss';\n\n /**\n * Define the separator to be shown between the time unit pickers.\n * Please be aware that this property will modify the displayed separator only.\n * The separator for a timestring is always expected to be a colon (eg. '13:52:20')\n * */\n @Prop() separator = ':';\n\n /**\n * The value of the timepicker provided as a string. The string mast match the provided format (or default format)\n */\n @Prop({ mutable: true }) value = '';\n\n /** Indicates whether the timepicker dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether the timepicker should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a time via the timepicker but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Timepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between timeunits (e.g. hours).\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next timeunit (e.g. next hour) when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * The defaultTime defines the default setting for the timepicker when you open the popup. Default time must match the provided format.\n */\n @Prop() defaultTime?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-timepicker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Emitted when the timepicker's value changes\n */\n @Event({ eventName: 'six-timepicker-change' }) sixChange!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the timepicker's value changes, but debounced\n */\n @Event({ eventName: 'six-timepicker-change-debounced' }) sixChangeDebounced!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-timepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n @State() isPopupContentUp = false;\n\n @State() isDropDownContentUp = false;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.updateValue();\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n /*\n * Internally the six-timepicker uses a standardized representation of time, so we don't have a mess,\n * when switching between formats\n */\n @State() private popupValue: Time = {};\n\n connectedCallback() {\n this.eventListeners.forward('six-timepicker-change', 'change', this.host);\n }\n\n componentWillLoad() {\n this.updateValue();\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n componentDidLoad() {\n if (this.inputElement == null) return;\n const inputElement = this.inputElement;\n\n // emit debounced change event\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce((event: Event) => this.sixChangeDebounced.emit((event as CustomEvent).detail), this.debounce)\n );\n\n // update value and popup value based on input-element value\n this.eventListeners.add(\n inputElement,\n 'six-input-input',\n debounce((event: Event) => {\n event.stopPropagation();\n\n // emit empty event if time string is invalid\n if (!isValidTimeString(inputElement.value, this.format)) {\n this.value = inputElement.value;\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n return;\n } else {\n // update value and popup value and emit the new value\n this.value = inputElement.value;\n this.popupValue = parseTimeString(inputElement.value, this.format);\n this.sixChange.emit({\n value: this.popupValue,\n valueAsString: createTimeString(this.popupValue, this.format),\n });\n }\n }, this.debounce)\n );\n }\n\n componentDidRender() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n private updateValue() {\n // normalize value\n if (typeof this.value !== 'string' || !isValidTimeString(this.value, this.format)) {\n this.value = '';\n } else if (this.inputElement != null) {\n this.inputElement.value = this.value;\n }\n\n // update popup value\n if (this.value === '') {\n if (this.defaultTime == null) {\n this.popupValue = getCurrentTime(this.is24HourClock());\n } else {\n this.popupValue = parseTimeString(this.defaultTime, this.format);\n }\n } else {\n this.popupValue = parseTimeString(this.value, this.format);\n }\n }\n\n private calcIsPopupContentUp() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isPopupContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private handlePickerChange = (event: CustomEvent<SixItemPickerChangePayload>, property: TimeProperties) => {\n // stop propagation, since the timepicker should not expose the events of the underlying item-picker\n event.stopPropagation();\n if (this.popupValue == null) {\n return;\n }\n\n // update the internal state\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.popupValue[property] = event.detail;\n\n const timeString = createTimeString(this.popupValue, this.format);\n\n // update the input value\n this.value = timeString;\n\n // emit change event\n this.sixChange.emit({\n changedProperty: property,\n value: this.popupValue,\n valueAsString: timeString,\n });\n };\n\n private getSixTimeUnitPicker(params: SixTimeUnitPickerParams) {\n return (\n <six-item-picker\n class={params.class}\n timeout={this.timeout}\n interval={this.interval}\n padded\n min={params.min}\n max={params.max}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value={this.popupValue[params.propertyName]}\n items={params.items}\n type={params.type || ItemPickerType.NUMBER}\n padding-length={params.paddingLength}\n onSix-item-picker-change={(event) => this.handlePickerChange(event, params.propertyName)}\n ></six-item-picker>\n );\n }\n\n private getHour24Picker() {\n if (!this.is24HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 23, propertyName: 'hours' });\n }\n\n private is24HourClock() {\n return this.format.includes('HH');\n }\n\n private getHour12Picker() {\n if (!this.is12HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 11, propertyName: 'hours' });\n }\n\n private is12HourClock() {\n return this.format.includes('hh');\n }\n\n private getAmPmPicker() {\n if (!this.is12HourClock()) {\n return;\n }\n const items = ['AM', 'PM'];\n return this.getSixTimeUnitPicker({\n items,\n type: ItemPickerType.CUSTOM,\n propertyName: 'period',\n });\n }\n\n private getMinutePicker() {\n if (!this.format.includes('mm')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'minutes' });\n }\n\n private getSecondsPicker() {\n if (!this.format.includes('ss')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'seconds' });\n }\n\n private getMillisecondsPicker() {\n if (!this.format.includes('ms')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({\n min: 0,\n max: 999,\n class: 'timepicker__item--wide',\n paddingLength: 3,\n propertyName: 'milliseconds',\n });\n }\n\n private getSeparator() {\n return (\n <div class=\"timepicker__separator\">\n <span>{this.separator}</span>\n </div>\n );\n }\n\n private getContent() {\n const elementsInOrder = [\n this.getHour24Picker(),\n this.getHour12Picker(),\n this.getMinutePicker(),\n this.getSecondsPicker(),\n this.getMillisecondsPicker(),\n ];\n\n const visibleElements = elementsInOrder.filter((el) => el !== undefined);\n\n return visibleElements.map((el, idx) => {\n if (idx === visibleElements.length - 1) {\n return [el];\n }\n\n return [el, this.getSeparator()];\n });\n }\n\n private openPopup() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.host)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = (event: MouseEvent) => {\n event.stopPropagation();\n if (this.inputElement != null) {\n this.inputElement.value = '';\n }\n this.value = '';\n this.sixClear.emit();\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n };\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n timepicker_clear: true,\n 'timepicker_clear--right': this.iconPosition === 'left',\n 'timepicker_clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>watch_later</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n render() {\n return (\n <div part=\"container\" ref={(el) => (this.wrapper = el)} class=\"timepicker__container\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n part=\"input\"\n onClick={() => this.openPopup()}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n errorTextCount={this.errorTextCount}\n errorText={this.errorText}\n invalid={this.invalid}\n size={this.size}\n name={this.name}\n label={this.label}\n required={this.required}\n class={{\n 'input--empty': this.value === '',\n 'input--hide': this.inline,\n }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n ref={(el) => (this.popup = el)}\n part=\"popup\"\n class={{\n timepicker__popup: true,\n 'timepicker__popup--is-up': this.placement == null ? this.placement === 'top' : this.isPopupContentUp,\n 'timepicker__popup--is-inline': this.inline,\n }}\n >\n {...this.getContent()}\n {this.getAmPmPicker()}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-timepicker.js","sourceRoot":"","sources":["../../../src/components/six-timepicker/six-timepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAIhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAEhH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkBtE,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,aAAa;IAL1B;QAMU,m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,0BAA0B,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,KAAK;oBACrG,8BAA8B,EAAE,IAAI,CAAC,MAAM;iBAC5C;mBAEG,IAAI,CAAC,UAAU,EAAE;gBACpB,IAAI,CAAC,aAAa,EAAE,CACjB,CACP,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerType } from '../six-item-picker/types';\nimport {\n createTimeString,\n getCurrentTime,\n isValidTimeString,\n parseTimeString,\n Time,\n TimeFormat,\n TimeProperties,\n} from '../../utils/time.util';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { SixItemPickerChangePayload } from '../six-item-picker/six-item-picker';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { adjustPopupForHoisting, movePopup } from '../../utils/popup';\n\nexport interface SixTimepickerChange {\n value?: Time;\n valueAsString: string;\n changedProperty?: string;\n}\n\ninterface SixTimeUnitPickerParams {\n min?: number;\n max?: number;\n items?: string[];\n type?: ItemPickerType;\n class?: string;\n paddingLength?: number;\n propertyName: TimeProperties;\n}\n\nconst MIN_POPUP_HEIGHT = 145;\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part input - The input field\n * @part container - The container of whole component\n * @part popup - The popup of the timepicker component\n *\n */\n@Component({\n tag: 'six-timepicker',\n styleUrl: 'six-timepicker.scss',\n shadow: true,\n})\nexport class SixTimepicker {\n private eventListeners = new EventListeners();\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private inputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixTimepickerElement;\n\n /**\n * Define the time format. Valid formats are:\n *\n * HH:mm:ss\n * hh:mm:ss:aa\n * HH:mm:ss:ms\n * hh:mm:ss:ms:aa\n * HH:mm\n * hh:mm:aa\n * HH\n * hh:aa\n * mm\n * ss\n * ms\n *\n * where HH is the 24 hour format\n * and hh is the 12 hour format\n *\n * Please notice that when using the 12-hour-clock (hh)\n * you always need a period indicator (aa). So the time can be parsed as either am or pm\n * */\n @Prop() format: TimeFormat = 'HH:mm:ss';\n\n /**\n * Define the separator to be shown between the time unit pickers.\n * Please be aware that this property will modify the displayed separator only.\n * The separator for a timestring is always expected to be a colon (eg. '13:52:20')\n * */\n @Prop() separator = ':';\n\n /**\n * The value of the timepicker provided as a string. The string mast match the provided format (or default format)\n */\n @Prop({ mutable: true }) value = '';\n\n /** Indicates whether the timepicker dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether the timepicker should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a time via the timepicker but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Timepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between timeunits (e.g. hours).\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next timeunit (e.g. next hour) when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * The defaultTime defines the default setting for the timepicker when you open the popup. Default time must match the provided format.\n */\n @Prop() defaultTime?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-timepicker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Emitted when the timepicker's value changes\n */\n @Event({ eventName: 'six-timepicker-change' }) sixChange!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the timepicker's value changes, but debounced\n */\n @Event({ eventName: 'six-timepicker-change-debounced' }) sixChangeDebounced!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-timepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n @State() isPopupContentUp = false;\n\n @State() isDropDownContentUp = false;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.updateValue();\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n /*\n * Internally the six-timepicker uses a standardized representation of time, so we don't have a mess,\n * when switching between formats\n */\n @State() private popupValue: Time = {};\n\n connectedCallback() {\n this.eventListeners.forward('six-timepicker-change', 'change', this.host);\n }\n\n componentWillLoad() {\n this.updateValue();\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n componentDidLoad() {\n if (this.inputElement == null) return;\n const inputElement = this.inputElement;\n\n // emit debounced change event\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce((event: Event) => this.sixChangeDebounced.emit((event as CustomEvent).detail), this.debounce)\n );\n\n // update value and popup value based on input-element value\n this.eventListeners.add(\n inputElement,\n 'six-input-input',\n debounce((event: Event) => {\n event.stopPropagation();\n\n // emit empty event if time string is invalid\n if (!isValidTimeString(inputElement.value, this.format)) {\n this.value = inputElement.value;\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n return;\n } else {\n // update value and popup value and emit the new value\n this.value = inputElement.value;\n this.popupValue = parseTimeString(inputElement.value, this.format);\n this.sixChange.emit({\n value: this.popupValue,\n valueAsString: createTimeString(this.popupValue, this.format),\n });\n }\n }, this.debounce)\n );\n }\n\n componentDidRender() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n private updateValue() {\n // normalize value\n if (typeof this.value !== 'string' || !isValidTimeString(this.value, this.format)) {\n this.value = '';\n } else if (this.inputElement != null) {\n this.inputElement.value = this.value;\n }\n\n // update popup value\n if (this.value === '') {\n if (this.defaultTime == null) {\n this.popupValue = getCurrentTime(this.is24HourClock());\n } else {\n this.popupValue = parseTimeString(this.defaultTime, this.format);\n }\n } else {\n this.popupValue = parseTimeString(this.value, this.format);\n }\n }\n\n private calcIsPopupContentUp() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isPopupContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private handlePickerChange = (event: CustomEvent<SixItemPickerChangePayload>, property: TimeProperties) => {\n // stop propagation, since the timepicker should not expose the events of the underlying item-picker\n event.stopPropagation();\n if (this.popupValue == null) {\n return;\n }\n\n // update the internal state\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.popupValue[property] = event.detail;\n\n const timeString = createTimeString(this.popupValue, this.format);\n\n // update the input value\n this.value = timeString;\n\n // emit change event\n this.sixChange.emit({\n changedProperty: property,\n value: this.popupValue,\n valueAsString: timeString,\n });\n };\n\n private getSixTimeUnitPicker(params: SixTimeUnitPickerParams) {\n return (\n <six-item-picker\n class={params.class}\n timeout={this.timeout}\n interval={this.interval}\n padded\n min={params.min}\n max={params.max}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value={this.popupValue[params.propertyName]}\n items={params.items}\n type={params.type || ItemPickerType.NUMBER}\n padding-length={params.paddingLength}\n onSix-item-picker-change={(event) => this.handlePickerChange(event, params.propertyName)}\n ></six-item-picker>\n );\n }\n\n private getHour24Picker() {\n if (!this.is24HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 23, propertyName: 'hours' });\n }\n\n private is24HourClock() {\n return this.format.includes('HH');\n }\n\n private getHour12Picker() {\n if (!this.is12HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 11, propertyName: 'hours' });\n }\n\n private is12HourClock() {\n return this.format.includes('hh');\n }\n\n private getAmPmPicker() {\n if (!this.is12HourClock()) {\n return;\n }\n const items = ['AM', 'PM'];\n return this.getSixTimeUnitPicker({\n items,\n type: ItemPickerType.CUSTOM,\n propertyName: 'period',\n });\n }\n\n private getMinutePicker() {\n if (!this.format.includes('mm')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'minutes' });\n }\n\n private getSecondsPicker() {\n if (!this.format.includes('ss')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'seconds' });\n }\n\n private getMillisecondsPicker() {\n if (!this.format.includes('ms')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({\n min: 0,\n max: 999,\n class: 'timepicker__item--wide',\n paddingLength: 3,\n propertyName: 'milliseconds',\n });\n }\n\n private getSeparator() {\n return (\n <div class=\"timepicker__separator\">\n <span>{this.separator}</span>\n </div>\n );\n }\n\n private getContent() {\n const elementsInOrder = [\n this.getHour24Picker(),\n this.getHour12Picker(),\n this.getMinutePicker(),\n this.getSecondsPicker(),\n this.getMillisecondsPicker(),\n ];\n\n const visibleElements = elementsInOrder.filter((el) => el !== undefined);\n\n return visibleElements.map((el, idx) => {\n if (idx === visibleElements.length - 1) {\n return [el];\n }\n\n return [el, this.getSeparator()];\n });\n }\n\n private openPopup() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.host)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = (event: MouseEvent) => {\n event.stopPropagation();\n if (this.inputElement != null) {\n this.inputElement.value = '';\n }\n this.value = '';\n this.sixClear.emit();\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n };\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n timepicker_clear: true,\n 'timepicker_clear--right': this.iconPosition === 'left',\n 'timepicker_clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>watch_later</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n render() {\n return (\n <div part=\"container\" ref={(el) => (this.wrapper = el)} class=\"timepicker__container\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n part=\"input\"\n onClick={() => this.openPopup()}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n errorTextCount={this.errorTextCount}\n errorText={this.errorText}\n invalid={this.invalid}\n size={this.size}\n name={this.name}\n label={this.label}\n required={this.required}\n class={{\n 'input--empty': this.value === '',\n 'input--hide': this.inline,\n }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n ref={(el) => (this.popup = el)}\n part=\"popup\"\n class={{\n timepicker__popup: true,\n 'timepicker__popup--is-up': this.placement == null ? this.isPopupContentUp : this.placement === 'top',\n 'timepicker__popup--is-inline': this.inline,\n }}\n >\n {...this.getContent()}\n {this.getAmPmPicker()}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
@@ -166,10 +166,10 @@ export class SixTooltip {
166
166
  });
167
167
  }
168
168
  render() {
169
- return (h(Host, { key: '749a6d5edac438b4ff3bd9a34402823156417b37', onKeyDown: this.handleKeyDown, onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut }, h("slot", { key: 'f505a21b6cfa2362537b54a7c2a5d92750a688b5', onSlotchange: this.handleSlotChange }), h("div", { key: '4c38a6ff56ea7b6a121e59fd406728d9af71712e', ref: (el) => (this.tooltipPositioner = el), class: "tooltip-positioner" }, h("div", { key: '1df2f66d1bbae1aeb864d23d91e9094ab950ff79', part: "base", ref: (el) => (this.tooltip = el), id: this.componentId, class: {
169
+ return (h(Host, { key: 'b0af2fbdb52310c71513aa84d92d3a280e41aaf9', onKeyDown: this.handleKeyDown, onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut }, h("slot", { key: '819d560b1d211a091a625cd031d3b24b8c48746c', onSlotchange: this.handleSlotChange }), h("div", { key: 'fdae79b137b1e736a178b53b4f4ba10259104315', ref: (el) => (this.tooltipPositioner = el), class: "tooltip-positioner" }, h("div", { key: '7b5c975bfd60386d4223487658958f64c63eb11c', part: "base", ref: (el) => (this.tooltip = el), id: this.componentId, class: {
170
170
  tooltip: true,
171
171
  'tooltip--open': this.open,
172
- }, role: "tooltip", "aria-hidden": this.open ? 'false' : 'true' }, h("slot", { key: 'cc4a2c0d99ae6f16058ac19cef27b7dd66c33bed', name: "content" }, this.content)))));
172
+ }, role: "tooltip", "aria-hidden": this.open ? 'false' : 'true' }, h("slot", { key: 'ebe137a1e3306b9e66ff522fd6a4b1927340f399', name: "content" }, this.content)))));
173
173
  }
174
174
  static get is() { return "six-tooltip"; }
175
175
  static get encapsulation() { return "shadow"; }
@@ -1,3 +1,4 @@
1
1
  export * from './utils/error-messages';
2
2
  export * from './utils/alert';
3
+ export * from './utils/icon';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC","sourcesContent":["export { Components, JSX } from './components';\nexport * from './utils/error-messages';\nexport * from './utils/alert';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAE9B,cAAc,cAAc,CAAC","sourcesContent":["export { Components, JSX } from './components';\nexport * from './utils/error-messages';\nexport * from './utils/alert';\n\nexport * from './utils/icon';\n"]}
@@ -0,0 +1,10 @@
1
+ let defaultLibrary = 'material-icons';
2
+ /** Sets the global default for all <six-icon> instances that don't specify `library`. */
3
+ export function setDefaultIconLibrary(lib) {
4
+ defaultLibrary = lib;
5
+ }
6
+ /** Returns the global default (fallback is 'material-icons'). */
7
+ export function getDefaultIconLibrary() {
8
+ return defaultLibrary;
9
+ }
10
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/utils/icon.ts"],"names":[],"mappings":"AAEA,IAAI,cAAc,GAAgB,gBAAgB,CAAC;AAEnD,yFAAyF;AACzF,MAAM,UAAU,qBAAqB,CAAC,GAAgB;IACpD,cAAc,GAAG,GAAG,CAAC;AACvB,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,qBAAqB;IACnC,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["export type IconLibrary = 'material-icons' | 'material-symbols';\n\nlet defaultLibrary: IconLibrary = 'material-icons';\n\n/** Sets the global default for all <six-icon> instances that don't specify `library`. */\nexport function setDefaultIconLibrary(lib: IconLibrary) {\n defaultLibrary = lib;\n}\n\n/** Returns the global default (fallback is 'material-icons'). */\nexport function getDefaultIconLibrary(): IconLibrary {\n return defaultLibrary;\n}\n"]}
@@ -1,6 +1,8 @@
1
1
  import { SixAlert } from './six-alert.js';
2
2
  import { SixAvatar } from './six-avatar.js';
3
3
  import { SixBadge } from './six-badge.js';
4
+ import { SixBreadcrumbs } from './six-breadcrumbs.js';
5
+ import { SixBreadcrumbsItem } from './six-breadcrumbs-item.js';
4
6
  import { SixButton } from './six-button.js';
5
7
  import { SixCard } from './six-card.js';
6
8
  import { SixCheckbox } from './six-checkbox.js';
@@ -58,6 +60,7 @@ import { SixTile } from './six-tile.js';
58
60
  import { SixTimepicker } from './six-timepicker.js';
59
61
  import { SixTooltip } from './six-tooltip.js';
60
62
  export { g as getAssetPath, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-D512q9rn.js';
63
+ export { g as getDefaultIconLibrary, s as setDefaultIconLibrary } from './p-CT4IVFqs.js';
61
64
 
62
65
  /**
63
66
  * Displays an alert on the toast stack with a specified message and optional configuration.
@@ -119,6 +122,8 @@ const defineCustomElements = (opts) => {
119
122
  SixAlert,
120
123
  SixAvatar,
121
124
  SixBadge,
125
+ SixBreadcrumbs,
126
+ SixBreadcrumbsItem,
122
127
  SixButton,
123
128
  SixCard,
124
129
  SixCheckbox,
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;AAOG;AACG,SAAU,SAAS,CAAC,OAAe,EAAE,SAAqB,EAAE,QAAiB,EAAE,QAAiB,EAAA;IACpG,MAAM,IAAI,GAAG,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,MAAA,GAAA,SAAS,GAAI,MAAM;AAChC,IAAA,MAAM,IAAI,GAAG,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAR,QAAQ,GAAI,OAAO,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;QAC/D,IAAI;QACJ,QAAQ,EAAE,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAR,QAAQ,GAAI,WAAW,CAAC,IAAI,CAAC;QACvC,SAAS,EAAE,yBAAyB,IAAI,CAAA,WAAA,EAAc,UAAU,CAAC,OAAO,CAAC,CAAE,CAAA;AAC3E,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AACF,IAAA,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,KAAK,CAAC,KAAK,EAAE;AACf;AAEA,SAAS,UAAU,CAAC,IAAY,EAAA;IAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACzC,IAAA,GAAG,CAAC,WAAW,GAAG,IAAI;IACtB,OAAO,GAAG,CAAC,SAAS;AACtB;AAEA,SAAS,OAAO,CAAC,WAAsB,EAAA;IACrC,QAAQ,WAAW;AACjB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,MAAM;AACf,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,MAAM;AACf,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,cAAc;AACvB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,SAAS;AAClB,QAAA,KAAK,QAAQ;AACX,YAAA,OAAO,QAAQ;;AAErB;AAEA,SAAS,WAAW,CAAC,WAAsB,EAAA;IACzC,QAAQ,WAAW;AACjB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,QAAQ;AACX,YAAA,OAAO,KAAK;;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/alert.ts"],"sourcesContent":["import { AlertType } from '../components/six-alert/six-alert';\n\n/**\n * Displays an alert on the toast stack with a specified message and optional configuration.\n *\n * @param message - The message to be displayed in the alert.\n * @param alertType - The type of the alert. Valid values are 'primary', 'info', 'success', 'warning', 'danger'. Default is 'info'.\n * @param duration - The duration in milliseconds for which the alert is displayed. If not provided, a default duration is set based on the alert type.\n * @param iconName - The name of the icon to be displayed in the alert. If not provided, a default icon is set based on the alert type.\n */\nexport function showAlert(message: string, alertType?: AlertType, duration?: number, iconName?: string): void {\n const type = alertType ?? 'info';\n const icon = iconName ?? getIcon(type);\n const alert = Object.assign(document.createElement('six-alert'), {\n type,\n duration: duration ?? getDuration(type),\n innerHTML: `<six-icon slot=\"icon\">${icon}</six-icon>${escapeHtml(message)}`,\n closable: true,\n });\n document.body.append(alert);\n alert.toast();\n}\n\nfunction escapeHtml(html: string): string {\n const div = document.createElement('div');\n div.textContent = html;\n return div.innerHTML;\n}\n\nfunction getIcon(messageType: AlertType): string {\n switch (messageType) {\n case 'primary':\n return 'info';\n case 'info':\n return 'info';\n case 'success':\n return 'check_circle';\n case 'warning':\n return 'warning';\n case 'danger':\n return 'report';\n }\n}\n\nfunction getDuration(messageType: AlertType): number {\n switch (messageType) {\n case 'primary':\n return 10000;\n case 'info':\n return 10000;\n case 'success':\n return 10000;\n case 'warning':\n return 20000;\n case 'danger':\n return 20000;\n }\n}\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;AAOG;AACG,SAAU,SAAS,CAAC,OAAe,EAAE,SAAqB,EAAE,QAAiB,EAAE,QAAiB,EAAA;IACpG,MAAM,IAAI,GAAG,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,MAAA,GAAA,SAAS,GAAI,MAAM;AAChC,IAAA,MAAM,IAAI,GAAG,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAR,QAAQ,GAAI,OAAO,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;QAC/D,IAAI;QACJ,QAAQ,EAAE,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAR,QAAQ,GAAI,WAAW,CAAC,IAAI,CAAC;QACvC,SAAS,EAAE,yBAAyB,IAAI,CAAA,WAAA,EAAc,UAAU,CAAC,OAAO,CAAC,CAAE,CAAA;AAC3E,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AACF,IAAA,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,KAAK,CAAC,KAAK,EAAE;AACf;AAEA,SAAS,UAAU,CAAC,IAAY,EAAA;IAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACzC,IAAA,GAAG,CAAC,WAAW,GAAG,IAAI;IACtB,OAAO,GAAG,CAAC,SAAS;AACtB;AAEA,SAAS,OAAO,CAAC,WAAsB,EAAA;IACrC,QAAQ,WAAW;AACjB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,MAAM;AACf,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,MAAM;AACf,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,cAAc;AACvB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,SAAS;AAClB,QAAA,KAAK,QAAQ;AACX,YAAA,OAAO,QAAQ;;AAErB;AAEA,SAAS,WAAW,CAAC,WAAsB,EAAA;IACzC,QAAQ,WAAW;AACjB,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,SAAS;AACZ,YAAA,OAAO,KAAK;AACd,QAAA,KAAK,QAAQ;AACX,YAAA,OAAO,KAAK;;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/alert.ts"],"sourcesContent":["import { AlertType } from '../components/six-alert/six-alert';\n\n/**\n * Displays an alert on the toast stack with a specified message and optional configuration.\n *\n * @param message - The message to be displayed in the alert.\n * @param alertType - The type of the alert. Valid values are 'primary', 'info', 'success', 'warning', 'danger'. Default is 'info'.\n * @param duration - The duration in milliseconds for which the alert is displayed. If not provided, a default duration is set based on the alert type.\n * @param iconName - The name of the icon to be displayed in the alert. If not provided, a default icon is set based on the alert type.\n */\nexport function showAlert(message: string, alertType?: AlertType, duration?: number, iconName?: string): void {\n const type = alertType ?? 'info';\n const icon = iconName ?? getIcon(type);\n const alert = Object.assign(document.createElement('six-alert'), {\n type,\n duration: duration ?? getDuration(type),\n innerHTML: `<six-icon slot=\"icon\">${icon}</six-icon>${escapeHtml(message)}`,\n closable: true,\n });\n document.body.append(alert);\n alert.toast();\n}\n\nfunction escapeHtml(html: string): string {\n const div = document.createElement('div');\n div.textContent = html;\n return div.innerHTML;\n}\n\nfunction getIcon(messageType: AlertType): string {\n switch (messageType) {\n case 'primary':\n return 'info';\n case 'info':\n return 'info';\n case 'success':\n return 'check_circle';\n case 'warning':\n return 'warning';\n case 'danger':\n return 'report';\n }\n}\n\nfunction getDuration(messageType: AlertType): number {\n switch (messageType) {\n case 'primary':\n return 10000;\n case 'info':\n return 10000;\n case 'success':\n return 10000;\n case 'warning':\n return 20000;\n case 'danger':\n return 20000;\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-D512q9rn.js';
2
2
  import { f as focusVisible } from './p-Vw_F19Fv.js';
3
- import { d as defineCustomElement$1 } from './p-BSHZAiyG.js';
3
+ import { d as defineCustomElement$1 } from './p-CT4IVFqs.js';
4
4
 
5
5
  const sixDetailsCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host{--hide-duration:var(--six-transition-medium);--hide-timing-function:ease;--show-duration:var(--six-transition-medium);--show-timing-function:ease;--horizontal-padding:var(--six-spacing-medium);font-family:var(--six-font-family);display:block}.details{border:solid var(--six-border-width) var(--six-input-border-color);border-radius:var(--six-border-radius-medium);color:var(--six-details-color);overflow-anchor:none;font-size:var(--six-input-font-size-medium)}.details:hover:not(.details--disabled):not(.details--open){border-color:var(--six-input-border-color-hover)}.details.inline{border:none;color:var(--six-sidebar-color)}.details.inline:hover{background-color:var(--six-sidebar-hover-background-color)}.details.inline.details--open{background-color:var(--six-color-web-rock-50)}.details.inline.details--open:hover{border:none;box-shadow:none}.details.inline.details--open>.details__header{color:var(--six-sidebar-color);font-weight:var(--six-font-weight-bold);background-color:var(--six-sidebar-header-background-color)}.details--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);color:var(--six-input-color-disabled)}.details__header{display:flex;align-items:center;border-radius:inherit;padding:var(--six-spacing-medium) var(--horizontal-padding);user-select:none;cursor:pointer}.details__header:focus{outline:none}.details--disabled .details__header{cursor:not-allowed;border-width:1px}.details--disabled .details__header:focus{outline:none;box-shadow:none}.details__summary{flex:1 1 auto;display:flex;align-items:center}.details__summary-icon{flex:0 0 auto;display:flex;align-items:center;font-size:1.2em;transition:var(--six-transition-medium) transform ease}.details--open .details__summary-icon--animate{transform:rotate(-180deg)}.details__body{height:0;overflow:hidden;transition-property:height;transition-duration:var(--hide-duration);transition-timing-function:var(--hide-timing-function)}.details--open .details__body{transition-duration:var(--show-duration);transition-timing-function:var(--show-timing-function)}.details__content{padding:var(--six-spacing-medium)}";
6
6
 
@@ -132,15 +132,15 @@ const SixDetails = /*@__PURE__*/ proxyCustomElement(class SixDetails extends H {
132
132
  }
133
133
  render() {
134
134
  const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');
135
- return (h("div", { key: 'faed14eb237bca80205f5d2f3c03e0aa2be2aa8a', ref: (el) => (this.details = el), part: "base", class: {
135
+ return (h("div", { key: '27ca22526d4341950e4db0d33b6f0f0af96ea867', ref: (el) => (this.details = el), part: "base", class: {
136
136
  details: true,
137
137
  'details--open': this.open,
138
138
  'details--disabled': this.disabled,
139
139
  inline: this.inline,
140
- } }, h("header", { key: '1be614a46a9bc877348438b591d2da153332c7ae', ref: (el) => (this.header = el), part: "header", id: `${this.componentId}-header`, class: "details__header", role: "button", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": `${this.componentId}-content`, "aria-disabled": this.disabled ? 'true' : 'false', tabIndex: this.disabled ? -1 : 0, onClick: this.handleSummaryClick, onKeyDown: this.handleSummaryKeyDown }, h("div", { key: '9734b67556eec1f335043935761a19a11aa831eb', part: "summary", class: "details__summary" }, h("slot", { key: '91c5af23a7938f1f199d3c54ddaca3e669f3b80e', name: "summary" }, this.summary)), h("span", { key: 'e624c2b720729d51128024eabbc5416033931f36', part: "summary-icon", class: {
140
+ } }, h("header", { key: 'f9f14d79ddff8b73ae0b6a3e959f5db892f4a31f', ref: (el) => (this.header = el), part: "header", id: `${this.componentId}-header`, class: "details__header", role: "button", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": `${this.componentId}-content`, "aria-disabled": this.disabled ? 'true' : 'false', tabIndex: this.disabled ? -1 : 0, onClick: this.handleSummaryClick, onKeyDown: this.handleSummaryKeyDown }, h("div", { key: 'aec9b05ea1bb7eb2c42be7c95d584e35645fec64', part: "summary", class: "details__summary" }, h("slot", { key: '0ce0ee53a8cd67a3b2b92ba3fa51d79818b294e4', name: "summary" }, this.summary)), h("span", { key: '8cd7f1957b3498575654f5dbdb4664b503d71862', part: "summary-icon", class: {
141
141
  'details__summary-icon': true,
142
142
  'details__summary-icon--animate': this.animateSummaryIcon,
143
- } }, h("slot", { key: 'cf6e43a08611306c4eee490042630b1a417df109', name: "summary-icon", onSlotchange: () => (this.animateSummaryIcon = false) }, summaryIcon && h("six-icon", { key: '6d28327bc4a439706ce71ad64056697f1b4c8448', size: this.summaryIconSize }, summaryIcon)))), h("div", { key: '21dc33a99a72f2eb639f35d48e7fa3369eb2d081', ref: (el) => (this.body = el), class: "details__body", onTransitionEnd: this.handleBodyTransitionEnd }, h("div", { key: 'c517d961bbc8f7ef4a21a5826b839c2eae98dd13', part: "content", id: `${this.componentId}-content`, class: "details__content", role: "region", "aria-labelledby": `${this.componentId}-header` }, h("slot", { key: 'e9e601dc421a3c31976f7ddf5b9bc681bbe6b8c1' })))));
143
+ } }, h("slot", { key: 'ec46c283b39907c65e996935a57d4580b0436306', name: "summary-icon", onSlotchange: () => (this.animateSummaryIcon = false) }, summaryIcon && h("six-icon", { key: '4a0ef8739c3a4503ca443f945086e9f6cc74b036', size: this.summaryIconSize }, summaryIcon)))), h("div", { key: '1cc71be309bffcb693e04ca86d4449db683b2f26', ref: (el) => (this.body = el), class: "details__body", onTransitionEnd: this.handleBodyTransitionEnd }, h("div", { key: '514ed3c5f7e5f762986c6ab9d274eb6251ecbf99', part: "content", id: `${this.componentId}-content`, class: "details__content", role: "region", "aria-labelledby": `${this.componentId}-header` }, h("slot", { key: '1af14b8843cdae96fa13decc6a6ba51613d477ad' })))));
144
144
  }
145
145
  get host() { return this; }
146
146
  static get watchers() { return {
@@ -182,6 +182,6 @@ function defineCustomElement() {
182
182
  }
183
183
 
184
184
  export { SixDetails as S, defineCustomElement as d };
185
- //# sourceMappingURL=p-Cs1jspzx.js.map
185
+ //# sourceMappingURL=p-B5aFlIg7.js.map
186
186
 
187
- //# sourceMappingURL=p-Cs1jspzx.js.map
187
+ //# sourceMappingURL=p-B5aFlIg7.js.map
@@ -1 +1 @@
1
- {"file":"p-Cs1jspzx.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,u1EAAu1E;;ACI72E,IAAI,EAAE,GAAG,CAAC;MAuBG,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,GAAA;;;;;;;;AAQW,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAK1B,QAAA,IAAA,CAAA,WAAW,GAAG,WAAW,EAAE,EAAE,EAAE;AAC/B,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;;AAGe,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;;AAG5C,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE;;AAMK,QAAA,IAAe,CAAA,eAAA,GAQvB,SAAS;;AAGlB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAGhB,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;;AAGd,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;;;AAIvB,QAAA,IAAU,CAAA,UAAA,GAAG,IAA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C,EAEN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;AACL,gBAAA,uBAAuB,EAAE,IAAI;gBAC7B,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;AAC1D,aAAA,EAAA,EAED,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,cAAc,EAAC,YAAY,EAAE,OAAO,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,EAAA,EAC5E,WAAW,IAAI,CAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,eAAe,EAAG,EAAA,WAAW,CAAY,CACzE,CACF,CACA,EAET,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,eAAe,EAAC,eAAe,EAAE,IAAI,CAAC,uBAAuB,EAAA,EACrG,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,CAAA,QAAA,CAAU,EACjC,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,QAAQ,qBACI,CAAG,EAAA,IAAI,CAAC,WAAW,CAAA,OAAA,CAAS,EAAA,EAE7C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/six-details/six-details.scss?tag=six-details&encapsulation=shadow","src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n * @prop --horizontal-padding: The horizontal padding\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n --horizontal-padding: var(--six-spacing-medium);\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium) var(--horizontal-padding);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-B5aFlIg7.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,u1EAAu1E;;ACI72E,IAAI,EAAE,GAAG,CAAC;MAuBG,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,GAAA;;;;;;;;AAQW,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAK1B,QAAA,IAAA,CAAA,WAAW,GAAG,WAAW,EAAE,EAAE,EAAE;AAC/B,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;;AAGe,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;;AAG5C,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE;;AAMK,QAAA,IAAe,CAAA,eAAA,GAQvB,SAAS;;AAGlB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAGhB,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;;AAGd,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;;;AAIvB,QAAA,IAAU,CAAA,UAAA,GAAG,IAAI;AA6FjB,QAAA,IAAA,CAAA,uBAAuB,GAAG,CAAC,KAAsB,KAAI;AAC3D,YAAA,IAAI,IA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B,KAAK,EAAE;AACL,gBAAA,uBAAuB,EAAE,IAAI;gBAC7B,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;AAC1D,aAAA,EAAA,EAED,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,cAAc,EAAC,YAAY,EAAE,OAAO,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,EAAA,EAC5E,WAAW,IAAI,CAAU,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,eAAe,EAAG,EAAA,WAAW,CAAY,CACzE,CACF,CACA,EAET,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,eAAe,EAAC,eAAe,EAAE,IAAI,CAAC,uBAAuB,EAAA,EACrG,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,CAAA,QAAA,CAAU,EACjC,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,QAAQ,qBACI,CAAG,EAAA,IAAI,CAAC,WAAW,CAAA,OAAA,CAAS,EAAA,EAE7C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACF,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/six-details/six-details.scss?tag=six-details&encapsulation=shadow","src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n * @prop --horizontal-padding: The horizontal padding\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n --horizontal-padding: var(--six-spacing-medium);\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium) var(--horizontal-padding);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -97,7 +97,7 @@ const SixButton = /*@__PURE__*/ proxyCustomElement(class SixButton extends H {
97
97
  const isLink = this.href != null;
98
98
  const isButton = !isLink;
99
99
  const Button = isLink ? 'a' : 'button';
100
- return (h("div", { key: '6eba8f1f34f9dfa51d29e4349870994acf7b89fb', onClick: this.handleClick, class: { 'button-wrapper--disabled': this.disabled } }, h(Button, { key: '77cd544148f4ea4dcf2c6b34c4c6d62d4372372d', ref: (el) => (this.nativeButton = el), part: "base", class: {
100
+ return (h("div", { key: 'c8cdb43580af7e80984c0cbf86f269b2726ef7c0', onClick: this.handleClick, class: { 'button-wrapper--disabled': this.disabled } }, h(Button, { key: '8daeb79358745e4cb021870fdb21ba83db9d6861', ref: (el) => (this.nativeButton = el), part: "base", class: {
101
101
  button: true,
102
102
  // Types
103
103
  'button--secondary': this.type === 'secondary',
@@ -122,7 +122,7 @@ const SixButton = /*@__PURE__*/ proxyCustomElement(class SixButton extends H {
122
122
  'button--has-label': this.hasLabel,
123
123
  'button--has-prefix': this.hasPrefix,
124
124
  'button--has-suffix': this.hasSuffix,
125
- }, disabled: isButton ? this.disabled : undefined, tabindex: this.disabled ? '-1' : undefined, type: isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined, name: isButton ? this.name : undefined, value: isButton ? this.value : undefined, href: isLink ? this.href : undefined, target: isLink && this.target != null ? this.target : undefined, download: isLink && this.download != null ? this.download : undefined, rel: isLink && this.target != null ? 'noreferrer noopener' : undefined, onBlur: this.handleBlur, onFocus: this.handleFocus, "data-testid": "button" }, h("span", { key: '0fb19c85adc826ed6e92b306f734185e3557e30f', part: "prefix", class: "button__prefix" }, h("slot", { key: '8223eb8644d495ef27cd175a905ab68c3d10f14f', onSlotchange: this.handleSlotChange, name: "prefix" })), h("span", { key: '00d407ea8d28b9e515992a872cc91705e2906a24', part: "label", class: "button__label" }, h("slot", { key: '28fb5d1061bfdf0f404e2241ccf6f16b4e113ba7', onSlotchange: this.handleSlotChange })), h("span", { key: '65e82de3e6851445627b31212bbbeccc8ca85d35', part: "suffix", class: "button__suffix" }, h("slot", { key: 'd9608fad50cafb5fcc14e1eecd9e47cf99edcb14', onSlotchange: this.handleSlotChange, name: "suffix" })), this.caret && (h("span", { key: '4c8b4ad77d69e4a189621f53e3c20dbb7504c4cb', part: "caret", class: "button__caret" }, h("svg", { key: '16b2146dd6bd99677cadb4b2fe5cf67a4e32a39d', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { key: '4cdd831978519dcb553a929fe54f6bd49b25fbc5', points: "6 9 12 15 18 9" })))), this.loading && h("six-spinner", { key: 'df087e05782f46995bdc6f6325b4a610f74ce971' }))));
125
+ }, disabled: isButton ? this.disabled : undefined, tabindex: this.disabled ? '-1' : undefined, type: isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined, name: isButton ? this.name : undefined, value: isButton ? this.value : undefined, href: isLink ? this.href : undefined, target: isLink && this.target != null ? this.target : undefined, download: isLink && this.download != null ? this.download : undefined, rel: isLink && this.target != null ? 'noreferrer noopener' : undefined, onBlur: this.handleBlur, onFocus: this.handleFocus, "data-testid": "button" }, h("span", { key: '703ca93447400bc9ec12ea9bf1ba36abd324e1cc', part: "prefix", class: "button__prefix" }, h("slot", { key: '0a2c7a1148878d455b7d1b6785729c62eda396d6', onSlotchange: this.handleSlotChange, name: "prefix" })), h("span", { key: '74e8386afffae9cba1a72ce52a4ee75da72abdcd', part: "label", class: "button__label" }, h("slot", { key: 'ce6e54dfc9e280efa178f009e556669ccf6f45b6', onSlotchange: this.handleSlotChange })), h("span", { key: '42b0f3b72007f57caa2a7a745f628a395c999f9a', part: "suffix", class: "button__suffix" }, h("slot", { key: '4741a3a3eeffb36182eb93005afca98522983ef1', onSlotchange: this.handleSlotChange, name: "suffix" })), this.caret && (h("span", { key: '3c5a5e7e2b0ed436d6576888eed7999eb50395c3', part: "caret", class: "button__caret" }, h("svg", { key: '82a715a604bd7ed1ab8242cd3994d67dfeba9e1d', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { key: '5c870552f2138305088348ed5e3e3b787a5b598c', points: "6 9 12 15 18 9" })))), this.loading && h("six-spinner", { key: '4267336c2eb4b8bd71567d1a7ec4ee3f32362c2f' }))));
126
126
  }
127
127
  get host() { return this; }
128
128
  static get style() { return sixButtonCss; }
@@ -168,6 +168,6 @@ function defineCustomElement() {
168
168
  }
169
169
 
170
170
  export { SixButton as S, defineCustomElement as d };
171
- //# sourceMappingURL=p-BUN8hFmL.js.map
171
+ //# sourceMappingURL=p-BDCdPEjW.js.map
172
172
 
173
- //# sourceMappingURL=p-BUN8hFmL.js.map
173
+ //# sourceMappingURL=p-BDCdPEjW.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-BDCdPEjW.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,k+RAAk+R;;MC2B1+R,SAAS,iBAAAA,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;AALtB,IAAA,WAAA,GAAA;;;;;;AAUW,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAChB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAChB,QAAA,IAAS,CAAA,SAAA,G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e,CACzB,CACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx"],"sourcesContent":["@import '../../../src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--six-transition-fast) background-color,\n var(--six-transition-fast) color,\n var(--six-transition-fast) border,\n var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n ::slotted(six-icon) {\n // Clicks on icons shouldn't prevent the button from gaining focus\n pointer-events: none;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: var(--six-focus-ring-offset);\n }\n\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: 1px;\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n\n &.button--action-outline {\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-white);\n color: var(--six-color-action-500);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","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:\n | 'secondary'\n | 'primary'\n | 'link'\n | 'success'\n | 'warning'\n | 'danger'\n | 'action'\n | 'action-outline' = '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 // set the correct icon size for suffix and prefix icons\n const prefixIcon = this.host.querySelector('[slot=\"prefix\"]');\n const suffixIcon = this.host.querySelector('[slot=\"suffix\"]');\n\n if (prefixIcon?.tagName.toLowerCase() === 'six-icon') {\n prefixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n\n if (suffixIcon?.tagName.toLowerCase() === 'six-icon') {\n suffixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n };\n\n private mapSizeToIconSize(buttonSize: 'small' | 'medium' | 'large'): string {\n const sizeMap = {\n small: 'xSmall',\n medium: 'small',\n large: 'medium',\n };\n return sizeMap[buttonSize] || 'small'; // Default to small\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 'button--action-outline': this.type === 'action-outline',\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"],"version":3}