@sellmate/design-system 1.0.67 → 1.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component.textinput-C4SsDjA1.js → component.textinput-BpXDeZPD.js} +3 -2
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-BpT5VmKY.js → index-B2QvhbC3.js} +1 -1
- package/dist/cjs/index.cjs.js +36 -41
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/modal-stack-DucFLON7.js +112 -0
- 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 +3 -3
- package/dist/cjs/sd-button-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-button_4.cjs.entry.js +22 -17
- package/dist/cjs/sd-calendar.cjs.entry.js +1 -1
- 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.cjs.entry.js +312 -0
- 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-calendar.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +8 -19
- package/dist/cjs/sd-file-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button.cjs.entry.js +6 -6
- package/dist/cjs/sd-guide.cjs.entry.js +167 -34
- package/dist/cjs/sd-input_2.cjs.entry.js +7 -7
- package/dist/cjs/sd-loading-container.cjs.entry.js +4 -4
- package/dist/cjs/sd-modal-container.cjs.entry.js +126 -155
- package/dist/cjs/sd-number-input.cjs.entry.js +4 -4
- package/dist/cjs/sd-pagination_2.cjs.entry.js +116 -42
- package/dist/cjs/sd-popover.cjs.entry.js +4 -4
- package/dist/cjs/sd-portal.cjs.entry.js +4 -4
- package/dist/cjs/sd-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-dropdown_2.cjs.entry.js +4 -4
- package/dist/cjs/sd-select-group.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-multiple.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-option-group.cjs.entry.js +4 -4
- package/dist/cjs/sd-select-v2-list-item_4.cjs.entry.js +12 -16
- package/dist/cjs/sd-select.cjs.entry.js +2 -2
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-tag.cjs.entry.js +3 -3
- package/dist/cjs/sd-tbody.cjs.entry.js +2 -2
- package/dist/cjs/sd-td.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
- package/dist/cjs/sd-textarea.cjs.entry.js +3 -3
- package/dist/cjs/sd-thead.cjs.entry.js +4 -4
- package/dist/cjs/sd-toast-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/sd-tr.cjs.entry.js +3 -3
- package/dist/cjs/system-C89o3A9Z.js +16 -0
- package/dist/cjs/table-test.cjs.entry.js +2 -2
- package/dist/cjs/{tooltipArrow-C9i0ZsG_.js → tooltipArrow-Xkv-p1bY.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -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-button-v2/sd-button-v2.js +2 -2
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.config.js +37 -0
- package/dist/collection/components/sd-chip/sd-chip.css +56 -0
- package/dist/collection/components/sd-chip/sd-chip.js +544 -0
- 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-calendar/sd-date-picker-calendar.js +1 -1
- 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-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.js +4 -4
- package/dist/collection/components/sd-file-picker/sd-file-picker.css +1 -1
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +1 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +12 -8
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +5 -5
- package/dist/collection/components/sd-guide/sd-guide.config.js +48 -0
- package/dist/collection/components/sd-guide/sd-guide.css +58 -29
- package/dist/collection/components/sd-guide/sd-guide.js +69 -40
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-loading-container/sd-loading-container.config.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.css +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.css +11 -10
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +150 -164
- package/dist/collection/components/sd-number-input/sd-number-input.js +3 -3
- package/dist/collection/components/sd-pagination/sd-pagination.config.js +25 -0
- package/dist/collection/components/sd-pagination/sd-pagination.css +69 -53
- package/dist/collection/components/sd-pagination/sd-pagination.js +53 -37
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-portal/sd-portal.js +4 -4
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- 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-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select/sd-select.js +1 -1
- package/dist/collection/components/sd-select-group/sd-select-group.js +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js +4 -4
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.css +5 -5
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2.config.js +0 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +3 -3
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +5 -5
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +146 -0
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +1 -1
- 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-table/sd-tr/sd-tr.js +2 -2
- 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.js +3 -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.config.js +1 -1
- 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/collection/components/table-test/table-test.js +1 -1
- package/dist/collection/utils/modal-stack.js +109 -0
- package/dist/collection/utils/modal.js +17 -23
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DHh_uT9m.js → p-B1j9ZWLJ.js} +1 -1
- package/dist/components/{p-DPJPXCqf.js → p-BBluw-CU.js} +1 -1
- package/dist/components/{p-D74FHxKd.js → p-BFd54Imz.js} +1 -1
- package/dist/components/{p-IbLrnrk8.js → p-BPXQ6DXz.js} +1 -1
- package/dist/components/p-BaHpEtbz.js +1 -0
- package/dist/components/{p-DZJZLfsh.js → p-BlqLear7.js} +1 -1
- package/dist/components/{p-CJwbBrt5.js → p-ByhWX2NK.js} +1 -1
- package/dist/components/{p-ByYIyCZY.js → p-BylHC3lv.js} +1 -1
- package/dist/components/p-C-txBx-h.js +1 -0
- package/dist/components/p-C0VkfKIA.js +1 -0
- package/dist/components/p-C4uWhzoG.js +1 -0
- package/dist/components/{p-Ds4UCVE1.js → p-CEeNVTzW.js} +1 -1
- package/dist/components/{p-DDOw5GBw.js → p-CLZ8NObl.js} +1 -1
- package/dist/components/{p-tZWFjQm2.js → p-COM91Bya.js} +1 -1
- package/dist/components/{p-BH4I7hqf.js → p-CS62OEXf.js} +1 -1
- package/dist/components/{p-iWu6aGXE.js → p-CX0V7awA.js} +1 -1
- package/dist/components/{p-DlsWuYWL.js → p-Cb1M05mf.js} +1 -1
- package/dist/{design-system/p-CRTx3YEe.js → components/p-Cj4NAUzE.js} +1 -1
- package/dist/components/{p-1iOCtFn5.js → p-CsPyZohK.js} +1 -1
- package/dist/components/{p-DhkPKN1J.js → p-CsVPC3FD.js} +1 -1
- package/dist/components/{p-tvysh3yO.js → p-Csfk-CtX.js} +1 -1
- package/dist/components/{p-DqYRbHxW.js → p-CtrDZYN5.js} +1 -1
- package/dist/components/p-D21iKAp7.js +1 -0
- package/dist/components/{p-cNJ6VOYI.js → p-D6C4-apu.js} +1 -1
- package/dist/components/{p-V6yl4lMM.js → p-DGPGMB_Z.js} +1 -1
- package/dist/components/{p-CymMpTU-.js → p-DIro-Wat.js} +1 -1
- package/dist/components/{p-BstWg2vS.js → p-DPCj-bFr.js} +1 -1
- package/dist/components/{p-DLeCo2gh.js → p-DQLyH3dr.js} +1 -1
- package/dist/components/p-DRVnqiWc.js +1 -0
- package/dist/components/{p-C02KLCcO.js → p-DWW5xr6r.js} +1 -1
- package/dist/components/p-D_lyw4rN.js +1 -0
- package/dist/components/{p-DL69hClF.js → p-Diis5oCN.js} +1 -1
- package/dist/components/{p-BRRvU4ZQ.js → p-DlkxQ9Jn.js} +1 -1
- package/dist/components/{p-CkMs7IA8.js → p-N_EbEY8s.js} +1 -1
- package/dist/components/{p-hN9rpxkR.js → p-T5BGXHZg.js} +1 -1
- package/dist/components/{p-BF4hokOY.js → p-YgnF5oje.js} +1 -1
- package/dist/components/{p-CX2EDIQM.js → p-z9MoRjYX.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-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip.d.ts +11 -0
- package/dist/components/sd-chip.js +1 -0
- 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-calendar.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-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-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-portal.js +1 -1
- package/dist/components/sd-progress.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-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2-list-item-search.js +1 -1
- package/dist/components/sd-select-v2-list-item.js +1 -1
- package/dist/components/sd-select-v2-listbox.js +1 -1
- package/dist/components/sd-select-v2-trigger.js +1 -1
- package/dist/components/sd-select-v2.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/components/table-test.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/index.esm.js +1 -1
- package/dist/design-system/{p-c44ba991.entry.js → p-002e10ac.entry.js} +1 -1
- package/dist/design-system/p-01ac7743.entry.js +1 -0
- package/dist/design-system/{p-244d2d6e.entry.js → p-07736d67.entry.js} +1 -1
- package/dist/design-system/p-0929f910.entry.js +1 -0
- package/dist/design-system/{p-b2b5b2d3.entry.js → p-0b216b11.entry.js} +1 -1
- package/dist/design-system/{p-5b2486c9.entry.js → p-0bffdbf4.entry.js} +1 -1
- package/dist/design-system/{p-e1c17466.entry.js → p-0c98676e.entry.js} +1 -1
- package/dist/design-system/{p-5224553e.entry.js → p-0d485537.entry.js} +1 -1
- package/dist/design-system/{p-7fe09661.entry.js → p-16eae7ae.entry.js} +1 -1
- package/dist/design-system/{p-aebf903f.entry.js → p-1a455448.entry.js} +1 -1
- package/dist/design-system/{p-10763304.entry.js → p-1b8e63a6.entry.js} +1 -1
- package/dist/design-system/{p-525aefd5.entry.js → p-23c31074.entry.js} +1 -1
- package/dist/design-system/{p-7cf63a80.entry.js → p-23ff6bee.entry.js} +1 -1
- package/dist/design-system/{p-87a23bd0.entry.js → p-2a4b6bc7.entry.js} +1 -1
- package/dist/design-system/{p-298d9b57.entry.js → p-2a663b3b.entry.js} +1 -1
- package/dist/design-system/{p-fa1072f7.entry.js → p-308c2a72.entry.js} +1 -1
- package/dist/design-system/{p-e9d36c02.entry.js → p-33713805.entry.js} +1 -1
- package/dist/design-system/p-35b29182.entry.js +1 -0
- package/dist/design-system/{p-9e0b944f.entry.js → p-449e58ee.entry.js} +1 -1
- package/dist/design-system/{p-73383b2f.entry.js → p-48f1f9ff.entry.js} +1 -1
- package/dist/design-system/{p-504fdb4e.entry.js → p-4d434794.entry.js} +1 -1
- package/dist/design-system/p-4de3b6b1.entry.js +1 -0
- package/dist/design-system/p-4f9f25a1.entry.js +1 -0
- package/dist/design-system/{p-40371bf6.entry.js → p-59aa62ff.entry.js} +1 -1
- package/dist/design-system/{p-7b433296.entry.js → p-5a0b0a1b.entry.js} +1 -1
- package/dist/design-system/p-60ece09d.entry.js +1 -0
- package/dist/design-system/{p-10ed0768.entry.js → p-641c2f3d.entry.js} +1 -1
- package/dist/design-system/{p-2841d5e1.entry.js → p-64a56a4e.entry.js} +1 -1
- package/dist/design-system/{p-dff0060e.entry.js → p-6b2f6efb.entry.js} +1 -1
- package/dist/design-system/{p-e1202ad3.entry.js → p-6b478f5c.entry.js} +1 -1
- package/dist/design-system/{p-6eb3462d.entry.js → p-6ca6dfaf.entry.js} +1 -1
- package/dist/design-system/{p-337267a7.entry.js → p-6ef2d08f.entry.js} +1 -1
- package/dist/design-system/{p-51fcc29f.entry.js → p-703eee55.entry.js} +1 -1
- package/dist/design-system/p-75c5e31b.entry.js +1 -0
- package/dist/design-system/{p-768efd5a.entry.js → p-7dd8beba.entry.js} +1 -1
- package/dist/design-system/{p-348eff76.entry.js → p-7ef0c428.entry.js} +1 -1
- package/dist/design-system/{p-d263d476.entry.js → p-8281dc36.entry.js} +1 -1
- package/dist/design-system/p-87222184.entry.js +1 -0
- package/dist/design-system/p-8cd1b533.entry.js +1 -0
- package/dist/design-system/{p-f9559741.entry.js → p-92a52f89.entry.js} +1 -1
- package/dist/design-system/{p-19257b97.entry.js → p-95d96917.entry.js} +1 -1
- package/dist/design-system/{p-fb7e8c54.entry.js → p-9ecde011.entry.js} +1 -1
- package/dist/design-system/{p-b4e56b67.entry.js → p-9f0fe1f6.entry.js} +1 -1
- package/dist/design-system/p-BGyJgVXm.js +2 -0
- package/dist/design-system/{p-CJwbBrt5.js → p-ByhWX2NK.js} +1 -1
- package/dist/design-system/p-C-txBx-h.js +1 -0
- package/dist/design-system/p-C4tHYnB4.js +1 -0
- package/dist/design-system/p-DRVnqiWc.js +1 -0
- package/dist/design-system/{p-513d85e1.entry.js → p-ade9319d.entry.js} +1 -1
- package/dist/design-system/{p-671a9ca8.entry.js → p-aeadfb9c.entry.js} +1 -1
- package/dist/design-system/{p-b56ae914.entry.js → p-ca6b4d4a.entry.js} +1 -1
- package/dist/design-system/{p-b6e7b8c8.entry.js → p-cdedac3c.entry.js} +1 -1
- package/dist/design-system/{p-5982bcd0.entry.js → p-d43772c0.entry.js} +1 -1
- package/dist/design-system/{p-c6d2f909.entry.js → p-dfa716e0.entry.js} +1 -1
- package/dist/design-system/{p-a66529a5.entry.js → p-e1288299.entry.js} +1 -1
- package/dist/design-system/{p-2edd355b.entry.js → p-e1b307ee.entry.js} +1 -1
- package/dist/design-system/p-e3a1e677.entry.js +1 -0
- package/dist/design-system/p-ebc72b3f.entry.js +1 -0
- package/dist/design-system/{p-e385cbf4.entry.js → p-fa888a37.entry.js} +1 -1
- package/dist/esm/{component.textinput-CJwbBrt5.js → component.textinput-ByhWX2NK.js} +3 -2
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Dcpqhs6V.js → index-BGyJgVXm.js} +1 -1
- package/dist/esm/index.js +36 -41
- package/dist/esm/loader.js +3 -3
- package/dist/esm/modal-stack-DRVnqiWc.js +105 -0
- 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 +3 -3
- package/dist/esm/sd-button-v2_2.entry.js +3 -3
- package/dist/esm/sd-button_4.entry.js +22 -17
- package/dist/esm/sd-calendar.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip.entry.js +310 -0
- 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-calendar.entry.js +2 -2
- package/dist/esm/sd-date-picker-trigger.entry.js +3 -3
- package/dist/esm/sd-date-picker.entry.js +3 -3
- package/dist/esm/sd-date-range-picker-calendar.entry.js +2 -2
- package/dist/esm/sd-date-range-picker.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +5 -16
- package/dist/esm/sd-file-picker.entry.js +3 -3
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button.entry.js +6 -6
- package/dist/esm/sd-guide.entry.js +167 -34
- package/dist/esm/sd-input_2.entry.js +7 -7
- package/dist/esm/sd-loading-container.entry.js +4 -4
- package/dist/esm/sd-modal-container.entry.js +126 -155
- package/dist/esm/sd-number-input.entry.js +4 -4
- package/dist/esm/sd-pagination_2.entry.js +116 -42
- package/dist/esm/sd-popover.entry.js +4 -4
- package/dist/esm/sd-portal.entry.js +4 -4
- package/dist/esm/sd-progress.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +2 -2
- package/dist/esm/sd-radio-group.entry.js +2 -2
- package/dist/esm/sd-radio.entry.js +2 -2
- package/dist/esm/sd-select-dropdown_2.entry.js +4 -4
- package/dist/esm/sd-select-group.entry.js +2 -2
- package/dist/esm/sd-select-multiple-group.entry.js +2 -2
- package/dist/esm/sd-select-multiple.entry.js +2 -2
- package/dist/esm/sd-select-option-group.entry.js +4 -4
- package/dist/esm/sd-select-v2-list-item_4.entry.js +12 -16
- package/dist/esm/sd-select.entry.js +2 -2
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/sd-table.entry.js +6 -6
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-tag.entry.js +3 -3
- package/dist/esm/sd-tbody.entry.js +2 -2
- package/dist/esm/sd-td.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +4 -4
- package/dist/esm/sd-textarea.entry.js +3 -3
- package/dist/esm/sd-thead.entry.js +4 -4
- package/dist/esm/sd-toast-container.entry.js +3 -3
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/sd-tr.entry.js +3 -3
- package/dist/esm/system-C-txBx-h.js +14 -0
- package/dist/esm/table-test.entry.js +2 -2
- package/dist/esm/{tooltipArrow-fP-ISMAm.js → tooltipArrow-BAjP9_Hx.js} +1 -1
- package/dist/types/components/sd-chip/sd-chip.config.d.ts +36 -0
- package/dist/types/components/sd-chip/sd-chip.d.ts +47 -0
- package/dist/types/components/sd-guide/sd-guide.config.d.ts +44 -0
- package/dist/types/components/sd-guide/sd-guide.d.ts +3 -4
- package/dist/types/components/sd-loading-container/sd-loading-container.config.d.ts +1 -1
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +12 -16
- package/dist/types/components/sd-pagination/sd-pagination.config.d.ts +23 -0
- package/dist/types/components/sd-pagination/sd-pagination.d.ts +3 -3
- package/dist/types/components/sd-select-v2/sd-select-v2.config.d.ts +0 -1
- package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +29 -0
- package/dist/types/components/sd-toast-container/sd-toast-container.config.d.ts +1 -1
- package/dist/types/components.d.ts +125 -16
- package/dist/types/utils/modal-stack.d.ts +17 -0
- package/hydrate/index.js +963 -354
- package/hydrate/index.mjs +963 -354
- package/package.json +1 -1
- package/dist/components/p-B_7ozne7.js +0 -1
- package/dist/components/p-BsPBl6g5.js +0 -1
- package/dist/components/p-BuSniZ67.js +0 -1
- package/dist/components/p-CCHce_Dt.js +0 -1
- package/dist/components/p-DNVUhw5A.js +0 -1
- package/dist/components/p-UR2Cf2Sm.js +0 -1
- package/dist/design-system/p-1645da95.entry.js +0 -1
- package/dist/design-system/p-3b8595de.entry.js +0 -1
- package/dist/design-system/p-3bbf23b4.entry.js +0 -1
- package/dist/design-system/p-4c55ba79.entry.js +0 -1
- package/dist/design-system/p-6e9d6063.entry.js +0 -1
- package/dist/design-system/p-87b2c270.entry.js +0 -1
- package/dist/design-system/p-9925857c.entry.js +0 -1
- package/dist/design-system/p-9cb3be8c.entry.js +0 -1
- package/dist/design-system/p-Dcpqhs6V.js +0 -2
- package/dist/design-system/p-e232fb11.entry.js +0 -1
- package/dist/design-system/p-e474fa8c.entry.js +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else
|
|
6
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
7
|
+
if (d = decorators[i])
|
|
8
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
import { css, LitElement, html, nothing } from "lit";
|
|
12
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
13
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
14
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
15
|
+
// React/Vue의 useSdTableVirtualScroll과 동일 역할:
|
|
16
|
+
// sd-table의 sdVirtualUpdate를 listen해서 vsStart..vsEnd 슬라이스만 슬롯에 꽂는다.
|
|
17
|
+
// Storybook(lit-html)에는 그 역할을 할 reactive 호스트가 없어서 wrapper로 제공.
|
|
18
|
+
//
|
|
19
|
+
// declare + constructor 초기화 패턴: tsconfig가 target es2022라
|
|
20
|
+
// class field가 native define으로 컴파일되어 lit의 accessor를 overwrite하는 문제를 회피.
|
|
21
|
+
let StoryVirtualTable = class StoryVirtualTable extends LitElement {
|
|
22
|
+
static styles = css `
|
|
23
|
+
:host {
|
|
24
|
+
display: block;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
tableRef = createRef();
|
|
29
|
+
detachListener;
|
|
30
|
+
syncRafId = 0;
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.columns = [];
|
|
34
|
+
this.rows = [];
|
|
35
|
+
this.stickyColumn = { left: 0, right: 0 };
|
|
36
|
+
this.stickyHeader = false;
|
|
37
|
+
this.selectable = false;
|
|
38
|
+
this.resizable = false;
|
|
39
|
+
this.height = '480px';
|
|
40
|
+
this.width = '100%';
|
|
41
|
+
this.rowHeight = 44;
|
|
42
|
+
this.rowKey = 'id';
|
|
43
|
+
this.range = null;
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
super.disconnectedCallback();
|
|
47
|
+
this.detachListener?.();
|
|
48
|
+
if (this.syncRafId)
|
|
49
|
+
cancelAnimationFrame(this.syncRafId);
|
|
50
|
+
}
|
|
51
|
+
firstUpdated() {
|
|
52
|
+
const el = this.tableRef.value;
|
|
53
|
+
if (!el)
|
|
54
|
+
return;
|
|
55
|
+
const onUpdate = (e) => {
|
|
56
|
+
const detail = e.detail;
|
|
57
|
+
this.range = { from: detail.from, to: detail.to };
|
|
58
|
+
};
|
|
59
|
+
el.addEventListener('sdVirtualUpdate', onUpdate);
|
|
60
|
+
this.detachListener = () => el.removeEventListener('sdVirtualUpdate', onUpdate);
|
|
61
|
+
const trySync = () => {
|
|
62
|
+
const r = el
|
|
63
|
+
.getVirtualScrollRangeSync?.();
|
|
64
|
+
if (r && typeof r.from === 'number' && typeof r.to === 'number') {
|
|
65
|
+
this.range = { from: r.from, to: r.to };
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.syncRafId = requestAnimationFrame(trySync);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
trySync();
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
const from = this.range?.from ?? 0;
|
|
75
|
+
const to = this.range?.to ?? 0;
|
|
76
|
+
const slice = this.range ? this.rows.slice(from, to) : [];
|
|
77
|
+
return html `
|
|
78
|
+
<sd-table
|
|
79
|
+
${ref(this.tableRef)}
|
|
80
|
+
.columns=${this.columns}
|
|
81
|
+
.rows=${this.rows}
|
|
82
|
+
row-key=${this.rowKey}
|
|
83
|
+
?selectable=${this.selectable}
|
|
84
|
+
?resizable=${this.resizable}
|
|
85
|
+
?sticky-header=${this.stickyHeader}
|
|
86
|
+
.stickyColumn=${this.stickyColumn}
|
|
87
|
+
width=${this.width}
|
|
88
|
+
height=${this.height}
|
|
89
|
+
?use-virtual-scroll=${true}
|
|
90
|
+
row-height=${this.rowHeight}
|
|
91
|
+
>
|
|
92
|
+
<sd-thead></sd-thead>
|
|
93
|
+
<sd-tbody>
|
|
94
|
+
${repeat(slice, (_row, i) => from + i, (row, i) => {
|
|
95
|
+
const absoluteIndex = from + i;
|
|
96
|
+
return html `
|
|
97
|
+
<sd-tr row-key=${String(absoluteIndex)} .row=${row}>
|
|
98
|
+
${this.renderRow ? this.renderRow(row, absoluteIndex) : nothing}
|
|
99
|
+
</sd-tr>
|
|
100
|
+
`;
|
|
101
|
+
})}
|
|
102
|
+
</sd-tbody>
|
|
103
|
+
</sd-table>
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
__decorate([
|
|
108
|
+
property({ attribute: false })
|
|
109
|
+
], StoryVirtualTable.prototype, "columns", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ attribute: false })
|
|
112
|
+
], StoryVirtualTable.prototype, "rows", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property({ attribute: false })
|
|
115
|
+
], StoryVirtualTable.prototype, "stickyColumn", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
property({ type: Boolean, attribute: 'sticky-header' })
|
|
118
|
+
], StoryVirtualTable.prototype, "stickyHeader", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
property({ type: Boolean })
|
|
121
|
+
], StoryVirtualTable.prototype, "selectable", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
property({ type: Boolean })
|
|
124
|
+
], StoryVirtualTable.prototype, "resizable", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
property()
|
|
127
|
+
], StoryVirtualTable.prototype, "height", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
property()
|
|
130
|
+
], StoryVirtualTable.prototype, "width", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: Number, attribute: 'row-height' })
|
|
133
|
+
], StoryVirtualTable.prototype, "rowHeight", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ attribute: 'row-key' })
|
|
136
|
+
], StoryVirtualTable.prototype, "rowKey", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ attribute: false })
|
|
139
|
+
], StoryVirtualTable.prototype, "renderRow", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
state()
|
|
142
|
+
], StoryVirtualTable.prototype, "range", void 0);
|
|
143
|
+
StoryVirtualTable = __decorate([
|
|
144
|
+
customElement('story-virtual-table')
|
|
145
|
+
], StoryVirtualTable);
|
|
146
|
+
export { StoryVirtualTable };
|
|
@@ -41,7 +41,7 @@ export class SdTbody {
|
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
43
|
const hasRows = this.rows.length > 0;
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '82a437ddf0cb3c34877b9dbcb47b5406c20a0c0e', slot: `${this.tableId}-body` }, h("tbody", { key: '0f0257720491c781eda0479fb0c08d7dffc4f734', class: { 'tbody': true, 'tbody--empty': !hasRows } }, hasRows ? ([
|
|
45
45
|
this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
|
|
46
46
|
h("slot", null),
|
|
47
47
|
this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
|
|
@@ -34,7 +34,7 @@ export class SdTd {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'c6ddb546268b573694b827509ebdfe74fff8a15a', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: '0b59fb8a0cfa1ef628f50496af96aa2f39fdc89a' })));
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "sd-td"; }
|
|
40
40
|
static get originalStyleUrls() {
|
|
@@ -128,16 +128,16 @@ export class SdThead {
|
|
|
128
128
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
129
129
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
130
130
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
131
|
-
return (h(Host, { key: '
|
|
131
|
+
return (h(Host, { key: '97badde9634e2e7363eace5a402fc49a587459c3', slot: `${this.tableId}-head` }, h("thead", { key: 'd1ce731f6082679d8d61f4b74ac122f28f344909', class: {
|
|
132
132
|
'thead': true,
|
|
133
133
|
'thead--sticky': this._stickyHeader,
|
|
134
|
-
} }, h("tr", { key: '
|
|
134
|
+
} }, h("tr", { key: 'd0f8b1e8b8a7174cc9b39fabf782eddf2e2accaa', class: "tr" }, this._selectable && (h("th", { key: 'c422f5bd9f9a045785d2d91dd9e2dee6e8f91185', class: {
|
|
135
135
|
'th': true,
|
|
136
136
|
'th--selected': true,
|
|
137
137
|
'sticky-left': true,
|
|
138
138
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
139
139
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
140
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
140
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '32cea740457b21d4d6fd53a8f1c10b505a24a481', value: this.getIsAllChecked(), disabled: !safeRows.length, onSdUpdate: (e) => this.handleSelectAll(e.detail) }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
141
141
|
'th': true,
|
|
142
142
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
143
143
|
'sticky-left': true,
|
|
@@ -123,13 +123,13 @@ export class SdTr {
|
|
|
123
123
|
const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
|
|
124
124
|
const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
125
125
|
const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: '3bc910f3afa801d7824eee2e73456ef152c7dc93', style: { display: this.isVisible ? '' : 'none' } }, h("tr", { key: '93b1f4113ae63aa1c0cf79addaa9e8d15c9e8287', class: "tr" }, this._selectable && (h("td", { key: '0caba47c216126f4b7407dfe26afb9f0c75f6450', class: {
|
|
127
127
|
'td': true,
|
|
128
128
|
'td--selected': true,
|
|
129
129
|
'sticky-left': true,
|
|
130
130
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
131
131
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
132
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
132
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '2e41b3902f489877b624266e588221698aaa8f12', value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => (h("td", { key: col.name, class: {
|
|
133
133
|
'td': true,
|
|
134
134
|
[`td--${col.align || 'left'}`]: true,
|
|
135
135
|
'sticky-left': true,
|
|
@@ -39,7 +39,7 @@ export class SdTabs {
|
|
|
39
39
|
return `square_xs_${color}`;
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '62ace36515932f8889fc35121b6a8cf98fd9a314', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
|
|
43
43
|
const badgeName = this.getBadgeName(tab);
|
|
44
44
|
return (h("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && h("sd-tag", { name: badgeName, label: tab.badge.toString() })));
|
|
45
45
|
})));
|
|
@@ -19,7 +19,7 @@ export class SdTag {
|
|
|
19
19
|
render() {
|
|
20
20
|
const config = this.resolvedConfig;
|
|
21
21
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
22
|
-
return (h("span", { key: '
|
|
22
|
+
return (h("span", { key: '3e3bf735f8d832e75f1061eac69ccd8972b9f40f', class: "sd-tag", style: {
|
|
23
23
|
'--sd-tag-background': config.background,
|
|
24
24
|
'--sd-tag-content': config.content,
|
|
25
25
|
'--sd-tag-height': config.height,
|
|
@@ -29,7 +29,7 @@ export class SdTag {
|
|
|
29
29
|
'--sd-tag-font-weight': config.fontWeight,
|
|
30
30
|
'--sd-tag-line-height': config.lineHeight,
|
|
31
31
|
'--sd-tag-radius': config.radius,
|
|
32
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
32
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: 'a06237d1d29bb64b4b830294f5385a9b9b909624', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "sd-tag"; }
|
|
35
35
|
static get originalStyleUrls() {
|
|
@@ -26,16 +26,16 @@ export class SdTextLink {
|
|
|
26
26
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
27
27
|
...(this.disabled ? { '--sd-text-link-color': TEXT_LINK_COLORS.content.disabled } : {}),
|
|
28
28
|
};
|
|
29
|
-
return (h("span", { key: '
|
|
29
|
+
return (h("span", { key: 'c485091d0a9d7f8aa946ac54d96baab50bcaa3c7', class: {
|
|
30
30
|
'sd-text-link': true,
|
|
31
31
|
'sd-text-link--disabled': this.disabled,
|
|
32
|
-
}, style: cssVars, onClick: this.handleClick }, this.icon && (h("sd-icon", { key: '
|
|
32
|
+
}, style: cssVars, onClick: this.handleClick }, this.icon && (h("sd-icon", { key: '98a2df9a2ba9b5d77eb73c0989cdf38383cfcd15', name: this.icon, size: TEXT_LINK_LAYOUT.iconSize, color: iconColor, class: "sd-text-link__icon" })), h("span", { key: '3c6867611e0d970855897b06f7e9368a8588ff76', class: labelClassName }, this.label), this.useArrow && (h("span", { key: '460bebf92782560d64e41b47ea9ef42b66cc08c0', class: "sd-text-link__arrow", style: {
|
|
33
33
|
width: `${TEXT_LINK_LAYOUT.arrowFrame}px`,
|
|
34
34
|
height: `${TEXT_LINK_LAYOUT.arrowFrame}px`,
|
|
35
35
|
display: 'inline-flex',
|
|
36
36
|
alignItems: 'center',
|
|
37
37
|
justifyContent: 'center',
|
|
38
|
-
} }, h("sd-icon", { key: '
|
|
38
|
+
} }, h("sd-icon", { key: 'fee7c74359e683829ad3fa802191b651aa9e94da', name: "chevronRight", size: TEXT_LINK_LAYOUT.arrowIconSize, color: arrowColor })))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "sd-text-link"; }
|
|
41
41
|
static get originalStyleUrls() {
|
|
@@ -104,7 +104,7 @@ export class SdTextarea {
|
|
|
104
104
|
'--sd-system-size-field-sm-height': 'auto',
|
|
105
105
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
106
106
|
};
|
|
107
|
-
return (h("sd-field", { key: '
|
|
107
|
+
return (h("sd-field", { key: '4c93d887429d6790d2d49c951be64e4be1496fd4', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'b64aa1b2f02c1f68db57e5e36e0a7146257629e1', class: "sd-textarea__content" }, h("textarea", { key: 'b2baff1d99b9c2347f0b0bb751fc51268d2c48c7', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "sd-textarea"; }
|
|
110
110
|
static get originalStyleUrls() {
|
|
@@ -11,10 +11,10 @@ export class SdToast {
|
|
|
11
11
|
render() {
|
|
12
12
|
const typeConfig = TOAST_TYPE_CONFIG[this.type] ?? TOAST_TYPE_CONFIG.default;
|
|
13
13
|
const iconSize = Number(TOAST_LAYOUT.iconSize);
|
|
14
|
-
return (h("div", { key: '
|
|
14
|
+
return (h("div", { key: 'a041d5561d09ef56f4afd722e141b0a2e3a9453f', style: {
|
|
15
15
|
'--sd-toast-bg': typeConfig.bg,
|
|
16
16
|
'--sd-toast-text': typeConfig.content,
|
|
17
|
-
} }, h("div", { key: '
|
|
17
|
+
} }, h("div", { key: 'bf2a397484ec5938c0442ee0ee98f0ce00ad1ec0', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '4ea8468b31909e3aea1a293c393621e1815dea5c', class: "sd-toast__icon" }, h("sd-icon", { key: '407a0be71e36a6dca30f5cfb300f2c9ebf6b32c2', name: this.icon, size: iconSize, color: typeConfig.content }))), h("div", { key: '756ca54899ec4d6c3543f8fb1f681d09181674c9', class: "sd-toast__content" }, h("span", { key: 'f0e66dbd5e99bc3921a354ac51294a3c29fe9ea0', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '9f4a1a938b7559b03d7dd824c7f2fdbcb093e6fe', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.useClose && (h("sd-ghost-button", { key: '03d64765901bc8a93f09642b09ae733fa9da0db4', class: "sd-toast__close", icon: "close", intent: this.type === 'caution' ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "sd-toast"; }
|
|
20
20
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const DEFAULT_DURATION = 4000;
|
|
2
2
|
export const DEFAULT_MAX_VISIBLE = 3;
|
|
3
3
|
export const DEFAULT_GAP = 8;
|
|
4
|
-
export const DEFAULT_Z_INDEX =
|
|
4
|
+
export const DEFAULT_Z_INDEX = 999;
|
|
5
5
|
export const TRANSITION_DURATION = 400;
|
|
6
6
|
export const TRANSITION_FALLBACK_BUFFER = 100;
|
|
7
7
|
export const COLLAPSED_SCALE_STEP = 0.05;
|
|
@@ -216,7 +216,7 @@ export class SdToastContainer {
|
|
|
216
216
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
217
217
|
const indexMap = new Map();
|
|
218
218
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
219
|
-
return (h("div", { key: '
|
|
219
|
+
return (h("div", { key: '4660dd2f2626d391bbcca7da59e16e6c4204d80d', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
220
220
|
this.expanded = true;
|
|
221
221
|
this.pauseTimers();
|
|
222
222
|
}, onMouseLeave: () => {
|
|
@@ -45,7 +45,7 @@ export class SdToggle {
|
|
|
45
45
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
46
46
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
47
47
|
};
|
|
48
|
-
return (h("label", { key: '
|
|
48
|
+
return (h("label", { key: '1e0864450b0447ec08643290d1050e4d0ee0c4a4', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '7e44e8569de24839c41e8c28f579923e3a837366', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "sd-toggle"; }
|
|
51
51
|
static get originalStyleUrls() {
|
|
@@ -81,14 +81,14 @@ export class SdTooltip {
|
|
|
81
81
|
const toggleTooltip = () => (this.showTooltip = !this.showTooltip);
|
|
82
82
|
const divTrigger = trigger === 'hover' ? hoverTrigger : this.label ? {} : { onClick: toggleTooltip };
|
|
83
83
|
const buttonClickTrigger = trigger === 'click' && this.label ? { onSdClick: toggleTooltip } : {};
|
|
84
|
-
return (h(Fragment, { key: '
|
|
84
|
+
return (h(Fragment, { key: 'aade7a4be8e9955ca4dc437845ee8de9d212fd61' }, h("div", { key: '332c4872541bea334c1f0b6f06de8a1789dc10b8', class: `sd-tooltip-trigger ${this.sdClass || ''}`, ...divTrigger }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: icon, size: this.buttonSize ?? 'sm', color: color, variant: this.buttonVariant ?? 'primary', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: '96f19d91f765020ae5663f216011e2000617c9d1', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: placement, offset: this.tooltipOffset }, h("div", { key: '12c2f1fbf59dc1a790016da071805164b0426419', ref: el => (this.menuEl = el), class: {
|
|
85
85
|
'sd-floating-menu': true,
|
|
86
86
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
87
87
|
[`sd-floating-menu--${placement}`]: true,
|
|
88
88
|
}, style: {
|
|
89
89
|
'--sd-floating-bg': typeConfig.bg,
|
|
90
90
|
'--sd-floating-content': typeConfig.content,
|
|
91
|
-
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: '
|
|
91
|
+
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: 'f69c0cb66d5be975f60bfa7cdbd46e0283d4af2b', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '3fbc2c3baa903e80d525225ab1f1aa4b3ec6ad4b' })), h("div", { key: 'a2286ef4e9f5d6c1b1a26ea044ddf1051900c5a2', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
|
|
92
92
|
}
|
|
93
93
|
static get is() { return "sd-tooltip"; }
|
|
94
94
|
static get originalStyleUrls() {
|
|
@@ -71,7 +71,7 @@ export class DataTable {
|
|
|
71
71
|
return el.innerHTML;
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (h("div", { key: '
|
|
74
|
+
return (h("div", { key: 'eb6246d49bb46a1c2b2b9d93cff90e7c0d6788b4', class: "table-wrapper" }, h("table", { key: '584d752e51f252f2dd7a29868ae4300b55c47065', class: { 'data-table': true, 'bordered': this.bordered, 'striped': this.striped } }, h("thead", { key: 'fd35de9ad1cb79cf77ab9f7a806d2d7258d8b11b' }, h("tr", { key: '39a42d9fc76571aa5ef6073ec554471d5fd1b4c1' }, this.columns.map(column => (h("th", { key: column.field, style: { width: column.width } }, this.renderHeaderContent(column)))))), h("tbody", { key: '5c3a2b5853f619666b20145e0f7a221c75969071' }, this.rows.map((row, rowIndex) => (h("tr", { key: rowIndex }, this.columns.map(column => (h("td", { key: `${rowIndex}-${column.field}` }, this.renderCellContent(column, row, rowIndex))))))))), h("div", { key: 'bbbd15c2d1b517774340dbcdfb59338f260df21b', class: "templates-slot", hidden: true }, h("slot", { key: '28733f09dd4a90976d9bb60102039981c736cf87' }))));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "table-test"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
const DEFAULT_BASE_Z_INDEX = 997;
|
|
2
|
+
let baseZIndex = DEFAULT_BASE_Z_INDEX;
|
|
3
|
+
let entries = [];
|
|
4
|
+
let bodyScrollLocked = false;
|
|
5
|
+
let previousBodyOverflow = null;
|
|
6
|
+
let isKeydownAttached = false;
|
|
7
|
+
function isBrowserEnvironment() {
|
|
8
|
+
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
9
|
+
}
|
|
10
|
+
function getTopInteractiveEntry() {
|
|
11
|
+
return [...entries].reverse().find(entry => entry.interactive);
|
|
12
|
+
}
|
|
13
|
+
function syncBodyScrollLock() {
|
|
14
|
+
if (!isBrowserEnvironment())
|
|
15
|
+
return;
|
|
16
|
+
const shouldLock = entries.length > 0;
|
|
17
|
+
if (shouldLock === bodyScrollLocked)
|
|
18
|
+
return;
|
|
19
|
+
if (shouldLock) {
|
|
20
|
+
previousBodyOverflow = document.body.style.overflow || '';
|
|
21
|
+
document.body.style.overflow = 'hidden';
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
document.body.style.overflow = previousBodyOverflow ?? '';
|
|
25
|
+
previousBodyOverflow = null;
|
|
26
|
+
}
|
|
27
|
+
bodyScrollLocked = shouldLock;
|
|
28
|
+
}
|
|
29
|
+
function updateEntryZIndices() {
|
|
30
|
+
entries.forEach(entry => {
|
|
31
|
+
entry.setZIndex(baseZIndex);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function detachKeydownListener() {
|
|
35
|
+
if (!isBrowserEnvironment() || !isKeydownAttached)
|
|
36
|
+
return;
|
|
37
|
+
window.removeEventListener('keydown', handleWindowKeydown);
|
|
38
|
+
isKeydownAttached = false;
|
|
39
|
+
}
|
|
40
|
+
function attachKeydownListener() {
|
|
41
|
+
if (!isBrowserEnvironment() || isKeydownAttached)
|
|
42
|
+
return;
|
|
43
|
+
window.addEventListener('keydown', handleWindowKeydown);
|
|
44
|
+
isKeydownAttached = true;
|
|
45
|
+
}
|
|
46
|
+
function syncGlobalState() {
|
|
47
|
+
updateEntryZIndices();
|
|
48
|
+
syncBodyScrollLock();
|
|
49
|
+
if (entries.length > 0)
|
|
50
|
+
attachKeydownListener();
|
|
51
|
+
else
|
|
52
|
+
detachKeydownListener();
|
|
53
|
+
}
|
|
54
|
+
function handleWindowKeydown(e) {
|
|
55
|
+
if (e.key !== 'Escape')
|
|
56
|
+
return;
|
|
57
|
+
const topEntry = getTopInteractiveEntry();
|
|
58
|
+
if (!topEntry)
|
|
59
|
+
return;
|
|
60
|
+
if (topEntry.persistent) {
|
|
61
|
+
topEntry.shake();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
topEntry.requestClose('close');
|
|
65
|
+
}
|
|
66
|
+
export function configureModalStack(options = {}) {
|
|
67
|
+
if (options.zIndex != null) {
|
|
68
|
+
baseZIndex = options.zIndex;
|
|
69
|
+
}
|
|
70
|
+
syncGlobalState();
|
|
71
|
+
}
|
|
72
|
+
export function registerModal(entry) {
|
|
73
|
+
entries = [
|
|
74
|
+
...entries.filter(item => item.id !== entry.id),
|
|
75
|
+
{
|
|
76
|
+
...entry,
|
|
77
|
+
interactive: true,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
syncGlobalState();
|
|
81
|
+
}
|
|
82
|
+
export function unregisterModal(id) {
|
|
83
|
+
entries = entries.filter(entry => entry.id !== id);
|
|
84
|
+
syncGlobalState();
|
|
85
|
+
}
|
|
86
|
+
export function setModalInteractive(id, interactive) {
|
|
87
|
+
entries = entries.map(entry => (entry.id === id ? { ...entry, interactive } : entry));
|
|
88
|
+
syncGlobalState();
|
|
89
|
+
}
|
|
90
|
+
export function isTopInteractiveModal(id) {
|
|
91
|
+
return getTopInteractiveEntry()?.id === id;
|
|
92
|
+
}
|
|
93
|
+
export function requestCloseForModal(id) {
|
|
94
|
+
const topEntry = getTopInteractiveEntry();
|
|
95
|
+
if (!topEntry || topEntry.id !== id)
|
|
96
|
+
return false;
|
|
97
|
+
if (topEntry.persistent) {
|
|
98
|
+
topEntry.shake();
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
topEntry.requestClose('close');
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
export function resetModalStackManagerForTests() {
|
|
105
|
+
entries = [];
|
|
106
|
+
baseZIndex = DEFAULT_BASE_Z_INDEX;
|
|
107
|
+
syncBodyScrollLock();
|
|
108
|
+
detachKeydownListener();
|
|
109
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { configureModalStack } from "./modal-stack";
|
|
1
2
|
const MODAL_CONTAINER_TAG = 'sd-modal-container';
|
|
2
3
|
const REASON_TO_CONTAINER = {
|
|
3
4
|
ok: 'confirm',
|
|
@@ -84,21 +85,17 @@ class ModalDialogRefImpl {
|
|
|
84
85
|
this.pendingActions = [];
|
|
85
86
|
pendingActions.forEach(action => action());
|
|
86
87
|
}
|
|
88
|
+
_setContainer(containerRef) {
|
|
89
|
+
this.containerRef = containerRef;
|
|
90
|
+
}
|
|
87
91
|
runOrQueue(action) {
|
|
88
|
-
if (this.modalId) {
|
|
92
|
+
if (this.modalId && this.containerRef) {
|
|
89
93
|
action();
|
|
90
94
|
return;
|
|
91
95
|
}
|
|
92
96
|
this.pendingActions.push(action);
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
|
-
let containerEl = null;
|
|
96
|
-
function applyGlobalOptions(container, options) {
|
|
97
|
-
if (!options)
|
|
98
|
-
return;
|
|
99
|
-
if (options.zIndex != null)
|
|
100
|
-
container.style.setProperty('--sd-modal-container-z-index', String(options.zIndex));
|
|
101
|
-
}
|
|
102
99
|
function assertBrowserEnvironment() {
|
|
103
100
|
if (typeof window === 'undefined' ||
|
|
104
101
|
typeof document === 'undefined' ||
|
|
@@ -111,17 +108,13 @@ function assertModalContainerDefined() {
|
|
|
111
108
|
throw new Error('[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.');
|
|
112
109
|
}
|
|
113
110
|
}
|
|
114
|
-
function
|
|
111
|
+
function createContainer() {
|
|
115
112
|
assertBrowserEnvironment();
|
|
116
113
|
assertModalContainerDefined();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
containerEl = document.createElement(MODAL_CONTAINER_TAG);
|
|
122
|
-
applyGlobalOptions(containerEl, options);
|
|
123
|
-
document.body.appendChild(containerEl);
|
|
124
|
-
return containerEl;
|
|
114
|
+
const container = document.createElement(MODAL_CONTAINER_TAG);
|
|
115
|
+
container.setAttribute('auto-remove', '');
|
|
116
|
+
document.body.appendChild(container);
|
|
117
|
+
return container;
|
|
125
118
|
}
|
|
126
119
|
async function whenReady(el) {
|
|
127
120
|
await customElements.whenDefined(MODAL_CONTAINER_TAG);
|
|
@@ -136,13 +129,13 @@ async function whenReady(el) {
|
|
|
136
129
|
* 시그니처가 바뀔 수 있습니다.
|
|
137
130
|
*/
|
|
138
131
|
export function _createSdModalRef() {
|
|
139
|
-
|
|
140
|
-
return new ModalDialogRefImpl('', container);
|
|
132
|
+
return new ModalDialogRefImpl('');
|
|
141
133
|
}
|
|
142
134
|
export function _attachSdModalWithRef(modalRef, input) {
|
|
143
135
|
const { component, persistent } = input;
|
|
144
|
-
const container =
|
|
136
|
+
const container = createContainer();
|
|
145
137
|
const options = { persistent };
|
|
138
|
+
modalRef._setContainer(container);
|
|
146
139
|
whenReady(container).then(async () => {
|
|
147
140
|
const id = await container.createCustom(component, options, modalRef);
|
|
148
141
|
modalRef._setId(id);
|
|
@@ -150,7 +143,7 @@ export function _attachSdModalWithRef(modalRef, input) {
|
|
|
150
143
|
}
|
|
151
144
|
export const sdModal = {
|
|
152
145
|
confirm(options) {
|
|
153
|
-
const container =
|
|
146
|
+
const container = createContainer();
|
|
154
147
|
const modalRef = new ModalDialogRefImpl('', container);
|
|
155
148
|
whenReady(container).then(async () => {
|
|
156
149
|
const id = await container.open(options, modalRef);
|
|
@@ -168,7 +161,7 @@ export const sdModal = {
|
|
|
168
161
|
* 로 에러 상태로 전환할 수 있습니다.
|
|
169
162
|
*/
|
|
170
163
|
loading(options = {}) {
|
|
171
|
-
const container =
|
|
164
|
+
const container = createContainer();
|
|
172
165
|
const modalRef = new ModalDialogRefImpl('', container);
|
|
173
166
|
whenReady(container).then(async () => {
|
|
174
167
|
const id = await container.openLoading(options, modalRef);
|
|
@@ -182,6 +175,7 @@ export const sdModal = {
|
|
|
182
175
|
return modalRef;
|
|
183
176
|
},
|
|
184
177
|
configure(options) {
|
|
185
|
-
|
|
178
|
+
assertBrowserEnvironment();
|
|
179
|
+
configureModalStack(options);
|
|
186
180
|
},
|
|
187
181
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-C0VkfKIA.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){n&&(n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function o(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function i(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=o(s);return await i(c),c.create({message:t,type:n,...r})},async dismiss(t){if(n)return await i(n),n.dismiss(t)},async dismissAll(){if(n)return await i(n),n.dismissAll()},configure(t){o(t)}},u="sd-modal-container",d={ok:"confirm",cancel:"cancel",close:"close"};class l{modalId;okFn;cancelFn;closeFn;clickFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef.update?.(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=d[t];return this.runOrQueue((()=>{this.containerRef.dismissById?.(this.modalId,n)})),this}_triggerOk(){this.okFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerClick(){this.clickFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}_setContainer(t){this.containerRef=t}runOrQueue(t){this.modalId&&this.containerRef?t():this.pendingActions.push(t)}}function m(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}function f(){m(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}();const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),t}async function h(t){if(await customElements.whenDefined(u),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function w(){return new l("")}function p(t,n){const{component:e,persistent:s}=n,o=f(),i={persistent:s};t._setContainer(o),h(o).then((async()=>{const n=await o.createCustom(e,i,t);t._setId(n)}))}const y={confirm(t){const n=f(),e=new l("",n);return h(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=f(),e=new l("",n);return h(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=w();return p(n,t),n},configure(n){m(),t(n)}},E="sd-loading-container";let C=null;async function k(t){const n=(function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdLoading] Browser APIs are unavailable. Use `sdLoading` only on the client.")}(),function(){if(!customElements.get(E))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),C&&document.body.contains(C)||(C=document.createElement(E),document.body.appendChild(C)),C);await customElements.whenDefined(E),t(n)}const A={show(t={}){k((n=>{n.show?.(t)}))},hide(){C&&k((t=>{t.hide?.()}))}};export{p as _attachSdModalWithRef,w as _createSdModalRef,A as sdLoading,y as sdModal,c as sdToast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as d,H as
|
|
1
|
+
import{p as d,H as a,c as e,h as s,d as o,t as i}from"./p-C0VkfKIA.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-Cb1M05mf.js";import{d as n}from"./p-T5BGXHZg.js";import{d as m}from"./p-YgnF5oje.js";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)},r={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,b=Number(t.modal.loading.message.typography.fontSize),h=Number(t.modal.loading.message.typography.fontWeight),u=Number(t.modal.loading.message.typography.lineHeight),f={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},p={loading:"작업 취소",error:"다시 시도"},v=d(class extends a{constructor(d){super(),!1!==d&&this.__registerHost(),this.click=e(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;click;get resolvedMessage(){return this.message||f[this.state]}get resolvedButtonLabel(){return this.buttonLabel||p[this.state]}handleClick=()=>{this.click.emit()};toCssSize(d){if(null!=d&&""!==d)return"number"==typeof d?`${d}px`:d}render(){const d={"--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":r.bg,"--sd-loading-modal-message-color":r.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${b}px`,"--sd-loading-modal-message-font-weight":`${h}`,"--sd-loading-modal-message-line-height":`${u}px`,"--sd-loading-modal-error-color":r.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(o,{key:"8ecd5db2ffde201dd0c7d3c58b1da6b85b5a4116",style:d},s("div",{key:"61f79b16b22d5ab4bb4dca03f88568174cfcfb1f",class:"sd-loading-modal"},s("div",{key:"bc373cfebab5949bee9c024bd86ca92d8294ff7b",class:"sd-loading-modal__content"},"loading"===this.state?s("sd-circle-progress",{indeterminate:!0}):s("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:g.contentSize,color:r.errorIcon})),s("p",{key:"e9015b9c9813b1968c8ca7991d654761eb3ee9b3",class:"sd-loading-modal__message"},this.resolvedMessage),this.useButton&&s("div",{key:"4ed941961611fe9533bd2b989c9b68ef6c7ca741",class:"sd-loading-modal__button"},s("sd-button-v2",{key:"13f4c5ef5ad5285d846716e5dd72d9f2565c08f9",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"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}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8]}]);function x(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button-v2","sd-circle-progress","sd-icon"].forEach((d=>{switch(d){case"sd-loading-modal":customElements.get(i(d))||customElements.define(i(d),v);break;case"sd-button-v2":customElements.get(i(d))||l();break;case"sd-circle-progress":customElements.get(i(d))||n();break;case"sd-icon":customElements.get(i(d))||m()}}))}export{v as S,x as d}
|