@sellmate/design-system 1.28.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-D12oddge.js → index-Jr8OU0y9.js} +1 -15
- 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 +22 -17
- package/dist/cjs/sd-chip.cjs.entry.js +7 -7
- package/dist/cjs/sd-circle-progress.cjs.entry.js +4 -4
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +33 -36
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/{component.datepicker-CUQbDSku.js → sd-date-picker.config-CgyNxY03.js} +64 -0
- package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +446 -47
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +162 -12
- package/dist/cjs/sd-divider.cjs.entry.js +3 -3
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/sd-key-value-table.cjs.entry.js +88 -18
- package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +16 -2
- package/dist/cjs/sd-pagination.cjs.entry.js +173 -0
- package/dist/cjs/sd-popover.cjs.entry.js +134 -44
- package/dist/cjs/sd-popup.cjs.entry.js +3 -3
- 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_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -315
- 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/{system-MjrAugX-.js → system-B4KkVpu2.js} +1 -7
- package/dist/cjs/{tooltipArrow-Dda4ik0V.js → tooltipArrow-BlrFItn5.js} +1 -1
- package/dist/cjs/useDatePicker-j06ymWZ_.js +103 -0
- package/dist/collection/collection-manifest.json +8 -8
- 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.css +1 -0
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +3 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +35 -59
- 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-key-value-table/sd-key-value-table.config.js +2 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +5 -1
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +65 -15
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +15 -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-BE6ymp9E.js → p-6U1qyU5A.js} +1 -1
- package/dist/components/{p-1i6Q61TF.js → p-B-EV9bey.js} +1 -1
- package/dist/components/p-B887QQl2.js +1 -0
- package/dist/components/{p-BysikR_g.js → p-BPzs63D8.js} +1 -1
- package/dist/components/p-Bth2l1cy.js +1 -0
- package/dist/components/{p-CTDPl65u.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-BAVsc1Ml.js → p-C9IKm4j5.js} +1 -1
- package/dist/components/{p-BuADVB78.js → p-CH9dgzTr.js} +1 -1
- package/dist/components/p-CKV2W-zU.js +1 -0
- package/dist/components/p-CTCt17CE.js +1 -0
- package/dist/components/{p-laVsm9VM.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-DNbbdJIc.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-Bgxca9o5.js → p-DE8Ws9As.js} +1 -1
- package/dist/components/p-DMm_GeZC.js +1 -0
- package/dist/components/{p-BnI9HUOv.js → p-DOfLrOEu.js} +1 -1
- package/dist/components/{p-vtuEYpc6.js → p-DSWD8udu.js} +1 -1
- package/dist/components/{p-BKV1WAFb.js → p-DWnuCSqC.js} +1 -1
- package/dist/components/p-DYjaQs6e.js +1 -0
- package/dist/components/{p-pwGA4sDj.js → p-DasiqnrU.js} +1 -1
- package/dist/components/p-Dc9g3-5z.js +1 -0
- package/dist/components/{p-ClD0nx1l.js → p-DnlLqzGM.js} +1 -1
- package/dist/components/p-DsZwiWiU.js +1 -0
- package/dist/components/{p-IDlLs_KA.js → p-FGII920I.js} +1 -1
- package/dist/components/p-Hjv7LqkN.js +1 -0
- package/dist/components/{p-CHHlQceE.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-D2S9Zafz.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-table.d.ts → sd-time-picker-trigger.d.ts} +4 -4
- package/dist/components/sd-time-picker-trigger.js +1 -0
- package/dist/components/{sd-thead.d.ts → sd-time-picker.d.ts} +4 -4
- 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-td.d.ts → sd-time-range-picker.d.ts} +4 -4
- 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-750a9112.entry.js → p-129b6330.entry.js} +1 -1
- package/dist/design-system/p-15f43b9b.entry.js +1 -0
- package/dist/design-system/p-16b9eac4.entry.js +1 -0
- package/dist/design-system/{p-0b8c86c3.entry.js → p-1858636f.entry.js} +1 -1
- package/dist/design-system/{p-a938ffee.entry.js → p-21672bb8.entry.js} +1 -1
- package/dist/design-system/{p-3b3a46cd.entry.js → p-219288ef.entry.js} +1 -1
- package/dist/design-system/{p-26f2f4c2.entry.js → p-22ac9e05.entry.js} +1 -1
- package/dist/design-system/p-2534d3d4.entry.js +1 -0
- package/dist/design-system/p-3859316f.entry.js +1 -0
- package/dist/design-system/{p-67f19734.entry.js → p-46da4e95.entry.js} +1 -1
- package/dist/design-system/{p-287d8016.entry.js → p-46eb3421.entry.js} +1 -1
- package/dist/design-system/p-4782331f.entry.js +1 -0
- package/dist/design-system/p-4a117dd6.entry.js +1 -0
- package/dist/design-system/{p-58ec51db.entry.js → p-4ae0a64a.entry.js} +1 -1
- package/dist/design-system/{p-bbd24816.entry.js → p-52b1be6f.entry.js} +1 -1
- package/dist/design-system/p-56e7c87b.entry.js +1 -0
- package/dist/design-system/p-570b9e91.entry.js +1 -0
- 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-1230b51b.entry.js → p-655324cd.entry.js} +1 -1
- package/dist/design-system/p-66cff123.entry.js +1 -0
- package/dist/design-system/{p-4970f1ff.entry.js → p-6c4fa9d7.entry.js} +1 -1
- package/dist/design-system/{p-071e73e0.entry.js → p-809a0a71.entry.js} +1 -1
- package/dist/design-system/{p-70608fec.entry.js → p-82cb62a9.entry.js} +1 -1
- package/dist/design-system/p-843d1a8a.entry.js +1 -0
- package/dist/design-system/{p-fbeed0e4.entry.js → p-8836d9ff.entry.js} +1 -1
- package/dist/design-system/p-8af8e302.entry.js +1 -0
- package/dist/design-system/p-9c131122.entry.js +1 -0
- package/dist/design-system/{p-BqWuC4-J.js → p-BnUjeY2n.js} +1 -1
- package/dist/design-system/p-Bth2l1cy.js +1 -0
- package/dist/design-system/p-C599jhDs.js +2 -0
- package/dist/design-system/{p-CRWmn35N.js → p-Cn8LZw1e.js} +1 -1
- 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-2553bb1f.entry.js → p-b2dc1202.entry.js} +1 -1
- package/dist/design-system/{p-9c0bca09.entry.js → p-b5229957.entry.js} +1 -1
- package/dist/design-system/{p-d7e302af.entry.js → p-b75cc0dd.entry.js} +1 -1
- package/dist/design-system/p-b97a6cf3.entry.js +1 -0
- package/dist/design-system/p-c1e625e5.entry.js +1 -0
- package/dist/design-system/{p-5687ed0c.entry.js → p-c7f03dea.entry.js} +1 -1
- package/dist/design-system/p-cdb2433a.entry.js +1 -0
- package/dist/design-system/{p-61f5d5ea.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-bab692c6.entry.js → p-efe3601d.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-DDNBPrZh.js → index-C599jhDs.js} +2 -14
- 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 +22 -17
- package/dist/esm/sd-chip.entry.js +7 -7
- package/dist/esm/sd-circle-progress.entry.js +4 -4
- package/dist/esm/sd-confirm-modal_2.entry.js +33 -36
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/{component.datepicker-laVsm9VM.js → sd-date-picker.config-CdXJcOGr.js} +63 -1
- package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +446 -48
- package/dist/esm/sd-date-range-picker-calendar.entry.js +158 -8
- package/dist/esm/sd-divider.entry.js +3 -3
- package/dist/esm/sd-dropdown-button.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/sd-key-value-table.entry.js +87 -17
- package/dist/esm/sd-linear-progress.entry.js +3 -3
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +16 -2
- package/dist/esm/sd-pagination.entry.js +171 -0
- package/dist/esm/sd-popover.entry.js +134 -44
- package/dist/esm/sd-popup.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +3 -3
- package/dist/esm/sd-radio.entry.js +4 -2
- package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -299
- 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/{system-BJfiMC9H.js → system-Bth2l1cy.js} +1 -7
- package/dist/esm/{tooltipArrow-blL0aWPE.js → tooltipArrow-DbLihSLI.js} +1 -1
- package/dist/esm/{useDatePicker-DoUg--aq.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-confirm-modal/sd-confirm-modal.d.ts +10 -10
- 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-key-value-table/sd-key-value-table.config.d.ts +22 -3
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +9 -1
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +2 -0
- 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 +1093 -885
- package/dist/types/index.d.ts +0 -1
- package/hydrate/index.js +2573 -3144
- package/hydrate/index.mjs +2573 -3144
- package/package.json +1 -1
- package/dist/cjs/component.table-POXY492T.js +0 -72
- package/dist/cjs/constants-DJRV1upE.js +0 -5
- package/dist/cjs/sd-date-picker.config-De7ahWIs.js +0 -41
- package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -858
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -173
- package/dist/cjs/sd-select.config-omyxekRa.js +0 -144
- package/dist/cjs/sd-table.cjs.entry.js +0 -956
- package/dist/cjs/sd-table.config-DFy_S4bc.js +0 -83
- package/dist/cjs/sd-td.cjs.entry.js +0 -201
- package/dist/cjs/useDatePicker-iMd6WToc.js +0 -103
- package/dist/collection/components/sd-table/constants.js +0 -1
- package/dist/collection/components/sd-table/sd-table.config.js +0 -88
- package/dist/collection/components/sd-table/sd-table.css +0 -180
- package/dist/collection/components/sd-table/sd-table.js +0 -1709
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +0 -242
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -10
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -110
- package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -15
- package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -381
- package/dist/collection/components/sd-table/sd-thead/sd-thead.css +0 -186
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +0 -629
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -145
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -530
- package/dist/components/p-5pkzwl5N.js +0 -1
- package/dist/components/p-B-pJW3nY.js +0 -1
- package/dist/components/p-B2pYDEK7.js +0 -1
- package/dist/components/p-B3HYnTGx.js +0 -1
- package/dist/components/p-B6ezDhRg.js +0 -1
- package/dist/components/p-BCxePXvg.js +0 -1
- package/dist/components/p-BJfiMC9H.js +0 -1
- package/dist/components/p-BNHhtZUf.js +0 -1
- package/dist/components/p-BQ4Okfcm.js +0 -1
- package/dist/components/p-BSxleKw8.js +0 -1
- package/dist/components/p-BUgGuigd.js +0 -1
- package/dist/components/p-BWHQn4fD.js +0 -1
- package/dist/components/p-BZXgIBUG.js +0 -1
- package/dist/components/p-Bxb7TcZh.js +0 -1
- package/dist/components/p-C0tnN4yn.js +0 -1
- package/dist/components/p-CMvHDxR5.js +0 -1
- package/dist/components/p-CSh-DcM7.js +0 -1
- package/dist/components/p-Cf62Nvrx.js +0 -1
- package/dist/components/p-DbPS61bp.js +0 -1
- package/dist/components/p-DckXBMgo.js +0 -1
- package/dist/components/p-DmAnTwUx.js +0 -1
- package/dist/components/p-E8OA_psS.js +0 -1
- package/dist/components/p-PFLrdhQj.js +0 -1
- package/dist/components/p-l9RiSWRc.js +0 -1
- package/dist/components/p-paSLRXAR.js +0 -1
- package/dist/components/p-sZMi_32I.js +0 -1
- package/dist/components/p-yxZBh03f.js +0 -1
- package/dist/components/sd-table.js +0 -1
- package/dist/components/sd-tbody.d.ts +0 -11
- package/dist/components/sd-tbody.js +0 -1
- package/dist/components/sd-td.js +0 -1
- package/dist/components/sd-thead.js +0 -1
- package/dist/components/sd-tr.d.ts +0 -11
- package/dist/components/sd-tr.js +0 -1
- package/dist/design-system/p-0048de73.entry.js +0 -1
- package/dist/design-system/p-20f69606.entry.js +0 -1
- package/dist/design-system/p-27197194.entry.js +0 -1
- package/dist/design-system/p-5c8f4d9c.entry.js +0 -1
- package/dist/design-system/p-5pkzwl5N.js +0 -1
- package/dist/design-system/p-75726e20.entry.js +0 -1
- package/dist/design-system/p-7abf62f3.entry.js +0 -1
- package/dist/design-system/p-7ae27a26.entry.js +0 -1
- package/dist/design-system/p-84d0181b.entry.js +0 -1
- package/dist/design-system/p-91f7be74.entry.js +0 -1
- package/dist/design-system/p-94d6b7b4.entry.js +0 -1
- package/dist/design-system/p-9b21773a.entry.js +0 -1
- package/dist/design-system/p-BJfiMC9H.js +0 -1
- package/dist/design-system/p-Cf62Nvrx.js +0 -1
- package/dist/design-system/p-CuAh9n2o.js +0 -1
- package/dist/design-system/p-DDNBPrZh.js +0 -2
- package/dist/design-system/p-a12d7362.entry.js +0 -1
- package/dist/design-system/p-b831eded.entry.js +0 -1
- package/dist/design-system/p-c5502585.entry.js +0 -1
- package/dist/design-system/p-c81898a0.entry.js +0 -1
- package/dist/design-system/p-d4e2f412.entry.js +0 -1
- package/dist/design-system/p-d6b3d78b.entry.js +0 -1
- package/dist/design-system/p-dbfa3931.entry.js +0 -1
- package/dist/design-system/p-f16985c9.entry.js +0 -1
- package/dist/design-system/p-fa967329.entry.js +0 -1
- package/dist/design-system/p-laVsm9VM.js +0 -1
- package/dist/design-system/p-sZMi_32I.js +0 -1
- package/dist/esm/component.table-5pkzwl5N.js +0 -70
- package/dist/esm/constants-sZMi_32I.js +0 -3
- package/dist/esm/sd-date-picker.config-D-ks6qNf.js +0 -38
- package/dist/esm/sd-pagination_4.entry.js +0 -853
- package/dist/esm/sd-select-list-item_2.entry.js +0 -170
- package/dist/esm/sd-select.config-CeHGlqOT.js +0 -129
- package/dist/esm/sd-table.config-DmOBlnsM.js +0 -70
- package/dist/esm/sd-table.entry.js +0 -954
- package/dist/esm/sd-td.entry.js +0 -199
- package/dist/types/components/sd-table/constants.d.ts +0 -50
- package/dist/types/components/sd-table/sd-table.config.d.ts +0 -71
- package/dist/types/components/sd-table/sd-table.d.ts +0 -199
- package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +0 -39
- package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -15
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -38
- package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +0 -62
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -54
package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.js
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { TIMEPICKER_SELECTOR, clampTimePart, formatTimeValue, parseTimeValue, } from "../sd-time-picker.config";
|
|
3
|
+
export class SdTimePickerSelector {
|
|
4
|
+
/** 선택된 시간 (HH:mm) */
|
|
5
|
+
value = null;
|
|
6
|
+
/** 오전/오후 선택 표시 여부 */
|
|
7
|
+
useMeridiem = true;
|
|
8
|
+
/** 분 증감 단위 */
|
|
9
|
+
minuteStep = 1;
|
|
10
|
+
/** 시간 변경 시 발생합니다. */
|
|
11
|
+
update;
|
|
12
|
+
valueChanged() {
|
|
13
|
+
this.syncFromValue();
|
|
14
|
+
}
|
|
15
|
+
editingPart = null;
|
|
16
|
+
inputDraft = {};
|
|
17
|
+
hour = 0;
|
|
18
|
+
minute = 0;
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.syncFromValue();
|
|
21
|
+
}
|
|
22
|
+
syncFromValue() {
|
|
23
|
+
const parsed = parseTimeValue(this.value);
|
|
24
|
+
this.hour = parsed.hour;
|
|
25
|
+
this.minute = parsed.minute;
|
|
26
|
+
}
|
|
27
|
+
get meridiem() {
|
|
28
|
+
return this.hour >= 12 ? 'PM' : 'AM';
|
|
29
|
+
}
|
|
30
|
+
get displayHour() {
|
|
31
|
+
if (!this.useMeridiem)
|
|
32
|
+
return this.hour;
|
|
33
|
+
const hour = this.hour % 12;
|
|
34
|
+
return hour === 0 ? 12 : hour;
|
|
35
|
+
}
|
|
36
|
+
emitNext(hour, minute) {
|
|
37
|
+
this.hour = clampTimePart(hour, 0, 23);
|
|
38
|
+
this.minute = clampTimePart(minute, 0, 59);
|
|
39
|
+
this.update.emit(formatTimeValue(this.hour, this.minute));
|
|
40
|
+
}
|
|
41
|
+
sanitizeInput(value) {
|
|
42
|
+
return value.replace(/\D/g, '').slice(0, 2);
|
|
43
|
+
}
|
|
44
|
+
setDraft(part, value) {
|
|
45
|
+
this.inputDraft = { ...this.inputDraft, [part]: value };
|
|
46
|
+
}
|
|
47
|
+
beginEdit(part, value) {
|
|
48
|
+
this.editingPart = part;
|
|
49
|
+
this.setDraft(part, String(value).padStart(2, '0'));
|
|
50
|
+
}
|
|
51
|
+
commitHourDraft(draft) {
|
|
52
|
+
const raw = clampTimePart(Number(draft), this.useMeridiem ? 1 : 0, this.useMeridiem ? 12 : 23);
|
|
53
|
+
const nextHour = this.useMeridiem
|
|
54
|
+
? this.meridiem === 'PM'
|
|
55
|
+
? raw === 12
|
|
56
|
+
? 12
|
|
57
|
+
: raw + 12
|
|
58
|
+
: raw === 12
|
|
59
|
+
? 0
|
|
60
|
+
: raw
|
|
61
|
+
: raw;
|
|
62
|
+
this.emitNext(nextHour, this.minute);
|
|
63
|
+
return raw;
|
|
64
|
+
}
|
|
65
|
+
commitMinuteDraft(draft) {
|
|
66
|
+
const minute = clampTimePart(Number(draft), 0, 59);
|
|
67
|
+
this.emitNext(this.hour, minute);
|
|
68
|
+
return minute;
|
|
69
|
+
}
|
|
70
|
+
endEdit(part) {
|
|
71
|
+
const draft = this.inputDraft[part];
|
|
72
|
+
if (part === 'hour' && draft != null && draft !== '') {
|
|
73
|
+
this.commitHourDraft(draft);
|
|
74
|
+
}
|
|
75
|
+
if (part === 'minute' && draft != null && draft !== '') {
|
|
76
|
+
this.commitMinuteDraft(draft);
|
|
77
|
+
}
|
|
78
|
+
this.editingPart = null;
|
|
79
|
+
this.inputDraft = {};
|
|
80
|
+
}
|
|
81
|
+
setMeridiem(meridiem) {
|
|
82
|
+
if (meridiem === this.meridiem)
|
|
83
|
+
return;
|
|
84
|
+
if (meridiem === 'AM') {
|
|
85
|
+
this.emitNext(this.hour - 12, this.minute);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.emitNext(this.hour + 12, this.minute);
|
|
89
|
+
}
|
|
90
|
+
changeHour(delta) {
|
|
91
|
+
this.emitNext((this.hour + delta + 24) % 24, this.minute);
|
|
92
|
+
}
|
|
93
|
+
changeMinute(delta) {
|
|
94
|
+
const next = this.minute + delta;
|
|
95
|
+
if (next > 59) {
|
|
96
|
+
this.emitNext((this.hour + 1) % 24, next - 60);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (next < 0) {
|
|
100
|
+
this.emitNext((this.hour + 23) % 24, next + 60);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
this.emitNext(this.hour, next);
|
|
104
|
+
}
|
|
105
|
+
handleHourInput = (event) => {
|
|
106
|
+
const target = event.target;
|
|
107
|
+
const draft = this.sanitizeInput(target.value);
|
|
108
|
+
target.value = draft;
|
|
109
|
+
this.setDraft('hour', draft);
|
|
110
|
+
if (draft === '')
|
|
111
|
+
return;
|
|
112
|
+
if (draft.length < 2)
|
|
113
|
+
return;
|
|
114
|
+
const raw = this.commitHourDraft(draft);
|
|
115
|
+
const displayDraft = Number(draft) === raw ? draft : String(raw);
|
|
116
|
+
target.value = displayDraft;
|
|
117
|
+
this.setDraft('hour', displayDraft);
|
|
118
|
+
};
|
|
119
|
+
handleMinuteInput = (event) => {
|
|
120
|
+
const target = event.target;
|
|
121
|
+
const draft = this.sanitizeInput(target.value);
|
|
122
|
+
target.value = draft;
|
|
123
|
+
this.setDraft('minute', draft);
|
|
124
|
+
if (draft === '')
|
|
125
|
+
return;
|
|
126
|
+
if (draft.length < 2)
|
|
127
|
+
return;
|
|
128
|
+
const nextMinute = this.commitMinuteDraft(draft);
|
|
129
|
+
const displayDraft = Number(draft) === nextMinute ? draft : String(nextMinute);
|
|
130
|
+
target.value = displayDraft;
|
|
131
|
+
this.setDraft('minute', displayDraft);
|
|
132
|
+
this.emitNext(this.hour, nextMinute);
|
|
133
|
+
};
|
|
134
|
+
renderMeridiemButton(label, meridiem, position) {
|
|
135
|
+
const selected = this.meridiem === meridiem;
|
|
136
|
+
return (h("button", { type: "button", class: {
|
|
137
|
+
'sd-time-picker-selector__meridiem-button': true,
|
|
138
|
+
'sd-time-picker-selector__meridiem-button--selected': selected,
|
|
139
|
+
[`sd-time-picker-selector__meridiem-button--${position}`]: true,
|
|
140
|
+
}, onClick: () => this.setMeridiem(meridiem) }, label));
|
|
141
|
+
}
|
|
142
|
+
renderColumn(type) {
|
|
143
|
+
const isHour = type === 'hour';
|
|
144
|
+
const value = isHour ? this.displayHour : this.minute;
|
|
145
|
+
const displayValue = this.editingPart === type ? (this.inputDraft[type] ?? '') : String(value).padStart(2, '0');
|
|
146
|
+
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)) })));
|
|
147
|
+
}
|
|
148
|
+
render() {
|
|
149
|
+
const cssVars = {
|
|
150
|
+
'--selector-bg': TIMEPICKER_SELECTOR.bg,
|
|
151
|
+
'--selector-radius': `${TIMEPICKER_SELECTOR.radius}px`,
|
|
152
|
+
'--selector-section-padding-x': `${TIMEPICKER_SELECTOR.section.paddingX}px`,
|
|
153
|
+
'--selector-section-padding-y': `${TIMEPICKER_SELECTOR.section.paddingY}px`,
|
|
154
|
+
'--selector-time-gap': `${TIMEPICKER_SELECTOR.time.gap}px`,
|
|
155
|
+
'--selector-time-column-gap': `${TIMEPICKER_SELECTOR.time.column.gap}px`,
|
|
156
|
+
'--selector-input-width': `${TIMEPICKER_SELECTOR.inputWidth}px`,
|
|
157
|
+
'--selector-colon-size': `${TIMEPICKER_SELECTOR.colonSize}px`,
|
|
158
|
+
};
|
|
159
|
+
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'))));
|
|
160
|
+
}
|
|
161
|
+
static get is() { return "sd-time-picker-selector"; }
|
|
162
|
+
static get originalStyleUrls() {
|
|
163
|
+
return {
|
|
164
|
+
"$": ["sd-time-picker-selector.scss"]
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
static get styleUrls() {
|
|
168
|
+
return {
|
|
169
|
+
"$": ["sd-time-picker-selector.css"]
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static get properties() {
|
|
173
|
+
return {
|
|
174
|
+
"value": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "string | null",
|
|
179
|
+
"resolved": "null | string",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": "\uC120\uD0DD\uB41C \uC2DC\uAC04 (HH:mm)"
|
|
187
|
+
},
|
|
188
|
+
"getter": false,
|
|
189
|
+
"setter": false,
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"attribute": "value",
|
|
192
|
+
"defaultValue": "null"
|
|
193
|
+
},
|
|
194
|
+
"useMeridiem": {
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "boolean",
|
|
199
|
+
"resolved": "boolean",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": "\uC624\uC804/\uC624\uD6C4 \uC120\uD0DD \uD45C\uC2DC \uC5EC\uBD80"
|
|
207
|
+
},
|
|
208
|
+
"getter": false,
|
|
209
|
+
"setter": false,
|
|
210
|
+
"reflect": false,
|
|
211
|
+
"attribute": "use-meridiem",
|
|
212
|
+
"defaultValue": "true"
|
|
213
|
+
},
|
|
214
|
+
"minuteStep": {
|
|
215
|
+
"type": "number",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "number",
|
|
219
|
+
"resolved": "number",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "\uBD84 \uC99D\uAC10 \uB2E8\uC704"
|
|
227
|
+
},
|
|
228
|
+
"getter": false,
|
|
229
|
+
"setter": false,
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"attribute": "minute-step",
|
|
232
|
+
"defaultValue": "1"
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
static get states() {
|
|
237
|
+
return {
|
|
238
|
+
"editingPart": {},
|
|
239
|
+
"inputDraft": {}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
static get events() {
|
|
243
|
+
return [{
|
|
244
|
+
"method": "update",
|
|
245
|
+
"name": "sdUpdate",
|
|
246
|
+
"bubbles": true,
|
|
247
|
+
"cancelable": true,
|
|
248
|
+
"composed": true,
|
|
249
|
+
"docs": {
|
|
250
|
+
"tags": [],
|
|
251
|
+
"text": "\uC2DC\uAC04 \uBCC0\uACBD \uC2DC \uBC1C\uC0DD\uD569\uB2C8\uB2E4."
|
|
252
|
+
},
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "string",
|
|
255
|
+
"resolved": "string",
|
|
256
|
+
"references": {}
|
|
257
|
+
}
|
|
258
|
+
}];
|
|
259
|
+
}
|
|
260
|
+
static get watchers() {
|
|
261
|
+
return [{
|
|
262
|
+
"propName": "value",
|
|
263
|
+
"methodName": "valueChanged"
|
|
264
|
+
}];
|
|
265
|
+
}
|
|
266
|
+
}
|
package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.css
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
sd-time-picker-trigger {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
sd-time-picker-trigger .sd-time-picker-trigger {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--trigger-gap);
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
padding: 0 var(--trigger-padding-x);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
user-select: none;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
border-radius: var(--trigger-radius);
|
|
17
|
+
}
|
|
18
|
+
sd-time-picker-trigger .sd-time-picker-trigger--disabled {
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
}
|
|
21
|
+
sd-time-picker-trigger .sd-time-picker-trigger__icon, sd-time-picker-trigger .sd-time-picker-trigger__clear {
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
}
|
|
27
|
+
sd-time-picker-trigger .sd-time-picker-trigger__text {
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-width: var(--trigger-text-min-width, 80px);
|
|
30
|
+
font-size: var(--trigger-font-size);
|
|
31
|
+
line-height: var(--trigger-line-height);
|
|
32
|
+
font-weight: var(--trigger-font-weight);
|
|
33
|
+
color: var(--trigger-text-color);
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
text-align: center;
|
|
38
|
+
}
|
package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { TIMEPICKER_SIZE_MAP, TIMEPICKER_COLORS, } from "../sd-time-picker.config";
|
|
3
|
+
export class SdTimePickerTrigger {
|
|
4
|
+
/** 표시할 시간 텍스트 */
|
|
5
|
+
displayText = '';
|
|
6
|
+
/** 입력 힌트 텍스트 */
|
|
7
|
+
placeholder = '00:00';
|
|
8
|
+
/** 비활성 상태 여부 */
|
|
9
|
+
disabled = false;
|
|
10
|
+
/** 지우기 버튼 표시 여부 */
|
|
11
|
+
clearable = false;
|
|
12
|
+
/** 트리거 크기 */
|
|
13
|
+
size = 'sm';
|
|
14
|
+
/** 트리거 클릭 시 발생합니다. */
|
|
15
|
+
triggerClick;
|
|
16
|
+
/** 지우기 버튼 클릭 시 발생합니다. */
|
|
17
|
+
clear;
|
|
18
|
+
handleClick = () => {
|
|
19
|
+
if (this.disabled)
|
|
20
|
+
return;
|
|
21
|
+
this.triggerClick.emit();
|
|
22
|
+
};
|
|
23
|
+
handleClear = (event) => {
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
if (this.disabled)
|
|
26
|
+
return;
|
|
27
|
+
this.clear.emit();
|
|
28
|
+
};
|
|
29
|
+
render() {
|
|
30
|
+
const sizeTokens = TIMEPICKER_SIZE_MAP[this.size] ?? TIMEPICKER_SIZE_MAP.sm;
|
|
31
|
+
const hasValue = this.displayText !== '';
|
|
32
|
+
const textMinWidth = this.size === 'md' ? 96 : 80;
|
|
33
|
+
const cssVars = {
|
|
34
|
+
'--trigger-padding-x': `${sizeTokens.paddingX}px`,
|
|
35
|
+
'--trigger-gap': `${sizeTokens.gap}px`,
|
|
36
|
+
'--trigger-icon-size': `${sizeTokens.iconSize}px`,
|
|
37
|
+
'--trigger-font-size': `${sizeTokens.fontSize}px`,
|
|
38
|
+
'--trigger-line-height': `${sizeTokens.lineHeight}px`,
|
|
39
|
+
'--trigger-font-weight': sizeTokens.fontWeight,
|
|
40
|
+
'--trigger-radius': `${sizeTokens.radius}px`,
|
|
41
|
+
'--trigger-text-min-width': `${textMinWidth}px`,
|
|
42
|
+
'--trigger-text-color': this.disabled
|
|
43
|
+
? TIMEPICKER_COLORS.text.disabled
|
|
44
|
+
: hasValue
|
|
45
|
+
? TIMEPICKER_COLORS.text.default
|
|
46
|
+
: TIMEPICKER_COLORS.text.hint,
|
|
47
|
+
'--trigger-icon-color': this.disabled
|
|
48
|
+
? TIMEPICKER_COLORS.icon.disabled
|
|
49
|
+
: TIMEPICKER_COLORS.icon.default,
|
|
50
|
+
};
|
|
51
|
+
return (h("div", { key: '6b6bff8d9928ace4cda84a7bdb2ac6f73f0d2329', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
52
|
+
'sd-time-picker-trigger': true,
|
|
53
|
+
'sd-time-picker-trigger--disabled': this.disabled,
|
|
54
|
+
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
55
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
this.handleClick();
|
|
58
|
+
}
|
|
59
|
+
} }, 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 }))));
|
|
60
|
+
}
|
|
61
|
+
static get is() { return "sd-time-picker-trigger"; }
|
|
62
|
+
static get originalStyleUrls() {
|
|
63
|
+
return {
|
|
64
|
+
"$": ["sd-time-picker-trigger.scss"]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get styleUrls() {
|
|
68
|
+
return {
|
|
69
|
+
"$": ["sd-time-picker-trigger.css"]
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
static get properties() {
|
|
73
|
+
return {
|
|
74
|
+
"displayText": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "string",
|
|
79
|
+
"resolved": "string",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": "\uD45C\uC2DC\uD560 \uC2DC\uAC04 \uD14D\uC2A4\uD2B8"
|
|
87
|
+
},
|
|
88
|
+
"getter": false,
|
|
89
|
+
"setter": false,
|
|
90
|
+
"reflect": false,
|
|
91
|
+
"attribute": "display-text",
|
|
92
|
+
"defaultValue": "''"
|
|
93
|
+
},
|
|
94
|
+
"placeholder": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "string",
|
|
99
|
+
"resolved": "string",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "\uC785\uB825 \uD78C\uD2B8 \uD14D\uC2A4\uD2B8"
|
|
107
|
+
},
|
|
108
|
+
"getter": false,
|
|
109
|
+
"setter": false,
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"attribute": "placeholder",
|
|
112
|
+
"defaultValue": "'00:00'"
|
|
113
|
+
},
|
|
114
|
+
"disabled": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "boolean",
|
|
119
|
+
"resolved": "boolean",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "\uBE44\uD65C\uC131 \uC0C1\uD0DC \uC5EC\uBD80"
|
|
127
|
+
},
|
|
128
|
+
"getter": false,
|
|
129
|
+
"setter": false,
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"attribute": "disabled",
|
|
132
|
+
"defaultValue": "false"
|
|
133
|
+
},
|
|
134
|
+
"clearable": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"mutable": false,
|
|
137
|
+
"complexType": {
|
|
138
|
+
"original": "boolean",
|
|
139
|
+
"resolved": "boolean",
|
|
140
|
+
"references": {}
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"optional": false,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "\uC9C0\uC6B0\uAE30 \uBC84\uD2BC \uD45C\uC2DC \uC5EC\uBD80"
|
|
147
|
+
},
|
|
148
|
+
"getter": false,
|
|
149
|
+
"setter": false,
|
|
150
|
+
"reflect": false,
|
|
151
|
+
"attribute": "clearable",
|
|
152
|
+
"defaultValue": "false"
|
|
153
|
+
},
|
|
154
|
+
"size": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "TimePickerSize",
|
|
159
|
+
"resolved": "\"md\" | \"sm\"",
|
|
160
|
+
"references": {
|
|
161
|
+
"TimePickerSize": {
|
|
162
|
+
"location": "import",
|
|
163
|
+
"path": "../sd-time-picker.config",
|
|
164
|
+
"id": "src/components/sd-time-picker/sd-time-picker.config.ts::TimePickerSize",
|
|
165
|
+
"referenceLocation": "TimePickerSize"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "\uD2B8\uB9AC\uAC70 \uD06C\uAE30"
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"reflect": false,
|
|
178
|
+
"attribute": "size",
|
|
179
|
+
"defaultValue": "'sm'"
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
static get events() {
|
|
184
|
+
return [{
|
|
185
|
+
"method": "triggerClick",
|
|
186
|
+
"name": "sdTriggerClick",
|
|
187
|
+
"bubbles": true,
|
|
188
|
+
"cancelable": true,
|
|
189
|
+
"composed": true,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": "\uD2B8\uB9AC\uAC70 \uD074\uB9AD \uC2DC \uBC1C\uC0DD\uD569\uB2C8\uB2E4."
|
|
193
|
+
},
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "void",
|
|
196
|
+
"resolved": "void",
|
|
197
|
+
"references": {}
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
"method": "clear",
|
|
201
|
+
"name": "sdClear",
|
|
202
|
+
"bubbles": true,
|
|
203
|
+
"cancelable": true,
|
|
204
|
+
"composed": true,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "\uC9C0\uC6B0\uAE30 \uBC84\uD2BC \uD074\uB9AD \uC2DC \uBC1C\uC0DD\uD569\uB2C8\uB2E4."
|
|
208
|
+
},
|
|
209
|
+
"complexType": {
|
|
210
|
+
"original": "void",
|
|
211
|
+
"resolved": "void",
|
|
212
|
+
"references": {}
|
|
213
|
+
}
|
|
214
|
+
}];
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import timepickerTokens from "../../tokens/generated/component.timepicker.json";
|
|
2
|
+
import fieldTokens from "../../tokens/generated/component.field.json";
|
|
3
|
+
const sm = timepickerTokens.timepicker.sm;
|
|
4
|
+
const md = timepickerTokens.timepicker.md;
|
|
5
|
+
export const TIMEPICKER_SIZE_MAP = {
|
|
6
|
+
sm: {
|
|
7
|
+
height: sm.height,
|
|
8
|
+
paddingX: sm.paddingX,
|
|
9
|
+
gap: sm.gap,
|
|
10
|
+
iconSize: sm.icon,
|
|
11
|
+
radius: sm.radius,
|
|
12
|
+
// TODO: component.timepicker 토큰에 typography가 추가되면 이 fallback을 교체한다.
|
|
13
|
+
fontSize: '12',
|
|
14
|
+
lineHeight: '20',
|
|
15
|
+
fontWeight: '400',
|
|
16
|
+
minWidth: '128',
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
height: md.height,
|
|
20
|
+
paddingX: md.paddingX,
|
|
21
|
+
gap: md.gap,
|
|
22
|
+
iconSize: md.icon,
|
|
23
|
+
radius: md.radius,
|
|
24
|
+
// TODO: component.timepicker 토큰에 typography가 추가되면 이 fallback을 교체한다.
|
|
25
|
+
fontSize: '14',
|
|
26
|
+
lineHeight: '24',
|
|
27
|
+
fontWeight: '400',
|
|
28
|
+
minWidth: '160',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const TIMEPICKER_COLORS = {
|
|
32
|
+
border: timepickerTokens.timepicker.border,
|
|
33
|
+
bg: timepickerTokens.timepicker.bg,
|
|
34
|
+
icon: timepickerTokens.timepicker.icon,
|
|
35
|
+
text: {
|
|
36
|
+
...timepickerTokens.timepicker.text,
|
|
37
|
+
hint: fieldTokens.field.hint.color,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export const TIMEPICKER_SELECTOR = {
|
|
41
|
+
bg: timepickerTokens.timepicker.selector.bg,
|
|
42
|
+
radius: timepickerTokens.timepicker.selector.radius,
|
|
43
|
+
section: timepickerTokens.timepicker.selector.section,
|
|
44
|
+
time: timepickerTokens.timepicker.selector.time,
|
|
45
|
+
inputWidth: timepickerTokens.timepicker.selector.input.width,
|
|
46
|
+
colonSize: timepickerTokens.timepicker.selector.colon.size,
|
|
47
|
+
range: timepickerTokens.timepicker.selector.range,
|
|
48
|
+
};
|
|
49
|
+
export function clampTimePart(value, min, max) {
|
|
50
|
+
if (!Number.isFinite(value))
|
|
51
|
+
return min;
|
|
52
|
+
return Math.min(Math.max(value, min), max);
|
|
53
|
+
}
|
|
54
|
+
export function padTimePart(value) {
|
|
55
|
+
return String(value).padStart(2, '0');
|
|
56
|
+
}
|
|
57
|
+
export function parseTimeValue(value) {
|
|
58
|
+
const match = /^(\d{1,2}):(\d{1,2})$/.exec(value ?? '');
|
|
59
|
+
if (!match)
|
|
60
|
+
return { hour: 0, minute: 0 };
|
|
61
|
+
return {
|
|
62
|
+
hour: clampTimePart(Number(match[1]), 0, 23),
|
|
63
|
+
minute: clampTimePart(Number(match[2]), 0, 59),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function formatTimeValue(hour, minute) {
|
|
67
|
+
return `${padTimePart(clampTimePart(hour, 0, 23))}:${padTimePart(clampTimePart(minute, 0, 59))}`;
|
|
68
|
+
}
|
|
69
|
+
export function formatTimeDisplay(value, type) {
|
|
70
|
+
if (value == null || value === '')
|
|
71
|
+
return '';
|
|
72
|
+
const { hour, minute } = parseTimeValue(value);
|
|
73
|
+
if (type === 'default')
|
|
74
|
+
return formatTimeValue(hour, minute);
|
|
75
|
+
const meridiem = hour >= 12 ? '오후' : '오전';
|
|
76
|
+
const displayHour = hour % 12 === 0 ? 12 : hour % 12;
|
|
77
|
+
return `${meridiem} ${padTimePart(displayHour)}:${padTimePart(minute)}`;
|
|
78
|
+
}
|