@sellmate/design-system 1.22.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-C-F-JEv_.js → index-BuaQW9U4.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
- package/dist/cjs/sd-badge.cjs.entry.js +2 -2
- package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
- package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-callout.cjs.entry.js +2 -2
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.cjs.entry.js +25 -7
- package/dist/cjs/sd-chip.cjs.entry.js +6 -4
- package/dist/cjs/{sd-chip.config-DiLoRpct.js → sd-chip.config-DCNCzV8s.js} +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +4 -4
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +11 -11
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +2 -2
- package/dist/cjs/sd-divider.cjs.entry.js +2 -2
- 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 +22 -14
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-linear-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +9 -9
- package/dist/cjs/sd-popover.cjs.entry.js +5 -5
- package/dist/cjs/sd-popup.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +7 -7
- package/dist/cjs/sd-select_3.cjs.entry.js +9 -9
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +7 -7
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-td.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +23 -5
- package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{tooltipArrow-26hYtSrD.js → tooltipArrow-VQq73W83.js} +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
- package/dist/collection/components/sd-calendar/sd-calendar.js +3 -3
- package/dist/collection/components/sd-callout/sd-callout.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.js +24 -2
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +23 -5
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- 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-dropdown-button/sd-dropdown-button.css +4 -4
- package/dist/collection/components/sd-field/sd-field.js +5 -5
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.css +4 -0
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +3 -3
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +15 -7
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- 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-table/sd-table.js +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- 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-text-link/sd-text-link.css +17 -0
- package/dist/collection/components/sd-text-link/sd-text-link.js +46 -3
- 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-BXRgi3NZ.js → p-0U99W-3Z.js} +1 -1
- package/dist/components/{p-DlXBFtBO.js → p-1cW-9wVB.js} +1 -1
- package/dist/components/p-B3bERWUt.js +1 -0
- package/dist/components/{p-B-Igud6n.js → p-B8uvCE1e.js} +1 -1
- package/dist/components/{p-DFbj6d3L.js → p-BZUlNC0d.js} +1 -1
- package/dist/components/{p-CCO1WtEj.js → p-BnhzUsGP.js} +1 -1
- package/dist/components/{p-CHxVi6l1.js → p-BoH7ykYx.js} +1 -1
- package/dist/components/{p-Bric-SEs.js → p-BoPkOevJ.js} +1 -1
- package/dist/components/{p-B12iH3Zk.js → p-Bqfoe_ek.js} +1 -1
- package/dist/components/{p-BwTsP0Ak.js → p-BtVuPyhl.js} +1 -1
- package/dist/components/{p-Cdzn78dP.js → p-C-Cje7aS.js} +1 -1
- package/dist/components/{p-D7StBSjK.js → p-C3rOud8J.js} +1 -1
- package/dist/components/p-C4_oeGm-.js +1 -0
- package/dist/components/p-C5uz_eFs.js +1 -0
- package/dist/components/{p-BFlmHQm9.js → p-CBXH-GWN.js} +1 -1
- package/dist/components/{p-CCCwPJ5p.js → p-CEVDmQdt.js} +1 -1
- package/dist/components/{p-CwSlRPMm.js → p-CNwoxvpg.js} +1 -1
- package/dist/components/{p-B2bF2KlS.js → p-CaQ-qyG-.js} +1 -1
- package/dist/components/{p-B0myARGe.js → p-Ck2aozmE.js} +1 -1
- package/dist/components/{p-OjchKJGr.js → p-CtNDxhxx.js} +1 -1
- package/dist/components/{p-mcMbSkii.js → p-D-a6H314.js} +1 -1
- package/dist/components/{p-BpQwjSB8.js → p-D3dq5pt5.js} +1 -1
- package/dist/components/p-D6noGX38.js +1 -0
- package/dist/components/{p-JMuxVcTW.js → p-D8T1XeGP.js} +1 -1
- package/dist/components/{p-Cj_1bYZF.js → p-DMvWCQfX.js} +1 -1
- package/dist/components/{p-C1QezE7u.js → p-DNRm9_Bv.js} +1 -1
- package/dist/components/{p-vPS2GNz3.js → p-DPmMT-y0.js} +1 -1
- package/dist/components/p-D_SxeDkS.js +1 -0
- package/dist/components/{p-Co2ThnbG.js → p-DcJ7u2_W.js} +1 -1
- package/dist/components/{p-kRH2GOb0.js → p-DyfR6eGl.js} +1 -1
- package/dist/components/{p-ZvP2Ce6J.js → p-Fwb7LRwv.js} +1 -1
- package/dist/components/{p-Bm3NWPaP.js → p-PMD-Col0.js} +1 -1
- package/dist/components/{p-BpjmheLG.js → p-PXhjh7pH.js} +1 -1
- package/dist/components/p-Ycs3I9cT.js +1 -0
- package/dist/components/{p-YCGkwgiM.js → p-fzFFhJlr.js} +1 -1
- package/dist/components/{p-58DLP3IW.js → p-h9_f4fUW.js} +1 -1
- package/dist/components/{p-FrqOl9KZ.js → p-qbClgrdG.js} +1 -1
- 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-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.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/components/sd-tr.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-0d5d2723.entry.js +1 -0
- package/dist/design-system/{p-2ba0b35a.entry.js → p-12e7b9fc.entry.js} +1 -1
- package/dist/design-system/p-210123b1.entry.js +1 -0
- package/dist/design-system/{p-68687503.entry.js → p-21d8f192.entry.js} +1 -1
- package/dist/design-system/{p-ce83eca1.entry.js → p-2646a746.entry.js} +1 -1
- package/dist/design-system/p-2fb9a5e6.entry.js +1 -0
- package/dist/design-system/{p-abcc9367.entry.js → p-3b71d1d4.entry.js} +1 -1
- package/dist/design-system/{p-4f69fde0.entry.js → p-43d521c4.entry.js} +1 -1
- package/dist/design-system/{p-d5b535ad.entry.js → p-4d68b0a8.entry.js} +1 -1
- package/dist/design-system/{p-bfba449b.entry.js → p-5a67c40d.entry.js} +1 -1
- package/dist/design-system/p-5b184e17.entry.js +1 -0
- package/dist/design-system/{p-99f33027.entry.js → p-6b20c76b.entry.js} +1 -1
- package/dist/design-system/{p-9a010c12.entry.js → p-6f77fc76.entry.js} +1 -1
- package/dist/design-system/{p-ce5df7ef.entry.js → p-74e605c0.entry.js} +1 -1
- package/dist/design-system/{p-4bbc894b.entry.js → p-754c11a8.entry.js} +1 -1
- package/dist/design-system/{p-a80cc067.entry.js → p-8001447c.entry.js} +1 -1
- package/dist/design-system/{p-7c507d39.entry.js → p-83a86e6d.entry.js} +1 -1
- package/dist/design-system/{p-c93c623f.entry.js → p-8862e3e3.entry.js} +1 -1
- package/dist/design-system/{p-4eeca0cb.entry.js → p-90a360ca.entry.js} +1 -1
- package/dist/design-system/{p-90436be8.entry.js → p-9761ef4a.entry.js} +1 -1
- package/dist/design-system/{p-ccc85130.entry.js → p-9afc1f7c.entry.js} +1 -1
- package/dist/design-system/{p-563a8242.entry.js → p-9b53de38.entry.js} +1 -1
- package/dist/design-system/{p-ff726fad.entry.js → p-9ea2fbec.entry.js} +1 -1
- package/dist/design-system/{p-C7HJ-NfO.js → p-BZ5lcC25.js} +1 -1
- package/dist/{components/p-BRmilX-4.js → design-system/p-GXE2lEVj.js} +1 -1
- package/dist/design-system/{p-DDj5KTBF.js → p-ITP9Focx.js} +1 -1
- package/dist/design-system/{p-b881bbb6.entry.js → p-a1438f7d.entry.js} +1 -1
- package/dist/design-system/{p-14447dd5.entry.js → p-a49cf337.entry.js} +1 -1
- package/dist/design-system/{p-fc65bbe2.entry.js → p-a505459f.entry.js} +1 -1
- package/dist/design-system/{p-274dbc65.entry.js → p-a8d69ab2.entry.js} +1 -1
- package/dist/design-system/{p-552acf98.entry.js → p-b4df75b9.entry.js} +1 -1
- package/dist/design-system/p-ba5bb1ee.entry.js +1 -0
- package/dist/design-system/{p-2df32f8c.entry.js → p-c79bf2eb.entry.js} +1 -1
- package/dist/design-system/{p-ac81b46e.entry.js → p-c7ff7bc8.entry.js} +1 -1
- package/dist/design-system/p-c8e86fb4.entry.js +1 -0
- package/dist/design-system/{p-88926a42.entry.js → p-cb63d4cf.entry.js} +1 -1
- package/dist/design-system/p-d4097b87.entry.js +1 -0
- package/dist/design-system/{p-9dc0c2f9.entry.js → p-d6329729.entry.js} +1 -1
- package/dist/design-system/{p-50b5cf37.entry.js → p-e77fe58a.entry.js} +1 -1
- package/dist/design-system/{p-e310f188.entry.js → p-f1e0ba30.entry.js} +1 -1
- package/dist/design-system/{p-a71a8b31.entry.js → p-f418055d.entry.js} +1 -1
- package/dist/design-system/{p-6d8a4a23.entry.js → p-f9c0013c.entry.js} +1 -1
- package/dist/design-system/{p-c684cd96.entry.js → p-fb609583.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-C7HJ-NfO.js → index-BZ5lcC25.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +2 -2
- package/dist/esm/sd-badge.entry.js +2 -2
- package/dist/esm/sd-barcode-input.entry.js +2 -2
- package/dist/esm/sd-button_2.entry.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +6 -6
- package/dist/esm/sd-callout.entry.js +2 -2
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip-input.entry.js +25 -7
- package/dist/esm/{sd-chip.config-DDj5KTBF.js → sd-chip.config-ITP9Focx.js} +1 -1
- package/dist/esm/sd-chip.entry.js +6 -4
- package/dist/esm/sd-circle-progress.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +4 -4
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker_7.entry.js +11 -11
- package/dist/esm/sd-date-range-picker-calendar.entry.js +2 -2
- package/dist/esm/sd-divider.entry.js +2 -2
- 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 +22 -14
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-key-value-table.entry.js +1 -1
- package/dist/esm/sd-linear-progress.entry.js +2 -2
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-pagination_4.entry.js +9 -9
- package/dist/esm/sd-popover.entry.js +5 -5
- package/dist/esm/sd-popup.entry.js +2 -2
- package/dist/esm/sd-radio-button.entry.js +2 -2
- package/dist/esm/sd-radio.entry.js +2 -2
- package/dist/esm/sd-select-list-item_2.entry.js +7 -7
- package/dist/esm/sd-select_3.entry.js +9 -9
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/sd-table.entry.js +7 -7
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-td.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +23 -5
- package/dist/esm/sd-toast-container.entry.js +2 -2
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{tooltipArrow-Bgf3crs7.js → tooltipArrow-ByHjyr3Z.js} +1 -1
- package/dist/types/components/sd-chip/sd-chip.d.ts +2 -0
- package/dist/types/components/sd-text-link/sd-text-link.d.ts +8 -0
- package/dist/types/components.d.ts +20 -0
- package/hydrate/index.js +155 -106
- package/hydrate/index.mjs +155 -106
- package/package.json +1 -1
- package/dist/components/p-CEKu7cxA.js +0 -1
- package/dist/components/p-Cjf8PHEl.js +0 -1
- package/dist/components/p-Du_qPqW-.js +0 -1
- package/dist/components/p-DzAvlr8W.js +0 -1
- package/dist/components/p-S2-XqY2R.js +0 -1
- package/dist/design-system/p-2ca4902b.entry.js +0 -1
- package/dist/design-system/p-35da166a.entry.js +0 -1
- package/dist/design-system/p-35e1e2fa.entry.js +0 -1
- package/dist/design-system/p-4bc0ce52.entry.js +0 -1
- package/dist/design-system/p-4c1559c8.entry.js +0 -1
- package/dist/design-system/p-52e88677.entry.js +0 -1
- package/dist/design-system/p-DUyBmuH_.js +0 -1
- package/dist/design-system/p-e7d4b78e.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,a as e,h as i}from"./p-
|
|
1
|
+
import{r as t,a as e,h as i}from"./p-BZ5lcC25.js";import{s as d}from"./p-BJfiMC9H.js";import{s as o}from"./p-BE4tnQ2Z.js";const{button:n,contents:s}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},u=d.color.fg.primary,g={button:{height:`${n.height}px`,paddingX:`${n.paddingX}px`,radius:`${n.radius}px`,gap:`${n.gap}px`,fontSize:`${n.typography.fontSize}px`,fontWeight:n.typography.fontWeight,lineHeight:`${n.typography.lineHeight}px`,iconColorDefault:n.icon.default,iconColorActive:n.icon.active,iconColorNotion:u,borderWidth:`${n.border.width}px`,borderColor:n.border.default,bgDefault:n.bg.default,bgTip:n.bg.tip,bgNotion:n.bg.notion,textDefault:n.text.default,textActive:n.text.active},contents:{paddingX:`${s.paddingX}px`,paddingY:`${s.paddingY}px`,gap:`${s.gap}px`,rowGap:`${s.row.gap}px`,bodyGap:`${s.body.gap}px`,titleGap:`${s.title.gap}px`,radius:`${s.radius}px`,iconColor:s.icon,iconColorNotion:u,titleFontSize:`${s.typography.title.fontSize}px`,titleFontWeight:s.typography.title.fontWeight,titleLineHeight:`${s.typography.title.lineHeight}px`,bodyFontSize:`${s.typography.body.fontSize}px`,bodyFontWeight:s.typography.body.fontWeight,bodyLineHeight:`${s.typography.body.lineHeight}px`,textColor:s.typography.color}},a={tip:"활용 TIP",notion:"사용법 안내"},r={tip:"helpOutline",notion:"notion"},p=class{constructor(e){t(this,e)}get el(){return e(this)}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=g;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=g,e=this.popupShow,d=a[this.type??"tip"],o=r[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button",`sd-guide__button--type-${this.type??"tip"}`];return e&&s.push("sd-guide__button--active"),i("div",{key:"d89a517d78a8f9624c94d320291e5a4b5bd0715d",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"6e959f0f5fd6f816fd1cef4545852b860d30de85",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||d,icon:o,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"a837cababa5504400293729ad28e4dcd2450eeec",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"61dd3c574495f85021495d80865e162999368f9c",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"dbf8aebd1be4b5286bf726d22e0a5f80c29e867f",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"5a08fa823bb8839e654d7bb2ba027df2dc68b85b",class:"sd-guide__popup__header"},i("sd-icon",{key:"1dda43d100b4f5f3b7fa81115a1ac4bfbd584a51",name:o,size:24,color:n}),i("h3",{key:"cfe6342f44f4e1355397ed94d6db74807f917548",class:"sd-guide__popup__title"},this.popupTitle||d)),i("ul",{key:"9acc2f507ed3d3d6f1fda27a9e5cf66dcc2f619d",class:"sd-guide__popup__list"},this.renderListItem(this.message)))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const d=t.map((t=>this.renderListItem(t,e+1)));i.push(...d.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:`sd-guide__popup__list__item sd-guide__popup__list__item--depth-${e}`},i("p",{innerHTML:o(t)}))};p.style='@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}';export{p as sd_guide}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,a as i,f as s,h as n,H as e}from"./p-
|
|
1
|
+
import{r as t,a as i,f as s,h as n,H as e}from"./p-BZ5lcC25.js";import{T as h}from"./p-sZMi_32I.js";const a=class{constructor(i){t(this,i)}get el(){return i(this)}field;rowKey;align;rowspan;colspan;sdClass;dividerLeft=!1;dividerRight=!1;useFrame=!1;handleFieldChange(t,i){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(i),this.syncUseFrameRegistration(i)}handleRowKeyChange(t,i){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(void 0,i),this.syncUseFrameRegistration(void 0,i)}handleSpanChange(){this.syncSpanRegistration()}handleSdClassChange(){this.syncCellClassRegistration()}handleDividerChange(){this.syncCellClassRegistration()}handleUseFrameChange(){this.syncUseFrameRegistration(),this.requestParentTrUpdate()}componentWillLoad(){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration();const t=this.el.parentElement;"sd-tr"===t?.tagName?.toLowerCase()&&s(t)}componentDidLoad(){this.syncSlotName(),this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration()}connectedCallback(){this.syncSpanRegistration(),this.syncCellClassRegistration(),this.syncUseFrameRegistration()}disconnectedCallback(){const t=this.findTable();null!=t&&""!==this.field&&null!=this.rowKey&&(t.unregisterSpanSync?.(String(this.rowKey),this.field),t.unregisterCellClassSync?.(String(this.rowKey),this.field),t.unregisterUseFrameSync?.(String(this.rowKey),this.field),this.requestParentTrUpdate())}findTable(){return this.el.closest("sd-table")}requestParentTrUpdate(){const t=this.el.parentElement;"sd-tr"===t?.tagName?.toLowerCase()&&("function"==typeof t.bumpSpansVersion?t.bumpSpansVersion():s(t))}syncSpanRegistration(){const t=this.findTable();if(null==t?.registerSpanSync||""===this.field||null==this.rowKey)return;const i=Math.max(1,Math.floor(Number(this.rowspan)||1)),s=Math.max(1,Math.floor(Number(this.colspan)||1));t.registerSpanSync(String(this.rowKey),this.field,i,s),this.requestParentTrUpdate()}syncCellClassRegistration(t,i){const s=this.findTable();if(!s)return;const n=t??this.field,e=i??(null!=this.rowKey?String(this.rowKey):void 0);if(""!==n&&null!=e&&s.unregisterCellClassSync?.(e,n),!s.registerCellClassSync||""===this.field||null==this.rowKey)return;const h=[this.sdClass,this.dividerLeft&&"td--divider-left",this.dividerRight&&"td--divider-right"].filter(Boolean).join(" ")||void 0;s.registerCellClassSync(String(this.rowKey),this.field,h),this.requestParentTrUpdate()}syncUseFrameRegistration(t,i){const s=this.findTable();if(!s)return;const n=t??this.field,e=i??(null!=this.rowKey?String(this.rowKey):void 0);""!==n&&null!=e&&s.unregisterUseFrameSync?.(e,n),""!==this.field&&null!=this.rowKey&&(this.useFrame?s.registerUseFrameSync?.(String(this.rowKey),this.field):s.unregisterUseFrameSync?.(String(this.rowKey),this.field))}syncSlotName(){const t=this.el.closest("sd-table"),i=t?.getTableIdSync?.(),s=t?.getAttribute(h),n=(null!=i&&""!==i&&"undefined"!==i?i:null)??(null!=s&&""!==s&&"undefined"!==s?s:null)??"";""!==this.field&&void 0!==this.rowKey&&""!==n&&this.el.setAttribute("slot",`${n}-${this.field}-${this.rowKey}`)}render(){return n(e,{key:"a8b2ea05cfaa821b1e4766657cce6a2b7a399881",class:{[`align-${this.align}`]:Boolean(this.align)}},n("slot",{key:"7fa181915d15192257bc38500787207810ec2739"}))}static get watchers(){return{field:[{handleFieldChange:0}],rowKey:[{handleRowKeyChange:0}],rowspan:[{handleSpanChange:0}],colspan:[{handleSpanChange:0}],sdClass:[{handleSdClassChange:0}],dividerLeft:[{handleDividerChange:0}],dividerRight:[{handleDividerChange:0}],useFrame:[{handleUseFrameChange:0}]}}};a.style="sd-td *{box-sizing:border-box}sd-td{display:contents}sd-td.align-left{text-align:left}sd-td.align-center{text-align:center}sd-td.align-right{text-align:right}";export{a as sd_td}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,c as e,h as i}from"./p-
|
|
1
|
+
import{r as d,c as e,h as i}from"./p-BZ5lcC25.js";var r={default:{fontWeight:"400",fontSize:"12",lineHeight:"20"},selected:{fontWeight:"500"}},a={default:"#FFFFFF",disabled:"#E1E1E1",hover:"#D9EAFF"},o={default:"#AAAAAA",hover:"#0075FF",active:"#0075FF",disabled:"#CCCCCC"},s={default:"#0075FF",disabled:"#CCCCCC",size:"10"},t={default:"#222222",disabled:"#888888"};const l="16",c="1",h="8",n=s.size,b={default:{fontSize:r.default.fontSize,lineHeight:r.default.lineHeight,fontWeight:r.default.fontWeight},selected:{fontWeight:r.selected.fontWeight}},g={unchecked:{bg:a.default,bgHover:a.hover,border:o.default,borderHover:o.hover},checked:{border:o.active,dot:s.default},disabled:{bg:a.disabled,border:o.disabled,dot:s.disabled},label:{default:t.default,disabled:t.disabled}},f=class{constructor(i){d(this,i),this.update=e(this,"sdUpdate",7)}value;val;disabled=!1;label;update;valueChanged(d){this.value=d}get isSelected(){return String(this.val)===String(this.value)}get radioClasses(){const d=["sd-radio",this.isSelected?"sd-radio--checked":"sd-radio--unchecked"];return this.disabled&&d.push("sd-radio--disabled"),d.join(" ")}handleRadioChange=()=>{this.disabled||(this.value=this.val,this.update.emit(this.value))};render(){return i("label",{key:"cc7ff62ac992791ef81db9212bb5986989f6b4d6",class:this.radioClasses,style:{"--sd-radio-size":`${l}px`,"--sd-radio-border-width":`${c}px`,"--sd-radio-gap":`${h}px`,"--sd-radio-dot-size":`${n}px`,"--sd-radio-font-size":`${b.default.fontSize}px`,"--sd-radio-line-height":`${b.default.lineHeight}px`,"--sd-radio-font-weight":b.default.fontWeight,"--sd-radio-selected-font-weight":b.selected.fontWeight,"--sd-radio-unchecked-bg":g.unchecked.bg,"--sd-radio-unchecked-bg-hover":g.unchecked.bgHover,"--sd-radio-unchecked-border":g.unchecked.border,"--sd-radio-unchecked-border-hover":g.unchecked.borderHover,"--sd-radio-checked-border":g.checked.border,"--sd-radio-checked-dot":g.checked.dot,"--sd-radio-disabled-bg":g.disabled.bg,"--sd-radio-disabled-border":g.disabled.border,"--sd-radio-disabled-dot":g.disabled.dot,"--sd-radio-label-color":g.label.default,"--sd-radio-label-disabled-color":g.label.disabled},"aria-checked":this.isSelected?"true":"false","aria-disabled":this.disabled?"true":"false"},i("input",{key:"20bfeaf5bc322335f5300955ebf653213d662fa6",type:"radio",name:String(this.val),value:String(this.val),checked:this.isSelected,disabled:this.disabled,"aria-label":this.label||String(this.val),onInput:this.handleRadioChange}),i("span",{key:"61d8bdfdb5f8309b8832b89ea2979db5b80968c8",class:"sd-radio__circle"}),this.label&&i("span",{key:"cc2a5402e4745aaae897c8f37d5fc287a2ba9b29",class:"sd-radio__label","data-label":this.label},this.label))}static get watchers(){return{value:[{valueChanged:0}]}}};f.style='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)}';export{f as sd_radio}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as d,h as e}from"./p-
|
|
1
|
+
import{r as t,c as d,h as e}from"./p-BZ5lcC25.js";const s=class{constructor(e){t(this,e),this.click=d(this,"sdClick",7),this.mouseOver=d(this,"sdMouseOver",7)}date=null;disabled=!1;selected=!1;isStartDate=!1;isEndDate=!1;isToday=!1;inRange=!1;type="";click;mouseOver;handleClickDate(){this.disabled||void 0===this.date||""===this.date||0===this.date||"string"!=typeof this.date&&this.click?.emit(this.date)}handleHoverDate(){"string"!=typeof this.date&&this.mouseOver?.emit(this.date)}render(){return e("div",{key:"8b8bc2facd0f4614a6022c48bbd026390d8599e4",role:"button",tabindex:this.disabled?-1:0,class:{"sd-date-box":!0,"sd-hoverable":!this.disabled||!this.selected||""===this.type,"sd-date-box--disabled":this.disabled,"sd-date-box--selected":this.selected,"sd-date-box--today":this.isToday,"sd-date-box--start-date":this.isStartDate,"sd-date-box--end-date":this.isEndDate,"sd-date-box--in-range":this.inRange,"sd-date-box--type-start":"start"===this.type,"sd-date-box--type-end":"end"===this.type},onClick:()=>this.handleClickDate(),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClickDate())},onMouseOver:()=>this.handleHoverDate(),onFocus:()=>this.handleHoverDate()},e("div",{key:"acbd57ac0300ca143f1e75780b59b5fc107d537f",class:"sd-date-box__content"},e("div",{key:"aeff50640c285cfd75d5592e67c97e5ec55eb00c",class:"sd-date-box__label"},this.date)))}};s.style='.sd-date-box.sc-sd-date-box{display:flex;align-items:center;justify-content:center;width:38px;height:36px;font-size:14px;position:relative;box-sizing:border-box;text-align:center;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);border-radius:14px}.sd-date-box.sc-sd-date-box .sd-date-box__content.sc-sd-date-box{width:28px;height:28px;border-radius:14px;position:relative}.sd-date-box.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{position:relative;z-index:2;-webkit-user-select:none;user-select:none;line-height:28px}.sd-date-box.sd-date-box--disabled.sc-sd-date-box{color:#CCCCCC;cursor:default !important;pointer-events:none}.sd-date-box.sc-sd-date-box:not(.sd-date-box--disabled){color:#333333;cursor:pointer}.sd-date-box.sd-hoverable.sc-sd-date-box:hover .sd-date-box__content.sc-sd-date-box{background:#D9EAFF}.sd-date-box.sd-date-box--in-range.sc-sd-date-box:not(.sd-date-box--disabled) .sd-date-box__content.sc-sd-date-box::before{content:"";position:absolute;top:0;left:-5px;width:calc(100% + 10px);height:100%;background:#D9EAFF}.sd-date-box.sd-date-box--in-range.sd-date-box--type-start.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::before{left:auto !important;width:19px !important;right:-5px}.sd-date-box.sd-date-box--in-range.sd-date-box--type-end.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::before{width:19px !important}.sd-date-box.sd-date-box--in-range.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{font-weight:500}.sd-date-box.sd-date-box--selected.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-start.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-end.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;inset:0;background:#0075FF;border-radius:14px;z-index:1}.sd-date-box.sd-date-box--selected.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-start.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-end.sc-sd-date-box .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{color:white;font-weight:700}.sd-date-box.sd-date-box--start-date.sd-date-box--end-date.sc-sd-date-box .sd-date-box__content.sc-sd-date-box::before{display:none !important}.sd-date-box.sd-date-box--today.sc-sd-date-box:not(.sd-date-box--selected) .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:28px;height:28px;border:1px solid #E1E1E1 !important;border-radius:14px}';export{s as sd_date_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,a as s,h as i}from"./p-C7HJ-NfO.js";import{n as r}from"./p-CCwNgVmC.js";import{c as h,S as o,f as l,i as n,e as d,E as c,L as a,a as u,b as g,d as p}from"./p-CAFz8W8_.js";import{s as f}from"./p-BE4tnQ2Z.js";import"./p-U8VaRj9c.js";const b=class{constructor(s){t(this,s),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return s(this)}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const t=this.triggerRef.getBoundingClientRect(),e=b.VIEWPORT_PADDING,s=b.PORTAL_OFFSET_Y,i=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),h=Math.max(window.innerHeight-t.bottom-e-s,0),o=Math.max(t.top-e-s,0),l=Math.max(h,o),n=Math.max(window.innerWidth-2*e,0);this.resolvedDropdownHeight=`${Math.min(i,l)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,n)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),b.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),r=e.filter((e=>!t.has(e.value)));i=[...s,...r]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const t={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:b.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"3387dc16a6f54bfae652338c71c4c0e1553828c9",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:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"124325f8f6882a3c9ee1a1795ee969f13d67dfe2",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"2e0e44ae666282d3931f9889650a7999929a312b",ref:t=>{this.triggerComponentRef=t},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)&&i("sd-portal",{key:"b6e97e43c5ea3a06fbb2976dab52d4f544822ae0",...t},i("sd-select-listbox",{key:"3d8a01c54667149507db2757d81813d2f285b32d",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:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};b.style="sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}";const x=class{constructor(s){t(this,s),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=e=>e.flatMap((e=>e.disabled?[]:e.children?t(e.children):[e]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const e=this.getSelectedValues(),s=t.filter((t=>e.has(t.value))).length;return 0!==s&&(s===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?h(this.options):this.options.length)>=o}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return l(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>{const s=n(e.label)?d(e.label):e.label;return null!=s&&s.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===h(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const e=this.getSelectedValues();if(0===e.size)return!1;const s=this.collectVisibleLeaves(t);if(0===s.length)return!1;const i=s.filter((t=>e.has(t.value))).length;return 0!==i&&(i===s.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const e=this.getSelectedValues(),s=this.collectVisibleLeaves(t);return{selected:s.filter((t=>e.has(t.value))).length,total:s.length}}findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const t=[];this.showSelectAll&&t.push(x.SELECT_ALL_OPTION);const e=s=>{for(const i of s){const s=!!i.children;(!s||this.isMulti)&&!i.disabled&&t.push(i),s&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),t}isSelectAllOption(t){return this.showSelectAll&&t.value===x.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const t=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...x.SELECT_ALL_OPTION,children:t},leaves:t})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return null!=e&&e.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const e=this.navigableOptions.findIndex((e=>e.value===t.value));e>=0&&(this.focusedIndex=e)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const e=this.navigableOptions;if("ArrowDown"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%e.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?e.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=e.length)return;t.preventDefault(),t.stopPropagation();const s=e[this.focusedIndex];this.isSelectAllOption(s)?this.emitSelectAll():this.emitOptionSelect(s)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-list-item--focused");if(!t||!e)return;const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<s.top?t.scrollTop+=i.top-s.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,e=1){return t.map((t=>{const s=!!t.children;return[i("sd-select-list-item",{option:t,depth:e,isSelected:s?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),s&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return i("div",{key:"6ca1107a8aadc1fbae26f3d8d3385b355981b65e",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"8612b45a4e9b7d2701b8decd6865ebb50d6fcaa3",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"c02c9c1d96176f94d2f83c66ad3e7cc0946c0270",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"f4fe1769d14812ba63fb73ff21ebfdaaf9d76409",option:x.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(x.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(x.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},c):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}};x.style=":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__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}";const m=class{constructor(s){t(this,s),this.triggerClick=e(this,"sdTriggerClick",7),this.triggerFocus=e(this,"sdTriggerFocus",7),this.triggerBlur=e(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const t=""!==this.displayText;return i("div",{key:"7f5940ce19feb2d3ae9b2cbb6b5fdeb6d0151f61",ref:t=>{this.triggerEl=t},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${p.paddingX}px`,"--trigger-gap":`${p.gap}px`,"--trigger-font-size":`${g.fontSize}px`,"--trigger-line-height":`${g.lineHeight}px`,"--trigger-font-weight":g.fontWeight,"--trigger-color":this.disabled?u.text.disabled:t?u.text.default:u.icon.default,"--trigger-icon-color":this.disabled?u.icon.disabled:u.icon.default},onClick:this.handleClick,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},i("div",{key:"b50dea3450ee6fd2bf30811cc33facf00761f0d1",class:"sd-select-trigger__content"},t&&n(this.displayText)?i("span",{class:"sd-select-trigger__text",ref:t=>t&&(t.innerHTML=f(this.displayText))}):i("span",{class:"sd-select-trigger__text"},t?this.displayText:this.placeholder??"선택"),i("sd-icon",{key:"778b3d1c738951f9a18950b668a34a1bc36006ca",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}};m.style="sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}";export{b as sd_select,x as sd_select_listbox,m as sd_select_trigger}
|
|
1
|
+
import{r as t,c as e,a as s,h as i}from"./p-BZ5lcC25.js";import{n as r}from"./p-CCwNgVmC.js";import{c as h,S as o,f as l,i as n,e as d,E as c,L as a,a as u,b as g,d as p}from"./p-CAFz8W8_.js";import{s as f}from"./p-BE4tnQ2Z.js";import"./p-U8VaRj9c.js";const b=class{constructor(s){t(this,s),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return s(this)}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const t=this.triggerRef.getBoundingClientRect(),e=b.VIEWPORT_PADDING,s=b.PORTAL_OFFSET_Y,i=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),h=Math.max(window.innerHeight-t.bottom-e-s,0),o=Math.max(t.top-e-s,0),l=Math.max(h,o),n=Math.max(window.innerWidth-2*e,0);this.resolvedDropdownHeight=`${Math.min(i,l)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,n)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),b.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),r=e.filter((e=>!t.has(e.value)));i=[...s,...r]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const t={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:b.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"5dceeb2361339527e65657f66966a5b843f7a03b",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:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"2fe78a384fef6083a08709fa72d98d2b2e399580",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"be647e0ba29295be5a888d92cb18c273980ec38f",ref:t=>{this.triggerComponentRef=t},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)&&i("sd-portal",{key:"2d519a9957ff7201519502a2053785cc669642c2",...t},i("sd-select-listbox",{key:"33377475b06c3be1f6ba7e6909a9bfb938144b3a",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:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}};b.style="sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}";const x=class{constructor(s){t(this,s),this.optionSelect=e(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=e=>e.flatMap((e=>e.disabled?[]:e.children?t(e.children):[e]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const e=this.getSelectedValues(),s=t.filter((t=>e.has(t.value))).length;return 0!==s&&(s===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?h(this.options):this.options.length)>=o}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return l(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>{const s=n(e.label)?d(e.label):e.label;return null!=s&&s.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===h(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const e=this.getSelectedValues();if(0===e.size)return!1;const s=this.collectVisibleLeaves(t);if(0===s.length)return!1;const i=s.filter((t=>e.has(t.value))).length;return 0!==i&&(i===s.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const e=this.getSelectedValues(),s=this.collectVisibleLeaves(t);return{selected:s.filter((t=>e.has(t.value))).length,total:s.length}}findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const t=[];this.showSelectAll&&t.push(x.SELECT_ALL_OPTION);const e=s=>{for(const i of s){const s=!!i.children;(!s||this.isMulti)&&!i.disabled&&t.push(i),s&&i.children&&i.children.length>0&&e(i.children)}};return e(this.filteredOptions),t}isSelectAllOption(t){return this.showSelectAll&&t.value===x.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const t=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...x.SELECT_ALL_OPTION,children:t},leaves:t})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return null!=e&&e.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const e=this.navigableOptions.findIndex((e=>e.value===t.value));e>=0&&(this.focusedIndex=e)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const e=this.navigableOptions;if("ArrowDown"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%e.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?e.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=e.length)return;t.preventDefault(),t.stopPropagation();const s=e[this.focusedIndex];this.isSelectAllOption(s)?this.emitSelectAll():this.emitOptionSelect(s)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-list-item--focused");if(!t||!e)return;const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<s.top?t.scrollTop+=i.top-s.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,e=1){return t.map((t=>{const s=!!t.children;return[i("sd-select-list-item",{option:t,depth:e,isSelected:s?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),s&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return i("div",{key:"df4d19f8807ce87384cad18ca981e0792da35682",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"b950890a9138fa5ab7f0df7c1d07bbea65140e67",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"1aeaf552893becedf8394c1e9af8ef7119e70fdb",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"83329f2d454d116d64155ef8a83c076e27cdc7b0",option:x.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(x.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(x.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},c):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}};x.style=":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__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}";const m=class{constructor(s){t(this,s),this.triggerClick=e(this,"sdTriggerClick",7),this.triggerFocus=e(this,"sdTriggerFocus",7),this.triggerBlur=e(this,"sdTriggerBlur",7)}displayText="";placeholder="선택";disabled=!1;isOpen=!1;triggerClick;triggerFocus;triggerBlur;triggerEl;async sdFocus(){this.disabled||this.triggerEl?.focus()}handleClick=()=>{this.disabled||this.triggerClick.emit()};handleFocus=()=>{this.triggerFocus.emit()};handleBlur=()=>{this.triggerBlur.emit()};render(){const t=""!==this.displayText;return i("div",{key:"bd967efa32ed0692512e549db9f852c7c08d5dcd",ref:t=>{this.triggerEl=t},role:"button","aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false",tabindex:this.disabled?-1:0,class:{"sd-select-trigger":!0,"sd-select-trigger--open":this.isOpen,"sd-select-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${p.paddingX}px`,"--trigger-gap":`${p.gap}px`,"--trigger-font-size":`${g.fontSize}px`,"--trigger-line-height":`${g.lineHeight}px`,"--trigger-font-weight":g.fontWeight,"--trigger-color":this.disabled?u.text.disabled:t?u.text.default:u.icon.default,"--trigger-icon-color":this.disabled?u.icon.disabled:u.icon.default},onClick:this.handleClick,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleClick())},onFocus:this.handleFocus,onBlur:this.handleBlur},i("div",{key:"04a8568ac5d109f0635d3474a394030d630f441e",class:"sd-select-trigger__content"},t&&n(this.displayText)?i("span",{class:"sd-select-trigger__text",ref:t=>t&&(t.innerHTML=f(this.displayText))}):i("span",{class:"sd-select-trigger__text"},t?this.displayText:this.placeholder??"선택"),i("sd-icon",{key:"ba256d1a780f7805c81330a6ba4e010c458be57e",name:"chevronDown",size:12,color:"var(--trigger-icon-color)",class:{"sd-select-trigger__icon":!0,"sd-select-trigger__icon--open":this.isOpen}})))}};m.style="sd-select-trigger{display:block;width:100%;height:100%}sd-select-trigger .sd-select-trigger{display:flex;width:100%;height:100%;cursor:pointer;user-select:none;overflow:hidden;border-radius:3px}sd-select-trigger .sd-select-trigger--disabled{cursor:not-allowed}sd-select-trigger .sd-select-trigger__content{display:flex;align-items:center;gap:var(--trigger-gap);flex:1;padding:0 var(--trigger-padding-x);min-width:0}sd-select-trigger .sd-select-trigger__text{flex:1;font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-trigger .sd-select-trigger__icon{flex-shrink:0;transition:transform 0.2s ease}sd-select-trigger .sd-select-trigger__icon--open{transform:rotate(180deg)}";export{b as sd_select,x as sd_select_listbox,m as sd_select_trigger}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e}from"./p-
|
|
1
|
+
import{r as t,c as o,h as e}from"./p-BZ5lcC25.js";var d={height:"24",paddingX:"8",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"}},i={height:"28",paddingX:"12",typography:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"}},r="4",a={width:"1",default:"#CCCCCC",select:"#0075FF",disabled:"#CCCCCC"},n={default:"#FFFFFF",hover:"#0075FF",select:"#FFFFFF",disabled:"#E1E1E1"},s={default:"#555555",hover:"#FFFFFF",select:"#0075FF",disabled:"#888888"},b={gap:"-1"};const l={xs:{height:Number(d.height),paddingX:Number(d.paddingX),fontSize:Number(d.typography.fontSize),lineHeight:Number(d.typography.lineHeight),fontWeight:d.typography.fontWeight,fontFamily:d.typography.fontFamily,textDecoration:d.typography.textDecoration},sm:{height:Number(i.height),paddingX:Number(i.paddingX),fontSize:Number(i.typography.fontSize),lineHeight:Number(i.typography.lineHeight),fontWeight:i.typography.fontWeight,fontFamily:i.typography.fontFamily,textDecoration:i.typography.textDecoration}},u=Number(r),h=Number(a.width),c=Number(b.gap),p={border:{default:a.default,select:a.select,disabled:a.disabled},bg:{default:n.default,hover:n.hover,select:n.select,disabled:n.disabled},content:{default:s.default,hover:s.hover,select:s.select,disabled:s.disabled}},g=class{constructor(e){t(this,e),this.change=o(this,"sdUpdate",7)}value;options=[];size="sm";disabled=!1;name;change;componentWillLoad(){this.size??="sm",this.options??=[],this.disabled??=!1}handleRadioChange=(t,o)=>{this.disabled||o||(this.value=t,this.change.emit(t))};isOptionSelected(t){return this.value===t.value}isOptionDisabled(t){return this.disabled||!!t.disabled}getButtonClasses(t){const o=["sd-radio-button__option",this.isOptionSelected(t)?"sd-radio-button__option--selected":"sd-radio-button__option--unselected"];return this.isOptionDisabled(t)&&o.push("sd-radio-button__option--disabled"),o.join(" ")}getGroupClasses(){return["sd-radio-button",`sd-radio-button--${this.size??"sm"}`].join(" ")}_groupName;get groupName(){return null!=this._groupName&&""!==this._groupName||(this._groupName=null!=this.name&&""!==this.name?this.name:`sd-radio-button-${crypto.randomUUID()}`),this._groupName}render(){const t=l[this.size??"sm"]??l.sm,o={"--sd-radio-button-height":`${t.height}px`,"--sd-radio-button-padding-x":`${t.paddingX}px`,"--sd-radio-button-font-family":t.fontFamily,"--sd-radio-button-font-weight":t.fontWeight,"--sd-radio-button-font-size":`${t.fontSize}px`,"--sd-radio-button-line-height":`${t.lineHeight}px`,"--sd-radio-button-text-decoration":t.textDecoration,"--sd-radio-button-radius":`${u}px`,"--sd-radio-button-border-width":`${h}px`,"--sd-radio-button-group-gap":`${c}px`,"--sd-radio-button-border-default":p.border.default,"--sd-radio-button-border-select":p.border.select,"--sd-radio-button-border-disabled":p.border.disabled,"--sd-radio-button-bg-default":p.bg.default,"--sd-radio-button-bg-hover":p.bg.hover,"--sd-radio-button-bg-select":p.bg.select,"--sd-radio-button-bg-disabled":p.bg.disabled,"--sd-radio-button-content-default":p.content.default,"--sd-radio-button-content-hover":p.content.hover,"--sd-radio-button-content-select":p.content.select,"--sd-radio-button-content-disabled":p.content.disabled};return e("div",{key:"17355ebde09f652f5b94b4f70f09f68ef44cd29d",class:this.getGroupClasses(),style:o,role:"radiogroup","aria-disabled":this.disabled.toString()},this.options.map((t=>{const o=this.isOptionSelected(t),d=this.isOptionDisabled(t);return e("label",{key:`radio-${t.value}`,class:this.getButtonClasses(t),"aria-label":t.label||"radio option","data-label":t.label},e("input",{type:"radio",name:this.groupName,value:t.value.toString(),checked:o,disabled:d,onInput:()=>this.handleRadioChange(t.value,t.disabled)}),t.label&&e("span",{class:"sd-radio-button__label"},t.label))})))}};g.style="sd-radio-button{display:inline-flex;width:fit-content;height:fit-content}.sd-radio-button{display:inline-flex;flex-flow:row nowrap;gap:0}.sd-radio-button__option{display:flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;height:var(--sd-radio-button-height);padding:0 var(--sd-radio-button-padding-x);border:var(--sd-radio-button-border-width) solid var(--sd-radio-button-border-default);background-color:var(--sd-radio-button-bg-default);color:var(--sd-radio-button-content-default);font-family:var(--sd-radio-button-font-family);font-weight:var(--sd-radio-button-font-weight);font-size:var(--sd-radio-button-font-size);line-height:var(--sd-radio-button-line-height);text-decoration:var(--sd-radio-button-text-decoration);cursor:pointer;user-select:none;-webkit-user-select:none;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease}.sd-radio-button__option input{display:none}.sd-radio-button__option:not(:first-child){margin-left:var(--sd-radio-button-group-gap)}.sd-radio-button__option:first-child{border-top-left-radius:var(--sd-radio-button-radius);border-bottom-left-radius:var(--sd-radio-button-radius)}.sd-radio-button__option:last-child{border-top-right-radius:var(--sd-radio-button-radius);border-bottom-right-radius:var(--sd-radio-button-radius)}.sd-radio-button__option:only-child{border-radius:var(--sd-radio-button-radius)}.sd-radio-button__option--selected{background-color:var(--sd-radio-button-bg-select);border-color:var(--sd-radio-button-border-select);color:var(--sd-radio-button-content-select);z-index:1}.sd-radio-button__option:hover:not(.sd-radio-button__option--disabled){background-color:var(--sd-radio-button-bg-hover);border-color:var(--sd-radio-button-border-select);color:var(--sd-radio-button-content-hover);z-index:2}.sd-radio-button__option--disabled{background-color:var(--sd-radio-button-bg-disabled);border-color:var(--sd-radio-button-border-disabled);color:var(--sd-radio-button-content-disabled);cursor:not-allowed}.sd-radio-button__label{user-select:none;-webkit-user-select:none}";export{g as sd_radio_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as a,c as o,a as d,h as s,H as i}from"./p-BZ5lcC25.js";import{s as e}from"./p-BE4tnQ2Z.js";import{m as t}from"./p-DOXMJi-V.js";const l={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},n={positive:"notificationOutline",negative:"warningOutline",default:null},m={positive:t.modal.confirm.positive.icon,negative:t.modal.confirm.negative.icon,default:""},r=Number(t.modal.confirm.title.icon),c=class{constructor(d){a(this,d),this.close=o(this,"sdClose",7),this.cancel=o(this,"sdCancel",7),this.ok=o(this,"sdOk",7)}get el(){return d(this)}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof HTMLElement&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??l[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const a=Array.from(this.el.childNodes).some((a=>!(a.nodeType===Node.ELEMENT_NODE&&a.classList.contains("sd-confirm-modal"))&&(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.TEXT_NODE&&a.textContent?.trim())));a!==this.hasSlottedContent&&(this.hasSlottedContent=a)}render(){const a=this.resolvedType,o=n[a],d=m[a];return s("div",{key:"e8fcb4879a5a9f2b3bf41753e4cc511e710db1f6",class:"sd-confirm-modal"},s("sd-ghost-button",{key:"a8595db97066963534d0ee5529f39481ed1e6c27",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&s("sd-icon",{key:"3b5cf4842176f6c039ecb64ec7942e7cb5a6f1ac",class:"sd-confirm-modal__icon",name:o,size:r,color:d}),s("h2",{key:"6f7032707292e71e0f8adc655ce88487c08e1b8d",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),s("div",{key:"e21c66301b368ffd989063aaf9826e023de71925",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&s("div",{key:"3965561001b0520f491cac833bba3cfe92d7a200",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((a=>s("p",{class:"sd-confirm-modal__message-text",innerHTML:e(a)})))),this.showContentBox&&s("div",{key:"dc2c38a945493e42d451e4fa3d3ebaa6dca75e4a",class:"sd-confirm-modal__content-box"},this.tagContents?s("div",{class:"sd-confirm-modal__custom-content",ref:a=>{this.customContentRef=a}}):s("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&s("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&s("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&s("div",{key:"ae35e60d69047547d159a452b838c8fc57a3e1a4",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((a=>s("p",{class:"sd-confirm-modal__message-text",innerHTML:e(a)}))))),s("div",{key:"3bd41c58539faade80e61fac6a91a4ab318bbe88",class:"sd-confirm-modal__button"},this.subButtonLabel&&s("sd-button",{key:"177fba6b79a23c80b1037d3af4872c58a598aa33",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),s("sd-button",{key:"b332d980d9236c584ebca47f89fc2d9b217c0bfd",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}};c.style="sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}";const g={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},h={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},f=t.modal.loading.message.typography.fontFamily,b=Number(t.modal.loading.message.typography.fontSize),p=Number(t.modal.loading.message.typography.fontWeight),u=Number(t.modal.loading.message.typography.lineHeight),_={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},v={loading:"작업 취소",error:"다시 시도"},y=class{constructor(d){a(this,d),this.click=o(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;progress;click;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||_[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||v[this.resolvedState]}handleClick=()=>{this.click.emit()};toCssSize(a){if(null!=a&&""!==a)return"number"==typeof a?`${a}px`:a}render(){const a={"--sd-loading-modal-min-width":`${g.minWidth}px`,"--sd-loading-modal-min-height":`${g.minHeight}px`,"--sd-loading-modal-gap":`${g.gap}px`,"--sd-loading-modal-content-size":`${g.contentSize}px`,"--sd-loading-modal-radius":`${g.radius}px`,"--sd-loading-modal-bg":h.bg,"--sd-loading-modal-message-color":h.messageColor,"--sd-loading-modal-message-font-family":f,"--sd-loading-modal-message-font-size":`${b}px`,"--sd-loading-modal-message-font-weight":`${p}`,"--sd-loading-modal-message-line-height":`${u}px`,"--sd-loading-modal-error-color":h.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${g.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${g.minHeight}px`};return s(i,{key:"163783850461aff1255dbd0784db91ad28da3f16",style:a},s("div",{key:"1e09f93378b0813d03c444570d06ffb09b494b63",class:"sd-loading-modal"},s("div",{key:"97a4919967f5be295b57b4194295c919b13151a4",class:"sd-loading-modal__content"},"loading"===this.resolvedState?s("sd-circle-progress",void 0!==this.progress?{value:this.progress}:{indeterminate:!0}):s("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:g.contentSize,color:h.errorIcon})),s("div",{key:"aea0e4b45a55f0907e073f125ba0195bfa128078",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((a=>s("p",{class:"sd-loading-modal__message"},a))):s("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.useButton&&s("div",{key:"b64767c954b366f6414886f032c80dd1c8c0190b",class:"sd-loading-modal__button"},s("sd-button",{key:"8a99e885b5561656f4046698235537d461b41455",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}};y.style="sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}";export{c as sd_confirm_modal,y as sd_loading_modal}
|