@sellmate/design-system 1.27.1 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component.datepicker-CUQbDSku.js → component.datepicker-zFTQQKMH.js} +1 -2
- package/dist/cjs/component.listBox-MHAv4Yy7.js +15 -0
- package/dist/cjs/{component.listItem-Bnh0r_CA.js → component.listItem-cAO_ppOz.js} +0 -7
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-DsYLSqCp.js → index-iiJZMzVM.js} +1 -15
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +2 -3
- package/dist/cjs/sd-chip-input.cjs.entry.js +5 -4
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +6 -4
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +37 -37
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/{sd-date-picker.config-De7ahWIs.js → sd-date-picker.config-Chrd8c4v.js} +1 -1
- package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +381 -19
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +4 -4
- 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 +10 -10
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +4 -5
- package/dist/cjs/sd-guide.cjs.entry.js +5 -10
- 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 +2 -2
- package/dist/cjs/sd-popup.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +2 -3
- package/dist/cjs/{sd-select_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -314
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
- 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-FLiD3ceS.js → tooltipArrow-DOOcBlLp.js} +1 -1
- package/dist/cjs/{useDatePicker-iMd6WToc.js → useDatePicker-CgpIfwLA.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.css +13 -0
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +23 -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 +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.js +4 -4
- package/dist/collection/components/sd-file-picker/sd-file-picker.config.js +9 -0
- package/dist/collection/components/sd-file-picker/sd-file-picker.css +18 -0
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +73 -7
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +1 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-guide/sd-guide.config.js +0 -1
- package/dist/collection/components/sd-guide/sd-guide.css +0 -3
- package/dist/collection/components/sd-guide/sd-guide.js +2 -3
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- 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.css +7 -0
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +18 -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 +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.css +2 -2
- 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 +1 -1
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/p-4S0_Ykmo.js +1 -0
- package/dist/components/{p-Dy6LmOzw.js → p-9Ap2W-Mi.js} +1 -1
- package/dist/components/{p-NeXvaRu7.js → p-BFVfSW9t.js} +1 -1
- package/dist/components/{p-Du_Yc-lW.js → p-BHjezpAC.js} +1 -1
- package/dist/components/{p-DnxEeX9I.js → p-BIEPMPWA.js} +1 -1
- package/dist/components/{p--AZbwi7P.js → p-BKu0I6Io.js} +1 -1
- package/dist/components/{p-DTb2c83G.js → p-B_Zwr4Et.js} +1 -1
- package/dist/components/{p-BysikR_g.js → p-Bpv90tfa.js} +1 -1
- package/dist/components/p-Bth2l1cy.js +1 -0
- package/dist/components/{p-Cok_EW_N.js → p-C7mC7a1z.js} +1 -1
- package/dist/components/{p-CIPPETF-.js → p-CBoDoYDO.js} +1 -1
- package/dist/components/p-CErFctrV.js +1 -0
- package/dist/components/{p-SROa9QCy.js → p-CFTyEfB9.js} +1 -1
- package/dist/components/{p-BaRjXqSM.js → p-CSr33M9s.js} +1 -1
- package/dist/components/p-CYMMLsGt.js +1 -0
- package/dist/components/{p-CvSPsoRb.js → p-C_SG4M4z.js} +1 -1
- package/dist/components/{p-BV4cnHWn.js → p-C_in6AVN.js} +1 -1
- package/dist/components/{p-DsQQFJ8o.js → p-CbS69IvC.js} +1 -1
- package/dist/components/{p-BOJALVxB.js → p-CgSXYw_0.js} +1 -1
- package/dist/components/{p-DVq9oE_p.js → p-CmRF12Fy.js} +1 -1
- package/dist/components/p-CnRfET5y.js +1 -0
- package/dist/components/{p-BFy8txYj.js → p-Cvsrc0be.js} +1 -1
- package/dist/components/{p-PvltLPHp.js → p-DJ8z7_EG.js} +1 -1
- package/dist/components/{p-CwwJD-NF.js → p-DJmxpVkK.js} +1 -1
- package/dist/components/{p-D7XGOtx0.js → p-DMoFncVl.js} +1 -1
- package/dist/components/{p-BxphFsxh.js → p-DN7MAx-q.js} +1 -1
- package/dist/components/{p-hP1aeMuZ.js → p-DS6NVBvu.js} +1 -1
- package/dist/components/{p-Bk6aI8rL.js → p-D_56BjcD.js} +1 -1
- package/dist/components/{p-DMrzTImA.js → p-Dg1UrMqI.js} +1 -1
- package/dist/components/{p-BU1H7ElF.js → p-Di1q4f5E.js} +1 -1
- package/dist/components/p-DlJaYVWf.js +1 -0
- package/dist/components/p-OO7xxhkC.js +1 -0
- package/dist/components/{p-DYp8I4VH.js → p-R-Sdglj0.js} +1 -1
- package/dist/components/p-Uh9emYrV.js +1 -0
- package/dist/components/{p-DkaajrxX.js → p-f0aBxUBG.js} +1 -1
- package/dist/components/{p-DT-e9J59.js → p-idG6CMO0.js} +1 -1
- package/dist/components/p-oYbVr-z0.js +1 -0
- package/dist/components/p-x9AWBHPy.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-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-ddb9a2c4.entry.js → p-02f0b906.entry.js} +1 -1
- package/dist/design-system/{p-a4e1dd8c.entry.js → p-0c1d1a15.entry.js} +1 -1
- package/dist/design-system/{p-cb0cbcb0.entry.js → p-0e014b76.entry.js} +1 -1
- package/dist/design-system/{p-49b1636a.entry.js → p-1b5fcf7b.entry.js} +1 -1
- package/dist/design-system/{p-5aa5aec3.entry.js → p-1ed1bfa1.entry.js} +1 -1
- package/dist/design-system/{p-8c1a9374.entry.js → p-246aafb9.entry.js} +1 -1
- package/dist/design-system/p-26a27312.entry.js +1 -0
- package/dist/design-system/{p-d790fbb8.entry.js → p-2a4d2ee0.entry.js} +1 -1
- package/dist/design-system/{p-270c8529.entry.js → p-2d6a7d7b.entry.js} +1 -1
- package/dist/design-system/{p-947dcc28.entry.js → p-3595cafb.entry.js} +1 -1
- package/dist/design-system/p-3cd2751a.entry.js +1 -0
- package/dist/design-system/p-4S0_Ykmo.js +1 -0
- package/dist/design-system/p-4b474538.entry.js +1 -0
- package/dist/design-system/{p-e63bf0e1.entry.js → p-4c85f6f6.entry.js} +1 -1
- package/dist/design-system/{p-55c8ce37.entry.js → p-53fe2741.entry.js} +1 -1
- package/dist/design-system/{p-06b56059.entry.js → p-55c0be7d.entry.js} +1 -1
- package/dist/design-system/p-5a257ed9.entry.js +1 -0
- package/dist/design-system/{p-459a408f.entry.js → p-840006b1.entry.js} +1 -1
- package/dist/design-system/{p-dae6914d.entry.js → p-86329ae3.entry.js} +1 -1
- package/dist/design-system/{p-8ac340db.entry.js → p-8de3b502.entry.js} +1 -1
- package/dist/design-system/{p-9603971e.entry.js → p-8ed1d470.entry.js} +1 -1
- package/dist/design-system/{p-D2S9Zafz.js → p-B91K50wC.js} +1 -1
- package/dist/design-system/{p-BqWuC4-J.js → p-BPKiBSGr.js} +1 -1
- package/dist/design-system/p-BhcvMs8c.js +1 -0
- package/dist/design-system/p-Bth2l1cy.js +1 -0
- package/dist/design-system/p-DlJaYVWf.js +1 -0
- package/dist/design-system/p-Dz490Ukt.js +2 -0
- package/dist/design-system/{p-761c008c.entry.js → p-a631cd78.entry.js} +1 -1
- package/dist/design-system/p-adf2f398.entry.js +1 -0
- package/dist/design-system/{p-26297c6e.entry.js → p-b585f94b.entry.js} +1 -1
- package/dist/design-system/p-be54fd3a.entry.js +1 -0
- package/dist/design-system/{p-7540f591.entry.js → p-c1066f40.entry.js} +1 -1
- package/dist/design-system/{p-b86a69ce.entry.js → p-c5cffcc6.entry.js} +1 -1
- package/dist/design-system/p-c7d2c195.entry.js +1 -0
- package/dist/design-system/{p-839e6b5a.entry.js → p-cb6ab65c.entry.js} +1 -1
- package/dist/design-system/{p-07755193.entry.js → p-d204cac5.entry.js} +1 -1
- package/dist/design-system/p-d2ce01ac.entry.js +1 -0
- package/dist/design-system/p-d51f4170.entry.js +1 -0
- package/dist/design-system/{p-dfa16f49.entry.js → p-d9f33192.entry.js} +1 -1
- package/dist/design-system/{p-b9387621.entry.js → p-e7740a5f.entry.js} +1 -1
- package/dist/design-system/p-e85bf462.entry.js +1 -0
- package/dist/design-system/{p-9c0d3011.entry.js → p-ea008087.entry.js} +1 -1
- package/dist/design-system/{p-5142cd06.entry.js → p-ec4ad48c.entry.js} +1 -1
- package/dist/design-system/{p-5f1dae23.entry.js → p-f962e5d2.entry.js} +1 -1
- package/dist/esm/{component.datepicker-laVsm9VM.js → component.datepicker-BOxGhKKP.js} +1 -2
- package/dist/esm/component.listBox-DlJaYVWf.js +13 -0
- package/dist/esm/{component.listItem-U8VaRj9c.js → component.listItem-4S0_Ykmo.js} +1 -7
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-BZg-6aSz.js → index-Dz490Ukt.js} +2 -14
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-button_2.entry.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +6 -6
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +2 -3
- package/dist/esm/sd-chip-input.entry.js +4 -3
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +6 -4
- package/dist/esm/sd-confirm-modal_2.entry.js +37 -37
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/{sd-date-picker.config-D-ks6qNf.js → sd-date-picker.config-krRuSUsA.js} +1 -1
- package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +381 -20
- package/dist/esm/sd-date-range-picker-calendar.entry.js +4 -4
- 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 +10 -10
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +4 -5
- package/dist/esm/sd-guide.entry.js +5 -10
- 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 +2 -2
- package/dist/esm/sd-popup.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +2 -3
- package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -298
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +1 -1
- 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-BAi-pktU.js → tooltipArrow-CEHVt90h.js} +1 -1
- package/dist/esm/{useDatePicker-DoUg--aq.js → useDatePicker-BG0lUGJG.js} +1 -1
- package/dist/types/components/sd-circle-progress/sd-circle-progress.d.ts +2 -0
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +10 -10
- package/dist/types/components/sd-file-picker/sd-file-picker.config.d.ts +6 -0
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +10 -0
- package/dist/types/components/sd-guide/sd-guide.config.d.ts +0 -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-loading-modal/sd-loading-modal.d.ts +2 -0
- 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.d.ts +44 -696
- package/dist/types/index.d.ts +0 -1
- package/hydrate/index.js +254 -2235
- package/hydrate/index.mjs +254 -2235
- package/package.json +1 -1
- package/dist/cjs/component.table-BrI3b--h.js +0 -71
- package/dist/cjs/constants-DJRV1upE.js +0 -5
- package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -856
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -172
- package/dist/cjs/sd-select.config-C9Ohe1QA.js +0 -143
- package/dist/cjs/sd-table.cjs.entry.js +0 -956
- package/dist/cjs/sd-table.config-DzC55sap.js +0 -82
- package/dist/cjs/sd-td.cjs.entry.js +0 -201
- package/dist/collection/components/sd-table/constants.js +0 -1
- package/dist/collection/components/sd-table/sd-table.config.js +0 -87
- 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 -528
- package/dist/components/p-BHNytAtJ.js +0 -1
- package/dist/components/p-BJfiMC9H.js +0 -1
- package/dist/components/p-BQqXWtI6.js +0 -1
- package/dist/components/p-BXcizROm.js +0 -1
- package/dist/components/p-BZdgdRXJ.js +0 -1
- package/dist/components/p-CJcs7kNH.js +0 -1
- package/dist/components/p-CV5LiFKt.js +0 -1
- package/dist/components/p-CiTn4ZiI.js +0 -1
- package/dist/components/p-CmK45nj3.js +0 -1
- package/dist/components/p-D9tQwTWy.js +0 -1
- package/dist/components/p-DeXLIS7e.js +0 -1
- package/dist/components/p-DmC83_E9.js +0 -1
- package/dist/components/p-DvvGi4J_.js +0 -1
- package/dist/components/p-U8VaRj9c.js +0 -1
- package/dist/components/p-jwusYvH0.js +0 -1
- package/dist/components/p-sZMi_32I.js +0 -1
- package/dist/components/sd-table.d.ts +0 -11
- 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.d.ts +0 -11
- package/dist/components/sd-td.js +0 -1
- package/dist/components/sd-thead.d.ts +0 -11
- 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-147e0413.entry.js +0 -1
- package/dist/design-system/p-51c7839c.entry.js +0 -1
- package/dist/design-system/p-5f5f2fbe.entry.js +0 -1
- package/dist/design-system/p-65285327.entry.js +0 -1
- package/dist/design-system/p-6aec5853.entry.js +0 -1
- package/dist/design-system/p-80abdfe7.entry.js +0 -1
- package/dist/design-system/p-9825e76c.entry.js +0 -1
- package/dist/design-system/p-B-LOf2aM.js +0 -1
- package/dist/design-system/p-BJfiMC9H.js +0 -1
- package/dist/design-system/p-BXcizROm.js +0 -1
- package/dist/design-system/p-BZg-6aSz.js +0 -2
- package/dist/design-system/p-CAFz8W8_.js +0 -1
- package/dist/design-system/p-D9tQwTWy.js +0 -1
- package/dist/design-system/p-U8VaRj9c.js +0 -1
- package/dist/design-system/p-b84f5550.entry.js +0 -1
- package/dist/design-system/p-edfb5c83.entry.js +0 -1
- package/dist/design-system/p-efc55114.entry.js +0 -1
- package/dist/design-system/p-fd671afe.entry.js +0 -1
- package/dist/design-system/p-fe2b853f.entry.js +0 -1
- package/dist/design-system/p-ff9ccbf6.entry.js +0 -1
- package/dist/design-system/p-sZMi_32I.js +0 -1
- package/dist/esm/component.table-D9tQwTWy.js +0 -69
- package/dist/esm/constants-sZMi_32I.js +0 -3
- package/dist/esm/sd-pagination_4.entry.js +0 -851
- package/dist/esm/sd-select-list-item_2.entry.js +0 -169
- package/dist/esm/sd-select.config-D6ktrl7E.js +0 -128
- package/dist/esm/sd-table.config-BbIWNUE2.js +0 -69
- 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 -70
- 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/components/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
- /package/dist/design-system/{p-laVsm9VM.js → p-BOxGhKKP.js} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Dz490Ukt.js';
|
|
2
2
|
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
|
-
import { D as DATEPICKER_COLORS, a as DATEPICKER_SIZE_MAP } from './sd-date-picker.config-
|
|
3
|
+
import { D as DATEPICKER_COLORS, a as DATEPICKER_SIZE_MAP } from './sd-date-picker.config-krRuSUsA.js';
|
|
4
|
+
import { l as listBoxTokens } from './component.listBox-DlJaYVWf.js';
|
|
4
5
|
import { i as inputTokens } from './component.textinput-e0ABNkP6.js';
|
|
5
6
|
import { f as fieldTokens } from './component.field-DjKOoQuF.js';
|
|
6
|
-
import './component.datepicker-
|
|
7
|
+
import './component.datepicker-BOxGhKKP.js';
|
|
7
8
|
|
|
8
9
|
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%}`;
|
|
9
10
|
|
|
@@ -127,9 +128,9 @@ const SdDatePicker = class {
|
|
|
127
128
|
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
128
129
|
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
129
130
|
};
|
|
130
|
-
return (h("sd-field", { key: '
|
|
131
|
+
return (h("sd-field", { key: 'f6fe03d9c87b8de3d33d641934b28f1e42a1b23a', 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, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '0d77d31b48f1ee8f87f7e59f472b0335f19b00be', class: "sd-date-picker", ref: el => {
|
|
131
132
|
this.triggerRef = el;
|
|
132
|
-
} }, h("sd-date-picker-trigger", { key: '
|
|
133
|
+
} }, h("sd-date-picker-trigger", { key: '003de27ec2c3c660b1c183f10af02d6d982a6069', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '719f5f0a191286d2f2d06ca41c5746f6dea569e3', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-calendar", { key: 'd4a62d31666f21f6fb9d03f09cf36d16acc1c8a9', elevated: true, value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
133
134
|
}
|
|
134
135
|
static get watchers() { return {
|
|
135
136
|
"isOpen": [{
|
|
@@ -321,8 +322,16 @@ const FILE_PICKER_COLORS = {
|
|
|
321
322
|
disabled: fp.icon.disabled,
|
|
322
323
|
},
|
|
323
324
|
};
|
|
325
|
+
// useMultipleListBox 모드에서 파일 칩을 담는 floating 리스트박스 카드
|
|
326
|
+
// (sd-select-listbox 와 동일한 배경/radius/그림자 토큰 사용)
|
|
327
|
+
const FILE_PICKER_LIST_BOX = {
|
|
328
|
+
radius: listBoxTokens.listBox.radius,
|
|
329
|
+
bg: listBoxTokens.listBox.bg,
|
|
330
|
+
chipPadding: listBoxTokens.listBox.chip.paddingXY,
|
|
331
|
+
chipGap: listBoxTokens.listBox.chip.gap,
|
|
332
|
+
};
|
|
324
333
|
|
|
325
|
-
const sdFilePickerCss = () => `sd-file-picker{display:flex;flex-direction:column;width:100%}.sd-file-picker__wrapper{display:flex;flex-direction:column;width:100%}.sd-file-picker__chip-list{display:flex;flex-flow:row wrap;gap:8px;margin-top:8px}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{padding:0}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:not(.sd-file-picker--inline-disabled) .sd-file-picker__content:hover .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}`;
|
|
334
|
+
const sdFilePickerCss = () => `sd-file-picker{display:flex;flex-direction:column;width:100%}.sd-file-picker__wrapper{display:flex;flex-direction:column;width:100%}.sd-file-picker__chip-list{display:flex;flex-flow:row wrap;gap:8px;margin-top:8px}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__caret{flex-shrink:0;cursor:pointer;transition:transform 0.15s ease}.sd-file-picker__caret--open{transform:rotate(180deg)}.sd-file-picker__listbox{display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;max-width:100%;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1)}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{padding:0}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:not(.sd-file-picker--inline-disabled) .sd-file-picker__content:hover .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}`;
|
|
326
335
|
|
|
327
336
|
const SdFilePicker = class {
|
|
328
337
|
constructor(hostRef) {
|
|
@@ -341,6 +350,8 @@ const SdFilePicker = class {
|
|
|
341
350
|
inline = false;
|
|
342
351
|
/** 다중 파일 선택 여부 */
|
|
343
352
|
multiple = false;
|
|
353
|
+
/** multiple 파일 목록을 필드 아래 칩 대신, caret(▼) 클릭 시 열리는 리스트박스 카드로 표시 */
|
|
354
|
+
useMultipleListBox = false;
|
|
344
355
|
/** 허용할 파일 타입 (input accept 속성과 동일) */
|
|
345
356
|
accept;
|
|
346
357
|
/** 파일 한 개의 최대 크기 (bytes) */
|
|
@@ -384,9 +395,13 @@ const SdFilePicker = class {
|
|
|
384
395
|
hovered = false;
|
|
385
396
|
internalValue = null;
|
|
386
397
|
showTooltip = false;
|
|
398
|
+
isListboxOpen = false;
|
|
399
|
+
listboxWidth = '';
|
|
387
400
|
fileInputRef;
|
|
388
401
|
fileNamesRef;
|
|
402
|
+
contentRef;
|
|
389
403
|
formField;
|
|
404
|
+
static VIEWPORT_PADDING = 20;
|
|
390
405
|
/** 파일 선택 또는 삭제 시 현재 파일 값을 전달합니다. */
|
|
391
406
|
update;
|
|
392
407
|
/** 파일이 크기·개수 제한을 초과하여 거부됐을 때 발생합니다. */
|
|
@@ -488,6 +503,7 @@ const SdFilePicker = class {
|
|
|
488
503
|
this.value = clearedValue;
|
|
489
504
|
this.internalValue = clearedValue;
|
|
490
505
|
this.update?.emit(clearedValue);
|
|
506
|
+
this.isListboxOpen = false;
|
|
491
507
|
if (this.fileInputRef) {
|
|
492
508
|
this.fileInputRef.value = '';
|
|
493
509
|
}
|
|
@@ -497,6 +513,23 @@ const SdFilePicker = class {
|
|
|
497
513
|
return;
|
|
498
514
|
this.fileInputRef?.click();
|
|
499
515
|
};
|
|
516
|
+
/** caret(▼) 클릭 시 파일 목록 리스트박스를 토글한다. */
|
|
517
|
+
handleListboxToggle = (event) => {
|
|
518
|
+
event.stopPropagation();
|
|
519
|
+
if (this.disabled)
|
|
520
|
+
return;
|
|
521
|
+
if (this.isListboxOpen) {
|
|
522
|
+
this.isListboxOpen = false;
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
if (this.contentRef) {
|
|
526
|
+
this.listboxWidth = `${this.contentRef.offsetWidth}px`;
|
|
527
|
+
}
|
|
528
|
+
this.isListboxOpen = true;
|
|
529
|
+
};
|
|
530
|
+
closeListbox = () => {
|
|
531
|
+
this.isListboxOpen = false;
|
|
532
|
+
};
|
|
500
533
|
hasFiles() {
|
|
501
534
|
if (Array.isArray(this.internalValue)) {
|
|
502
535
|
return this.internalValue.length > 0;
|
|
@@ -522,12 +555,28 @@ const SdFilePicker = class {
|
|
|
522
555
|
this.internalValue = newFiles;
|
|
523
556
|
this.value = newFiles;
|
|
524
557
|
this.update?.emit(this.value);
|
|
558
|
+
// 리스트박스에서 마지막 파일을 지우면 caret 이 사라지므로 함께 닫는다.
|
|
559
|
+
if (newFiles.length === 0) {
|
|
560
|
+
this.isListboxOpen = false;
|
|
561
|
+
}
|
|
525
562
|
};
|
|
526
563
|
renderChipList() {
|
|
527
564
|
if (!this.hasChips())
|
|
528
565
|
return null;
|
|
529
566
|
return (h("div", { class: "sd-file-picker__chip-list" }, this.internalValue.map((file, index) => (h("sd-chip", { value: file.name, onSdRemove: () => this.handleChipRemove(index) })))));
|
|
530
567
|
}
|
|
568
|
+
renderListbox() {
|
|
569
|
+
if (!this.hasChips() || !this.isListboxOpen)
|
|
570
|
+
return null;
|
|
571
|
+
const listboxStyle = {
|
|
572
|
+
width: this.listboxWidth,
|
|
573
|
+
padding: `${FILE_PICKER_LIST_BOX.chipPadding}px`,
|
|
574
|
+
gap: `${FILE_PICKER_LIST_BOX.chipGap}px`,
|
|
575
|
+
borderRadius: `${FILE_PICKER_LIST_BOX.radius}px`,
|
|
576
|
+
background: FILE_PICKER_LIST_BOX.bg,
|
|
577
|
+
};
|
|
578
|
+
return (h("sd-portal", { open: this.isListboxOpen, parentRef: this.contentRef, viewportPadding: SdFilePicker.VIEWPORT_PADDING, onSdClose: this.closeListbox }, h("div", { class: "sd-file-picker__listbox", style: listboxStyle }, this.internalValue.map((file, index) => (h("sd-chip", { value: file.name, editable: false, onSdRemove: () => this.handleChipRemove(index) }))))));
|
|
579
|
+
}
|
|
531
580
|
checkOverflow() {
|
|
532
581
|
if (!this.fileNamesRef)
|
|
533
582
|
return;
|
|
@@ -553,21 +602,25 @@ const SdFilePicker = class {
|
|
|
553
602
|
'--sd-system-size-field-sm-height': `${FILE_PICKER_LAYOUT.height}px`,
|
|
554
603
|
'--sd-system-radius-field-sm': `${FILE_PICKER_LAYOUT.radius}px`,
|
|
555
604
|
};
|
|
556
|
-
const
|
|
605
|
+
const showListbox = this.multiple && this.useMultipleListBox;
|
|
606
|
+
const content = (h("div", { key: '932b5549b6b27e0fec8096127dd8fb09f682fe56', role: "button", tabindex: this.disabled ? -1 : 0, class: "sd-file-picker__content", ref: el => (this.contentRef = el), onClick: this.handleClick, onKeyDown: e => {
|
|
557
607
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
558
608
|
e.preventDefault();
|
|
559
609
|
this.handleClick();
|
|
560
610
|
}
|
|
561
|
-
} }, h("input", { key: '
|
|
611
|
+
} }, h("input", { key: 'd10a6a2bc0606954588cee4ad77898ad28cbbe75', 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' }), h("sd-icon", { key: '70102b5a6ff6606423ba36601015bccc2d48f22c', name: "attachFile", size: Number(FILE_PICKER_LAYOUT.iconSize), color: this.getIconColor(), class: "sd-file-picker__icon" }), h("div", { key: '7a0696f4f4b3ccd56c707bf2ecee59562ceb1a7b', ref: el => (this.fileNamesRef = el), class: {
|
|
562
612
|
'sd-file-picker__text': true,
|
|
563
613
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
564
614
|
'sd-file-picker__text--active': hasFiles,
|
|
565
|
-
} }, displayText), !this.disabled &&
|
|
566
|
-
|
|
615
|
+
} }, displayText), showListbox && hasFiles && !this.disabled && (h("sd-ghost-button", { key: 'a68ba1cd8dabf75279eba8993befef8dd03008ae', icon: "caretDown", size: "xxs", ariaLabel: "toggle file list", disabled: this.disabled, class: {
|
|
616
|
+
'sd-file-picker__caret': true,
|
|
617
|
+
'sd-file-picker__caret--open': this.isListboxOpen,
|
|
618
|
+
}, onClick: this.handleListboxToggle })), !this.disabled && hasFiles && (h("sd-ghost-button", { key: '6abcae4722ebbe7f888ce500774f3a749061ad4e', icon: "close", size: "xxs", ariaLabel: "clear", disabled: this.disabled, class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (h("div", { key: 'f1e3821eee58a1b126a6375a8d830a9fc9055cbe', class: "sd-file-picker__tooltip" }, displayText))));
|
|
619
|
+
return (h("div", { key: '952fbde18439ce103d62ede9e7b7a59dda408aa1', class: {
|
|
567
620
|
'sd-file-picker__wrapper': true,
|
|
568
621
|
'sd-file-picker--inline': this.inline,
|
|
569
622
|
'sd-file-picker--inline-disabled': this.inline && this.disabled,
|
|
570
|
-
}, style: cssVars }, h("sd-field", { key: '
|
|
623
|
+
}, style: cssVars }, h("sd-field", { key: '08ed598117f29d7c6977f75a73300c033bb6ec9d', borderless: this.inline, 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()));
|
|
571
624
|
}
|
|
572
625
|
static get watchers() { return {
|
|
573
626
|
"value": [{
|
|
@@ -763,12 +816,12 @@ const SdInput = class {
|
|
|
763
816
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
764
817
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
765
818
|
};
|
|
766
|
-
return (h("sd-field", { key: '
|
|
819
|
+
return (h("sd-field", { key: '5707ad3cdfd0194d4200899f3838e6e7ff03cb34', 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 }, h("label", { key: 'a5146f59435269a419c8273c72e7704a359108f0', class: "sd-input__content" }, h("slot", { key: 'cfa0393abc20439a7746e874215864d02d41ce17', name: "prefix" }), h("input", { key: 'bf7503a5701e237868c7be863f5d2653d074fb66', 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 }), h("slot", { key: 'bc16a709380137d6993753892e71cab33e0fc070', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && !this.readonly && (h("sd-ghost-button", { key: '4053ddc137f8d104a3e619f81ca2c99fd7e52a75', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
767
820
|
if (this.disabled || this.readonly)
|
|
768
821
|
return;
|
|
769
822
|
this.internalValue = '';
|
|
770
823
|
await this.formField?.sdValidate();
|
|
771
|
-
} })), this.type === 'password' && (h("sd-ghost-button", { key: '
|
|
824
|
+
} })), this.type === 'password' && (h("sd-ghost-button", { key: '7062bbfecd4289185dc847bca0524405d6f4bbfe', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled || this.readonly, class: "sd-input__password-icon", onClick: () => {
|
|
772
825
|
if (this.disabled || this.readonly)
|
|
773
826
|
return;
|
|
774
827
|
this.passwordVisible = !this.passwordVisible;
|
|
@@ -1192,15 +1245,15 @@ const SdNumberInput = class {
|
|
|
1192
1245
|
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
1193
1246
|
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
1194
1247
|
};
|
|
1195
|
-
return (h("sd-field", { key: '
|
|
1248
|
+
return (h("sd-field", { key: 'abfc6fbc218ed829eabbf33476e6feb25ed0b783', 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 }, h("div", { key: 'ab9f55eb4dcf8b345fae2e0546833f9d4216df1d', class: {
|
|
1196
1249
|
'sd-number-input__content': true,
|
|
1197
1250
|
'sd-number-input__content--no-stepper': !this.useButton,
|
|
1198
|
-
} }, this.useButton && (h("button", { key: '
|
|
1251
|
+
} }, this.useButton && (h("button", { key: '3a12f0c1c1963790b3337f34452d9bc200e072c1', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: 'cae2acccfb818a25a1d2c6abe8a0accdff293931', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
1199
1252
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
1200
|
-
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && h("span", { key: '
|
|
1253
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && h("span", { key: '37a2724e2973205cd9f0083d796c556aed8c50c6', class: "sd-number-input__prefix" }, this.inputPrefix), h("input", { key: '5d9bfccaa121f0bc3ecaac4d8db3023d1d03dd68', 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: {
|
|
1201
1254
|
textAlign: this.useButton ? 'center' : 'right',
|
|
1202
1255
|
...this.inputStyle,
|
|
1203
|
-
} }), this.inputSuffix && h("span", { key: '
|
|
1256
|
+
} }), this.inputSuffix && h("span", { key: 'ba990181e4b3d100087d20b177710f09b61f23cc', class: "sd-number-input__suffix" }, this.inputSuffix), this.useButton && (h("button", { key: '91666af2e343d3098bc020fb7266aa1e785783c3', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: '336ea010c7e9e314c98f56f4c79c86944087912e', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
1204
1257
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
1205
1258
|
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
1206
1259
|
}
|
|
@@ -1215,7 +1268,7 @@ const SdNumberInput = class {
|
|
|
1215
1268
|
};
|
|
1216
1269
|
SdNumberInput.style = sdNumberInputCss();
|
|
1217
1270
|
|
|
1218
|
-
const sdRadioGroupCss = () => `sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__label{font-weight:var(--sd-radio-selected-font-weight)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__label{color:var(--sd-radio-label-disabled-color)}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}sd-radio-group{display:inline-block}sd-radio-group .sd-radio-group{display:flex}sd-radio-group .sd-radio-group--vertical{flex-direction:column;gap:
|
|
1271
|
+
const sdRadioGroupCss = () => `sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__label{font-weight:var(--sd-radio-selected-font-weight)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__label{color:var(--sd-radio-label-disabled-color)}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}sd-radio-group{display:inline-block}sd-radio-group .sd-radio-group{display:flex}sd-radio-group .sd-radio-group--vertical{flex-direction:column;gap:var(--sd-radio-radio-group-gap-vertical)}sd-radio-group .sd-radio-group--horizontal{flex-direction:row;align-items:center;gap:var(--sd-radio-radio-group-gap-horizontal)}`;
|
|
1219
1272
|
|
|
1220
1273
|
const SdRadioGroup = class {
|
|
1221
1274
|
constructor(hostRef) {
|
|
@@ -1262,6 +1315,314 @@ const SdRadioGroup = class {
|
|
|
1262
1315
|
};
|
|
1263
1316
|
SdRadioGroup.style = sdRadioGroupCss();
|
|
1264
1317
|
|
|
1318
|
+
const sdSelectCss = () => `sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}`;
|
|
1319
|
+
|
|
1320
|
+
const SdSelect = class {
|
|
1321
|
+
constructor(hostRef) {
|
|
1322
|
+
registerInstance(this, hostRef);
|
|
1323
|
+
this.update = createEvent(this, "sdUpdate", 7);
|
|
1324
|
+
this.dropDownShow = createEvent(this, "sdDropDownShow", 7);
|
|
1325
|
+
}
|
|
1326
|
+
static VIEWPORT_PADDING = 20;
|
|
1327
|
+
static PORTAL_OFFSET_Y = 4;
|
|
1328
|
+
static CLOSE_ANIMATION_DURATION = 150;
|
|
1329
|
+
get el() { return getElement(this); }
|
|
1330
|
+
/** 셀렉트 타입 (단일/다중/계층) */
|
|
1331
|
+
type = 'default';
|
|
1332
|
+
/** 현재 선택된 값 */
|
|
1333
|
+
value = null;
|
|
1334
|
+
/** 선택 옵션 목록 */
|
|
1335
|
+
options = [];
|
|
1336
|
+
/** 값이 없을 때 표시할 플레이스홀더 */
|
|
1337
|
+
placeholder = '선택';
|
|
1338
|
+
/** 드롭다운 너비 (없으면 트리거 너비로 자동 맞춤) */
|
|
1339
|
+
dropdownWidth = '';
|
|
1340
|
+
/** 드롭다운 최대 너비 */
|
|
1341
|
+
maxDropdownWidth = '640px';
|
|
1342
|
+
/** 드롭다운 최대 높이 */
|
|
1343
|
+
dropdownHeight = '260px';
|
|
1344
|
+
/** 비활성 상태 여부 */
|
|
1345
|
+
disabled = false;
|
|
1346
|
+
/** 레이블 텍스트 */
|
|
1347
|
+
label = '';
|
|
1348
|
+
/** 레이블 너비 */
|
|
1349
|
+
labelWidth = '';
|
|
1350
|
+
/** 필드 우측 어드온 레이블 */
|
|
1351
|
+
addonLabel = '';
|
|
1352
|
+
/** 어드온 정렬 방향 */
|
|
1353
|
+
addonAlign = 'start';
|
|
1354
|
+
/** 에러 상태 여부 */
|
|
1355
|
+
error = false;
|
|
1356
|
+
/** 필드 하단 힌트 텍스트 */
|
|
1357
|
+
hint = '';
|
|
1358
|
+
/** 에러 메시지 */
|
|
1359
|
+
errorMessage = '';
|
|
1360
|
+
/** 유효성 검사 규칙 목록 */
|
|
1361
|
+
rules = [];
|
|
1362
|
+
/** 레이블 영역 아이콘 */
|
|
1363
|
+
icon = undefined;
|
|
1364
|
+
/** 레이블 툴팁 텍스트 */
|
|
1365
|
+
labelTooltip = '';
|
|
1366
|
+
/** 레이블 툴팁 상세 옵션 */
|
|
1367
|
+
labelTooltipProps = null;
|
|
1368
|
+
/** true이면 value로 SelectOption 대신 원시값(string|number) 방출 */
|
|
1369
|
+
emitValue = false;
|
|
1370
|
+
/** 필드 너비 */
|
|
1371
|
+
width = '';
|
|
1372
|
+
/** 드롭다운 내 검색 입력 표시 여부 */
|
|
1373
|
+
useSearch = false;
|
|
1374
|
+
/** 전체 선택 시 표시할 레이블 */
|
|
1375
|
+
allSelectedLabel = '전체';
|
|
1376
|
+
/** 전체 선택 체크박스 표시 여부 */
|
|
1377
|
+
useSelectAll = false;
|
|
1378
|
+
isOpen = false;
|
|
1379
|
+
isAnimatingOut = false;
|
|
1380
|
+
triggerWidth = '200px';
|
|
1381
|
+
resolvedDropdownHeight = '260px';
|
|
1382
|
+
resolvedMaxDropdownWidth = '640px';
|
|
1383
|
+
focused = false;
|
|
1384
|
+
hovered = false;
|
|
1385
|
+
/** 선택 값이 변경될 때 발생합니다. */
|
|
1386
|
+
update;
|
|
1387
|
+
/** 드롭다운 열림/닫힘 상태가 바뀔 때 발생합니다. */
|
|
1388
|
+
dropDownShow;
|
|
1389
|
+
/** 셀렉트 트리거에 포커스를 이동합니다. */
|
|
1390
|
+
async sdFocus() {
|
|
1391
|
+
if (this.disabled)
|
|
1392
|
+
return;
|
|
1393
|
+
await this.triggerComponentRef?.sdFocus();
|
|
1394
|
+
}
|
|
1395
|
+
/** 드롭다운을 엽니다. */
|
|
1396
|
+
async sdOpen() {
|
|
1397
|
+
// sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
|
|
1398
|
+
await new Promise(resolve => setTimeout(resolve, 0));
|
|
1399
|
+
if (this.disabled || this.isOpen)
|
|
1400
|
+
return;
|
|
1401
|
+
this.prepareDropdownGeometry();
|
|
1402
|
+
if (this.closeAnimationTimer)
|
|
1403
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1404
|
+
this.isAnimatingOut = false;
|
|
1405
|
+
this.isOpen = true;
|
|
1406
|
+
}
|
|
1407
|
+
triggerRef;
|
|
1408
|
+
triggerComponentRef;
|
|
1409
|
+
closeAnimationTimer;
|
|
1410
|
+
/** 폼 연동용 name 속성 */
|
|
1411
|
+
name = nanoid();
|
|
1412
|
+
triggerHasFocus = false;
|
|
1413
|
+
watchIsOpen(newValue) {
|
|
1414
|
+
this.syncFocusedState(newValue);
|
|
1415
|
+
this.dropDownShow.emit({ isOpen: newValue });
|
|
1416
|
+
}
|
|
1417
|
+
get isMulti() {
|
|
1418
|
+
return this.type === 'multi' || this.type === 'multi_depth';
|
|
1419
|
+
}
|
|
1420
|
+
get displayText() {
|
|
1421
|
+
if (this.isMulti) {
|
|
1422
|
+
if (!Array.isArray(this.value) || this.value.length === 0)
|
|
1423
|
+
return '';
|
|
1424
|
+
const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
|
|
1425
|
+
const selected = this.getSelectedOptions();
|
|
1426
|
+
const allSelected = nonDisabledLeaves.length > 0 &&
|
|
1427
|
+
nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
|
|
1428
|
+
if (allSelected)
|
|
1429
|
+
return this.allSelectedLabel ?? '전체';
|
|
1430
|
+
const flat = this.flattenOptions(this.options);
|
|
1431
|
+
return this.value
|
|
1432
|
+
.map(item => {
|
|
1433
|
+
if (item != null && typeof item === 'object') {
|
|
1434
|
+
const opt = item;
|
|
1435
|
+
return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
|
|
1436
|
+
}
|
|
1437
|
+
return flat.find(o => o.value === item)?.label ?? '';
|
|
1438
|
+
})
|
|
1439
|
+
.filter(Boolean)
|
|
1440
|
+
.join(', ');
|
|
1441
|
+
}
|
|
1442
|
+
if (this.value == null)
|
|
1443
|
+
return '';
|
|
1444
|
+
if (!this.emitValue && typeof this.value === 'object' && !Array.isArray(this.value)) {
|
|
1445
|
+
return this.value.label ?? '';
|
|
1446
|
+
}
|
|
1447
|
+
const flat = this.flattenOptions(this.options);
|
|
1448
|
+
return flat.find(o => o.value === this.value)?.label ?? '';
|
|
1449
|
+
}
|
|
1450
|
+
flattenOptions(options) {
|
|
1451
|
+
return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
|
|
1452
|
+
}
|
|
1453
|
+
getNonDisabledLeaves(options) {
|
|
1454
|
+
return options.flatMap(o => {
|
|
1455
|
+
if (o.disabled)
|
|
1456
|
+
return [];
|
|
1457
|
+
if (o.children)
|
|
1458
|
+
return this.getNonDisabledLeaves(o.children);
|
|
1459
|
+
return [o];
|
|
1460
|
+
});
|
|
1461
|
+
}
|
|
1462
|
+
getSelectedOptions() {
|
|
1463
|
+
const val = this.value;
|
|
1464
|
+
if (val == null || !Array.isArray(val))
|
|
1465
|
+
return [];
|
|
1466
|
+
if (this.emitValue) {
|
|
1467
|
+
return val
|
|
1468
|
+
.map(v => this.findOriginalOption(v, this.options))
|
|
1469
|
+
.filter((o) => !!o);
|
|
1470
|
+
}
|
|
1471
|
+
return val;
|
|
1472
|
+
}
|
|
1473
|
+
toMultiValue(options) {
|
|
1474
|
+
return this.emitValue ? options.map(o => o.value) : options;
|
|
1475
|
+
}
|
|
1476
|
+
parsePixelValue(value, fallback) {
|
|
1477
|
+
const parsed = Number.parseFloat(value);
|
|
1478
|
+
return Number.isFinite(parsed) ? parsed : fallback;
|
|
1479
|
+
}
|
|
1480
|
+
updateDropdownViewportConstraints() {
|
|
1481
|
+
if (!this.triggerRef)
|
|
1482
|
+
return;
|
|
1483
|
+
const triggerRect = this.triggerRef.getBoundingClientRect();
|
|
1484
|
+
const viewportPadding = SdSelect.VIEWPORT_PADDING;
|
|
1485
|
+
const offsetY = SdSelect.PORTAL_OFFSET_Y;
|
|
1486
|
+
const preferredHeight = this.parsePixelValue(this.dropdownHeight, 260);
|
|
1487
|
+
const preferredWidth = this.parsePixelValue(this.maxDropdownWidth, 640);
|
|
1488
|
+
const availableBelow = Math.max(window.innerHeight - triggerRect.bottom - viewportPadding - offsetY, 0);
|
|
1489
|
+
const availableAbove = Math.max(triggerRect.top - viewportPadding - offsetY, 0);
|
|
1490
|
+
const availableHeight = Math.max(availableBelow, availableAbove);
|
|
1491
|
+
const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
|
|
1492
|
+
this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
|
|
1493
|
+
this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
|
|
1494
|
+
}
|
|
1495
|
+
handleViewportResize = () => {
|
|
1496
|
+
if (!this.isOpen)
|
|
1497
|
+
return;
|
|
1498
|
+
this.updateDropdownViewportConstraints();
|
|
1499
|
+
};
|
|
1500
|
+
findOriginalOption(value, options) {
|
|
1501
|
+
for (const opt of options) {
|
|
1502
|
+
if (opt.value === value)
|
|
1503
|
+
return opt;
|
|
1504
|
+
if (opt.children) {
|
|
1505
|
+
const found = this.findOriginalOption(value, opt.children);
|
|
1506
|
+
if (found)
|
|
1507
|
+
return found;
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
return undefined;
|
|
1511
|
+
}
|
|
1512
|
+
closeDropdown() {
|
|
1513
|
+
if (!this.isOpen)
|
|
1514
|
+
return;
|
|
1515
|
+
this.isOpen = false;
|
|
1516
|
+
this.isAnimatingOut = true;
|
|
1517
|
+
if (this.closeAnimationTimer)
|
|
1518
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1519
|
+
this.closeAnimationTimer = setTimeout(() => {
|
|
1520
|
+
this.isAnimatingOut = false;
|
|
1521
|
+
}, SdSelect.CLOSE_ANIMATION_DURATION);
|
|
1522
|
+
}
|
|
1523
|
+
prepareDropdownGeometry() {
|
|
1524
|
+
if (this.triggerRef) {
|
|
1525
|
+
this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
|
|
1526
|
+
}
|
|
1527
|
+
this.updateDropdownViewportConstraints();
|
|
1528
|
+
}
|
|
1529
|
+
syncFocusedState(isOpen = this.isOpen) {
|
|
1530
|
+
this.focused = isOpen || this.triggerHasFocus;
|
|
1531
|
+
}
|
|
1532
|
+
handleTriggerFocus = () => {
|
|
1533
|
+
this.triggerHasFocus = true;
|
|
1534
|
+
this.syncFocusedState();
|
|
1535
|
+
};
|
|
1536
|
+
handleTriggerBlur = () => {
|
|
1537
|
+
this.triggerHasFocus = false;
|
|
1538
|
+
this.syncFocusedState();
|
|
1539
|
+
};
|
|
1540
|
+
handleTriggerClick = () => {
|
|
1541
|
+
if (this.isOpen) {
|
|
1542
|
+
this.closeDropdown();
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
this.prepareDropdownGeometry();
|
|
1546
|
+
if (this.closeAnimationTimer)
|
|
1547
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1548
|
+
this.isAnimatingOut = false;
|
|
1549
|
+
this.isOpen = true;
|
|
1550
|
+
};
|
|
1551
|
+
emitUpdate(value) {
|
|
1552
|
+
this.update.emit(value);
|
|
1553
|
+
}
|
|
1554
|
+
handleOptionSelect = (detail) => {
|
|
1555
|
+
const { option, leaves } = detail;
|
|
1556
|
+
if (this.isMulti) {
|
|
1557
|
+
this.handleMultiSelect(option, leaves);
|
|
1558
|
+
}
|
|
1559
|
+
else {
|
|
1560
|
+
this.closeDropdown();
|
|
1561
|
+
this.value = this.emitValue ? option.value : option;
|
|
1562
|
+
const nextValue = this.value;
|
|
1563
|
+
requestAnimationFrame(() => {
|
|
1564
|
+
this.emitUpdate(nextValue);
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
handleMultiSelect(option, leaves) {
|
|
1569
|
+
const selected = this.getSelectedOptions();
|
|
1570
|
+
const isGroup = !!option.children;
|
|
1571
|
+
let newSelected;
|
|
1572
|
+
if (isGroup) {
|
|
1573
|
+
const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
|
|
1574
|
+
if (allSelected) {
|
|
1575
|
+
const leafValues = new Set(leaves.map(l => l.value));
|
|
1576
|
+
newSelected = selected.filter(s => !leafValues.has(s.value));
|
|
1577
|
+
}
|
|
1578
|
+
else {
|
|
1579
|
+
const existing = new Set(selected.map(s => s.value));
|
|
1580
|
+
const toAdd = leaves.filter(l => !existing.has(l.value));
|
|
1581
|
+
newSelected = [...selected, ...toAdd];
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
else {
|
|
1585
|
+
const exists = selected.some(s => s.value === option.value);
|
|
1586
|
+
newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
|
|
1587
|
+
}
|
|
1588
|
+
this.value = this.toMultiValue(newSelected);
|
|
1589
|
+
this.emitUpdate(this.value);
|
|
1590
|
+
}
|
|
1591
|
+
connectedCallback() {
|
|
1592
|
+
window.addEventListener('resize', this.handleViewportResize);
|
|
1593
|
+
}
|
|
1594
|
+
disconnectedCallback() {
|
|
1595
|
+
window.removeEventListener('resize', this.handleViewportResize);
|
|
1596
|
+
if (this.closeAnimationTimer)
|
|
1597
|
+
clearTimeout(this.closeAnimationTimer);
|
|
1598
|
+
}
|
|
1599
|
+
render() {
|
|
1600
|
+
const portalProps = {
|
|
1601
|
+
open: this.isOpen,
|
|
1602
|
+
parentRef: this.triggerRef,
|
|
1603
|
+
viewportPadding: SdSelect.VIEWPORT_PADDING,
|
|
1604
|
+
onSdClose: () => {
|
|
1605
|
+
this.closeDropdown();
|
|
1606
|
+
},
|
|
1607
|
+
};
|
|
1608
|
+
return (h("sd-field", { key: '13ca7b4ddb0e124e90dd2b843df9a11b7cc98487', 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: () => {
|
|
1609
|
+
this.hovered = true;
|
|
1610
|
+
}, onMouseLeave: () => {
|
|
1611
|
+
this.hovered = false;
|
|
1612
|
+
} }, h("div", { key: '3892e98679d28ed6199578f1033571fec2137143', class: "sd-select", ref: el => {
|
|
1613
|
+
this.triggerRef = el;
|
|
1614
|
+
} }, h("sd-select-trigger", { key: '150dda9f50762bedc538181d8c1e5623e8d3fbac', ref: el => {
|
|
1615
|
+
this.triggerComponentRef = el;
|
|
1616
|
+
}, 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) && (h("sd-portal", { key: '554e158719e791600a6215223a5c0c7ac289b00a', ...portalProps }, h("sd-select-listbox", { key: 'c309fdfc53ff0c970ff33eb9eeec58636a869408', 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) })))));
|
|
1617
|
+
}
|
|
1618
|
+
static get watchers() { return {
|
|
1619
|
+
"isOpen": [{
|
|
1620
|
+
"watchIsOpen": 0
|
|
1621
|
+
}]
|
|
1622
|
+
}; }
|
|
1623
|
+
};
|
|
1624
|
+
SdSelect.style = sdSelectCss();
|
|
1625
|
+
|
|
1265
1626
|
const TEXTAREA_TOKENS = {
|
|
1266
1627
|
paddingX: inputTokens.textinput.sm.paddingX,
|
|
1267
1628
|
paddingY: inputTokens.textinput.sm.paddingY,
|
|
@@ -1422,7 +1783,7 @@ const SdTextarea = class {
|
|
|
1422
1783
|
'--sd-system-size-field-sm-height': 'auto',
|
|
1423
1784
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
1424
1785
|
};
|
|
1425
|
-
return (h("sd-field", { key: '
|
|
1786
|
+
return (h("sd-field", { key: '2f967ed7e9d9e419376162f9569847b931f126d5', 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 }, h("div", { key: 'aa4f554c200a1b0aeadf4cac635facfabb158b90', class: "sd-textarea__content" }, h("textarea", { key: 'fe0026af57e40e6d4fb8e16c87985352de401fa5', 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 }))));
|
|
1426
1787
|
}
|
|
1427
1788
|
static get watchers() { return {
|
|
1428
1789
|
"value": [{
|
|
@@ -1435,4 +1796,4 @@ const SdTextarea = class {
|
|
|
1435
1796
|
};
|
|
1436
1797
|
SdTextarea.style = sdTextareaCss();
|
|
1437
1798
|
|
|
1438
|
-
export { SdDatePicker as sd_date_picker, SdDateRangePicker as sd_date_range_picker, SdFilePicker as sd_file_picker, SdInput as sd_input, SdNumberInput as sd_number_input, SdRadioGroup as sd_radio_group, SdTextarea as sd_textarea };
|
|
1799
|
+
export { SdDatePicker as sd_date_picker, SdDateRangePicker as sd_date_range_picker, SdFilePicker as sd_file_picker, SdInput as sd_input, SdNumberInput as sd_number_input, SdRadioGroup as sd_radio_group, SdSelect as sd_select, SdTextarea as sd_textarea };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-
|
|
2
|
-
import { u as useDatePicker, t as today, W as WEEK_LABELS, C as CALENDAR_LAYOUT } from './useDatePicker-
|
|
3
|
-
import { d as datepickerTokens } from './component.datepicker-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-Dz490Ukt.js';
|
|
2
|
+
import { u as useDatePicker, t as today, W as WEEK_LABELS, C as CALENDAR_LAYOUT } from './useDatePicker-BG0lUGJG.js';
|
|
3
|
+
import { d as datepickerTokens } from './component.datepicker-BOxGhKKP.js';
|
|
4
4
|
|
|
5
5
|
const RANGE_LAYOUT = {
|
|
6
6
|
bg: datepickerTokens.datepicker.calendar.range.bg,
|
|
@@ -270,7 +270,7 @@ const SdDateRangePickerCalendar = class {
|
|
|
270
270
|
'--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
|
|
271
271
|
'--range-divider': RANGE_LAYOUT.divider,
|
|
272
272
|
};
|
|
273
|
-
return (h(Fragment, { key: '
|
|
273
|
+
return (h(Fragment, { key: '21999354836fc4068eecc9d115fb4c5e28a8f411' }, h("div", { key: '1bc993c9e5cb6f02152591c3f70b68fb580a392b', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), h("div", { key: '09564bf7c14a55c7be56726fefbb6cec793df783', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: '5d8910e7c463c33ad8719a293a616b7f50095532', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
|
|
274
274
|
}
|
|
275
275
|
static get watchers() { return {
|
|
276
276
|
"value": [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { s as systemTokens } from './system-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-Dz490Ukt.js';
|
|
2
|
+
import { s as systemTokens } from './system-Bth2l1cy.js';
|
|
3
3
|
|
|
4
4
|
const DIVIDER_COLORS = {
|
|
5
5
|
default: systemTokens.color.divider.default,
|
|
@@ -17,7 +17,7 @@ const SdDivider = class {
|
|
|
17
17
|
const hostStyle = {
|
|
18
18
|
'--sd-divider-color': DIVIDER_COLORS.default,
|
|
19
19
|
};
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'b19941ad314f31fccf77ea0dd3373f9e3362ecd2', style: hostStyle }, h("hr", { key: 'bbc765fc901298fbacb8323fecd8fd1ca4683d19', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
SdDivider.style = sdDividerCss();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Dz490Ukt.js';
|
|
2
2
|
import { s as sanitizeInlineHtml } from './sanitize-inline-html-BE4tnQ2Z.js';
|
|
3
3
|
import { B as BUTTON_CONFIG, g as getPresetName, f as buttonTokens, d as PRESET_BORDER_COLORS$1, P as PRESET_ICON_COLORS$1, c as PRESET_TEXT_COLORS$1, e as PRESET_HOVER_BACKGROUNDS$1, b as BUTTON_FOCUS_RING_COLOR } from './sd-button.config-ClMlDGkX.js';
|
|
4
|
-
import { s as systemTokens } from './system-
|
|
4
|
+
import { s as systemTokens } from './system-Bth2l1cy.js';
|
|
5
5
|
|
|
6
6
|
class DropdownManager {
|
|
7
7
|
static instance;
|