@six-group/ui-library 0.0.0-insider.a9979af → 0.0.0-insider.ab5d77b

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 (452) 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 +3 -3
  57. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  58. package/dist/cjs/six-tab.entry.cjs.js.map +1 -1
  59. package/dist/cjs/six-tag.cjs.entry.js +2 -2
  60. package/dist/cjs/six-textarea.cjs.entry.js +2 -2
  61. package/dist/cjs/six-tile.cjs.entry.js +5 -5
  62. package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
  63. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  64. package/dist/cjs/six-timepicker.entry.cjs.js.map +1 -1
  65. package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
  66. package/dist/cjs/ui-library.cjs.js +1 -1
  67. package/dist/collection/collection-manifest.json +2 -0
  68. package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.css +27 -0
  69. package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.js +109 -0
  70. package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.js.map +1 -0
  71. package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.css +61 -0
  72. package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.js +123 -0
  73. package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.js.map +1 -0
  74. package/dist/collection/components/six-button/six-button.js +2 -2
  75. package/dist/collection/components/six-card/six-card.js +1 -1
  76. package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
  77. package/dist/collection/components/six-date/iso-date.js +32 -0
  78. package/dist/collection/components/six-date/iso-date.js.map +1 -1
  79. package/dist/collection/components/six-date/six-date.js +7 -34
  80. package/dist/collection/components/six-date/six-date.js.map +1 -1
  81. package/dist/collection/components/six-datepicker/six-datepicker.js +4 -4
  82. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  83. package/dist/collection/components/six-details/six-details.js +3 -3
  84. package/dist/collection/components/six-error/six-error.js +1 -1
  85. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  86. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  87. package/dist/collection/components/six-footer/six-footer.js +1 -1
  88. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  89. package/dist/collection/components/six-header/six-header.js +2 -2
  90. package/dist/collection/components/six-header-dropdown-item/six-header-dropdown-item.js +2 -2
  91. package/dist/collection/components/six-header-item/six-header-item.js +1 -1
  92. package/dist/collection/components/six-header-menu-button/six-header-menu-button.js +1 -1
  93. package/dist/collection/components/six-icon/six-icon.css +46 -29
  94. package/dist/collection/components/six-icon/six-icon.js +39 -5
  95. package/dist/collection/components/six-icon/six-icon.js.map +1 -1
  96. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  97. package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
  98. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  99. package/dist/collection/components/six-menu/six-menu.js +3 -3
  100. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  101. package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
  102. package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
  103. package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
  104. package/dist/collection/components/six-picto/six-picto.js +1 -1
  105. package/dist/collection/components/six-progress-bar/six-progress-bar.js +3 -3
  106. package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
  107. package/dist/collection/components/six-radio/six-radio.js +2 -2
  108. package/dist/collection/components/six-range/six-range.js +2 -2
  109. package/dist/collection/components/six-rating/six-rating.js +2 -2
  110. package/dist/collection/components/six-root/six-root.js +1 -1
  111. package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
  112. package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
  113. package/dist/collection/components/six-switch/six-switch.js +2 -2
  114. package/dist/collection/components/six-tab/six-tab.js +22 -3
  115. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  116. package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
  117. package/dist/collection/components/six-tag/six-tag.js +2 -2
  118. package/dist/collection/components/six-textarea/six-textarea.js +2 -2
  119. package/dist/collection/components/six-tile/six-tile.js +5 -5
  120. package/dist/collection/components/six-timepicker/six-timepicker.js +1 -1
  121. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  122. package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
  123. package/dist/collection/files/material-symbols-outlined-latin-fill-normal.woff2 +0 -0
  124. package/dist/collection/files/material-symbols-outlined-latin-full-normal.woff2 +0 -0
  125. package/dist/collection/files/material-symbols-outlined-latin-grad-normal.woff2 +0 -0
  126. package/dist/collection/files/material-symbols-outlined-latin-opsz-normal.woff2 +0 -0
  127. package/dist/collection/files/material-symbols-outlined-latin-standard-normal.woff2 +0 -0
  128. package/dist/collection/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
  129. package/dist/collection/files/material-symbols-rounded-latin-fill-normal.woff2 +0 -0
  130. package/dist/collection/files/material-symbols-rounded-latin-full-normal.woff2 +0 -0
  131. package/dist/collection/files/material-symbols-rounded-latin-grad-normal.woff2 +0 -0
  132. package/dist/collection/files/material-symbols-rounded-latin-opsz-normal.woff2 +0 -0
  133. package/dist/collection/files/material-symbols-rounded-latin-standard-normal.woff2 +0 -0
  134. package/dist/collection/files/material-symbols-rounded-latin-wght-normal.woff2 +0 -0
  135. package/dist/collection/files/material-symbols-sharp-latin-fill-normal.woff2 +0 -0
  136. package/dist/collection/files/material-symbols-sharp-latin-full-normal.woff2 +0 -0
  137. package/dist/collection/files/material-symbols-sharp-latin-grad-normal.woff2 +0 -0
  138. package/dist/collection/files/material-symbols-sharp-latin-opsz-normal.woff2 +0 -0
  139. package/dist/collection/files/material-symbols-sharp-latin-standard-normal.woff2 +0 -0
  140. package/dist/collection/files/material-symbols-sharp-latin-wght-normal.woff2 +0 -0
  141. package/dist/collection/index.js +1 -0
  142. package/dist/collection/index.js.map +1 -1
  143. package/dist/collection/utils/icon.js +10 -0
  144. package/dist/collection/utils/icon.js.map +1 -0
  145. package/dist/components/index.js +5 -0
  146. package/dist/components/index.js.map +1 -1
  147. package/dist/components/{p-BUN8hFmL.js → p-BDCdPEjW.js} +4 -4
  148. package/dist/components/p-BDCdPEjW.js.map +1 -0
  149. package/dist/components/{p-BR2t7cws.js → p-BFxDUwBI.js} +3 -3
  150. package/dist/components/{p-BR2t7cws.js.map → p-BFxDUwBI.js.map} +1 -1
  151. package/dist/components/{p-Cfyrva2T.js → p-BKl-wAjt.js} +5 -5
  152. package/dist/components/{p-Cfyrva2T.js.map → p-BKl-wAjt.js.map} +1 -1
  153. package/dist/components/{p-CWKq6Dyt.js → p-BLocui1Z.js} +3 -3
  154. package/dist/components/{p-CWKq6Dyt.js.map → p-BLocui1Z.js.map} +1 -1
  155. package/dist/components/{p-DsGIkEDB.js → p-C-TgkYhI.js} +4 -4
  156. package/dist/components/{p-DsGIkEDB.js.map → p-C-TgkYhI.js.map} +1 -1
  157. package/dist/components/{p-9aUb96SZ.js → p-C6ozoFuw.js} +8 -8
  158. package/dist/components/{p-9aUb96SZ.js.map → p-C6ozoFuw.js.map} +1 -1
  159. package/dist/components/p-C84iXIFp.js +71 -0
  160. package/dist/components/p-C84iXIFp.js.map +1 -0
  161. package/dist/components/{p-DYlDF9Rw.js → p-CH82uB3t.js} +3 -3
  162. package/dist/components/{p-DYlDF9Rw.js.map → p-CH82uB3t.js.map} +1 -1
  163. package/dist/components/{p-Cosz73fX.js → p-CSfxA66i.js} +6 -6
  164. package/dist/components/{p-Cosz73fX.js.map → p-CSfxA66i.js.map} +1 -1
  165. package/dist/components/{p-CSL17OWk.js → p-CXsF3egB.js} +9 -9
  166. package/dist/components/{p-CSL17OWk.js.map → p-CXsF3egB.js.map} +1 -1
  167. package/dist/components/{p-CAJFkiLw.js → p-C_slMKPO.js} +7 -7
  168. package/dist/components/{p-CAJFkiLw.js.map → p-C_slMKPO.js.map} +1 -1
  169. package/dist/components/{p-DyYwMIDQ.js → p-DQrAnsWb.js} +3 -3
  170. package/dist/components/{p-DyYwMIDQ.js.map → p-DQrAnsWb.js.map} +1 -1
  171. package/dist/components/{p-Cs1jspzx.js → p-DrZr0hMT.js} +6 -6
  172. package/dist/components/{p-Cs1jspzx.js.map → p-DrZr0hMT.js.map} +1 -1
  173. package/dist/components/{p-C28WDWgL.js → p-SZP6K3B0.js} +7 -7
  174. package/dist/components/{p-C28WDWgL.js.map → p-SZP6K3B0.js.map} +1 -1
  175. package/dist/components/{p-ClylOmYH.js → p-jflTvJ8E.js} +4 -4
  176. package/dist/components/{p-ClylOmYH.js.map → p-jflTvJ8E.js.map} +1 -1
  177. package/dist/components/six-alert.js +2 -2
  178. package/dist/components/six-avatar.js +1 -1
  179. package/dist/components/six-breadcrumbs-item.d.ts +11 -0
  180. package/dist/components/six-breadcrumbs-item.js +58 -0
  181. package/dist/components/six-breadcrumbs-item.js.map +1 -0
  182. package/dist/components/six-breadcrumbs.d.ts +11 -0
  183. package/dist/components/six-breadcrumbs.js +97 -0
  184. package/dist/components/six-breadcrumbs.js.map +1 -0
  185. package/dist/components/six-button.js +1 -1
  186. package/dist/components/six-card.js +1 -1
  187. package/dist/components/six-checkbox.js +1 -1
  188. package/dist/components/six-date.js +42 -37
  189. package/dist/components/six-date.js.map +1 -1
  190. package/dist/components/six-datepicker.js +8 -8
  191. package/dist/components/six-datepicker.js.map +1 -1
  192. package/dist/components/six-details.js +1 -1
  193. package/dist/components/six-dialog.js +2 -2
  194. package/dist/components/six-drawer.js +2 -2
  195. package/dist/components/six-dropdown.js +1 -1
  196. package/dist/components/six-error-page.js +2 -2
  197. package/dist/components/six-error.js +1 -1
  198. package/dist/components/six-file-list-item.js +1 -1
  199. package/dist/components/six-file-list.js +1 -1
  200. package/dist/components/six-file-upload.js +2 -2
  201. package/dist/components/six-footer.js +1 -1
  202. package/dist/components/six-group-label.js +2 -2
  203. package/dist/components/six-header-dropdown-item.js +9 -9
  204. package/dist/components/six-header-item.js +1 -1
  205. package/dist/components/six-header-menu-button.js +2 -2
  206. package/dist/components/six-header.js +2 -2
  207. package/dist/components/six-icon-button.js +1 -1
  208. package/dist/components/six-icon.js +1 -1
  209. package/dist/components/six-input.js +1 -1
  210. package/dist/components/six-item-picker.js +1 -1
  211. package/dist/components/six-layout-grid.js +1 -1
  212. package/dist/components/six-main-container.js +1 -1
  213. package/dist/components/six-menu-divider.js +1 -1
  214. package/dist/components/six-menu-item.js +1 -1
  215. package/dist/components/six-menu-label.js +1 -1
  216. package/dist/components/six-menu.js +1 -1
  217. package/dist/components/six-picto.js +1 -1
  218. package/dist/components/six-progress-bar.js +3 -3
  219. package/dist/components/six-progress-ring.js +1 -1
  220. package/dist/components/six-radio.js +2 -2
  221. package/dist/components/six-range.js +3 -3
  222. package/dist/components/six-rating.js +4 -4
  223. package/dist/components/six-root.js +3 -3
  224. package/dist/components/six-search-field.js +3 -3
  225. package/dist/components/six-select.js +9 -9
  226. package/dist/components/six-sidebar-item-group.js +2 -2
  227. package/dist/components/six-sidebar-item.js +3 -3
  228. package/dist/components/six-sidebar.js +2 -2
  229. package/dist/components/six-stage-indicator.js +1 -1
  230. package/dist/components/six-switch.js +3 -3
  231. package/dist/components/six-tab-group.js +2 -2
  232. package/dist/components/six-tab-panel.js +1 -1
  233. package/dist/components/six-tab.js +6 -5
  234. package/dist/components/six-tab.js.map +1 -1
  235. package/dist/components/six-tag.js +5 -5
  236. package/dist/components/six-textarea.js +3 -3
  237. package/dist/components/six-tile.js +8 -8
  238. package/dist/components/six-timepicker.js +1 -1
  239. package/dist/components/six-tooltip.js +1 -1
  240. package/dist/components.json +409 -4
  241. package/dist/esm/icon-DqHJRLQQ.js +14 -0
  242. package/dist/esm/icon-DqHJRLQQ.js.map +1 -0
  243. package/dist/esm/index-JoG9I7EO.js +12 -8
  244. package/dist/esm/index.js +1 -0
  245. package/dist/esm/index.js.map +1 -1
  246. package/dist/esm/loader.js +1 -1
  247. package/dist/esm/six-breadcrumbs-item.entry.js +23 -0
  248. package/dist/esm/six-breadcrumbs-item.entry.js.map +1 -0
  249. package/dist/esm/six-breadcrumbs.entry.js +71 -0
  250. package/dist/esm/six-breadcrumbs.entry.js.map +1 -0
  251. package/dist/esm/six-button.six-spinner.entry.js.map +1 -0
  252. package/dist/esm/{six-button.entry.js → six-button_2.entry.js} +55 -5
  253. package/dist/esm/six-button_2.entry.js.map +1 -0
  254. package/dist/esm/six-card.entry.js +1 -1
  255. package/dist/esm/six-checkbox_2.entry.js +4 -4
  256. package/dist/esm/six-date.entry.js +38 -33
  257. package/dist/esm/six-date.entry.js.map +1 -1
  258. package/dist/esm/six-datepicker.entry.js +3 -3
  259. package/dist/esm/six-datepicker.entry.js.map +1 -1
  260. package/dist/esm/six-details.entry.js +3 -3
  261. package/dist/esm/six-dropdown.six-menu.entry.js.map +1 -1
  262. package/dist/esm/six-dropdown_2.entry.js +3 -3
  263. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  264. package/dist/esm/six-error-page.entry.js +1 -1
  265. package/dist/esm/six-error.entry.js +1 -1
  266. package/dist/esm/six-file-list.entry.js +1 -1
  267. package/dist/esm/six-footer.entry.js +1 -1
  268. package/dist/esm/six-group-label.entry.js +1 -1
  269. package/dist/esm/six-header-dropdown-item.entry.js +2 -2
  270. package/dist/esm/six-header-item.entry.js +1 -1
  271. package/dist/esm/six-header-menu-button.entry.js +1 -1
  272. package/dist/esm/six-header.entry.js +2 -2
  273. package/dist/esm/six-icon-button.entry.js +3 -3
  274. package/dist/esm/six-icon.entry.js +15 -6
  275. package/dist/esm/six-icon.entry.js.map +1 -1
  276. package/dist/esm/six-layout-grid.entry.js +1 -1
  277. package/dist/esm/six-main-container.entry.js +1 -1
  278. package/dist/esm/six-menu-divider.entry.js +1 -1
  279. package/dist/esm/six-menu-label.entry.js +1 -1
  280. package/dist/esm/six-picto.entry.js +1 -1
  281. package/dist/esm/six-progress-bar.entry.js +3 -3
  282. package/dist/esm/six-progress-ring.entry.js +1 -1
  283. package/dist/esm/six-radio.entry.js +2 -2
  284. package/dist/esm/six-range.entry.js +2 -2
  285. package/dist/esm/six-rating.entry.js +2 -2
  286. package/dist/esm/six-root.entry.js +1 -1
  287. package/dist/esm/six-sidebar-item.entry.js +2 -2
  288. package/dist/esm/six-sidebar.entry.js +2 -2
  289. package/dist/esm/six-switch.entry.js +2 -2
  290. package/dist/esm/six-tab-panel.entry.js +1 -1
  291. package/dist/esm/six-tab.entry.js +3 -3
  292. package/dist/esm/six-tab.entry.js.map +1 -1
  293. package/dist/esm/six-tag.entry.js +2 -2
  294. package/dist/esm/six-textarea.entry.js +2 -2
  295. package/dist/esm/six-tile.entry.js +5 -5
  296. package/dist/esm/six-timepicker.entry.js +1 -1
  297. package/dist/esm/six-timepicker.entry.js.map +1 -1
  298. package/dist/esm/six-tooltip.entry.js +2 -2
  299. package/dist/esm/ui-library.js +1 -1
  300. package/dist/types/components/six-breadcrumbs/six-breadcrumbs.d.ts +20 -0
  301. package/dist/types/components/six-breadcrumbs-item/six-breadcrumbs-item.d.ts +27 -0
  302. package/dist/types/components/six-date/iso-date.d.ts +2 -0
  303. package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
  304. package/dist/types/components/six-icon/six-icon.d.ts +16 -0
  305. package/dist/types/components/six-tab/six-tab.d.ts +2 -0
  306. package/dist/types/components.d.ts +134 -4
  307. package/dist/types/index.d.ts +1 -0
  308. package/dist/types/types.d.ts +1 -0
  309. package/dist/types/utils/icon.d.ts +5 -0
  310. package/dist/ui-library/files/material-symbols-outlined-latin-fill-normal.woff2 +0 -0
  311. package/dist/ui-library/files/material-symbols-outlined-latin-full-normal.woff2 +0 -0
  312. package/dist/ui-library/files/material-symbols-outlined-latin-grad-normal.woff2 +0 -0
  313. package/dist/ui-library/files/material-symbols-outlined-latin-opsz-normal.woff2 +0 -0
  314. package/dist/ui-library/files/material-symbols-outlined-latin-standard-normal.woff2 +0 -0
  315. package/dist/ui-library/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
  316. package/dist/ui-library/files/material-symbols-rounded-latin-fill-normal.woff2 +0 -0
  317. package/dist/ui-library/files/material-symbols-rounded-latin-full-normal.woff2 +0 -0
  318. package/dist/ui-library/files/material-symbols-rounded-latin-grad-normal.woff2 +0 -0
  319. package/dist/ui-library/files/material-symbols-rounded-latin-opsz-normal.woff2 +0 -0
  320. package/dist/ui-library/files/material-symbols-rounded-latin-standard-normal.woff2 +0 -0
  321. package/dist/ui-library/files/material-symbols-rounded-latin-wght-normal.woff2 +0 -0
  322. package/dist/ui-library/files/material-symbols-sharp-latin-fill-normal.woff2 +0 -0
  323. package/dist/ui-library/files/material-symbols-sharp-latin-full-normal.woff2 +0 -0
  324. package/dist/ui-library/files/material-symbols-sharp-latin-grad-normal.woff2 +0 -0
  325. package/dist/ui-library/files/material-symbols-sharp-latin-opsz-normal.woff2 +0 -0
  326. package/dist/ui-library/files/material-symbols-sharp-latin-standard-normal.woff2 +0 -0
  327. package/dist/ui-library/files/material-symbols-sharp-latin-wght-normal.woff2 +0 -0
  328. package/dist/ui-library/index.esm.js +1 -1
  329. package/dist/ui-library/index.esm.js.map +1 -1
  330. package/dist/ui-library/{p-336610a9.entry.js → p-014f44f4.entry.js} +2 -2
  331. package/dist/ui-library/p-014f44f4.entry.js.map +1 -0
  332. package/dist/ui-library/p-05ca516d.entry.js +2 -0
  333. package/dist/ui-library/{p-a43843d6.entry.js → p-06c6b189.entry.js} +2 -2
  334. package/dist/ui-library/{p-850aff56.entry.js → p-12a2cc6b.entry.js} +2 -2
  335. package/dist/ui-library/p-22f924a1.entry.js +2 -0
  336. package/dist/ui-library/{p-f6a1c20b.entry.js → p-26219330.entry.js} +2 -2
  337. package/dist/ui-library/{p-fe7d3665.entry.js → p-29994dc3.entry.js} +2 -2
  338. package/dist/ui-library/{p-d9e770ab.entry.js → p-29aac7ea.entry.js} +2 -2
  339. package/dist/ui-library/p-38c51fd1.entry.js +2 -0
  340. package/dist/ui-library/p-38c51fd1.entry.js.map +1 -0
  341. package/dist/ui-library/{p-c8fbf085.entry.js → p-3c1285ad.entry.js} +2 -2
  342. package/dist/ui-library/{p-5b52d097.entry.js → p-3d9e03b5.entry.js} +2 -2
  343. package/dist/ui-library/{p-1cfa2df4.entry.js → p-4d9785bd.entry.js} +2 -2
  344. package/dist/ui-library/p-4decf969.entry.js +2 -0
  345. package/dist/ui-library/p-4decf969.entry.js.map +1 -0
  346. package/dist/ui-library/{p-c47f11e4.entry.js → p-59568c0f.entry.js} +2 -2
  347. package/dist/ui-library/{p-c47f11e4.entry.js.map → p-59568c0f.entry.js.map} +1 -1
  348. package/dist/ui-library/{p-174dd242.entry.js → p-664ddbab.entry.js} +2 -2
  349. package/dist/ui-library/{p-21cbccb1.entry.js → p-66b94978.entry.js} +2 -2
  350. package/dist/ui-library/{p-371ef302.entry.js → p-66d616e8.entry.js} +2 -2
  351. package/dist/ui-library/{p-811ce2a0.entry.js → p-6cd4fbd8.entry.js} +2 -2
  352. package/dist/ui-library/{p-8884a48b.entry.js → p-70388108.entry.js} +2 -2
  353. package/dist/ui-library/p-72d3f332.entry.js +2 -0
  354. package/dist/ui-library/p-72d3f332.entry.js.map +1 -0
  355. package/dist/ui-library/{p-18e755bc.entry.js → p-7f7413db.entry.js} +2 -2
  356. package/dist/ui-library/p-7f7413db.entry.js.map +1 -0
  357. package/dist/ui-library/{p-3d49deae.entry.js → p-8c2edb7f.entry.js} +2 -2
  358. package/dist/ui-library/{p-65e53a1b.entry.js → p-984a1f6d.entry.js} +2 -2
  359. package/dist/ui-library/{p-14f79bfc.entry.js → p-9deca0d0.entry.js} +2 -2
  360. package/dist/ui-library/p-DqHJRLQQ.js +2 -0
  361. package/dist/ui-library/p-DqHJRLQQ.js.map +1 -0
  362. package/dist/ui-library/{p-b6244904.entry.js → p-a6d7d618.entry.js} +2 -2
  363. package/dist/ui-library/p-a7f9c92d.entry.js +2 -0
  364. package/dist/ui-library/{p-09de2bda.entry.js.map → p-a7f9c92d.entry.js.map} +1 -1
  365. package/dist/ui-library/{p-03ca4af8.entry.js → p-a9a5485a.entry.js} +2 -2
  366. package/dist/ui-library/p-a9a5485a.entry.js.map +1 -0
  367. package/dist/ui-library/{p-a4b523ed.entry.js → p-aaea0f73.entry.js} +2 -2
  368. package/dist/ui-library/{p-ee980a0f.entry.js → p-bea434d1.entry.js} +2 -2
  369. package/dist/ui-library/{p-83b35622.entry.js → p-ccc7e227.entry.js} +2 -2
  370. package/dist/ui-library/{p-cea7f777.entry.js → p-d81265f4.entry.js} +2 -2
  371. package/dist/ui-library/{p-9ec79195.entry.js → p-da5f40ed.entry.js} +2 -2
  372. package/dist/ui-library/p-dc694314.entry.js +2 -0
  373. package/dist/ui-library/p-dc694314.entry.js.map +1 -0
  374. package/dist/ui-library/{p-f54d3616.entry.js → p-df2b8f01.entry.js} +2 -2
  375. package/dist/ui-library/p-e100aff2.entry.js +2 -0
  376. package/dist/ui-library/{p-12e7a9e1.entry.js → p-e56c5237.entry.js} +2 -2
  377. package/dist/ui-library/{p-12e7a9e1.entry.js.map → p-e56c5237.entry.js.map} +1 -1
  378. package/dist/ui-library/{p-6c8182fa.entry.js → p-e8e5445e.entry.js} +2 -2
  379. package/dist/ui-library/{p-d7c7398d.entry.js → p-fc2d893f.entry.js} +2 -2
  380. package/dist/ui-library/p-fcd3305f.entry.js +2 -0
  381. package/dist/ui-library/{p-e85be7d2.entry.js.map → p-fcd3305f.entry.js.map} +1 -1
  382. package/dist/ui-library/{p-39668d61.entry.js → p-fd97bc8a.entry.js} +2 -2
  383. package/dist/ui-library/{p-dc2109d2.entry.js → p-fe2ef0a4.entry.js} +2 -2
  384. package/dist/ui-library/six-breadcrumbs-item.entry.esm.js.map +1 -0
  385. package/dist/ui-library/six-breadcrumbs.entry.esm.js.map +1 -0
  386. package/dist/ui-library/six-button.six-spinner.entry.esm.js.map +1 -0
  387. package/dist/ui-library/six-date.entry.esm.js.map +1 -1
  388. package/dist/ui-library/six-datepicker.entry.esm.js.map +1 -1
  389. package/dist/ui-library/six-dropdown.six-menu.entry.esm.js.map +1 -1
  390. package/dist/ui-library/six-icon.entry.esm.js.map +1 -1
  391. package/dist/ui-library/six-tab.entry.esm.js.map +1 -1
  392. package/dist/ui-library/six-timepicker.entry.esm.js.map +1 -1
  393. package/dist/ui-library/ui-library.css +1 -1
  394. package/dist/ui-library/ui-library.esm.js +1 -1
  395. package/package.json +6 -3
  396. package/dist/cjs/six-button.cjs.entry.js.map +0 -1
  397. package/dist/cjs/six-button.entry.cjs.js.map +0 -1
  398. package/dist/cjs/six-spinner.cjs.entry.js +0 -58
  399. package/dist/cjs/six-spinner.cjs.entry.js.map +0 -1
  400. package/dist/cjs/six-spinner.entry.cjs.js.map +0 -1
  401. package/dist/components/p-BSHZAiyG.js +0 -52
  402. package/dist/components/p-BSHZAiyG.js.map +0 -1
  403. package/dist/components/p-BUN8hFmL.js.map +0 -1
  404. package/dist/esm/six-button.entry.js.map +0 -1
  405. package/dist/esm/six-spinner.entry.js +0 -56
  406. package/dist/esm/six-spinner.entry.js.map +0 -1
  407. package/dist/ui-library/p-03ca4af8.entry.js.map +0 -1
  408. package/dist/ui-library/p-09de2bda.entry.js +0 -2
  409. package/dist/ui-library/p-18e755bc.entry.js.map +0 -1
  410. package/dist/ui-library/p-2a82de6c.entry.js +0 -2
  411. package/dist/ui-library/p-2a82de6c.entry.js.map +0 -1
  412. package/dist/ui-library/p-2fb16281.entry.js +0 -2
  413. package/dist/ui-library/p-2fb16281.entry.js.map +0 -1
  414. package/dist/ui-library/p-31c5f8fa.entry.js +0 -2
  415. package/dist/ui-library/p-336610a9.entry.js.map +0 -1
  416. package/dist/ui-library/p-3dc98466.entry.js +0 -2
  417. package/dist/ui-library/p-3dc98466.entry.js.map +0 -1
  418. package/dist/ui-library/p-c90a59fc.entry.js +0 -2
  419. package/dist/ui-library/p-e85be7d2.entry.js +0 -2
  420. package/dist/ui-library/p-ea3bf68d.entry.js +0 -2
  421. package/dist/ui-library/six-button.entry.esm.js.map +0 -1
  422. package/dist/ui-library/six-spinner.entry.esm.js.map +0 -1
  423. /package/dist/ui-library/{p-31c5f8fa.entry.js.map → p-05ca516d.entry.js.map} +0 -0
  424. /package/dist/ui-library/{p-a43843d6.entry.js.map → p-06c6b189.entry.js.map} +0 -0
  425. /package/dist/ui-library/{p-850aff56.entry.js.map → p-12a2cc6b.entry.js.map} +0 -0
  426. /package/dist/ui-library/{p-c90a59fc.entry.js.map → p-22f924a1.entry.js.map} +0 -0
  427. /package/dist/ui-library/{p-f6a1c20b.entry.js.map → p-26219330.entry.js.map} +0 -0
  428. /package/dist/ui-library/{p-fe7d3665.entry.js.map → p-29994dc3.entry.js.map} +0 -0
  429. /package/dist/ui-library/{p-d9e770ab.entry.js.map → p-29aac7ea.entry.js.map} +0 -0
  430. /package/dist/ui-library/{p-c8fbf085.entry.js.map → p-3c1285ad.entry.js.map} +0 -0
  431. /package/dist/ui-library/{p-5b52d097.entry.js.map → p-3d9e03b5.entry.js.map} +0 -0
  432. /package/dist/ui-library/{p-1cfa2df4.entry.js.map → p-4d9785bd.entry.js.map} +0 -0
  433. /package/dist/ui-library/{p-174dd242.entry.js.map → p-664ddbab.entry.js.map} +0 -0
  434. /package/dist/ui-library/{p-21cbccb1.entry.js.map → p-66b94978.entry.js.map} +0 -0
  435. /package/dist/ui-library/{p-371ef302.entry.js.map → p-66d616e8.entry.js.map} +0 -0
  436. /package/dist/ui-library/{p-811ce2a0.entry.js.map → p-6cd4fbd8.entry.js.map} +0 -0
  437. /package/dist/ui-library/{p-8884a48b.entry.js.map → p-70388108.entry.js.map} +0 -0
  438. /package/dist/ui-library/{p-3d49deae.entry.js.map → p-8c2edb7f.entry.js.map} +0 -0
  439. /package/dist/ui-library/{p-65e53a1b.entry.js.map → p-984a1f6d.entry.js.map} +0 -0
  440. /package/dist/ui-library/{p-14f79bfc.entry.js.map → p-9deca0d0.entry.js.map} +0 -0
  441. /package/dist/ui-library/{p-b6244904.entry.js.map → p-a6d7d618.entry.js.map} +0 -0
  442. /package/dist/ui-library/{p-a4b523ed.entry.js.map → p-aaea0f73.entry.js.map} +0 -0
  443. /package/dist/ui-library/{p-ee980a0f.entry.js.map → p-bea434d1.entry.js.map} +0 -0
  444. /package/dist/ui-library/{p-83b35622.entry.js.map → p-ccc7e227.entry.js.map} +0 -0
  445. /package/dist/ui-library/{p-cea7f777.entry.js.map → p-d81265f4.entry.js.map} +0 -0
  446. /package/dist/ui-library/{p-9ec79195.entry.js.map → p-da5f40ed.entry.js.map} +0 -0
  447. /package/dist/ui-library/{p-f54d3616.entry.js.map → p-df2b8f01.entry.js.map} +0 -0
  448. /package/dist/ui-library/{p-ea3bf68d.entry.js.map → p-e100aff2.entry.js.map} +0 -0
  449. /package/dist/ui-library/{p-6c8182fa.entry.js.map → p-e8e5445e.entry.js.map} +0 -0
  450. /package/dist/ui-library/{p-d7c7398d.entry.js.map → p-fc2d893f.entry.js.map} +0 -0
  451. /package/dist/ui-library/{p-39668d61.entry.js.map → p-fd97bc8a.entry.js.map} +0 -0
  452. /package/dist/ui-library/{p-dc2109d2.entry.js.map → p-fe2ef0a4.entry.js.map} +0 -0
@@ -0,0 +1,109 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.
4
+ *
5
+ * @since 5.0
6
+ * @status beta
7
+ *
8
+ * @slot - One or more breadcrumb items to display.
9
+ * @slot separator - The separator to use between breadcrumb items. Works best with six-icon.
10
+ *
11
+ * @part base - The component's base wrapper.
12
+ */
13
+ export class SixBreadcrumbs {
14
+ constructor() {
15
+ /** Defines an icon as a separator without having to place a slot **/
16
+ this.separatorIcon = '';
17
+ this.updateBreadcrumbItems = () => {
18
+ const items = [...this.host.querySelectorAll('six-breadcrumbs-item')];
19
+ items.forEach((item, index) => {
20
+ // Append separators to each item if they don't already have one
21
+ const separator = item.querySelector('[slot="separator"]');
22
+ if (separator === null) {
23
+ // No separator exists, add one
24
+ item.append(this.createSeparatorElement());
25
+ }
26
+ else if (separator.hasAttribute('data-default')) {
27
+ // A default separator exists, replace it
28
+ separator.replaceWith(this.createSeparatorElement());
29
+ }
30
+ // The last breadcrumb item is the "current page"
31
+ if (index === items.length - 1) {
32
+ item.setAttribute('aria-current', 'page');
33
+ }
34
+ else {
35
+ item.removeAttribute('aria-current');
36
+ }
37
+ });
38
+ };
39
+ }
40
+ createSeparatorElement() {
41
+ // Find a custom separator by checking direct children only
42
+ const customSeparator = this.getCustomSeparator();
43
+ console.log(customSeparator);
44
+ if (customSeparator) {
45
+ const clone = customSeparator.cloneNode(true);
46
+ clone.removeAttribute('id');
47
+ clone.setAttribute('data-default', '');
48
+ clone.slot = 'separator';
49
+ return clone;
50
+ }
51
+ // Create default separator element
52
+ const span = document.createElement('span');
53
+ span.innerText = '/';
54
+ span.slot = 'separator';
55
+ span.setAttribute('data-default', '');
56
+ return span;
57
+ }
58
+ getCustomSeparator() {
59
+ var _a;
60
+ if (Boolean((_a = this.separatorIcon) === null || _a === void 0 ? void 0 : _a.length)) {
61
+ const sixIcon = document.createElement('six-icon');
62
+ sixIcon.innerText = this.separatorIcon;
63
+ sixIcon.setAttribute('size', 'small');
64
+ return sixIcon;
65
+ }
66
+ return Array.from(this.host.children).find((child) => child.getAttribute('slot') === 'separator');
67
+ }
68
+ render() {
69
+ return (h("host", { key: '71fcac983222825168006e795d3c7f8f887f2f66' }, h("nav", { key: '76473724c4e4ca45650a5defcc9a4c8352311345', part: "base" }, h("slot", { key: '6ec1262745d1b9507e6d612d3cf3a22c5e6859cd', onSlotchange: this.updateBreadcrumbItems }))));
70
+ }
71
+ static get is() { return "six-breadcrumbs"; }
72
+ static get encapsulation() { return "shadow"; }
73
+ static get originalStyleUrls() {
74
+ return {
75
+ "$": ["six-breadcrumbs.scss"]
76
+ };
77
+ }
78
+ static get styleUrls() {
79
+ return {
80
+ "$": ["six-breadcrumbs.css"]
81
+ };
82
+ }
83
+ static get properties() {
84
+ return {
85
+ "separatorIcon": {
86
+ "type": "string",
87
+ "attribute": "separator-icon",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "string",
91
+ "resolved": "string",
92
+ "references": {}
93
+ },
94
+ "required": false,
95
+ "optional": false,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "Defines an icon as a separator without having to place a slot *"
99
+ },
100
+ "getter": false,
101
+ "setter": false,
102
+ "reflect": true,
103
+ "defaultValue": "''"
104
+ }
105
+ };
106
+ }
107
+ static get elementRef() { return "host"; }
108
+ }
109
+ //# sourceMappingURL=six-breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"six-breadcrumbs.js","sourceRoot":"","sources":["../../../src/components/six-breadcrumbs/six-breadcrumbs.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.\n *\n * @since 5.0\n * @status beta\n *\n * @slot - One or more breadcrumb items to display.\n * @slot separator - The separator to use between breadcrumb items. Works best with six-icon.\n *\n * @part base - The component's base wrapper.\n */\n@Component({\n tag: 'six-breadcrumbs',\n styleUrl: 'six-breadcrumbs.scss',\n shadow: true,\n})\nexport class SixBreadcrumbs {\n @Element() host!: HTMLSixBreadcrumbsElement;\n\n /** Defines an icon as a separator without having to place a slot **/\n @Prop({ attribute: 'separator-icon', reflect: true }) separatorIcon: string = '';\n\n private updateBreadcrumbItems = () => {\n const items = [...this.host.querySelectorAll('six-breadcrumbs-item')] as HTMLSixBreadcrumbsItemElement[];\n\n items.forEach((item, index) => {\n // Append separators to each item if they don't already have one\n const separator = item.querySelector('[slot=\"separator\"]');\n if (separator === null) {\n // No separator exists, add one\n item.append(this.createSeparatorElement());\n } else if (separator.hasAttribute('data-default')) {\n // A default separator exists, replace it\n separator.replaceWith(this.createSeparatorElement());\n }\n\n // The last breadcrumb item is the \"current page\"\n if (index === items.length - 1) {\n item.setAttribute('aria-current', 'page');\n } else {\n item.removeAttribute('aria-current');\n }\n });\n };\n\n private createSeparatorElement(): HTMLElement {\n // Find a custom separator by checking direct children only\n const customSeparator = this.getCustomSeparator();\n console.log(customSeparator);\n if (customSeparator) {\n const clone = customSeparator.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n clone.setAttribute('data-default', '');\n clone.slot = 'separator';\n return clone;\n }\n\n // Create default separator element\n const span = document.createElement('span');\n span.innerText = '/';\n span.slot = 'separator';\n span.setAttribute('data-default', '');\n return span;\n }\n\n private getCustomSeparator() {\n if (Boolean(this.separatorIcon?.length)) {\n const sixIcon = document.createElement('six-icon');\n sixIcon.innerText = this.separatorIcon;\n sixIcon.setAttribute('size', 'small');\n return sixIcon;\n }\n return Array.from(this.host.children).find((child) => child.getAttribute('slot') === 'separator');\n }\n\n render() {\n return (\n <host>\n <nav part=\"base\">\n <slot onSlotchange={this.updateBreadcrumbItems} />\n </nav>\n </host>\n );\n }\n}\n"]}
@@ -0,0 +1,61 @@
1
+ :host {
2
+ position: relative;
3
+ box-sizing: border-box;
4
+ }
5
+ :host *, :host *:before, :host *:after {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ /* Hides content visually while still making it available to screen readers */
10
+ .sr-only {
11
+ clip: rect(0 0 0 0);
12
+ clip-path: inset(50%);
13
+ height: 1px;
14
+ overflow: hidden;
15
+ position: absolute;
16
+ white-space: nowrap;
17
+ width: 1px;
18
+ }
19
+
20
+ /**
21
+ * @prop --separator-color: The color of the separator
22
+ * @prop --last-item-color: The color of the last breadcrumbs item
23
+ */
24
+ :host {
25
+ --last-item-color: var(--six-color-web-rock-700);
26
+ --separator-color: var(--six-color-web-rock-700);
27
+ }
28
+ :host::part(label) {
29
+ padding: unset;
30
+ }
31
+ :host::part(base) {
32
+ display: flex;
33
+ align-items: center;
34
+ }
35
+ :host::part(separator) {
36
+ align-items: center;
37
+ user-select: none;
38
+ -webkit-user-select: none;
39
+ }
40
+ :host six-button::part(label) {
41
+ padding-left: var(--six-spacing-xx-small);
42
+ padding-right: var(--six-spacing-xx-small);
43
+ }
44
+
45
+ :host([read-only]) six-button::part(base) {
46
+ color: var(--last-item-color);
47
+ }
48
+
49
+ .breadcrumb-item-readonly {
50
+ cursor: default;
51
+ }
52
+
53
+ .breadcrumb-item__separator {
54
+ display: flex;
55
+ align-items: center;
56
+ color: var(--separator-color);
57
+ }
58
+
59
+ :host(:last-of-type) .breadcrumb-item__separator {
60
+ display: none;
61
+ }
@@ -0,0 +1,123 @@
1
+ import { h } from "@stencil/core";
2
+ /**
3
+ * Breadcrumb items are used inside breadcrumbs to represent different links.
4
+ *
5
+ * @since 5.0
6
+ * @status beta
7
+ *
8
+ * @slot - The breadcrumb item’s label.
9
+ * @slot prefix - An optional prefix, usually an icon or icon button.
10
+ * @slot suffix - An optional suffix, usually an icon or icon button.
11
+ * @slot separator - The separator to use for the breadcrumb item. This will only change the separator for this item. If you want to change it for all items in the group, set the separator on six-breadcrumbs instead.
12
+ *
13
+ * @part base - The component's base wrapper.
14
+ * @part button - The button that renders the item
15
+ * @part separator - The separator
16
+ */
17
+ export class SixBreadcrumbsItem {
18
+ constructor() {
19
+ /** The breadcrumbs item size. */
20
+ this.size = 'medium';
21
+ /** Set to true to readonly the breadcrumb item. */
22
+ this.readonly = false;
23
+ }
24
+ render() {
25
+ return (h("div", { key: 'c513737271cbfcd6755fa7b1effc526ec450bf04', part: "base" }, h("six-button", { key: '9f7fa7a98c83bcd536e864c486e696623a337aba', part: "button", type: "link", class: { 'breadcrumb-item-readonly': this.readonly }, href: this.readonly ? undefined : this.href, tabindex: this.readonly ? -1 : undefined, target: this.target, size: this.size }, h("slot", { key: '21702eca3e7529a8e6e2e63d640a079b9da3eef9', name: "prefix", slot: "prefix" }), h("slot", { key: 'eaeaac8681abaf25e4959615c0d7acbed2f51813' }), h("slot", { key: 'b7bf9a20d59cee15010f585e17fb3cdf1979573b', name: "suffix", slot: "suffix" })), h("span", { key: '0c4189811fa524e18bf0c0f94c7f6490c11018d9', part: "separator", class: "breadcrumb-item__separator", "aria-hidden": "true" }, h("slot", { key: '03ca6b113b73f75fbaeec04b0ec3d3224536c77b', name: "separator" }))));
26
+ }
27
+ static get is() { return "six-breadcrumbs-item"; }
28
+ static get encapsulation() { return "shadow"; }
29
+ static get originalStyleUrls() {
30
+ return {
31
+ "$": ["six-breadcrumbs-item.scss"]
32
+ };
33
+ }
34
+ static get styleUrls() {
35
+ return {
36
+ "$": ["six-breadcrumbs-item.css"]
37
+ };
38
+ }
39
+ static get properties() {
40
+ return {
41
+ "href": {
42
+ "type": "string",
43
+ "attribute": "href",
44
+ "mutable": false,
45
+ "complexType": {
46
+ "original": "string",
47
+ "resolved": "string | undefined",
48
+ "references": {}
49
+ },
50
+ "required": false,
51
+ "optional": true,
52
+ "docs": {
53
+ "tags": [],
54
+ "text": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`."
55
+ },
56
+ "getter": false,
57
+ "setter": false,
58
+ "reflect": false
59
+ },
60
+ "target": {
61
+ "type": "string",
62
+ "attribute": "target",
63
+ "mutable": false,
64
+ "complexType": {
65
+ "original": "'_blank' | '_parent' | '_self' | '_top'",
66
+ "resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\" | undefined",
67
+ "references": {}
68
+ },
69
+ "required": false,
70
+ "optional": true,
71
+ "docs": {
72
+ "tags": [],
73
+ "text": "Tells the browser where to open the link. Only used when `href` is set."
74
+ },
75
+ "getter": false,
76
+ "setter": false,
77
+ "reflect": false
78
+ },
79
+ "size": {
80
+ "type": "string",
81
+ "attribute": "size",
82
+ "mutable": false,
83
+ "complexType": {
84
+ "original": "'small' | 'medium' | 'large'",
85
+ "resolved": "\"large\" | \"medium\" | \"small\"",
86
+ "references": {}
87
+ },
88
+ "required": false,
89
+ "optional": false,
90
+ "docs": {
91
+ "tags": [],
92
+ "text": "The breadcrumbs item size."
93
+ },
94
+ "getter": false,
95
+ "setter": false,
96
+ "reflect": true,
97
+ "defaultValue": "'medium'"
98
+ },
99
+ "readonly": {
100
+ "type": "boolean",
101
+ "attribute": "read-only",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "boolean",
105
+ "resolved": "boolean",
106
+ "references": {}
107
+ },
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": "Set to true to readonly the breadcrumb item."
113
+ },
114
+ "getter": false,
115
+ "setter": false,
116
+ "reflect": true,
117
+ "defaultValue": "false"
118
+ }
119
+ };
120
+ }
121
+ static get elementRef() { return "host"; }
122
+ }
123
+ //# sourceMappingURL=six-breadcrumbs-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"six-breadcrumbs-item.js","sourceRoot":"","sources":["../../../src/components/six-breadcrumbs-item/six-breadcrumbs-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AAMH,MAAM,OAAO,kBAAkB;IAL/B;QAcE,iCAAiC;QACR,SAAI,GAAiC,QAAQ,CAAC;QAEvE,mDAAmD;QACF,aAAQ,GAAY,KAAK,CAAC;KAwB5E;IAtBC,MAAM;QACJ,OAAO,CACL,4DAAK,IAAI,EAAC,MAAM;YACd,mEACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,EAAE,0BAA0B,EAAE,IAAI,CAAC,QAAQ,EAAE,EACpD,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACxC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI;gBAEf,6DAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG;gBACpC,8DAAQ;gBACR,6DAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,CACzB;YACb,6DAAM,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,iBAAa,MAAM;gBAC1E,6DAAM,IAAI,EAAC,WAAW,GAAG,CACpB,CACH,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Breadcrumb items are used inside breadcrumbs to represent different links.\n *\n * @since 5.0\n * @status beta\n *\n * @slot - The breadcrumb item’s label.\n * @slot prefix - An optional prefix, usually an icon or icon button.\n * @slot suffix - An optional suffix, usually an icon or icon button.\n * @slot separator - The separator to use for the breadcrumb item. This will only change the separator for this item. If you want to change it for all items in the group, set the separator on six-breadcrumbs instead.\n *\n * @part base - The component's base wrapper.\n * @part button - The button that renders the item\n * @part separator - The separator\n */\n@Component({\n tag: 'six-breadcrumbs-item',\n styleUrl: 'six-breadcrumbs-item.scss',\n shadow: true,\n})\nexport class SixBreadcrumbsItem {\n @Element() host!: HTMLSixBreadcrumbsItemElement;\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 /** The breadcrumbs item size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to readonly the breadcrumb item. */\n @Prop({ attribute: 'read-only', reflect: true }) readonly: boolean = false;\n\n render() {\n return (\n <div part=\"base\">\n <six-button\n part=\"button\"\n type=\"link\"\n class={{ 'breadcrumb-item-readonly': this.readonly }}\n href={this.readonly ? undefined : this.href}\n tabindex={this.readonly ? -1 : undefined}\n target={this.target}\n size={this.size}\n >\n <slot name=\"prefix\" slot=\"prefix\" />\n <slot />\n <slot name=\"suffix\" slot=\"suffix\" />\n </six-button>\n <span part=\"separator\" class=\"breadcrumb-item__separator\" aria-hidden=\"true\">\n <slot name=\"separator\" />\n </span>\n </div>\n );\n }\n}\n"]}
@@ -104,7 +104,7 @@ export class SixButton {
104
104
  const isLink = this.href != null;
105
105
  const isButton = !isLink;
106
106
  const Button = isLink ? 'a' : 'button';
107
- 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: {
107
+ 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: {
108
108
  button: true,
109
109
  // Types
110
110
  'button--secondary': this.type === 'secondary',
@@ -129,7 +129,7 @@ export class SixButton {
129
129
  'button--has-label': this.hasLabel,
130
130
  'button--has-prefix': this.hasPrefix,
131
131
  'button--has-suffix': this.hasSuffix,
132
- }, 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' }))));
132
+ }, 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' }))));
133
133
  }
134
134
  static get is() { return "six-button"; }
135
135
  static get encapsulation() { return "shadow"; }
@@ -7,7 +7,7 @@ import { h, Host } from "@stencil/core";
7
7
  */
8
8
  export class SixCard {
9
9
  render() {
10
- return (h(Host, { key: '8ba5461ffe1740e8f2b7061701cf8f06e24adc25' }, h("slot", { key: '95fde97191f2c89fe76643450e6e9eb4dcbe9fa2' })));
10
+ return (h(Host, { key: '9a56f190ccdf8545c4503284ae32a23220e1af37' }, h("slot", { key: 'db6e7fe7d83c4e41747ad39a85bf108ce581ae87' })));
11
11
  }
12
12
  static get is() { return "six-card"; }
13
13
  static get encapsulation() { return "shadow"; }
@@ -121,14 +121,14 @@ export class SixCheckbox {
121
121
  this.hasErrorSlot = hasSlot(this.host, 'error-text');
122
122
  }
123
123
  render() {
124
- return (h(FormControl, { key: 'cf87dbd9fbe4063c8579a41e729f06f6ea4ad41c', inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, errorTextId: this.errorTextId, hasErrorTextSlot: this.hasErrorSlot, errorText: this.errorText, errorTextCount: this.errorTextCount, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { key: 'c3b2be07e9c25c226cac5d2d71d76e4096af15f8', part: "base", class: {
124
+ return (h(FormControl, { key: '1ed8885c3a37d420684480a982a38944ca869a1a', inputId: this.inputId, label: this.label, labelId: this.labelId, hasLabelSlot: this.hasLabelSlot, errorTextId: this.errorTextId, hasErrorTextSlot: this.hasErrorSlot, errorText: this.errorText, errorTextCount: this.errorTextCount, size: "medium", disabled: this.disabled, required: this.required, displayError: this.invalid }, h("label", { key: '36a5a7bcfdd28499e70fcd432a38fc89cb48ce64', part: "base", class: {
125
125
  checkbox: true,
126
126
  'checkbox--checked': this.checked,
127
127
  'checkbox--disabled': this.disabled,
128
128
  'checkbox--focused': this.hasFocus,
129
129
  'checkbox--invalid': this.invalid,
130
130
  'checkbox--indeterminate': this.indeterminate,
131
- }, htmlFor: this.inputId, onMouseDown: this.handleMouseDown }, h("span", { key: '9c01a62b12b784e69e8ce7fd52f48aed3e86c278', part: "control", class: "checkbox__control" }, this.checked && (h("span", { key: '9d755d8a162152a268f8883abaeb15d33c3a48e7', part: "checked-icon", class: "checkbox__icon" }, h("svg", { key: 'ca598e4be471eb72eb0c416a2d2bf6d79fa51fe4', viewBox: "0 0 16 16" }, h("g", { key: 'dd4db42d3000bf096968520e15cc85f94140c7e3', stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round" }, h("g", { key: '8d83aa9af87622aaf724fa2ed91c18ac3df9cba6', stroke: "currentColor", "stroke-width": "2" }, h("g", { key: 'dd5d60bb007d3f493f7ab19b9fa8b2973a596707', transform: "translate(3.428571, 3.428571)" }, h("path", { key: '474b99c56df6507a6013ffbc3fcb5dab7479c79e', d: "M0,5.71428571 L3.42857143,9.14285714" }), h("path", { key: '2b8965fb78d5eed486589c93473d0e3ec2569a16', d: "M9.14285714,0 L3.42857143,9.14285714" }))))))), !this.checked && this.indeterminate && (h("span", { key: '860e7c9141f737a325bd95731fd8600e00c35db4', part: "indeterminate-icon", class: "checkbox__icon" }, h("svg", { key: 'ef9a9f0d090da9bb754e85a06652c00433fa90a9', viewBox: "0 0 16 16" }, h("g", { key: 'dc8235d73ef8b7658519f3acfb7fd56349801404', stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round" }, h("g", { key: '62987b29c7c3f6bbacf4feef4e4beaf31bf722ed', stroke: "currentColor", "stroke-width": "2" }, h("g", { key: '6be444ed0dd4cbae66f570afa0b85152b1f4da96', transform: "translate(2.285714, 6.857143)" }, h("path", { key: 'bcd6968d3eee416a62ad75570a0402654c2efc04', d: "M10.2857143,1.14285714 L1.14285714,1.14285714" }))))))), h("input", { key: '38c2532ca810970494543d5eca8927c26cf92e78', ref: (el) => (this.nativeInput = el), id: this.inputId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "checkbox", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus })), h("span", { key: '1c12af81f2b724803cf2224d4ff8178774b4f7ea', part: "text", id: this.textId, class: "checkbox__text" }, h("slot", { key: '488fe82970614b07112449e67d4374b1cc186dfe' })))));
131
+ }, htmlFor: this.inputId, onMouseDown: this.handleMouseDown }, h("span", { key: '837373ab4ae9a6f90852f4d9176ac6e844d31579', part: "control", class: "checkbox__control" }, this.checked && (h("span", { key: 'f7d9c7ba567ee2d28913714cfb8fdb972e0b9f25', part: "checked-icon", class: "checkbox__icon" }, h("svg", { key: '2193316f61d53f3302e14a43b587b07778ae590e', viewBox: "0 0 16 16" }, h("g", { key: '36990bcb579ade7b26a26d6b93a8dd4f8226781e', stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round" }, h("g", { key: '712be85f8623db8f143ef64f9c44b6433a530eab', stroke: "currentColor", "stroke-width": "2" }, h("g", { key: 'e716ffab7308468ccc86b294d0052428a2ca0602', transform: "translate(3.428571, 3.428571)" }, h("path", { key: 'a2ca8e37d8ff88bf94adfc7af850c447b9a4e9b4', d: "M0,5.71428571 L3.42857143,9.14285714" }), h("path", { key: '82f92da775cb1e49281eaee37792e326c5b41a60', d: "M9.14285714,0 L3.42857143,9.14285714" }))))))), !this.checked && this.indeterminate && (h("span", { key: 'b852b9c3dc0d083d9ba3b9f24c2f8f93f42bfe9b', part: "indeterminate-icon", class: "checkbox__icon" }, h("svg", { key: '2f888c93c3a69846ef8d96858f9064c7da02f37d', viewBox: "0 0 16 16" }, h("g", { key: '33828186ba162b59f88d3528453e497c59ea5211', stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round" }, h("g", { key: 'a71f0a3498aa7cab1e9be14f07558813b8f4b287', stroke: "currentColor", "stroke-width": "2" }, h("g", { key: '2ff1a113d888f14358845323cccae4b9d8bbd1e0', transform: "translate(2.285714, 6.857143)" }, h("path", { key: '737d8c10e532a2037e20997d5f41cc99fa84dc03', d: "M10.2857143,1.14285714 L1.14285714,1.14285714" }))))))), h("input", { key: '0fef28fe71ba5263a33eadda6a63329b3d2bec1f', ref: (el) => (this.nativeInput = el), id: this.inputId, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, role: "checkbox", "aria-checked": this.checked ? 'true' : 'false', "aria-labelledby": this.labelId, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus })), h("span", { key: 'db92ca95a892368e88b2aecfeff53a54eb5cc683', part: "text", id: this.textId, class: "checkbox__text" }, h("slot", { key: 'c2f6c9778b16dc344ad342254ef9ff2b624334f1' })))));
132
132
  }
133
133
  static get is() { return "six-checkbox"; }
134
134
  static get encapsulation() { return "shadow"; }
@@ -68,6 +68,38 @@ export function toPointerDate(isoDate) {
68
68
  day: parseInt(isoDate.slice(8), 10),
69
69
  };
70
70
  }
71
+ export function nextPointerDate(selectionMode, pointerDate) {
72
+ if (selectionMode === 'day') {
73
+ if (pointerDate.month === 12) {
74
+ return { year: pointerDate.year + 1, month: 1, day: 1 };
75
+ }
76
+ else {
77
+ return { year: pointerDate.year, month: pointerDate.month + 1, day: 1 };
78
+ }
79
+ }
80
+ else if (selectionMode === 'month') {
81
+ return Object.assign(Object.assign({}, pointerDate), { year: pointerDate.year + 1 });
82
+ }
83
+ else if (selectionMode === 'year') {
84
+ return Object.assign(Object.assign({}, pointerDate), { year: pointerDate.year + 25 });
85
+ }
86
+ return pointerDate;
87
+ }
88
+ export function previousPointerDate(selectionMode, pointerDate) {
89
+ switch (selectionMode) {
90
+ case 'day':
91
+ if (pointerDate.month === 1) {
92
+ return { year: pointerDate.year - 1, month: 12, day: 1 };
93
+ }
94
+ else {
95
+ return { year: pointerDate.year, month: pointerDate.month - 1, day: 1 };
96
+ }
97
+ case 'month':
98
+ return Object.assign(Object.assign({}, pointerDate), { year: pointerDate.year - 1 });
99
+ case 'year':
100
+ return Object.assign(Object.assign({}, pointerDate), { year: pointerDate.year - 25 });
101
+ }
102
+ }
71
103
  export function todayAsPointerDate() {
72
104
  const today = new Date();
73
105
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"iso-date.js","sourceRoot":"","sources":["../../../src/components/six-date/iso-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAavE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB,EAAE,UAAkB;IACxE,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACvD,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,UAAkB;IAC7D,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAO,SAAS,CAAC,IAAI,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,CAAY,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,OAAO,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAgB;IACvC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAgB;IACtC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QACxC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE;QACzB,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;QAC3B,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE;KACrB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACjB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,EAAE,CAAC;IACtD,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO;YACL,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,kBAAkB,EAAE;YACjC,OAAO,EAAE,wBAAwB,KAAK,0DAA0D;SACjG,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;AACtD,CAAC","sourcesContent":["import { format, formatISO, isValid, parse, parseISO } from 'date-fns';\n\n/**\n * Represent an iso date string like `2021-01-08`.\n */\nexport type IsoDate = string;\n\nexport interface PointerDate {\n year: number;\n month: number;\n day: number;\n}\n\n/**\n * Validates a date string against a given format and returns an IsoDate if valid.\n *\n * Example format patterns for year, month, and day:\n * - Year: \"yyyy\" (e.g., \"2021\")\n * - Month: \"MM\" (e.g., \"01\" for January, \"12\" for December)\n * - Day: \"dd\" (e.g., \"08\" for the 8th day of the month)\n *\n * Common format examples:\n * - \"yyyy-MM-dd\" (e.g., \"2021-01-08\")\n * - \"dd.MM.yyyy\" (e.g., \"08.01.2021\")\n * - \"MM/dd/yyyy\" (e.g., \"01/08/2021\")\n *\n * @param dateString - The date string to validate.\n * @param dateFormat - The expected format of the date string (e.g., \"yyyy-MM-dd\").\n * @returns An IsoDate if the date string is valid, otherwise undefined.\n */\nexport function fromFormattedString(dateString: string, dateFormat: string): IsoDate | undefined {\n const date = parse(dateString, dateFormat, new Date());\n if (isValid(date)) {\n return fromDate(date);\n }\n return undefined;\n}\n\n/**\n * Formats a given ISO date string into a specified format.\n *\n * Example format patterns for year, month, and day:\n * - Year: \"yyyy\" (e.g., \"2021\")\n * - Month: \"MM\" (e.g., \"01\" for January, \"12\" for December)\n * - Day: \"dd\" (e.g., \"08\" for the 8th day of the month)\n *\n * Common format examples:\n * - \"yyyy-MM-dd\" (e.g., \"2021-01-08\")\n * - \"dd.MM.yyyy\" (e.g., \"08.01.2021\")\n * - \"MM/dd/yyyy\" (e.g., \"01/08/2021\")\n *\n * @param {IsoDate} isoDate - The ISO date string to be formatted.\n * @param {string} dateFormat - The desired date format string.\n * @return {string} A string representing the formatted date.\n */\nexport function formatDate(isoDate: IsoDate, dateFormat: string): string {\n return format(parseISO(isoDate), dateFormat);\n}\n\nexport function fromDate(date: Date): IsoDate {\n return formatISO(date, { representation: 'date' }) as IsoDate;\n}\n\nexport function today(): IsoDate {\n return fromDate(new Date());\n}\n\nexport function isValidIsoDate(isoDate: string): isoDate is IsoDate {\n return isValid(parseISO(isoDate));\n}\n\nexport function getMonth(isoDate: IsoDate): number {\n return toPointerDate(isoDate).month;\n}\n\nexport function getYear(isoDate: IsoDate): number {\n return toPointerDate(isoDate).year;\n}\n\nexport function toPointerDate(isoDate: IsoDate): PointerDate {\n if (!isValidIsoDate(isoDate)) {\n throw new Error(`Invalid ISO date: ${isoDate}`);\n }\n\n return {\n year: parseInt(isoDate.slice(0, 4), 10),\n month: parseInt(isoDate.slice(5, 7), 10),\n day: parseInt(isoDate.slice(8), 10),\n };\n}\n\nexport function todayAsPointerDate(): PointerDate {\n const today = new Date();\n return {\n year: today.getFullYear(),\n month: today.getMonth() + 1,\n day: today.getDate(),\n };\n}\n\nexport function cleanupValue(value: unknown): { value: IsoDate | ''; pointerDate: PointerDate; warning?: string } {\n if (value === '') {\n return { value, pointerDate: todayAsPointerDate() };\n }\n\n if (typeof value !== 'string' || !isValidIsoDate(value)) {\n return {\n value: '',\n pointerDate: todayAsPointerDate(),\n warning: `The specified value '${value}' does not conform to the required format, \"yyyy-MM-dd\".`,\n };\n }\n\n return { value, pointerDate: toPointerDate(value) };\n}\n"]}
1
+ {"version":3,"file":"iso-date.js","sourceRoot":"","sources":["../../../src/components/six-date/iso-date.ts"],"names":[],"mappings":"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","sourcesContent":["import { format, formatISO, isValid, parse, parseISO } from 'date-fns';\n\n/**\n * Represent an iso date string like `2021-01-08`.\n */\nexport type IsoDate = string;\n\nexport interface PointerDate {\n year: number;\n month: number;\n day: number;\n}\n\n/**\n * Validates a date string against a given format and returns an IsoDate if valid.\n *\n * Example format patterns for year, month, and day:\n * - Year: \"yyyy\" (e.g., \"2021\")\n * - Month: \"MM\" (e.g., \"01\" for January, \"12\" for December)\n * - Day: \"dd\" (e.g., \"08\" for the 8th day of the month)\n *\n * Common format examples:\n * - \"yyyy-MM-dd\" (e.g., \"2021-01-08\")\n * - \"dd.MM.yyyy\" (e.g., \"08.01.2021\")\n * - \"MM/dd/yyyy\" (e.g., \"01/08/2021\")\n *\n * @param dateString - The date string to validate.\n * @param dateFormat - The expected format of the date string (e.g., \"yyyy-MM-dd\").\n * @returns An IsoDate if the date string is valid, otherwise undefined.\n */\nexport function fromFormattedString(dateString: string, dateFormat: string): IsoDate | undefined {\n const date = parse(dateString, dateFormat, new Date());\n if (isValid(date)) {\n return fromDate(date);\n }\n return undefined;\n}\n\n/**\n * Formats a given ISO date string into a specified format.\n *\n * Example format patterns for year, month, and day:\n * - Year: \"yyyy\" (e.g., \"2021\")\n * - Month: \"MM\" (e.g., \"01\" for January, \"12\" for December)\n * - Day: \"dd\" (e.g., \"08\" for the 8th day of the month)\n *\n * Common format examples:\n * - \"yyyy-MM-dd\" (e.g., \"2021-01-08\")\n * - \"dd.MM.yyyy\" (e.g., \"08.01.2021\")\n * - \"MM/dd/yyyy\" (e.g., \"01/08/2021\")\n *\n * @param {IsoDate} isoDate - The ISO date string to be formatted.\n * @param {string} dateFormat - The desired date format string.\n * @return {string} A string representing the formatted date.\n */\nexport function formatDate(isoDate: IsoDate, dateFormat: string): string {\n return format(parseISO(isoDate), dateFormat);\n}\n\nexport function fromDate(date: Date): IsoDate {\n return formatISO(date, { representation: 'date' }) as IsoDate;\n}\n\nexport function today(): IsoDate {\n return fromDate(new Date());\n}\n\nexport function isValidIsoDate(isoDate: string): isoDate is IsoDate {\n return isValid(parseISO(isoDate));\n}\n\nexport function getMonth(isoDate: IsoDate): number {\n return toPointerDate(isoDate).month;\n}\n\nexport function getYear(isoDate: IsoDate): number {\n return toPointerDate(isoDate).year;\n}\n\nexport function toPointerDate(isoDate: IsoDate): PointerDate {\n if (!isValidIsoDate(isoDate)) {\n throw new Error(`Invalid ISO date: ${isoDate}`);\n }\n return {\n year: parseInt(isoDate.slice(0, 4), 10),\n month: parseInt(isoDate.slice(5, 7), 10),\n day: parseInt(isoDate.slice(8), 10),\n };\n}\n\nexport function nextPointerDate(selectionMode: 'day' | 'month' | 'year', pointerDate: PointerDate): PointerDate {\n if (selectionMode === 'day') {\n if (pointerDate.month === 12) {\n return { year: pointerDate.year + 1, month: 1, day: 1 };\n } else {\n return { year: pointerDate.year, month: pointerDate.month + 1, day: 1 };\n }\n } else if (selectionMode === 'month') {\n return { ...pointerDate, year: pointerDate.year + 1 };\n } else if (selectionMode === 'year') {\n return { ...pointerDate, year: pointerDate.year + 25 };\n }\n return pointerDate;\n}\n\nexport function previousPointerDate(selectionMode: 'day' | 'month' | 'year', pointerDate: PointerDate): PointerDate {\n switch (selectionMode) {\n case 'day':\n if (pointerDate.month === 1) {\n return { year: pointerDate.year - 1, month: 12, day: 1 };\n } else {\n return { year: pointerDate.year, month: pointerDate.month - 1, day: 1 };\n }\n case 'month':\n return { ...pointerDate, year: pointerDate.year - 1 };\n case 'year':\n return { ...pointerDate, year: pointerDate.year - 25 };\n }\n}\n\nexport function todayAsPointerDate(): PointerDate {\n const today = new Date();\n return {\n year: today.getFullYear(),\n month: today.getMonth() + 1,\n day: today.getDate(),\n };\n}\n\nexport function cleanupValue(value: unknown): { value: IsoDate | ''; pointerDate: PointerDate; warning?: string } {\n if (value === '') {\n return { value, pointerDate: todayAsPointerDate() };\n }\n\n if (typeof value !== 'string' || !isValidIsoDate(value)) {\n return {\n value: '',\n pointerDate: todayAsPointerDate(),\n warning: `The specified value '${value}' does not conform to the required format, \"yyyy-MM-dd\".`,\n };\n }\n\n return { value, pointerDate: toPointerDate(value) };\n}\n"]}
@@ -4,7 +4,7 @@ import { hasSlot } from "../../utils/slot";
4
4
  import { MonthSelection } from "./components/month-selection";
5
5
  import { YearSelection } from "./components/year-selection";
6
6
  import { DaySelection } from "./components/day-selection";
7
- import { cleanupValue, formatDate, fromFormattedString, todayAsPointerDate, toPointerDate } from "./iso-date";
7
+ import { cleanupValue, formatDate, fromFormattedString, nextPointerDate, previousPointerDate, todayAsPointerDate, toPointerDate, } from "./iso-date";
8
8
  import { createCalendarGrid } from "./calendar-grid";
9
9
  import { translateFormatHelp, translateMonth } from "./translations";
10
10
  import Popover from "../../utils/popover";
@@ -95,38 +95,10 @@ export class SixDate {
95
95
  this.clearable = false;
96
96
  this.panelHideInProgress = false;
97
97
  this.handlePreviousClick = () => {
98
- switch (this.selectionMode) {
99
- case 'day':
100
- if (this.pointerDate.month === 0) {
101
- this.pointerDate = { year: this.pointerDate.year - 1, month: 11, day: 1 };
102
- }
103
- else {
104
- this.pointerDate = { year: this.pointerDate.year, month: this.pointerDate.month - 1, day: 1 };
105
- }
106
- break;
107
- case 'month':
108
- this.pointerDate = Object.assign(Object.assign({}, this.pointerDate), { year: this.pointerDate.year - 1 });
109
- break;
110
- case 'year':
111
- this.pointerDate = Object.assign(Object.assign({}, this.pointerDate), { year: this.pointerDate.year - NUMBER_OF_YEARS_SHOWN });
112
- break;
113
- }
98
+ this.pointerDate = previousPointerDate(this.selectionMode, this.pointerDate);
114
99
  };
115
100
  this.handleNextClick = () => {
116
- if (this.selectionMode === 'day') {
117
- if (this.pointerDate.month === 11) {
118
- this.pointerDate = { year: this.pointerDate.year + 1, month: 0, day: 1 };
119
- }
120
- else {
121
- this.pointerDate = { year: this.pointerDate.year, month: this.pointerDate.month + 1, day: 1 };
122
- }
123
- }
124
- else if (this.selectionMode === 'month') {
125
- this.pointerDate = Object.assign(Object.assign({}, this.pointerDate), { year: this.pointerDate.year + 1 });
126
- }
127
- else if (this.selectionMode === 'year') {
128
- this.pointerDate = Object.assign(Object.assign({}, this.pointerDate), { year: this.pointerDate.year + NUMBER_OF_YEARS_SHOWN });
129
- }
101
+ this.pointerDate = nextPointerDate(this.selectionMode, this.pointerDate);
130
102
  };
131
103
  this.handleDocumentMouseDown = (event) => {
132
104
  const baseElement = this.getSixInputBaseElement();
@@ -208,6 +180,7 @@ export class SixDate {
208
180
  if (warning != null) {
209
181
  console.warn(warning);
210
182
  }
183
+ this.updateInputElementValue();
211
184
  }
212
185
  getSixInputBaseElement() {
213
186
  var _a, _b;
@@ -248,7 +221,7 @@ export class SixDate {
248
221
  });
249
222
  }
250
223
  updateInputElementValue() {
251
- if (this.inputElement) {
224
+ if (this.inputElement && document.activeElement !== this.host) {
252
225
  this.inputElement.value = this.value === '' ? '' : formatDate(this.value, this.dateFormat);
253
226
  }
254
227
  }
@@ -269,7 +242,7 @@ export class SixDate {
269
242
  this.popoverHelper = undefined;
270
243
  }
271
244
  render() {
272
- return (h("div", { key: '2fccfb9c005bf6ac4906be3735c3b0fc61bfad8f', class: "container" }, h("six-input", { key: '453bf29f4aec7bc192d1bc5191c7f74a93f0ac48', ref: (el) => (this.inputElement = el), placeholder: this.placeholder == null ? this.dateFormat : this.placeholder, readonly: this.readonly, disabled: this.disabled, name: this.name, label: this.label, required: this.required, helpText: this.helpText, errorText: this.errorText, errorTextCount: this.errorTextCount, invalid: this.invalid, onKeyDown: this.handleInputKeyDown, onInput: this.handleInputChange, onBlur: this.handleInputBlur, "onSix-input-clear": this.handleInputClearClick, size: this.size, clearable: this.clearable, "aria-describedby": "date-format" }, h("six-icon", { key: '93e4add573a5617e9f90e9e8060a9a3a6ec10b98', slot: "prefix", size: this.size === 'large' ? 'medium' : this.size }, "today"), hasSlot(this.host, 'label') ? (h("span", { slot: "label" }, h("slot", { name: "label" }))) : null, hasSlot(this.host, 'error-text') ? (h("span", { slot: "error-text" }, h("slot", { name: "error-text" }))) : null, hasSlot(this.host, 'help-text') ? (h("span", { slot: "help-text" }, h("slot", { name: "help-text" }))) : null), h("span", { key: '5fb919b6861ed8307de1105c881350d4094bbf52', id: "date-format", class: "sr-only" }, translateFormatHelp(this.language, this.dateFormat)), h("div", { key: 'ccddb6c5b5c49f77d31d2d0c75742cc0ffbda2ee', ref: (el) => (this.positioner = el), class: "positioner" }, h("div", { key: '3eec69b5bac555fd542cab3a967700403af68750', class: "panel", ref: (el) => (this.panel = el) }, h("header", { key: 'a16e0c72e430580b0f0c229476b7c45ea50e194a', class: "panel__header" }, h("six-icon-button", { key: 'bfc02505301c5264de2934f3f4f3fcea52cacf07', tabindex: "-1", class: "previous", onClick: this.handlePreviousClick, name: "arrow_back_ios" }), this.selectionMode === 'day' && (h("div", { key: '2f64e3cc6f2ee9326c953f81b1ea6a3f5ab13551', class: "selector", onClick: () => (this.selectionMode = 'month') }, translateMonth(this.pointerDate.month, this.language), h("six-icon", { key: '9372e403d994348716322f39d7e30971c3d37842' }, "arrow_drop_down"))), this.selectionMode !== 'year' && (h("div", { key: '16a3de3dd5207eeb91d341a02b93b11e707f3372', class: "selector", onClick: () => (this.selectionMode = 'year') }, this.pointerDate.year, h("six-icon", { key: '81024acff597b548875a7500cbb5aab7ba47952e' }, "arrow_drop_down"))), this.selectionMode === 'year' && (h("div", { key: 'f8615b0ca8ce732a18776e3677a997fd43d9fac4', class: "selector" }, this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2), " \u2013", ' ', this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2))), h("six-icon-button", { key: '0e689a5621ae8a62415c4a19efb64a983b720115', tabindex: "-1", class: "next", onClick: this.handleNextClick, name: "arrow_forward_ios" })), this.selectionMode === 'day' && (h(DaySelection, { key: '6fe9920a9449418460e069eefa96adda867c2eb3', language: this.language, calendarGrid: createCalendarGrid({
245
+ return (h("div", { key: '915708e6b3815709fbf93546453a1527f0e2f4b2', class: "container" }, h("six-input", { key: '7beac04f73a37fba611860890c02a79d5a065fb6', ref: (el) => (this.inputElement = el), placeholder: this.placeholder == null ? this.dateFormat : this.placeholder, readonly: this.readonly, disabled: this.disabled, name: this.name, label: this.label, required: this.required, helpText: this.helpText, errorText: this.errorText, errorTextCount: this.errorTextCount, invalid: this.invalid, onKeyDown: this.handleInputKeyDown, onInput: this.handleInputChange, onBlur: this.handleInputBlur, "onSix-input-clear": this.handleInputClearClick, size: this.size, clearable: this.clearable, "aria-describedby": "date-format" }, h("six-icon", { key: '88f5d61c8d6af1627be1b9ed5ddf534669cbbedd', slot: "prefix", size: this.size === 'large' ? 'medium' : this.size }, "today"), hasSlot(this.host, 'label') ? (h("span", { slot: "label" }, h("slot", { name: "label" }))) : null, hasSlot(this.host, 'error-text') ? (h("span", { slot: "error-text" }, h("slot", { name: "error-text" }))) : null, hasSlot(this.host, 'help-text') ? (h("span", { slot: "help-text" }, h("slot", { name: "help-text" }))) : null), h("span", { key: '36f359e7ed900e6102444dcbf7e7c22b1aac042d', id: "date-format", class: "sr-only" }, translateFormatHelp(this.language, this.dateFormat)), h("div", { key: '560443132d2dbe1f0f2c147c2d0538eb33c7b76a', ref: (el) => (this.positioner = el), class: "positioner" }, h("div", { key: '800d71554bf415d0e39d40696271791785004e7f', class: "panel", ref: (el) => (this.panel = el) }, h("header", { key: '71baa85fece27f99982e5cb06e15c5d89d81f7a1', class: "panel__header" }, h("six-icon-button", { key: '43274a816945112492cb030012f4ecd0f1c6f5f3', tabindex: "-1", class: "previous", onClick: this.handlePreviousClick, name: "arrow_back_ios" }), this.selectionMode === 'day' && (h("div", { key: '2f391850b72291bfb7249bccf2ccf4aea6387340', class: "selector", onClick: () => (this.selectionMode = 'month') }, translateMonth(this.pointerDate.month, this.language), h("six-icon", { key: '95ea49cd1ccbeec9019491799cefb4d31b846f87' }, "arrow_drop_down"))), this.selectionMode !== 'year' && (h("div", { key: '7d65185d34d64361b8addfac6e3a5eb130fcf6b7', class: "selector", onClick: () => (this.selectionMode = 'year') }, this.pointerDate.year, h("six-icon", { key: 'ab5c06e07a09f945e845902588096ce4f906b5bf' }, "arrow_drop_down"))), this.selectionMode === 'year' && (h("div", { key: '9871ad7e39d18fdd5629b0f9d1caf935952d4ca5', class: "selector" }, this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2), " \u2013", ' ', this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2))), h("six-icon-button", { key: '20bafd71902a85f3db3c3b54628555b0f86e50aa', tabindex: "-1", class: "next", onClick: this.handleNextClick, name: "arrow_forward_ios" })), this.selectionMode === 'day' && (h(DaySelection, { key: '38e23637ec958abf9615adba7900f4ea6b15f27c', language: this.language, calendarGrid: createCalendarGrid({
273
246
  year: this.pointerDate.year,
274
247
  month: this.pointerDate.month,
275
248
  selected: this.value || undefined,
@@ -277,7 +250,7 @@ export class SixDate {
277
250
  maxDate: this.max,
278
251
  dateFormat: this.dateFormat,
279
252
  allowedDates: this.allowedDates,
280
- }), dayClicked: this.handleDayClick })), this.selectionMode === 'month' && (h(MonthSelection, { key: 'ad02bb9d8b6c96abf77ccd30585490b2236fbfd0', language: this.language, selected: this.value, monthClicked: this.handleMonthClicked })), this.selectionMode === 'year' && (h(YearSelection, { key: 'a14118d8b9ec16182522d1de6dc12d9026ef3aa3', selected: this.value, pointerYear: this.pointerDate.year, yearCount: NUMBER_OF_YEARS_SHOWN, yearClicked: this.handleYearClicked }))))));
253
+ }), dayClicked: this.handleDayClick })), this.selectionMode === 'month' && (h(MonthSelection, { key: '10ec980d8a5fc1bf6480a96ee5df66abb9b347cb', language: this.language, selected: this.value, monthClicked: this.handleMonthClicked })), this.selectionMode === 'year' && (h(YearSelection, { key: 'ba791467977c55f80781a20774c5e32951641877', selected: this.value, pointerYear: this.pointerDate.year, yearCount: NUMBER_OF_YEARS_SHOWN, yearClicked: this.handleYearClicked }))))));
281
254
  }
282
255
  static get is() { return "six-date"; }
283
256
  static get encapsulation() { return "shadow"; }