@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,177 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const datepicker = {
|
|
4
|
-
sm: {
|
|
5
|
-
height: "28",
|
|
6
|
-
paddingX: "12",
|
|
7
|
-
gap: "8",
|
|
8
|
-
icon: "16",
|
|
9
|
-
typography: {
|
|
10
|
-
fontWeight: "400",
|
|
11
|
-
fontSize: "12",
|
|
12
|
-
lineHeight: "20"},
|
|
13
|
-
radius: "4"
|
|
14
|
-
},
|
|
15
|
-
md: {
|
|
16
|
-
height: "36",
|
|
17
|
-
paddingX: "16",
|
|
18
|
-
gap: "12",
|
|
19
|
-
icon: "20",
|
|
20
|
-
typography: {
|
|
21
|
-
fontWeight: "400",
|
|
22
|
-
fontSize: "14",
|
|
23
|
-
lineHeight: "24"
|
|
24
|
-
},
|
|
25
|
-
radius: "6"
|
|
26
|
-
},
|
|
27
|
-
border: {
|
|
28
|
-
"default": "#AAAAAA",
|
|
29
|
-
focus: "#0075FF"},
|
|
30
|
-
bg: {
|
|
31
|
-
"default": "#FFFFFF"},
|
|
32
|
-
icon: {
|
|
33
|
-
"default": "#888888",
|
|
34
|
-
disabled: "#BBBBBB"
|
|
35
|
-
},
|
|
36
|
-
text: {
|
|
37
|
-
"default": "#222222",
|
|
38
|
-
hint: "#555555",
|
|
39
|
-
disabled: "#888888"
|
|
40
|
-
},
|
|
41
|
-
calendar: {
|
|
42
|
-
bg: "#FFFFFF",
|
|
43
|
-
paddingXY: "24",
|
|
44
|
-
gap: "12",
|
|
45
|
-
radius: "8",
|
|
46
|
-
header: {
|
|
47
|
-
gap: "8",
|
|
48
|
-
divider: "#E1E1E1",
|
|
49
|
-
typography: {
|
|
50
|
-
fontWeight: "500",
|
|
51
|
-
fontSize: "14",
|
|
52
|
-
lineHeight: "24"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
week: {
|
|
56
|
-
typography: {
|
|
57
|
-
fontWeight: "400",
|
|
58
|
-
fontSize: "12",
|
|
59
|
-
lineHeight: "20"},
|
|
60
|
-
color: "#888888"
|
|
61
|
-
},
|
|
62
|
-
grid: {
|
|
63
|
-
rowGap: "4"
|
|
64
|
-
},
|
|
65
|
-
day: {
|
|
66
|
-
width: "40",
|
|
67
|
-
circle: {
|
|
68
|
-
size: "32",
|
|
69
|
-
radius: "9999"
|
|
70
|
-
},
|
|
71
|
-
"default": {
|
|
72
|
-
text: "#222222"
|
|
73
|
-
},
|
|
74
|
-
hover: {
|
|
75
|
-
text: "#222222",
|
|
76
|
-
border: "#0075FF"
|
|
77
|
-
},
|
|
78
|
-
select: {
|
|
79
|
-
bg: "#0075FF",
|
|
80
|
-
text: "#FFFFFF"
|
|
81
|
-
},
|
|
82
|
-
disabled: {
|
|
83
|
-
text: "#BBBBBB"
|
|
84
|
-
},
|
|
85
|
-
typography: {
|
|
86
|
-
"default": {
|
|
87
|
-
fontWeight: "400",
|
|
88
|
-
fontSize: "14",
|
|
89
|
-
lineHeight: "24"
|
|
90
|
-
},
|
|
91
|
-
bold: {
|
|
92
|
-
fontWeight: "700"}
|
|
93
|
-
}},
|
|
94
|
-
range: {
|
|
95
|
-
bg: "#D9EAFF",
|
|
96
|
-
height: "32",
|
|
97
|
-
panelGap: "24",
|
|
98
|
-
divider: "#E1E1E1"}}
|
|
99
|
-
};
|
|
100
|
-
var datepickerTokens = {
|
|
101
|
-
datepicker: datepicker
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const sm = datepickerTokens.datepicker.sm;
|
|
105
|
-
const md = datepickerTokens.datepicker.md;
|
|
106
|
-
const DATEPICKER_SIZE_MAP = {
|
|
107
|
-
sm: {
|
|
108
|
-
height: sm.height,
|
|
109
|
-
paddingX: sm.paddingX,
|
|
110
|
-
gap: sm.gap,
|
|
111
|
-
iconSize: sm.icon,
|
|
112
|
-
radius: sm.radius,
|
|
113
|
-
fontSize: sm.typography.fontSize,
|
|
114
|
-
lineHeight: sm.typography.lineHeight,
|
|
115
|
-
fontWeight: sm.typography.fontWeight,
|
|
116
|
-
},
|
|
117
|
-
md: {
|
|
118
|
-
height: md.height,
|
|
119
|
-
paddingX: md.paddingX,
|
|
120
|
-
gap: md.gap,
|
|
121
|
-
iconSize: md.icon,
|
|
122
|
-
radius: md.radius,
|
|
123
|
-
fontSize: md.typography.fontSize,
|
|
124
|
-
lineHeight: md.typography.lineHeight,
|
|
125
|
-
fontWeight: md.typography.fontWeight,
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
const DATEPICKER_COLORS = {
|
|
129
|
-
border: datepickerTokens.datepicker.border,
|
|
130
|
-
bg: datepickerTokens.datepicker.bg,
|
|
131
|
-
icon: datepickerTokens.datepicker.icon,
|
|
132
|
-
text: datepickerTokens.datepicker.text,
|
|
133
|
-
};
|
|
134
|
-
const CALENDAR_LAYOUT = {
|
|
135
|
-
bg: datepickerTokens.datepicker.calendar.bg,
|
|
136
|
-
paddingXY: datepickerTokens.datepicker.calendar.paddingXY,
|
|
137
|
-
gap: datepickerTokens.datepicker.calendar.gap,
|
|
138
|
-
radius: datepickerTokens.datepicker.calendar.radius,
|
|
139
|
-
header: {
|
|
140
|
-
gap: datepickerTokens.datepicker.calendar.header.gap,
|
|
141
|
-
divider: datepickerTokens.datepicker.calendar.header.divider,
|
|
142
|
-
fontSize: datepickerTokens.datepicker.calendar.header.typography.fontSize,
|
|
143
|
-
lineHeight: datepickerTokens.datepicker.calendar.header.typography.lineHeight,
|
|
144
|
-
fontWeight: datepickerTokens.datepicker.calendar.header.typography.fontWeight,
|
|
145
|
-
},
|
|
146
|
-
week: {
|
|
147
|
-
fontSize: datepickerTokens.datepicker.calendar.week.typography.fontSize,
|
|
148
|
-
lineHeight: datepickerTokens.datepicker.calendar.week.typography.lineHeight,
|
|
149
|
-
fontWeight: datepickerTokens.datepicker.calendar.week.typography.fontWeight,
|
|
150
|
-
color: datepickerTokens.datepicker.calendar.week.color,
|
|
151
|
-
},
|
|
152
|
-
grid: {
|
|
153
|
-
rowGap: datepickerTokens.datepicker.calendar.grid.rowGap,
|
|
154
|
-
},
|
|
155
|
-
day: {
|
|
156
|
-
size: datepickerTokens.datepicker.calendar.day.width,
|
|
157
|
-
circleSize: datepickerTokens.datepicker.calendar.day.circle.size,
|
|
158
|
-
circleRadius: datepickerTokens.datepicker.calendar.day.circle.radius,
|
|
159
|
-
defaultText: datepickerTokens.datepicker.calendar.day.default.text,
|
|
160
|
-
hoverText: datepickerTokens.datepicker.calendar.day.hover.text,
|
|
161
|
-
hoverBorder: datepickerTokens.datepicker.calendar.day.hover.border,
|
|
162
|
-
selectBg: datepickerTokens.datepicker.calendar.day.select.bg,
|
|
163
|
-
selectText: datepickerTokens.datepicker.calendar.day.select.text,
|
|
164
|
-
disabledText: datepickerTokens.datepicker.calendar.day.disabled.text,
|
|
165
|
-
fontSize: datepickerTokens.datepicker.calendar.day.typography.default.fontSize,
|
|
166
|
-
lineHeight: datepickerTokens.datepicker.calendar.day.typography.default.lineHeight,
|
|
167
|
-
fontWeight: datepickerTokens.datepicker.calendar.day.typography.default.fontWeight,
|
|
168
|
-
boldFontWeight: datepickerTokens.datepicker.calendar.day.typography.bold.fontWeight,
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
const WEEK_LABELS = ['일', '월', '화', '수', '목', '금', '토'];
|
|
172
|
-
|
|
173
|
-
exports.CALENDAR_LAYOUT = CALENDAR_LAYOUT;
|
|
174
|
-
exports.DATEPICKER_COLORS = DATEPICKER_COLORS;
|
|
175
|
-
exports.DATEPICKER_SIZE_MAP = DATEPICKER_SIZE_MAP;
|
|
176
|
-
exports.WEEK_LABELS = WEEK_LABELS;
|
|
177
|
-
exports.datepickerTokens = datepickerTokens;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const daysInMonth = (date) => {
|
|
4
|
-
const year = Number(date.split('-')[0]);
|
|
5
|
-
const month = Number(date.split('-')[1]);
|
|
6
|
-
const daysInMonth = new Date(year, month, 0).getDate(); // month에 0을 전달하면 전달의 마지막 날짜를 반환
|
|
7
|
-
return Array.from({ length: daysInMonth }, (_, i) => i + 1);
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const getToday = () => {
|
|
11
|
-
const today = new Date();
|
|
12
|
-
const year = today.getFullYear();
|
|
13
|
-
const month = String(today.getMonth() + 1).padStart(2, '0');
|
|
14
|
-
const day = String(today.getDate()).padStart(2, '0');
|
|
15
|
-
return `${year}-${month}-${day}`;
|
|
16
|
-
};
|
|
17
|
-
const today = getToday();
|
|
18
|
-
|
|
19
|
-
const useDatePicker = () => {
|
|
20
|
-
const formatDate = (year, month, day) => {
|
|
21
|
-
return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
|
|
22
|
-
};
|
|
23
|
-
const createCalendar = (year, month) => {
|
|
24
|
-
const days = daysInMonth(`${year}-${String(month).padStart(2, '0')}-01`);
|
|
25
|
-
const firstDayIndex = new Date(year, month - 1, 1).getDay();
|
|
26
|
-
const prevMonthDays = Array.from({ length: firstDayIndex });
|
|
27
|
-
const remainingDays = (7 - ((days.length + firstDayIndex) % 7)) % 7;
|
|
28
|
-
const afterMonthDays = Array.from({ length: remainingDays });
|
|
29
|
-
return { days, prevMonthDays, afterMonthDays };
|
|
30
|
-
};
|
|
31
|
-
const calculateYearMonth = (year, month, type) => {
|
|
32
|
-
let newYear = year;
|
|
33
|
-
let newMonth = type === 'prev' ? month - 1 : month + 1;
|
|
34
|
-
if (newMonth < 1) {
|
|
35
|
-
newYear = year - 1;
|
|
36
|
-
newMonth = 12;
|
|
37
|
-
}
|
|
38
|
-
else if (newMonth > 12) {
|
|
39
|
-
newYear = year + 1;
|
|
40
|
-
newMonth = 1;
|
|
41
|
-
}
|
|
42
|
-
return { newYear, newMonth };
|
|
43
|
-
};
|
|
44
|
-
return { formatDate, createCalendar, calculateYearMonth };
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
exports.today = today;
|
|
48
|
-
exports.useDatePicker = useDatePicker;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
sd-date-picker-calendar {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
sd-date-picker-calendar .sd-date-picker-calendar {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: var(--calendar-gap);
|
|
8
|
-
height: 328px;
|
|
9
|
-
padding: var(--calendar-padding);
|
|
10
|
-
background: var(--calendar-bg);
|
|
11
|
-
border-radius: var(--calendar-radius);
|
|
12
|
-
box-shadow: 2px 2px 12px 2px rgba(0, 0, 0, 0.2);
|
|
13
|
-
user-select: none;
|
|
14
|
-
}
|
|
15
|
-
sd-date-picker-calendar .sd-date-picker-calendar__header {
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
gap: var(--calendar-header-gap);
|
|
20
|
-
font-size: var(--calendar-header-font-size);
|
|
21
|
-
line-height: var(--calendar-header-line-height);
|
|
22
|
-
font-weight: var(--calendar-header-font-weight);
|
|
23
|
-
color: var(--calendar-day-text);
|
|
24
|
-
}
|
|
25
|
-
sd-date-picker-calendar .sd-date-picker-calendar__nav-group {
|
|
26
|
-
display: inline-flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
gap: var(--calendar-gap);
|
|
29
|
-
}
|
|
30
|
-
sd-date-picker-calendar .sd-date-picker-calendar__nav-group-month {
|
|
31
|
-
width: 100%;
|
|
32
|
-
}
|
|
33
|
-
sd-date-picker-calendar .sd-date-picker-calendar__label {
|
|
34
|
-
display: inline-flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
min-width: 40px;
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
sd-date-picker-calendar .sd-date-picker-calendar__label-month {
|
|
41
|
-
width: 100%;
|
|
42
|
-
}
|
|
43
|
-
sd-date-picker-calendar .sd-date-picker-calendar__divider {
|
|
44
|
-
display: inline-block;
|
|
45
|
-
width: 1px;
|
|
46
|
-
height: 16px;
|
|
47
|
-
background: var(--calendar-header-divider);
|
|
48
|
-
}
|
|
49
|
-
sd-date-picker-calendar .sd-date-picker-calendar__week {
|
|
50
|
-
display: grid;
|
|
51
|
-
grid-template-columns: repeat(7, var(--calendar-day-size));
|
|
52
|
-
}
|
|
53
|
-
sd-date-picker-calendar .sd-date-picker-calendar__week-cell {
|
|
54
|
-
display: inline-flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
height: 20px;
|
|
58
|
-
font-size: var(--calendar-week-font-size);
|
|
59
|
-
line-height: var(--calendar-week-line-height);
|
|
60
|
-
font-weight: var(--calendar-week-font-weight);
|
|
61
|
-
color: var(--calendar-week-color);
|
|
62
|
-
}
|
|
63
|
-
sd-date-picker-calendar .sd-date-picker-calendar__grid {
|
|
64
|
-
display: grid;
|
|
65
|
-
grid-template-columns: repeat(7, var(--calendar-day-size));
|
|
66
|
-
row-gap: var(--calendar-grid-row-gap);
|
|
67
|
-
}
|
|
68
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day {
|
|
69
|
-
display: inline-flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
width: var(--calendar-day-size);
|
|
73
|
-
height: 32px;
|
|
74
|
-
padding: 0;
|
|
75
|
-
border: none;
|
|
76
|
-
background: transparent;
|
|
77
|
-
cursor: pointer;
|
|
78
|
-
font-size: var(--calendar-day-font-size);
|
|
79
|
-
line-height: var(--calendar-day-line-height);
|
|
80
|
-
font-weight: var(--calendar-day-font-weight);
|
|
81
|
-
color: var(--calendar-day-text);
|
|
82
|
-
}
|
|
83
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day-circle {
|
|
84
|
-
display: inline-flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
width: var(--calendar-day-circle-size);
|
|
88
|
-
height: var(--calendar-day-circle-size);
|
|
89
|
-
border-radius: calc(var(--calendar-day-circle-radius) * 1px);
|
|
90
|
-
border: 1px solid transparent;
|
|
91
|
-
box-sizing: border-box;
|
|
92
|
-
}
|
|
93
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day:not(:disabled):hover .sd-date-picker-calendar__day-circle {
|
|
94
|
-
border-radius: 16px;
|
|
95
|
-
border: 1px solid var(--calendar-day-hover-border);
|
|
96
|
-
}
|
|
97
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day--today .sd-date-picker-calendar__day-circle {
|
|
98
|
-
font-weight: 700;
|
|
99
|
-
}
|
|
100
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day--selected .sd-date-picker-calendar__day-circle {
|
|
101
|
-
border-radius: 16px;
|
|
102
|
-
background: var(--calendar-day-select-bg);
|
|
103
|
-
color: var(--calendar-day-select-text);
|
|
104
|
-
}
|
|
105
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day--selected:not(:disabled):hover .sd-date-picker-calendar__day-circle {
|
|
106
|
-
background: var(--calendar-day-select-bg);
|
|
107
|
-
color: var(--calendar-day-select-text);
|
|
108
|
-
}
|
|
109
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day--disabled {
|
|
110
|
-
color: var(--calendar-day-disabled-text);
|
|
111
|
-
background: none !important;
|
|
112
|
-
cursor: not-allowed;
|
|
113
|
-
}
|
|
114
|
-
sd-date-picker-calendar .sd-date-picker-calendar__day--empty {
|
|
115
|
-
visibility: hidden;
|
|
116
|
-
pointer-events: none;
|
|
117
|
-
}
|
package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { today } from "../../../utils/date";
|
|
3
|
-
import { useDatePicker } from "../../../modules/useDatePicker";
|
|
4
|
-
import { CALENDAR_LAYOUT, WEEK_LABELS } from "../sd-date-picker.config";
|
|
5
|
-
export class SdDatePickerCalendar {
|
|
6
|
-
value = null;
|
|
7
|
-
selectable;
|
|
8
|
-
currentYear;
|
|
9
|
-
currentMonth;
|
|
10
|
-
select;
|
|
11
|
-
viewChange;
|
|
12
|
-
dateUtil = useDatePicker();
|
|
13
|
-
componentWillLoad() {
|
|
14
|
-
this.syncViewFromValue();
|
|
15
|
-
}
|
|
16
|
-
handleValueChange() {
|
|
17
|
-
this.syncViewFromValue();
|
|
18
|
-
}
|
|
19
|
-
syncViewFromValue() {
|
|
20
|
-
const base = this.value || today;
|
|
21
|
-
const [year, month] = base.split('-').map(Number);
|
|
22
|
-
this.currentYear = year;
|
|
23
|
-
this.currentMonth = month;
|
|
24
|
-
}
|
|
25
|
-
formatDate(year, month, day) {
|
|
26
|
-
return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
|
|
27
|
-
}
|
|
28
|
-
get cells() {
|
|
29
|
-
const year = this.currentYear;
|
|
30
|
-
const month = this.currentMonth;
|
|
31
|
-
const firstDayIndex = new Date(year, month - 1, 1).getDay();
|
|
32
|
-
const daysInCurrent = new Date(year, month, 0).getDate();
|
|
33
|
-
const prevMonth = month === 1 ? 12 : month - 1;
|
|
34
|
-
const prevYear = month === 1 ? year - 1 : year;
|
|
35
|
-
const daysInPrev = new Date(prevYear, prevMonth, 0).getDate();
|
|
36
|
-
const nextMonth = month === 12 ? 1 : month + 1;
|
|
37
|
-
const nextYear = month === 12 ? year + 1 : year;
|
|
38
|
-
const cells = [];
|
|
39
|
-
for (let i = firstDayIndex - 1; i >= 0; i--) {
|
|
40
|
-
const day = daysInPrev - i;
|
|
41
|
-
cells.push({
|
|
42
|
-
date: this.formatDate(prevYear, prevMonth, day),
|
|
43
|
-
day,
|
|
44
|
-
inCurrentMonth: false,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
for (let day = 1; day <= daysInCurrent; day++) {
|
|
48
|
-
cells.push({
|
|
49
|
-
date: this.formatDate(year, month, day),
|
|
50
|
-
day,
|
|
51
|
-
inCurrentMonth: true,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
const remaining = (7 - (cells.length % 7)) % 7;
|
|
55
|
-
for (let day = 1; day <= remaining; day++) {
|
|
56
|
-
cells.push({
|
|
57
|
-
date: this.formatDate(nextYear, nextMonth, day),
|
|
58
|
-
day,
|
|
59
|
-
inCurrentMonth: false,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return cells;
|
|
63
|
-
}
|
|
64
|
-
emitViewChange() {
|
|
65
|
-
this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
|
|
66
|
-
}
|
|
67
|
-
goPrevYear = (event) => {
|
|
68
|
-
event.stopPropagation();
|
|
69
|
-
this.currentYear -= 1;
|
|
70
|
-
this.emitViewChange();
|
|
71
|
-
};
|
|
72
|
-
goNextYear = (event) => {
|
|
73
|
-
event.stopPropagation();
|
|
74
|
-
this.currentYear += 1;
|
|
75
|
-
this.emitViewChange();
|
|
76
|
-
};
|
|
77
|
-
goPrevMonth = (event) => {
|
|
78
|
-
event.stopPropagation();
|
|
79
|
-
const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'prev');
|
|
80
|
-
this.currentYear = newYear;
|
|
81
|
-
this.currentMonth = newMonth;
|
|
82
|
-
this.emitViewChange();
|
|
83
|
-
};
|
|
84
|
-
goNextMonth = (event) => {
|
|
85
|
-
event.stopPropagation();
|
|
86
|
-
const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'next');
|
|
87
|
-
this.currentYear = newYear;
|
|
88
|
-
this.currentMonth = newMonth;
|
|
89
|
-
this.emitViewChange();
|
|
90
|
-
};
|
|
91
|
-
isDisabled(date) {
|
|
92
|
-
if (!this.selectable)
|
|
93
|
-
return false;
|
|
94
|
-
const [start, end] = this.selectable;
|
|
95
|
-
if (start !== '' && date < start)
|
|
96
|
-
return true;
|
|
97
|
-
if (end !== '' && date > end)
|
|
98
|
-
return true;
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
handleDayClick(cell) {
|
|
102
|
-
if (this.isDisabled(cell.date))
|
|
103
|
-
return;
|
|
104
|
-
this.select.emit(cell.date);
|
|
105
|
-
}
|
|
106
|
-
render() {
|
|
107
|
-
const cssVars = {
|
|
108
|
-
'--calendar-bg': CALENDAR_LAYOUT.bg,
|
|
109
|
-
'--calendar-padding': `${CALENDAR_LAYOUT.paddingXY}px`,
|
|
110
|
-
'--calendar-gap': `${CALENDAR_LAYOUT.gap}px`,
|
|
111
|
-
'--calendar-radius': `${CALENDAR_LAYOUT.radius}px`,
|
|
112
|
-
'--calendar-header-gap': `${CALENDAR_LAYOUT.header.gap}px`,
|
|
113
|
-
'--calendar-header-divider': CALENDAR_LAYOUT.header.divider,
|
|
114
|
-
'--calendar-header-font-size': `${CALENDAR_LAYOUT.header.fontSize}px`,
|
|
115
|
-
'--calendar-header-line-height': `${CALENDAR_LAYOUT.header.lineHeight}px`,
|
|
116
|
-
'--calendar-header-font-weight': CALENDAR_LAYOUT.header.fontWeight,
|
|
117
|
-
'--calendar-week-font-size': `${CALENDAR_LAYOUT.week.fontSize}px`,
|
|
118
|
-
'--calendar-week-line-height': `${CALENDAR_LAYOUT.week.lineHeight}px`,
|
|
119
|
-
'--calendar-week-font-weight': CALENDAR_LAYOUT.week.fontWeight,
|
|
120
|
-
'--calendar-week-color': CALENDAR_LAYOUT.week.color,
|
|
121
|
-
'--calendar-grid-row-gap': `${CALENDAR_LAYOUT.grid.rowGap}px`,
|
|
122
|
-
'--calendar-day-size': `${CALENDAR_LAYOUT.day.size}px`,
|
|
123
|
-
'--calendar-day-circle-size': `${CALENDAR_LAYOUT.day.circleSize}px`,
|
|
124
|
-
'--calendar-day-circle-radius': `${CALENDAR_LAYOUT.day.circleRadius}px`,
|
|
125
|
-
'--calendar-day-text': CALENDAR_LAYOUT.day.defaultText,
|
|
126
|
-
'--calendar-day-hover-text': CALENDAR_LAYOUT.day.hoverText,
|
|
127
|
-
'--calendar-day-hover-border': CALENDAR_LAYOUT.day.hoverBorder,
|
|
128
|
-
'--calendar-day-select-bg': CALENDAR_LAYOUT.day.selectBg,
|
|
129
|
-
'--calendar-day-select-text': CALENDAR_LAYOUT.day.selectText,
|
|
130
|
-
'--calendar-day-disabled-text': CALENDAR_LAYOUT.day.disabledText,
|
|
131
|
-
'--calendar-day-font-size': `${CALENDAR_LAYOUT.day.fontSize}px`,
|
|
132
|
-
'--calendar-day-line-height': `${CALENDAR_LAYOUT.day.lineHeight}px`,
|
|
133
|
-
'--calendar-day-font-weight': CALENDAR_LAYOUT.day.fontWeight,
|
|
134
|
-
'--calendar-day-bold-font-weight': CALENDAR_LAYOUT.day.boldFontWeight,
|
|
135
|
-
};
|
|
136
|
-
return (h("div", { key: '5fca5d51cbe5005cde3468c10f39397831371762', class: "sd-date-picker-calendar", style: cssVars }, h("div", { key: '5b6a101b463b455bfc70f9b92665fe308f45773d', class: "sd-date-picker-calendar__header" }, h("div", { key: '3fe7a4e416c632640371f9b3cb12baf72c7eab06', class: "sd-date-picker-calendar__nav-group" }, h("sd-ghost-button", { key: '1c71cf45dae23308ff901f08b606f0cfcdc7e5b4', ariaLabel: "prevYear", size: "xxs", icon: "chevronLeft", onClick: this.goPrevYear }), h("span", { key: 'aa9863d2cac5eb5d00a0d72570b216206b669f37', class: "sd-date-picker-calendar__label" }, this.currentYear), h("sd-ghost-button", { key: '941118e0c3cd37ed5decb2e91cfa738221f74958', ariaLabel: "nextYear", size: "xxs", icon: "chevronRight", onClick: this.goNextYear })), h("span", { key: 'e630c7269a617deeaa38cace0e2a91affb558688', class: "sd-date-picker-calendar__divider", "aria-hidden": "true" }), h("div", { key: '45cfc135eeb6bf834cef92c1e36f2def4d7c2058', class: "sd-date-picker-calendar__nav-group sd-date-picker-calendar__nav-group-month" }, h("sd-ghost-button", { key: '98483c6626ea13cdb78be806feaa1748d60b6a1a', ariaLabel: "prevMonth", size: "xxs", icon: "chevronLeft", onClick: this.goPrevMonth }), h("span", { key: '9e6097a040679203117436966c246f00b94f5ff2', class: "sd-date-picker-calendar__label sd-date-picker-calendar__label-month" }, this.currentMonth, "\uC6D4"), h("sd-ghost-button", { key: '0ab7ccdae8678bb909aca74f4189a4426e51ec0b', ariaLabel: "nextMonth", size: "xxs", icon: "chevronRight", onClick: this.goNextMonth }))), h("div", { key: '07763d55d00fd6c6b3523bbbb2e994a177a5b81c', class: "sd-date-picker-calendar__week" }, WEEK_LABELS.map(label => (h("span", { key: label, class: "sd-date-picker-calendar__week-cell" }, label)))), h("div", { key: '0304efaa140a8dba320e0e6791ef886bc77ac57b', class: "sd-date-picker-calendar__grid" }, this.cells.map(cell => {
|
|
137
|
-
const isSelected = cell.inCurrentMonth && this.value !== '' && this.value === cell.date;
|
|
138
|
-
const isToday = cell.inCurrentMonth && today === cell.date;
|
|
139
|
-
const isDisabled = cell.inCurrentMonth && this.isDisabled(cell.date);
|
|
140
|
-
return (h("button", { type: "button", key: cell.date, class: {
|
|
141
|
-
'sd-date-picker-calendar__day': true,
|
|
142
|
-
'sd-date-picker-calendar__day--empty': !cell.inCurrentMonth,
|
|
143
|
-
'sd-date-picker-calendar__day--today': isToday,
|
|
144
|
-
'sd-date-picker-calendar__day--selected': isSelected,
|
|
145
|
-
'sd-date-picker-calendar__day--disabled': isDisabled,
|
|
146
|
-
}, 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-date-picker-calendar__day-circle" }, cell.inCurrentMonth ? cell.day : '')));
|
|
147
|
-
}))));
|
|
148
|
-
}
|
|
149
|
-
static get is() { return "sd-date-picker-calendar"; }
|
|
150
|
-
static get originalStyleUrls() {
|
|
151
|
-
return {
|
|
152
|
-
"$": ["sd-date-picker-calendar.scss"]
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
static get styleUrls() {
|
|
156
|
-
return {
|
|
157
|
-
"$": ["sd-date-picker-calendar.css"]
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
static get properties() {
|
|
161
|
-
return {
|
|
162
|
-
"value": {
|
|
163
|
-
"type": "string",
|
|
164
|
-
"mutable": false,
|
|
165
|
-
"complexType": {
|
|
166
|
-
"original": "string | null",
|
|
167
|
-
"resolved": "null | string",
|
|
168
|
-
"references": {}
|
|
169
|
-
},
|
|
170
|
-
"required": false,
|
|
171
|
-
"optional": false,
|
|
172
|
-
"docs": {
|
|
173
|
-
"tags": [],
|
|
174
|
-
"text": ""
|
|
175
|
-
},
|
|
176
|
-
"getter": false,
|
|
177
|
-
"setter": false,
|
|
178
|
-
"reflect": false,
|
|
179
|
-
"attribute": "value",
|
|
180
|
-
"defaultValue": "null"
|
|
181
|
-
},
|
|
182
|
-
"selectable": {
|
|
183
|
-
"type": "unknown",
|
|
184
|
-
"mutable": false,
|
|
185
|
-
"complexType": {
|
|
186
|
-
"original": "[string, string]",
|
|
187
|
-
"resolved": "[string, string] | undefined",
|
|
188
|
-
"references": {}
|
|
189
|
-
},
|
|
190
|
-
"required": false,
|
|
191
|
-
"optional": true,
|
|
192
|
-
"docs": {
|
|
193
|
-
"tags": [],
|
|
194
|
-
"text": ""
|
|
195
|
-
},
|
|
196
|
-
"getter": false,
|
|
197
|
-
"setter": false
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
static get states() {
|
|
202
|
-
return {
|
|
203
|
-
"currentYear": {},
|
|
204
|
-
"currentMonth": {}
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
static get events() {
|
|
208
|
-
return [{
|
|
209
|
-
"method": "select",
|
|
210
|
-
"name": "sdSelect",
|
|
211
|
-
"bubbles": true,
|
|
212
|
-
"cancelable": true,
|
|
213
|
-
"composed": true,
|
|
214
|
-
"docs": {
|
|
215
|
-
"tags": [],
|
|
216
|
-
"text": ""
|
|
217
|
-
},
|
|
218
|
-
"complexType": {
|
|
219
|
-
"original": "string",
|
|
220
|
-
"resolved": "string",
|
|
221
|
-
"references": {}
|
|
222
|
-
}
|
|
223
|
-
}, {
|
|
224
|
-
"method": "viewChange",
|
|
225
|
-
"name": "sdViewChange",
|
|
226
|
-
"bubbles": true,
|
|
227
|
-
"cancelable": true,
|
|
228
|
-
"composed": true,
|
|
229
|
-
"docs": {
|
|
230
|
-
"tags": [],
|
|
231
|
-
"text": ""
|
|
232
|
-
},
|
|
233
|
-
"complexType": {
|
|
234
|
-
"original": "{ year: number; month: number }",
|
|
235
|
-
"resolved": "{ year: number; month: number; }",
|
|
236
|
-
"references": {}
|
|
237
|
-
}
|
|
238
|
-
}];
|
|
239
|
-
}
|
|
240
|
-
static get watchers() {
|
|
241
|
-
return [{
|
|
242
|
-
"propName": "value",
|
|
243
|
-
"methodName": "handleValueChange"
|
|
244
|
-
}];
|
|
245
|
-
}
|
|
246
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={datepicker:{sm:{height:"28",paddingX:"12",gap:"8",icon:"16",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},radius:"4"},md:{height:"36",paddingX:"16",gap:"12",icon:"20",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"},radius:"6"},border:{default:"#AAAAAA",focus:"#0075FF"},bg:{default:"#FFFFFF"},icon:{default:"#888888",disabled:"#BBBBBB"},text:{default:"#222222",hint:"#555555",disabled:"#888888"},calendar:{bg:"#FFFFFF",paddingXY:"24",gap:"12",radius:"8",header:{gap:"8",divider:"#E1E1E1",typography:{fontWeight:"500",fontSize:"14",lineHeight:"24"}},week:{typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#888888"},grid:{rowGap:"4"},day:{width:"40",circle:{size:"32",radius:"9999"},default:{text:"#222222"},hover:{text:"#222222",border:"#0075FF"},select:{bg:"#0075FF",text:"#FFFFFF"},disabled:{text:"#BBBBBB"},typography:{default:{fontWeight:"400",fontSize:"14",lineHeight:"24"},bold:{fontWeight:"700"}}},range:{bg:"#D9EAFF",height:"32",panelGap:"24",divider:"#E1E1E1"}}}};const i=e.datepicker.sm,t=e.datepicker.md,d={sm:{height:i.height,paddingX:i.paddingX,gap:i.gap,iconSize:i.icon,radius:i.radius,fontSize:i.typography.fontSize,lineHeight:i.typography.lineHeight,fontWeight:i.typography.fontWeight},md:{height:t.height,paddingX:t.paddingX,gap:t.gap,iconSize:t.icon,radius:t.radius,fontSize:t.typography.fontSize,lineHeight:t.typography.lineHeight,fontWeight:t.typography.fontWeight}},a={border:e.datepicker.border,bg:e.datepicker.bg,icon:e.datepicker.icon,text:e.datepicker.text},g={bg:e.datepicker.calendar.bg,paddingXY:e.datepicker.calendar.paddingXY,gap:e.datepicker.calendar.gap,radius:e.datepicker.calendar.radius,header:{gap:e.datepicker.calendar.header.gap,divider:e.datepicker.calendar.header.divider,fontSize:e.datepicker.calendar.header.typography.fontSize,lineHeight:e.datepicker.calendar.header.typography.lineHeight,fontWeight:e.datepicker.calendar.header.typography.fontWeight},week:{fontSize:e.datepicker.calendar.week.typography.fontSize,lineHeight:e.datepicker.calendar.week.typography.lineHeight,fontWeight:e.datepicker.calendar.week.typography.fontWeight,color:e.datepicker.calendar.week.color},grid:{rowGap:e.datepicker.calendar.grid.rowGap},day:{size:e.datepicker.calendar.day.width,circleSize:e.datepicker.calendar.day.circle.size,circleRadius:e.datepicker.calendar.day.circle.radius,defaultText:e.datepicker.calendar.day.default.text,hoverText:e.datepicker.calendar.day.hover.text,hoverBorder:e.datepicker.calendar.day.hover.border,selectBg:e.datepicker.calendar.day.select.bg,selectText:e.datepicker.calendar.day.select.text,disabledText:e.datepicker.calendar.day.disabled.text,fontSize:e.datepicker.calendar.day.typography.default.fontSize,lineHeight:e.datepicker.calendar.day.typography.default.lineHeight,fontWeight:e.datepicker.calendar.day.typography.default.fontWeight,boldFontWeight:e.datepicker.calendar.day.typography.bold.fontWeight}},o=["일","월","화","수","목","금","토"];export{g as C,a as D,o as W,d as a,e as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,c as d,h as s,t as o}from"./p-BjkROjjt.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=d(this,"sdClick",7),this.mouseOver=d(this,"sdMouseOver",7)}date=null;disabled=!1;selected=!1;isStartDate=!1;isEndDate=!1;isToday=!1;inRange=!1;type="";click;mouseOver;handleClickDate(){this.disabled||void 0===this.date||""===this.date||0===this.date||"string"!=typeof this.date&&this.click?.emit(this.date)}handleHoverDate(){"string"!=typeof this.date&&this.mouseOver?.emit(this.date)}render(){return s("div",{key:"ce4341db137de36e872a0e166bd89c33ac1ba91b",role:"button",tabindex:this.disabled?-1:0,class:{"sd-date-box":!0,"sd-hoverable":!this.disabled||!this.selected||""===this.type,"sd-date-box--disabled":this.disabled,"sd-date-box--selected":this.selected,"sd-date-box--today":this.isToday,"sd-date-box--start-date":this.isStartDate,"sd-date-box--end-date":this.isEndDate,"sd-date-box--in-range":this.inRange,"sd-date-box--type-start":"start"===this.type,"sd-date-box--type-end":"end"===this.type},onClick:()=>this.handleClickDate(),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClickDate())},onMouseOver:()=>this.handleHoverDate(),onFocus:()=>this.handleHoverDate()},s("div",{key:"e641ed011f8e7e55cc589f566163899b26503717",class:"sd-date-box__content"},s("div",{key:"e15a5fce460757d5cf486ec0678c2e604beab4db",class:"sd-date-box__label"},this.date)))}static get style(){return'.sd-date-box.sc-sd-date-box{display:flex;align-items:center;justify-content:center;width:38px;height:36px;font-size:14px;position:relative;box-sizing:border-box;text-align:center;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);border-radius:14px}.sd-date-box.sc-sd-date-box .sd-date-box__content.sc-sd-date-box{width:28px;height:28px;border-radius:14px;position:relative}.sd-date-box.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{position:relative;z-index:2;-webkit-user-select:none;user-select:none;line-height:28px}.sd-date-box.sd-date-box--disabled.sc-sd-date-box{color:#CCCCCC;cursor:default !important;pointer-events:none}.sd-date-box.sc-sd-date-box:not(.sd-date-box--disabled){color:#333333;cursor:pointer}.sd-date-box.sd-hoverable.sc-sd-date-box:hover .sd-date-box__content.sc-sd-date-box{background:#D9EAFF}.sd-date-box.sd-date-box--in-range.sc-sd-date-box:not(.sd-date-box--disabled) .sd-date-box__content.sc-sd-date-box::before{content:"";position:absolute;top:0;left:-5px;width:calc(100% + 10px);height:100%;background:#D9EAFF}.sd-date-box.sd-date-box--in-range.sd-date-box--type-start.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::before{left:auto !important;width:19px !important;right:-5px}.sd-date-box.sd-date-box--in-range.sd-date-box--type-end.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::before{width:19px !important}.sd-date-box.sd-date-box--in-range.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{font-weight:500}.sd-date-box.sd-date-box--selected.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-start.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-end.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;inset:0;background:#0075FF;border-radius:14px;z-index:1}.sd-date-box.sd-date-box--selected.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-start.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-end.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{color:white;font-weight:700}.sd-date-box.sd-date-box--start-date.sd-date-box--end-date.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::before{display:none !important}.sd-date-box.sd-date-box--today.sc-sd-date-box:not(.sd-date-box--selected) .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:28px;height:28px;border:1px solid #E1E1E1 !important;border-radius:14px}'}},[514,"sd-date-box",{date:[8],disabled:[4],selected:[4],isStartDate:[4,"is-start-date"],isEndDate:[4,"is-end-date"],isToday:[4,"is-today"],inRange:[4,"in-range"],type:[1]}]);function b(){"undefined"!=typeof customElements&&["sd-date-box"].forEach((t=>{"sd-date-box"===t&&(customElements.get(o(t))||customElements.define(o(t),a))}))}export{a as S,b as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as a,c as d,h as r,t}from"./p-BjkROjjt.js";import{u as c,t as n}from"./p-DTrMR0rx.js";import{W as i,C as s}from"./p-B6cqMQaM.js";import{d as l}from"./p-DFLCjX1a.js";import{d as o}from"./p-Cktiasfd.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.select=d(this,"sdSelect",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;currentYear;currentMonth;select;viewChange;dateUtil=c();componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||n,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),r=new Date(e,a,0).getDate(),t=1===a?12:a-1,c=1===a?e-1:e,n=new Date(c,t,0).getDate(),i=12===a?1:a+1,s=12===a?e+1:e,l=[];for(let e=d-1;e>=0;e--){const a=n-e;l.push({date:this.formatDate(c,t,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=r;d++)l.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-l.length%7)%7;for(let e=1;e<=o;e++)l.push({date:this.formatDate(s,i,e),day:e,inCurrentMonth:!1});return l}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||this.select.emit(e.date)}render(){return r("div",{key:"5fca5d51cbe5005cde3468c10f39397831371762",class:"sd-date-picker-calendar",style:{"--calendar-bg":s.bg,"--calendar-padding":`${s.paddingXY}px`,"--calendar-gap":`${s.gap}px`,"--calendar-radius":`${s.radius}px`,"--calendar-header-gap":`${s.header.gap}px`,"--calendar-header-divider":s.header.divider,"--calendar-header-font-size":`${s.header.fontSize}px`,"--calendar-header-line-height":`${s.header.lineHeight}px`,"--calendar-header-font-weight":s.header.fontWeight,"--calendar-week-font-size":`${s.week.fontSize}px`,"--calendar-week-line-height":`${s.week.lineHeight}px`,"--calendar-week-font-weight":s.week.fontWeight,"--calendar-week-color":s.week.color,"--calendar-grid-row-gap":`${s.grid.rowGap}px`,"--calendar-day-size":`${s.day.size}px`,"--calendar-day-circle-size":`${s.day.circleSize}px`,"--calendar-day-circle-radius":`${s.day.circleRadius}px`,"--calendar-day-text":s.day.defaultText,"--calendar-day-hover-text":s.day.hoverText,"--calendar-day-hover-border":s.day.hoverBorder,"--calendar-day-select-bg":s.day.selectBg,"--calendar-day-select-text":s.day.selectText,"--calendar-day-disabled-text":s.day.disabledText,"--calendar-day-font-size":`${s.day.fontSize}px`,"--calendar-day-line-height":`${s.day.lineHeight}px`,"--calendar-day-font-weight":s.day.fontWeight,"--calendar-day-bold-font-weight":s.day.boldFontWeight}},r("div",{key:"5b6a101b463b455bfc70f9b92665fe308f45773d",class:"sd-date-picker-calendar__header"},r("div",{key:"3fe7a4e416c632640371f9b3cb12baf72c7eab06",class:"sd-date-picker-calendar__nav-group"},r("sd-ghost-button",{key:"1c71cf45dae23308ff901f08b606f0cfcdc7e5b4",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),r("span",{key:"aa9863d2cac5eb5d00a0d72570b216206b669f37",class:"sd-date-picker-calendar__label"},this.currentYear),r("sd-ghost-button",{key:"941118e0c3cd37ed5decb2e91cfa738221f74958",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),r("span",{key:"e630c7269a617deeaa38cace0e2a91affb558688",class:"sd-date-picker-calendar__divider","aria-hidden":"true"}),r("div",{key:"45cfc135eeb6bf834cef92c1e36f2def4d7c2058",class:"sd-date-picker-calendar__nav-group sd-date-picker-calendar__nav-group-month"},r("sd-ghost-button",{key:"98483c6626ea13cdb78be806feaa1748d60b6a1a",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),r("span",{key:"9e6097a040679203117436966c246f00b94f5ff2",class:"sd-date-picker-calendar__label sd-date-picker-calendar__label-month"},this.currentMonth,"월"),r("sd-ghost-button",{key:"0ab7ccdae8678bb909aca74f4189a4426e51ec0b",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),r("div",{key:"07763d55d00fd6c6b3523bbbb2e994a177a5b81c",class:"sd-date-picker-calendar__week"},i.map((e=>r("span",{key:e,class:"sd-date-picker-calendar__week-cell"},e)))),r("div",{key:"0304efaa140a8dba320e0e6791ef886bc77ac57b",class:"sd-date-picker-calendar__grid"},this.cells.map((e=>{const a=e.inCurrentMonth&&""!==this.value&&this.value===e.date,d=e.inCurrentMonth&&n===e.date,t=e.inCurrentMonth&&this.isDisabled(e.date);return r("button",{type:"button",key:e.date,class:{"sd-date-picker-calendar__day":!0,"sd-date-picker-calendar__day--empty":!e.inCurrentMonth,"sd-date-picker-calendar__day--today":d,"sd-date-picker-calendar__day--selected":a,"sd-date-picker-calendar__day--disabled":t},disabled:!e.inCurrentMonth||t,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},r("span",{class:"sd-date-picker-calendar__day-circle"},e.inCurrentMonth?e.day:""))}))))}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-date-picker-calendar{display:block}sd-date-picker-calendar .sd-date-picker-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);user-select:none}sd-date-picker-calendar .sd-date-picker-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-date-picker-calendar .sd-date-picker-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-date-picker-calendar .sd-date-picker-calendar__nav-group-month{width:100%}sd-date-picker-calendar .sd-date-picker-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-date-picker-calendar .sd-date-picker-calendar__label-month{width:100%}sd-date-picker-calendar .sd-date-picker-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-date-picker-calendar .sd-date-picker-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-date-picker-calendar .sd-date-picker-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-date-picker-calendar .sd-date-picker-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-date-picker-calendar .sd-date-picker-calendar__day{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-size);height:32px;padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-date-picker-calendar .sd-date-picker-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-date-picker-calendar .sd-date-picker-calendar__day:not(:disabled):hover .sd-date-picker-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-date-picker-calendar .sd-date-picker-calendar__day--today .sd-date-picker-calendar__day-circle{font-weight:700}sd-date-picker-calendar .sd-date-picker-calendar__day--selected .sd-date-picker-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-picker-calendar .sd-date-picker-calendar__day--selected:not(:disabled):hover .sd-date-picker-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-picker-calendar .sd-date-picker-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-date-picker-calendar .sd-date-picker-calendar__day--empty{visibility:hidden;pointer-events:none}"}},[512,"sd-date-picker-calendar",{value:[1],selectable:[16],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function h(){"undefined"!=typeof customElements&&["sd-date-picker-calendar","sd-ghost-button","sd-icon"].forEach((e=>{switch(e){case"sd-date-picker-calendar":customElements.get(t(e))||customElements.define(t(e),p);break;case"sd-ghost-button":customElements.get(t(e))||l();break;case"sd-icon":customElements.get(t(e))||o()}}))}export{p as S,h as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={table:{header:{height:"36",paddingX:"16",gap:"4",bg:"#F5FAFF",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontWeight:"500",fontSize:"12",lineHeight:"20",textDecoration:"none"},resizingBar:{color:"#CCCCCC",height:"16"}},body:{default:{height:"44",paddingY:"8"},dense:{height:"32",paddingY:"6"},paddingX:"16",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontWeight:"400",fontSize:"12",lineHeight:"20",textDecoration:"none"}},border:{color:"#E1E1E1",width:"1"},content:{gap:"8"},radius:"8",keyValue:{body:{padding:"8"},height:"44",search:{paddingX:"32",bg:"#F9F9F9"}},separator:{color:"#EEEEEE",Width:"6"}}};export{e as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,d as i,t as o}from"./p-BjkROjjt.js";import{T as r}from"./p-sZMi_32I.js";import{i as l,b as n,a,T as h}from"./p-mmdt-WnS.js";import{d}from"./p-CRL7TjSB.js";import{d as c}from"./p-Cktiasfd.js";const p=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}columns;selectable;stickyColumn;rowKey="";row={};separator;tableId="";columnWidths=[];isVisible=!0;spansVersion=0;_columns=[];_selectable=!1;_stickyColumn={left:0,right:0};_scrolledLeft=!1;_scrolledRight=!1;_dense=!1;tableEl=null;_prevRowKey=null;componentWillLoad(){this.syncTableContext(),this.columnWidths=this.columnWidths??[],this.resolveConfig(),this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.updateVisibilitySync()}componentDidLoad(){if(this.syncTableContext(),this.separator){const t=this.el.previousElementSibling;if("sd-tr"===t?.tagName?.toLowerCase()){const s=t.rowKey;this._prevRowKey=s,this.tableEl?.registerSeparatorSync?.(s)}}}disconnectedCallback(){null!==this._prevRowKey&&(this.tableEl?.unregisterSeparatorSync?.(this._prevRowKey),this._prevRowKey=null)}syncTableContext(){const t=this.el.closest("sd-table"),s=this.el.getRootNode(),e=s instanceof ShadowRoot?s.host:null,i=t??e;this.tableEl=i;const o=i?.getTableIdSync?.(),l=i?.getAttribute(r),n=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=l&&""!==l&&"undefined"!==l?l:null)??"";""!==n&&n!==this.tableId&&(this.tableId=n)}resolveConfig(){const t=this.tableEl?.getConfigSync?.();this._columns=this.columns??t?.columns??[],this._selectable=this.selectable??t?.selectable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._scrolledLeft=t?.scrolledLeft??!1,this._scrolledRight=t?.scrolledRight??!1,this._dense=t?.dense??!1,t?.columnWidths&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths])}async refreshConfig(){this.resolveConfig()}async bumpSpansVersion(){this.spansVersion=this.spansVersion+1}async updateVisibility(){this.updateVisibilitySync()}updateVisibilitySync(){const t=parseInt(this.rowKey,10),s=this.tableEl?.getPaginationInfoSync?.();this.isVisible=!s||t>=s.startIndex&&t<s.endIndex}async setColumnWidths(t){this.columnWidths=t}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.isSelected())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}formatValue(t){return null==t?"":"number"==typeof t?t.toLocaleString():String(t)}getCellValue(t){const{field:s,format:e,name:i}=t,o="function"==typeof s?s(this.row):""!==s?this.row[s]:this.row[i];return e?e(o,this.row):this.formatValue(o)}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const s=this.columnWidths.slice(0,t).reduce(((t,s)=>t+s),0)+(this._selectable?52:0),e=this.columnWidths.filter(((s,e)=>e>=this.visibleColumns.length-(this._stickyColumn.right||0)&&e>t)).reduce(((t,s)=>t+s),0),i=this.visibleColumns[t],o={"--sticky-left-offset":`${s}px`,"--sticky-right-offset":`${e}px`};return i?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}isSelected(){return!!this.tableEl?.isRowSelectedSync&&this.tableEl.isRowSelectedSync(this.row)}handleSelect(){this.tableEl?.updateRowSelectSync&&this.tableEl.updateRowSelectSync(this.row)}getSpanFor(t){if(this.tableEl?.getSpanSync)return this.tableEl.getSpanSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isCovered(t){return!!this.tableEl?.isCoveredSync&&this.tableEl.isCoveredSync(this.rowKey,t,this._columns)}getCellClassFor(t){if(this.tableEl?.getCellClassSync)return this.tableEl.getCellClassSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}expandCellClass(t){return null==t||""===t?{}:Object.fromEntries(t.split(/\s+/).filter(Boolean).map((t=>[t,!0])))}isVisualLastRow(t){return!!this.tableEl?.isVisualLastRowSync&&this.tableEl.isVisualLastRowSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isVisualLastRowForSelfRow(){return!!this.tableEl?.isVisualLastRowSync&&this.tableEl.isVisualLastRowSync(this.rowKey,"")}isVisualLastRowBeforeSeparator(t){return!!this.tableEl?.isVisualLastRowBeforeSeparatorSync&&this.tableEl.isVisualLastRowBeforeSeparatorSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isVisualLastRowBeforeSeparatorForSelfRow(){return!!this.tableEl?.isVisualLastRowBeforeSeparatorSync&&this.tableEl.isVisualLastRowBeforeSeparatorSync(this.rowKey,"")}render(){const t=this._stickyColumn.left||0,s=this._stickyColumn.right||0,o=this.visibleColumns.slice(0,t),r=this.visibleColumns.slice(t,this.visibleColumns.length-s),d=this.visibleColumns.slice(this.visibleColumns.length-s),c=this.tableEl?.hasRowspanSync?.()??!1,p=this.tableEl?.hasUseFrameInRowSync?.(this.rowKey)??!1,b=this._dense&&!p?h.dense:h.default,f={display:this.isVisible?"":"none","--table-body-height":`${b.height}px`,"--table-body-padding-y":`${b.paddingY}px`,"--table-body-padding-x":`${h.paddingX}px`,"--table-body-font-family":a.fontFamily,"--table-body-font-weight":a.fontWeight,"--table-body-font-size":`${a.fontSize}px`,"--table-body-line-height":`${a.lineHeight}px`,"--table-body-text-decoration":a.textDecoration,"--table-border-color":n.color,"--table-border-width":`${n.width}px`,"--table-separator-color":l.color,"--table-separator-width":`${l.width}px`};return e(i,{style:f},this.separator?e("tr",{class:"tr tr--separator"},e("td",{colSpan:this.visibleColumns.length+(this._selectable?1:0),class:"td td--separator"})):e("tr",{class:{tr:!0,"tr--no-hover":c}},this._selectable&&e("td",{class:{td:!0,"td--selected":!0,"td--last-row":this.isVisualLastRowForSelfRow(),"td--before-separator":this.isVisualLastRowBeforeSeparatorForSelfRow(),"sticky-left":!0,"sticky-left-edge":0===t,"is-scrolled-left":0===t&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},e("sd-checkbox",{value:this.isSelected(),onSdUpdate:()=>this.handleSelect()})),o.map(((s,i)=>{if(this.isCovered(i))return null;const o=this.getSpanFor(s),r=this.getCellClassFor(s);return e("td",{key:s.name,rowSpan:o?.rowspan,colSpan:o?.colspan,class:{td:!0,[`td--${s.align||"left"}`]:!0,"td--last-row":this.isVisualLastRow(s),"td--before-separator":this.isVisualLastRowBeforeSeparator(s),"sticky-left":!0,"sticky-left-edge":i===t-1,"is-scrolled-left":i===t-1&&this._scrolledLeft,[`${s.tdClass}`]:Boolean(s.tdClass),...this.expandCellClass(r)},style:this.getStickyStyle(i)},e("slot",{name:`${this.tableId}-${"string"==typeof s.field?s.field:s.name}-${this.rowKey}`},e("span",null,this.getCellValue(s))))})),r.map(((s,i)=>{const o=t+i;if(this.isCovered(o))return null;const r="string"==typeof s.field?s.field:s.name,l=this.getSpanFor(s),n=this.getCellClassFor(s);return e("td",{key:s.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${s.align||"left"}`]:!0,"td--last-row":this.isVisualLastRow(s),"td--before-separator":this.isVisualLastRowBeforeSeparator(s),[`${s.tdClass}`]:Boolean(s.tdClass),...this.expandCellClass(n)},style:this.getStickyStyle(o)},e("slot",{name:`${this.tableId}-${r}-${this.rowKey}`},e("span",null,this.getCellValue(s))))})),d.map(((t,i)=>{const o=this.visibleColumns.length-s+i;if(this.isCovered(o))return null;const r="string"==typeof t.field?t.field:t.name,l=this.getSpanFor(t),n=this.getCellClassFor(t);return e("td",{key:t.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${t.align||"left"}`]:!0,"td--last-row":this.isVisualLastRow(t),"td--before-separator":this.isVisualLastRowBeforeSeparator(t),"sticky-right":!0,"sticky-right-edge":0===i,"is-scrolled-right":0===i&&this._scrolledRight,[`${t.tdClass}`]:Boolean(t.tdClass),...this.expandCellClass(n)},style:this.getStickyStyle(o)},e("slot",{name:`${this.tableId}-${r}-${this.rowKey}`},e("span",null,this.getCellValue(t))))}))))}static get style(){return'sd-tr{display:contents}sd-tr *{box-sizing:border-box}.tr{display:table-row}.tr:hover .td{background-color:#F9F9F9}.tr--no-hover:hover .td{background-color:white}.td{display:table-cell;height:var(--table-body-height, 44px);padding:var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);background:white;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.td--left{text-align:left}.td--center{text-align:center}.td--right{text-align:right}.td--selected{position:relative;width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.td--selected sd-checkbox label{position:relative}.td--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.td.sticky-left{position:sticky;background-color:white;z-index:100 !important;left:var(--sticky-left-offset, 0)}.td.sticky-right{position:sticky;background-color:white;z-index:100 !important;right:var(--sticky-right-offset, 0)}.td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-left-edge.is-scrolled-left{overflow:visible}.td.sticky-left-edge.is-scrolled-left:after{opacity:1}.td.sticky-right-edge.is-scrolled-right{overflow:visible}.td.sticky-right-edge.is-scrolled-right:after{opacity:1}.tr:hover .td.sticky-left,.tr:hover .td.sticky-right{background-color:#F9F9F9}.tr--no-hover:hover .td.sticky-left,.tr--no-hover:hover .td.sticky-right{background-color:white}.td.td--last-row{border-bottom:none}.tr--separator .td--separator{height:var(--table-separator-width, 6px);padding:0;background-color:var(--table-separator-color, #eeeeee);border-bottom:none}.td.td--before-separator{border-bottom:none}.td--divider-left{border-left:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}.td--divider-right{border-right:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}'}},[772,"sd-tr",{columns:[16],selectable:[4],stickyColumn:[16],rowKey:[1,"row-key"],row:[16],separator:[4],tableId:[32],columnWidths:[32],isVisible:[32],spansVersion:[32],_columns:[32],_selectable:[32],_stickyColumn:[32],_scrolledLeft:[32],_scrolledRight:[32],_dense:[32],refreshConfig:[64],bumpSpansVersion:[64],updateVisibility:[64],setColumnWidths:[64],refreshSelection:[64]}]);function b(){"undefined"!=typeof customElements&&["sd-tr","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-tr":customElements.get(o(t))||customElements.define(o(t),p);break;case"sd-checkbox":customElements.get(o(t))||d();break;case"sd-icon":customElements.get(o(t))||c()}}))}export{p as S,b as d}
|