@sellmate/design-system 1.2.0 → 1.4.0
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/component.datepicker-Cw_-oidk.js +121 -0
- package/dist/cjs/{component.table-CMqGfEui.js → component.table-qOFez3z3.js} +3 -0
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +270 -4
- package/dist/cjs/sd-calendar_2.cjs.entry.js +263 -0
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-box.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-picker.config-D3lTpa6W.js +37 -0
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +15 -13
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +37 -37
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +3 -3
- package/dist/cjs/sd-field_3.cjs.entry.js +7 -7
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination_4.cjs.entry.js +27 -36
- package/dist/cjs/sd-popover.cjs.entry.js +3 -3
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-portal.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +25 -27
- package/dist/cjs/{sd-table.config-BIpldZtw.js → sd-table.config-B7psrvV4.js} +4 -2
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +2 -2
- package/dist/cjs/sd-td.cjs.entry.js +18 -9
- package/dist/cjs/sd-text-link.cjs.entry.js +3 -3
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/cjs/useDatePicker-dCuEgvjX.js +103 -0
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
- package/dist/collection/components/sd-button/sd-button.js +2 -2
- package/dist/collection/components/sd-calendar/sd-calendar.config.js +51 -0
- package/dist/collection/components/sd-calendar/sd-calendar.css +136 -73
- package/dist/collection/components/sd-calendar/sd-calendar.js +173 -133
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +3 -3
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- package/dist/collection/components/sd-date-box/sd-date-box.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.config.js +0 -38
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +3 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.config.js +2 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.js +4 -4
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-form/sd-form.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.js +2 -2
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +4 -4
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +24 -26
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +18 -9
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +6 -2
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +16 -25
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/collection/index.js +1 -1
- package/dist/components/p-BDVrZ5mV.js +1 -0
- package/dist/components/{p-BY1LGlfc.js → p-BFC3Etk2.js} +1 -1
- package/dist/components/p-BQn6le_Y.js +1 -0
- package/dist/components/{p-nOCYbyW4.js → p-BRk9YZBe.js} +1 -1
- package/dist/components/{p-Jts7ueOa.js → p-BRxXhFqt.js} +1 -1
- package/dist/components/{p-Cktiasfd.js → p-BSfu4DO2.js} +1 -1
- package/dist/components/{p-B3D43x7F.js → p-BZabVWBD.js} +1 -1
- package/dist/components/{p-BsM-fwYd.js → p-BeBiPTbd.js} +1 -1
- package/dist/components/{p-Dl8TIEQu.js → p-BjpbUGud.js} +1 -1
- package/dist/components/{p-DL1ac1QS.js → p-Bs1Z5QtN.js} +1 -1
- package/dist/components/{p-teN3CfOr.js → p-BwPmM1Pm.js} +1 -1
- package/dist/components/{p-DBFgk0rX.js → p-C3fqSH7A.js} +1 -1
- package/dist/components/p-CETxX4-M.js +1 -0
- package/dist/components/{p-D0Jiw-Zk.js → p-CIUE4qr7.js} +1 -1
- package/dist/components/{p-BXCyVrle.js → p-CLxVZFEG.js} +1 -1
- package/dist/components/{p-B-sK7I83.js → p-CpgTSxf0.js} +1 -1
- package/dist/components/p-Cx_d5vsS.js +1 -0
- package/dist/components/{p-CQI40kiY.js → p-CyObYB-g.js} +1 -1
- package/dist/components/{p-DFLCjX1a.js → p-D7nYP2a4.js} +1 -1
- package/dist/components/p-DQFHAKL_.js +1 -0
- package/dist/components/{p-wCNRlKLa.js → p-DS7Ypvt5.js} +1 -1
- package/dist/components/{p-CsVAx6KV.js → p-Da5i_Sa6.js} +1 -1
- package/dist/components/p-DiP0LJGq.js +1 -0
- package/dist/components/{p-CdOHomUp.js → p-DlREBZ-C.js} +1 -1
- package/dist/components/p-DnW8EAqd.js +1 -0
- package/dist/components/{p-C5CH-s6a.js → p-DwgaMhOM.js} +1 -1
- package/dist/components/p-DykVq5VY.js +1 -0
- package/dist/components/{p-BorUSgEK.js → p-FKKk7Bk8.js} +1 -1
- package/dist/components/{p-CRL7TjSB.js → p-INdVvadB.js} +1 -1
- package/dist/components/p-JlZdKw4C.js +1 -0
- package/dist/components/{p-C7WLft_0.js → p-VuxN5d2D.js} +1 -1
- package/dist/components/{p-u8teDaMa.js → p-X-8I-A3g.js} +1 -1
- package/dist/components/{p-arZfxxPn.js → p-Z5Vk33zf.js} +1 -1
- package/dist/components/{p-BAcmO7w0.js → p-kSfaCwf1.js} +1 -1
- package/dist/components/p-oyZgWRnC.js +1 -0
- package/dist/components/{p-2wB9cing.js → p-t161LJqb.js} +1 -1
- package/dist/components/{p-CK9ciBIR.js → p-wOAxmZ1V.js} +1 -1
- package/dist/components/{p-B7mpdnNl.js → p-xX3QT-8K.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-form.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-1baa05ae.entry.js → p-00b2c850.entry.js} +1 -1
- package/dist/design-system/{p-8f22106e.entry.js → p-03badf68.entry.js} +1 -1
- package/dist/design-system/{p-f4d73a0c.entry.js → p-11b904a3.entry.js} +1 -1
- package/dist/design-system/p-29fd86d8.entry.js +1 -0
- package/dist/design-system/{p-78cc0289.entry.js → p-32e2d71e.entry.js} +1 -1
- package/dist/design-system/p-36d744fb.entry.js +1 -0
- package/dist/design-system/{p-a6545130.entry.js → p-399d416c.entry.js} +1 -1
- package/dist/design-system/{p-e2334c1c.entry.js → p-3b8954d9.entry.js} +1 -1
- package/dist/design-system/{p-fe0a5368.entry.js → p-42f7febe.entry.js} +1 -1
- package/dist/design-system/{p-435ae69e.entry.js → p-481e6934.entry.js} +1 -1
- package/dist/design-system/{p-501fae20.entry.js → p-4a91875c.entry.js} +1 -1
- package/dist/design-system/p-522d1481.entry.js +1 -0
- package/dist/design-system/{p-b3c144ff.entry.js → p-679bce6c.entry.js} +1 -1
- package/dist/design-system/{p-5705e6d6.entry.js → p-74bf0ed9.entry.js} +1 -1
- package/dist/design-system/{p-87c868c3.entry.js → p-84a94775.entry.js} +1 -1
- package/dist/design-system/p-8f4ccae4.entry.js +1 -0
- package/dist/design-system/p-92f368a2.entry.js +1 -0
- package/dist/design-system/p-9681b0ba.entry.js +1 -0
- package/dist/design-system/{p-d3212544.entry.js → p-9b9bf9db.entry.js} +1 -1
- package/dist/design-system/{p-2c63404f.entry.js → p-9f7f1b8b.entry.js} +1 -1
- package/dist/design-system/p-BGtUaScP.js +1 -0
- package/dist/design-system/p-BQn6le_Y.js +1 -0
- package/dist/design-system/p-DQFHAKL_.js +1 -0
- package/dist/design-system/p-DykVq5VY.js +1 -0
- package/dist/design-system/p-TF8_Lyhq.js +1 -0
- package/dist/design-system/{p-100f5887.entry.js → p-a640e509.entry.js} +1 -1
- package/dist/design-system/{p-b0aad445.entry.js → p-a71d4947.entry.js} +1 -1
- package/dist/design-system/{p-fc973500.entry.js → p-a7ea1cf0.entry.js} +1 -1
- package/dist/design-system/{p-44d05570.entry.js → p-a97033a2.entry.js} +1 -1
- package/dist/design-system/{p-ae2d45a2.entry.js → p-a98f9a29.entry.js} +1 -1
- package/dist/design-system/{p-de8bb9ba.entry.js → p-ae117afa.entry.js} +1 -1
- package/dist/design-system/{p-5cbaf1db.entry.js → p-c7099e9e.entry.js} +1 -1
- package/dist/design-system/{p-8ee990bd.entry.js → p-cc97f4b4.entry.js} +1 -1
- package/dist/design-system/{p-04fdb4b1.entry.js → p-d39e515d.entry.js} +1 -1
- package/dist/design-system/{p-5ed0becf.entry.js → p-d890a680.entry.js} +1 -1
- package/dist/design-system/{p-d30c823e.entry.js → p-dbeaeb31.entry.js} +1 -1
- package/dist/design-system/{p-5f1c39b8.entry.js → p-e23dac79.entry.js} +1 -1
- package/dist/design-system/{p-857c44e8.entry.js → p-e611dcd4.entry.js} +1 -1
- package/dist/design-system/{p-77690440.entry.js → p-e8e64511.entry.js} +1 -1
- package/dist/design-system/{p-0fe603a4.entry.js → p-e902a3f4.entry.js} +1 -1
- package/dist/design-system/{p-18c5ae1a.entry.js → p-f7074386.entry.js} +1 -1
- package/dist/design-system/{p-caee95b0.entry.js → p-fc5c4f85.entry.js} +1 -1
- package/dist/design-system/{p-43e97572.entry.js → p-fe3ae346.entry.js} +1 -1
- package/dist/esm/component.datepicker-BQn6le_Y.js +119 -0
- package/dist/esm/{component.table-BnfUIhUj.js → component.table-DQFHAKL_.js} +3 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-action-modal.entry.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-button_2.entry.js +269 -3
- package/dist/esm/sd-calendar_2.entry.js +260 -0
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +3 -3
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
- package/dist/esm/sd-date-box.entry.js +2 -2
- package/dist/esm/sd-date-picker.config-CGEE3DkI.js +34 -0
- package/dist/esm/sd-date-picker_7.entry.js +15 -13
- package/dist/esm/sd-date-range-picker-calendar.entry.js +10 -10
- package/dist/esm/sd-dropdown-button.entry.js +3 -3
- package/dist/esm/sd-field_3.entry.js +7 -7
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button.entry.js +2 -2
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-key-value-table.entry.js +1 -1
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-pagination_4.entry.js +27 -36
- package/dist/esm/sd-popover.entry.js +3 -3
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/{sd-table.config-B-VgXXT7.js → sd-table.config-DU7Pc6YH.js} +4 -2
- package/dist/esm/sd-table.entry.js +25 -27
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +2 -2
- package/dist/esm/sd-td.entry.js +18 -9
- package/dist/esm/sd-text-link.entry.js +3 -3
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/esm/useDatePicker-D5RmWGOp.js +98 -0
- package/dist/types/components/sd-calendar/sd-calendar.config.d.ts +55 -0
- package/dist/types/components/sd-calendar/sd-calendar.d.ts +18 -21
- package/dist/types/components/sd-date-picker/sd-date-picker.config.d.ts +0 -38
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker.config.d.ts +2 -1
- package/dist/types/components/sd-table/sd-table.d.ts +1 -1
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +2 -2
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +1 -2
- package/dist/types/components.d.ts +6 -52
- package/dist/types/index.d.ts +4 -3
- package/hydrate/index.js +1035 -1110
- package/hydrate/index.mjs +1035 -1110
- package/package.json +1 -1
- package/dist/cjs/resolveColor-B0hzQNLG.js +0 -270
- package/dist/cjs/sd-calendar.cjs.entry.js +0 -143
- package/dist/cjs/sd-date-picker-calendar_2.cjs.entry.js +0 -219
- package/dist/cjs/sd-date-picker.config-CjvrFpYK.js +0 -177
- package/dist/cjs/useDatePicker-cK_XK_P6.js +0 -48
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.css +0 -117
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +0 -246
- package/dist/components/p-B6cqMQaM.js +0 -1
- package/dist/components/p-BL0ZcHK8.js +0 -1
- package/dist/components/p-Bm3W_eBv.js +0 -1
- package/dist/components/p-BnfUIhUj.js +0 -1
- package/dist/components/p-Ch5Yu1qd.js +0 -1
- package/dist/components/p-D5F7wCNo.js +0 -1
- package/dist/components/p-DTrMR0rx.js +0 -1
- package/dist/components/p-DeQcDHpn.js +0 -1
- package/dist/components/p-DfK4DiDI.js +0 -1
- package/dist/components/p-DyAnn9ea.js +0 -1
- package/dist/components/p-mmdt-WnS.js +0 -1
- package/dist/components/sd-date-picker-calendar.d.ts +0 -11
- package/dist/components/sd-date-picker-calendar.js +0 -1
- package/dist/design-system/p-05611ff7.entry.js +0 -1
- package/dist/design-system/p-2a1ef965.entry.js +0 -1
- package/dist/design-system/p-66af0ba0.entry.js +0 -1
- package/dist/design-system/p-790165f8.entry.js +0 -1
- package/dist/design-system/p-80466582.entry.js +0 -1
- package/dist/design-system/p-8db7d8f2.entry.js +0 -1
- package/dist/design-system/p-B6cqMQaM.js +0 -1
- package/dist/design-system/p-BnfUIhUj.js +0 -1
- package/dist/design-system/p-Ce0cmS4R.js +0 -1
- package/dist/design-system/p-DTrMR0rx.js +0 -1
- package/dist/design-system/p-d8c41313.entry.js +0 -1
- package/dist/design-system/p-mmdt-WnS.js +0 -1
- package/dist/esm/resolveColor-Ce0cmS4R.js +0 -268
- package/dist/esm/sd-calendar.entry.js +0 -141
- package/dist/esm/sd-date-picker-calendar_2.entry.js +0 -216
- package/dist/esm/sd-date-picker.config-B6cqMQaM.js +0 -171
- package/dist/esm/useDatePicker-DTrMR0rx.js +0 -45
- package/dist/types/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.d.ts +0 -26
|
@@ -1,126 +1,195 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { useDatePicker } from "../../modules/useDatePicker";
|
|
3
|
-
import { resolveColor } from "../../utils/color";
|
|
4
2
|
import { today } from "../../utils/date";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'red_60',
|
|
8
|
-
'green_65',
|
|
9
|
-
'orange_60',
|
|
10
|
-
'steelblue_65',
|
|
11
|
-
'yellow_45',
|
|
12
|
-
'oceanblue_65',
|
|
13
|
-
'olive_55',
|
|
14
|
-
];
|
|
3
|
+
import { useDatePicker } from "../../modules/useDatePicker";
|
|
4
|
+
import { CALENDAR_LAYOUT, WEEK_LABELS } from "./sd-calendar.config";
|
|
15
5
|
export class SdCalendar {
|
|
16
6
|
value = null;
|
|
17
7
|
selectable;
|
|
18
8
|
events;
|
|
19
|
-
eventColors;
|
|
20
9
|
currentYear;
|
|
21
10
|
currentMonth;
|
|
22
|
-
|
|
23
|
-
select;
|
|
11
|
+
update;
|
|
24
12
|
viewChange;
|
|
25
13
|
dateUtil = useDatePicker();
|
|
14
|
+
_eventMapCache;
|
|
15
|
+
get eventMap() {
|
|
16
|
+
const cache = this._eventMapCache;
|
|
17
|
+
if (cache && cache.src === this.events)
|
|
18
|
+
return cache.map;
|
|
19
|
+
const map = new Map();
|
|
20
|
+
(this.events ?? []).forEach(g => g.dates.forEach(d => {
|
|
21
|
+
const arr = map.get(d) ?? [];
|
|
22
|
+
arr.push({ color: g.color, label: g.label });
|
|
23
|
+
map.set(d, arr);
|
|
24
|
+
}));
|
|
25
|
+
this._eventMapCache = { src: this.events, map };
|
|
26
|
+
return map;
|
|
27
|
+
}
|
|
28
|
+
get legendItems() {
|
|
29
|
+
const seen = new Set();
|
|
30
|
+
const out = [];
|
|
31
|
+
(this.events ?? []).forEach(g => {
|
|
32
|
+
const key = `${g.color}|${g.label}`;
|
|
33
|
+
if (seen.has(key))
|
|
34
|
+
return;
|
|
35
|
+
seen.add(key);
|
|
36
|
+
out.push({ color: g.color, label: g.label });
|
|
37
|
+
});
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
26
40
|
componentWillLoad() {
|
|
27
|
-
this.
|
|
41
|
+
this.syncViewFromValue();
|
|
28
42
|
}
|
|
29
43
|
handleValueChange() {
|
|
30
|
-
this.
|
|
31
|
-
}
|
|
32
|
-
handleEventsChange() {
|
|
33
|
-
this.eventsRevision = this.eventsRevision + 1;
|
|
44
|
+
this.syncViewFromValue();
|
|
34
45
|
}
|
|
35
|
-
|
|
46
|
+
syncViewFromValue() {
|
|
36
47
|
const base = this.value || today;
|
|
37
48
|
const [year, month] = base.split('-').map(Number);
|
|
38
49
|
this.currentYear = year;
|
|
39
50
|
this.currentMonth = month;
|
|
40
51
|
}
|
|
41
|
-
|
|
42
|
-
return
|
|
52
|
+
formatDate(year, month, day) {
|
|
53
|
+
return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
|
|
43
54
|
}
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return date < startSelectable || date > endSelectable;
|
|
55
|
+
get cells() {
|
|
56
|
+
const year = this.currentYear;
|
|
57
|
+
const month = this.currentMonth;
|
|
58
|
+
const firstDayIndex = new Date(year, month - 1, 1).getDay();
|
|
59
|
+
const daysInCurrent = new Date(year, month, 0).getDate();
|
|
60
|
+
const prevMonth = month === 1 ? 12 : month - 1;
|
|
61
|
+
const prevYear = month === 1 ? year - 1 : year;
|
|
62
|
+
const daysInPrev = new Date(prevYear, prevMonth, 0).getDate();
|
|
63
|
+
const nextMonth = month === 12 ? 1 : month + 1;
|
|
64
|
+
const nextYear = month === 12 ? year + 1 : year;
|
|
65
|
+
const cells = [];
|
|
66
|
+
for (let i = firstDayIndex - 1; i >= 0; i--) {
|
|
67
|
+
const day = daysInPrev - i;
|
|
68
|
+
cells.push({
|
|
69
|
+
date: this.formatDate(prevYear, prevMonth, day),
|
|
70
|
+
day,
|
|
71
|
+
inCurrentMonth: false,
|
|
72
|
+
});
|
|
63
73
|
}
|
|
64
|
-
|
|
65
|
-
|
|
74
|
+
for (let day = 1; day <= daysInCurrent; day++) {
|
|
75
|
+
cells.push({
|
|
76
|
+
date: this.formatDate(year, month, day),
|
|
77
|
+
day,
|
|
78
|
+
inCurrentMonth: true,
|
|
79
|
+
});
|
|
66
80
|
}
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
const remaining = (7 - (cells.length % 7)) % 7;
|
|
82
|
+
for (let day = 1; day <= remaining; day++) {
|
|
83
|
+
cells.push({
|
|
84
|
+
date: this.formatDate(nextYear, nextMonth, day),
|
|
85
|
+
day,
|
|
86
|
+
inCurrentMonth: false,
|
|
87
|
+
});
|
|
69
88
|
}
|
|
70
|
-
return
|
|
89
|
+
return cells;
|
|
71
90
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return resolveColor(this.eventColors[eventName]);
|
|
75
|
-
}
|
|
76
|
-
const allEventNames = this.getAllEventNames();
|
|
77
|
-
const index = allEventNames.indexOf(eventName);
|
|
78
|
-
return resolveColor(DEFAULT_COLORS[index % DEFAULT_COLORS.length]);
|
|
91
|
+
emitViewChange() {
|
|
92
|
+
this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
|
|
79
93
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
goPrevYear = (event) => {
|
|
95
|
+
event.stopPropagation();
|
|
96
|
+
this.currentYear -= 1;
|
|
97
|
+
this.emitViewChange();
|
|
98
|
+
};
|
|
99
|
+
goNextYear = (event) => {
|
|
100
|
+
event.stopPropagation();
|
|
101
|
+
this.currentYear += 1;
|
|
102
|
+
this.emitViewChange();
|
|
103
|
+
};
|
|
104
|
+
goPrevMonth = (event) => {
|
|
105
|
+
event.stopPropagation();
|
|
106
|
+
const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'prev');
|
|
107
|
+
this.currentYear = newYear;
|
|
108
|
+
this.currentMonth = newMonth;
|
|
109
|
+
this.emitViewChange();
|
|
110
|
+
};
|
|
111
|
+
goNextMonth = (event) => {
|
|
112
|
+
event.stopPropagation();
|
|
113
|
+
const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'next');
|
|
114
|
+
this.currentYear = newYear;
|
|
115
|
+
this.currentMonth = newMonth;
|
|
116
|
+
this.emitViewChange();
|
|
117
|
+
};
|
|
118
|
+
isDisabled(date) {
|
|
119
|
+
if (!this.selectable)
|
|
120
|
+
return false;
|
|
121
|
+
const [start, end] = this.selectable;
|
|
122
|
+
if (start !== '' && date < start)
|
|
123
|
+
return true;
|
|
124
|
+
if (end !== '' && date > end)
|
|
125
|
+
return true;
|
|
126
|
+
return false;
|
|
95
127
|
}
|
|
96
|
-
|
|
97
|
-
|
|
128
|
+
handleDayClick(cell) {
|
|
129
|
+
if (this.isDisabled(cell.date))
|
|
130
|
+
return;
|
|
131
|
+
this.value = cell.date;
|
|
132
|
+
this.update.emit(cell.date);
|
|
98
133
|
}
|
|
99
134
|
render() {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
const cssVars = {
|
|
136
|
+
'--calendar-bg': CALENDAR_LAYOUT.bg,
|
|
137
|
+
'--calendar-padding': `${CALENDAR_LAYOUT.paddingXY}px`,
|
|
138
|
+
'--calendar-gap': `${CALENDAR_LAYOUT.gap}px`,
|
|
139
|
+
'--calendar-radius': `${CALENDAR_LAYOUT.radius}px`,
|
|
140
|
+
'--calendar-header-gap': `${CALENDAR_LAYOUT.header.gap}px`,
|
|
141
|
+
'--calendar-header-divider': CALENDAR_LAYOUT.header.divider,
|
|
142
|
+
'--calendar-header-font-size': `${CALENDAR_LAYOUT.header.fontSize}px`,
|
|
143
|
+
'--calendar-header-line-height': `${CALENDAR_LAYOUT.header.lineHeight}px`,
|
|
144
|
+
'--calendar-header-font-weight': CALENDAR_LAYOUT.header.fontWeight,
|
|
145
|
+
'--calendar-week-font-size': `${CALENDAR_LAYOUT.week.fontSize}px`,
|
|
146
|
+
'--calendar-week-line-height': `${CALENDAR_LAYOUT.week.lineHeight}px`,
|
|
147
|
+
'--calendar-week-font-weight': CALENDAR_LAYOUT.week.fontWeight,
|
|
148
|
+
'--calendar-week-color': CALENDAR_LAYOUT.week.color,
|
|
149
|
+
'--calendar-grid-row-gap': `${CALENDAR_LAYOUT.grid.rowGap}px`,
|
|
150
|
+
'--calendar-day-size': `${CALENDAR_LAYOUT.day.size}px`,
|
|
151
|
+
'--calendar-day-circle-size': `${CALENDAR_LAYOUT.day.circleSize}px`,
|
|
152
|
+
'--calendar-day-circle-radius': `${CALENDAR_LAYOUT.day.circleRadius}px`,
|
|
153
|
+
'--calendar-day-text': CALENDAR_LAYOUT.day.defaultText,
|
|
154
|
+
'--calendar-day-hover-text': CALENDAR_LAYOUT.day.hoverText,
|
|
155
|
+
'--calendar-day-hover-border': CALENDAR_LAYOUT.day.hoverBorder,
|
|
156
|
+
'--calendar-day-select-bg': CALENDAR_LAYOUT.day.selectBg,
|
|
157
|
+
'--calendar-day-select-text': CALENDAR_LAYOUT.day.selectText,
|
|
158
|
+
'--calendar-day-disabled-text': CALENDAR_LAYOUT.day.disabledText,
|
|
159
|
+
'--calendar-day-font-size': `${CALENDAR_LAYOUT.day.fontSize}px`,
|
|
160
|
+
'--calendar-day-line-height': `${CALENDAR_LAYOUT.day.lineHeight}px`,
|
|
161
|
+
'--calendar-day-font-weight': CALENDAR_LAYOUT.day.fontWeight,
|
|
162
|
+
'--calendar-day-bold-font-weight': CALENDAR_LAYOUT.day.boldFontWeight,
|
|
163
|
+
'--calendar-day-dot-size': `${CALENDAR_LAYOUT.day.dot.size}px`,
|
|
164
|
+
'--calendar-day-dot-gap': `${CALENDAR_LAYOUT.day.dot.gap}px`,
|
|
165
|
+
'--calendar-day-dot-padding-y': `${CALENDAR_LAYOUT.day.dot.paddingY}px`,
|
|
166
|
+
'--calendar-legend-font-size': `${CALENDAR_LAYOUT.legend.fontSize}px`,
|
|
167
|
+
'--calendar-legend-line-height': `${CALENDAR_LAYOUT.legend.lineHeight}px`,
|
|
168
|
+
'--calendar-legend-font-weight': CALENDAR_LAYOUT.legend.fontWeight,
|
|
169
|
+
'--calendar-legend-gap': `${CALENDAR_LAYOUT.legend.gap}px`,
|
|
170
|
+
'--calendar-legend-group-gap': `${CALENDAR_LAYOUT.legend.groupGap}px`,
|
|
171
|
+
};
|
|
172
|
+
const eventMap = this.eventMap;
|
|
173
|
+
const legend = this.legendItems;
|
|
174
|
+
const hasEvents = (this.events?.length ?? 0) > 0;
|
|
175
|
+
return (h("div", { key: '79cfdb58f8d44085c87cfea6458e60654bfa09bb', class: "sd-calendar", style: cssVars }, h("div", { key: '065620bcd155de11ef2272720de57ef6fcd9fd20', class: "sd-calendar__header" }, h("div", { key: 'ae27c8fe51c44137932b18cc83b64dcce7e2bbaa', class: "sd-calendar__nav-group" }, h("sd-ghost-button", { key: '8207f6d77705999419f451db032c059564ea0c17', ariaLabel: "prevYear", size: "xxs", icon: "chevronLeft", onClick: this.goPrevYear }), h("span", { key: 'b5bf63784dd06c3ce5a4d4c5514fea22efb08793', class: "sd-calendar__label" }, this.currentYear), h("sd-ghost-button", { key: '14512de68825e3b158704c3084306029ade8fcc1', ariaLabel: "nextYear", size: "xxs", icon: "chevronRight", onClick: this.goNextYear })), h("span", { key: 'e37eb90d72c2e64b8ebb1da4ddf3fccb7ff18cc3', class: "sd-calendar__divider", "aria-hidden": "true" }), h("div", { key: '07b1696b663ddb992e5a8d8b5ab98205ba136d9d', class: "sd-calendar__nav-group sd-calendar__nav-group-month" }, h("sd-ghost-button", { key: 'b742889a44643d3e4d3b6da90784923c40e5a07f', ariaLabel: "prevMonth", size: "xxs", icon: "chevronLeft", onClick: this.goPrevMonth }), h("span", { key: 'c97402106312c3a6eb220798263ba818419e7d27', class: "sd-calendar__label sd-calendar__label-month" }, this.currentMonth, "\uC6D4"), h("sd-ghost-button", { key: '55411b1328acb781d71a7a84996d2a29886612cd', ariaLabel: "nextMonth", size: "xxs", icon: "chevronRight", onClick: this.goNextMonth }))), h("div", { key: 'd10b03d31be412b545999d7e70bd9a349e5f1880', class: "sd-calendar__week" }, WEEK_LABELS.map(label => (h("span", { key: label, class: "sd-calendar__week-cell" }, label)))), h("div", { key: '0b8f82db3753fe08435b07dee695d49a192786c0', class: "sd-calendar__grid" }, this.cells.map(cell => {
|
|
176
|
+
const isSelected = cell.inCurrentMonth && this.value !== '' && this.value === cell.date;
|
|
177
|
+
const isToday = cell.inCurrentMonth && today === cell.date;
|
|
178
|
+
const isDisabled = cell.inCurrentMonth && this.isDisabled(cell.date);
|
|
179
|
+
const dayEvents = cell.inCurrentMonth ? eventMap.get(cell.date) : undefined;
|
|
180
|
+
return (h("button", { type: "button", key: cell.date, class: {
|
|
181
|
+
'sd-calendar__day': true,
|
|
182
|
+
'sd-calendar__day--empty': !cell.inCurrentMonth,
|
|
183
|
+
'sd-calendar__day--today': isToday,
|
|
184
|
+
'sd-calendar__day--selected': isSelected,
|
|
185
|
+
'sd-calendar__day--disabled': isDisabled,
|
|
186
|
+
}, disabled: !cell.inCurrentMonth || isDisabled, tabindex: !cell.inCurrentMonth ? -1 : undefined, "aria-hidden": !cell.inCurrentMonth ? 'true' : undefined, onClick: () => cell.inCurrentMonth && this.handleDayClick(cell) }, h("span", { class: "sd-calendar__day-circle" }, cell.inCurrentMonth ? cell.day : ''), hasEvents && (h("span", { class: "sd-calendar__dot-row", "aria-hidden": "true" }, dayEvents?.map((ev, i) => (h("span", { key: `${ev.color}|${ev.label}|${i}`, class: "sd-calendar__dot", style: { backgroundColor: ev.color } })))))));
|
|
187
|
+
})), legend.length > 0 && [
|
|
188
|
+
h("span", { key: 'a837c5956da658561fcbd2e646b0abbb0fa84a20', class: "sd-calendar__divider-bottom", "aria-hidden": "true" }),
|
|
189
|
+
h("div", { key: '190b9947e5ecd627fad03b40c58c2e0c8719daaa', class: "sd-calendar__legend" }, legend.map(item => (h("span", { key: `${item.color}|${item.label}`, class: "sd-calendar__legend-item" }, h("span", { class: "sd-calendar__legend-dot", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { class: "sd-calendar__legend-label" }, item.label))))),
|
|
190
|
+
]));
|
|
121
191
|
}
|
|
122
192
|
static get is() { return "sd-calendar"; }
|
|
123
|
-
static get encapsulation() { return "scoped"; }
|
|
124
193
|
static get originalStyleUrls() {
|
|
125
194
|
return {
|
|
126
195
|
"$": ["sd-calendar.scss"]
|
|
@@ -149,7 +218,7 @@ export class SdCalendar {
|
|
|
149
218
|
},
|
|
150
219
|
"getter": false,
|
|
151
220
|
"setter": false,
|
|
152
|
-
"reflect":
|
|
221
|
+
"reflect": false,
|
|
153
222
|
"attribute": "value",
|
|
154
223
|
"defaultValue": "null"
|
|
155
224
|
},
|
|
@@ -174,36 +243,14 @@ export class SdCalendar {
|
|
|
174
243
|
"type": "unknown",
|
|
175
244
|
"mutable": false,
|
|
176
245
|
"complexType": {
|
|
177
|
-
"original": "
|
|
178
|
-
"resolved": "
|
|
179
|
-
"references": {
|
|
180
|
-
"CalendarEvents": {
|
|
181
|
-
"location": "local",
|
|
182
|
-
"path": "/Users/meijing/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-calendar/sd-calendar.tsx",
|
|
183
|
-
"id": "src/components/sd-calendar/sd-calendar.tsx::CalendarEvents"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
"required": false,
|
|
188
|
-
"optional": true,
|
|
189
|
-
"docs": {
|
|
190
|
-
"tags": [],
|
|
191
|
-
"text": ""
|
|
192
|
-
},
|
|
193
|
-
"getter": false,
|
|
194
|
-
"setter": false
|
|
195
|
-
},
|
|
196
|
-
"eventColors": {
|
|
197
|
-
"type": "unknown",
|
|
198
|
-
"mutable": false,
|
|
199
|
-
"complexType": {
|
|
200
|
-
"original": "CalendarEventColors",
|
|
201
|
-
"resolved": "CalendarEventColors | undefined",
|
|
246
|
+
"original": "CalendarEventGroup[]",
|
|
247
|
+
"resolved": "CalendarEventGroup[] | undefined",
|
|
202
248
|
"references": {
|
|
203
|
-
"
|
|
204
|
-
"location": "
|
|
205
|
-
"path": "
|
|
206
|
-
"id": "src/components/sd-calendar/sd-calendar.
|
|
249
|
+
"CalendarEventGroup": {
|
|
250
|
+
"location": "import",
|
|
251
|
+
"path": "./sd-calendar.config",
|
|
252
|
+
"id": "src/components/sd-calendar/sd-calendar.config.ts::CalendarEventGroup",
|
|
253
|
+
"referenceLocation": "CalendarEventGroup"
|
|
207
254
|
}
|
|
208
255
|
}
|
|
209
256
|
},
|
|
@@ -221,14 +268,13 @@ export class SdCalendar {
|
|
|
221
268
|
static get states() {
|
|
222
269
|
return {
|
|
223
270
|
"currentYear": {},
|
|
224
|
-
"currentMonth": {}
|
|
225
|
-
"eventsRevision": {}
|
|
271
|
+
"currentMonth": {}
|
|
226
272
|
};
|
|
227
273
|
}
|
|
228
274
|
static get events() {
|
|
229
275
|
return [{
|
|
230
|
-
"method": "
|
|
231
|
-
"name": "
|
|
276
|
+
"method": "update",
|
|
277
|
+
"name": "sdUpdate",
|
|
232
278
|
"bubbles": true,
|
|
233
279
|
"cancelable": true,
|
|
234
280
|
"composed": true,
|
|
@@ -262,12 +308,6 @@ export class SdCalendar {
|
|
|
262
308
|
return [{
|
|
263
309
|
"propName": "value",
|
|
264
310
|
"methodName": "handleValueChange"
|
|
265
|
-
}, {
|
|
266
|
-
"propName": "events",
|
|
267
|
-
"methodName": "handleEventsChange"
|
|
268
|
-
}, {
|
|
269
|
-
"propName": "eventColors",
|
|
270
|
-
"methodName": "handleEventsChange"
|
|
271
311
|
}];
|
|
272
312
|
}
|
|
273
313
|
}
|
|
@@ -3,7 +3,7 @@ export class SdCard {
|
|
|
3
3
|
bordered = false;
|
|
4
4
|
sdClass = '';
|
|
5
5
|
render() {
|
|
6
|
-
return (h(Fragment, { key: '
|
|
6
|
+
return (h(Fragment, { key: '61c364f88b03eb56b60c660a58533f417d209e6a' }, h("div", { key: 'dee3671e757c273ffec06a15a0191a798280522c', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, h("slot", { key: 'f991bf5df95f8c1bac417aa4e70f40cf68624fb8' }))));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "sd-card"; }
|
|
9
9
|
static get originalStyleUrls() {
|
|
@@ -100,13 +100,13 @@ export class SdCheckbox {
|
|
|
100
100
|
'--sd-checkbox-inverse-icon': CHECKBOX_COLORS.checked.iconInverse,
|
|
101
101
|
'--sd-checkbox-inverse-label': CHECKBOX_COLORS.labelInverse,
|
|
102
102
|
};
|
|
103
|
-
return (h("label", { key: '
|
|
103
|
+
return (h("label", { key: '6fb506c448a5968d403f779d113fd60857901982', class: this.checkboxClasses, style: cssVars }, h("input", { key: 'fb08f531416255b8886d2bd2c21c3f62e8a9d47d', type: "checkbox", ref: el => {
|
|
104
104
|
this.inputEl = el;
|
|
105
|
-
}, value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.val?.toString() || 'checkbox', "aria-label": this.label || 'checkbox', "aria-checked": this.isChecked === null ? 'mixed' : this.isChecked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }), h("div", { key: '
|
|
105
|
+
}, value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.val?.toString() || 'checkbox', "aria-label": this.label || 'checkbox', "aria-checked": this.isChecked === null ? 'mixed' : this.isChecked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }), h("div", { key: 'e49eb38375ba680e08510f83a15ce8a6bbecd4b8', class: "sd-checkbox__bg" }, this.isChecked !== false ? (h("sd-icon", { name: this.isChecked === true ? 'checkboxCheck' : 'checkboxIndeterminate', size: Number(CHECKBOX_LAYOUT.iconSize), color: this.disabled
|
|
106
106
|
? CHECKBOX_COLORS.checked.iconDisabled
|
|
107
107
|
: this.inverse
|
|
108
108
|
? CHECKBOX_COLORS.checked.iconInverse
|
|
109
|
-
: CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '
|
|
109
|
+
: CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '92bc308561b0a7653926d751d029d80c38844b07', class: "sd-checkbox__label" }, this.label)));
|
|
110
110
|
}
|
|
111
111
|
static get is() { return "sd-checkbox"; }
|
|
112
112
|
static get originalStyleUrls() {
|
|
@@ -205,7 +205,7 @@ export class SdChip {
|
|
|
205
205
|
'--sd-chip-font-weight': typography.fontWeight,
|
|
206
206
|
'--sd-chip-line-height': typography.lineHeight,
|
|
207
207
|
};
|
|
208
|
-
return (h("span", { key: '
|
|
208
|
+
return (h("span", { key: '3cd683af3aed7cc6e549c5fc5da1e00cda2dc2a0', class: {
|
|
209
209
|
'sd-chip': true,
|
|
210
210
|
[`sd-chip--${state}`]: true,
|
|
211
211
|
'sd-chip--disabled': this.disabled,
|
|
@@ -27,7 +27,7 @@ export class SdCircleProgress {
|
|
|
27
27
|
}
|
|
28
28
|
const c = CIRCLE_PROGRESS_VIEWBOX_SIZE / 2;
|
|
29
29
|
const showPercent = !this.indeterminate;
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'd4ace6f784fd64a45baa746870a84a88b4911cf8', style: hostStyle }, h("svg", { key: '08aef376ac746abf1a9b404e37703a862f956a08', class: "sd-circle-progress", viewBox: `0 0 ${CIRCLE_PROGRESS_VIEWBOX_SIZE} ${CIRCLE_PROGRESS_VIEWBOX_SIZE}`, xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: '42411ef6f92f6427309d92dfad84ad7dc8f8c3bb', class: "sd-circle-progress__track", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH }), h("circle", { key: 'a0ae53ce4dfd557e980155cd0ff22ba064fe32dc', class: "sd-circle-progress__arc", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH, "stroke-linecap": "round", style: arcStyle })), showPercent && (h("span", { key: '0917cfd3aa460872fa4c35da61530e01080d6937', class: "sd-circle-progress__percent" }, Math.round(this.clampedValue), "%")), this.label && h("span", { key: '051756bc7b20e87205b21c735b2827a81c2a17c9', class: "sd-circle-progress__label" }, this.label)));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "sd-circle-progress"; }
|
|
33
33
|
static get originalStyleUrls() {
|
|
@@ -72,9 +72,9 @@ export class SdConfirmModal {
|
|
|
72
72
|
const type = this.resolvedType;
|
|
73
73
|
const iconName = CONFIRM_MODAL_ICON_MAP[type];
|
|
74
74
|
const iconColor = CONFIRM_MODAL_ICON_COLOR[type];
|
|
75
|
-
return (h("div", { key: '
|
|
75
|
+
return (h("div", { key: '6dc337947f7c05799cf7c97d45b0df84c7976196', class: "sd-confirm-modal" }, h("sd-ghost-button", { key: 'b584cc4bc00191f8488be7265249922110d57d90', class: "sd-confirm-modal__close-button", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '470716bef879befd1d6746bc27c10fb74d61a2b6', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: '5b0113f13b219a2e14c5d45397c293baafc28a2c', class: `sd-confirm-modal__title ${this.titleClass ?? ''}` }, this.modalTitle), h("div", { key: 'cee18d1afde384523ca0f96f4138b8854f89cb5c', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: 'b9466be3cbb635c9b8c0a50d7023b70fa31d9f0f', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (h("div", { key: 'f3ea52c0261a63e75b42175c2e7c602e02f82636', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
|
|
76
76
|
this.customContentRef = el;
|
|
77
|
-
} })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset ?? 'square_sm_grey', label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: '
|
|
77
|
+
} })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset ?? 'square_sm_grey', label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: 'fa33e4f68a1c36e197ff6a6f5629005fbbebcbc3', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), h("div", { key: '378162e9e44cefc4e61113ba927545040e6a6c6c', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button", { key: '8fb93a086c4a42063f53ed533be2774de31db81e', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.cancel.emit() })), h("sd-button", { key: '304c80915c9a7a685bddcf2d5edf4f56119860e8', name: this.resolvedMainButton, label: this.mainButtonLabel ?? '확인', onSdClick: () => this.ok.emit() }))));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "sd-confirm-modal"; }
|
|
80
80
|
static get originalStyleUrls() {
|
|
@@ -23,7 +23,7 @@ export class SdDateBox {
|
|
|
23
23
|
this.mouseOver?.emit(this.date);
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: 'ab09e8112e18b04dab2d171fa6dbd8554d11e57b', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
27
27
|
'sd-date-box': true,
|
|
28
28
|
'sd-hoverable': !this.disabled || !this.selected || this.type === '',
|
|
29
29
|
'sd-date-box--disabled': this.disabled,
|
|
@@ -39,7 +39,7 @@ export class SdDateBox {
|
|
|
39
39
|
e.preventDefault();
|
|
40
40
|
this.handleClickDate();
|
|
41
41
|
}
|
|
42
|
-
}, onMouseOver: () => this.handleHoverDate(), onFocus: () => this.handleHoverDate() }, h("div", { key: '
|
|
42
|
+
}, onMouseOver: () => this.handleHoverDate(), onFocus: () => this.handleHoverDate() }, h("div", { key: 'b7e418536d6de86ae4e8042a0fc59dece42f7489', class: "sd-date-box__content" }, h("div", { key: '41f2b2136cc60e2d1a6664852a3fadf30413de0f', class: "sd-date-box__label" }, this.date))));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "sd-date-box"; }
|
|
45
45
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js
CHANGED
|
@@ -33,7 +33,7 @@ export class SdDatePickerTrigger {
|
|
|
33
33
|
? DATEPICKER_COLORS.icon.disabled
|
|
34
34
|
: DATEPICKER_COLORS.icon.default,
|
|
35
35
|
};
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '57a23626b1a392be20dccead71b792590fab61b8', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
37
37
|
'sd-date-picker-trigger': true,
|
|
38
38
|
'sd-date-picker-trigger--disabled': this.disabled,
|
|
39
39
|
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
@@ -41,7 +41,7 @@ export class SdDatePickerTrigger {
|
|
|
41
41
|
e.preventDefault();
|
|
42
42
|
this.handleClick();
|
|
43
43
|
}
|
|
44
|
-
} }, h("sd-icon", { key: '
|
|
44
|
+
} }, h("sd-icon", { key: 'd4bb58eb97f9f2b98c27315547a85b019530ce5e', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: '25222882fa966eb5d6ead15e62b65af26586afbd', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "sd-date-picker-trigger"; }
|
|
47
47
|
static get originalStyleUrls() {
|
|
@@ -29,41 +29,3 @@ export const DATEPICKER_COLORS = {
|
|
|
29
29
|
icon: datepickerTokens.datepicker.icon,
|
|
30
30
|
text: datepickerTokens.datepicker.text,
|
|
31
31
|
};
|
|
32
|
-
export const CALENDAR_LAYOUT = {
|
|
33
|
-
bg: datepickerTokens.datepicker.calendar.bg,
|
|
34
|
-
paddingXY: datepickerTokens.datepicker.calendar.paddingXY,
|
|
35
|
-
gap: datepickerTokens.datepicker.calendar.gap,
|
|
36
|
-
radius: datepickerTokens.datepicker.calendar.radius,
|
|
37
|
-
header: {
|
|
38
|
-
gap: datepickerTokens.datepicker.calendar.header.gap,
|
|
39
|
-
divider: datepickerTokens.datepicker.calendar.header.divider,
|
|
40
|
-
fontSize: datepickerTokens.datepicker.calendar.header.typography.fontSize,
|
|
41
|
-
lineHeight: datepickerTokens.datepicker.calendar.header.typography.lineHeight,
|
|
42
|
-
fontWeight: datepickerTokens.datepicker.calendar.header.typography.fontWeight,
|
|
43
|
-
},
|
|
44
|
-
week: {
|
|
45
|
-
fontSize: datepickerTokens.datepicker.calendar.week.typography.fontSize,
|
|
46
|
-
lineHeight: datepickerTokens.datepicker.calendar.week.typography.lineHeight,
|
|
47
|
-
fontWeight: datepickerTokens.datepicker.calendar.week.typography.fontWeight,
|
|
48
|
-
color: datepickerTokens.datepicker.calendar.week.color,
|
|
49
|
-
},
|
|
50
|
-
grid: {
|
|
51
|
-
rowGap: datepickerTokens.datepicker.calendar.grid.rowGap,
|
|
52
|
-
},
|
|
53
|
-
day: {
|
|
54
|
-
size: datepickerTokens.datepicker.calendar.day.width,
|
|
55
|
-
circleSize: datepickerTokens.datepicker.calendar.day.circle.size,
|
|
56
|
-
circleRadius: datepickerTokens.datepicker.calendar.day.circle.radius,
|
|
57
|
-
defaultText: datepickerTokens.datepicker.calendar.day.default.text,
|
|
58
|
-
hoverText: datepickerTokens.datepicker.calendar.day.hover.text,
|
|
59
|
-
hoverBorder: datepickerTokens.datepicker.calendar.day.hover.border,
|
|
60
|
-
selectBg: datepickerTokens.datepicker.calendar.day.select.bg,
|
|
61
|
-
selectText: datepickerTokens.datepicker.calendar.day.select.text,
|
|
62
|
-
disabledText: datepickerTokens.datepicker.calendar.day.disabled.text,
|
|
63
|
-
fontSize: datepickerTokens.datepicker.calendar.day.typography.default.fontSize,
|
|
64
|
-
lineHeight: datepickerTokens.datepicker.calendar.day.typography.default.lineHeight,
|
|
65
|
-
fontWeight: datepickerTokens.datepicker.calendar.day.typography.default.fontWeight,
|
|
66
|
-
boldFontWeight: datepickerTokens.datepicker.calendar.day.typography.bold.fontWeight,
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
export const WEEK_LABELS = ['일', '월', '화', '수', '목', '금', '토'];
|
|
@@ -69,6 +69,7 @@ export class SdDatePicker {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
handleSelect = (e) => {
|
|
72
|
+
e.stopPropagation();
|
|
72
73
|
this.closeDropdown();
|
|
73
74
|
this.value = e.detail;
|
|
74
75
|
const nextValue = this.value;
|
|
@@ -92,9 +93,9 @@ export class SdDatePicker {
|
|
|
92
93
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
93
94
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
94
95
|
};
|
|
95
|
-
return (h("sd-field", { key: '
|
|
96
|
+
return (h("sd-field", { key: '825c845ea1ada63a9f21cfc43aad04a598325c13', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'b9dd1a8df29f340ad67331dbebd3ec71b79d128a', class: "sd-date-picker", ref: el => {
|
|
96
97
|
this.triggerRef = el;
|
|
97
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
98
|
+
} }, h("sd-date-picker-trigger", { key: 'b9bed57fa4a2b06b004ec5a1b723ed5af25fda19', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '776e0ce183edd9c7903ce1a75208addc47c20408', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-calendar", { key: 'f86b502f6b17ee9ff262c1a64e1b0e24defc1660', value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
98
99
|
}
|
|
99
100
|
static get is() { return "sd-date-picker"; }
|
|
100
101
|
static get originalStyleUrls() {
|
|
@@ -239,7 +239,7 @@ export class SdDateRangePickerCalendar {
|
|
|
239
239
|
'--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
|
|
240
240
|
'--range-divider': RANGE_LAYOUT.divider,
|
|
241
241
|
};
|
|
242
|
-
return (h(Fragment, { key: '
|
|
242
|
+
return (h(Fragment, { key: 'f871d59077f63aa2f7d1bbe857a9ff095331c82d' }, h("div", { key: '47f4782b315450f07bccec8697d8e98a83e44faf', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), h("div", { key: 'cf0eb07920b298f2fce001cc8246d51e1174c27d', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: 'e1d060092eb3b73c890bf0d62f6485ca2a09e187', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
|
|
243
243
|
}
|
|
244
244
|
static get is() { return "sd-date-range-picker-calendar"; }
|
|
245
245
|
static get originalStyleUrls() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import datepickerTokens from "../../tokens/generated/component.datepicker.json";
|
|
2
|
-
import { DATEPICKER_SIZE_MAP, DATEPICKER_COLORS,
|
|
2
|
+
import { DATEPICKER_SIZE_MAP, DATEPICKER_COLORS, } from "../sd-date-picker/sd-date-picker.config";
|
|
3
|
+
import { CALENDAR_LAYOUT, WEEK_LABELS } from "../sd-calendar/sd-calendar.config";
|
|
3
4
|
export { DATEPICKER_SIZE_MAP, DATEPICKER_COLORS, CALENDAR_LAYOUT, WEEK_LABELS };
|
|
4
5
|
export const RANGE_LAYOUT = {
|
|
5
6
|
bg: datepickerTokens.datepicker.calendar.range.bg,
|
|
@@ -98,9 +98,9 @@ export class SdDateRangePicker {
|
|
|
98
98
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
99
99
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
100
100
|
};
|
|
101
|
-
return (h("sd-field", { key: '
|
|
101
|
+
return (h("sd-field", { key: '89eaeb8978796508650aec5f3ccdeb7df16fb6f4', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'f3ce583e53edbc451ab6c0592c0ab2ed87e07a06', class: "sd-date-range-picker", ref: el => {
|
|
102
102
|
this.triggerRef = el;
|
|
103
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
103
|
+
} }, h("sd-date-picker-trigger", { key: '53086fd3d15dc2c05364a66fdf767e09c6c19fac', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '5ee1499ee9a224a9c653095e9914ed20cbaca2a1', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-range-picker-calendar", { key: '7c7479dacf57c996a708435857d2b5f7900509fd', value: this.value, selectable: this.selectable, maxRange: this.maxRange, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
104
104
|
}
|
|
105
105
|
static get is() { return "sd-date-range-picker"; }
|
|
106
106
|
static get originalStyleUrls() {
|