@sellmate/design-system 1.29.0 → 1.31.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/design-system.cjs.js +2 -2
- package/dist/cjs/{index-iiJZMzVM.js → index-Jr8OU0y9.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 +3 -3
- package/dist/cjs/sd-calendar_2.cjs.entry.js +8 -9
- package/dist/cjs/sd-callout.cjs.entry.js +2 -2
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/sd-chip-input.cjs.entry.js +21 -16
- package/dist/cjs/sd-chip.cjs.entry.js +7 -7
- package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/{component.datepicker-zFTQQKMH.js → sd-date-picker.config-CgyNxY03.js} +66 -1
- package/dist/cjs/sd-date-picker_8.cjs.entry.js +141 -51
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +162 -12
- package/dist/cjs/sd-divider.cjs.entry.js +2 -2
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +51 -52
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +14 -10
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/sd-pagination.cjs.entry.js +4 -4
- package/dist/cjs/sd-popover.cjs.entry.js +134 -44
- package/dist/cjs/sd-popup.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio.cjs.entry.js +4 -2
- package/dist/cjs/sd-select-list-item_4.cjs.entry.js +11 -11
- package/dist/cjs/sd-switch.cjs.entry.js +13 -3
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
- package/dist/cjs/sd-time-picker-selector.cjs.entry.js +179 -0
- package/dist/cjs/sd-time-picker-trigger.cjs.entry.js +75 -0
- package/dist/cjs/sd-time-picker.cjs.entry.js +173 -0
- package/dist/cjs/sd-time-picker.config-C7REB08L.js +156 -0
- package/dist/cjs/sd-time-range-picker-selector.cjs.entry.js +219 -0
- package/dist/cjs/sd-time-range-picker.cjs.entry.js +204 -0
- 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-DOOcBlLp.js → tooltipArrow-BlrFItn5.js} +1 -1
- package/dist/cjs/useDatePicker-j06ymWZ_.js +103 -0
- package/dist/collection/collection-manifest.json +8 -3
- 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.js +3 -3
- package/dist/collection/components/sd-callout/sd-callout.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +8 -8
- package/dist/collection/components/sd-chip/sd-chip.js +8 -8
- package/dist/collection/components/sd-chip-input/sd-chip-input.css +3 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +43 -17
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +1 -1
- 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.js +23 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.css +75 -0
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +152 -6
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.config.js +27 -0
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +59 -3
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.css +4 -0
- package/dist/collection/components/sd-field/sd-field.js +58 -5
- package/dist/collection/components/sd-file-picker/sd-file-picker.config.js +17 -10
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +46 -16
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +27 -3
- package/dist/collection/components/sd-input/sd-input.js +4 -4
- 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 +58 -7
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.config.js +41 -0
- package/dist/collection/components/sd-popover/sd-popover.js +189 -191
- 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 +25 -4
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -6
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +7 -7
- 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 +54 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +7 -8
- 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-time-picker/sd-time-picker-selector/sd-time-picker-selector.css +87 -0
- package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.js +266 -0
- package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.css +38 -0
- package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.js +216 -0
- package/dist/collection/components/sd-time-picker/sd-time-picker.config.js +78 -0
- package/dist/collection/components/sd-time-picker/sd-time-picker.css +12 -0
- package/dist/collection/components/sd-time-picker/sd-time-picker.js +761 -0
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.css +102 -0
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.js +338 -0
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.config.js +23 -0
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.css +12 -0
- package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.js +809 -0
- 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 +36 -189
- package/dist/components/index.js +1 -1
- package/dist/components/p-1DsQj3tv.js +1 -0
- package/dist/components/p-2g4jlJ3i.js +1 -0
- package/dist/components/{p-C_in6AVN.js → p-6U1qyU5A.js} +1 -1
- package/dist/components/{p-CSr33M9s.js → p-B-EV9bey.js} +1 -1
- package/dist/components/p-B887QQl2.js +1 -0
- package/dist/components/{p-Bpv90tfa.js → p-BPzs63D8.js} +1 -1
- package/dist/components/{p-Dg1UrMqI.js → p-BvJ14GuJ.js} +1 -1
- package/dist/components/p-Bxv2AFOb.js +1 -0
- package/dist/components/p-C6o10dl7.js +1 -0
- package/dist/components/p-C6wuKkUq.js +1 -0
- package/dist/components/{p-CbS69IvC.js → p-C9IKm4j5.js} +1 -1
- package/dist/components/{p-BHjezpAC.js → p-CH9dgzTr.js} +1 -1
- package/dist/components/{p-oYbVr-z0.js → p-CKV2W-zU.js} +1 -1
- package/dist/components/p-CTCt17CE.js +1 -0
- package/dist/components/{p-BOxGhKKP.js → p-CghFB91T.js} +1 -1
- package/dist/components/p-Ckr9iuVb.js +1 -0
- package/dist/components/p-ClbD4Gsr.js +1 -0
- package/dist/components/p-CmCOLnc0.js +1 -0
- package/dist/components/{p-C7mC7a1z.js → p-CwzkplrI.js} +1 -1
- package/dist/components/p-CzJ9g73f.js +1 -0
- package/dist/components/p-D8yhjm54.js +1 -0
- package/dist/components/p-D9qp3o5Y.js +1 -0
- package/dist/components/{p-OO7xxhkC.js → p-DE8Ws9As.js} +1 -1
- package/dist/components/p-DMm_GeZC.js +1 -0
- package/dist/components/{p-idG6CMO0.js → p-DOfLrOEu.js} +1 -1
- package/dist/components/{p-R-Sdglj0.js → p-DSWD8udu.js} +1 -1
- package/dist/components/{p-Di1q4f5E.js → p-DWnuCSqC.js} +1 -1
- package/dist/components/p-DYjaQs6e.js +1 -0
- package/dist/components/{p-9Ap2W-Mi.js → p-DasiqnrU.js} +1 -1
- package/dist/components/{p-CErFctrV.js → p-Dc9g3-5z.js} +1 -1
- package/dist/components/{p-CFTyEfB9.js → p-DnlLqzGM.js} +1 -1
- package/dist/components/p-DsZwiWiU.js +1 -0
- package/dist/components/{p-DMoFncVl.js → p-FGII920I.js} +1 -1
- package/dist/components/p-Hjv7LqkN.js +1 -0
- package/dist/components/{p-BIEPMPWA.js → p-In6mljvA.js} +1 -1
- package/dist/components/p-OnBLxJAP.js +1 -0
- package/dist/components/p-SYnTIeiO.js +1 -0
- package/dist/{design-system/p-B91K50wC.js → components/p-bXzpfkfN.js} +1 -1
- package/dist/components/p-mcbwNjNT.js +1 -0
- package/dist/components/p-qZxAQy4p.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-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip-input.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-divider.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-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-time-picker-selector.d.ts +11 -0
- package/dist/components/sd-time-picker-selector.js +1 -0
- package/dist/components/sd-time-picker-trigger.d.ts +11 -0
- package/dist/components/sd-time-picker-trigger.js +1 -0
- package/dist/components/sd-time-picker.d.ts +11 -0
- package/dist/components/sd-time-picker.js +1 -0
- package/dist/components/sd-time-range-picker-selector.d.ts +11 -0
- package/dist/components/sd-time-range-picker-selector.js +1 -0
- package/dist/components/sd-time-range-picker.d.ts +11 -0
- package/dist/components/sd-time-range-picker.js +1 -0
- 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/design-system/design-system.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-b585f94b.entry.js → p-129b6330.entry.js} +1 -1
- package/dist/design-system/{p-adf2f398.entry.js → p-15f43b9b.entry.js} +1 -1
- package/dist/design-system/p-16b9eac4.entry.js +1 -0
- package/dist/design-system/{p-c1066f40.entry.js → p-1858636f.entry.js} +1 -1
- package/dist/design-system/{p-840006b1.entry.js → p-21672bb8.entry.js} +1 -1
- package/dist/design-system/{p-c7d2c195.entry.js → p-219288ef.entry.js} +1 -1
- package/dist/design-system/{p-c5cffcc6.entry.js → p-22ac9e05.entry.js} +1 -1
- package/dist/design-system/p-2534d3d4.entry.js +1 -0
- package/dist/design-system/{p-be54fd3a.entry.js → p-3859316f.entry.js} +1 -1
- package/dist/design-system/{p-53fe2741.entry.js → p-46da4e95.entry.js} +1 -1
- package/dist/design-system/{p-8de3b502.entry.js → p-46eb3421.entry.js} +1 -1
- package/dist/design-system/p-4782331f.entry.js +1 -0
- package/dist/design-system/{p-5a257ed9.entry.js → p-4a117dd6.entry.js} +1 -1
- package/dist/design-system/{p-55c0be7d.entry.js → p-4ae0a64a.entry.js} +1 -1
- package/dist/design-system/{p-246aafb9.entry.js → p-52b1be6f.entry.js} +1 -1
- package/dist/design-system/p-56e7c87b.entry.js +1 -0
- package/dist/design-system/{p-26a27312.entry.js → p-570b9e91.entry.js} +1 -1
- package/dist/design-system/p-5a113197.entry.js +1 -0
- package/dist/design-system/p-62ff77e4.entry.js +1 -0
- package/dist/design-system/{p-d204cac5.entry.js → p-655324cd.entry.js} +1 -1
- package/dist/design-system/p-66cff123.entry.js +1 -0
- package/dist/design-system/{p-0c1d1a15.entry.js → p-6c4fa9d7.entry.js} +1 -1
- package/dist/design-system/{p-8ed1d470.entry.js → p-809a0a71.entry.js} +1 -1
- package/dist/design-system/{p-ec4ad48c.entry.js → p-82cb62a9.entry.js} +1 -1
- package/dist/design-system/p-843d1a8a.entry.js +1 -0
- package/dist/design-system/{p-02f0b906.entry.js → p-8836d9ff.entry.js} +1 -1
- package/dist/design-system/{p-d2ce01ac.entry.js → p-8af8e302.entry.js} +1 -1
- package/dist/design-system/p-9c131122.entry.js +1 -0
- package/dist/design-system/{p-BPKiBSGr.js → p-BnUjeY2n.js} +1 -1
- package/dist/design-system/p-C599jhDs.js +2 -0
- package/dist/design-system/p-Cn8LZw1e.js +1 -0
- package/dist/design-system/p-DMm_GeZC.js +1 -0
- package/dist/design-system/p-Dz23PPdF.js +1 -0
- package/dist/design-system/p-a0c55a19.entry.js +1 -0
- package/dist/design-system/p-a6c292d1.entry.js +1 -0
- package/dist/design-system/p-a9cc4697.entry.js +1 -0
- package/dist/design-system/{p-3595cafb.entry.js → p-b2dc1202.entry.js} +1 -1
- package/dist/design-system/{p-86329ae3.entry.js → p-b5229957.entry.js} +1 -1
- package/dist/design-system/{p-a631cd78.entry.js → p-b75cc0dd.entry.js} +1 -1
- package/dist/design-system/p-b97a6cf3.entry.js +1 -0
- package/dist/design-system/{p-3cd2751a.entry.js → p-c1e625e5.entry.js} +1 -1
- package/dist/design-system/{p-1ed1bfa1.entry.js → p-c7f03dea.entry.js} +1 -1
- package/dist/design-system/p-cdb2433a.entry.js +1 -0
- package/dist/design-system/{p-d9f33192.entry.js → p-d5325895.entry.js} +1 -1
- package/dist/design-system/p-e0e4a451.entry.js +1 -0
- package/dist/design-system/p-e387ec65.entry.js +1 -0
- package/dist/design-system/{p-4c85f6f6.entry.js → p-efe3601d.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Dz490Ukt.js → index-C599jhDs.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 +3 -3
- package/dist/esm/sd-calendar_2.entry.js +8 -9
- package/dist/esm/sd-callout.entry.js +2 -2
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +5 -5
- package/dist/esm/sd-chip-input.entry.js +21 -16
- package/dist/esm/sd-chip.entry.js +7 -7
- package/dist/esm/sd-circle-progress.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/{component.datepicker-BOxGhKKP.js → sd-date-picker.config-CdXJcOGr.js} +65 -2
- package/dist/esm/sd-date-picker_8.entry.js +141 -51
- package/dist/esm/sd-date-range-picker-calendar.entry.js +158 -8
- package/dist/esm/sd-divider.entry.js +2 -2
- package/dist/esm/sd-dropdown-button.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +51 -52
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +14 -10
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-key-value-table.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/sd-pagination.entry.js +4 -4
- package/dist/esm/sd-popover.entry.js +134 -44
- package/dist/esm/sd-popup.entry.js +2 -2
- package/dist/esm/sd-radio-button.entry.js +3 -3
- package/dist/esm/sd-radio.entry.js +4 -2
- package/dist/esm/sd-select-list-item_4.entry.js +11 -11
- package/dist/esm/sd-switch.entry.js +13 -3
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +4 -4
- package/dist/esm/sd-time-picker-selector.entry.js +177 -0
- package/dist/esm/sd-time-picker-trigger.entry.js +73 -0
- package/dist/esm/sd-time-picker.config-DUq29Nhs.js +148 -0
- package/dist/esm/sd-time-picker.entry.js +171 -0
- package/dist/esm/sd-time-range-picker-selector.entry.js +217 -0
- package/dist/esm/sd-time-range-picker.entry.js +202 -0
- 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-CEHVt90h.js → tooltipArrow-DbLihSLI.js} +1 -1
- package/dist/esm/{useDatePicker-BG0lUGJG.js → useDatePicker-DQ5Kyy_D.js} +1 -1
- package/dist/types/components/sd-checkbox/sd-checkbox.d.ts +2 -2
- package/dist/types/components/sd-chip/sd-chip.d.ts +3 -3
- package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +4 -2
- package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +2 -0
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.d.ts +20 -0
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker.config.d.ts +25 -0
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +9 -0
- package/dist/types/components/sd-field/sd-field.d.ts +7 -0
- package/dist/types/components/sd-file-picker/sd-file-picker.config.d.ts +28 -0
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +3 -1
- package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +5 -0
- package/dist/types/components/sd-input/sd-input.d.ts +1 -1
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +8 -0
- package/dist/types/components/sd-popover/sd-popover.config.d.ts +22 -0
- package/dist/types/components/sd-popover/sd-popover.d.ts +29 -36
- package/dist/types/components/sd-radio/sd-radio.d.ts +3 -1
- package/dist/types/components/sd-radio-button/sd-radio-button.d.ts +2 -2
- package/dist/types/components/sd-radio-group/sd-radio-group.d.ts +2 -2
- package/dist/types/components/sd-switch/sd-switch.d.ts +8 -1
- package/dist/types/components/sd-tag/sd-tag.d.ts +2 -2
- package/dist/types/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.d.ts +35 -0
- package/dist/types/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.d.ts +21 -0
- package/dist/types/components/sd-time-picker/sd-time-picker.config.d.ts +71 -0
- package/dist/types/components/sd-time-picker/sd-time-picker.d.ts +84 -0
- package/dist/types/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.d.ts +40 -0
- package/dist/types/components/sd-time-range-picker/sd-time-range-picker.config.d.ts +9 -0
- package/dist/types/components/sd-time-range-picker/sd-time-range-picker.d.ts +88 -0
- package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +7 -22
- package/dist/types/components.d.ts +1268 -381
- package/hydrate/index.js +1975 -502
- package/hydrate/index.mjs +1975 -502
- package/package.json +1 -1
- package/dist/cjs/sd-date-picker.config-Chrd8c4v.js +0 -41
- package/dist/cjs/useDatePicker-CgpIfwLA.js +0 -103
- package/dist/components/p-BFVfSW9t.js +0 -1
- package/dist/components/p-BKu0I6Io.js +0 -1
- package/dist/components/p-B_Zwr4Et.js +0 -1
- package/dist/components/p-CBoDoYDO.js +0 -1
- package/dist/components/p-CYMMLsGt.js +0 -1
- package/dist/components/p-C_SG4M4z.js +0 -1
- package/dist/components/p-CgSXYw_0.js +0 -1
- package/dist/components/p-CmRF12Fy.js +0 -1
- package/dist/components/p-CnRfET5y.js +0 -1
- package/dist/components/p-Cvsrc0be.js +0 -1
- package/dist/components/p-DJ8z7_EG.js +0 -1
- package/dist/components/p-DJmxpVkK.js +0 -1
- package/dist/components/p-DN7MAx-q.js +0 -1
- package/dist/components/p-DS6NVBvu.js +0 -1
- package/dist/components/p-D_56BjcD.js +0 -1
- package/dist/components/p-Uh9emYrV.js +0 -1
- package/dist/components/p-f0aBxUBG.js +0 -1
- package/dist/design-system/p-0e014b76.entry.js +0 -1
- package/dist/design-system/p-1b5fcf7b.entry.js +0 -1
- package/dist/design-system/p-2a4d2ee0.entry.js +0 -1
- package/dist/design-system/p-2d6a7d7b.entry.js +0 -1
- package/dist/design-system/p-4b474538.entry.js +0 -1
- package/dist/design-system/p-BOxGhKKP.js +0 -1
- package/dist/design-system/p-BhcvMs8c.js +0 -1
- package/dist/design-system/p-Dz490Ukt.js +0 -2
- package/dist/design-system/p-cb6ab65c.entry.js +0 -1
- package/dist/design-system/p-d51f4170.entry.js +0 -1
- package/dist/design-system/p-e7740a5f.entry.js +0 -1
- package/dist/design-system/p-e85bf462.entry.js +0 -1
- package/dist/design-system/p-ea008087.entry.js +0 -1
- package/dist/design-system/p-f962e5d2.entry.js +0 -1
- package/dist/esm/sd-date-picker.config-krRuSUsA.js +0 -38
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Fragment } from "@stencil/core";
|
|
2
2
|
import { today, addDays } from "../../../utils/date";
|
|
3
3
|
import { useDatePicker } from "../../../modules/useDatePicker";
|
|
4
|
-
import { CALENDAR_LAYOUT, RANGE_LAYOUT, WEEK_LABELS } from "../sd-date-range-picker.config";
|
|
4
|
+
import { CALENDAR_LAYOUT, RANGE_LAYOUT, TIME_LAYOUT, WEEK_LABELS, } from "../sd-date-range-picker.config";
|
|
5
5
|
export class SdDateRangePickerCalendar {
|
|
6
6
|
/** 선택된 날짜 범위 [시작일, 종료일] */
|
|
7
7
|
value = null;
|
|
@@ -9,11 +9,20 @@ export class SdDateRangePickerCalendar {
|
|
|
9
9
|
selectable;
|
|
10
10
|
/** 최대 선택 가능 일 수 */
|
|
11
11
|
maxRange;
|
|
12
|
+
/** 시간(시:분) 선택 푸터 사용 여부 */
|
|
13
|
+
useTimePicker = false;
|
|
12
14
|
currentYear;
|
|
13
15
|
currentMonth;
|
|
14
16
|
pendingStart = '';
|
|
15
17
|
hoverDate = '';
|
|
16
18
|
displayValue = null;
|
|
19
|
+
// 시:분은 2자리 미만도 허용하기 위해 문자열로 관리하고 emit/blur 시 패딩한다
|
|
20
|
+
startHour = '00';
|
|
21
|
+
startMinute = '00';
|
|
22
|
+
endHour = '00';
|
|
23
|
+
endMinute = '00';
|
|
24
|
+
/** 직접 emit한 값이 value prop으로 되돌아오는 에코를 구분해 시간 입력 clobber를 막는다 */
|
|
25
|
+
lastEmitted = '';
|
|
17
26
|
/** 날짜 범위 선택 시 발생합니다. */
|
|
18
27
|
select;
|
|
19
28
|
/** 달력 뷰가 변경될 때 발생합니다. */
|
|
@@ -26,13 +35,31 @@ export class SdDateRangePickerCalendar {
|
|
|
26
35
|
this.syncFromValue();
|
|
27
36
|
}
|
|
28
37
|
syncFromValue() {
|
|
29
|
-
|
|
38
|
+
// 자신이 emit한 값이 그대로 돌아온 경우(에코)에는 시간 입력 상태를 건드리지 않는다
|
|
39
|
+
if (this.useTimePicker && JSON.stringify(this.value) === this.lastEmitted)
|
|
40
|
+
return;
|
|
41
|
+
const start = this.splitDateTime(this.value?.[0]);
|
|
42
|
+
const end = this.splitDateTime(this.value?.[1]);
|
|
43
|
+
const base = start.date || today;
|
|
30
44
|
const [year, month] = base.split('-').map(Number);
|
|
31
45
|
this.currentYear = year;
|
|
32
46
|
this.currentMonth = month;
|
|
33
47
|
this.pendingStart = '';
|
|
34
48
|
this.hoverDate = '';
|
|
35
|
-
|
|
49
|
+
// displayValue는 날짜 부분만 보관 — 캘린더 그리드 로직은 시간과 무관하게 동작한다
|
|
50
|
+
this.displayValue = this.value ? [start.date, end.date] : null;
|
|
51
|
+
this.startHour = start.hour;
|
|
52
|
+
this.startMinute = start.minute;
|
|
53
|
+
this.endHour = end.hour;
|
|
54
|
+
this.endMinute = end.minute;
|
|
55
|
+
}
|
|
56
|
+
/** "YYYY-MM-DD HH:mm" 또는 "YYYY-MM-DD"를 날짜/시/분으로 분리한다 */
|
|
57
|
+
splitDateTime(v) {
|
|
58
|
+
if (v == null || v === '')
|
|
59
|
+
return { date: '', hour: '00', minute: '00' };
|
|
60
|
+
const [date = '', time = ''] = v.split(' ');
|
|
61
|
+
const [hour = '00', minute = '00'] = time.split(':');
|
|
62
|
+
return { date, hour, minute };
|
|
36
63
|
}
|
|
37
64
|
get rightYear() {
|
|
38
65
|
return this.currentMonth === 12 ? this.currentYear + 1 : this.currentYear;
|
|
@@ -139,13 +166,69 @@ export class SdDateRangePickerCalendar {
|
|
|
139
166
|
this.pendingStart = cell.date;
|
|
140
167
|
this.displayValue = null;
|
|
141
168
|
this.hoverDate = '';
|
|
169
|
+
// 새 범위 선택을 시작하면 시작=00:00, 종료=23:59(하루 전체)로 초기화한다
|
|
170
|
+
if (this.useTimePicker) {
|
|
171
|
+
this.startHour = '00';
|
|
172
|
+
this.startMinute = '00';
|
|
173
|
+
this.endHour = '23';
|
|
174
|
+
this.endMinute = '59';
|
|
175
|
+
}
|
|
142
176
|
return;
|
|
143
177
|
}
|
|
144
178
|
const newRange = [this.pendingStart, cell.date];
|
|
145
179
|
this.pendingStart = '';
|
|
146
180
|
this.hoverDate = '';
|
|
147
181
|
this.displayValue = newRange;
|
|
148
|
-
this.
|
|
182
|
+
this.emitRange(newRange[0], newRange[1]);
|
|
183
|
+
}
|
|
184
|
+
/** 날짜 범위(+ useTimePicker면 시:분)를 결합해 sdSelect로 emit한다 */
|
|
185
|
+
emitRange(startDate, endDate) {
|
|
186
|
+
const range = this.useTimePicker
|
|
187
|
+
? [
|
|
188
|
+
`${startDate} ${this.pad(this.startHour)}:${this.pad(this.startMinute)}`,
|
|
189
|
+
`${endDate} ${this.pad(this.endHour)}:${this.pad(this.endMinute)}`,
|
|
190
|
+
]
|
|
191
|
+
: [startDate, endDate];
|
|
192
|
+
this.lastEmitted = JSON.stringify(range);
|
|
193
|
+
this.select.emit(range);
|
|
194
|
+
}
|
|
195
|
+
pad(v) {
|
|
196
|
+
return String(Number(v) || 0).padStart(2, '0');
|
|
197
|
+
}
|
|
198
|
+
/** 시:분 입력 — 숫자만/2자리로 제한하고 범위(시 0~23, 분 0~59)로 클램프한다 */
|
|
199
|
+
handleTimeInput(which, part, event) {
|
|
200
|
+
const input = event.target;
|
|
201
|
+
const digits = input.value.replace(/\D/g, '').slice(0, 2);
|
|
202
|
+
const max = part === 'h' ? 23 : 59;
|
|
203
|
+
const next = digits !== '' && Number(digits) > max ? String(max) : digits;
|
|
204
|
+
input.value = next;
|
|
205
|
+
this.setTimePart(which, part, next);
|
|
206
|
+
// 범위가 확정된 상태면 실시간으로 재emit한다
|
|
207
|
+
if (this.displayValue != null && this.displayValue[0] !== '' && this.displayValue[1] !== '') {
|
|
208
|
+
this.emitRange(this.displayValue[0], this.displayValue[1]);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
handleTimeBlur(which, part) {
|
|
212
|
+
this.setTimePart(which, part, this.pad(this.getTimePart(which, part)));
|
|
213
|
+
}
|
|
214
|
+
getTimePart(which, part) {
|
|
215
|
+
if (which === 'start')
|
|
216
|
+
return part === 'h' ? this.startHour : this.startMinute;
|
|
217
|
+
return part === 'h' ? this.endHour : this.endMinute;
|
|
218
|
+
}
|
|
219
|
+
setTimePart(which, part, value) {
|
|
220
|
+
if (which === 'start') {
|
|
221
|
+
if (part === 'h')
|
|
222
|
+
this.startHour = value;
|
|
223
|
+
else
|
|
224
|
+
this.startMinute = value;
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
if (part === 'h')
|
|
228
|
+
this.endHour = value;
|
|
229
|
+
else
|
|
230
|
+
this.endMinute = value;
|
|
231
|
+
}
|
|
149
232
|
}
|
|
150
233
|
handleDayHover(cell) {
|
|
151
234
|
if (!cell.inCurrentMonth)
|
|
@@ -211,6 +294,22 @@ export class SdDateRangePickerCalendar {
|
|
|
211
294
|
}, disabled: !cell.inCurrentMonth || isDisabled, tabindex: !cell.inCurrentMonth ? -1 : undefined, "aria-hidden": !cell.inCurrentMonth ? 'true' : undefined, onClick: () => this.handleDayClick(cell), onMouseEnter: () => this.handleDayHover(cell) }, h("span", { class: "sd-date-range-picker-calendar__day-circle" }, cell.inCurrentMonth ? cell.day : '')));
|
|
212
295
|
}))));
|
|
213
296
|
}
|
|
297
|
+
renderTimeSection(which, date, suffix) {
|
|
298
|
+
const active = date !== '';
|
|
299
|
+
const [year = '', month = '', day = ''] = active ? date.split('-') : [];
|
|
300
|
+
const hour = which === 'start' ? this.startHour : this.endHour;
|
|
301
|
+
const minute = which === 'start' ? this.startMinute : this.endMinute;
|
|
302
|
+
const renderNum = (n, strip) => (h("span", { class: "sd-date-range-picker-calendar__time-num" }, active && n !== '' ? (strip ? String(Number(n)) : n) : '-'));
|
|
303
|
+
return (h("div", { class: {
|
|
304
|
+
'sd-date-range-picker-calendar__time-section': true,
|
|
305
|
+
'sd-date-range-picker-calendar__time-section--active': active,
|
|
306
|
+
} }, h("div", { class: "sd-date-range-picker-calendar__time-date" }, renderNum(year, false), h("span", { class: "sd-date-range-picker-calendar__time-unit" }, "\uB144"), renderNum(month, true), h("span", { class: "sd-date-range-picker-calendar__time-unit" }, "\uC6D4"), renderNum(day, true), h("span", { class: "sd-date-range-picker-calendar__time-unit" }, "\uC77C")), h("div", { class: "sd-date-range-picker-calendar__time-input-group" }, h("input", { type: "text", inputMode: "numeric", maxLength: 2, class: "sd-date-range-picker-calendar__time-input", placeholder: "--", "aria-label": `${suffix} 시`, disabled: !active, value: active ? hour : '', onInput: e => this.handleTimeInput(which, 'h', e), onBlur: () => this.handleTimeBlur(which, 'h') }), h("span", { class: "sd-date-range-picker-calendar__time-colon" }, ":"), h("input", { type: "text", inputMode: "numeric", maxLength: 2, class: "sd-date-range-picker-calendar__time-input", placeholder: "--", "aria-label": `${suffix} 분`, disabled: !active, value: active ? minute : '', onInput: e => this.handleTimeInput(which, 'm', e), onBlur: () => this.handleTimeBlur(which, 'm') })), h("span", { class: "sd-date-range-picker-calendar__time-suffix" }, suffix)));
|
|
307
|
+
}
|
|
308
|
+
renderTimeFooter() {
|
|
309
|
+
const startDate = this.pendingStart || this.displayValue?.[0] || '';
|
|
310
|
+
const endDate = this.displayValue?.[1] || '';
|
|
311
|
+
return (h(Fragment, null, h("span", { class: "sd-date-range-picker-calendar__time-divider", "aria-hidden": "true" }), h("div", { class: "sd-date-range-picker-calendar__time" }, this.renderTimeSection('start', startDate, '부터'), this.renderTimeSection('end', endDate, '까지'))));
|
|
312
|
+
}
|
|
214
313
|
render() {
|
|
215
314
|
const cssVars = {
|
|
216
315
|
'--calendar-bg': CALENDAR_LAYOUT.bg,
|
|
@@ -243,8 +342,31 @@ export class SdDateRangePickerCalendar {
|
|
|
243
342
|
'--range-height': `${RANGE_LAYOUT.height}px`,
|
|
244
343
|
'--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
|
|
245
344
|
'--range-divider': RANGE_LAYOUT.divider,
|
|
345
|
+
'--time-bg-default': TIME_LAYOUT.bgDefault,
|
|
346
|
+
'--time-bg-selected': TIME_LAYOUT.bgSelected,
|
|
347
|
+
'--time-date-label': TIME_LAYOUT.dateLabel,
|
|
348
|
+
'--time-date-unit': TIME_LAYOUT.dateUnit,
|
|
349
|
+
'--time-date-gap': `${TIME_LAYOUT.dateGap}px`,
|
|
350
|
+
'--time-radius': `${TIME_LAYOUT.radius}px`,
|
|
351
|
+
'--time-padding-x': `${TIME_LAYOUT.paddingX}px`,
|
|
352
|
+
'--time-padding-y': `${TIME_LAYOUT.paddingY}px`,
|
|
353
|
+
'--time-gap': `${TIME_LAYOUT.gap}px`,
|
|
354
|
+
'--time-section-gap': `${TIME_LAYOUT.sectionGap}px`,
|
|
355
|
+
'--time-unit-gap': `${TIME_LAYOUT.unitGap}px`,
|
|
356
|
+
'--time-font-size': `${TIME_LAYOUT.fontSize}px`,
|
|
357
|
+
'--time-line-height': `${TIME_LAYOUT.lineHeight}px`,
|
|
358
|
+
'--time-font-weight': TIME_LAYOUT.fontWeight,
|
|
359
|
+
'--time-input-height': `${TIME_LAYOUT.input.height}px`,
|
|
360
|
+
'--time-input-radius': `${TIME_LAYOUT.input.radius}px`,
|
|
361
|
+
'--time-input-border': TIME_LAYOUT.input.border,
|
|
362
|
+
'--time-input-border-focus': TIME_LAYOUT.input.borderFocus,
|
|
363
|
+
'--time-input-text': TIME_LAYOUT.input.text,
|
|
364
|
+
'--time-input-placeholder': TIME_LAYOUT.input.placeholder,
|
|
246
365
|
};
|
|
247
|
-
return (h(Fragment, { key: '
|
|
366
|
+
return (h(Fragment, { key: '7d368d23f2c9d2b28c847a7fee5de474edc350f0' }, h("div", { key: '6d97bfa728eb65c46d21f53c3b046b1a0c7d2ff6', class: {
|
|
367
|
+
'sd-date-range-picker-calendar': true,
|
|
368
|
+
'sd-date-range-picker-calendar--with-time': this.useTimePicker,
|
|
369
|
+
}, style: cssVars }, this.renderYearNav(), h("div", { key: '45b4a2488f6e73814d3a6be9710d7c14fd2e8130', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: 'f1d741f8684ca213d30f559e7f6fc5a4388bbac1', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)), this.useTimePicker && this.renderTimeFooter())));
|
|
248
370
|
}
|
|
249
371
|
static get is() { return "sd-date-range-picker-calendar"; }
|
|
250
372
|
static get originalStyleUrls() {
|
|
@@ -312,6 +434,26 @@ export class SdDateRangePickerCalendar {
|
|
|
312
434
|
"setter": false,
|
|
313
435
|
"reflect": false,
|
|
314
436
|
"attribute": "max-range"
|
|
437
|
+
},
|
|
438
|
+
"useTimePicker": {
|
|
439
|
+
"type": "boolean",
|
|
440
|
+
"mutable": false,
|
|
441
|
+
"complexType": {
|
|
442
|
+
"original": "boolean",
|
|
443
|
+
"resolved": "boolean",
|
|
444
|
+
"references": {}
|
|
445
|
+
},
|
|
446
|
+
"required": false,
|
|
447
|
+
"optional": false,
|
|
448
|
+
"docs": {
|
|
449
|
+
"tags": [],
|
|
450
|
+
"text": "\uC2DC\uAC04(\uC2DC:\uBD84) \uC120\uD0DD \uD478\uD130 \uC0AC\uC6A9 \uC5EC\uBD80"
|
|
451
|
+
},
|
|
452
|
+
"getter": false,
|
|
453
|
+
"setter": false,
|
|
454
|
+
"reflect": false,
|
|
455
|
+
"attribute": "use-time-picker",
|
|
456
|
+
"defaultValue": "false"
|
|
315
457
|
}
|
|
316
458
|
};
|
|
317
459
|
}
|
|
@@ -321,7 +463,11 @@ export class SdDateRangePickerCalendar {
|
|
|
321
463
|
"currentMonth": {},
|
|
322
464
|
"pendingStart": {},
|
|
323
465
|
"hoverDate": {},
|
|
324
|
-
"displayValue": {}
|
|
466
|
+
"displayValue": {},
|
|
467
|
+
"startHour": {},
|
|
468
|
+
"startMinute": {},
|
|
469
|
+
"endHour": {},
|
|
470
|
+
"endMinute": {}
|
|
325
471
|
};
|
|
326
472
|
}
|
|
327
473
|
static get events() {
|
|
@@ -8,3 +8,30 @@ export const RANGE_LAYOUT = {
|
|
|
8
8
|
panelGap: datepickerTokens.datepicker.calendar.range.panelGap,
|
|
9
9
|
divider: datepickerTokens.datepicker.calendar.range.divider,
|
|
10
10
|
};
|
|
11
|
+
const timeTokens = datepickerTokens.datepicker.calendar.time;
|
|
12
|
+
/** 시간(시:분) 선택 푸터 레이아웃 토큰 */
|
|
13
|
+
export const TIME_LAYOUT = {
|
|
14
|
+
bgDefault: timeTokens.bg.default,
|
|
15
|
+
bgSelected: timeTokens.bg.selected,
|
|
16
|
+
dateLabel: timeTokens.date.label,
|
|
17
|
+
dateUnit: timeTokens.date.unit,
|
|
18
|
+
dateGap: timeTokens.date.gap,
|
|
19
|
+
radius: timeTokens.radius,
|
|
20
|
+
paddingX: timeTokens.paddingX,
|
|
21
|
+
paddingY: timeTokens.paddingY,
|
|
22
|
+
gap: timeTokens.gap,
|
|
23
|
+
sectionGap: timeTokens.section.gap,
|
|
24
|
+
unitGap: timeTokens.unit.gap,
|
|
25
|
+
fontSize: timeTokens.typography.fontSize,
|
|
26
|
+
lineHeight: timeTokens.typography.lineHeight,
|
|
27
|
+
fontWeight: timeTokens.typography.fontWeight,
|
|
28
|
+
// 시:분 입력 박스는 datepicker 필드(sm) 토큰을 재사용한다
|
|
29
|
+
input: {
|
|
30
|
+
height: DATEPICKER_SIZE_MAP.sm.height,
|
|
31
|
+
radius: DATEPICKER_SIZE_MAP.sm.radius,
|
|
32
|
+
border: DATEPICKER_COLORS.border.default,
|
|
33
|
+
borderFocus: DATEPICKER_COLORS.border.focus,
|
|
34
|
+
text: DATEPICKER_COLORS.text.default,
|
|
35
|
+
placeholder: DATEPICKER_COLORS.text.disabled,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -14,6 +14,11 @@ export class SdDateRangePicker {
|
|
|
14
14
|
selectable;
|
|
15
15
|
/** 최대 선택 가능한 날짜 범위 (일 단위) */
|
|
16
16
|
maxRange;
|
|
17
|
+
/**
|
|
18
|
+
* 시간(시:분) 선택 푸터 사용 여부.
|
|
19
|
+
* true이면 value는 "YYYY-MM-DD HH:mm" 형식이 되고, 캘린더 하단에 시작·종료 시간 입력이 표시됩니다.
|
|
20
|
+
*/
|
|
21
|
+
useTimePicker = false;
|
|
17
22
|
/** 비활성 상태 여부 */
|
|
18
23
|
disabled = false;
|
|
19
24
|
/** 필드 너비 (숫자면 px, 문자열이면 그대로 적용) */
|
|
@@ -35,6 +40,8 @@ export class SdDateRangePicker {
|
|
|
35
40
|
rules = [];
|
|
36
41
|
/** 에러 상태 여부 */
|
|
37
42
|
error = false;
|
|
43
|
+
/** 필드 상태 (없으면 error/rules 결과로 자동 결정) */
|
|
44
|
+
status;
|
|
38
45
|
/** 레이블 영역 아이콘 */
|
|
39
46
|
icon = undefined;
|
|
40
47
|
/** 레이블 툴팁 텍스트 */
|
|
@@ -94,7 +101,9 @@ export class SdDateRangePicker {
|
|
|
94
101
|
}
|
|
95
102
|
};
|
|
96
103
|
handleSelect = (e) => {
|
|
97
|
-
|
|
104
|
+
// 시간 선택 모드에서는 사용자가 시:분을 조정할 수 있도록 드롭다운을 닫지 않고 실시간 반영만 한다
|
|
105
|
+
if (!this.useTimePicker)
|
|
106
|
+
this.closeDropdown();
|
|
98
107
|
this.value = e.detail;
|
|
99
108
|
const nextValue = this.value;
|
|
100
109
|
requestAnimationFrame(() => {
|
|
@@ -109,6 +118,14 @@ export class SdDateRangePicker {
|
|
|
109
118
|
return '';
|
|
110
119
|
return `${this.value[0]} ~ ${this.value[1]}`;
|
|
111
120
|
}
|
|
121
|
+
static DEFAULT_PLACEHOLDER = 'YYYY-MM-DD ~ YYYY-MM-DD';
|
|
122
|
+
get resolvedPlaceholder() {
|
|
123
|
+
// placeholder를 따로 지정하지 않았고 시간 선택 모드이면 시:분을 포함한 기본 placeholder를 쓴다
|
|
124
|
+
if (this.useTimePicker && this.placeholder === SdDateRangePicker.DEFAULT_PLACEHOLDER) {
|
|
125
|
+
return 'YYYY-MM-DD HH:mm ~ YYYY-MM-DD HH:mm';
|
|
126
|
+
}
|
|
127
|
+
return this.placeholder;
|
|
128
|
+
}
|
|
112
129
|
disconnectedCallback() {
|
|
113
130
|
if (this.closeAnimationTimer)
|
|
114
131
|
clearTimeout(this.closeAnimationTimer);
|
|
@@ -122,9 +139,9 @@ export class SdDateRangePicker {
|
|
|
122
139
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
123
140
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
124
141
|
};
|
|
125
|
-
return (h("sd-field", { key: '
|
|
142
|
+
return (h("sd-field", { key: '01098a74a5066d2328409dcdf21bb38691adf455', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, status: this.status, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'dab4a666f5c144bbcbf3848528ce246c752ab906', class: "sd-date-range-picker", ref: el => {
|
|
126
143
|
this.triggerRef = el;
|
|
127
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
144
|
+
} }, h("sd-date-picker-trigger", { key: '5aa378df1b53a2b8cc29e159e7bda0544210a81e', displayText: this.displayText, placeholder: this.resolvedPlaceholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '8d18658004dc009d869804bdabd31155117edde3', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-range-picker-calendar", { key: '0bf96efeed4c567052e690a83a70f27df85ccc64', value: this.value, selectable: this.selectable, maxRange: this.maxRange, useTimePicker: this.useTimePicker, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
128
145
|
}
|
|
129
146
|
static get is() { return "sd-date-range-picker"; }
|
|
130
147
|
static get originalStyleUrls() {
|
|
@@ -246,6 +263,26 @@ export class SdDateRangePicker {
|
|
|
246
263
|
"reflect": false,
|
|
247
264
|
"attribute": "max-range"
|
|
248
265
|
},
|
|
266
|
+
"useTimePicker": {
|
|
267
|
+
"type": "boolean",
|
|
268
|
+
"mutable": false,
|
|
269
|
+
"complexType": {
|
|
270
|
+
"original": "boolean",
|
|
271
|
+
"resolved": "boolean",
|
|
272
|
+
"references": {}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": false,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": "\uC2DC\uAC04(\uC2DC:\uBD84) \uC120\uD0DD \uD478\uD130 \uC0AC\uC6A9 \uC5EC\uBD80.\ntrue\uC774\uBA74 value\uB294 \"YYYY-MM-DD HH:mm\" \uD615\uC2DD\uC774 \uB418\uACE0, \uCE98\uB9B0\uB354 \uD558\uB2E8\uC5D0 \uC2DC\uC791\u00B7\uC885\uB8CC \uC2DC\uAC04 \uC785\uB825\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4."
|
|
279
|
+
},
|
|
280
|
+
"getter": false,
|
|
281
|
+
"setter": false,
|
|
282
|
+
"reflect": false,
|
|
283
|
+
"attribute": "use-time-picker",
|
|
284
|
+
"defaultValue": "false"
|
|
285
|
+
},
|
|
249
286
|
"disabled": {
|
|
250
287
|
"type": "boolean",
|
|
251
288
|
"mutable": false,
|
|
@@ -458,6 +495,25 @@ export class SdDateRangePicker {
|
|
|
458
495
|
"attribute": "error",
|
|
459
496
|
"defaultValue": "false"
|
|
460
497
|
},
|
|
498
|
+
"status": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"mutable": false,
|
|
501
|
+
"complexType": {
|
|
502
|
+
"original": "'default' | 'pass' | 'error'",
|
|
503
|
+
"resolved": "\"default\" | \"error\" | \"pass\" | undefined",
|
|
504
|
+
"references": {}
|
|
505
|
+
},
|
|
506
|
+
"required": false,
|
|
507
|
+
"optional": true,
|
|
508
|
+
"docs": {
|
|
509
|
+
"tags": [],
|
|
510
|
+
"text": "\uD544\uB4DC \uC0C1\uD0DC (\uC5C6\uC73C\uBA74 error/rules \uACB0\uACFC\uB85C \uC790\uB3D9 \uACB0\uC815)"
|
|
511
|
+
},
|
|
512
|
+
"getter": false,
|
|
513
|
+
"setter": false,
|
|
514
|
+
"reflect": false,
|
|
515
|
+
"attribute": "status"
|
|
516
|
+
},
|
|
461
517
|
"icon": {
|
|
462
518
|
"type": "unknown",
|
|
463
519
|
"mutable": false,
|
|
@@ -7,7 +7,7 @@ export class SdDivider {
|
|
|
7
7
|
const hostStyle = {
|
|
8
8
|
'--sd-divider-color': DIVIDER_COLORS.default,
|
|
9
9
|
};
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '5e25f94dbe34f19280f6952e0a1bfbf4e4816264', style: hostStyle }, h("hr", { key: 'a47f51ba0dfc15819cd5cda169554433b978eb15', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "sd-divider"; }
|
|
13
13
|
static get originalStyleUrls() {
|
|
@@ -73,6 +73,10 @@ sd-field .sd-field--has-addon .sd-field__control .sd-field__addon {
|
|
|
73
73
|
border-right: var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);
|
|
74
74
|
border-radius: calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px);
|
|
75
75
|
}
|
|
76
|
+
sd-field .sd-field--multiline .sd-field__wrapper .sd-field__control {
|
|
77
|
+
height: auto;
|
|
78
|
+
min-height: var(--sd-field-wrapper-height);
|
|
79
|
+
}
|
|
76
80
|
sd-field .sd-field__wrapper {
|
|
77
81
|
width: 100%;
|
|
78
82
|
display: flex;
|
|
@@ -10,6 +10,8 @@ const FORM_PARENT_TAGS = [
|
|
|
10
10
|
'sd-file-picker',
|
|
11
11
|
'sd-date-picker',
|
|
12
12
|
'sd-date-range-picker',
|
|
13
|
+
'sd-time-picker',
|
|
14
|
+
'sd-time-range-picker',
|
|
13
15
|
'sd-chip-input',
|
|
14
16
|
];
|
|
15
17
|
export class SdField {
|
|
@@ -48,6 +50,13 @@ export class SdField {
|
|
|
48
50
|
label = '';
|
|
49
51
|
/** 레이블 너비 */
|
|
50
52
|
labelWidth = '';
|
|
53
|
+
/**
|
|
54
|
+
* 레이블 박스 높이 (숫자면 px). 미지정 시 size별 기본값 사용.
|
|
55
|
+
* multiline 등 컨트롤 박스가 커질 때 레이블을 첫 행에 맞추기 위해 사용한다.
|
|
56
|
+
*/
|
|
57
|
+
labelHeight;
|
|
58
|
+
/** 멀티라인 컨트롤 — 컨트롤 높이를 고정하지 않고 min-height만 적용한다. */
|
|
59
|
+
multiline = false;
|
|
51
60
|
/** 필드 우측 어드온 레이블 */
|
|
52
61
|
addonLabel = '';
|
|
53
62
|
/** 어드온 정렬 방향 */
|
|
@@ -178,7 +187,11 @@ export class SdField {
|
|
|
178
187
|
};
|
|
179
188
|
const labelCssVars = this.label !== ''
|
|
180
189
|
? {
|
|
181
|
-
'--sd-field-label-height':
|
|
190
|
+
'--sd-field-label-height': this.labelHeight !== undefined && this.labelHeight !== '' && this.labelHeight !== 0
|
|
191
|
+
? typeof this.labelHeight === 'number'
|
|
192
|
+
? `${this.labelHeight}px`
|
|
193
|
+
: this.labelHeight
|
|
194
|
+
: `${labelTokens.height}px`,
|
|
182
195
|
'--sd-field-label-gap': `${labelTokens.gap}px`,
|
|
183
196
|
'--sd-field-label-font-size': `${labelTokens.fontSize}px`,
|
|
184
197
|
'--sd-field-label-line-height': `${labelTokens.lineHeight}px`,
|
|
@@ -210,19 +223,20 @@ export class SdField {
|
|
|
210
223
|
: {}),
|
|
211
224
|
}
|
|
212
225
|
: {};
|
|
213
|
-
return (h("div", { key: '
|
|
226
|
+
return (h("div", { key: 'd29e49fe9ecf467f0c1ed443524fac2648dc9da4', class: {
|
|
214
227
|
'sd-field': true,
|
|
215
228
|
'sd-field--has-label': this.label !== '',
|
|
216
229
|
'sd-field--has-addon': addon !== '',
|
|
230
|
+
'sd-field--multiline': this.multiline,
|
|
217
231
|
'sd-field--borderless': this.borderless,
|
|
218
232
|
[this.fieldStatus]: this.fieldStatus !== '',
|
|
219
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, h("div", { key: '
|
|
233
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars, ...messageCssVars } }, h("div", { key: '396173067f4a8ce38ea8ea9f5a6b9d76303b16fa', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: '3e4aab5e10cf52f116aabfe1a8d36a806eb03af4', class: "sd-field__main" }, h("div", { key: 'edbe4443387935e2b51469339284024429f1f0d3', class: {
|
|
220
234
|
'sd-field__control': true,
|
|
221
235
|
'sd-field__control--has-addon': addon !== '',
|
|
222
236
|
}, style: this.width !== '' && this.width !== 0
|
|
223
237
|
? { width: typeof this.width === 'number' ? `${this.width}px` : this.width }
|
|
224
|
-
: {} }, addon && (h("div", { key: '
|
|
225
|
-
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate })), addon)), h("slot", { key: '
|
|
238
|
+
: {} }, addon && (h("div", { key: '7ac28abf5f37b7ada42b16f81227afb5c7f8d656', class: "sd-field__addon" }, this.icon && (h("sd-icon", { key: 'd995424c6f620b090006cdbcf8645d2ff822e802', name: this.icon.name, size: this.icon.size ??
|
|
239
|
+
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate })), addon)), h("slot", { key: 'd105a65b5c926b5db9dd1d68239c0a2015739aba' })), this.errorMsg !== '' || this.errorMessage !== '' ? (h("div", { class: "sd-field__error-message" }, this.errorMsg !== '' ? this.errorMsg : this.errorMessage)) : (this.hint !== '' && h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
226
240
|
}
|
|
227
241
|
renderLabel(label) {
|
|
228
242
|
if (label == null || label === '')
|
|
@@ -554,6 +568,45 @@ export class SdField {
|
|
|
554
568
|
"attribute": "label-width",
|
|
555
569
|
"defaultValue": "''"
|
|
556
570
|
},
|
|
571
|
+
"labelHeight": {
|
|
572
|
+
"type": "any",
|
|
573
|
+
"mutable": false,
|
|
574
|
+
"complexType": {
|
|
575
|
+
"original": "number | string",
|
|
576
|
+
"resolved": "number | string | undefined",
|
|
577
|
+
"references": {}
|
|
578
|
+
},
|
|
579
|
+
"required": false,
|
|
580
|
+
"optional": true,
|
|
581
|
+
"docs": {
|
|
582
|
+
"tags": [],
|
|
583
|
+
"text": "\uB808\uC774\uBE14 \uBC15\uC2A4 \uB192\uC774 (\uC22B\uC790\uBA74 px). \uBBF8\uC9C0\uC815 \uC2DC size\uBCC4 \uAE30\uBCF8\uAC12 \uC0AC\uC6A9.\nmultiline \uB4F1 \uCEE8\uD2B8\uB864 \uBC15\uC2A4\uAC00 \uCEE4\uC9C8 \uB54C \uB808\uC774\uBE14\uC744 \uCCAB \uD589\uC5D0 \uB9DE\uCD94\uAE30 \uC704\uD574 \uC0AC\uC6A9\uD55C\uB2E4."
|
|
584
|
+
},
|
|
585
|
+
"getter": false,
|
|
586
|
+
"setter": false,
|
|
587
|
+
"reflect": false,
|
|
588
|
+
"attribute": "label-height"
|
|
589
|
+
},
|
|
590
|
+
"multiline": {
|
|
591
|
+
"type": "boolean",
|
|
592
|
+
"mutable": false,
|
|
593
|
+
"complexType": {
|
|
594
|
+
"original": "boolean",
|
|
595
|
+
"resolved": "boolean",
|
|
596
|
+
"references": {}
|
|
597
|
+
},
|
|
598
|
+
"required": false,
|
|
599
|
+
"optional": false,
|
|
600
|
+
"docs": {
|
|
601
|
+
"tags": [],
|
|
602
|
+
"text": "\uBA40\uD2F0\uB77C\uC778 \uCEE8\uD2B8\uB864 \u2014 \uCEE8\uD2B8\uB864 \uB192\uC774\uB97C \uACE0\uC815\uD558\uC9C0 \uC54A\uACE0 min-height\uB9CC \uC801\uC6A9\uD55C\uB2E4."
|
|
603
|
+
},
|
|
604
|
+
"getter": false,
|
|
605
|
+
"setter": false,
|
|
606
|
+
"reflect": false,
|
|
607
|
+
"attribute": "multiline",
|
|
608
|
+
"defaultValue": "false"
|
|
609
|
+
},
|
|
557
610
|
"addonLabel": {
|
|
558
611
|
"type": "string",
|
|
559
612
|
"mutable": false,
|
|
@@ -2,17 +2,24 @@ import filePickerTokens from "../../tokens/generated/component.filepicker.json";
|
|
|
2
2
|
import fieldTokens from "../../tokens/generated/component.field.json";
|
|
3
3
|
import listBoxTokens from "../../tokens/generated/component.listBox.json";
|
|
4
4
|
const fp = filePickerTokens.filepicker;
|
|
5
|
-
|
|
6
|
-
height: fp.
|
|
7
|
-
paddingX: fp.
|
|
8
|
-
gap: fp.
|
|
9
|
-
radius: fp.
|
|
10
|
-
borderWidth: fp.
|
|
11
|
-
fontSize: fp.
|
|
12
|
-
lineHeight: fp.
|
|
13
|
-
fontWeight: fp.
|
|
14
|
-
iconSize: fp.
|
|
5
|
+
const buildLayout = (s) => ({
|
|
6
|
+
height: fp[s].height,
|
|
7
|
+
paddingX: fp[s].paddingX,
|
|
8
|
+
gap: fp[s].gap,
|
|
9
|
+
radius: fp[s].radius,
|
|
10
|
+
borderWidth: fp[s].borderWidth,
|
|
11
|
+
fontSize: fp[s].typography.fontSize,
|
|
12
|
+
lineHeight: fp[s].typography.lineHeight,
|
|
13
|
+
fontWeight: fp[s].typography.fontWeight,
|
|
14
|
+
iconSize: fp[s].icon,
|
|
15
15
|
contentsGap: fieldTokens.field.contents.gap,
|
|
16
|
+
});
|
|
17
|
+
/** 기본(sm) 레이아웃 — 하위호환용 단일 export */
|
|
18
|
+
export const FILE_PICKER_LAYOUT = buildLayout('sm');
|
|
19
|
+
/** size별 레이아웃 맵 */
|
|
20
|
+
export const FILE_PICKER_LAYOUTS = {
|
|
21
|
+
sm: FILE_PICKER_LAYOUT,
|
|
22
|
+
md: buildLayout('md'),
|
|
16
23
|
};
|
|
17
24
|
export const FILE_PICKER_COLORS = {
|
|
18
25
|
border: fp.border,
|