@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,316 +1,295 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Dz490Ukt.js';
|
|
2
|
+
import { l as listItemTokens } from './component.listItem-4S0_Ykmo.js';
|
|
3
|
+
import { l as listBoxTokens } from './component.listBox-DlJaYVWf.js';
|
|
4
4
|
import { s as sanitizeInlineHtml } from './sanitize-inline-html-BE4tnQ2Z.js';
|
|
5
|
-
import './component.listItem-U8VaRj9c.js';
|
|
6
5
|
|
|
7
|
-
const
|
|
6
|
+
const select = {
|
|
7
|
+
sm: {
|
|
8
|
+
paddingX: "12",
|
|
9
|
+
gap: "8",
|
|
10
|
+
typography: {
|
|
11
|
+
fontWeight: "400",
|
|
12
|
+
fontSize: "12",
|
|
13
|
+
lineHeight: "20"}},
|
|
14
|
+
icon: {
|
|
15
|
+
"default": "#888888",
|
|
16
|
+
disabled: "#BBBBBB"
|
|
17
|
+
},
|
|
18
|
+
text: {
|
|
19
|
+
"default": "#222222",
|
|
20
|
+
disabled: "#888888"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var selectTokens = {
|
|
24
|
+
select: select
|
|
25
|
+
};
|
|
8
26
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
/** 드롭다운을 엽니다. */
|
|
85
|
-
async sdOpen() {
|
|
86
|
-
// sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
|
|
87
|
-
await new Promise(resolve => setTimeout(resolve, 0));
|
|
88
|
-
if (this.disabled || this.isOpen)
|
|
89
|
-
return;
|
|
90
|
-
this.prepareDropdownGeometry();
|
|
91
|
-
if (this.closeAnimationTimer)
|
|
92
|
-
clearTimeout(this.closeAnimationTimer);
|
|
93
|
-
this.isAnimatingOut = false;
|
|
94
|
-
this.isOpen = true;
|
|
95
|
-
}
|
|
96
|
-
triggerRef;
|
|
97
|
-
triggerComponentRef;
|
|
98
|
-
closeAnimationTimer;
|
|
99
|
-
/** 폼 연동용 name 속성 */
|
|
100
|
-
name = nanoid();
|
|
101
|
-
triggerHasFocus = false;
|
|
102
|
-
watchIsOpen(newValue) {
|
|
103
|
-
this.syncFocusedState(newValue);
|
|
104
|
-
this.dropDownShow.emit({ isOpen: newValue });
|
|
105
|
-
}
|
|
106
|
-
get isMulti() {
|
|
107
|
-
return this.type === 'multi' || this.type === 'multi_depth';
|
|
108
|
-
}
|
|
109
|
-
get displayText() {
|
|
110
|
-
if (this.isMulti) {
|
|
111
|
-
if (!Array.isArray(this.value) || this.value.length === 0)
|
|
112
|
-
return '';
|
|
113
|
-
const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
|
|
114
|
-
const selected = this.getSelectedOptions();
|
|
115
|
-
const allSelected = nonDisabledLeaves.length > 0 &&
|
|
116
|
-
nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
|
|
117
|
-
if (allSelected)
|
|
118
|
-
return this.allSelectedLabel ?? '전체';
|
|
119
|
-
const flat = this.flattenOptions(this.options);
|
|
120
|
-
return this.value
|
|
121
|
-
.map(item => {
|
|
122
|
-
if (item != null && typeof item === 'object') {
|
|
123
|
-
const opt = item;
|
|
124
|
-
return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
|
|
125
|
-
}
|
|
126
|
-
return flat.find(o => o.value === item)?.label ?? '';
|
|
127
|
-
})
|
|
128
|
-
.filter(Boolean)
|
|
129
|
-
.join(', ');
|
|
27
|
+
// ── Select Trigger Tokens ──
|
|
28
|
+
const SELECT_LAYOUT = {
|
|
29
|
+
paddingX: selectTokens.select.sm.paddingX,
|
|
30
|
+
gap: selectTokens.select.sm.gap};
|
|
31
|
+
const SELECT_TYPOGRAPHY = {
|
|
32
|
+
fontSize: selectTokens.select.sm.typography.fontSize,
|
|
33
|
+
lineHeight: selectTokens.select.sm.typography.lineHeight,
|
|
34
|
+
fontWeight: selectTokens.select.sm.typography.fontWeight,
|
|
35
|
+
};
|
|
36
|
+
const SELECT_COLORS = {
|
|
37
|
+
icon: {
|
|
38
|
+
default: selectTokens.select.icon.default,
|
|
39
|
+
disabled: selectTokens.select.icon.disabled,
|
|
40
|
+
},
|
|
41
|
+
text: {
|
|
42
|
+
default: selectTokens.select.text.default,
|
|
43
|
+
disabled: selectTokens.select.text.disabled,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
// ── ListItem Tokens ──
|
|
47
|
+
const LIST_ITEM_LAYOUT = {
|
|
48
|
+
paddingY: listItemTokens.listItem.paddingY,
|
|
49
|
+
paddingRight: listItemTokens.listItem.paddingRight,
|
|
50
|
+
paddingLeft: {
|
|
51
|
+
depth1: listItemTokens.listItem.paddingLeft.depth1,
|
|
52
|
+
depth2: listItemTokens.listItem.paddingLeft.depth2,
|
|
53
|
+
depth3: listItemTokens.listItem.paddingLeft.depth3,
|
|
54
|
+
},
|
|
55
|
+
gap: listItemTokens.listItem.gap,
|
|
56
|
+
};
|
|
57
|
+
const LIST_ITEM_TYPOGRAPHY = {
|
|
58
|
+
fontSize: listItemTokens.listItem.typography.default.fontSize,
|
|
59
|
+
lineHeight: listItemTokens.listItem.typography.default.lineHeight,
|
|
60
|
+
fontWeight: listItemTokens.listItem.typography.default.fontWeight,
|
|
61
|
+
selectedFontWeight: listItemTokens.listItem.typography.selected.fontWeight,
|
|
62
|
+
};
|
|
63
|
+
const LIST_ITEM_COLORS = {
|
|
64
|
+
bg: {
|
|
65
|
+
default: listItemTokens.listItem.bg.default,
|
|
66
|
+
hover: listItemTokens.listItem.bg.hover,
|
|
67
|
+
},
|
|
68
|
+
content: {
|
|
69
|
+
default: listItemTokens.listItem.content.default,
|
|
70
|
+
hover: listItemTokens.listItem.content.hover,
|
|
71
|
+
disabled: listItemTokens.listItem.content.disabled,
|
|
72
|
+
selected: listItemTokens.listItem.content.selected,
|
|
73
|
+
},
|
|
74
|
+
depth1: {
|
|
75
|
+
bg: listItemTokens.listItem.depth1.bg.default,
|
|
76
|
+
border: listItemTokens.listItem.depth1.border.color,
|
|
77
|
+
borderWidth: listItemTokens.listItem.depth1.border.width,
|
|
78
|
+
},
|
|
79
|
+
depth2: {
|
|
80
|
+
bg: listItemTokens.listItem.depth2.middle.bg,
|
|
81
|
+
}};
|
|
82
|
+
// ── ListBox Tokens ──
|
|
83
|
+
const LIST_BOX_LAYOUT = {
|
|
84
|
+
radius: listBoxTokens.listBox.radius,
|
|
85
|
+
};
|
|
86
|
+
// ── Constants ──
|
|
87
|
+
const SEARCH_THRESHOLD = 11;
|
|
88
|
+
const SEARCH_DEBOUNCE_MS = 1000;
|
|
89
|
+
const EMPTY_MESSAGE = '표시할 항목이 없습니다.';
|
|
90
|
+
// ── Utilities ──
|
|
91
|
+
function isHtmlLabel(label) {
|
|
92
|
+
return /<[a-z][\s\S]*>/i.test(label);
|
|
93
|
+
}
|
|
94
|
+
function extractText(html) {
|
|
95
|
+
return html.replace(/<[^>]*>/g, '');
|
|
96
|
+
}
|
|
97
|
+
function countLeaves(options) {
|
|
98
|
+
return options.reduce((sum, option) => {
|
|
99
|
+
if (option.children) {
|
|
100
|
+
return sum + countLeaves(option.children);
|
|
130
101
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
102
|
+
return sum + 1;
|
|
103
|
+
}, 0);
|
|
104
|
+
}
|
|
105
|
+
function filterTree(options, keyword) {
|
|
106
|
+
const lowerKeyword = (keyword ?? '').toLowerCase();
|
|
107
|
+
return options.reduce((acc, option) => {
|
|
108
|
+
const labelText = isHtmlLabel(option.label) ? extractText(option.label) : option.label;
|
|
109
|
+
const selfMatch = labelText != null && labelText.toLowerCase().includes(lowerKeyword);
|
|
110
|
+
if (option.children) {
|
|
111
|
+
// 그룹: 자식은 항상 추가로 필터링한다.
|
|
112
|
+
// - 자식 중 일치하는 게 있으면 그 자식들만 노출
|
|
113
|
+
// - 자식 매칭이 없더라도 그룹명이 매칭되면 그룹 헤더는 그대로 노출
|
|
114
|
+
// (이때 children 은 빈 배열로 두고, 선택 동작은 collectVisibleLeaves
|
|
115
|
+
// 의 fallback 이 원본 트리를 사용해 처리한다)
|
|
116
|
+
const filteredChildren = filterTree(option.children, keyword);
|
|
117
|
+
if (filteredChildren.length > 0) {
|
|
118
|
+
acc.push({ ...option, children: filteredChildren });
|
|
119
|
+
}
|
|
120
|
+
else if (selfMatch) {
|
|
121
|
+
acc.push({ ...option, children: [] });
|
|
122
|
+
}
|
|
135
123
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
flattenOptions(options) {
|
|
140
|
-
return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
|
|
141
|
-
}
|
|
142
|
-
getNonDisabledLeaves(options) {
|
|
143
|
-
return options.flatMap(o => {
|
|
144
|
-
if (o.disabled)
|
|
145
|
-
return [];
|
|
146
|
-
if (o.children)
|
|
147
|
-
return this.getNonDisabledLeaves(o.children);
|
|
148
|
-
return [o];
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
getSelectedOptions() {
|
|
152
|
-
const val = this.value;
|
|
153
|
-
if (val == null || !Array.isArray(val))
|
|
154
|
-
return [];
|
|
155
|
-
if (this.emitValue) {
|
|
156
|
-
return val
|
|
157
|
-
.map(v => this.findOriginalOption(v, this.options))
|
|
158
|
-
.filter((o) => !!o);
|
|
124
|
+
else if (selfMatch) {
|
|
125
|
+
acc.push({ ...option });
|
|
159
126
|
}
|
|
160
|
-
return
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
127
|
+
return acc;
|
|
128
|
+
}, []);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const sdSelectListItemCss = () => `sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}`;
|
|
132
|
+
|
|
133
|
+
const SdSelectListItem = class {
|
|
134
|
+
constructor(hostRef) {
|
|
135
|
+
registerInstance(this, hostRef);
|
|
136
|
+
this.listItemClick = createEvent(this, "sdListItemClick", 7);
|
|
137
|
+
}
|
|
138
|
+
/** 렌더링할 옵션 데이터 */
|
|
139
|
+
option;
|
|
140
|
+
/** 계층 깊이 (1~3) */
|
|
141
|
+
depth = 1;
|
|
142
|
+
/** 선택 상태 (null=중간) */
|
|
143
|
+
isSelected = false;
|
|
144
|
+
/** 키보드 포커스 상태 여부 */
|
|
145
|
+
isFocused = false;
|
|
146
|
+
/** 체크박스 표시 여부 */
|
|
147
|
+
useCheckbox = false;
|
|
148
|
+
/** 다중 선택 시 (선택/전체) 카운트 */
|
|
149
|
+
countInfo;
|
|
150
|
+
/** 항목 클릭 시 발생합니다. */
|
|
151
|
+
listItemClick;
|
|
152
|
+
get isGroup() {
|
|
153
|
+
return !!this.option.children;
|
|
154
|
+
}
|
|
155
|
+
get isSelectable() {
|
|
156
|
+
return !this.isGroup || this.useCheckbox;
|
|
157
|
+
}
|
|
158
|
+
get depthKey() {
|
|
159
|
+
if (this.depth <= 1)
|
|
160
|
+
return 'depth1';
|
|
161
|
+
if (this.depth === 2)
|
|
162
|
+
return 'depth2';
|
|
163
|
+
return 'depth3';
|
|
164
|
+
}
|
|
165
|
+
get paddingLeft() {
|
|
166
|
+
return `${LIST_ITEM_LAYOUT.paddingLeft[this.depthKey]}px`;
|
|
167
|
+
}
|
|
168
|
+
handleClick = (e) => {
|
|
169
|
+
e.stopPropagation();
|
|
170
|
+
if (this.option.disabled || !this.isSelectable)
|
|
171
171
|
return;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
|
|
181
|
-
this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
|
|
182
|
-
this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
|
|
183
|
-
}
|
|
184
|
-
handleViewportResize = () => {
|
|
185
|
-
if (!this.isOpen)
|
|
172
|
+
this.listItemClick.emit(this.option);
|
|
173
|
+
};
|
|
174
|
+
handleCheckboxClick = (e) => {
|
|
175
|
+
e.stopPropagation();
|
|
176
|
+
};
|
|
177
|
+
handleCheckboxUpdate = (e) => {
|
|
178
|
+
e.stopPropagation();
|
|
179
|
+
if (this.option.disabled || !this.isSelectable)
|
|
186
180
|
return;
|
|
187
|
-
this.
|
|
181
|
+
this.listItemClick.emit(this.option);
|
|
188
182
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
183
|
+
render() {
|
|
184
|
+
const isGroup = this.isGroup;
|
|
185
|
+
const isDepth1Group = isGroup && this.depth === 1;
|
|
186
|
+
const isDepth2Group = isGroup && this.depth === 2;
|
|
187
|
+
const cssVars = {
|
|
188
|
+
'--list-item-padding-y': `${LIST_ITEM_LAYOUT.paddingY}px`,
|
|
189
|
+
'--list-item-padding-left': this.paddingLeft,
|
|
190
|
+
'--list-item-padding-right': `${LIST_ITEM_LAYOUT.paddingRight}px`,
|
|
191
|
+
'--list-item-gap': `${LIST_ITEM_LAYOUT.gap}px`,
|
|
192
|
+
'--list-item-font-size': `${LIST_ITEM_TYPOGRAPHY.fontSize}px`,
|
|
193
|
+
'--list-item-line-height': `${LIST_ITEM_TYPOGRAPHY.lineHeight}px`,
|
|
194
|
+
'--list-item-font-weight': LIST_ITEM_TYPOGRAPHY.fontWeight,
|
|
195
|
+
'--list-item-bg': isDepth1Group
|
|
196
|
+
? LIST_ITEM_COLORS.depth1.bg
|
|
197
|
+
: isDepth2Group
|
|
198
|
+
? LIST_ITEM_COLORS.depth2.bg
|
|
199
|
+
: LIST_ITEM_COLORS.bg.default,
|
|
200
|
+
'--list-item-bg-hover': LIST_ITEM_COLORS.bg.hover,
|
|
201
|
+
'--list-item-color': LIST_ITEM_COLORS.content.default,
|
|
202
|
+
'--list-item-color-hover': LIST_ITEM_COLORS.content.hover,
|
|
203
|
+
'--list-item-color-disabled': LIST_ITEM_COLORS.content.disabled,
|
|
204
|
+
'--list-item-color-selected': LIST_ITEM_COLORS.content.selected,
|
|
205
|
+
'--list-item-font-weight-selected': LIST_ITEM_TYPOGRAPHY.selectedFontWeight,
|
|
206
|
+
};
|
|
207
|
+
if (isDepth1Group) {
|
|
208
|
+
cssVars['--list-item-border-top'] =
|
|
209
|
+
`${LIST_ITEM_COLORS.depth1.borderWidth}px solid ${LIST_ITEM_COLORS.depth1.border}`;
|
|
198
210
|
}
|
|
199
|
-
return
|
|
211
|
+
return (
|
|
212
|
+
// 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
|
|
213
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
214
|
+
h("div", { key: '86ebbdb437d7799cefb9a9466997df44ea346e44', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
|
|
215
|
+
'sd-select-list-item': true,
|
|
216
|
+
'sd-select-list-item--group': isGroup,
|
|
217
|
+
'sd-select-list-item--depth1-group': isDepth1Group,
|
|
218
|
+
'sd-select-list-item--depth2-group': isDepth2Group,
|
|
219
|
+
'sd-select-list-item--selected': this.isSelected === true,
|
|
220
|
+
'sd-select-list-item--indeterminate': this.isSelected === null,
|
|
221
|
+
'sd-select-list-item--focused': this.isFocused,
|
|
222
|
+
'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
223
|
+
'sd-select-list-item--disabled': !!this.option.disabled,
|
|
224
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '297067b88bedf8eed648f60050688e23e9dfcbdd', value: this.isSelected === null ? null : !!this.isSelected, disabled: this.option.disabled, inverse: this.isFocused && this.isSelected !== false, class: "sd-select-list-item__checkbox", onClick: this.handleCheckboxClick, onSdUpdate: this.handleCheckboxUpdate })), isHtmlLabel(this.option.label) ? (h("span", { class: "sd-select-list-item__label", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.option.label)) })) : (h("span", { class: "sd-select-list-item__label" }, this.option.label)), this.countInfo && (h("span", { key: 'e71dbbfcd454a43fe2364aa0205f14805de20653', class: "sd-select-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
200
225
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
prepareDropdownGeometry() {
|
|
213
|
-
if (this.triggerRef) {
|
|
214
|
-
this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
|
|
215
|
-
}
|
|
216
|
-
this.updateDropdownViewportConstraints();
|
|
226
|
+
};
|
|
227
|
+
SdSelectListItem.style = sdSelectListItemCss();
|
|
228
|
+
|
|
229
|
+
const sdSelectListItemSearchCss = () => `sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}`;
|
|
230
|
+
|
|
231
|
+
const SdSelectListItemSearch = class {
|
|
232
|
+
constructor(hostRef) {
|
|
233
|
+
registerInstance(this, hostRef);
|
|
234
|
+
this.searchFilter = createEvent(this, "sdSearchFilter", 7);
|
|
235
|
+
this.searchFocus = createEvent(this, "sdSearchFocus", 7);
|
|
217
236
|
}
|
|
218
|
-
|
|
219
|
-
|
|
237
|
+
/** 리스트가 스크롤된 상태 여부 (그림자 효과용) */
|
|
238
|
+
isScrolled = false;
|
|
239
|
+
searchText = '';
|
|
240
|
+
/** 검색어가 변경될 때 발생합니다. */
|
|
241
|
+
searchFilter;
|
|
242
|
+
/** 검색 입력에 포커스될 때 발생합니다. */
|
|
243
|
+
searchFocus;
|
|
244
|
+
inputEl;
|
|
245
|
+
debounceTimer;
|
|
246
|
+
focusRafId;
|
|
247
|
+
componentDidLoad() {
|
|
248
|
+
requestAnimationFrame(() => {
|
|
249
|
+
this.focusRafId = requestAnimationFrame(() => {
|
|
250
|
+
this.inputEl?.focus();
|
|
251
|
+
});
|
|
252
|
+
});
|
|
220
253
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
this.
|
|
227
|
-
this.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
this.prepareDropdownGeometry();
|
|
235
|
-
if (this.closeAnimationTimer)
|
|
236
|
-
clearTimeout(this.closeAnimationTimer);
|
|
237
|
-
this.isAnimatingOut = false;
|
|
238
|
-
this.isOpen = true;
|
|
254
|
+
/** 검색 입력에 포커스를 이동합니다. */
|
|
255
|
+
async sdFocus() {
|
|
256
|
+
this.inputEl?.focus();
|
|
257
|
+
}
|
|
258
|
+
handleInput = (e) => {
|
|
259
|
+
this.searchText = e.target.value;
|
|
260
|
+
if (this.debounceTimer)
|
|
261
|
+
clearTimeout(this.debounceTimer);
|
|
262
|
+
this.debounceTimer = setTimeout(() => {
|
|
263
|
+
this.searchFilter.emit(this.searchText);
|
|
264
|
+
}, SEARCH_DEBOUNCE_MS);
|
|
239
265
|
};
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
this.closeDropdown();
|
|
250
|
-
this.value = this.emitValue ? option.value : option;
|
|
251
|
-
const nextValue = this.value;
|
|
252
|
-
requestAnimationFrame(() => {
|
|
253
|
-
this.emitUpdate(nextValue);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
266
|
+
handleClear = (e) => {
|
|
267
|
+
e.stopPropagation();
|
|
268
|
+
this.searchText = '';
|
|
269
|
+
if (this.debounceTimer)
|
|
270
|
+
clearTimeout(this.debounceTimer);
|
|
271
|
+
this.searchFilter.emit('');
|
|
272
|
+
this.inputEl?.focus();
|
|
256
273
|
};
|
|
257
|
-
handleMultiSelect(option, leaves) {
|
|
258
|
-
const selected = this.getSelectedOptions();
|
|
259
|
-
const isGroup = !!option.children;
|
|
260
|
-
let newSelected;
|
|
261
|
-
if (isGroup) {
|
|
262
|
-
const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
|
|
263
|
-
if (allSelected) {
|
|
264
|
-
const leafValues = new Set(leaves.map(l => l.value));
|
|
265
|
-
newSelected = selected.filter(s => !leafValues.has(s.value));
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
const existing = new Set(selected.map(s => s.value));
|
|
269
|
-
const toAdd = leaves.filter(l => !existing.has(l.value));
|
|
270
|
-
newSelected = [...selected, ...toAdd];
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
const exists = selected.some(s => s.value === option.value);
|
|
275
|
-
newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
|
|
276
|
-
}
|
|
277
|
-
this.value = this.toMultiValue(newSelected);
|
|
278
|
-
this.emitUpdate(this.value);
|
|
279
|
-
}
|
|
280
|
-
connectedCallback() {
|
|
281
|
-
window.addEventListener('resize', this.handleViewportResize);
|
|
282
|
-
}
|
|
283
274
|
disconnectedCallback() {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
275
|
+
if (this.focusRafId !== undefined)
|
|
276
|
+
cancelAnimationFrame(this.focusRafId);
|
|
277
|
+
if (this.debounceTimer !== undefined)
|
|
278
|
+
clearTimeout(this.debounceTimer);
|
|
287
279
|
}
|
|
288
280
|
render() {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
this.hovered = true;
|
|
299
|
-
}, onMouseLeave: () => {
|
|
300
|
-
this.hovered = false;
|
|
301
|
-
} }, h("div", { key: '2e47d100a63bd6445f452701409cf05efabb30e0', class: "sd-select", ref: el => {
|
|
302
|
-
this.triggerRef = el;
|
|
303
|
-
} }, h("sd-select-trigger", { key: '65763371f56bae558f927189931b567e5ca73df6', ref: el => {
|
|
304
|
-
this.triggerComponentRef = el;
|
|
305
|
-
}, 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: '98518c875649c8e38c15565d9bfccf9c0b0eeb9a', ...portalProps }, h("sd-select-listbox", { key: 'be8e2c814bd30a57ee20b0a0b378f3809ffef26a', 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) })))));
|
|
281
|
+
return (h("div", { key: 'fd13ed863fa624bb672a80594a1397831c55b859', class: {
|
|
282
|
+
'sd-select-list-item-search': true,
|
|
283
|
+
'sd-select-list-item-search--scrolled': this.isScrolled,
|
|
284
|
+
} }, h("div", { key: 'c36783523de2c29b04ce300307770a666daad9df', class: "sd-select-list-item-search__inner" }, h("sd-icon", { key: '6e21aebf25090024c882dda1e9fec46219dce8ee', name: "search", size: 16, color: "grey_70", class: "sd-select-list-item-search__icon" }), h("input", { key: '2ed89f33de74c98cde3caa4e8924ef2e7b3baa0f', ref: el => {
|
|
285
|
+
this.inputEl = el;
|
|
286
|
+
}, type: "text", class: "sd-select-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), h("button", { key: 'c16ed94bbddd24e829548b4ff063a6a3095f955a', type: "button", class: {
|
|
287
|
+
'sd-select-list-item-search__clear': true,
|
|
288
|
+
'sd-select-list-item-search__clear--hidden': this.searchText === '',
|
|
289
|
+
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, h("sd-icon", { key: 'f2808e3b1b5ae6937bd818e4f29f999d04286b60', name: "close", size: 12, color: "#888888" })))));
|
|
306
290
|
}
|
|
307
|
-
static get watchers() { return {
|
|
308
|
-
"isOpen": [{
|
|
309
|
-
"watchIsOpen": 0
|
|
310
|
-
}]
|
|
311
|
-
}; }
|
|
312
291
|
};
|
|
313
|
-
|
|
292
|
+
SdSelectListItemSearch.style = sdSelectListItemSearchCss();
|
|
314
293
|
|
|
315
294
|
const sdSelectListboxCss = () => `:host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__list::-webkit-scrollbar{opacity:0;width:8px;background:#E5E5E5}:host .sd-select-listbox__list::-webkit-scrollbar:horizontal{height:8px}:host .sd-select-listbox__list::-webkit-scrollbar-thumb{height:80px;background-color:#CCCCCC;border-radius:4px}:host .sd-select-listbox__list::-webkit-scrollbar-track{background-color:#E5E5E5}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}`;
|
|
316
295
|
|
|
@@ -679,9 +658,9 @@ const SdSelectListbox = class {
|
|
|
679
658
|
'--listbox-max-height': this.maxHeight ?? '260px',
|
|
680
659
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
681
660
|
};
|
|
682
|
-
return (h("div", { key: '
|
|
661
|
+
return (h("div", { key: 'cec8e4e12dd806a93375853386a1d7cc3ac6b269', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '9e07a7e742e956df314796e9babf6c0a7fb21d7f', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'd5ff5620c63b5c53e69b6348f2c9cd6cb73cbe88', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
|
|
683
662
|
this.listEl = el;
|
|
684
|
-
} }, this.showSelectAll && (h("sd-select-list-item", { key: '
|
|
663
|
+
} }, this.showSelectAll && (h("sd-select-list-item", { key: '9b36cdd7466b639c65497da94ee1e3c5129566cb', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
|
|
685
664
|
}
|
|
686
665
|
static get watchers() { return {
|
|
687
666
|
"searchKeyword": [{
|
|
@@ -749,7 +728,7 @@ const SdSelectTrigger = class {
|
|
|
749
728
|
? SELECT_COLORS.icon.disabled
|
|
750
729
|
: SELECT_COLORS.icon.default,
|
|
751
730
|
};
|
|
752
|
-
return (h("div", { key: '
|
|
731
|
+
return (h("div", { key: '2ec5e736c0742a10fdfa9b4b12b0820e99c30f7f', ref: el => {
|
|
753
732
|
this.triggerEl = el;
|
|
754
733
|
}, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
|
|
755
734
|
'sd-select-trigger': true,
|
|
@@ -760,7 +739,7 @@ const SdSelectTrigger = class {
|
|
|
760
739
|
e.preventDefault();
|
|
761
740
|
this.handleClick();
|
|
762
741
|
}
|
|
763
|
-
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '
|
|
742
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '6b71e60a76d430bfe14bc5b7c59d82130be27c8a', class: "sd-select-trigger__content" }, hasValue && isHtmlLabel(this.displayText) ? (h("span", { class: "sd-select-trigger__text", ref: el => el && (el.innerHTML = sanitizeInlineHtml(this.displayText)) })) : (h("span", { class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택'))), h("sd-icon", { key: 'e34eae87f518f1b015e1d59bacf97bec66b6ec6d', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
764
743
|
'sd-select-trigger__icon': true,
|
|
765
744
|
'sd-select-trigger__icon--open': this.isOpen,
|
|
766
745
|
} }))));
|
|
@@ -768,4 +747,4 @@ const SdSelectTrigger = class {
|
|
|
768
747
|
};
|
|
769
748
|
SdSelectTrigger.style = sdSelectTriggerCss();
|
|
770
749
|
|
|
771
|
-
export {
|
|
750
|
+
export { SdSelectListItem as sd_select_list_item, SdSelectListItemSearch as sd_select_list_item_search, SdSelectListbox as sd_select_listbox, SdSelectTrigger as sd_select_trigger };
|