@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
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Jr8OU0y9.js');
|
|
4
4
|
var index$1 = require('./index-BUvXpPc3.js');
|
|
5
|
-
var sdDatePicker_config = require('./sd-date-picker.config-
|
|
5
|
+
var sdDatePicker_config = require('./sd-date-picker.config-CgyNxY03.js');
|
|
6
|
+
var component_field = require('./component.field-C7it8cZm.js');
|
|
6
7
|
var component_listBox = require('./component.listBox-MHAv4Yy7.js');
|
|
7
8
|
var component_textinput = require('./component.textinput-Bb-nU5xI.js');
|
|
8
|
-
var component_field = require('./component.field-C7it8cZm.js');
|
|
9
|
-
require('./component.datepicker-CUQbDSku.js');
|
|
10
9
|
|
|
11
10
|
const sdDatePickerCss = () => `sd-date-picker{display:inline-flex}sd-date-picker sd-portal{display:none}sd-date-picker .sd-date-picker{position:relative;width:100%;height:100%}`;
|
|
12
11
|
|
|
@@ -47,6 +46,8 @@ const SdDatePicker = class {
|
|
|
47
46
|
rules = [];
|
|
48
47
|
/** 에러 상태 여부 */
|
|
49
48
|
error = false;
|
|
49
|
+
/** 필드 상태 (없으면 error/rules 결과로 자동 결정) */
|
|
50
|
+
status;
|
|
50
51
|
/** 레이블 영역 아이콘 */
|
|
51
52
|
icon = undefined;
|
|
52
53
|
/** 레이블 툴팁 텍스트 */
|
|
@@ -130,9 +131,9 @@ const SdDatePicker = class {
|
|
|
130
131
|
'--sd-system-color-field-border-focus': sdDatePicker_config.DATEPICKER_COLORS.border.focus,
|
|
131
132
|
'--sd-system-color-field-bg-default': sdDatePicker_config.DATEPICKER_COLORS.bg.default,
|
|
132
133
|
};
|
|
133
|
-
return (index.h("sd-field", { key: '
|
|
134
|
+
return (index.h("sd-field", { key: 'c3adbcb65f372a7c33350a747b29b5a35990c292', 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 }, index.h("div", { key: 'aac9b498321c4506a6979a17de4896c4521887a1', class: "sd-date-picker", ref: el => {
|
|
134
135
|
this.triggerRef = el;
|
|
135
|
-
} }, index.h("sd-date-picker-trigger", { key: '
|
|
136
|
+
} }, index.h("sd-date-picker-trigger", { key: '00a558ac1c9a5af666c62c15e18e240036e1bb34', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: '142098d59d8a5df4054e7a39f4d93b0ddc06109b', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, index.h("sd-calendar", { key: '319dc85ff9a41e8b04fdaecc1c7e9e01c953014b', elevated: true, value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
136
137
|
}
|
|
137
138
|
static get watchers() { return {
|
|
138
139
|
"isOpen": [{
|
|
@@ -162,6 +163,11 @@ const SdDateRangePicker = class {
|
|
|
162
163
|
selectable;
|
|
163
164
|
/** 최대 선택 가능한 날짜 범위 (일 단위) */
|
|
164
165
|
maxRange;
|
|
166
|
+
/**
|
|
167
|
+
* 시간(시:분) 선택 푸터 사용 여부.
|
|
168
|
+
* true이면 value는 "YYYY-MM-DD HH:mm" 형식이 되고, 캘린더 하단에 시작·종료 시간 입력이 표시됩니다.
|
|
169
|
+
*/
|
|
170
|
+
useTimePicker = false;
|
|
165
171
|
/** 비활성 상태 여부 */
|
|
166
172
|
disabled = false;
|
|
167
173
|
/** 필드 너비 (숫자면 px, 문자열이면 그대로 적용) */
|
|
@@ -183,6 +189,8 @@ const SdDateRangePicker = class {
|
|
|
183
189
|
rules = [];
|
|
184
190
|
/** 에러 상태 여부 */
|
|
185
191
|
error = false;
|
|
192
|
+
/** 필드 상태 (없으면 error/rules 결과로 자동 결정) */
|
|
193
|
+
status;
|
|
186
194
|
/** 레이블 영역 아이콘 */
|
|
187
195
|
icon = undefined;
|
|
188
196
|
/** 레이블 툴팁 텍스트 */
|
|
@@ -242,7 +250,9 @@ const SdDateRangePicker = class {
|
|
|
242
250
|
}
|
|
243
251
|
};
|
|
244
252
|
handleSelect = (e) => {
|
|
245
|
-
|
|
253
|
+
// 시간 선택 모드에서는 사용자가 시:분을 조정할 수 있도록 드롭다운을 닫지 않고 실시간 반영만 한다
|
|
254
|
+
if (!this.useTimePicker)
|
|
255
|
+
this.closeDropdown();
|
|
246
256
|
this.value = e.detail;
|
|
247
257
|
const nextValue = this.value;
|
|
248
258
|
requestAnimationFrame(() => {
|
|
@@ -257,6 +267,14 @@ const SdDateRangePicker = class {
|
|
|
257
267
|
return '';
|
|
258
268
|
return `${this.value[0]} ~ ${this.value[1]}`;
|
|
259
269
|
}
|
|
270
|
+
static DEFAULT_PLACEHOLDER = 'YYYY-MM-DD ~ YYYY-MM-DD';
|
|
271
|
+
get resolvedPlaceholder() {
|
|
272
|
+
// placeholder를 따로 지정하지 않았고 시간 선택 모드이면 시:분을 포함한 기본 placeholder를 쓴다
|
|
273
|
+
if (this.useTimePicker && this.placeholder === SdDateRangePicker.DEFAULT_PLACEHOLDER) {
|
|
274
|
+
return 'YYYY-MM-DD HH:mm ~ YYYY-MM-DD HH:mm';
|
|
275
|
+
}
|
|
276
|
+
return this.placeholder;
|
|
277
|
+
}
|
|
260
278
|
disconnectedCallback() {
|
|
261
279
|
if (this.closeAnimationTimer)
|
|
262
280
|
clearTimeout(this.closeAnimationTimer);
|
|
@@ -270,9 +288,9 @@ const SdDateRangePicker = class {
|
|
|
270
288
|
'--sd-system-color-field-border-focus': sdDatePicker_config.DATEPICKER_COLORS.border.focus,
|
|
271
289
|
'--sd-system-color-field-bg-default': sdDatePicker_config.DATEPICKER_COLORS.bg.default,
|
|
272
290
|
};
|
|
273
|
-
return (index.h("sd-field", { key: '
|
|
291
|
+
return (index.h("sd-field", { key: '01098a74a5066d2328409dcdf21bb38691adf455', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, status: this.status, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: 'dab4a666f5c144bbcbf3848528ce246c752ab906', class: "sd-date-range-picker", ref: el => {
|
|
274
292
|
this.triggerRef = el;
|
|
275
|
-
} }, index.h("sd-date-picker-trigger", { key: '
|
|
293
|
+
} }, index.h("sd-date-picker-trigger", { key: '5aa378df1b53a2b8cc29e159e7bda0544210a81e', displayText: this.displayText, placeholder: this.resolvedPlaceholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: '8d18658004dc009d869804bdabd31155117edde3', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, index.h("sd-date-range-picker-calendar", { key: '0bf96efeed4c567052e690a83a70f27df85ccc64', value: this.value, selectable: this.selectable, maxRange: this.maxRange, useTimePicker: this.useTimePicker, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
276
294
|
}
|
|
277
295
|
static get watchers() { return {
|
|
278
296
|
"isOpen": [{
|
|
@@ -288,12 +306,39 @@ const filepicker = {
|
|
|
288
306
|
paddingX: "12",
|
|
289
307
|
gap: "8",
|
|
290
308
|
radius: "4",
|
|
309
|
+
borderWidth: "1",
|
|
291
310
|
typography: {
|
|
311
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
292
312
|
fontWeight: "400",
|
|
293
313
|
fontSize: "12",
|
|
294
|
-
lineHeight: "20"
|
|
314
|
+
lineHeight: "20",
|
|
315
|
+
textDecoration: "none"
|
|
316
|
+
},
|
|
295
317
|
icon: "16"
|
|
296
318
|
},
|
|
319
|
+
md: {
|
|
320
|
+
height: "36",
|
|
321
|
+
paddingX: "16",
|
|
322
|
+
gap: "12",
|
|
323
|
+
radius: "6",
|
|
324
|
+
borderWidth: "1",
|
|
325
|
+
typography: {
|
|
326
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
327
|
+
fontWeight: "400",
|
|
328
|
+
fontSize: "14",
|
|
329
|
+
textDecoration: "none",
|
|
330
|
+
lineHeight: "24"
|
|
331
|
+
},
|
|
332
|
+
icon: "20"
|
|
333
|
+
},
|
|
334
|
+
border: {
|
|
335
|
+
"default": "#AAAAAA",
|
|
336
|
+
disabled: "#CCCCCC"
|
|
337
|
+
},
|
|
338
|
+
bg: {
|
|
339
|
+
"default": "#FFFFFF",
|
|
340
|
+
disabled: "#E1E1E1"
|
|
341
|
+
},
|
|
297
342
|
text: {
|
|
298
343
|
"default": "#222222",
|
|
299
344
|
placeholder: "#AAAAAA",
|
|
@@ -308,15 +353,25 @@ var filePickerTokens = {
|
|
|
308
353
|
};
|
|
309
354
|
|
|
310
355
|
const fp = filePickerTokens.filepicker;
|
|
311
|
-
const
|
|
312
|
-
height: fp.
|
|
313
|
-
paddingX: fp.
|
|
314
|
-
gap: fp.
|
|
315
|
-
radius: fp.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
356
|
+
const buildLayout = (s) => ({
|
|
357
|
+
height: fp[s].height,
|
|
358
|
+
paddingX: fp[s].paddingX,
|
|
359
|
+
gap: fp[s].gap,
|
|
360
|
+
radius: fp[s].radius,
|
|
361
|
+
borderWidth: fp[s].borderWidth,
|
|
362
|
+
fontSize: fp[s].typography.fontSize,
|
|
363
|
+
lineHeight: fp[s].typography.lineHeight,
|
|
364
|
+
fontWeight: fp[s].typography.fontWeight,
|
|
365
|
+
iconSize: fp[s].icon,
|
|
366
|
+
contentsGap: component_field.fieldTokens.field.contents.gap,
|
|
367
|
+
});
|
|
368
|
+
/** 기본(sm) 레이아웃 — 하위호환용 단일 export */
|
|
369
|
+
const FILE_PICKER_LAYOUT = buildLayout('sm');
|
|
370
|
+
/** size별 레이아웃 맵 */
|
|
371
|
+
const FILE_PICKER_LAYOUTS = {
|
|
372
|
+
sm: FILE_PICKER_LAYOUT,
|
|
373
|
+
md: buildLayout('md'),
|
|
374
|
+
};
|
|
320
375
|
const FILE_PICKER_COLORS = {
|
|
321
376
|
text: fp.text,
|
|
322
377
|
icon: {
|
|
@@ -363,6 +418,8 @@ const SdFilePicker = class {
|
|
|
363
418
|
/** 최대 파일 개수 */
|
|
364
419
|
maxFiles;
|
|
365
420
|
// sd-field 패스스루 props
|
|
421
|
+
/** 필드 크기 */
|
|
422
|
+
size = 'sm';
|
|
366
423
|
/** 폼 연동용 name 속성 */
|
|
367
424
|
name = index$1.nanoid();
|
|
368
425
|
/** 레이블 텍스트 */
|
|
@@ -565,7 +622,7 @@ const SdFilePicker = class {
|
|
|
565
622
|
renderChipList() {
|
|
566
623
|
if (!this.hasChips())
|
|
567
624
|
return null;
|
|
568
|
-
return (index.h("div", { class: "sd-file-picker__chip-list" }, this.internalValue.map((file, index$1) => (index.h("sd-chip", { value: file.name, onSdRemove: () => this.handleChipRemove(index$1) })))));
|
|
625
|
+
return (index.h("div", { class: "sd-file-picker__chip-list" }, this.internalValue.map((file, index$1) => (index.h("sd-chip", { value: file.name, editable: false, onSdRemove: () => this.handleChipRemove(index$1) })))));
|
|
569
626
|
}
|
|
570
627
|
renderListbox() {
|
|
571
628
|
if (!this.hasChips() || !this.isListboxOpen)
|
|
@@ -591,38 +648,39 @@ const SdFilePicker = class {
|
|
|
591
648
|
render() {
|
|
592
649
|
const hasFiles = this.hasFiles();
|
|
593
650
|
const displayText = this.getDisplayText();
|
|
651
|
+
const layout = FILE_PICKER_LAYOUTS[this.size] ?? FILE_PICKER_LAYOUT;
|
|
594
652
|
const cssVars = {
|
|
595
|
-
'--sd-file-picker-font-size': `${
|
|
596
|
-
'--sd-file-picker-line-height': `${
|
|
597
|
-
'--sd-file-picker-font-weight':
|
|
598
|
-
'--sd-file-picker-padding-x': `${
|
|
599
|
-
'--sd-file-picker-gap': `${
|
|
653
|
+
'--sd-file-picker-font-size': `${layout.fontSize}px`,
|
|
654
|
+
'--sd-file-picker-line-height': `${layout.lineHeight}px`,
|
|
655
|
+
'--sd-file-picker-font-weight': layout.fontWeight,
|
|
656
|
+
'--sd-file-picker-padding-x': `${layout.paddingX}px`,
|
|
657
|
+
'--sd-file-picker-gap': `${layout.gap}px`,
|
|
600
658
|
'--sd-file-picker-text-color': FILE_PICKER_COLORS.text.default,
|
|
601
659
|
'--sd-file-picker-placeholder-color': FILE_PICKER_COLORS.text.placeholder,
|
|
602
660
|
'--sd-file-picker-disabled-color': FILE_PICKER_COLORS.text.disabled,
|
|
603
|
-
// sd-field 시스템 변수 override
|
|
604
|
-
|
|
605
|
-
|
|
661
|
+
// sd-field 시스템 변수 override (size에 맞춰)
|
|
662
|
+
[`--sd-system-size-field-${this.size}-height`]: `${layout.height}px`,
|
|
663
|
+
[`--sd-system-radius-field-${this.size}`]: `${layout.radius}px`,
|
|
606
664
|
};
|
|
607
665
|
const showListbox = this.multiple && this.useMultipleListBox;
|
|
608
|
-
const content = (index.h("div", { key: '
|
|
666
|
+
const content = (index.h("div", { key: 'd1c3af9860038ddb11d540af8312ad59d051524f', role: "button", tabindex: this.disabled ? -1 : 0, class: "sd-file-picker__content", ref: el => (this.contentRef = el), onClick: this.handleClick, onKeyDown: e => {
|
|
609
667
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
610
668
|
e.preventDefault();
|
|
611
669
|
this.handleClick();
|
|
612
670
|
}
|
|
613
|
-
} }, index.h("input", { key: '
|
|
671
|
+
} }, index.h("input", { key: '760c38cd73d0a2a3d0832c5597c0e22bf737bb06', ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder ?? 'Click to upload' }), index.h("sd-icon", { key: '96ff0bf43eb3f17df92bd8834cd38a1ae36ad475', name: "attachFile", size: Number(layout.iconSize), color: this.getIconColor(), class: "sd-file-picker__icon" }), index.h("div", { key: '0757b8b734e21fcf7bed04d7306ee3a9d202f950', ref: el => (this.fileNamesRef = el), class: {
|
|
614
672
|
'sd-file-picker__text': true,
|
|
615
673
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
616
674
|
'sd-file-picker__text--active': hasFiles,
|
|
617
|
-
} }, displayText), showListbox && hasFiles && !this.disabled && (index.h("sd-ghost-button", { key: '
|
|
675
|
+
} }, displayText), showListbox && hasFiles && !this.disabled && (index.h("sd-ghost-button", { key: '8e42d38452d00256147ee65e614bdeb7040917d7', icon: "caretDown", size: "xxs", ariaLabel: "toggle file list", disabled: this.disabled, class: {
|
|
618
676
|
'sd-file-picker__caret': true,
|
|
619
677
|
'sd-file-picker__caret--open': this.isListboxOpen,
|
|
620
|
-
}, onClick: this.handleListboxToggle })), !this.disabled && hasFiles && (index.h("sd-ghost-button", { key: '
|
|
621
|
-
return (index.h("div", { key: '
|
|
678
|
+
}, onClick: this.handleListboxToggle })), !this.disabled && hasFiles && (index.h("sd-ghost-button", { key: '6f65042ce5e4efa1b6ab126653d434ca77cdd790', icon: "close", size: "xxs", ariaLabel: "clear", disabled: this.disabled, class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (index.h("div", { key: 'b41146f39c384a5954dca22f2d3da767a63ef0c0', class: "sd-file-picker__tooltip" }, displayText))));
|
|
679
|
+
return (index.h("div", { key: '858fea100a9317ac6806ae40699e9f5608394e10', class: {
|
|
622
680
|
'sd-file-picker__wrapper': true,
|
|
623
681
|
'sd-file-picker--inline': this.inline,
|
|
624
682
|
'sd-file-picker--inline-disabled': this.inline && this.disabled,
|
|
625
|
-
}, style: cssVars }, index.h("sd-field", { key: '
|
|
683
|
+
}, style: cssVars }, index.h("sd-field", { key: '1b7a6a57e4e46c253bd9f77c500dabf92edc2ae0', borderless: this.inline, size: this.size, 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, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content), this.useMultipleListBox ? this.renderListbox() : this.renderChipList()));
|
|
626
684
|
}
|
|
627
685
|
static get watchers() { return {
|
|
628
686
|
"value": [{
|
|
@@ -818,12 +876,12 @@ const SdInput = class {
|
|
|
818
876
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
819
877
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
820
878
|
};
|
|
821
|
-
return (index.h("sd-field", { key: '
|
|
879
|
+
return (index.h("sd-field", { key: '66c7d6a9292bf8129fea6a33d2288733c264a39f', 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, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, 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 }, index.h("label", { key: 'b429ae6e521440eb917b17b10525ff3d3767a50d', class: "sd-input__content" }, index.h("slot", { key: 'dc1cd825ff1bea6484eada71d5aff621f82522c2', name: "prefix" }), index.h("input", { key: '93bd923644ac7660c2c9be28e4c64d39d93365c3', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : (this.type ?? 'text'), value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), index.h("slot", { key: 'ec2f67a7ae01ebbaaa1f48f1e231f6fe2cfb413c', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && !this.readonly && (index.h("sd-ghost-button", { key: 'de33f6902ab5560e151ef13e01ef84eea14da17d', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
822
880
|
if (this.disabled || this.readonly)
|
|
823
881
|
return;
|
|
824
882
|
this.internalValue = '';
|
|
825
883
|
await this.formField?.sdValidate();
|
|
826
|
-
} })), this.type === 'password' && (index.h("sd-ghost-button", { key: '
|
|
884
|
+
} })), this.type === 'password' && (index.h("sd-ghost-button", { key: 'db07c28cede67dbec93454b5ea90e94f72c5f313', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled || this.readonly, class: "sd-input__password-icon", onClick: () => {
|
|
827
885
|
if (this.disabled || this.readonly)
|
|
828
886
|
return;
|
|
829
887
|
this.passwordVisible = !this.passwordVisible;
|
|
@@ -948,6 +1006,8 @@ const SdNumberInput = class {
|
|
|
948
1006
|
useButton = false;
|
|
949
1007
|
/** 소수점 입력 허용 여부 */
|
|
950
1008
|
useDecimal = false;
|
|
1009
|
+
/** 소수점 이하 최대 자리수 (useDecimal일 때만 적용, 초과 입력한 소수부는 잘라냄) */
|
|
1010
|
+
maxDecimalLength;
|
|
951
1011
|
/** 입력 값 */
|
|
952
1012
|
value = null;
|
|
953
1013
|
/** 레이블 텍스트 */
|
|
@@ -1028,6 +1088,31 @@ const SdNumberInput = class {
|
|
|
1028
1088
|
const result = isNegative ? '-' + formatted : formatted;
|
|
1029
1089
|
return decPart !== undefined && decPart !== '' ? result + '.' + decPart : String(result);
|
|
1030
1090
|
}
|
|
1091
|
+
/** useDecimal이면서 유효한 maxDecimalLength가 있을 때만 소수점 이하 제한 자리수를 반환합니다. */
|
|
1092
|
+
getDecimalLimit() {
|
|
1093
|
+
if (!this.useDecimal ||
|
|
1094
|
+
this.maxDecimalLength === undefined ||
|
|
1095
|
+
!Number.isFinite(this.maxDecimalLength)) {
|
|
1096
|
+
return undefined;
|
|
1097
|
+
}
|
|
1098
|
+
return Math.max(0, Math.floor(this.maxDecimalLength));
|
|
1099
|
+
}
|
|
1100
|
+
/** 소수부를 제한 자리수로 잘라낸 문자열을 반환합니다(반올림하지 않고 잘라냄). */
|
|
1101
|
+
truncateToDecimalLimit(cleaned, limit) {
|
|
1102
|
+
if (!cleaned.includes('.'))
|
|
1103
|
+
return cleaned;
|
|
1104
|
+
const [intPart, fractionPart = ''] = cleaned.split('.');
|
|
1105
|
+
const truncatedFraction = fractionPart.slice(0, limit);
|
|
1106
|
+
return truncatedFraction === '' ? intPart : `${intPart}.${truncatedFraction}`;
|
|
1107
|
+
}
|
|
1108
|
+
/** 숫자값의 소수부를 제한 자리수로 잘라냅니다(제한이 없으면 원본 그대로). */
|
|
1109
|
+
applyDecimalLimit(value) {
|
|
1110
|
+
const decimalLimit = this.getDecimalLimit();
|
|
1111
|
+
if (decimalLimit === undefined)
|
|
1112
|
+
return value;
|
|
1113
|
+
const parsed = parseFloat(this.truncateToDecimalLimit(value.toString(), decimalLimit));
|
|
1114
|
+
return isNaN(parsed) ? value : parsed;
|
|
1115
|
+
}
|
|
1031
1116
|
parseInput(input) {
|
|
1032
1117
|
if (input.trim() === '')
|
|
1033
1118
|
return null;
|
|
@@ -1035,12 +1120,15 @@ const SdNumberInput = class {
|
|
|
1035
1120
|
if (!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(cleaned)) {
|
|
1036
1121
|
return null;
|
|
1037
1122
|
}
|
|
1038
|
-
const parsed = parseFloat(cleaned);
|
|
1039
|
-
if (isNaN(parsed))
|
|
1040
|
-
return null;
|
|
1041
1123
|
if (!this.useDecimal && cleaned.includes('.')) {
|
|
1042
1124
|
return null;
|
|
1043
1125
|
}
|
|
1126
|
+
// useDecimal이면서 maxDecimalLength가 설정된 경우 소수부를 제한 자리수로 잘라냄(반올림 아님)
|
|
1127
|
+
const decimalLimit = this.getDecimalLimit();
|
|
1128
|
+
const normalized = decimalLimit !== undefined ? this.truncateToDecimalLimit(cleaned, decimalLimit) : cleaned;
|
|
1129
|
+
const parsed = parseFloat(normalized);
|
|
1130
|
+
if (isNaN(parsed))
|
|
1131
|
+
return null;
|
|
1044
1132
|
return parsed;
|
|
1045
1133
|
}
|
|
1046
1134
|
clampMinMax(value) {
|
|
@@ -1195,6 +1283,7 @@ const SdNumberInput = class {
|
|
|
1195
1283
|
if (nextVal > this.max) {
|
|
1196
1284
|
nextVal = this.max;
|
|
1197
1285
|
}
|
|
1286
|
+
nextVal = this.applyDecimalLimit(nextVal);
|
|
1198
1287
|
if (nextVal === currentVal)
|
|
1199
1288
|
return;
|
|
1200
1289
|
this.internalValue = nextVal;
|
|
@@ -1207,6 +1296,7 @@ const SdNumberInput = class {
|
|
|
1207
1296
|
if (nextVal < this.min) {
|
|
1208
1297
|
nextVal = this.min;
|
|
1209
1298
|
}
|
|
1299
|
+
nextVal = this.applyDecimalLimit(nextVal);
|
|
1210
1300
|
if (nextVal === currentVal)
|
|
1211
1301
|
return;
|
|
1212
1302
|
this.internalValue = nextVal;
|
|
@@ -1247,15 +1337,15 @@ const SdNumberInput = class {
|
|
|
1247
1337
|
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
1248
1338
|
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
1249
1339
|
};
|
|
1250
|
-
return (index.h("sd-field", { key: '
|
|
1340
|
+
return (index.h("sd-field", { key: 'ffa6befb9565a33e762fce231c29d7a2f663eb08', 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, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, 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 }, index.h("div", { key: '2fb1686b071fd69c65fc0c908807c029edc3b253', class: {
|
|
1251
1341
|
'sd-number-input__content': true,
|
|
1252
1342
|
'sd-number-input__content--no-stepper': !this.useButton,
|
|
1253
|
-
} }, this.useButton && (index.h("button", { key: '
|
|
1343
|
+
} }, this.useButton && (index.h("button", { key: '6b2464867bb0224f4fbcb50ea4e4bfc5386474ba', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, index.h("sd-icon", { key: 'f65e9144ad93f4ba8d293b5af1bf9fd1286e7520', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
1254
1344
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
1255
|
-
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && index.h("span", { key: '
|
|
1345
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && index.h("span", { key: '3d89b3557f961f36b429e3cf4ae247098a412b30', class: "sd-number-input__prefix" }, this.inputPrefix), index.h("input", { key: 'c5c503b634aee3b0c8d81f855b5de1d0abe35eac', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__native ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, style: {
|
|
1256
1346
|
textAlign: this.useButton ? 'center' : 'right',
|
|
1257
1347
|
...this.inputStyle,
|
|
1258
|
-
} }), this.inputSuffix && index.h("span", { key: '
|
|
1348
|
+
} }), this.inputSuffix && index.h("span", { key: '15177064a4daab2ede3af4f8758912da266f1c29', class: "sd-number-input__suffix" }, this.inputSuffix), this.useButton && (index.h("button", { key: 'dcc1fbfe7c4e7eaa6db95fe7dc9a34f4b82ade8b', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, index.h("sd-icon", { key: '58eee48f37c0e942a3734a9275a9d459bc9bc420', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
1259
1349
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
1260
1350
|
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
1261
1351
|
}
|
|
@@ -1277,7 +1367,7 @@ const SdRadioGroup = class {
|
|
|
1277
1367
|
index.registerInstance(this, hostRef);
|
|
1278
1368
|
this.change = index.createEvent(this, "sdUpdate", 7);
|
|
1279
1369
|
}
|
|
1280
|
-
/** 현재 선택된 값 */
|
|
1370
|
+
/** 현재 선택된 값 (미지정 시 선택 없음) */
|
|
1281
1371
|
value;
|
|
1282
1372
|
/** 라디오 옵션 목록 */
|
|
1283
1373
|
options = [];
|
|
@@ -1305,8 +1395,8 @@ const SdRadioGroup = class {
|
|
|
1305
1395
|
return classes.join(' ');
|
|
1306
1396
|
}
|
|
1307
1397
|
render() {
|
|
1308
|
-
return (index.h("div", { key: '
|
|
1309
|
-
return (index.h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: String(this.value), label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
|
|
1398
|
+
return (index.h("div", { key: '7ee8aaf1872ac215e7d4c27e71d4a0a41c6f5e4e', class: this.getGroupClasses(), role: "radiogroup" }, this.options.map(option => {
|
|
1399
|
+
return (index.h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: String(this.value ?? ''), label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
|
|
1310
1400
|
})));
|
|
1311
1401
|
}
|
|
1312
1402
|
static get watchers() { return {
|
|
@@ -1317,6 +1407,314 @@ const SdRadioGroup = class {
|
|
|
1317
1407
|
};
|
|
1318
1408
|
SdRadioGroup.style = sdRadioGroupCss();
|
|
1319
1409
|
|
|
1410
|
+
const sdSelectCss = () => `sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}`;
|
|
1411
|
+
|
|
1412
|
+
const SdSelect = class {
|
|
1413
|
+
constructor(hostRef) {
|
|
1414
|
+
index.registerInstance(this, hostRef);
|
|
1415
|
+
this.update = index.createEvent(this, "sdUpdate", 7);
|
|
1416
|
+
this.dropDownShow = index.createEvent(this, "sdDropDownShow", 7);
|
|
1417
|
+
}
|
|
1418
|
+
static VIEWPORT_PADDING = 20;
|
|
1419
|
+
static PORTAL_OFFSET_Y = 4;
|
|
1420
|
+
static CLOSE_ANIMATION_DURATION = 150;
|
|
1421
|
+
get el() { return index.getElement(this); }
|
|
1422
|
+
/** 셀렉트 타입 (단일/다중/계층) */
|
|
1423
|
+
type = 'default';
|
|
1424
|
+
/** 현재 선택된 값 */
|
|
1425
|
+
value = null;
|
|
1426
|
+
/** 선택 옵션 목록 */
|
|
1427
|
+
options = [];
|
|
1428
|
+
/** 값이 없을 때 표시할 플레이스홀더 */
|
|
1429
|
+
placeholder = '선택';
|
|
1430
|
+
/** 드롭다운 너비 (없으면 트리거 너비로 자동 맞춤) */
|
|
1431
|
+
dropdownWidth = '';
|
|
1432
|
+
/** 드롭다운 최대 너비 */
|
|
1433
|
+
maxDropdownWidth = '640px';
|
|
1434
|
+
/** 드롭다운 최대 높이 */
|
|
1435
|
+
dropdownHeight = '260px';
|
|
1436
|
+
/** 비활성 상태 여부 */
|
|
1437
|
+
disabled = false;
|
|
1438
|
+
/** 레이블 텍스트 */
|
|
1439
|
+
label = '';
|
|
1440
|
+
/** 레이블 너비 */
|
|
1441
|
+
labelWidth = '';
|
|
1442
|
+
/** 필드 우측 어드온 레이블 */
|
|
1443
|
+
addonLabel = '';
|
|
1444
|
+
/** 어드온 정렬 방향 */
|
|
1445
|
+
addonAlign = 'start';
|
|
1446
|
+
/** 에러 상태 여부 */
|
|
1447
|
+
error = false;
|
|
1448
|
+
/** 필드 하단 힌트 텍스트 */
|
|
1449
|
+
hint = '';
|
|
1450
|
+
/** 에러 메시지 */
|
|
1451
|
+
errorMessage = '';
|
|
1452
|
+
/** 유효성 검사 규칙 목록 */
|
|
1453
|
+
rules = [];
|
|
1454
|
+
/** 레이블 영역 아이콘 */
|
|
1455
|
+
icon = undefined;
|
|
1456
|
+
/** 레이블 툴팁 텍스트 */
|
|
1457
|
+
labelTooltip = '';
|
|
1458
|
+
/** 레이블 툴팁 상세 옵션 */
|
|
1459
|
+
labelTooltipProps = null;
|
|
1460
|
+
/** true이면 value로 SelectOption 대신 원시값(string|number) 방출 */
|
|
1461
|
+
emitValue = false;
|
|
1462
|
+
/** 필드 너비 */
|
|
1463
|
+
width = '';
|
|
1464
|
+
/** 드롭다운 내 검색 입력 표시 여부 */
|
|
1465
|
+
useSearch = false;
|
|
1466
|
+
/** 전체 선택 시 표시할 레이블 */
|
|
1467
|
+
allSelectedLabel = '전체';
|
|
1468
|
+
/** 전체 선택 체크박스 표시 여부 */
|
|
1469
|
+
useSelectAll = false;
|
|
1470
|
+
isOpen = false;
|
|
1471
|
+
isAnimatingOut = false;
|
|
1472
|
+
triggerWidth = '200px';
|
|
1473
|
+
resolvedDropdownHeight = '260px';
|
|
1474
|
+
resolvedMaxDropdownWidth = '640px';
|
|
1475
|
+
focused = false;
|
|
1476
|
+
hovered = false;
|
|
1477
|
+
/** 선택 값이 변경될 때 발생합니다. */
|
|
1478
|
+
update;
|
|
1479
|
+
/** 드롭다운 열림/닫힘 상태가 바뀔 때 발생합니다. */
|
|
1480
|
+
dropDownShow;
|
|
1481
|
+
/** 셀렉트 트리거에 포커스를 이동합니다. */
|
|
1482
|
+
async sdFocus() {
|
|
1483
|
+
if (this.disabled)
|
|
1484
|
+
return;
|
|
1485
|
+
await this.triggerComponentRef?.sdFocus();
|
|
1486
|
+
}
|
|
1487
|
+
/** 드롭다운을 엽니다. */
|
|
1488
|
+
async sdOpen() {
|
|
1489
|
+
// sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
|
|
1490
|
+
await new Promise(resolve => setTimeout(resolve, 0));
|
|
1491
|
+
if (this.disabled || this.isOpen)
|
|
1492
|
+
return;
|
|
1493
|
+
this.prepareDropdownGeometry();
|
|
1494
|
+
if (this.closeAnimationTimer)
|
|
1495
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1496
|
+
this.isAnimatingOut = false;
|
|
1497
|
+
this.isOpen = true;
|
|
1498
|
+
}
|
|
1499
|
+
triggerRef;
|
|
1500
|
+
triggerComponentRef;
|
|
1501
|
+
closeAnimationTimer;
|
|
1502
|
+
/** 폼 연동용 name 속성 */
|
|
1503
|
+
name = index$1.nanoid();
|
|
1504
|
+
triggerHasFocus = false;
|
|
1505
|
+
watchIsOpen(newValue) {
|
|
1506
|
+
this.syncFocusedState(newValue);
|
|
1507
|
+
this.dropDownShow.emit({ isOpen: newValue });
|
|
1508
|
+
}
|
|
1509
|
+
get isMulti() {
|
|
1510
|
+
return this.type === 'multi' || this.type === 'multi_depth';
|
|
1511
|
+
}
|
|
1512
|
+
get displayText() {
|
|
1513
|
+
if (this.isMulti) {
|
|
1514
|
+
if (!Array.isArray(this.value) || this.value.length === 0)
|
|
1515
|
+
return '';
|
|
1516
|
+
const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
|
|
1517
|
+
const selected = this.getSelectedOptions();
|
|
1518
|
+
const allSelected = nonDisabledLeaves.length > 0 &&
|
|
1519
|
+
nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
|
|
1520
|
+
if (allSelected)
|
|
1521
|
+
return this.allSelectedLabel ?? '전체';
|
|
1522
|
+
const flat = this.flattenOptions(this.options);
|
|
1523
|
+
return this.value
|
|
1524
|
+
.map(item => {
|
|
1525
|
+
if (item != null && typeof item === 'object') {
|
|
1526
|
+
const opt = item;
|
|
1527
|
+
return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
|
|
1528
|
+
}
|
|
1529
|
+
return flat.find(o => o.value === item)?.label ?? '';
|
|
1530
|
+
})
|
|
1531
|
+
.filter(Boolean)
|
|
1532
|
+
.join(', ');
|
|
1533
|
+
}
|
|
1534
|
+
if (this.value == null)
|
|
1535
|
+
return '';
|
|
1536
|
+
if (!this.emitValue && typeof this.value === 'object' && !Array.isArray(this.value)) {
|
|
1537
|
+
return this.value.label ?? '';
|
|
1538
|
+
}
|
|
1539
|
+
const flat = this.flattenOptions(this.options);
|
|
1540
|
+
return flat.find(o => o.value === this.value)?.label ?? '';
|
|
1541
|
+
}
|
|
1542
|
+
flattenOptions(options) {
|
|
1543
|
+
return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
|
|
1544
|
+
}
|
|
1545
|
+
getNonDisabledLeaves(options) {
|
|
1546
|
+
return options.flatMap(o => {
|
|
1547
|
+
if (o.disabled)
|
|
1548
|
+
return [];
|
|
1549
|
+
if (o.children)
|
|
1550
|
+
return this.getNonDisabledLeaves(o.children);
|
|
1551
|
+
return [o];
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
getSelectedOptions() {
|
|
1555
|
+
const val = this.value;
|
|
1556
|
+
if (val == null || !Array.isArray(val))
|
|
1557
|
+
return [];
|
|
1558
|
+
if (this.emitValue) {
|
|
1559
|
+
return val
|
|
1560
|
+
.map(v => this.findOriginalOption(v, this.options))
|
|
1561
|
+
.filter((o) => !!o);
|
|
1562
|
+
}
|
|
1563
|
+
return val;
|
|
1564
|
+
}
|
|
1565
|
+
toMultiValue(options) {
|
|
1566
|
+
return this.emitValue ? options.map(o => o.value) : options;
|
|
1567
|
+
}
|
|
1568
|
+
parsePixelValue(value, fallback) {
|
|
1569
|
+
const parsed = Number.parseFloat(value);
|
|
1570
|
+
return Number.isFinite(parsed) ? parsed : fallback;
|
|
1571
|
+
}
|
|
1572
|
+
updateDropdownViewportConstraints() {
|
|
1573
|
+
if (!this.triggerRef)
|
|
1574
|
+
return;
|
|
1575
|
+
const triggerRect = this.triggerRef.getBoundingClientRect();
|
|
1576
|
+
const viewportPadding = SdSelect.VIEWPORT_PADDING;
|
|
1577
|
+
const offsetY = SdSelect.PORTAL_OFFSET_Y;
|
|
1578
|
+
const preferredHeight = this.parsePixelValue(this.dropdownHeight, 260);
|
|
1579
|
+
const preferredWidth = this.parsePixelValue(this.maxDropdownWidth, 640);
|
|
1580
|
+
const availableBelow = Math.max(window.innerHeight - triggerRect.bottom - viewportPadding - offsetY, 0);
|
|
1581
|
+
const availableAbove = Math.max(triggerRect.top - viewportPadding - offsetY, 0);
|
|
1582
|
+
const availableHeight = Math.max(availableBelow, availableAbove);
|
|
1583
|
+
const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
|
|
1584
|
+
this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
|
|
1585
|
+
this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
|
|
1586
|
+
}
|
|
1587
|
+
handleViewportResize = () => {
|
|
1588
|
+
if (!this.isOpen)
|
|
1589
|
+
return;
|
|
1590
|
+
this.updateDropdownViewportConstraints();
|
|
1591
|
+
};
|
|
1592
|
+
findOriginalOption(value, options) {
|
|
1593
|
+
for (const opt of options) {
|
|
1594
|
+
if (opt.value === value)
|
|
1595
|
+
return opt;
|
|
1596
|
+
if (opt.children) {
|
|
1597
|
+
const found = this.findOriginalOption(value, opt.children);
|
|
1598
|
+
if (found)
|
|
1599
|
+
return found;
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
return undefined;
|
|
1603
|
+
}
|
|
1604
|
+
closeDropdown() {
|
|
1605
|
+
if (!this.isOpen)
|
|
1606
|
+
return;
|
|
1607
|
+
this.isOpen = false;
|
|
1608
|
+
this.isAnimatingOut = true;
|
|
1609
|
+
if (this.closeAnimationTimer)
|
|
1610
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1611
|
+
this.closeAnimationTimer = setTimeout(() => {
|
|
1612
|
+
this.isAnimatingOut = false;
|
|
1613
|
+
}, SdSelect.CLOSE_ANIMATION_DURATION);
|
|
1614
|
+
}
|
|
1615
|
+
prepareDropdownGeometry() {
|
|
1616
|
+
if (this.triggerRef) {
|
|
1617
|
+
this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
|
|
1618
|
+
}
|
|
1619
|
+
this.updateDropdownViewportConstraints();
|
|
1620
|
+
}
|
|
1621
|
+
syncFocusedState(isOpen = this.isOpen) {
|
|
1622
|
+
this.focused = isOpen || this.triggerHasFocus;
|
|
1623
|
+
}
|
|
1624
|
+
handleTriggerFocus = () => {
|
|
1625
|
+
this.triggerHasFocus = true;
|
|
1626
|
+
this.syncFocusedState();
|
|
1627
|
+
};
|
|
1628
|
+
handleTriggerBlur = () => {
|
|
1629
|
+
this.triggerHasFocus = false;
|
|
1630
|
+
this.syncFocusedState();
|
|
1631
|
+
};
|
|
1632
|
+
handleTriggerClick = () => {
|
|
1633
|
+
if (this.isOpen) {
|
|
1634
|
+
this.closeDropdown();
|
|
1635
|
+
return;
|
|
1636
|
+
}
|
|
1637
|
+
this.prepareDropdownGeometry();
|
|
1638
|
+
if (this.closeAnimationTimer)
|
|
1639
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1640
|
+
this.isAnimatingOut = false;
|
|
1641
|
+
this.isOpen = true;
|
|
1642
|
+
};
|
|
1643
|
+
emitUpdate(value) {
|
|
1644
|
+
this.update.emit(value);
|
|
1645
|
+
}
|
|
1646
|
+
handleOptionSelect = (detail) => {
|
|
1647
|
+
const { option, leaves } = detail;
|
|
1648
|
+
if (this.isMulti) {
|
|
1649
|
+
this.handleMultiSelect(option, leaves);
|
|
1650
|
+
}
|
|
1651
|
+
else {
|
|
1652
|
+
this.closeDropdown();
|
|
1653
|
+
this.value = this.emitValue ? option.value : option;
|
|
1654
|
+
const nextValue = this.value;
|
|
1655
|
+
requestAnimationFrame(() => {
|
|
1656
|
+
this.emitUpdate(nextValue);
|
|
1657
|
+
});
|
|
1658
|
+
}
|
|
1659
|
+
};
|
|
1660
|
+
handleMultiSelect(option, leaves) {
|
|
1661
|
+
const selected = this.getSelectedOptions();
|
|
1662
|
+
const isGroup = !!option.children;
|
|
1663
|
+
let newSelected;
|
|
1664
|
+
if (isGroup) {
|
|
1665
|
+
const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
|
|
1666
|
+
if (allSelected) {
|
|
1667
|
+
const leafValues = new Set(leaves.map(l => l.value));
|
|
1668
|
+
newSelected = selected.filter(s => !leafValues.has(s.value));
|
|
1669
|
+
}
|
|
1670
|
+
else {
|
|
1671
|
+
const existing = new Set(selected.map(s => s.value));
|
|
1672
|
+
const toAdd = leaves.filter(l => !existing.has(l.value));
|
|
1673
|
+
newSelected = [...selected, ...toAdd];
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
else {
|
|
1677
|
+
const exists = selected.some(s => s.value === option.value);
|
|
1678
|
+
newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
|
|
1679
|
+
}
|
|
1680
|
+
this.value = this.toMultiValue(newSelected);
|
|
1681
|
+
this.emitUpdate(this.value);
|
|
1682
|
+
}
|
|
1683
|
+
connectedCallback() {
|
|
1684
|
+
window.addEventListener('resize', this.handleViewportResize);
|
|
1685
|
+
}
|
|
1686
|
+
disconnectedCallback() {
|
|
1687
|
+
window.removeEventListener('resize', this.handleViewportResize);
|
|
1688
|
+
if (this.closeAnimationTimer)
|
|
1689
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1690
|
+
}
|
|
1691
|
+
render() {
|
|
1692
|
+
const portalProps = {
|
|
1693
|
+
open: this.isOpen,
|
|
1694
|
+
parentRef: this.triggerRef,
|
|
1695
|
+
viewportPadding: SdSelect.VIEWPORT_PADDING,
|
|
1696
|
+
onSdClose: () => {
|
|
1697
|
+
this.closeDropdown();
|
|
1698
|
+
},
|
|
1699
|
+
};
|
|
1700
|
+
return (index.h("sd-field", { key: 'a8107af7c63f38eee519b44e33021f3d650c97a4', 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, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
|
|
1701
|
+
this.hovered = true;
|
|
1702
|
+
}, onMouseLeave: () => {
|
|
1703
|
+
this.hovered = false;
|
|
1704
|
+
} }, index.h("div", { key: 'd1b3c4d6f1da7ca9eeb31a19db7dd7b28a94103d', class: "sd-select", ref: el => {
|
|
1705
|
+
this.triggerRef = el;
|
|
1706
|
+
} }, index.h("sd-select-trigger", { key: 'c2ce229c398cf35aa1cdc58a12eb7ed81f316d0d', ref: el => {
|
|
1707
|
+
this.triggerComponentRef = el;
|
|
1708
|
+
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: '1f67ba5abb693d49b2e332edb991bf89edbc2456', ...portalProps }, index.h("sd-select-listbox", { key: '108acb8763dc0cf4bd7e807643140a9f41381248', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.dropdownWidth || this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
|
|
1709
|
+
}
|
|
1710
|
+
static get watchers() { return {
|
|
1711
|
+
"isOpen": [{
|
|
1712
|
+
"watchIsOpen": 0
|
|
1713
|
+
}]
|
|
1714
|
+
}; }
|
|
1715
|
+
};
|
|
1716
|
+
SdSelect.style = sdSelectCss();
|
|
1717
|
+
|
|
1320
1718
|
const TEXTAREA_TOKENS = {
|
|
1321
1719
|
paddingX: component_textinput.inputTokens.textinput.sm.paddingX,
|
|
1322
1720
|
paddingY: component_textinput.inputTokens.textinput.sm.paddingY,
|
|
@@ -1477,7 +1875,7 @@ const SdTextarea = class {
|
|
|
1477
1875
|
'--sd-system-size-field-sm-height': 'auto',
|
|
1478
1876
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
1479
1877
|
};
|
|
1480
|
-
return (index.h("sd-field", { key: '
|
|
1878
|
+
return (index.h("sd-field", { key: 'f8fd8949824938bb79f101de2e5eca7980224b09', 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, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, index.h("div", { key: '382441be15dd047888cf876006f1966256a503b7', class: "sd-textarea__content" }, index.h("textarea", { key: '5f5985ccdcc401f4aff2f47fe40003abeb76e8b3', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
|
|
1481
1879
|
}
|
|
1482
1880
|
static get watchers() { return {
|
|
1483
1881
|
"value": [{
|
|
@@ -1496,4 +1894,5 @@ exports.sd_file_picker = SdFilePicker;
|
|
|
1496
1894
|
exports.sd_input = SdInput;
|
|
1497
1895
|
exports.sd_number_input = SdNumberInput;
|
|
1498
1896
|
exports.sd_radio_group = SdRadioGroup;
|
|
1897
|
+
exports.sd_select = SdSelect;
|
|
1499
1898
|
exports.sd_textarea = SdTextarea;
|