@sellmate/design-system 1.1.0 → 1.3.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-B7brIpIQ.js → component.table-CMqGfEui.js} +11 -1
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-BlxrCRYi.js → index-Cw-78mnC.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
- package/dist/cjs/sd-badge.cjs.entry.js +2 -2
- package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
- package/dist/cjs/sd-button_2.cjs.entry.js +278 -11
- package/dist/cjs/sd-calendar_2.cjs.entry.js +262 -0
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/sd-chip.cjs.entry.js +4 -4
- package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +4 -4
- package/dist/cjs/sd-date-box.cjs.entry.js +8 -3
- package/dist/cjs/sd-date-picker.config-D3lTpa6W.js +37 -0
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +27 -20
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +49 -49
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +10 -6
- package/dist/cjs/sd-field_3.cjs.entry.js +31 -30
- package/dist/cjs/sd-form.cjs.entry.js +5 -5
- package/dist/cjs/sd-ghost-button.cjs.entry.js +4 -4
- package/dist/cjs/sd-guide.cjs.entry.js +5 -5
- package/dist/cjs/sd-key-value-table.cjs.entry.js +10 -10
- package/dist/cjs/sd-linear-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-pagination_4.cjs.entry.js +116 -43
- package/dist/cjs/sd-popover.cjs.entry.js +6 -6
- package/dist/cjs/sd-popup.cjs.entry.js +2 -2
- package/dist/cjs/sd-portal.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +7 -4
- package/dist/cjs/sd-radio.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +15 -11
- package/dist/cjs/sd-select_3.cjs.entry.js +20 -15
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +170 -47
- package/dist/cjs/{sd-table.config-CDyioyE2.js → sd-table.config-BIpldZtw.js} +13 -2
- package/dist/cjs/sd-tabs.cjs.entry.js +8 -3
- package/dist/cjs/sd-tag.cjs.entry.js +10 -10
- package/dist/cjs/sd-td.cjs.entry.js +52 -10
- package/dist/cjs/sd-text-link.cjs.entry.js +9 -4
- package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{tooltipArrow-N6nQ1QT-.js → tooltipArrow-BjSFKIUq.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 +9 -8
- package/dist/collection/components/sd-calendar/sd-calendar.config.js +51 -0
- package/dist/collection/components/sd-calendar/sd-calendar.css +134 -73
- package/dist/collection/components/sd-calendar/sd-calendar.js +172 -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 +4 -4
- 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 +7 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +8 -3
- 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 +12 -12
- 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 +3 -3
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +6 -2
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.js +23 -22
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +7 -2
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +4 -4
- package/dist/collection/components/sd-form/sd-form.js +4 -4
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +3 -3
- package/dist/collection/components/sd-guide/sd-guide.js +4 -4
- package/dist/collection/components/sd-input/sd-input.js +3 -3
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +8 -8
- 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-modal-container/sd-modal-container.js +2 -2
- package/dist/collection/components/sd-number-input/sd-number-input.js +6 -6
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +5 -5
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +2 -2
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -3
- 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 +7 -3
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +7 -7
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +5 -5
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +9 -4
- package/dist/collection/components/sd-select/sd-select.js +5 -5
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.config.js +4 -0
- package/dist/collection/components/sd-table/sd-table.css +22 -3
- package/dist/collection/components/sd-table/sd-table.js +197 -50
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +2 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +5 -5
- package/dist/collection/components/sd-table/sd-td/sd-td.js +111 -9
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +30 -16
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +20 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +97 -18
- package/dist/collection/components/sd-tabs/sd-tabs.js +7 -2
- package/dist/collection/components/sd-tag/sd-tag.config.js +3 -3
- package/dist/collection/components/sd-tag/sd-tag.js +6 -3
- package/dist/collection/components/sd-text-link/sd-text-link.js +8 -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/collection/utils/modal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B8o25hOw.js +1 -0
- package/dist/components/p-BFC3Etk2.js +1 -0
- package/dist/components/p-BQn6le_Y.js +1 -0
- package/dist/components/p-BRk9YZBe.js +1 -0
- package/dist/components/p-BRxXhFqt.js +1 -0
- package/dist/components/{p-D8WAP9T3.js → p-BSfu4DO2.js} +1 -1
- package/dist/components/p-BZabVWBD.js +1 -0
- package/dist/components/{p-BfkuCNCI.js → p-BeBiPTbd.js} +1 -1
- package/dist/components/p-BjkROjjt.js +1 -0
- package/dist/components/p-BjpbUGud.js +1 -0
- package/dist/components/p-BkWaPXXj.js +1 -0
- package/dist/components/p-BnfUIhUj.js +1 -0
- package/dist/components/p-Bs1Z5QtN.js +1 -0
- package/dist/components/{p-MQTl8fGT.js → p-BwPmM1Pm.js} +1 -1
- package/dist/components/p-C3fqSH7A.js +1 -0
- package/dist/components/p-CIUE4qr7.js +1 -0
- package/dist/components/p-CLxVZFEG.js +1 -0
- package/dist/components/p-CPuyhF6g.js +1 -0
- package/dist/components/p-CpgTSxf0.js +1 -0
- package/dist/components/p-Cx_d5vsS.js +1 -0
- package/dist/components/{p-BeK8amzx.js → p-CyObYB-g.js} +1 -1
- package/dist/components/p-D7nYP2a4.js +1 -0
- package/dist/components/{p-BPsOJlCP.js → p-DS7Ypvt5.js} +1 -1
- package/dist/components/p-Da5i_Sa6.js +1 -0
- package/dist/components/p-DhTcn6jX.js +1 -0
- package/dist/components/p-DlREBZ-C.js +1 -0
- package/dist/components/p-DnW8EAqd.js +1 -0
- package/dist/components/{p-D5TRyquv.js → p-FKKk7Bk8.js} +1 -1
- package/dist/components/{p-Dr1AMbBj.js → p-INdVvadB.js} +1 -1
- package/dist/components/p-JlZdKw4C.js +1 -0
- package/dist/components/p-VuxN5d2D.js +1 -0
- package/dist/components/p-WAsath62.js +1 -0
- package/dist/components/{p-ofkgu5aS.js → p-X-8I-A3g.js} +1 -1
- package/dist/components/{p-B1MabGRR.js → p-Z5Vk33zf.js} +1 -1
- package/dist/components/{p-DG45uNxd.js → p-kSfaCwf1.js} +1 -1
- package/dist/components/p-mmdt-WnS.js +1 -0
- package/dist/components/p-oyZgWRnC.js +1 -0
- package/dist/components/p-t161LJqb.js +1 -0
- package/dist/components/{p-CGBnxqG2.js → p-wOAxmZ1V.js} +1 -1
- package/dist/components/p-xX3QT-8K.js +1 -0
- 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.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/p-00854a0a.entry.js +1 -0
- package/dist/design-system/p-00b2c850.entry.js +1 -0
- package/dist/design-system/p-03badf68.entry.js +1 -0
- package/dist/design-system/p-0U6dRjlq.js +2 -0
- package/dist/design-system/{p-d78fbe16.entry.js → p-11b904a3.entry.js} +1 -1
- package/dist/design-system/p-32e2d71e.entry.js +1 -0
- package/dist/design-system/p-399d416c.entry.js +1 -0
- package/dist/design-system/{p-29ed11e5.entry.js → p-3b8954d9.entry.js} +1 -1
- package/dist/design-system/{p-feeb0cc5.entry.js → p-481e6934.entry.js} +1 -1
- package/dist/design-system/{p-328fae12.entry.js → p-4a91875c.entry.js} +1 -1
- package/dist/design-system/p-563b6fc2.entry.js +1 -0
- package/dist/design-system/p-679bce6c.entry.js +1 -0
- package/dist/design-system/{p-b6ca4461.entry.js → p-74bf0ed9.entry.js} +1 -1
- package/dist/design-system/{p-4e2953eb.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-f5576a0d.entry.js → p-9b9bf9db.entry.js} +1 -1
- package/dist/design-system/p-9f7f1b8b.entry.js +1 -0
- package/dist/design-system/p-BGtUaScP.js +1 -0
- package/dist/design-system/p-BQn6le_Y.js +1 -0
- package/dist/design-system/p-BnfUIhUj.js +1 -0
- package/dist/{components/p-CT3dfy3K.js → design-system/p-C29HUShl.js} +1 -1
- package/dist/design-system/p-TF8_Lyhq.js +1 -0
- package/dist/design-system/p-a640e509.entry.js +1 -0
- package/dist/design-system/{p-20a50702.entry.js → p-a71d4947.entry.js} +1 -1
- package/dist/design-system/p-a7ea1cf0.entry.js +1 -0
- package/dist/design-system/{p-e1c0a3c9.entry.js → p-a97033a2.entry.js} +1 -1
- package/dist/design-system/p-a98f9a29.entry.js +1 -0
- package/dist/design-system/{p-7882e388.entry.js → p-ae117afa.entry.js} +1 -1
- package/dist/design-system/{p-f3cfff78.entry.js → p-aeccfb2b.entry.js} +1 -1
- package/dist/design-system/p-c7099e9e.entry.js +1 -0
- package/dist/design-system/p-cc97f4b4.entry.js +1 -0
- package/dist/design-system/{p-b96c694c.entry.js → p-d39e515d.entry.js} +1 -1
- package/dist/design-system/p-dbeaeb31.entry.js +1 -0
- package/dist/design-system/p-e23dac79.entry.js +1 -0
- package/dist/design-system/{p-c0f60b00.entry.js → p-e611dcd4.entry.js} +1 -1
- package/dist/design-system/{p-a942dfbe.entry.js → p-e8e64511.entry.js} +1 -1
- package/dist/design-system/{p-cd8e4dd6.entry.js → p-e902a3f4.entry.js} +1 -1
- package/dist/design-system/p-f7074386.entry.js +1 -0
- package/dist/design-system/p-f721a6c6.entry.js +1 -0
- package/dist/design-system/{p-b1bb0d72.entry.js → p-fc5c4f85.entry.js} +1 -1
- package/dist/design-system/p-fe0a5368.entry.js +1 -0
- package/dist/design-system/{p-cbda9194.entry.js → p-fe3ae346.entry.js} +1 -1
- package/dist/design-system/p-ffaa4b5d.entry.js +1 -0
- package/dist/design-system/p-mmdt-WnS.js +1 -0
- package/dist/esm/component.datepicker-BQn6le_Y.js +119 -0
- package/dist/esm/{component.table-BQ6at17Y.js → component.table-BnfUIhUj.js} +11 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-CLCoul8o.js → index-0U6dRjlq.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +2 -2
- package/dist/esm/sd-badge.entry.js +2 -2
- package/dist/esm/sd-barcode-input.entry.js +2 -2
- package/dist/esm/sd-button_2.entry.js +277 -10
- package/dist/esm/sd-calendar_2.entry.js +259 -0
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +4 -4
- package/dist/esm/sd-chip.entry.js +4 -4
- package/dist/esm/sd-circle-progress.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +4 -4
- package/dist/esm/sd-date-box.entry.js +8 -3
- package/dist/esm/sd-date-picker.config-CGEE3DkI.js +34 -0
- package/dist/esm/sd-date-picker_7.entry.js +27 -20
- package/dist/esm/sd-date-range-picker-calendar.entry.js +22 -22
- package/dist/esm/sd-dropdown-button.entry.js +10 -6
- package/dist/esm/sd-field_3.entry.js +31 -30
- package/dist/esm/sd-form.entry.js +5 -5
- package/dist/esm/sd-ghost-button.entry.js +4 -4
- package/dist/esm/sd-guide.entry.js +5 -5
- package/dist/esm/sd-key-value-table.entry.js +10 -10
- package/dist/esm/sd-linear-progress.entry.js +2 -2
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +3 -3
- package/dist/esm/sd-pagination_4.entry.js +116 -43
- package/dist/esm/sd-popover.entry.js +6 -6
- package/dist/esm/sd-popup.entry.js +2 -2
- package/dist/esm/sd-portal.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +7 -4
- package/dist/esm/sd-radio.entry.js +2 -2
- package/dist/esm/sd-select-list-item_2.entry.js +15 -11
- package/dist/esm/sd-select_3.entry.js +20 -15
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/{sd-table.config-0Te8GLCI.js → sd-table.config-B-VgXXT7.js} +13 -3
- package/dist/esm/sd-table.entry.js +170 -47
- package/dist/esm/sd-tabs.entry.js +8 -3
- package/dist/esm/sd-tag.entry.js +10 -10
- package/dist/esm/sd-td.entry.js +52 -10
- package/dist/esm/sd-text-link.entry.js +9 -4
- package/dist/esm/sd-toast-container.entry.js +2 -2
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{tooltipArrow-Bc-yw2nt.js → tooltipArrow-O5LOsHae.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-dropdown-button/sd-dropdown-button.config.d.ts +3 -2
- package/dist/types/components/sd-table/constants.d.ts +2 -0
- package/dist/types/components/sd-table/sd-table.config.d.ts +4 -0
- package/dist/types/components/sd-table/sd-table.d.ts +19 -15
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +6 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +7 -0
- package/dist/types/components/sd-tag/sd-tag.d.ts +1 -0
- package/dist/types/components.d.ts +47 -60
- package/dist/types/index.d.ts +4 -3
- package/hydrate/index.js +1359 -1130
- package/hydrate/index.mjs +1359 -1130
- 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 -214
- 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--t9jBTYS.js +0 -1
- package/dist/components/p-At6nBeyO.js +0 -1
- package/dist/components/p-B6cqMQaM.js +0 -1
- package/dist/components/p-B73VhbYi.js +0 -1
- package/dist/components/p-BDQQllAo.js +0 -1
- package/dist/components/p-BDr27lvk.js +0 -1
- package/dist/components/p-BQ6at17Y.js +0 -1
- package/dist/components/p-BW_sBt7X.js +0 -1
- package/dist/components/p-BX3TJuQY.js +0 -1
- package/dist/components/p-Bm_T3qE0.js +0 -1
- package/dist/components/p-BnzK4uU4.js +0 -1
- package/dist/components/p-BqkJ0rZv.js +0 -1
- package/dist/components/p-C4PmGpW8.js +0 -1
- package/dist/components/p-C9CszVFl.js +0 -1
- package/dist/components/p-CGQWERwE.js +0 -1
- package/dist/components/p-CZmKBmKx.js +0 -1
- package/dist/components/p-CnarDyZi.js +0 -1
- package/dist/components/p-Cr2ghUra.js +0 -1
- package/dist/components/p-Cspm6LxP.js +0 -1
- package/dist/components/p-Cx3jXw9J.js +0 -1
- package/dist/components/p-DG-4Ifco.js +0 -1
- package/dist/components/p-DTrMR0rx.js +0 -1
- package/dist/components/p-DfXAgw0E.js +0 -1
- package/dist/components/p-MMkRcTBd.js +0 -1
- package/dist/components/p-ZstG0XdT.js +0 -1
- package/dist/components/p-h7eBUL4i.js +0 -1
- package/dist/components/p-lyB7zSp-.js +0 -1
- package/dist/components/p-oIM6jNZe.js +0 -1
- package/dist/components/p-oKHZl8yu.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-02289728.entry.js +0 -1
- package/dist/design-system/p-17d66d85.entry.js +0 -1
- package/dist/design-system/p-18466728.entry.js +0 -1
- package/dist/design-system/p-1bb86d69.entry.js +0 -1
- package/dist/design-system/p-21874054.entry.js +0 -1
- package/dist/design-system/p-282cbefa.entry.js +0 -1
- package/dist/design-system/p-35dce399.entry.js +0 -1
- package/dist/design-system/p-39ff56b4.entry.js +0 -1
- package/dist/design-system/p-3cb712a6.entry.js +0 -1
- package/dist/design-system/p-7610153d.entry.js +0 -1
- package/dist/design-system/p-7722ddeb.entry.js +0 -1
- package/dist/design-system/p-7bfa0cf9.entry.js +0 -1
- package/dist/design-system/p-824ecfb5.entry.js +0 -1
- package/dist/design-system/p-9a04b341.entry.js +0 -1
- package/dist/design-system/p-B6cqMQaM.js +0 -1
- package/dist/design-system/p-BQ6at17Y.js +0 -1
- package/dist/design-system/p-CGQWERwE.js +0 -1
- package/dist/design-system/p-CLCoul8o.js +0 -2
- package/dist/design-system/p-Ce0cmS4R.js +0 -1
- package/dist/design-system/p-DTrMR0rx.js +0 -1
- package/dist/design-system/p-Dmf0PYdM.js +0 -1
- package/dist/design-system/p-a7a0ca14.entry.js +0 -1
- package/dist/design-system/p-b04b22c6.entry.js +0 -1
- package/dist/design-system/p-baed13e4.entry.js +0 -1
- package/dist/design-system/p-bd45e65d.entry.js +0 -1
- package/dist/design-system/p-bf4156d8.entry.js +0 -1
- package/dist/design-system/p-c228c2c7.entry.js +0 -1
- package/dist/design-system/p-cf382479.entry.js +0 -1
- package/dist/design-system/p-d0de34fd.entry.js +0 -1
- package/dist/design-system/p-f60cc7be.entry.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 -211
- 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
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-0U6dRjlq.js';
|
|
2
|
+
import { u as useDatePicker, t as today, W as WEEK_LABELS, C as CALENDAR_LAYOUT } from './useDatePicker-D5RmWGOp.js';
|
|
3
|
+
import { a as DATEPICKER_SIZE_MAP, D as DATEPICKER_COLORS } from './sd-date-picker.config-CGEE3DkI.js';
|
|
4
|
+
import './component.datepicker-BQn6le_Y.js';
|
|
5
|
+
|
|
6
|
+
const sdCalendarCss = () => `sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-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-calendar .sd-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-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-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-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);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-calendar .sd-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-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);width:100%;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}`;
|
|
7
|
+
|
|
8
|
+
const SdCalendar = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.update = createEvent(this, "sdUpdate", 7);
|
|
12
|
+
this.viewChange = createEvent(this, "sdViewChange", 7);
|
|
13
|
+
}
|
|
14
|
+
value = null;
|
|
15
|
+
selectable;
|
|
16
|
+
events;
|
|
17
|
+
currentYear;
|
|
18
|
+
currentMonth;
|
|
19
|
+
update;
|
|
20
|
+
viewChange;
|
|
21
|
+
dateUtil = useDatePicker();
|
|
22
|
+
_eventMapCache;
|
|
23
|
+
get eventMap() {
|
|
24
|
+
const cache = this._eventMapCache;
|
|
25
|
+
if (cache && cache.src === this.events)
|
|
26
|
+
return cache.map;
|
|
27
|
+
const map = new Map();
|
|
28
|
+
(this.events ?? []).forEach(g => g.dates.forEach(d => {
|
|
29
|
+
const arr = map.get(d) ?? [];
|
|
30
|
+
arr.push({ color: g.color, label: g.label });
|
|
31
|
+
map.set(d, arr);
|
|
32
|
+
}));
|
|
33
|
+
this._eventMapCache = { src: this.events, map };
|
|
34
|
+
return map;
|
|
35
|
+
}
|
|
36
|
+
get legendItems() {
|
|
37
|
+
const seen = new Set();
|
|
38
|
+
const out = [];
|
|
39
|
+
(this.events ?? []).forEach(g => {
|
|
40
|
+
const key = `${g.color}|${g.label}`;
|
|
41
|
+
if (seen.has(key))
|
|
42
|
+
return;
|
|
43
|
+
seen.add(key);
|
|
44
|
+
out.push({ color: g.color, label: g.label });
|
|
45
|
+
});
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
componentWillLoad() {
|
|
49
|
+
this.syncViewFromValue();
|
|
50
|
+
}
|
|
51
|
+
handleValueChange() {
|
|
52
|
+
this.syncViewFromValue();
|
|
53
|
+
}
|
|
54
|
+
syncViewFromValue() {
|
|
55
|
+
const base = this.value || today;
|
|
56
|
+
const [year, month] = base.split('-').map(Number);
|
|
57
|
+
this.currentYear = year;
|
|
58
|
+
this.currentMonth = month;
|
|
59
|
+
}
|
|
60
|
+
formatDate(year, month, day) {
|
|
61
|
+
return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
|
|
62
|
+
}
|
|
63
|
+
get cells() {
|
|
64
|
+
const year = this.currentYear;
|
|
65
|
+
const month = this.currentMonth;
|
|
66
|
+
const firstDayIndex = new Date(year, month - 1, 1).getDay();
|
|
67
|
+
const daysInCurrent = new Date(year, month, 0).getDate();
|
|
68
|
+
const prevMonth = month === 1 ? 12 : month - 1;
|
|
69
|
+
const prevYear = month === 1 ? year - 1 : year;
|
|
70
|
+
const daysInPrev = new Date(prevYear, prevMonth, 0).getDate();
|
|
71
|
+
const nextMonth = month === 12 ? 1 : month + 1;
|
|
72
|
+
const nextYear = month === 12 ? year + 1 : year;
|
|
73
|
+
const cells = [];
|
|
74
|
+
for (let i = firstDayIndex - 1; i >= 0; i--) {
|
|
75
|
+
const day = daysInPrev - i;
|
|
76
|
+
cells.push({
|
|
77
|
+
date: this.formatDate(prevYear, prevMonth, day),
|
|
78
|
+
day,
|
|
79
|
+
inCurrentMonth: false,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
for (let day = 1; day <= daysInCurrent; day++) {
|
|
83
|
+
cells.push({
|
|
84
|
+
date: this.formatDate(year, month, day),
|
|
85
|
+
day,
|
|
86
|
+
inCurrentMonth: true,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
const remaining = (7 - (cells.length % 7)) % 7;
|
|
90
|
+
for (let day = 1; day <= remaining; day++) {
|
|
91
|
+
cells.push({
|
|
92
|
+
date: this.formatDate(nextYear, nextMonth, day),
|
|
93
|
+
day,
|
|
94
|
+
inCurrentMonth: false,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return cells;
|
|
98
|
+
}
|
|
99
|
+
emitViewChange() {
|
|
100
|
+
this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
|
|
101
|
+
}
|
|
102
|
+
goPrevYear = (event) => {
|
|
103
|
+
event.stopPropagation();
|
|
104
|
+
this.currentYear -= 1;
|
|
105
|
+
this.emitViewChange();
|
|
106
|
+
};
|
|
107
|
+
goNextYear = (event) => {
|
|
108
|
+
event.stopPropagation();
|
|
109
|
+
this.currentYear += 1;
|
|
110
|
+
this.emitViewChange();
|
|
111
|
+
};
|
|
112
|
+
goPrevMonth = (event) => {
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'prev');
|
|
115
|
+
this.currentYear = newYear;
|
|
116
|
+
this.currentMonth = newMonth;
|
|
117
|
+
this.emitViewChange();
|
|
118
|
+
};
|
|
119
|
+
goNextMonth = (event) => {
|
|
120
|
+
event.stopPropagation();
|
|
121
|
+
const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'next');
|
|
122
|
+
this.currentYear = newYear;
|
|
123
|
+
this.currentMonth = newMonth;
|
|
124
|
+
this.emitViewChange();
|
|
125
|
+
};
|
|
126
|
+
isDisabled(date) {
|
|
127
|
+
if (!this.selectable)
|
|
128
|
+
return false;
|
|
129
|
+
const [start, end] = this.selectable;
|
|
130
|
+
if (start !== '' && date < start)
|
|
131
|
+
return true;
|
|
132
|
+
if (end !== '' && date > end)
|
|
133
|
+
return true;
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
handleDayClick(cell) {
|
|
137
|
+
if (this.isDisabled(cell.date))
|
|
138
|
+
return;
|
|
139
|
+
this.value = cell.date;
|
|
140
|
+
this.update.emit(cell.date);
|
|
141
|
+
}
|
|
142
|
+
render() {
|
|
143
|
+
const cssVars = {
|
|
144
|
+
'--calendar-bg': CALENDAR_LAYOUT.bg,
|
|
145
|
+
'--calendar-padding': `${CALENDAR_LAYOUT.paddingXY}px`,
|
|
146
|
+
'--calendar-gap': `${CALENDAR_LAYOUT.gap}px`,
|
|
147
|
+
'--calendar-radius': `${CALENDAR_LAYOUT.radius}px`,
|
|
148
|
+
'--calendar-header-gap': `${CALENDAR_LAYOUT.header.gap}px`,
|
|
149
|
+
'--calendar-header-divider': CALENDAR_LAYOUT.header.divider,
|
|
150
|
+
'--calendar-header-font-size': `${CALENDAR_LAYOUT.header.fontSize}px`,
|
|
151
|
+
'--calendar-header-line-height': `${CALENDAR_LAYOUT.header.lineHeight}px`,
|
|
152
|
+
'--calendar-header-font-weight': CALENDAR_LAYOUT.header.fontWeight,
|
|
153
|
+
'--calendar-week-font-size': `${CALENDAR_LAYOUT.week.fontSize}px`,
|
|
154
|
+
'--calendar-week-line-height': `${CALENDAR_LAYOUT.week.lineHeight}px`,
|
|
155
|
+
'--calendar-week-font-weight': CALENDAR_LAYOUT.week.fontWeight,
|
|
156
|
+
'--calendar-week-color': CALENDAR_LAYOUT.week.color,
|
|
157
|
+
'--calendar-grid-row-gap': `${CALENDAR_LAYOUT.grid.rowGap}px`,
|
|
158
|
+
'--calendar-day-size': `${CALENDAR_LAYOUT.day.size}px`,
|
|
159
|
+
'--calendar-day-circle-size': `${CALENDAR_LAYOUT.day.circleSize}px`,
|
|
160
|
+
'--calendar-day-circle-radius': `${CALENDAR_LAYOUT.day.circleRadius}px`,
|
|
161
|
+
'--calendar-day-text': CALENDAR_LAYOUT.day.defaultText,
|
|
162
|
+
'--calendar-day-hover-text': CALENDAR_LAYOUT.day.hoverText,
|
|
163
|
+
'--calendar-day-hover-border': CALENDAR_LAYOUT.day.hoverBorder,
|
|
164
|
+
'--calendar-day-select-bg': CALENDAR_LAYOUT.day.selectBg,
|
|
165
|
+
'--calendar-day-select-text': CALENDAR_LAYOUT.day.selectText,
|
|
166
|
+
'--calendar-day-disabled-text': CALENDAR_LAYOUT.day.disabledText,
|
|
167
|
+
'--calendar-day-font-size': `${CALENDAR_LAYOUT.day.fontSize}px`,
|
|
168
|
+
'--calendar-day-line-height': `${CALENDAR_LAYOUT.day.lineHeight}px`,
|
|
169
|
+
'--calendar-day-font-weight': CALENDAR_LAYOUT.day.fontWeight,
|
|
170
|
+
'--calendar-day-bold-font-weight': CALENDAR_LAYOUT.day.boldFontWeight,
|
|
171
|
+
'--calendar-day-dot-size': `${CALENDAR_LAYOUT.day.dot.size}px`,
|
|
172
|
+
'--calendar-day-dot-gap': `${CALENDAR_LAYOUT.day.dot.gap}px`,
|
|
173
|
+
'--calendar-day-dot-padding-y': `${CALENDAR_LAYOUT.day.dot.paddingY}px`,
|
|
174
|
+
'--calendar-legend-font-size': `${CALENDAR_LAYOUT.legend.fontSize}px`,
|
|
175
|
+
'--calendar-legend-line-height': `${CALENDAR_LAYOUT.legend.lineHeight}px`,
|
|
176
|
+
'--calendar-legend-font-weight': CALENDAR_LAYOUT.legend.fontWeight,
|
|
177
|
+
'--calendar-legend-gap': `${CALENDAR_LAYOUT.legend.gap}px`,
|
|
178
|
+
'--calendar-legend-group-gap': `${CALENDAR_LAYOUT.legend.groupGap}px`,
|
|
179
|
+
};
|
|
180
|
+
const eventMap = this.eventMap;
|
|
181
|
+
const legend = this.legendItems;
|
|
182
|
+
return (h("div", { key: '66c0bec57c13af12b05f2e90fbc5e1674ab052c8', class: "sd-calendar", style: cssVars }, h("div", { key: '4df4f1c6d1ddcbe1478a69a481a228e66fc33c0a', class: "sd-calendar__header" }, h("div", { key: '378c04444b3ddcc7df92ecce0f49056e919cd8e5', class: "sd-calendar__nav-group" }, h("sd-ghost-button", { key: '47426c62a26b05a9db58144acc33770713e7fce4', ariaLabel: "prevYear", size: "xxs", icon: "chevronLeft", onClick: this.goPrevYear }), h("span", { key: '3b32e76a8a35705d820803c0b747829370079324', class: "sd-calendar__label" }, this.currentYear), h("sd-ghost-button", { key: '2e890a2cea91c9f49a03f0db3a4b943c707e312e', ariaLabel: "nextYear", size: "xxs", icon: "chevronRight", onClick: this.goNextYear })), h("span", { key: '795bb8452e75303c25a8dc6d95f819f1e42f7f49', class: "sd-calendar__divider", "aria-hidden": "true" }), h("div", { key: '6df460ec38917c51eff851732c7f37b7e09475f6', class: "sd-calendar__nav-group sd-calendar__nav-group-month" }, h("sd-ghost-button", { key: '36ef9dfdcfac5d9da08d05ca357fc9ec4100af4f', ariaLabel: "prevMonth", size: "xxs", icon: "chevronLeft", onClick: this.goPrevMonth }), h("span", { key: 'b2e0cc74570724c0d97fb2afbcb775c0794583af', class: "sd-calendar__label sd-calendar__label-month" }, this.currentMonth, "\uC6D4"), h("sd-ghost-button", { key: '4c45467356411f7a5d137c19931d8fc62084c742', ariaLabel: "nextMonth", size: "xxs", icon: "chevronRight", onClick: this.goNextMonth }))), h("div", { key: 'e1637a39795fb44bd33d138c8b244cc15b5f85f6', class: "sd-calendar__week" }, WEEK_LABELS.map(label => (h("span", { key: label, class: "sd-calendar__week-cell" }, label)))), h("div", { key: '45642dc93b1373dc760f64ba74dd931e651279dd', class: "sd-calendar__grid" }, this.cells.map(cell => {
|
|
183
|
+
const isSelected = cell.inCurrentMonth && this.value !== '' && this.value === cell.date;
|
|
184
|
+
const isToday = cell.inCurrentMonth && today === cell.date;
|
|
185
|
+
const isDisabled = cell.inCurrentMonth && this.isDisabled(cell.date);
|
|
186
|
+
const dayEvents = cell.inCurrentMonth ? eventMap.get(cell.date) : undefined;
|
|
187
|
+
return (h("button", { type: "button", key: cell.date, class: {
|
|
188
|
+
'sd-calendar__day': true,
|
|
189
|
+
'sd-calendar__day--empty': !cell.inCurrentMonth,
|
|
190
|
+
'sd-calendar__day--today': isToday,
|
|
191
|
+
'sd-calendar__day--selected': isSelected,
|
|
192
|
+
'sd-calendar__day--disabled': isDisabled,
|
|
193
|
+
}, 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 : ''), dayEvents && dayEvents.length > 0 && (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 } })))))));
|
|
194
|
+
})), legend.length > 0 && [
|
|
195
|
+
h("span", { key: '0872cb7627db7d33721fbd1e1c9a601bd3c6c3e1', class: "sd-calendar__divider-bottom", "aria-hidden": "true" }),
|
|
196
|
+
h("div", { key: 'd9c6be0684720aa9d2af24b2d0cf372a036dc8d5', 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))))),
|
|
197
|
+
]));
|
|
198
|
+
}
|
|
199
|
+
static get watchers() { return {
|
|
200
|
+
"value": [{
|
|
201
|
+
"handleValueChange": 0
|
|
202
|
+
}]
|
|
203
|
+
}; }
|
|
204
|
+
};
|
|
205
|
+
SdCalendar.style = sdCalendarCss();
|
|
206
|
+
|
|
207
|
+
const sdDatePickerTriggerCss = () => `sd-date-picker-trigger{display:block;width:100%;height:100%}sd-date-picker-trigger .sd-date-picker-trigger{display:flex;align-items:center;gap:var(--trigger-gap);width:100%;height:100%;padding:0 var(--trigger-padding-x);cursor:pointer;user-select:none;overflow:hidden;border-radius:var(--trigger-radius)}sd-date-picker-trigger .sd-date-picker-trigger--disabled{cursor:not-allowed}sd-date-picker-trigger .sd-date-picker-trigger__icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}sd-date-picker-trigger .sd-date-picker-trigger__text{flex:1;min-width:var(--trigger-text-min-width, 80px);font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}`;
|
|
208
|
+
|
|
209
|
+
const SdDatePickerTrigger = class {
|
|
210
|
+
constructor(hostRef) {
|
|
211
|
+
registerInstance(this, hostRef);
|
|
212
|
+
this.triggerClick = createEvent(this, "sdTriggerClick", 7);
|
|
213
|
+
}
|
|
214
|
+
displayText = '';
|
|
215
|
+
placeholder = 'YYYY-MM-DD';
|
|
216
|
+
disabled = false;
|
|
217
|
+
size = 'sm';
|
|
218
|
+
triggerClick;
|
|
219
|
+
handleClick = () => {
|
|
220
|
+
if (this.disabled)
|
|
221
|
+
return;
|
|
222
|
+
this.triggerClick.emit();
|
|
223
|
+
};
|
|
224
|
+
render() {
|
|
225
|
+
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.sm;
|
|
226
|
+
const hasValue = this.displayText !== '';
|
|
227
|
+
const textMinWidth = this.size === 'md' ? 104 : 80;
|
|
228
|
+
const cssVars = {
|
|
229
|
+
'--trigger-padding-x': `${sizeTokens.paddingX}px`,
|
|
230
|
+
'--trigger-gap': `${sizeTokens.gap}px`,
|
|
231
|
+
'--trigger-icon-size': `${sizeTokens.iconSize}px`,
|
|
232
|
+
'--trigger-font-size': `${sizeTokens.fontSize}px`,
|
|
233
|
+
'--trigger-line-height': `${sizeTokens.lineHeight}px`,
|
|
234
|
+
'--trigger-font-weight': sizeTokens.fontWeight,
|
|
235
|
+
'--trigger-radius': `${sizeTokens.radius}px`,
|
|
236
|
+
'--trigger-text-min-width': `${textMinWidth}px`,
|
|
237
|
+
'--trigger-text-color': this.disabled
|
|
238
|
+
? DATEPICKER_COLORS.text.disabled
|
|
239
|
+
: hasValue
|
|
240
|
+
? DATEPICKER_COLORS.text.default
|
|
241
|
+
: DATEPICKER_COLORS.text.hint,
|
|
242
|
+
'--trigger-icon-color': this.disabled
|
|
243
|
+
? DATEPICKER_COLORS.icon.disabled
|
|
244
|
+
: DATEPICKER_COLORS.icon.default,
|
|
245
|
+
};
|
|
246
|
+
return (h("div", { key: '57a23626b1a392be20dccead71b792590fab61b8', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
247
|
+
'sd-date-picker-trigger': true,
|
|
248
|
+
'sd-date-picker-trigger--disabled': this.disabled,
|
|
249
|
+
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
250
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
251
|
+
e.preventDefault();
|
|
252
|
+
this.handleClick();
|
|
253
|
+
}
|
|
254
|
+
} }, 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)));
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
SdDatePickerTrigger.style = sdDatePickerTriggerCss();
|
|
258
|
+
|
|
259
|
+
export { SdCalendar as sd_calendar, SdDatePickerTrigger as sd_date_picker_trigger };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment } from './index-
|
|
1
|
+
import { r as registerInstance, h, F as Fragment } from './index-0U6dRjlq.js';
|
|
2
2
|
|
|
3
3
|
const sdCardCss = () => `sd-card{display:block;height:fit-content}sd-card .sd-card{border-radius:8px;background:white}sd-card .sd-card--bordered{border:1px solid #E1E1E1}`;
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ const SdCard = class {
|
|
|
9
9
|
bordered = false;
|
|
10
10
|
sdClass = '';
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Fragment, { key: '
|
|
12
|
+
return (h(Fragment, { key: '61c364f88b03eb56b60c660a58533f417d209e6a' }, h("div", { key: 'dee3671e757c273ffec06a15a0191a798280522c', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, h("slot", { key: 'f991bf5df95f8c1bac417aa4e70f40cf68624fb8' }))));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
SdCard.style = sdCardCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-0U6dRjlq.js';
|
|
2
2
|
|
|
3
3
|
const checkbox = {
|
|
4
4
|
size: "16",
|
|
@@ -188,13 +188,13 @@ const SdCheckbox = class {
|
|
|
188
188
|
'--sd-checkbox-inverse-icon': CHECKBOX_COLORS.checked.iconInverse,
|
|
189
189
|
'--sd-checkbox-inverse-label': CHECKBOX_COLORS.labelInverse,
|
|
190
190
|
};
|
|
191
|
-
return (h("label", { key: '
|
|
191
|
+
return (h("label", { key: '6fb506c448a5968d403f779d113fd60857901982', class: this.checkboxClasses, style: cssVars }, h("input", { key: 'fb08f531416255b8886d2bd2c21c3f62e8a9d47d', type: "checkbox", ref: el => {
|
|
192
192
|
this.inputEl = el;
|
|
193
|
-
}, 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: '
|
|
193
|
+
}, 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
|
|
194
194
|
? CHECKBOX_COLORS.checked.iconDisabled
|
|
195
195
|
: this.inverse
|
|
196
196
|
? CHECKBOX_COLORS.checked.iconInverse
|
|
197
|
-
: CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '
|
|
197
|
+
: CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '92bc308561b0a7653926d751d029d80c38844b07', class: "sd-checkbox__label" }, this.label)));
|
|
198
198
|
}
|
|
199
199
|
static get watchers() { return {
|
|
200
200
|
"value": [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-0U6dRjlq.js';
|
|
2
2
|
|
|
3
3
|
const chip = {
|
|
4
4
|
height: "24",
|
|
@@ -251,7 +251,7 @@ const SdChip = class {
|
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
unregisterFromForm() {
|
|
254
|
-
if (
|
|
254
|
+
if (this.name === '')
|
|
255
255
|
return;
|
|
256
256
|
const formEl = this.el.closest('sd-form');
|
|
257
257
|
formEl?.componentOnReady().then(form => {
|
|
@@ -289,12 +289,12 @@ const SdChip = class {
|
|
|
289
289
|
'--sd-chip-font-weight': typography.fontWeight,
|
|
290
290
|
'--sd-chip-line-height': typography.lineHeight,
|
|
291
291
|
};
|
|
292
|
-
return (h("span", { key: '
|
|
292
|
+
return (h("span", { key: '3cd683af3aed7cc6e549c5fc5da1e00cda2dc2a0', class: {
|
|
293
293
|
'sd-chip': true,
|
|
294
294
|
[`sd-chip--${state}`]: true,
|
|
295
295
|
'sd-chip--disabled': this.disabled,
|
|
296
296
|
'sd-chip--editable': !this.disabled,
|
|
297
|
-
}, role: this.disabled ? undefined : 'button', tabIndex: this.disabled || this.isEditing ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, style: cssVars, onClick: this.handleChipClick, onKeyDown: this.handleChipKeyDown }, this.isEditing ? (h("span", { key: "chip-input", ref: el => (this.inputEl = el), class: "sd-chip__input", contentEditable: !this.disabled, "data-placeholder": this.placeholder, spellcheck: false, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, onBlur: this.handleInputBlur, onPaste: this.handlePaste, onClick: event => event.stopPropagation() })) : ([
|
|
297
|
+
}, role: this.disabled ? undefined : 'button', tabIndex: this.disabled || this.isEditing ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, style: cssVars, onClick: this.handleChipClick, onKeyDown: this.handleChipKeyDown }, this.isEditing ? (h("span", { key: "chip-input", ref: el => (this.inputEl = el), class: "sd-chip__input", role: "textbox", tabindex: this.disabled ? -1 : 0, contentEditable: !this.disabled, "data-placeholder": this.placeholder, spellcheck: false, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, onBlur: this.handleInputBlur, onPaste: this.handlePaste, onClick: event => event.stopPropagation() })) : ([
|
|
298
298
|
h("span", { key: "chip-label", class: "sd-chip__label" }, this.internalValue),
|
|
299
299
|
!this.disabled && (h("sd-ghost-button", { key: "chip-remove", class: "sd-chip__remove", icon: "close", size: "xxs", ariaLabel: "remove", onClick: this.handleRemoveClick })),
|
|
300
300
|
])));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-0U6dRjlq.js';
|
|
2
2
|
import { p as progressTokens } from './component.progress-D1vaasIp.js';
|
|
3
3
|
import { s as systemTokens } from './system-GBlVDmy4.js';
|
|
4
4
|
|
|
@@ -70,7 +70,7 @@ const SdCircleProgress = class {
|
|
|
70
70
|
}
|
|
71
71
|
const c = CIRCLE_PROGRESS_VIEWBOX_SIZE / 2;
|
|
72
72
|
const showPercent = !this.indeterminate;
|
|
73
|
-
return (h(Host, { key: '
|
|
73
|
+
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)));
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
SdCircleProgress.style = sdCircleProgressCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-0U6dRjlq.js';
|
|
2
2
|
import { m as modalTokens } from './component.modal-DOXMJi-V.js';
|
|
3
3
|
|
|
4
4
|
const CONFIRM_MODAL_DEFAULT_BUTTON = {
|
|
@@ -99,9 +99,9 @@ const SdConfirmModal = class {
|
|
|
99
99
|
const type = this.resolvedType;
|
|
100
100
|
const iconName = CONFIRM_MODAL_ICON_MAP[type];
|
|
101
101
|
const iconColor = CONFIRM_MODAL_ICON_COLOR[type];
|
|
102
|
-
return (h("div", { key: '
|
|
102
|
+
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 => {
|
|
103
103
|
this.customContentRef = el;
|
|
104
|
-
} })) : (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: '
|
|
104
|
+
} })) : (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() }))));
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
SdConfirmModal.style = sdConfirmModalCss();
|
|
@@ -184,7 +184,7 @@ const SdLoadingModal = class {
|
|
|
184
184
|
'--sd-loading-modal-width': this.toCssSize(this.width) ?? `${LOADING_MODAL_LAYOUT.minWidth}px`,
|
|
185
185
|
'--sd-loading-modal-height': this.toCssSize(this.height) ?? `${LOADING_MODAL_LAYOUT.minHeight}px`,
|
|
186
186
|
};
|
|
187
|
-
return (h(Host, { key: '
|
|
187
|
+
return (h(Host, { key: '3d792e07772b93de139fa505f061004b037ed05b', style: hostStyle }, h("div", { key: '8b63d47c502bdd66f893a484c4af36d2e8302081', class: "sd-loading-modal" }, h("div", { key: '5b35a93e1aed2e8d9f5eebfcbe0222c4f38b5536', class: "sd-loading-modal__content" }, this.resolvedState === 'loading' ? (h("sd-circle-progress", { indeterminate: true })) : (h("sd-icon", { class: "sd-loading-modal__icon", name: "warningOutline", size: LOADING_MODAL_LAYOUT.contentSize, color: LOADING_MODAL_COLORS.errorIcon }))), h("div", { key: '591bae1563f4b5c5dc8bce22161d99929fb18ce5', class: "sd-loading-modal__message-wrapper" }, Array.isArray(this.resolvedMessage) ? (this.resolvedMessage.map(message => (h("p", { class: "sd-loading-modal__message" }, message)))) : (h("p", { class: "sd-loading-modal__message" }, this.resolvedMessage))), this.useButton && (h("div", { key: '577acd55fb35229459990f7f1ca4f710c26c51d4', class: "sd-loading-modal__button" }, h("sd-button", { key: 'cda4f1b9a8bee1897efb53671c0f715858377ba7', name: LOADING_MODAL_BUTTON_PRESET, label: this.resolvedButtonLabel, onSdClick: this.handleClick }))))));
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
190
|
SdLoadingModal.style = sdLoadingModalCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-0U6dRjlq.js';
|
|
2
2
|
|
|
3
3
|
const sdDateBoxCss = () => `.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}`;
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ const SdDateBox = class {
|
|
|
31
31
|
this.mouseOver?.emit(this.date);
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h("div", { key: '
|
|
34
|
+
return (h("div", { key: 'ab09e8112e18b04dab2d171fa6dbd8554d11e57b', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
35
35
|
'sd-date-box': true,
|
|
36
36
|
'sd-hoverable': !this.disabled || !this.selected || this.type === '',
|
|
37
37
|
'sd-date-box--disabled': this.disabled,
|
|
@@ -42,7 +42,12 @@ const SdDateBox = class {
|
|
|
42
42
|
'sd-date-box--in-range': this.inRange,
|
|
43
43
|
'sd-date-box--type-start': this.type === 'start',
|
|
44
44
|
'sd-date-box--type-end': this.type === 'end',
|
|
45
|
-
}, onClick: () => this.handleClickDate(),
|
|
45
|
+
}, onClick: () => this.handleClickDate(), onKeyDown: e => {
|
|
46
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
this.handleClickDate();
|
|
49
|
+
}
|
|
50
|
+
}, 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))));
|
|
46
51
|
}
|
|
47
52
|
};
|
|
48
53
|
SdDateBox.style = sdDateBoxCss();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { d as datepickerTokens } from './component.datepicker-BQn6le_Y.js';
|
|
2
|
+
|
|
3
|
+
const sm = datepickerTokens.datepicker.sm;
|
|
4
|
+
const md = datepickerTokens.datepicker.md;
|
|
5
|
+
const DATEPICKER_SIZE_MAP = {
|
|
6
|
+
sm: {
|
|
7
|
+
height: sm.height,
|
|
8
|
+
paddingX: sm.paddingX,
|
|
9
|
+
gap: sm.gap,
|
|
10
|
+
iconSize: sm.icon,
|
|
11
|
+
radius: sm.radius,
|
|
12
|
+
fontSize: sm.typography.fontSize,
|
|
13
|
+
lineHeight: sm.typography.lineHeight,
|
|
14
|
+
fontWeight: sm.typography.fontWeight,
|
|
15
|
+
},
|
|
16
|
+
md: {
|
|
17
|
+
height: md.height,
|
|
18
|
+
paddingX: md.paddingX,
|
|
19
|
+
gap: md.gap,
|
|
20
|
+
iconSize: md.icon,
|
|
21
|
+
radius: md.radius,
|
|
22
|
+
fontSize: md.typography.fontSize,
|
|
23
|
+
lineHeight: md.typography.lineHeight,
|
|
24
|
+
fontWeight: md.typography.fontWeight,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const DATEPICKER_COLORS = {
|
|
28
|
+
border: datepickerTokens.datepicker.border,
|
|
29
|
+
bg: datepickerTokens.datepicker.bg,
|
|
30
|
+
icon: datepickerTokens.datepicker.icon,
|
|
31
|
+
text: datepickerTokens.datepicker.text,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { DATEPICKER_COLORS as D, DATEPICKER_SIZE_MAP as a };
|