@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.
- package/dist/cjs/icon-4irykc7V.js +17 -0
- package/dist/cjs/icon-4irykc7V.js.map +1 -0
- package/dist/cjs/index-C8rK7OAe.js +12 -8
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/six-breadcrumbs-item.cjs.entry.js +25 -0
- package/dist/cjs/six-breadcrumbs-item.cjs.entry.js.map +1 -0
- package/dist/cjs/six-breadcrumbs-item.entry.cjs.js.map +1 -0
- package/dist/cjs/six-breadcrumbs.cjs.entry.js +73 -0
- package/dist/cjs/six-breadcrumbs.cjs.entry.js.map +1 -0
- package/dist/cjs/six-breadcrumbs.entry.cjs.js.map +1 -0
- package/dist/cjs/six-button.six-spinner.entry.cjs.js.map +1 -0
- package/dist/cjs/{six-button.cjs.entry.js → six-button_2.cjs.entry.js} +55 -4
- package/dist/cjs/six-button_2.cjs.entry.js.map +1 -0
- package/dist/cjs/six-card.cjs.entry.js +1 -1
- package/dist/cjs/six-checkbox_2.cjs.entry.js +4 -4
- package/dist/cjs/six-date.cjs.entry.js +38 -33
- package/dist/cjs/six-date.cjs.entry.js.map +1 -1
- package/dist/cjs/six-date.entry.cjs.js.map +1 -1
- package/dist/cjs/six-datepicker.cjs.entry.js +3 -3
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-datepicker.entry.cjs.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +3 -3
- package/dist/cjs/six-dropdown.six-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +3 -3
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +1 -1
- package/dist/cjs/six-error.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +1 -1
- package/dist/cjs/six-header-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/six-header-item.cjs.entry.js +1 -1
- package/dist/cjs/six-header-menu-button.cjs.entry.js +1 -1
- package/dist/cjs/six-header.cjs.entry.js +2 -2
- package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/six-icon.cjs.entry.js +15 -6
- package/dist/cjs/six-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/six-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +2 -2
- package/dist/cjs/six-range.cjs.entry.js +2 -2
- package/dist/cjs/six-rating.cjs.entry.js +2 -2
- package/dist/cjs/six-root.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/six-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/six-switch.cjs.entry.js +2 -2
- package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +2 -2
- package/dist/cjs/six-tag.cjs.entry.js +2 -2
- package/dist/cjs/six-textarea.cjs.entry.js +2 -2
- package/dist/cjs/six-tile.cjs.entry.js +5 -5
- package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-timepicker.entry.cjs.js.map +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/ui-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.css +27 -0
- package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.js +109 -0
- package/dist/collection/components/six-breadcrumbs/six-breadcrumbs.js.map +1 -0
- package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.css +61 -0
- package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.js +123 -0
- package/dist/collection/components/six-breadcrumbs-item/six-breadcrumbs-item.js.map +1 -0
- package/dist/collection/components/six-button/six-button.js +2 -2
- package/dist/collection/components/six-card/six-card.js +1 -1
- package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
- package/dist/collection/components/six-date/iso-date.js +32 -0
- package/dist/collection/components/six-date/iso-date.js.map +1 -1
- package/dist/collection/components/six-date/six-date.js +7 -34
- package/dist/collection/components/six-date/six-date.js.map +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +4 -4
- package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
- package/dist/collection/components/six-details/six-details.js +3 -3
- package/dist/collection/components/six-error/six-error.js +1 -1
- package/dist/collection/components/six-error-page/six-error-page.js +1 -1
- package/dist/collection/components/six-file-list/six-file-list.js +1 -1
- package/dist/collection/components/six-footer/six-footer.js +1 -1
- package/dist/collection/components/six-group-label/six-group-label.js +1 -1
- package/dist/collection/components/six-header/six-header.js +2 -2
- package/dist/collection/components/six-header-dropdown-item/six-header-dropdown-item.js +2 -2
- package/dist/collection/components/six-header-item/six-header-item.js +1 -1
- package/dist/collection/components/six-header-menu-button/six-header-menu-button.js +1 -1
- package/dist/collection/components/six-icon/six-icon.css +48 -34
- package/dist/collection/components/six-icon/six-icon.js +39 -5
- package/dist/collection/components/six-icon/six-icon.js.map +1 -1
- package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
- package/dist/collection/components/six-layout-grid/six-layout-grid.js +1 -1
- package/dist/collection/components/six-main-container/six-main-container.js +1 -1
- package/dist/collection/components/six-menu/six-menu.js +3 -3
- package/dist/collection/components/six-menu/six-menu.js.map +1 -1
- package/dist/collection/components/six-menu-divider/six-menu-divider.js +1 -1
- package/dist/collection/components/six-menu-item/six-menu-item.js +2 -2
- package/dist/collection/components/six-menu-label/six-menu-label.js +1 -1
- package/dist/collection/components/six-picto/six-picto.js +1 -1
- package/dist/collection/components/six-progress-bar/six-progress-bar.js +3 -3
- package/dist/collection/components/six-progress-ring/six-progress-ring.js +1 -1
- package/dist/collection/components/six-radio/six-radio.js +2 -2
- package/dist/collection/components/six-range/six-range.js +2 -2
- package/dist/collection/components/six-rating/six-rating.js +2 -2
- package/dist/collection/components/six-root/six-root.js +1 -1
- package/dist/collection/components/six-sidebar/six-sidebar.js +2 -2
- package/dist/collection/components/six-sidebar-item/six-sidebar-item.js +2 -2
- package/dist/collection/components/six-switch/six-switch.js +2 -2
- package/dist/collection/components/six-tab/six-tab.js +2 -2
- package/dist/collection/components/six-tab-panel/six-tab-panel.js +1 -1
- package/dist/collection/components/six-tag/six-tag.js +2 -2
- package/dist/collection/components/six-textarea/six-textarea.js +2 -2
- package/dist/collection/components/six-tile/six-tile.js +5 -5
- package/dist/collection/components/six-timepicker/six-timepicker.js +1 -1
- package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
- package/dist/collection/components/six-tooltip/six-tooltip.js +2 -2
- package/dist/collection/files/material-symbols-outlined-latin-fill-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-outlined-latin-full-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-outlined-latin-grad-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-outlined-latin-opsz-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-outlined-latin-standard-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-rounded-latin-fill-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-rounded-latin-full-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-rounded-latin-grad-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-rounded-latin-opsz-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-rounded-latin-standard-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-rounded-latin-wght-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-sharp-latin-fill-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-sharp-latin-full-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-sharp-latin-grad-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-sharp-latin-opsz-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-sharp-latin-standard-normal.woff2 +0 -0
- package/dist/collection/files/material-symbols-sharp-latin-wght-normal.woff2 +0 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/icon.js +10 -0
- package/dist/collection/utils/icon.js.map +1 -0
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-Cs1jspzx.js → p-B5aFlIg7.js} +6 -6
- package/dist/components/{p-Cs1jspzx.js.map → p-B5aFlIg7.js.map} +1 -1
- package/dist/components/{p-BUN8hFmL.js → p-BDCdPEjW.js} +4 -4
- package/dist/components/p-BDCdPEjW.js.map +1 -0
- package/dist/components/{p-Cfyrva2T.js → p-BKl-wAjt.js} +5 -5
- package/dist/components/{p-Cfyrva2T.js.map → p-BKl-wAjt.js.map} +1 -1
- package/dist/components/{p-CWKq6Dyt.js → p-BLocui1Z.js} +3 -3
- package/dist/components/{p-CWKq6Dyt.js.map → p-BLocui1Z.js.map} +1 -1
- package/dist/components/{p-DYlDF9Rw.js → p-CH82uB3t.js} +3 -3
- package/dist/components/{p-DYlDF9Rw.js.map → p-CH82uB3t.js.map} +1 -1
- package/dist/components/{p-CAJFkiLw.js → p-CIsPrMgs.js} +7 -7
- package/dist/components/{p-CAJFkiLw.js.map → p-CIsPrMgs.js.map} +1 -1
- package/dist/components/p-CT4IVFqs.js +71 -0
- package/dist/components/p-CT4IVFqs.js.map +1 -0
- package/dist/components/{p-9aUb96SZ.js → p-CcWikBVi.js} +8 -8
- package/dist/components/{p-9aUb96SZ.js.map → p-CcWikBVi.js.map} +1 -1
- package/dist/components/{p-C28WDWgL.js → p-Cj4iCimX.js} +7 -7
- package/dist/components/{p-C28WDWgL.js.map → p-Cj4iCimX.js.map} +1 -1
- package/dist/components/{p-Cosz73fX.js → p-CoOyRFuR.js} +6 -6
- package/dist/components/{p-Cosz73fX.js.map → p-CoOyRFuR.js.map} +1 -1
- package/dist/components/{p-DsGIkEDB.js → p-CzGRjc9h.js} +4 -4
- package/dist/components/{p-DsGIkEDB.js.map → p-CzGRjc9h.js.map} +1 -1
- package/dist/components/{p-BR2t7cws.js → p-Dirhd_mz.js} +3 -3
- package/dist/components/{p-BR2t7cws.js.map → p-Dirhd_mz.js.map} +1 -1
- package/dist/components/{p-DyYwMIDQ.js → p-DkoOhgRO.js} +3 -3
- package/dist/components/{p-DyYwMIDQ.js.map → p-DkoOhgRO.js.map} +1 -1
- package/dist/components/{p-CSL17OWk.js → p-KU002yza.js} +9 -9
- package/dist/components/{p-CSL17OWk.js.map → p-KU002yza.js.map} +1 -1
- package/dist/components/{p-ClylOmYH.js → p-jflTvJ8E.js} +4 -4
- package/dist/components/{p-ClylOmYH.js.map → p-jflTvJ8E.js.map} +1 -1
- package/dist/components/six-alert.js +2 -2
- package/dist/components/six-avatar.js +1 -1
- package/dist/components/six-breadcrumbs-item.d.ts +11 -0
- package/dist/components/six-breadcrumbs-item.js +58 -0
- package/dist/components/six-breadcrumbs-item.js.map +1 -0
- package/dist/components/six-breadcrumbs.d.ts +11 -0
- package/dist/components/six-breadcrumbs.js +97 -0
- package/dist/components/six-breadcrumbs.js.map +1 -0
- package/dist/components/six-button.js +1 -1
- package/dist/components/six-card.js +1 -1
- package/dist/components/six-checkbox.js +1 -1
- package/dist/components/six-date.js +42 -37
- package/dist/components/six-date.js.map +1 -1
- package/dist/components/six-datepicker.js +8 -8
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components/six-details.js +1 -1
- package/dist/components/six-dialog.js +2 -2
- package/dist/components/six-drawer.js +2 -2
- package/dist/components/six-dropdown.js +1 -1
- package/dist/components/six-error-page.js +2 -2
- package/dist/components/six-error.js +1 -1
- package/dist/components/six-file-list-item.js +1 -1
- package/dist/components/six-file-list.js +1 -1
- package/dist/components/six-file-upload.js +2 -2
- package/dist/components/six-footer.js +1 -1
- package/dist/components/six-group-label.js +2 -2
- package/dist/components/six-header-dropdown-item.js +9 -9
- package/dist/components/six-header-item.js +1 -1
- package/dist/components/six-header-menu-button.js +2 -2
- package/dist/components/six-header.js +2 -2
- package/dist/components/six-icon-button.js +1 -1
- package/dist/components/six-icon.js +1 -1
- package/dist/components/six-input.js +1 -1
- package/dist/components/six-item-picker.js +1 -1
- package/dist/components/six-layout-grid.js +1 -1
- package/dist/components/six-main-container.js +1 -1
- package/dist/components/six-menu-divider.js +1 -1
- package/dist/components/six-menu-item.js +1 -1
- package/dist/components/six-menu-label.js +1 -1
- package/dist/components/six-menu.js +1 -1
- package/dist/components/six-picto.js +1 -1
- package/dist/components/six-progress-bar.js +3 -3
- package/dist/components/six-progress-ring.js +1 -1
- package/dist/components/six-radio.js +2 -2
- package/dist/components/six-range.js +3 -3
- package/dist/components/six-rating.js +4 -4
- package/dist/components/six-root.js +3 -3
- package/dist/components/six-search-field.js +3 -3
- package/dist/components/six-select.js +9 -9
- package/dist/components/six-sidebar-item-group.js +2 -2
- package/dist/components/six-sidebar-item.js +3 -3
- package/dist/components/six-sidebar.js +2 -2
- package/dist/components/six-stage-indicator.js +1 -1
- package/dist/components/six-switch.js +3 -3
- package/dist/components/six-tab-group.js +2 -2
- package/dist/components/six-tab-panel.js +1 -1
- package/dist/components/six-tab.js +4 -4
- package/dist/components/six-tag.js +5 -5
- package/dist/components/six-textarea.js +3 -3
- package/dist/components/six-tile.js +8 -8
- package/dist/components/six-timepicker.js +1 -1
- package/dist/components/six-tooltip.js +1 -1
- package/dist/components.json +383 -4
- package/dist/esm/icon-DqHJRLQQ.js +14 -0
- package/dist/esm/icon-DqHJRLQQ.js.map +1 -0
- package/dist/esm/index-JoG9I7EO.js +12 -8
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/six-breadcrumbs-item.entry.js +23 -0
- package/dist/esm/six-breadcrumbs-item.entry.js.map +1 -0
- package/dist/esm/six-breadcrumbs.entry.js +71 -0
- package/dist/esm/six-breadcrumbs.entry.js.map +1 -0
- package/dist/esm/six-button.six-spinner.entry.js.map +1 -0
- package/dist/esm/{six-button.entry.js → six-button_2.entry.js} +55 -5
- package/dist/esm/six-button_2.entry.js.map +1 -0
- package/dist/esm/six-card.entry.js +1 -1
- package/dist/esm/six-checkbox_2.entry.js +4 -4
- package/dist/esm/six-date.entry.js +38 -33
- package/dist/esm/six-date.entry.js.map +1 -1
- package/dist/esm/six-datepicker.entry.js +3 -3
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +3 -3
- package/dist/esm/six-dropdown.six-menu.entry.js.map +1 -1
- package/dist/esm/six-dropdown_2.entry.js +3 -3
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +1 -1
- package/dist/esm/six-error.entry.js +1 -1
- package/dist/esm/six-file-list.entry.js +1 -1
- package/dist/esm/six-footer.entry.js +1 -1
- package/dist/esm/six-group-label.entry.js +1 -1
- package/dist/esm/six-header-dropdown-item.entry.js +2 -2
- package/dist/esm/six-header-item.entry.js +1 -1
- package/dist/esm/six-header-menu-button.entry.js +1 -1
- package/dist/esm/six-header.entry.js +2 -2
- package/dist/esm/six-icon-button.entry.js +3 -3
- package/dist/esm/six-icon.entry.js +15 -6
- package/dist/esm/six-icon.entry.js.map +1 -1
- package/dist/esm/six-layout-grid.entry.js +1 -1
- package/dist/esm/six-main-container.entry.js +1 -1
- package/dist/esm/six-menu-divider.entry.js +1 -1
- package/dist/esm/six-menu-label.entry.js +1 -1
- package/dist/esm/six-picto.entry.js +1 -1
- package/dist/esm/six-progress-bar.entry.js +3 -3
- package/dist/esm/six-progress-ring.entry.js +1 -1
- package/dist/esm/six-radio.entry.js +2 -2
- package/dist/esm/six-range.entry.js +2 -2
- package/dist/esm/six-rating.entry.js +2 -2
- package/dist/esm/six-root.entry.js +1 -1
- package/dist/esm/six-sidebar-item.entry.js +2 -2
- package/dist/esm/six-sidebar.entry.js +2 -2
- package/dist/esm/six-switch.entry.js +2 -2
- package/dist/esm/six-tab-panel.entry.js +1 -1
- package/dist/esm/six-tab.entry.js +2 -2
- package/dist/esm/six-tag.entry.js +2 -2
- package/dist/esm/six-textarea.entry.js +2 -2
- package/dist/esm/six-tile.entry.js +5 -5
- package/dist/esm/six-timepicker.entry.js +1 -1
- package/dist/esm/six-timepicker.entry.js.map +1 -1
- package/dist/esm/six-tooltip.entry.js +2 -2
- package/dist/esm/ui-library.js +1 -1
- package/dist/types/components/six-breadcrumbs/six-breadcrumbs.d.ts +20 -0
- package/dist/types/components/six-breadcrumbs-item/six-breadcrumbs-item.d.ts +27 -0
- package/dist/types/components/six-date/iso-date.d.ts +2 -0
- package/dist/types/components/six-datepicker/six-datepicker.d.ts +1 -1
- package/dist/types/components/six-icon/six-icon.d.ts +17 -0
- package/dist/types/components.d.ts +126 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/icon.d.ts +5 -0
- package/dist/ui-library/files/material-symbols-outlined-latin-fill-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-outlined-latin-full-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-outlined-latin-grad-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-outlined-latin-opsz-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-outlined-latin-standard-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-rounded-latin-fill-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-rounded-latin-full-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-rounded-latin-grad-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-rounded-latin-opsz-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-rounded-latin-standard-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-rounded-latin-wght-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-sharp-latin-fill-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-sharp-latin-full-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-sharp-latin-grad-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-sharp-latin-opsz-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-sharp-latin-standard-normal.woff2 +0 -0
- package/dist/ui-library/files/material-symbols-sharp-latin-wght-normal.woff2 +0 -0
- package/dist/ui-library/index.esm.js +1 -1
- package/dist/ui-library/index.esm.js.map +1 -1
- package/dist/ui-library/{p-336610a9.entry.js → p-014f44f4.entry.js} +2 -2
- package/dist/ui-library/p-014f44f4.entry.js.map +1 -0
- package/dist/ui-library/p-05ca516d.entry.js +2 -0
- package/dist/ui-library/{p-a43843d6.entry.js → p-06c6b189.entry.js} +2 -2
- package/dist/ui-library/{p-850aff56.entry.js → p-12a2cc6b.entry.js} +2 -2
- package/dist/ui-library/p-22f924a1.entry.js +2 -0
- package/dist/ui-library/{p-f6a1c20b.entry.js → p-26219330.entry.js} +2 -2
- package/dist/ui-library/{p-fe7d3665.entry.js → p-29994dc3.entry.js} +2 -2
- package/dist/ui-library/{p-d9e770ab.entry.js → p-29aac7ea.entry.js} +2 -2
- package/dist/ui-library/p-38c51fd1.entry.js +2 -0
- package/dist/ui-library/p-38c51fd1.entry.js.map +1 -0
- package/dist/ui-library/{p-c8fbf085.entry.js → p-3c1285ad.entry.js} +2 -2
- package/dist/ui-library/{p-5b52d097.entry.js → p-3d9e03b5.entry.js} +2 -2
- package/dist/ui-library/{p-1cfa2df4.entry.js → p-4d9785bd.entry.js} +2 -2
- package/dist/ui-library/p-4decf969.entry.js +2 -0
- package/dist/ui-library/p-4decf969.entry.js.map +1 -0
- package/dist/ui-library/{p-c47f11e4.entry.js → p-59568c0f.entry.js} +2 -2
- package/dist/ui-library/{p-c47f11e4.entry.js.map → p-59568c0f.entry.js.map} +1 -1
- package/dist/ui-library/{p-174dd242.entry.js → p-664ddbab.entry.js} +2 -2
- package/dist/ui-library/{p-21cbccb1.entry.js → p-66b94978.entry.js} +2 -2
- package/dist/ui-library/{p-371ef302.entry.js → p-66d616e8.entry.js} +2 -2
- package/dist/ui-library/{p-811ce2a0.entry.js → p-6cd4fbd8.entry.js} +2 -2
- package/dist/ui-library/{p-8884a48b.entry.js → p-70388108.entry.js} +2 -2
- package/dist/ui-library/p-72d3f332.entry.js +2 -0
- package/dist/ui-library/p-72d3f332.entry.js.map +1 -0
- package/dist/ui-library/{p-18e755bc.entry.js → p-7f7413db.entry.js} +2 -2
- package/dist/ui-library/p-7f7413db.entry.js.map +1 -0
- package/dist/ui-library/{p-3d49deae.entry.js → p-8c2edb7f.entry.js} +2 -2
- package/dist/ui-library/{p-65e53a1b.entry.js → p-984a1f6d.entry.js} +2 -2
- package/dist/ui-library/{p-03ca4af8.entry.js → p-9b75e009.entry.js} +2 -2
- package/dist/ui-library/{p-14f79bfc.entry.js → p-9deca0d0.entry.js} +2 -2
- package/dist/ui-library/p-DqHJRLQQ.js +2 -0
- package/dist/ui-library/p-DqHJRLQQ.js.map +1 -0
- package/dist/ui-library/{p-b6244904.entry.js → p-a6d7d618.entry.js} +2 -2
- package/dist/ui-library/p-a7f9c92d.entry.js +2 -0
- package/dist/ui-library/{p-09de2bda.entry.js.map → p-a7f9c92d.entry.js.map} +1 -1
- package/dist/ui-library/{p-a4b523ed.entry.js → p-aaea0f73.entry.js} +2 -2
- package/dist/ui-library/{p-ee980a0f.entry.js → p-bea434d1.entry.js} +2 -2
- package/dist/ui-library/{p-83b35622.entry.js → p-ccc7e227.entry.js} +2 -2
- package/dist/ui-library/p-cf2fc033.entry.js +2 -0
- package/dist/ui-library/p-cf2fc033.entry.js.map +1 -0
- package/dist/ui-library/{p-cea7f777.entry.js → p-d81265f4.entry.js} +2 -2
- package/dist/ui-library/{p-9ec79195.entry.js → p-da5f40ed.entry.js} +2 -2
- package/dist/ui-library/{p-f54d3616.entry.js → p-df2b8f01.entry.js} +2 -2
- package/dist/ui-library/p-e100aff2.entry.js +2 -0
- package/dist/ui-library/{p-12e7a9e1.entry.js → p-e56c5237.entry.js} +2 -2
- package/dist/ui-library/{p-12e7a9e1.entry.js.map → p-e56c5237.entry.js.map} +1 -1
- package/dist/ui-library/{p-6c8182fa.entry.js → p-e8e5445e.entry.js} +2 -2
- package/dist/ui-library/{p-d7c7398d.entry.js → p-fc2d893f.entry.js} +2 -2
- package/dist/ui-library/p-fcd3305f.entry.js +2 -0
- package/dist/ui-library/{p-e85be7d2.entry.js.map → p-fcd3305f.entry.js.map} +1 -1
- package/dist/ui-library/{p-39668d61.entry.js → p-fd97bc8a.entry.js} +2 -2
- package/dist/ui-library/{p-dc2109d2.entry.js → p-fe2ef0a4.entry.js} +2 -2
- package/dist/ui-library/six-breadcrumbs-item.entry.esm.js.map +1 -0
- package/dist/ui-library/six-breadcrumbs.entry.esm.js.map +1 -0
- package/dist/ui-library/six-button.six-spinner.entry.esm.js.map +1 -0
- package/dist/ui-library/six-date.entry.esm.js.map +1 -1
- package/dist/ui-library/six-datepicker.entry.esm.js.map +1 -1
- package/dist/ui-library/six-dropdown.six-menu.entry.esm.js.map +1 -1
- package/dist/ui-library/six-icon.entry.esm.js.map +1 -1
- package/dist/ui-library/six-timepicker.entry.esm.js.map +1 -1
- package/dist/ui-library/ui-library.css +1 -1
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/package.json +6 -3
- package/dist/cjs/six-button.cjs.entry.js.map +0 -1
- package/dist/cjs/six-button.entry.cjs.js.map +0 -1
- package/dist/cjs/six-spinner.cjs.entry.js +0 -58
- package/dist/cjs/six-spinner.cjs.entry.js.map +0 -1
- package/dist/cjs/six-spinner.entry.cjs.js.map +0 -1
- package/dist/components/p-BSHZAiyG.js +0 -52
- package/dist/components/p-BSHZAiyG.js.map +0 -1
- package/dist/components/p-BUN8hFmL.js.map +0 -1
- package/dist/esm/six-button.entry.js.map +0 -1
- package/dist/esm/six-spinner.entry.js +0 -56
- package/dist/esm/six-spinner.entry.js.map +0 -1
- package/dist/ui-library/p-09de2bda.entry.js +0 -2
- package/dist/ui-library/p-18e755bc.entry.js.map +0 -1
- package/dist/ui-library/p-2a82de6c.entry.js +0 -2
- package/dist/ui-library/p-2a82de6c.entry.js.map +0 -1
- package/dist/ui-library/p-2fb16281.entry.js +0 -2
- package/dist/ui-library/p-2fb16281.entry.js.map +0 -1
- package/dist/ui-library/p-31c5f8fa.entry.js +0 -2
- package/dist/ui-library/p-336610a9.entry.js.map +0 -1
- package/dist/ui-library/p-3dc98466.entry.js +0 -2
- package/dist/ui-library/p-3dc98466.entry.js.map +0 -1
- package/dist/ui-library/p-c90a59fc.entry.js +0 -2
- package/dist/ui-library/p-e85be7d2.entry.js +0 -2
- package/dist/ui-library/p-ea3bf68d.entry.js +0 -2
- package/dist/ui-library/six-button.entry.esm.js.map +0 -1
- package/dist/ui-library/six-spinner.entry.esm.js.map +0 -1
- /package/dist/ui-library/{p-31c5f8fa.entry.js.map → p-05ca516d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a43843d6.entry.js.map → p-06c6b189.entry.js.map} +0 -0
- /package/dist/ui-library/{p-850aff56.entry.js.map → p-12a2cc6b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-c90a59fc.entry.js.map → p-22f924a1.entry.js.map} +0 -0
- /package/dist/ui-library/{p-f6a1c20b.entry.js.map → p-26219330.entry.js.map} +0 -0
- /package/dist/ui-library/{p-fe7d3665.entry.js.map → p-29994dc3.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d9e770ab.entry.js.map → p-29aac7ea.entry.js.map} +0 -0
- /package/dist/ui-library/{p-c8fbf085.entry.js.map → p-3c1285ad.entry.js.map} +0 -0
- /package/dist/ui-library/{p-5b52d097.entry.js.map → p-3d9e03b5.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1cfa2df4.entry.js.map → p-4d9785bd.entry.js.map} +0 -0
- /package/dist/ui-library/{p-174dd242.entry.js.map → p-664ddbab.entry.js.map} +0 -0
- /package/dist/ui-library/{p-21cbccb1.entry.js.map → p-66b94978.entry.js.map} +0 -0
- /package/dist/ui-library/{p-371ef302.entry.js.map → p-66d616e8.entry.js.map} +0 -0
- /package/dist/ui-library/{p-811ce2a0.entry.js.map → p-6cd4fbd8.entry.js.map} +0 -0
- /package/dist/ui-library/{p-8884a48b.entry.js.map → p-70388108.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3d49deae.entry.js.map → p-8c2edb7f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-65e53a1b.entry.js.map → p-984a1f6d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-03ca4af8.entry.js.map → p-9b75e009.entry.js.map} +0 -0
- /package/dist/ui-library/{p-14f79bfc.entry.js.map → p-9deca0d0.entry.js.map} +0 -0
- /package/dist/ui-library/{p-b6244904.entry.js.map → p-a6d7d618.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a4b523ed.entry.js.map → p-aaea0f73.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ee980a0f.entry.js.map → p-bea434d1.entry.js.map} +0 -0
- /package/dist/ui-library/{p-83b35622.entry.js.map → p-ccc7e227.entry.js.map} +0 -0
- /package/dist/ui-library/{p-cea7f777.entry.js.map → p-d81265f4.entry.js.map} +0 -0
- /package/dist/ui-library/{p-9ec79195.entry.js.map → p-da5f40ed.entry.js.map} +0 -0
- /package/dist/ui-library/{p-f54d3616.entry.js.map → p-df2b8f01.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ea3bf68d.entry.js.map → p-e100aff2.entry.js.map} +0 -0
- /package/dist/ui-library/{p-6c8182fa.entry.js.map → p-e8e5445e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d7c7398d.entry.js.map → p-fc2d893f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-39668d61.entry.js.map → p-fd97bc8a.entry.js.map} +0 -0
- /package/dist/ui-library/{p-dc2109d2.entry.js.map → p-fe2ef0a4.entry.js.map} +0 -0
|
@@ -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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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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AC,IAAG;QACxD,KAAK,MAAM;YACT,uCAAY,WAAW,KAAE,IAAI,EAAE,WAAW,CAAC,IAAI,GAAG,EAAE,IAAG;IAC3D,CAAC;AACH,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 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
|
-
|
|
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
|
-
|
|
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: '
|
|
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: '
|
|
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"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"six-date.js","sourceRoot":"","sources":["../../../src/components/six-date/six-date.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE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AqB,EAChC,WAAW,EAAE,IAAI,CAAC,iBAAiB,GACnC,CACH,CACG,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { MonthSelection } from './components/month-selection';\nimport { YearSelection } from './components/year-selection';\nimport { DaySelection } from './components/day-selection';\nimport { Language } from '../../utils/error-messages';\nimport { cleanupValue, formatDate, fromFormattedString, todayAsPointerDate, toPointerDate } from './iso-date';\nimport { createCalendarGrid } from './calendar-grid';\nimport { translateFormatHelp, translateMonth } from './translations';\nimport Popover from '../../utils/popover';\n\nconst NUMBER_OF_YEARS_SHOWN = 25;\n\n/**\n * A date picker component that allows users to select dates via a calendar popup or direct input.\n *\n * @since 5.0\n * @status beta\n *\n * @slot label - The date's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes the usage.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text property.\n */\n@Component({\n tag: 'six-date',\n styleUrl: 'six-date.scss',\n shadow: true,\n})\nexport class SixDate {\n private eventListeners = new EventListeners();\n private inputElement?: HTMLSixInputElement;\n private popoverHelper?: Popover;\n private panel?: HTMLElement;\n private positioner?: HTMLElement;\n\n @Element() host!: HTMLSixDateElement;\n\n /**\n * Current state of the date picker for day, month, or year selection.\n * Independent of the currently selected date value.\n */\n @State() pointerDate = todayAsPointerDate();\n\n @State() selectionMode: 'day' | 'month' | 'year' = 'day';\n\n /**\n * The language used to render the weekdays and months.\n */\n @Prop() language: Language = 'en';\n\n /**\n * If `true` the user can only select a date via the component in the popup 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 * Callback to determine which dates in the picker should be selectable.\n */\n @Prop() allowedDates: (date: string) => boolean = () => true;\n\n /**\n * The minimum allowed selectable date in ISO format (yyyy-MM-dd).\n * Dates before this value will be disabled in the date picker.\n * Example: '2024-01-01'\n */\n @Prop() min?: string;\n\n /**\n * The maximum allowed selectable date in ISO format (yyyy-MM-dd).\n * Dates after this value will be disabled in the date picker.\n * Example: '2025-01-01'\n */\n @Prop() max?: string;\n\n /**\n * The size of the date input field.\n */\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 /**\n * The value of the form field in ISO 8601 date format (yyyy-MM-dd).\n * Example: '2024-01-01'.\n *\n * When an invalid date is provided, it will be replaced with an empty string (''),\n * matching the behavior of native HTML <input type=\"date\">.\n *\n * The displayed format can be customized using the dateFormat property, but the underlying\n * value will always be stored in ISO format.\n */\n @Prop({ mutable: true }) value: string | '' = '';\n\n /** Defines the format pattern for displaying dates and how dates can be entered via keyboard.\n *\n * The parser accepts flexible input that doesn't strictly match the format pattern.\n * Input with missing leading zeros or incomplete years will be automatically normalized.\n * For example, with the pattern \"dd.MM.yyyy\": \"1.1.2025\" becomes \"01.01.2025\" and\n * \"1.1.225\" becomes \"01.01.0225\".\n *\n * Defaults to \"dd.MM.yyyy\".\n *\n * Available patterns:\n * - Year: \"yyyy\" (e.g., \"2021\")\n * - Month: \"MM\" (e.g., \"01\" for January) or \"M\" (e.g., \"1\" for January)\n * - Day: \"dd\" (e.g., \"08\" for the 8th) or \"d\" (e.g., \"8\" for the 8th)\n *\n * Examples:\n * - \"dd.MM.yyyy\" -> \"31.01.2024\"\n * - \"yyyy-MM-dd\" -> \"2024-01-31\"\n * - \"d.M.yyyy\" -> \"31.1.2024\"\n * */\n @Prop() dateFormat = 'dd.MM.yyyy';\n\n /** The label text. */\n @Prop() label = '';\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** 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 @Watch('value')\n valueChanged() {\n this.updateValueAndPointerDate();\n }\n\n /**\n * Emitted when the control's value changes.\n * Event detail contains the new date value in ISO format (yyyy-MM-dd) or an empty string if cleared.\n */\n @Event({ eventName: 'six-change' }) sixChange!: EventEmitter<string | ''>;\n\n /**\n * Emitted when the control loses focus or the date picker popup is closed.\n * Does not contain event details.\n */\n @Event({ eventName: 'six-blur' }) sixBlur!: EventEmitter;\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n private panelHideInProgress = false;\n\n private updateValueAndPointerDate() {\n const { value, pointerDate, warning } = cleanupValue(this.value);\n this.value = value;\n this.pointerDate = pointerDate;\n if (warning != null) {\n console.warn(warning);\n }\n }\n\n private getSixInputBaseElement() {\n return this.inputElement?.shadowRoot?.querySelector('div.input') as HTMLDivElement;\n }\n\n private show() {\n if (this.popoverHelper?.isVisible === true || this.panelHideInProgress || this.disabled) return;\n this.popoverHelper?.show();\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private hide() {\n if (this.popoverHelper?.isVisible === false) return;\n\n this.updateInputElementValue();\n this.selectionMode = 'day';\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n this.panelHideInProgress = true;\n this.popoverHelper?.hide();\n }\n\n private initPopover() {\n const sixInputBaseElement = this.getSixInputBaseElement();\n if (this.inputElement == null || this.positioner == null || this.panel == null || sixInputBaseElement == null) {\n return;\n }\n\n this.eventListeners.add(sixInputBaseElement, 'click', () => this.show());\n\n this.popoverHelper = new Popover(sixInputBaseElement, this.positioner, {\n strategy: 'fixed',\n placement: 'bottom-start',\n transitionElement: this.panel,\n distance: 4,\n skidding: 0,\n onAfterHide: () => {\n this.panelHideInProgress = false;\n },\n });\n }\n\n private handlePreviousClick = () => {\n switch (this.selectionMode) {\n case 'day':\n if (this.pointerDate.month === 0) {\n this.pointerDate = { year: this.pointerDate.year - 1, month: 11, day: 1 };\n } else {\n this.pointerDate = { year: this.pointerDate.year, month: this.pointerDate.month - 1, day: 1 };\n }\n break;\n case 'month':\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - 1 };\n break;\n case 'year':\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year - NUMBER_OF_YEARS_SHOWN };\n break;\n }\n };\n\n private handleNextClick = () => {\n if (this.selectionMode === 'day') {\n if (this.pointerDate.month === 11) {\n this.pointerDate = { year: this.pointerDate.year + 1, month: 0, day: 1 };\n } else {\n this.pointerDate = { year: this.pointerDate.year, month: this.pointerDate.month + 1, day: 1 };\n }\n } else if (this.selectionMode === 'month') {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + 1 };\n } else if (this.selectionMode === 'year') {\n this.pointerDate = { ...this.pointerDate, year: this.pointerDate.year + NUMBER_OF_YEARS_SHOWN };\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n const baseElement = this.getSixInputBaseElement();\n if (baseElement == null || this.panel == null) return;\n\n // Close when clicking outside\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.panel) && !path.includes(baseElement)) {\n this.hide();\n this.sixBlur.emit();\n }\n };\n\n private handleDayClick = (date: string) => {\n this.value = date;\n this.pointerDate = toPointerDate(this.value);\n this.hide();\n this.inputElement?.setFocus();\n this.sixChange.emit(this.value);\n };\n\n private handleMonthClicked = (month: number) => {\n this.pointerDate = { ...this.pointerDate, month };\n this.selectionMode = 'day';\n };\n\n private handleYearClicked = (year: number) => {\n this.pointerDate = { ...this.pointerDate, year };\n this.selectionMode = 'day';\n };\n\n private handleInputChange = (event: Event) => {\n if (this.inputElement == null) return;\n event.stopPropagation();\n const isoDate = fromFormattedString(this.inputElement.value, this.dateFormat);\n\n if (isoDate != null) {\n this.value = isoDate;\n this.pointerDate = toPointerDate(this.value);\n } else if (this.inputElement.value === '') {\n this.value = '';\n this.pointerDate = todayAsPointerDate();\n this.selectionMode = 'day';\n }\n this.sixChange.emit(this.value);\n };\n\n private handleInputBlur = () => {\n if (this.popoverHelper?.isVisible === false) {\n this.updateInputElementValue();\n }\n };\n\n private handleInputClearClick = () => {\n this.hide();\n this.value = '';\n this.pointerDate = todayAsPointerDate();\n this.sixChange.emit(this.value);\n };\n\n private handleInputKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n this.hide();\n this.sixBlur.emit();\n }\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private updateInputElementValue() {\n if (this.inputElement) {\n this.inputElement.value = this.value === '' ? '' : formatDate(this.value, this.dateFormat);\n }\n }\n\n connectedCallback() {\n this.initPopover();\n this.updateValueAndPointerDate();\n this.eventListeners.forward('six-change', 'change', this.host);\n this.eventListeners.forward('six-blur', 'blur', this.host);\n }\n\n componentDidLoad() {\n this.updateInputElementValue();\n this.initPopover();\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n this.popoverHelper?.destroy();\n this.popoverHelper = undefined;\n }\n\n render() {\n return (\n <div class=\"container\">\n {/* INPUT */}\n <six-input\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder == null ? this.dateFormat : this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n name={this.name}\n label={this.label}\n required={this.required}\n helpText={this.helpText}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n invalid={this.invalid}\n onKeyDown={this.handleInputKeyDown}\n onInput={this.handleInputChange}\n onBlur={this.handleInputBlur}\n onSix-input-clear={this.handleInputClearClick}\n size={this.size}\n clearable={this.clearable}\n aria-describedby=\"date-format\"\n >\n <six-icon slot=\"prefix\" size={this.size === 'large' ? 'medium' : this.size}>\n today\n </six-icon>\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\"></slot>\n </span>\n ) : null}\n {hasSlot(this.host, 'help-text') ? (\n <span slot=\"help-text\">\n <slot name=\"help-text\"></slot>\n </span>\n ) : null}\n </six-input>\n\n <span id=\"date-format\" class=\"sr-only\">\n {translateFormatHelp(this.language, this.dateFormat)}\n </span>\n\n {/* PANEL */}\n <div ref={(el) => (this.positioner = el)} class=\"positioner\">\n <div class=\"panel\" ref={(el) => (this.panel = el)}>\n {/* PANEL HEADER */}\n <header class=\"panel__header\">\n <six-icon-button\n tabindex=\"-1\"\n class=\"previous\"\n onClick={this.handlePreviousClick}\n name=\"arrow_back_ios\"\n />\n\n {this.selectionMode === 'day' && (\n <div class=\"selector\" onClick={() => (this.selectionMode = 'month')}>\n {translateMonth(this.pointerDate.month, this.language)}\n <six-icon>arrow_drop_down</six-icon>\n </div>\n )}\n\n {this.selectionMode !== 'year' && (\n <div class=\"selector\" onClick={() => (this.selectionMode = 'year')}>\n {this.pointerDate.year}\n <six-icon>arrow_drop_down</six-icon>\n </div>\n )}\n\n {this.selectionMode === 'year' && (\n <div class=\"selector\">\n {this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2)} –{' '}\n {this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2)}\n </div>\n )}\n\n <six-icon-button tabindex=\"-1\" class=\"next\" onClick={this.handleNextClick} name=\"arrow_forward_ios\" />\n </header>\n\n {/* PANEL BODY */}\n {this.selectionMode === 'day' && (\n <DaySelection\n language={this.language}\n calendarGrid={createCalendarGrid({\n year: this.pointerDate.year,\n month: this.pointerDate.month,\n selected: this.value || undefined,\n minDate: this.min,\n maxDate: this.max,\n dateFormat: this.dateFormat,\n allowedDates: this.allowedDates,\n })}\n dayClicked={this.handleDayClick}\n />\n )}\n\n {this.selectionMode === 'month' && (\n <MonthSelection language={this.language} selected={this.value} monthClicked={this.handleMonthClicked} />\n )}\n\n {this.selectionMode === 'year' && (\n <YearSelection\n selected={this.value}\n pointerYear={this.pointerDate.year}\n yearCount={NUMBER_OF_YEARS_SHOWN}\n yearClicked={this.handleYearClicked}\n />\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"six-date.js","sourceRoot":"","sources":["../../../src/components/six-date/six-date.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,mBAAm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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { MonthSelection } from './components/month-selection';\nimport { YearSelection } from './components/year-selection';\nimport { DaySelection } from './components/day-selection';\nimport { Language } from '../../utils/error-messages';\nimport {\n cleanupValue,\n formatDate,\n fromFormattedString,\n nextPointerDate,\n previousPointerDate,\n todayAsPointerDate,\n toPointerDate,\n} from './iso-date';\nimport { createCalendarGrid } from './calendar-grid';\nimport { translateFormatHelp, translateMonth } from './translations';\nimport Popover from '../../utils/popover';\n\nconst NUMBER_OF_YEARS_SHOWN = 25;\n\n/**\n * A date picker component that allows users to select dates via a calendar popup or direct input.\n *\n * @since 5.0\n * @status beta\n *\n * @slot label - The date's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes the usage.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text property.\n */\n@Component({\n tag: 'six-date',\n styleUrl: 'six-date.scss',\n shadow: true,\n})\nexport class SixDate {\n private eventListeners = new EventListeners();\n private inputElement?: HTMLSixInputElement;\n private popoverHelper?: Popover;\n private panel?: HTMLElement;\n private positioner?: HTMLElement;\n\n @Element() host!: HTMLSixDateElement;\n\n /**\n * Current state of the date picker for day, month, or year selection.\n * Independent of the currently selected date value.\n */\n @State() pointerDate = todayAsPointerDate();\n\n @State() selectionMode: 'day' | 'month' | 'year' = 'day';\n\n /**\n * The language used to render the weekdays and months.\n */\n @Prop() language: Language = 'en';\n\n /**\n * If `true` the user can only select a date via the component in the popup 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 * Callback to determine which dates in the picker should be selectable.\n */\n @Prop() allowedDates: (date: string) => boolean = () => true;\n\n /**\n * The minimum allowed selectable date in ISO format (yyyy-MM-dd).\n * Dates before this value will be disabled in the date picker.\n * Example: '2024-01-01'\n */\n @Prop() min?: string;\n\n /**\n * The maximum allowed selectable date in ISO format (yyyy-MM-dd).\n * Dates after this value will be disabled in the date picker.\n * Example: '2025-01-01'\n */\n @Prop() max?: string;\n\n /**\n * The size of the date input field.\n */\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 /**\n * The value of the form field in ISO 8601 date format (yyyy-MM-dd).\n * Example: '2024-01-01'.\n *\n * When an invalid date is provided, it will be replaced with an empty string (''),\n * matching the behavior of native HTML <input type=\"date\">.\n *\n * The displayed format can be customized using the dateFormat property, but the underlying\n * value will always be stored in ISO format.\n */\n @Prop({ mutable: true }) value: string | '' = '';\n\n /** Defines the format pattern for displaying dates and how dates can be entered via keyboard.\n *\n * The parser accepts flexible input that doesn't strictly match the format pattern.\n * Input with missing leading zeros or incomplete years will be automatically normalized.\n * For example, with the pattern \"dd.MM.yyyy\": \"1.1.2025\" becomes \"01.01.2025\" and\n * \"1.1.225\" becomes \"01.01.0225\".\n *\n * Defaults to \"dd.MM.yyyy\".\n *\n * Available patterns:\n * - Year: \"yyyy\" (e.g., \"2021\")\n * - Month: \"MM\" (e.g., \"01\" for January) or \"M\" (e.g., \"1\" for January)\n * - Day: \"dd\" (e.g., \"08\" for the 8th) or \"d\" (e.g., \"8\" for the 8th)\n *\n * Examples:\n * - \"dd.MM.yyyy\" -> \"31.01.2024\"\n * - \"yyyy-MM-dd\" -> \"2024-01-31\"\n * - \"d.M.yyyy\" -> \"31.1.2024\"\n * */\n @Prop() dateFormat = 'dd.MM.yyyy';\n\n /** The label text. */\n @Prop() label = '';\n\n /** The input's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** 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 @Watch('value')\n valueChanged() {\n this.updateValueAndPointerDate();\n }\n\n /**\n * Emitted when the control's value changes.\n * Event detail contains the new date value in ISO format (yyyy-MM-dd) or an empty string if cleared.\n */\n @Event({ eventName: 'six-change' }) sixChange!: EventEmitter<string | ''>;\n\n /**\n * Emitted when the control loses focus or the date picker popup is closed.\n * Does not contain event details.\n */\n @Event({ eventName: 'six-blur' }) sixBlur!: EventEmitter;\n\n /** Sets focus on the input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n private panelHideInProgress = false;\n\n private updateValueAndPointerDate() {\n const { value, pointerDate, warning } = cleanupValue(this.value);\n this.value = value;\n this.pointerDate = pointerDate;\n if (warning != null) {\n console.warn(warning);\n }\n this.updateInputElementValue();\n }\n\n private getSixInputBaseElement() {\n return this.inputElement?.shadowRoot?.querySelector('div.input') as HTMLDivElement;\n }\n\n private show() {\n if (this.popoverHelper?.isVisible === true || this.panelHideInProgress || this.disabled) return;\n this.popoverHelper?.show();\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private hide() {\n if (this.popoverHelper?.isVisible === false) return;\n\n this.updateInputElementValue();\n this.selectionMode = 'day';\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n this.panelHideInProgress = true;\n this.popoverHelper?.hide();\n }\n\n private initPopover() {\n const sixInputBaseElement = this.getSixInputBaseElement();\n if (this.inputElement == null || this.positioner == null || this.panel == null || sixInputBaseElement == null) {\n return;\n }\n\n this.eventListeners.add(sixInputBaseElement, 'click', () => this.show());\n\n this.popoverHelper = new Popover(sixInputBaseElement, this.positioner, {\n strategy: 'fixed',\n placement: 'bottom-start',\n transitionElement: this.panel,\n distance: 4,\n skidding: 0,\n onAfterHide: () => {\n this.panelHideInProgress = false;\n },\n });\n }\n\n private handlePreviousClick = () => {\n this.pointerDate = previousPointerDate(this.selectionMode, this.pointerDate);\n };\n\n private handleNextClick = () => {\n this.pointerDate = nextPointerDate(this.selectionMode, this.pointerDate);\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n const baseElement = this.getSixInputBaseElement();\n if (baseElement == null || this.panel == null) return;\n\n // Close when clicking outside\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.panel) && !path.includes(baseElement)) {\n this.hide();\n this.sixBlur.emit();\n }\n };\n\n private handleDayClick = (date: string) => {\n this.value = date;\n this.pointerDate = toPointerDate(this.value);\n this.hide();\n this.inputElement?.setFocus();\n this.sixChange.emit(this.value);\n };\n\n private handleMonthClicked = (month: number) => {\n this.pointerDate = { ...this.pointerDate, month };\n this.selectionMode = 'day';\n };\n\n private handleYearClicked = (year: number) => {\n this.pointerDate = { ...this.pointerDate, year };\n this.selectionMode = 'day';\n };\n\n private handleInputChange = (event: Event) => {\n if (this.inputElement == null) return;\n event.stopPropagation();\n const isoDate = fromFormattedString(this.inputElement.value, this.dateFormat);\n\n if (isoDate != null) {\n this.value = isoDate;\n this.pointerDate = toPointerDate(this.value);\n } else if (this.inputElement.value === '') {\n this.value = '';\n this.pointerDate = todayAsPointerDate();\n this.selectionMode = 'day';\n }\n this.sixChange.emit(this.value);\n };\n\n private handleInputBlur = () => {\n if (this.popoverHelper?.isVisible === false) {\n this.updateInputElementValue();\n }\n };\n\n private handleInputClearClick = () => {\n this.hide();\n this.value = '';\n this.pointerDate = todayAsPointerDate();\n this.sixChange.emit(this.value);\n };\n\n private handleInputKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n this.hide();\n this.sixBlur.emit();\n }\n if (event.key === 'Escape') {\n this.hide();\n }\n };\n\n private updateInputElementValue() {\n if (this.inputElement && document.activeElement !== this.host) {\n this.inputElement.value = this.value === '' ? '' : formatDate(this.value, this.dateFormat);\n }\n }\n\n connectedCallback() {\n this.initPopover();\n this.updateValueAndPointerDate();\n this.eventListeners.forward('six-change', 'change', this.host);\n this.eventListeners.forward('six-blur', 'blur', this.host);\n }\n\n componentDidLoad() {\n this.updateInputElementValue();\n this.initPopover();\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n this.popoverHelper?.destroy();\n this.popoverHelper = undefined;\n }\n\n render() {\n return (\n <div class=\"container\">\n {/* INPUT */}\n <six-input\n ref={(el) => (this.inputElement = el)}\n placeholder={this.placeholder == null ? this.dateFormat : this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n name={this.name}\n label={this.label}\n required={this.required}\n helpText={this.helpText}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n invalid={this.invalid}\n onKeyDown={this.handleInputKeyDown}\n onInput={this.handleInputChange}\n onBlur={this.handleInputBlur}\n onSix-input-clear={this.handleInputClearClick}\n size={this.size}\n clearable={this.clearable}\n aria-describedby=\"date-format\"\n >\n <six-icon slot=\"prefix\" size={this.size === 'large' ? 'medium' : this.size}>\n today\n </six-icon>\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\"></slot>\n </span>\n ) : null}\n {hasSlot(this.host, 'help-text') ? (\n <span slot=\"help-text\">\n <slot name=\"help-text\"></slot>\n </span>\n ) : null}\n </six-input>\n\n <span id=\"date-format\" class=\"sr-only\">\n {translateFormatHelp(this.language, this.dateFormat)}\n </span>\n\n {/* PANEL */}\n <div ref={(el) => (this.positioner = el)} class=\"positioner\">\n <div class=\"panel\" ref={(el) => (this.panel = el)}>\n {/* PANEL HEADER */}\n <header class=\"panel__header\">\n <six-icon-button\n tabindex=\"-1\"\n class=\"previous\"\n onClick={this.handlePreviousClick}\n name=\"arrow_back_ios\"\n />\n\n {this.selectionMode === 'day' && (\n <div class=\"selector\" onClick={() => (this.selectionMode = 'month')}>\n {translateMonth(this.pointerDate.month, this.language)}\n <six-icon>arrow_drop_down</six-icon>\n </div>\n )}\n\n {this.selectionMode !== 'year' && (\n <div class=\"selector\" onClick={() => (this.selectionMode = 'year')}>\n {this.pointerDate.year}\n <six-icon>arrow_drop_down</six-icon>\n </div>\n )}\n\n {this.selectionMode === 'year' && (\n <div class=\"selector\">\n {this.pointerDate.year - Math.floor(NUMBER_OF_YEARS_SHOWN / 2)} –{' '}\n {this.pointerDate.year + Math.floor(NUMBER_OF_YEARS_SHOWN / 2)}\n </div>\n )}\n\n <six-icon-button tabindex=\"-1\" class=\"next\" onClick={this.handleNextClick} name=\"arrow_forward_ios\" />\n </header>\n\n {/* PANEL BODY */}\n {this.selectionMode === 'day' && (\n <DaySelection\n language={this.language}\n calendarGrid={createCalendarGrid({\n year: this.pointerDate.year,\n month: this.pointerDate.month,\n selected: this.value || undefined,\n minDate: this.min,\n maxDate: this.max,\n dateFormat: this.dateFormat,\n allowedDates: this.allowedDates,\n })}\n dayClicked={this.handleDayClick}\n />\n )}\n\n {this.selectionMode === 'month' && (\n <MonthSelection language={this.language} selected={this.value} monthClicked={this.handleMonthClicked} />\n )}\n\n {this.selectionMode === 'year' && (\n <YearSelection\n selected={this.value}\n pointerYear={this.pointerDate.year}\n yearCount={NUMBER_OF_YEARS_SHOWN}\n yearClicked={this.handleYearClicked}\n />\n )}\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -18,7 +18,7 @@ var SelectionMode;
|
|
|
18
18
|
})(SelectionMode || (SelectionMode = {}));
|
|
19
19
|
/**
|
|
20
20
|
* @since 1.0
|
|
21
|
-
* @status
|
|
21
|
+
* @status deprecated. Use six-date instead.
|
|
22
22
|
*
|
|
23
23
|
* @slot - Used to define a footer for the date picker.
|
|
24
24
|
* @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.
|
|
@@ -456,15 +456,15 @@ export class SixDatepicker {
|
|
|
456
456
|
render() {
|
|
457
457
|
var _a, _b, _c;
|
|
458
458
|
this.adjustPopupPosition();
|
|
459
|
-
return (h("div", { key: '
|
|
459
|
+
return (h("div", { key: '93ace26fe1c49f134681e47d198dcbb2a75cdb87', ref: (el) => (this.wrapper = el), class: "datepicker__container" }, h("six-input", { key: 'd823eebd5cb0a257902c6265298cf4ac5f155cc5', part: "base", value: formatDate(this.value, this.dateFormat), ref: (el) => (this.inputElement = el), placeholder: this.placeholder, readonly: this.readonly, disabled: this.disabled, name: this.name, label: this.label, required: this.required, errorText: this.errorText, errorTextCount: this.errorTextCount, invalid: this.invalid, onClick: () => this.openCalendar(), size: this.size, class: { 'input--empty': this.value == null } }, this.renderCustomIcon(), this.renderClearable(), 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), this.open && (h("div", { key: '2a8e648342d25bf1685705137cecaa2d9ed7d482', part: "popup", ref: (el) => (this.popup = el), class: {
|
|
460
460
|
datepicker__popup: true,
|
|
461
461
|
'datepicker__popup--is-up': this.placement != null ? this.placement === 'top' : this.isDropDownContentUp,
|
|
462
462
|
'datepicker__popup--is-inline': this.inline,
|
|
463
|
-
} }, this.renderHeader(), this.renderBody(), this.type === 'date-time' && (h("six-timepicker", { key: '
|
|
463
|
+
} }, this.renderHeader(), this.renderBody(), this.type === 'date-time' && (h("six-timepicker", { key: '710a9c6b161dc6b1c1791a550d120d468f4f97d1', debounce: this.debounce, inline: true, "onSix-timepicker-change-debounced": (event) => this.onTimepickerChange(event), value: ((_a = this.selectedDate) === null || _a === void 0 ? void 0 : _a.getHours()) +
|
|
464
464
|
':' +
|
|
465
465
|
((_b = this.selectedDate) === null || _b === void 0 ? void 0 : _b.getMinutes()) +
|
|
466
466
|
':' +
|
|
467
|
-
((_c = this.selectedDate) === null || _c === void 0 ? void 0 : _c.getSeconds()) })), h("div", { key: '
|
|
467
|
+
((_c = this.selectedDate) === null || _c === void 0 ? void 0 : _c.getSeconds()) })), h("div", { key: '8bb2e6b2b81caf1ba06038a426b59d8fbdfe51d0', class: "datepicker__footer" }, h("slot", { key: '67fbcbfc24055d03cba4b7372f65932b83453c39' }))))));
|
|
468
468
|
}
|
|
469
469
|
adjustPopupPosition() {
|
|
470
470
|
adjustPopupForHoisting(this.hoist, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT, (isUp) => (this.isDropDownContentUp = isUp));
|