@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
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-C599jhDs.js';
|
|
2
|
+
import { p as parseTimeValue, c as clampTimePart, f as formatTimeValue, d as TIMEPICKER_SELECTOR } from './sd-time-picker.config-DUq29Nhs.js';
|
|
3
|
+
import './component.field-DjKOoQuF.js';
|
|
4
|
+
|
|
5
|
+
const sdTimePickerSelectorCss = () => `sd-time-picker-selector{display:block}sd-time-picker-selector .sd-time-picker-selector{display:flex;flex-direction:column;align-items:stretch;justify-content:center;overflow:hidden;background:var(--selector-bg);border-radius:var(--selector-radius);box-shadow:4px 8px 16px -4px rgba(34, 34, 34, 0.1), 0 0 24px -6px rgba(34, 34, 34, 0.12)}sd-time-picker-selector .sd-time-picker-selector__meridiem{display:flex;align-items:center;justify-content:center;padding:var(--selector-section-padding-y) var(--selector-section-padding-x);background:var(--selector-bg)}sd-time-picker-selector .sd-time-picker-selector__meridiem-group{display:flex;isolation:isolate}sd-time-picker-selector .sd-time-picker-selector__meridiem-button{width:61px;height:28px;border:1px solid #ccc;background:#fff;color:#555;font-size:12px;line-height:20px;font-weight:500;cursor:pointer}sd-time-picker-selector .sd-time-picker-selector__meridiem-button--first{border-radius:4px 0 0 4px;margin-right:-1px}sd-time-picker-selector .sd-time-picker-selector__meridiem-button--end{border-radius:0 4px 4px 0}sd-time-picker-selector .sd-time-picker-selector__meridiem-button--selected{z-index:1;border-color:#0075ff;color:#0075ff}sd-time-picker-selector .sd-time-picker-selector__divider{height:1px;width:100%;background:#e1e1e1}sd-time-picker-selector .sd-time-picker-selector__time{display:flex;align-items:center;justify-content:center;gap:var(--selector-time-gap);padding:var(--selector-section-padding-y) var(--selector-section-padding-x);background:var(--selector-bg)}sd-time-picker-selector .sd-time-picker-selector__column{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--selector-time-column-gap)}sd-time-picker-selector .sd-time-picker-selector__input{width:var(--selector-input-width);height:28px;box-sizing:border-box;border:1px solid #aaa;border-radius:4px;background:#fff;color:#222;font-size:12px;line-height:20px;text-align:center;outline:none}sd-time-picker-selector .sd-time-picker-selector__colon{width:var(--selector-colon-size);color:#555;font-size:16px;line-height:16px;text-align:center}`;
|
|
6
|
+
|
|
7
|
+
const SdTimePickerSelector = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.update = createEvent(this, "sdUpdate", 7);
|
|
11
|
+
}
|
|
12
|
+
/** 선택된 시간 (HH:mm) */
|
|
13
|
+
value = null;
|
|
14
|
+
/** 오전/오후 선택 표시 여부 */
|
|
15
|
+
useMeridiem = true;
|
|
16
|
+
/** 분 증감 단위 */
|
|
17
|
+
minuteStep = 1;
|
|
18
|
+
/** 시간 변경 시 발생합니다. */
|
|
19
|
+
update;
|
|
20
|
+
valueChanged() {
|
|
21
|
+
this.syncFromValue();
|
|
22
|
+
}
|
|
23
|
+
editingPart = null;
|
|
24
|
+
inputDraft = {};
|
|
25
|
+
hour = 0;
|
|
26
|
+
minute = 0;
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
this.syncFromValue();
|
|
29
|
+
}
|
|
30
|
+
syncFromValue() {
|
|
31
|
+
const parsed = parseTimeValue(this.value);
|
|
32
|
+
this.hour = parsed.hour;
|
|
33
|
+
this.minute = parsed.minute;
|
|
34
|
+
}
|
|
35
|
+
get meridiem() {
|
|
36
|
+
return this.hour >= 12 ? 'PM' : 'AM';
|
|
37
|
+
}
|
|
38
|
+
get displayHour() {
|
|
39
|
+
if (!this.useMeridiem)
|
|
40
|
+
return this.hour;
|
|
41
|
+
const hour = this.hour % 12;
|
|
42
|
+
return hour === 0 ? 12 : hour;
|
|
43
|
+
}
|
|
44
|
+
emitNext(hour, minute) {
|
|
45
|
+
this.hour = clampTimePart(hour, 0, 23);
|
|
46
|
+
this.minute = clampTimePart(minute, 0, 59);
|
|
47
|
+
this.update.emit(formatTimeValue(this.hour, this.minute));
|
|
48
|
+
}
|
|
49
|
+
sanitizeInput(value) {
|
|
50
|
+
return value.replace(/\D/g, '').slice(0, 2);
|
|
51
|
+
}
|
|
52
|
+
setDraft(part, value) {
|
|
53
|
+
this.inputDraft = { ...this.inputDraft, [part]: value };
|
|
54
|
+
}
|
|
55
|
+
beginEdit(part, value) {
|
|
56
|
+
this.editingPart = part;
|
|
57
|
+
this.setDraft(part, String(value).padStart(2, '0'));
|
|
58
|
+
}
|
|
59
|
+
commitHourDraft(draft) {
|
|
60
|
+
const raw = clampTimePart(Number(draft), this.useMeridiem ? 1 : 0, this.useMeridiem ? 12 : 23);
|
|
61
|
+
const nextHour = this.useMeridiem
|
|
62
|
+
? this.meridiem === 'PM'
|
|
63
|
+
? raw === 12
|
|
64
|
+
? 12
|
|
65
|
+
: raw + 12
|
|
66
|
+
: raw === 12
|
|
67
|
+
? 0
|
|
68
|
+
: raw
|
|
69
|
+
: raw;
|
|
70
|
+
this.emitNext(nextHour, this.minute);
|
|
71
|
+
return raw;
|
|
72
|
+
}
|
|
73
|
+
commitMinuteDraft(draft) {
|
|
74
|
+
const minute = clampTimePart(Number(draft), 0, 59);
|
|
75
|
+
this.emitNext(this.hour, minute);
|
|
76
|
+
return minute;
|
|
77
|
+
}
|
|
78
|
+
endEdit(part) {
|
|
79
|
+
const draft = this.inputDraft[part];
|
|
80
|
+
if (part === 'hour' && draft != null && draft !== '') {
|
|
81
|
+
this.commitHourDraft(draft);
|
|
82
|
+
}
|
|
83
|
+
if (part === 'minute' && draft != null && draft !== '') {
|
|
84
|
+
this.commitMinuteDraft(draft);
|
|
85
|
+
}
|
|
86
|
+
this.editingPart = null;
|
|
87
|
+
this.inputDraft = {};
|
|
88
|
+
}
|
|
89
|
+
setMeridiem(meridiem) {
|
|
90
|
+
if (meridiem === this.meridiem)
|
|
91
|
+
return;
|
|
92
|
+
if (meridiem === 'AM') {
|
|
93
|
+
this.emitNext(this.hour - 12, this.minute);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.emitNext(this.hour + 12, this.minute);
|
|
97
|
+
}
|
|
98
|
+
changeHour(delta) {
|
|
99
|
+
this.emitNext((this.hour + delta + 24) % 24, this.minute);
|
|
100
|
+
}
|
|
101
|
+
changeMinute(delta) {
|
|
102
|
+
const next = this.minute + delta;
|
|
103
|
+
if (next > 59) {
|
|
104
|
+
this.emitNext((this.hour + 1) % 24, next - 60);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (next < 0) {
|
|
108
|
+
this.emitNext((this.hour + 23) % 24, next + 60);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.emitNext(this.hour, next);
|
|
112
|
+
}
|
|
113
|
+
handleHourInput = (event) => {
|
|
114
|
+
const target = event.target;
|
|
115
|
+
const draft = this.sanitizeInput(target.value);
|
|
116
|
+
target.value = draft;
|
|
117
|
+
this.setDraft('hour', draft);
|
|
118
|
+
if (draft === '')
|
|
119
|
+
return;
|
|
120
|
+
if (draft.length < 2)
|
|
121
|
+
return;
|
|
122
|
+
const raw = this.commitHourDraft(draft);
|
|
123
|
+
const displayDraft = Number(draft) === raw ? draft : String(raw);
|
|
124
|
+
target.value = displayDraft;
|
|
125
|
+
this.setDraft('hour', displayDraft);
|
|
126
|
+
};
|
|
127
|
+
handleMinuteInput = (event) => {
|
|
128
|
+
const target = event.target;
|
|
129
|
+
const draft = this.sanitizeInput(target.value);
|
|
130
|
+
target.value = draft;
|
|
131
|
+
this.setDraft('minute', draft);
|
|
132
|
+
if (draft === '')
|
|
133
|
+
return;
|
|
134
|
+
if (draft.length < 2)
|
|
135
|
+
return;
|
|
136
|
+
const nextMinute = this.commitMinuteDraft(draft);
|
|
137
|
+
const displayDraft = Number(draft) === nextMinute ? draft : String(nextMinute);
|
|
138
|
+
target.value = displayDraft;
|
|
139
|
+
this.setDraft('minute', displayDraft);
|
|
140
|
+
this.emitNext(this.hour, nextMinute);
|
|
141
|
+
};
|
|
142
|
+
renderMeridiemButton(label, meridiem, position) {
|
|
143
|
+
const selected = this.meridiem === meridiem;
|
|
144
|
+
return (h("button", { type: "button", class: {
|
|
145
|
+
'sd-time-picker-selector__meridiem-button': true,
|
|
146
|
+
'sd-time-picker-selector__meridiem-button--selected': selected,
|
|
147
|
+
[`sd-time-picker-selector__meridiem-button--${position}`]: true,
|
|
148
|
+
}, onClick: () => this.setMeridiem(meridiem) }, label));
|
|
149
|
+
}
|
|
150
|
+
renderColumn(type) {
|
|
151
|
+
const isHour = type === 'hour';
|
|
152
|
+
const value = isHour ? this.displayHour : this.minute;
|
|
153
|
+
const displayValue = this.editingPart === type ? (this.inputDraft[type] ?? '') : String(value).padStart(2, '0');
|
|
154
|
+
return (h("div", { class: `sd-time-picker-selector__column sd-time-picker-selector__column--${type}` }, h("sd-ghost-button", { icon: "chevronUp", size: "xs", ariaLabel: `${isHour ? '시' : '분'} 증가`, onSdClick: () => (isHour ? this.changeHour(1) : this.changeMinute(this.minuteStep)) }), h("input", { class: "sd-time-picker-selector__input", type: "text", inputmode: "numeric", value: displayValue, placeholder: "-", onFocus: () => this.beginEdit(type, value), onBlur: () => this.endEdit(type), onInput: isHour ? this.handleHourInput : this.handleMinuteInput, "aria-label": isHour ? '시' : '분' }), h("sd-ghost-button", { icon: "chevronDown", size: "xs", ariaLabel: `${isHour ? '시' : '분'} 감소`, onSdClick: () => (isHour ? this.changeHour(-1) : this.changeMinute(-this.minuteStep)) })));
|
|
155
|
+
}
|
|
156
|
+
render() {
|
|
157
|
+
const cssVars = {
|
|
158
|
+
'--selector-bg': TIMEPICKER_SELECTOR.bg,
|
|
159
|
+
'--selector-radius': `${TIMEPICKER_SELECTOR.radius}px`,
|
|
160
|
+
'--selector-section-padding-x': `${TIMEPICKER_SELECTOR.section.paddingX}px`,
|
|
161
|
+
'--selector-section-padding-y': `${TIMEPICKER_SELECTOR.section.paddingY}px`,
|
|
162
|
+
'--selector-time-gap': `${TIMEPICKER_SELECTOR.time.gap}px`,
|
|
163
|
+
'--selector-time-column-gap': `${TIMEPICKER_SELECTOR.time.column.gap}px`,
|
|
164
|
+
'--selector-input-width': `${TIMEPICKER_SELECTOR.inputWidth}px`,
|
|
165
|
+
'--selector-colon-size': `${TIMEPICKER_SELECTOR.colonSize}px`,
|
|
166
|
+
};
|
|
167
|
+
return (h("div", { key: '230eba90099f06b238a49da38bade09d5a1a168a', class: "sd-time-picker-selector", style: cssVars }, this.useMeridiem && (h("div", { key: 'a15baa49aa07b469843f15a1c381c97df6b31600', class: "sd-time-picker-selector__meridiem" }, h("div", { key: 'e1e9576461c4c9059b1d5c9f4a8528af91869316', class: "sd-time-picker-selector__meridiem-group" }, this.renderMeridiemButton('오전', 'AM', 'first'), this.renderMeridiemButton('오후', 'PM', 'end')))), this.useMeridiem && h("div", { key: 'c9c8dfbb3c724bef2d20d22ea839079c8176c1c6', class: "sd-time-picker-selector__divider" }), h("div", { key: 'd7157d6f5a38b09098fea6dc33d9ca69cf9fcd06', class: "sd-time-picker-selector__time" }, this.renderColumn('hour'), h("span", { key: '83b0ce7966cabe292eb454d103507a0504915aa7', class: "sd-time-picker-selector__colon" }, ":"), this.renderColumn('minute'))));
|
|
168
|
+
}
|
|
169
|
+
static get watchers() { return {
|
|
170
|
+
"value": [{
|
|
171
|
+
"valueChanged": 0
|
|
172
|
+
}]
|
|
173
|
+
}; }
|
|
174
|
+
};
|
|
175
|
+
SdTimePickerSelector.style = sdTimePickerSelectorCss();
|
|
176
|
+
|
|
177
|
+
export { SdTimePickerSelector as sd_time_picker_selector };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-C599jhDs.js';
|
|
2
|
+
import { b as TIMEPICKER_SIZE_MAP, T as TIMEPICKER_COLORS } from './sd-time-picker.config-DUq29Nhs.js';
|
|
3
|
+
import './component.field-DjKOoQuF.js';
|
|
4
|
+
|
|
5
|
+
const sdTimePickerTriggerCss = () => `sd-time-picker-trigger{display:block;width:100%;height:100%}sd-time-picker-trigger .sd-time-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-time-picker-trigger .sd-time-picker-trigger--disabled{cursor:not-allowed}sd-time-picker-trigger .sd-time-picker-trigger__icon,sd-time-picker-trigger .sd-time-picker-trigger__clear{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}sd-time-picker-trigger .sd-time-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}`;
|
|
6
|
+
|
|
7
|
+
const SdTimePickerTrigger = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.triggerClick = createEvent(this, "sdTriggerClick", 7);
|
|
11
|
+
this.clear = createEvent(this, "sdClear", 7);
|
|
12
|
+
}
|
|
13
|
+
/** 표시할 시간 텍스트 */
|
|
14
|
+
displayText = '';
|
|
15
|
+
/** 입력 힌트 텍스트 */
|
|
16
|
+
placeholder = '00:00';
|
|
17
|
+
/** 비활성 상태 여부 */
|
|
18
|
+
disabled = false;
|
|
19
|
+
/** 지우기 버튼 표시 여부 */
|
|
20
|
+
clearable = false;
|
|
21
|
+
/** 트리거 크기 */
|
|
22
|
+
size = 'sm';
|
|
23
|
+
/** 트리거 클릭 시 발생합니다. */
|
|
24
|
+
triggerClick;
|
|
25
|
+
/** 지우기 버튼 클릭 시 발생합니다. */
|
|
26
|
+
clear;
|
|
27
|
+
handleClick = () => {
|
|
28
|
+
if (this.disabled)
|
|
29
|
+
return;
|
|
30
|
+
this.triggerClick.emit();
|
|
31
|
+
};
|
|
32
|
+
handleClear = (event) => {
|
|
33
|
+
event.stopPropagation();
|
|
34
|
+
if (this.disabled)
|
|
35
|
+
return;
|
|
36
|
+
this.clear.emit();
|
|
37
|
+
};
|
|
38
|
+
render() {
|
|
39
|
+
const sizeTokens = TIMEPICKER_SIZE_MAP[this.size] ?? TIMEPICKER_SIZE_MAP.sm;
|
|
40
|
+
const hasValue = this.displayText !== '';
|
|
41
|
+
const textMinWidth = this.size === 'md' ? 96 : 80;
|
|
42
|
+
const cssVars = {
|
|
43
|
+
'--trigger-padding-x': `${sizeTokens.paddingX}px`,
|
|
44
|
+
'--trigger-gap': `${sizeTokens.gap}px`,
|
|
45
|
+
'--trigger-icon-size': `${sizeTokens.iconSize}px`,
|
|
46
|
+
'--trigger-font-size': `${sizeTokens.fontSize}px`,
|
|
47
|
+
'--trigger-line-height': `${sizeTokens.lineHeight}px`,
|
|
48
|
+
'--trigger-font-weight': sizeTokens.fontWeight,
|
|
49
|
+
'--trigger-radius': `${sizeTokens.radius}px`,
|
|
50
|
+
'--trigger-text-min-width': `${textMinWidth}px`,
|
|
51
|
+
'--trigger-text-color': this.disabled
|
|
52
|
+
? TIMEPICKER_COLORS.text.disabled
|
|
53
|
+
: hasValue
|
|
54
|
+
? TIMEPICKER_COLORS.text.default
|
|
55
|
+
: TIMEPICKER_COLORS.text.hint,
|
|
56
|
+
'--trigger-icon-color': this.disabled
|
|
57
|
+
? TIMEPICKER_COLORS.icon.disabled
|
|
58
|
+
: TIMEPICKER_COLORS.icon.default,
|
|
59
|
+
};
|
|
60
|
+
return (h("div", { key: '6b6bff8d9928ace4cda84a7bdb2ac6f73f0d2329', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
61
|
+
'sd-time-picker-trigger': true,
|
|
62
|
+
'sd-time-picker-trigger--disabled': this.disabled,
|
|
63
|
+
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
64
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
this.handleClick();
|
|
67
|
+
}
|
|
68
|
+
} }, h("sd-icon", { key: 'd371bf5acec8592a44c0d18e738b5ac71b556f32', name: "clockOutline", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-time-picker-trigger__icon" }), h("span", { key: '2bc0ddfef47a1e929ceafb723345e1ae9e62095b', class: "sd-time-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder), this.clearable && hasValue && !this.disabled && (h("sd-ghost-button", { key: '76763c65dd6ee64c8f1abc0c871d8c50cfaf3852', class: "sd-time-picker-trigger__clear", icon: "close", size: "xs", ariaLabel: "\uC2DC\uAC04 \uC9C0\uC6B0\uAE30", onSdClick: this.handleClear }))));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
SdTimePickerTrigger.style = sdTimePickerTriggerCss();
|
|
72
|
+
|
|
73
|
+
export { SdTimePickerTrigger as sd_time_picker_trigger };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { f as fieldTokens } from './component.field-DjKOoQuF.js';
|
|
2
|
+
|
|
3
|
+
const timepicker = {
|
|
4
|
+
border: {
|
|
5
|
+
"default": "#AAAAAA",
|
|
6
|
+
focus: "#0075FF",
|
|
7
|
+
width: "1"
|
|
8
|
+
},
|
|
9
|
+
bg: {
|
|
10
|
+
"default": "#FFFFFF",
|
|
11
|
+
disabled: "#E1E1E1"
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
"default": "#888888",
|
|
15
|
+
disabled: "#BBBBBB"
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
"default": "#222222",
|
|
19
|
+
disabled: "#888888"
|
|
20
|
+
},
|
|
21
|
+
selector: {
|
|
22
|
+
bg: "#FFFFFF",
|
|
23
|
+
range: {
|
|
24
|
+
heading: {
|
|
25
|
+
color: "#555555",
|
|
26
|
+
gap: "16"
|
|
27
|
+
},
|
|
28
|
+
paddingXY: "24",
|
|
29
|
+
panelGap: "24",
|
|
30
|
+
section: {
|
|
31
|
+
gap: "12"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
radius: "8",
|
|
35
|
+
section: {
|
|
36
|
+
paddingX: "16",
|
|
37
|
+
paddingY: "12"
|
|
38
|
+
},
|
|
39
|
+
time: {
|
|
40
|
+
gap: "4",
|
|
41
|
+
column: {
|
|
42
|
+
gap: "8"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
input: {
|
|
46
|
+
width: "40"
|
|
47
|
+
},
|
|
48
|
+
colon: {
|
|
49
|
+
size: "16"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
sm: {
|
|
53
|
+
height: "28",
|
|
54
|
+
paddingX: "12",
|
|
55
|
+
gap: "8",
|
|
56
|
+
icon: "16",
|
|
57
|
+
radius: "4"
|
|
58
|
+
},
|
|
59
|
+
md: {
|
|
60
|
+
height: "36",
|
|
61
|
+
paddingX: "16",
|
|
62
|
+
gap: "12",
|
|
63
|
+
icon: "20",
|
|
64
|
+
radius: "6"
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var timepickerTokens = {
|
|
68
|
+
timepicker: timepicker
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const sm = timepickerTokens.timepicker.sm;
|
|
72
|
+
const md = timepickerTokens.timepicker.md;
|
|
73
|
+
const TIMEPICKER_SIZE_MAP = {
|
|
74
|
+
sm: {
|
|
75
|
+
height: sm.height,
|
|
76
|
+
paddingX: sm.paddingX,
|
|
77
|
+
gap: sm.gap,
|
|
78
|
+
iconSize: sm.icon,
|
|
79
|
+
radius: sm.radius,
|
|
80
|
+
// TODO: component.timepicker 토큰에 typography가 추가되면 이 fallback을 교체한다.
|
|
81
|
+
fontSize: '12',
|
|
82
|
+
lineHeight: '20',
|
|
83
|
+
fontWeight: '400',
|
|
84
|
+
minWidth: '128',
|
|
85
|
+
},
|
|
86
|
+
md: {
|
|
87
|
+
height: md.height,
|
|
88
|
+
paddingX: md.paddingX,
|
|
89
|
+
gap: md.gap,
|
|
90
|
+
iconSize: md.icon,
|
|
91
|
+
radius: md.radius,
|
|
92
|
+
// TODO: component.timepicker 토큰에 typography가 추가되면 이 fallback을 교체한다.
|
|
93
|
+
fontSize: '14',
|
|
94
|
+
lineHeight: '24',
|
|
95
|
+
fontWeight: '400',
|
|
96
|
+
minWidth: '160',
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
const TIMEPICKER_COLORS = {
|
|
100
|
+
border: timepickerTokens.timepicker.border,
|
|
101
|
+
bg: timepickerTokens.timepicker.bg,
|
|
102
|
+
icon: timepickerTokens.timepicker.icon,
|
|
103
|
+
text: {
|
|
104
|
+
...timepickerTokens.timepicker.text,
|
|
105
|
+
hint: fieldTokens.field.hint.color,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
const TIMEPICKER_SELECTOR = {
|
|
109
|
+
bg: timepickerTokens.timepicker.selector.bg,
|
|
110
|
+
radius: timepickerTokens.timepicker.selector.radius,
|
|
111
|
+
section: timepickerTokens.timepicker.selector.section,
|
|
112
|
+
time: timepickerTokens.timepicker.selector.time,
|
|
113
|
+
inputWidth: timepickerTokens.timepicker.selector.input.width,
|
|
114
|
+
colonSize: timepickerTokens.timepicker.selector.colon.size,
|
|
115
|
+
range: timepickerTokens.timepicker.selector.range,
|
|
116
|
+
};
|
|
117
|
+
function clampTimePart(value, min, max) {
|
|
118
|
+
if (!Number.isFinite(value))
|
|
119
|
+
return min;
|
|
120
|
+
return Math.min(Math.max(value, min), max);
|
|
121
|
+
}
|
|
122
|
+
function padTimePart(value) {
|
|
123
|
+
return String(value).padStart(2, '0');
|
|
124
|
+
}
|
|
125
|
+
function parseTimeValue(value) {
|
|
126
|
+
const match = /^(\d{1,2}):(\d{1,2})$/.exec(value ?? '');
|
|
127
|
+
if (!match)
|
|
128
|
+
return { hour: 0, minute: 0 };
|
|
129
|
+
return {
|
|
130
|
+
hour: clampTimePart(Number(match[1]), 0, 23),
|
|
131
|
+
minute: clampTimePart(Number(match[2]), 0, 59),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function formatTimeValue(hour, minute) {
|
|
135
|
+
return `${padTimePart(clampTimePart(hour, 0, 23))}:${padTimePart(clampTimePart(minute, 0, 59))}`;
|
|
136
|
+
}
|
|
137
|
+
function formatTimeDisplay(value, type) {
|
|
138
|
+
if (value == null || value === '')
|
|
139
|
+
return '';
|
|
140
|
+
const { hour, minute } = parseTimeValue(value);
|
|
141
|
+
if (type === 'default')
|
|
142
|
+
return formatTimeValue(hour, minute);
|
|
143
|
+
const meridiem = hour >= 12 ? '오후' : '오전';
|
|
144
|
+
const displayHour = hour % 12 === 0 ? 12 : hour % 12;
|
|
145
|
+
return `${meridiem} ${padTimePart(displayHour)}:${padTimePart(minute)}`;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export { TIMEPICKER_COLORS as T, formatTimeDisplay as a, TIMEPICKER_SIZE_MAP as b, clampTimePart as c, TIMEPICKER_SELECTOR as d, formatTimeValue as f, parseTimeValue as p };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-C599jhDs.js';
|
|
2
|
+
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
|
+
import { f as formatTimeValue, a as formatTimeDisplay, T as TIMEPICKER_COLORS, b as TIMEPICKER_SIZE_MAP, p as parseTimeValue } from './sd-time-picker.config-DUq29Nhs.js';
|
|
4
|
+
import './component.field-DjKOoQuF.js';
|
|
5
|
+
|
|
6
|
+
const sdTimePickerCss = () => `sd-time-picker{display:inline-flex}sd-time-picker sd-portal{display:none}sd-time-picker .sd-time-picker{position:relative;min-width:var(--sd-time-picker-min-width);width:100%;height:100%}`;
|
|
7
|
+
|
|
8
|
+
const SdTimePicker = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.update = createEvent(this, "sdUpdate", 7);
|
|
12
|
+
this.dropDownShow = createEvent(this, "sdDropDownShow", 7);
|
|
13
|
+
}
|
|
14
|
+
static CLOSE_ANIMATION_DURATION = 150;
|
|
15
|
+
get el() { return getElement(this); }
|
|
16
|
+
/** 선택된 시간 (HH:mm) */
|
|
17
|
+
value = null;
|
|
18
|
+
/** 입력 필드 크기 */
|
|
19
|
+
size = 'sm';
|
|
20
|
+
/** 표시 타입: default(24시간) / midday(오전·오후) */
|
|
21
|
+
type = 'default';
|
|
22
|
+
/** 시간 미선택 시 표시할 placeholder */
|
|
23
|
+
placeholder = '00:00';
|
|
24
|
+
/** 비활성 상태 여부 */
|
|
25
|
+
disabled = false;
|
|
26
|
+
/** 값이 있을 때 지우기 버튼 표시 여부 */
|
|
27
|
+
clearable = false;
|
|
28
|
+
/** 오전/오후 선택 표시 여부. 지정하지 않으면 type="midday"일 때만 켜집니다. */
|
|
29
|
+
useMeridiem;
|
|
30
|
+
/** 분 증감 단위 */
|
|
31
|
+
minuteStep = 1;
|
|
32
|
+
/** 필드 너비 (숫자면 px, 문자열이면 그대로 적용) */
|
|
33
|
+
width = '';
|
|
34
|
+
// sd-field 공통 props
|
|
35
|
+
/** 레이블 텍스트 */
|
|
36
|
+
label = '';
|
|
37
|
+
/** 레이블 너비 */
|
|
38
|
+
labelWidth = '';
|
|
39
|
+
/** 필드 우측 어드온 레이블 */
|
|
40
|
+
addonLabel = '';
|
|
41
|
+
/** 어드온 정렬 방향 */
|
|
42
|
+
addonAlign = 'start';
|
|
43
|
+
/** 필드 하단 힌트 텍스트 */
|
|
44
|
+
hint = '';
|
|
45
|
+
/** 에러 메시지 */
|
|
46
|
+
errorMessage = '';
|
|
47
|
+
/** 유효성 검사 규칙 목록 */
|
|
48
|
+
rules = [];
|
|
49
|
+
/** 에러 상태 여부 */
|
|
50
|
+
error = false;
|
|
51
|
+
/** 필드 상태 (없으면 error/rules 결과로 자동 결정) */
|
|
52
|
+
status;
|
|
53
|
+
/** 레이블 영역 아이콘 */
|
|
54
|
+
icon = undefined;
|
|
55
|
+
/** 레이블 툴팁 텍스트 */
|
|
56
|
+
labelTooltip = '';
|
|
57
|
+
/** 레이블 툴팁 상세 옵션 */
|
|
58
|
+
labelTooltipProps = null;
|
|
59
|
+
isOpen = false;
|
|
60
|
+
isAnimatingOut = false;
|
|
61
|
+
focused = false;
|
|
62
|
+
hovered = false;
|
|
63
|
+
/** 시간 선택 시 선택된 시간(HH:mm)을 전달합니다. */
|
|
64
|
+
update;
|
|
65
|
+
/** 선택기 열림/닫힘 상태가 바뀔 때 발생합니다. */
|
|
66
|
+
dropDownShow;
|
|
67
|
+
triggerRef;
|
|
68
|
+
formField;
|
|
69
|
+
closeAnimationTimer;
|
|
70
|
+
/** 폼 연동용 name 속성 */
|
|
71
|
+
name = nanoid();
|
|
72
|
+
watchIsOpen(newValue) {
|
|
73
|
+
this.focused = newValue;
|
|
74
|
+
this.dropDownShow.emit({ isOpen: newValue });
|
|
75
|
+
}
|
|
76
|
+
valueChanged(newValue) {
|
|
77
|
+
if (newValue == null || newValue === '')
|
|
78
|
+
return;
|
|
79
|
+
const parsed = parseTimeValue(newValue);
|
|
80
|
+
const normalized = formatTimeValue(parsed.hour, parsed.minute);
|
|
81
|
+
if (normalized !== newValue)
|
|
82
|
+
this.value = normalized;
|
|
83
|
+
}
|
|
84
|
+
/** 유효성 검사를 실행합니다. */
|
|
85
|
+
async sdValidate() {
|
|
86
|
+
return this.formField?.sdValidate();
|
|
87
|
+
}
|
|
88
|
+
/** 값과 유효성 상태를 초기화합니다. */
|
|
89
|
+
async sdReset() {
|
|
90
|
+
return this.formField?.sdReset();
|
|
91
|
+
}
|
|
92
|
+
/** 유효성 상태만 초기화합니다. */
|
|
93
|
+
async sdResetValidate() {
|
|
94
|
+
return this.formField?.sdResetValidation();
|
|
95
|
+
}
|
|
96
|
+
/** 입력 필드에 포커스를 이동합니다. */
|
|
97
|
+
async sdFocus() {
|
|
98
|
+
return this.formField?.sdFocus();
|
|
99
|
+
}
|
|
100
|
+
componentWillLoad() {
|
|
101
|
+
this.valueChanged(this.value);
|
|
102
|
+
}
|
|
103
|
+
disconnectedCallback() {
|
|
104
|
+
if (this.closeAnimationTimer)
|
|
105
|
+
clearTimeout(this.closeAnimationTimer);
|
|
106
|
+
}
|
|
107
|
+
closeDropdown() {
|
|
108
|
+
if (!this.isOpen)
|
|
109
|
+
return;
|
|
110
|
+
this.isOpen = false;
|
|
111
|
+
this.isAnimatingOut = true;
|
|
112
|
+
if (this.closeAnimationTimer)
|
|
113
|
+
clearTimeout(this.closeAnimationTimer);
|
|
114
|
+
this.closeAnimationTimer = setTimeout(() => {
|
|
115
|
+
this.isAnimatingOut = false;
|
|
116
|
+
}, SdTimePicker.CLOSE_ANIMATION_DURATION);
|
|
117
|
+
}
|
|
118
|
+
handleTriggerClick = () => {
|
|
119
|
+
if (this.disabled)
|
|
120
|
+
return;
|
|
121
|
+
if (this.isOpen) {
|
|
122
|
+
this.closeDropdown();
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
if (this.closeAnimationTimer)
|
|
126
|
+
clearTimeout(this.closeAnimationTimer);
|
|
127
|
+
this.isAnimatingOut = false;
|
|
128
|
+
this.isOpen = true;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
handleClear = (event) => {
|
|
132
|
+
event.stopPropagation();
|
|
133
|
+
this.value = null;
|
|
134
|
+
this.update.emit(null);
|
|
135
|
+
};
|
|
136
|
+
handleSelect = (event) => {
|
|
137
|
+
event.stopPropagation();
|
|
138
|
+
this.value = event.detail;
|
|
139
|
+
this.update.emit(this.value);
|
|
140
|
+
};
|
|
141
|
+
get effectiveUseMeridiem() {
|
|
142
|
+
return this.useMeridiem ?? this.type === 'midday';
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
const sizeTokens = TIMEPICKER_SIZE_MAP[this.size] ?? TIMEPICKER_SIZE_MAP.sm;
|
|
146
|
+
const cssVars = {
|
|
147
|
+
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
148
|
+
'--sd-system-size-field-md-height': `${sizeTokens.height}px`,
|
|
149
|
+
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
150
|
+
'--sd-system-radius-field-md': `${sizeTokens.radius}px`,
|
|
151
|
+
'--sd-time-picker-min-width': `${sizeTokens.minWidth}px`,
|
|
152
|
+
'--sd-system-color-field-border-default': TIMEPICKER_COLORS.border.default,
|
|
153
|
+
'--sd-system-color-field-border-focus': TIMEPICKER_COLORS.border.focus,
|
|
154
|
+
'--sd-system-color-field-bg-default': TIMEPICKER_COLORS.bg.default,
|
|
155
|
+
};
|
|
156
|
+
return (h("sd-field", { key: 'dc433d8d452ad71bc5ea1b388399df862ca9cd04', 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: '258c3a0d3232e8edfe5304dd2e0fcea4060f5893', class: "sd-time-picker", ref: el => {
|
|
157
|
+
this.triggerRef = el;
|
|
158
|
+
} }, h("sd-time-picker-trigger", { key: '22af4e81d925cbdacea4e08b05aaa13cf5eb9ef8', displayText: formatTimeDisplay(this.value, this.effectiveUseMeridiem ? 'midday' : 'default'), placeholder: this.placeholder, disabled: this.disabled, clearable: this.clearable, size: this.size, onSdTriggerClick: this.handleTriggerClick, onSdClear: this.handleClear })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '8c7e43950257c8a8bf3b157f69985b3284430107', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-time-picker-selector", { key: '27109beda36d1817807f6a8b6af8a7a12b4c31c6', value: this.value, useMeridiem: this.effectiveUseMeridiem, minuteStep: this.minuteStep, onSdUpdate: this.handleSelect })))));
|
|
159
|
+
}
|
|
160
|
+
static get watchers() { return {
|
|
161
|
+
"isOpen": [{
|
|
162
|
+
"watchIsOpen": 0
|
|
163
|
+
}],
|
|
164
|
+
"value": [{
|
|
165
|
+
"valueChanged": 0
|
|
166
|
+
}]
|
|
167
|
+
}; }
|
|
168
|
+
};
|
|
169
|
+
SdTimePicker.style = sdTimePickerCss();
|
|
170
|
+
|
|
171
|
+
export { SdTimePicker as sd_time_picker };
|