@sellmate/design-system 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component.modal-BFelrSMx.js → component.modal-CrZe2db_.js} +0 -14
- package/dist/cjs/component.overlay-CBhFnzM2.js +29 -0
- package/dist/cjs/{component.progress-Bmg3vAAy.js → component.progress-DimGJZAd.js} +1 -2
- package/dist/cjs/{component.table-DIxmbGBT.js → component.table-BrI3b--h.js} +4 -5
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-BuaQW9U4.js → index-BTqAmfdr.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +12 -10
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/{sd-button.config-eTAJM2iW.js → sd-button.config-BH7gFPmM.js} +1 -2
- package/dist/cjs/sd-button_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-calendar_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.cjs.entry.js +49 -32
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +7 -17
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +10 -10
- 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 +9 -9
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +5 -6
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-key-value-table.cjs.entry.js +3 -3
- package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +11 -11
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-popup.cjs.entry.js +9 -14
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +7 -7
- package/dist/cjs/sd-select_3.cjs.entry.js +10 -10
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +10 -10
- package/dist/cjs/{sd-table.config-B7MuRLoR.js → sd-table.config-DzC55sap.js} +3 -3
- 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 +2 -3
- 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 +3 -4
- package/dist/cjs/{tooltipArrow-VQq73W83.js → tooltipArrow-CiM3irtY.js} +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.config.js +10 -8
- package/dist/collection/components/sd-chip-input/sd-chip-input.css +3 -0
- package/dist/collection/components/sd-chip-input/sd-chip-input.js +66 -30
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.config.js +4 -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-field/sd-field.js +4 -4
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +1 -1
- 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.config.js +3 -3
- 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-popup/sd-popup.config.js +6 -4
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-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.css +16 -0
- 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.config.js +3 -3
- package/dist/collection/components/sd-table/sd-table.css +16 -0
- 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-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-C7sUn4qb.js → p-7NIombHr.js} +1 -1
- package/dist/components/{p-BCLDTSO0.js → p-B0NEmngm.js} +1 -1
- package/dist/components/{p-D15bTkjr.js → p-B7Fy6FMY.js} +1 -1
- package/dist/components/{p-C3rOud8J.js → p-B8qPlbcL.js} +1 -1
- package/dist/components/{p-DNRm9_Bv.js → p-BArxAQLx.js} +1 -1
- package/dist/components/{p-BwwpMQLA.js → p-BIFt5zIX.js} +1 -1
- package/dist/components/{p-D0Xz7CoK.js → p-BJoG95Kt.js} +1 -1
- package/dist/components/{p-D3dq5pt5.js → p-BKBd44No.js} +1 -1
- package/dist/components/{p-JamWHNrr.js → p-BKg1YV-H.js} +1 -1
- package/dist/components/{p-BAIi5T00.js → p-BL9Vy4Fd.js} +1 -1
- package/dist/components/p-BXcizROm.js +1 -0
- package/dist/components/{p-IBgCA-vo.js → p-Bcp4vs0m.js} +1 -1
- package/dist/components/{p-DsGK3Aye.js → p-BeR_5Fwe.js} +1 -1
- package/dist/components/p-BsJ3_flK.js +1 -0
- package/dist/components/{p-CA2sZAsI.js → p-BuubsWWz.js} +1 -1
- package/dist/components/{p-Bv_CVYp1.js → p-C-xm1A4R.js} +1 -1
- package/dist/components/{p-BckY1cBy.js → p-CD0706HD.js} +1 -1
- package/dist/components/{p-0UeArSzN.js → p-CDiIm8f6.js} +1 -1
- package/dist/components/{p-C7sPq8UM.js → p-CHvrvQsZ.js} +1 -1
- package/dist/components/{p-BGIwu6m1.js → p-CJYl_ssf.js} +1 -1
- package/dist/components/{p-C1vqL1Kl.js → p-CbsRJTHs.js} +1 -1
- package/dist/components/{p-CaQ-qyG-.js → p-CrpzIzUy.js} +1 -1
- package/dist/components/p-Cw8yDfQh.js +1 -0
- package/dist/components/{p-zGr4He38.js → p-CygiHfH3.js} +1 -1
- package/dist/{design-system/p-GXE2lEVj.js → components/p-D60P6BdJ.js} +1 -1
- package/dist/components/{p-D6GUzecR.js → p-D9tQwTWy.js} +1 -1
- package/dist/components/{p-1kjTqHez.js → p-DHINsZ60.js} +1 -1
- package/dist/components/{p-DznzJSU-.js → p-DJsKwChT.js} +1 -1
- package/dist/components/{p-DU2_jzh4.js → p-DObwsGYE.js} +1 -1
- package/dist/components/{p-BnhzUsGP.js → p-DTEO2eLq.js} +1 -1
- package/dist/components/{p-tSYcqBKN.js → p-DYHntcvV.js} +1 -1
- package/dist/components/p-De0OtxK5.js +1 -0
- package/dist/components/{p-CFqCJx9B.js → p-DgK8EUjx.js} +1 -1
- package/dist/components/{p-DPotN1QM.js → p-DuMx_9he.js} +1 -1
- package/dist/components/{p-aYmWxyum.js → p-Dv7x-UAd.js} +1 -1
- package/dist/components/p-KSTsd4qM.js +1 -0
- package/dist/components/{p-CBXH-GWN.js → p-P6SE7iQV.js} +1 -1
- package/dist/components/{p-BTWV2vRX.js → p-V8hUcpnj.js} +1 -1
- package/dist/components/{p-UkSGSWSA.js → p-b9Q4MYgR.js} +1 -1
- package/dist/components/{p-BOrdn-Js.js → p-hd2Gc2Z3.js} +1 -1
- package/dist/components/{p-B4ua22vZ.js → p-mbe7jmT5.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-d6329729.entry.js → p-024c1605.entry.js} +1 -1
- package/dist/design-system/{p-c3b032a1.entry.js → p-030b0602.entry.js} +1 -1
- package/dist/design-system/{p-d4097b87.entry.js → p-089235d2.entry.js} +1 -1
- package/dist/design-system/{p-9b53de38.entry.js → p-0dfdcfed.entry.js} +1 -1
- package/dist/design-system/{p-2c704047.entry.js → p-0f3d40f2.entry.js} +1 -1
- package/dist/design-system/{p-ba10c791.entry.js → p-12eabcc9.entry.js} +1 -1
- package/dist/design-system/{p-9c3f7c57.entry.js → p-29b84d12.entry.js} +1 -1
- package/dist/design-system/{p-83a86e6d.entry.js → p-2b2aaa32.entry.js} +1 -1
- package/dist/design-system/{p-dca19618.entry.js → p-36275d32.entry.js} +1 -1
- package/dist/design-system/{p-7c22de74.entry.js → p-3f347a3a.entry.js} +1 -1
- package/dist/design-system/{p-8da06c09.entry.js → p-4f4b3dab.entry.js} +1 -1
- package/dist/design-system/{p-d8bebc8e.entry.js → p-59ecccb2.entry.js} +1 -1
- package/dist/design-system/{p-e45e6e56.entry.js → p-6324bbde.entry.js} +1 -1
- package/dist/design-system/p-63804698.entry.js +1 -0
- package/dist/design-system/{p-90a360ca.entry.js → p-669dfbe4.entry.js} +1 -1
- package/dist/design-system/{p-a992c64b.entry.js → p-66cb4a7c.entry.js} +1 -1
- package/dist/design-system/{p-065cd2f4.entry.js → p-7e1f14a6.entry.js} +1 -1
- package/dist/design-system/{p-681f8612.entry.js → p-8d340091.entry.js} +1 -1
- package/dist/design-system/{p-5b184e17.entry.js → p-8e428210.entry.js} +1 -1
- package/dist/design-system/{p-754c11a8.entry.js → p-93c7c640.entry.js} +1 -1
- package/dist/design-system/p-9860b9d9.entry.js +1 -0
- package/dist/design-system/{p-e77fe58a.entry.js → p-9991485c.entry.js} +1 -1
- package/dist/design-system/p-9adb306b.entry.js +1 -0
- package/dist/design-system/p-BXcizROm.js +1 -0
- package/dist/design-system/p-BwIs2-fm.js +2 -0
- package/dist/design-system/p-C2-fl-Dc.js +1 -0
- package/dist/design-system/p-Cw8yDfQh.js +1 -0
- package/dist/design-system/{p-D6GUzecR.js → p-D9tQwTWy.js} +1 -1
- package/dist/design-system/p-De0OtxK5.js +1 -0
- package/dist/design-system/{p-940de4ba.entry.js → p-a2796cd6.entry.js} +1 -1
- package/dist/design-system/{p-c8e86fb4.entry.js → p-b0b9995e.entry.js} +1 -1
- package/dist/design-system/{p-8b4d246f.entry.js → p-b6a139b7.entry.js} +1 -1
- package/dist/design-system/p-b8394ddb.entry.js +1 -0
- package/dist/design-system/{p-bd700588.entry.js → p-c561595a.entry.js} +1 -1
- package/dist/design-system/p-c5bd0dc9.entry.js +1 -0
- package/dist/design-system/{p-f9c0013c.entry.js → p-ceda6367.entry.js} +1 -1
- package/dist/design-system/{p-9761ef4a.entry.js → p-d6bb5c82.entry.js} +1 -1
- package/dist/design-system/{p-8001447c.entry.js → p-d7e1a303.entry.js} +1 -1
- package/dist/design-system/{p-c79bf2eb.entry.js → p-d87b75ff.entry.js} +1 -1
- package/dist/design-system/{p-ba5bb1ee.entry.js → p-df3faae8.entry.js} +1 -1
- package/dist/design-system/{p-4deb11d8.entry.js → p-e0d4193a.entry.js} +1 -1
- package/dist/design-system/p-e0fa6937.entry.js +1 -0
- package/dist/design-system/{p-2646a746.entry.js → p-e2dabf85.entry.js} +1 -1
- package/dist/design-system/p-ef60be0f.entry.js +1 -0
- package/dist/design-system/{p-4d68b0a8.entry.js → p-f43dd680.entry.js} +1 -1
- package/dist/design-system/{p-79d85b32.entry.js → p-f7123e89.entry.js} +1 -1
- package/dist/esm/{component.modal-DOXMJi-V.js → component.modal-Cw8yDfQh.js} +0 -14
- package/dist/esm/component.overlay-De0OtxK5.js +27 -0
- package/dist/esm/{component.progress-D1vaasIp.js → component.progress-BG5nGnBi.js} +1 -2
- package/dist/esm/{component.table-D6GUzecR.js → component.table-D9tQwTWy.js} +4 -5
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-BZ5lcC25.js → index-BwIs2-fm.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +12 -10
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/{sd-button.config-DjcjlPt7.js → sd-button.config-ClMlDGkX.js} +1 -2
- package/dist/esm/sd-button_2.entry.js +2 -2
- package/dist/esm/sd-calendar_2.entry.js +3 -3
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip-input.entry.js +49 -32
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +7 -17
- package/dist/esm/sd-confirm-modal_2.entry.js +5 -5
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker_7.entry.js +10 -10
- 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 +9 -9
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +5 -6
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-key-value-table.entry.js +3 -3
- package/dist/esm/sd-linear-progress.entry.js +3 -3
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-pagination_4.entry.js +11 -11
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-popup.entry.js +9 -14
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +7 -7
- package/dist/esm/sd-select_3.entry.js +10 -10
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/{sd-table.config-B3wuA5wX.js → sd-table.config-BbIWNUE2.js} +3 -3
- package/dist/esm/sd-table.entry.js +10 -10
- 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 +2 -3
- 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 +3 -4
- package/dist/esm/{tooltipArrow-ByHjyr3Z.js → tooltipArrow-CJxhdfqT.js} +1 -1
- package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +3 -0
- package/dist/types/components.d.ts +9 -0
- package/hydrate/index.js +175 -166
- package/hydrate/index.mjs +175 -166
- package/package.json +1 -1
- package/dist/components/p-B3bERWUt.js +0 -1
- package/dist/components/p-CEVDmQdt.js +0 -1
- package/dist/components/p-Cmg10jpN.js +0 -1
- package/dist/components/p-D6noGX38.js +0 -1
- package/dist/components/p-DOXMJi-V.js +0 -1
- package/dist/design-system/p-12e7b9fc.entry.js +0 -1
- package/dist/design-system/p-28e1cf94.entry.js +0 -1
- package/dist/design-system/p-4d747082.entry.js +0 -1
- package/dist/design-system/p-662ce409.entry.js +0 -1
- package/dist/design-system/p-BZ5lcC25.js +0 -2
- package/dist/design-system/p-Cmg10jpN.js +0 -1
- package/dist/design-system/p-DOXMJi-V.js +0 -1
- package/dist/design-system/p-b127ac21.entry.js +0 -1
- package/dist/design-system/p-c7ff7bc8.entry.js +0 -1
- package/dist/design-system/p-f418055d.entry.js +0 -1
- /package/dist/components/{p-D1vaasIp.js → p-BG5nGnBi.js} +0 -0
- /package/dist/components/{p-Dp6NByuZ.js → p-CGs6_91u.js} +0 -0
- /package/dist/design-system/{p-D1vaasIp.js → p-BG5nGnBi.js} +0 -0
- /package/dist/design-system/{p-DjcjlPt7.js → p-ClMlDGkX.js} +0 -0
|
@@ -38,7 +38,7 @@ export class SdTag {
|
|
|
38
38
|
const config = this.resolvedConfig;
|
|
39
39
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
40
40
|
const width = this.resolvedWidth;
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '37bb1fefd51f583b0a9dde9fe46cf843a48e8e13', style: width != null ? { '--sd-tag-width': width } : undefined }, h("span", { key: 'e996471849834802eaeff02abaadee1a2addac4f', class: "sd-tag", style: {
|
|
42
42
|
'--sd-tag-background': config.background,
|
|
43
43
|
'--sd-tag-content': config.content,
|
|
44
44
|
'--sd-tag-height': config.height,
|
|
@@ -48,7 +48,7 @@ export class SdTag {
|
|
|
48
48
|
'--sd-tag-font-weight': config.fontWeight,
|
|
49
49
|
'--sd-tag-line-height': config.lineHeight,
|
|
50
50
|
'--sd-tag-radius': config.radius,
|
|
51
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
51
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '2e63073d1950046747521071ba5db5f9a404acef', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode)));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "sd-tag"; }
|
|
54
54
|
static get originalStyleUrls() {
|
|
@@ -139,7 +139,7 @@ export class SdTextarea {
|
|
|
139
139
|
'--sd-system-size-field-sm-height': 'auto',
|
|
140
140
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
141
141
|
};
|
|
142
|
-
return (h("sd-field", { key: '
|
|
142
|
+
return (h("sd-field", { key: 'dfa331524cbbac728c961c7a27d6c8dbd83853f4', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'bd2d6d4b537364e28992971279d3278021b1ab5a', class: "sd-textarea__content" }, h("textarea", { key: '270d55c84255a43153ed5f5cfdeed586c38d0cf1', 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 }))));
|
|
143
143
|
}
|
|
144
144
|
static get is() { return "sd-textarea"; }
|
|
145
145
|
static get originalStyleUrls() {
|
|
@@ -26,12 +26,12 @@ export class SdToast {
|
|
|
26
26
|
const linkColor = typeConfig.linkColor ?? typeConfig.content;
|
|
27
27
|
const useDefaultCloseIntent = ['default', 'caution', 'info'].includes(this.type);
|
|
28
28
|
const buttonName = TOAST_BUTTON_NAME_BY_TYPE[this.type] ?? TOAST_BUTTON_NAME_BY_TYPE.default;
|
|
29
|
-
return (h("div", { key: '
|
|
29
|
+
return (h("div", { key: '3d7a3fe3647010a8a96246ef3cdbfdf1550c0a91', style: {
|
|
30
30
|
'--sd-toast-bg': typeConfig.bg,
|
|
31
31
|
'--sd-toast-text': typeConfig.content,
|
|
32
32
|
'--sd-toast-icon': iconColor,
|
|
33
33
|
'--sd-toast-link': linkColor,
|
|
34
|
-
} }, h("div", { key: '
|
|
34
|
+
} }, h("div", { key: 'a863ff763bced7656cedc69f3598b3371fc13059', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '7606930ad68ab81543a719db8abb61055fdaf97d', class: "sd-toast__icon" }, h("sd-icon", { key: '9b75fb05ab26ddab43b677482a026b5860613e07', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: '5fb10f690ad560f0be74b5bf6afd288318e22082', class: "sd-toast__content" }, h("span", { key: 'c474a5e1f215a19e47a89ba154f6149e0a875f61', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: 'a0dcbba791c123776ccb6de62e169359777b3bd2', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: 'b85f734cbe429207c028602b29bd5f7fa78f7910', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: '09cb6b946c18c1c079b036799272d7bc7bdb6480', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "sd-toast"; }
|
|
37
37
|
static get originalStyleUrls() {
|
|
@@ -225,7 +225,7 @@ export class SdToastContainer {
|
|
|
225
225
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
226
226
|
const indexMap = new Map();
|
|
227
227
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
228
|
-
return (h("div", { key: '
|
|
228
|
+
return (h("div", { key: '1e9af4dd46dd901ba903518c1425ce0bc723e4b4', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
229
229
|
this.expanded = true;
|
|
230
230
|
this.pauseTimers();
|
|
231
231
|
}, onMouseLeave: () => {
|
|
@@ -49,7 +49,7 @@ export class SdToggle {
|
|
|
49
49
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
50
50
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
51
51
|
};
|
|
52
|
-
return (h("label", { key: '
|
|
52
|
+
return (h("label", { key: 'b25e66cadfeee2714f137504ad49c8bf66622f60', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: '276f7411899bcb14db93a6f2b93cc51b5363e1c9', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "sd-toggle"; }
|
|
55
55
|
static get originalStyleUrls() {
|
|
@@ -142,7 +142,7 @@ export class SdTooltip {
|
|
|
142
142
|
const bodyHTML = this.message && this.message.length > 0
|
|
143
143
|
? this.message.map(line => `<div>${line}</div>`).join('')
|
|
144
144
|
: this.slotContentHTML;
|
|
145
|
-
return (h(Fragment, { key: '
|
|
145
|
+
return (h(Fragment, { key: 'cd0c166191a9f83a11891786cd246a268d50b349' }, h("div", { key: '9e2872936629b886b779852c51f57874466edfb5', ref: el => (this.triggerEl = el), class: triggerClasses, ...divTrigger }, anchorMode ? (h("slot", { name: "anchor" })) : hasLabel ? (h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel, disabled: this.disabled, type: this.type ?? 'button', 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: '2db92e0d56a1a6cee04ab5f23f6bbe00fc279351', parentRef: anchorMode ? this.triggerEl : this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: 'a4635141d3e9aa630be80b2b6071a5ba16de257d', ref: el => (this.menuEl = el), class: {
|
|
146
146
|
'sd-floating-menu': true,
|
|
147
147
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
148
148
|
[`sd-floating-menu--${placement}`]: true,
|
|
@@ -150,7 +150,7 @@ export class SdTooltip {
|
|
|
150
150
|
}, style: {
|
|
151
151
|
'--sd-floating-bg': typeConfig.bg,
|
|
152
152
|
'--sd-floating-content': typeConfig.content,
|
|
153
|
-
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: '
|
|
153
|
+
}, onMouseEnter: () => this.openTooltip(), onMouseLeave: () => !this.useClose && this.startHideTimer() }, h("i", { key: 'cf7f3186dd7c9cbf001700bd29de05480e807533', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '4aca7fbbc159bf61c9488a38431e0bcc40172446' })), h("div", { key: 'ffa09626b16742e6d774944bf8536def2b250519', class: "sd-floating-menu__content", innerHTML: bodyHTML }), this.useClose && (h("sd-ghost-button", { key: '934529cc6c8c4a46a09b7dd03baec6666029f169', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xxs", onClick: () => this.closeTooltip() })))))));
|
|
154
154
|
}
|
|
155
155
|
static get is() { return "sd-tooltip"; }
|
|
156
156
|
static get originalStyleUrls() {
|
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-KSTsd4qM.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==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 i(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 o(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=i(s);return await o(c),c.create({message:t,type:n,...r})},async dismiss(t){if(null!=n)return await o(n),n.dismiss(t)},async dismissAll(){if(null!=n)return await o(n),n.dismissAll()},configure(t){i(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;submitFn;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}onSubmit(t){return this.submitFn=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=l[t];return this.runOrQueue((()=>{this.containerRef?.dismissById(this.modalId,n)})),this}_hasSubmit(){return null!=this.submitFn}_triggerOk(){this.okFn?.()}_triggerSubmit(){this.submitFn?.()}_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||null==this.containerRef?this.pendingActions.push(t):t()}}function h(){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(){if(h(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&d.isConnected)return d;const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),d=t,t}async function w(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 p(){return new m("")}function y(t,n){const{component:e,persistent:s}=n,i=f(),o={persistent:s};t._setContainer(i),w(i).then((async()=>{const n=await i.createCustom(e,o,t);t._setId(n)}))}const E={confirm(t){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=f(),e=new m("",n);return w(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=p();return y(n,t),n},configure(n){h(),t(n)}},C="sd-loading-container";let k=null;async function _(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(C))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),k&&document.body.contains(k)||(k=document.createElement(C),document.body.appendChild(k)),k);await customElements.whenDefined(C),t(n)}const A={show(t={}){_((n=>{n.show?.(t)}))},hide(){k&&_((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,A as sdLoading,E as sdModal,c as sdToast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as n,d as i,t as
|
|
1
|
+
import{p as t,H as e,h as n,d as i,t as a}from"./p-KSTsd4qM.js";import{d as s}from"./p-DTEO2eLq.js";var d={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},o={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},g={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},r={content:"#FB4444",bg:"#FCEFEF"},c={content:"#FF6B00",bg:"#FEF1EA"},h={content:"#916C0D",bg:"#FFF7DD"},l={content:"#00973C",bg:"#E8F9EF"},p={content:"#0075FF",bg:"#E6F1FF"},u={content:"#006AC1",bg:"#EAF5FE"},f={content:"#004290",bg:"#EFF6FF"},b={content:"#737373",bg:"#EEEEEE"};const x=["xs","sm","md"],m=["grey","red","orange","yellow","green","blue","darkblue","indigo"],y={grey:{background:b.bg,content:b.content,icon:b.content},red:{background:r.bg,content:r.content,icon:r.content},orange:{background:c.bg,content:c.content,icon:c.content},yellow:{background:h.bg,content:h.content,icon:h.content},green:{background:l.bg,content:l.content,icon:l.content},blue:{background:p.bg,content:p.content,icon:p.content},darkblue:{background:u.bg,content:u.content,icon:u.content},indigo:{background:f.bg,content:f.content,icon:f.content}},F={xs:{height:`${d.height}px`,paddingX:`${d.paddingX}px`,gap:`${d.gap}px`,fontSize:`${d.typography.fontSize}px`,fontWeight:d.typography.fontWeight,lineHeight:`${d.typography.lineHeight}px`,iconSize:12,radius:`${d.radius}px`},sm:{height:`${o.height}px`,paddingX:`${o.paddingX}px`,gap:`${o.gap}px`,fontSize:`${o.typography.fontSize}px`,fontWeight:o.typography.fontWeight,lineHeight:`${o.typography.lineHeight}px`,iconSize:16,radius:`${o.radius}px`},md:{height:`${g.height}px`,paddingX:`${g.paddingX}px`,gap:`${g.gap}px`,fontSize:`${g.typography.fontSize}px`,fontWeight:g.typography.fontWeight,lineHeight:`${g.typography.lineHeight}px`,iconSize:16,radius:`${g.radius}px`}},$={xs:{...F.xs,radius:"999px"},sm:{...F.sm,radius:"999px"},md:{...F.md,radius:"999px"}},E=Object.fromEntries(["square","pill"].flatMap((t=>x.flatMap((e=>m.map((n=>[`${t}_${e}_${n}`,{shape:t,size:e,color:n,..."square"===t?F[e]:$[e],...y[n]}]))))))),k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}name="square_sm_grey";label="";icon;isLeft=!0;width="";componentWillLoad(){this.name=this.name??"square_sm_grey"}get resolvedName(){if(!Object.prototype.hasOwnProperty.call(E,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return E[this.resolvedName]}renderIcon(t,e){return null==this.icon?null:n("sd-icon",{class:"sd-tag__icon",name:this.icon,size:e,color:t})}get resolvedWidth(){if(""!==this.width&&0!==this.width)return"number"==typeof this.width?`${this.width}px`:this.width}render(){const t=this.resolvedConfig,e=this.renderIcon(t.icon,t.iconSize),a=this.resolvedWidth;return n(i,{key:"37bb1fefd51f583b0a9dde9fe46cf843a48e8e13",style:null!=a?{"--sd-tag-width":a}:void 0},n("span",{key:"e996471849834802eaeff02abaadee1a2addac4f",class:"sd-tag",style:{"--sd-tag-background":t.background,"--sd-tag-content":t.content,"--sd-tag-height":t.height,"--sd-tag-padding-x":t.paddingX,"--sd-tag-gap":t.gap,"--sd-tag-font-size":t.fontSize,"--sd-tag-font-weight":t.fontWeight,"--sd-tag-line-height":t.lineHeight,"--sd-tag-radius":t.radius},"aria-label":this.label||"tag"},this.icon&&this.isLeft&&e,n("span",{key:"2e63073d1950046747521071ba5db5f9a404acef",class:"sd-tag__label"},this.label),this.icon&&!this.isLeft&&e))}static get style(){return"sd-tag{display:inline-flex;width:var(--sd-tag-width, fit-content);height:fit-content}.sd-tag{display:inline-flex;width:100%;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}"}},[512,"sd-tag",{name:[1],label:[1],icon:[1],isLeft:[4,"is-left"],width:[8]}]);function w(){"undefined"!=typeof customElements&&["sd-tag","sd-icon"].forEach((t=>{switch(t){case"sd-tag":customElements.get(a(t))||customElements.define(a(t),k);break;case"sd-icon":customElements.get(a(t))||s()}}))}export{k as S,w as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,t as o}from"./p-
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as o}from"./p-KSTsd4qM.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-B8qPlbcL.js";import{d as h}from"./p-BKBd44No.js";import{d as a}from"./p-b9Q4MYgR.js";import{d}from"./p-hd2Gc2Z3.js";import{d as n}from"./p-mbe7jmT5.js";import{d as c}from"./p-DTEO2eLq.js";import{d as p}from"./p-CD0706HD.js";import{d as m}from"./p-CHvrvQsZ.js";import{d as u}from"./p-BKg1YV-H.js";import{d as f}from"./p-DuMx_9he.js";import{d as b}from"./p-CJYl_ssf.js";import{d as g}from"./p-7NIombHr.js";import{d as w}from"./p-BeR_5Fwe.js";const T=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return 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 e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-e.bottom-s-i,0),h=Math.max(e.top-s-i,0),a=Math.max(l,h),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}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}),t.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))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}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 e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"0864fe68a337d4bab526fa61570e856c8eff6d1c",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:"781819ed75f47395e96fd6808766e6bb8c246fa5",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"8cebad98f0cd4b333954a55857aec3fbb6f3d283",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:"fe68f0b01256e1c1d3200f9f5fd17c2adf97f0e0",...e},i("sd-select-listbox",{key:"98368524ef06a6d752f2313756a89ae6e8c05955",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}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),T);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||m();break;case"sd-select-list-item-search":customElements.get(o(t))||u();break;case"sd-select-listbox":customElements.get(o(t))||f();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{T as S,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,t as a}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,t as a}from"./p-KSTsd4qM.js";import{n as d}from"./p-CCwNgVmC.js";import{d as o,D as r,a as l}from"./p-Dv7x-UAd.js";import{d as n}from"./p-B8qPlbcL.js";import{d as c}from"./p-BL9Vy4Fd.js";import{d as h}from"./p-b9Q4MYgR.js";import{d as p}from"./p-hd2Gc2Z3.js";import{d as m}from"./p-mbe7jmT5.js";import{d as b}from"./p-DTEO2eLq.js";import{d as u}from"./p-CD0706HD.js";import{d as f}from"./p-7NIombHr.js";import{d as g}from"./p-BeR_5Fwe.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD";selectable;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{e.stopPropagation(),this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"4359c9ce80bfc919088774a4458c730c427aa3f5",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":r.border.default,"--sd-system-color-field-border-focus":r.border.focus,"--sd-system-color-field-bg-default":r.bg.default}},i("div",{key:"638f4e59c9a7c5c841428c424181b3d2320857eb",class:"sd-date-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"cbfe2bee0fdea1f089860cf3a7da9b7e35327c87",displayText:this.value??"",placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"a348437c5f9f53180cc7f74d5b275e4f3fbedea6",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-calendar",{key:"7dd08053b3a24d25e6149d4bc751c75eff94f752",elevated:!0,value:this.value,selectable:this.selectable,onSdUpdate:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-picker{display:inline-flex}sd-date-picker sd-portal{display:none}sd-date-picker .sd-date-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-picker",{value:[1025],size:[513],placeholder:[513],selectable:[16],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-picker","sd-button","sd-calendar","sd-date-picker-trigger","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-calendar":customElements.get(a(e))||c();break;case"sd-date-picker-trigger":customElements.get(a(e))||o();break;case"sd-field":customElements.get(a(e))||h();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||b();break;case"sd-portal":customElements.get(a(e))||u();break;case"sd-tag":customElements.get(a(e))||f();break;case"sd-tooltip":customElements.get(a(e))||g()}}))}export{k as S,y as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as n,c as o,h as s,t as d}from"./p-
|
|
1
|
+
import{p as t,H as n,c as o,h as s,t as d}from"./p-KSTsd4qM.js";import{I as e,d as b}from"./p-DTEO2eLq.js";import{i,g as a,B as u,f as r,e as h,a as l,c,P as p,d as g}from"./p-CGs6_91u.js";const v=t=>null!=t&&t in e,f=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=o(this,"sdClick",7)}name="primary_sm";label="";icon;rightIcon;ariaLabel="";disabled=!1;type="button";click;hasWarnedMissingAriaLabel=!1;handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};get resolvedName(){const t=this.name||"primary_sm";if(!i(t))throw new Error(`Invalid sd-button name: "${t}"`);return t}get resolvedConfig(){const t=this.resolvedName;return{config:u[t],preset:a(t)}}getButtonClasses(t,n,o,s){const d=["sd-button",`sd-button--${t}`,`sd-button--${n}`];return this.disabled&&d.push("sd-button--disabled"),s&&d.push("sd-button--icon-only"),o&&d.push("sd-button--has-label"),d.join(" ")}componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===this.label&&(v(this.icon)||v(this.rightIcon))&&""===this.ariaLabel.trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-button] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon??this.rightIcon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const{config:t,preset:n}=this.resolvedConfig,o=Boolean(this.label),d=v(this.icon)?this.icon:void 0,e=v(this.rightIcon)?this.rightIcon:void 0,b=!o&&Boolean(d)!==Boolean(e),i=b&&""!==this.ariaLabel.trim()?this.ariaLabel:void 0;return s("button",{key:"ea6482b86f91b26cd20ab635c357b655e92c2ec1",class:this.getButtonClasses(n,t.size,o,b),type:this.type??"button",disabled:this.disabled,"aria-label":i,style:{"--sd-button-bg":t.color,"--sd-button-bg-hover":g[n],"--sd-button-border":p[n],"--sd-button-text":c[n],"--sd-button-icon":l[n],"--sd-button-accent":h},onClick:this.handleClick},s("span",{key:"fd0cbd15e1edf4dc599e7eb3df3dcb1ddbd4732e",class:"sd-button__content"},d&&s("sd-icon",{key:"5ace6d85974e1c2ecb0fcf55b0330801f78f094f",class:"sd-button__icon",name:d,size:r[t.size],color:"var(--sd-button-current-icon)"}),this.label&&s("span",{key:"ef1240a6acee55def8244149b0af4e0252be558c",class:"sd-button__label"},this.label),e&&s("sd-icon",{key:"127de568676734d75dd801b9ea46aa35e09b558c",class:"sd-button__icon sd-button__icon--right",name:e,size:r[t.size],color:"var(--sd-button-current-icon)"})))}static get style(){return"sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:36px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);--sd-button-bg:#025497;--sd-button-bg-hover:#004177;--sd-button-border:transparent;--sd-button-text:#FFFFFF;--sd-button-icon:var(--sd-button-text);--sd-button-current-text:var(--sd-button-text);--sd-button-current-icon:var(--sd-button-icon);display:inline-flex;align-items:center;justify-content:center;min-height:var(--sd-button-height);min-width:var(--sd-button-min-width, auto);padding:0 var(--sd-button-padding-x);border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-button-bg);color:var(--sd-button-current-text);cursor:pointer;box-sizing:border-box;font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);line-height:1;text-decoration:var(--sd-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-button:hover:not(.sd-button--disabled){background:var(--sd-button-bg-hover)}.sd-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-button-accent)}.sd-button--xs{--sd-button-height:var(--sd-button-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, 36px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-xs-width, var(--sd-button-height))}.sd-button--sm{--sd-button-height:var(--sd-button-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, 70px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-sm-width, var(--sd-button-height))}.sd-button--md{--sd-button-height:var(--sd-button-button-md-height, 36px);--sd-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, 100px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-md-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--lg{--sd-button-height:var(--sd-button-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, 120px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-lg-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--icon-only{width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height));padding:0}.sd-button--icon-only .sd-button__content{gap:0}.sd-button--disabled{border-color:var(--sd-button-button-border-disabled, #CCCCCC);background:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-button-current-text:var(--sd-button-button-text-disabled, #888888);--sd-button-current-icon:var(--sd-button-button-icon-disabled, #BBBBBB);cursor:not-allowed}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap)}.sd-button .sd-button__label{font:inherit}"}},[512,"sd-button",{name:[1],label:[1],icon:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1]}]);function m(){"undefined"!=typeof customElements&&["sd-button","sd-icon"].forEach((t=>{switch(t){case"sd-button":customElements.get(d(t))||customElements.define(d(t),f);break;case"sd-icon":customElements.get(d(t))||b()}}))}export{f as S,m as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as d,H as i,c as r,h as e,t as o}from"./p-
|
|
1
|
+
import{p as d,H as i,c as r,h as e,t as o}from"./p-KSTsd4qM.js";import{d as a}from"./p-P6SE7iQV.js";const s=d(class extends i{constructor(d){super(),!1!==d&&this.__registerHost(),this.change=r(this,"sdUpdate",7)}value;options=[];direction="vertical";disabled=!1;groupName;change;valueChanged(d){this.value=d}handleRadioChange=d=>{if(this.disabled)return;const i=this.options.find((i=>String(i.value)===String(d))),r=i?i.value:d;this.value=r,this.change?.emit(r)};getGroupClasses(){return["sd-radio-group",`sd-radio-group--${this.direction??"vertical"}`].join(" ")}render(){return e("div",{key:"e5f4051ea9b2843816a849a018b8040e7b951a55",class:this.getGroupClasses(),role:"radiogroup"},this.options.map((d=>e("sd-radio",{key:`radio-${d.value}`,val:String(d.value),value:String(this.value),label:d.label,disabled:this.disabled||!!d.disabled,onSdUpdate:({detail:d})=>this.handleRadioChange(d)}))))}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'sd-radio{display:inline-flex;width:fit-content;height:var(--sd-radio-line-height);line-height:0}sd-radio .sd-radio{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-radio-gap);height:var(--sd-radio-line-height);max-height:var(--sd-radio-line-height)}sd-radio .sd-radio>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-radio .sd-radio>input:focus-visible+.sd-radio__circle{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-radio-checked-border);outline:none}sd-radio .sd-radio__circle{position:relative;width:var(--sd-radio-size);height:var(--sd-radio-size);border-radius:50%;border:var(--sd-radio-border-width) solid var(--sd-radio-unchecked-border);box-sizing:border-box;background:var(--sd-radio-unchecked-bg);display:inline-flex;flex-shrink:0}sd-radio .sd-radio__label{font-size:var(--sd-radio-font-size);font-weight:var(--sd-radio-font-weight);color:var(--sd-radio-label-color);line-height:var(--sd-radio-line-height);display:inline-flex;flex-direction:column}sd-radio .sd-radio__label::before{content:attr(data-label);height:0;font-weight:var(--sd-radio-selected-font-weight);visibility:hidden;overflow:hidden;user-select:none;pointer-events:none}sd-radio .sd-radio:hover:not(.sd-radio--disabled) .sd-radio__circle{background:var(--sd-radio-unchecked-bg-hover);border-color:var(--sd-radio-unchecked-border-hover)}sd-radio .sd-radio--checked .sd-radio__label{font-weight:var(--sd-radio-selected-font-weight)}sd-radio .sd-radio--checked .sd-radio__circle{border-color:var(--sd-radio-checked-border)}sd-radio .sd-radio--checked .sd-radio__circle::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:var(--sd-radio-dot-size);height:var(--sd-radio-dot-size);border-radius:50%;background:var(--sd-radio-checked-dot)}sd-radio .sd-radio--disabled{cursor:not-allowed}sd-radio .sd-radio--disabled .sd-radio__label{color:var(--sd-radio-label-disabled-color)}sd-radio .sd-radio--disabled .sd-radio__circle{background:var(--sd-radio-disabled-bg);border-color:var(--sd-radio-disabled-border)}sd-radio .sd-radio--disabled.sd-radio--checked .sd-radio__circle::after{background:var(--sd-radio-disabled-dot)}sd-radio-group{display:inline-block}sd-radio-group .sd-radio-group{display:flex}sd-radio-group .sd-radio-group--vertical{flex-direction:column;gap:8px}sd-radio-group .sd-radio-group--horizontal{flex-direction:row;align-items:center;gap:20px}'}},[512,"sd-radio-group",{value:[1032],options:[1040],direction:[1],disabled:[4],groupName:[1,"group-name"]},void 0,{value:[{valueChanged:0}]}]);function t(){"undefined"!=typeof customElements&&["sd-radio-group","sd-radio"].forEach((d=>{switch(d){case"sd-radio-group":customElements.get(o(d))||customElements.define(o(d),s);break;case"sd-radio":customElements.get(o(d))||a()}}))}export{s as S,t as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,t as n}from"./p-CEVDmQdt.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as u}from"./p-C3rOud8J.js";import{d as a}from"./p-UkSGSWSA.js";import{d as o}from"./p-BOrdn-Js.js";import{d as l}from"./p-B4ua22vZ.js";import{d as p}from"./p-BnhzUsGP.js";import{d as h}from"./p-BckY1cBy.js";import{d as c}from"./p-C7sUn4qb.js";import{d as b}from"./p-DsGK3Aye.js";var m={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const f=m.numberInput.sm,g=m.numberInput.md,y={sm:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:g.height,paddingX:g.paddingX,radius:g.radius,fontSize:g.typography.fontSize,lineHeight:g.typography.lineHeight,fontWeight:g.typography.fontWeight}},_={border:m.numberInput.border,bg:m.numberInput.bg,text:m.numberInput.text},x={sm:{size:m.numberInput.stepper.sm.size},md:{size:m.numberInput.stepper.md.size},radius:m.numberInput.stepper.radius,bg:m.numberInput.stepper.bg,icon:m.numberInput.stepper.icon},v=d.field.hint,k=d.field.errorMessage,w=d.field.contents.gap,z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=s.toString().split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=y[this.size]??y.sm,e="md"===this.size?14:12;return i("sd-field",{key:"c2047618e4efff7023d390f95efa349af0eb52af",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":_.text.default,"--sd-number-input-placeholder-color":_.text.placeholder,"--sd-number-input-disabled-color":_.text.disabled,"--sd-number-input-stepper-size":`${x[this.size]?.size??x.sm.size}px`,"--sd-number-input-stepper-radius":`${x.radius}px`,"--sd-number-input-stepper-bg":x.bg.default,"--sd-number-input-stepper-bg-disabled":x.bg.disabled,"--sd-number-input-stepper-icon-color":x.icon.default,"--sd-number-input-stepper-icon-disabled":x.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":_.border.default,"--sd-system-color-field-border-focus":_.border.focus,"--sd-system-color-field-border-danger":_.border.danger,"--sd-system-color-field-bg-default":_.bg.default,"--sd-textinput-input-text-error-message":k.color,"--sd-textinput-input-error-message-typography-font-size":`${k.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${k.typography.lineHeight}px`,"--sd-textinput-input-text-hint":v.color,"--sd-textinput-input-hint-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${w}px`}},i("div",{key:"2e4dc263460e89763a5794499aef1cd7c9dbc267",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&i("button",{key:"ce1e5d01421763c4ba77887ad823ddc63578b462",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"819664ac86d1813c3850e863412c9334195786f2",name:"minus",size:e,color:this.isDecrementDisabled()?x.icon.disabled:x.icon.default})),this.inputPrefix&&i("span",{key:"bb7355f2ace27bbd93cf506c2d973651d74d6d88",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"8c8ee1d3e4b9ef5b89b00189bd138c32a7bcbe48",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"8da77f4901166b778544d51b9a88a7990aa15ba1",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"251cce12749955262b112d80ebd15298944bd079",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"5ef30dba0f14baadca36fd651ca09e780ff9be7c",name:"add",size:e,color:this.isIncrementDisabled()?x.icon.disabled:x.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function F(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),z);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||a();break;case"sd-floating-portal":customElements.get(n(t))||o();break;case"sd-ghost-button":customElements.get(n(t))||l();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||c();break;case"sd-tooltip":customElements.get(n(t))||b()}}))}export{z as S,F as d}
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as n}from"./p-KSTsd4qM.js";import{n as r}from"./p-CCwNgVmC.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as u}from"./p-B8qPlbcL.js";import{d as a}from"./p-b9Q4MYgR.js";import{d as o}from"./p-hd2Gc2Z3.js";import{d as l}from"./p-mbe7jmT5.js";import{d as p}from"./p-DTEO2eLq.js";import{d as h}from"./p-CD0706HD.js";import{d as m}from"./p-7NIombHr.js";import{d as c}from"./p-BeR_5Fwe.js";var b={numberInput:{sm:{height:"28",paddingX:"6",radius:"4",typography:{fontWeight:"400",fontSize:"12",lineHeight:"20"}},md:{height:"36",paddingX:"8",radius:"6",typography:{fontWeight:"400",fontSize:"14",lineHeight:"24"}},border:{default:"#AAAAAA",focus:"#0075FF",danger:"#FB4444"},bg:{default:"#FFFFFF"},text:{default:"#222222",placeholder:"#AAAAAA",disabled:"#888888"},stepper:{sm:{size:"20"},md:{size:"24"},radius:"4",bg:{default:"#EFF6FF",disabled:"#EEEEEE"},icon:{default:"#0075FF",disabled:"#BBBBBB"}}}};const f=b.numberInput.sm,g=b.numberInput.md,y={sm:{height:f.height,paddingX:f.paddingX,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:g.height,paddingX:g.paddingX,radius:g.radius,fontSize:g.typography.fontSize,lineHeight:g.typography.lineHeight,fontWeight:g.typography.fontWeight}},_={border:b.numberInput.border,bg:b.numberInput.bg,text:b.numberInput.text},x={sm:{size:b.numberInput.stepper.sm.size},md:{size:b.numberInput.stepper.md.size},radius:b.numberInput.stepper.radius,bg:b.numberInput.stepper.bg,icon:b.numberInput.stepper.icon},v=d.field.hint,w=d.field.errorMessage,k=d.field.contents.gap,F=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}size="sm";min=Number.NEGATIVE_INFINITY;max=Number.POSITIVE_INFINITY;step=1;useButton=!1;useDecimal=!1;value=null;label;labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;width;rules=[];autoFocus=!1;status;hint="";errorMessage="";inputPrefix="";inputSuffix="";inputClass="";readonly=!1;inputStyle={};error=!1;focused=!1;hovered=!1;internalValue=null;displayValue="";nativeEl=void 0;formField;name=r();update;focus;blur;toNumber(t){if(null==t||""===t)return null;if("number"==typeof t)return isNaN(t)?null:t;if("string"==typeof t)return this.parseInput(t);const e=Number(t);return isNaN(e)?null:e}formatWithCommas(t){if(null==t||isNaN(t))return"";const e=t<0,s=Math.abs(t),[i,n]=s.toString().split("."),r=(+i).toLocaleString(),d=e?"-"+r:r;return void 0!==n&&""!==n?d+"."+n:String(d)}parseInput(t){if(""===t.trim())return null;const e=t.replace(/,/g,"").trim();if(!/^-?(\d+\.?\d*|\d*\.\d+)$/.test(e))return null;const s=parseFloat(e);return isNaN(s)||!this.useDecimal&&e.includes(".")?null:s}clampMinMax(t){return isNaN(t)?0:Math.min(Math.max(t,this.min),this.max)}updateDisplay(){this.displayValue=this.formatWithCommas(this.internalValue)}isIncrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue>=this.max}isDecrementDisabled(){return!(!this.disabled&&!this.readonly)||null!==this.internalValue&&this.internalValue<=this.min}valueChanged(t){const e=this.toNumber(t);this.internalValue=null!==e?this.clampMinMax(e):null,this.updateDisplay()}internalValueChanged(t){this.updateDisplay(),t!==this.value&&(this.value=t,this.update?.emit(t))}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}async sdGetNativeElement(){return this.nativeEl||null}componentWillLoad(){const t=this.toNumber(this.value);null!==t&&(this.internalValue=this.clampMinMax(t)),this.updateDisplay()}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{const e=t.target,s=e.value;if(""===s)return this.internalValue=null,void(this.displayValue="");const i=s.replace(/,/g,""),n=(i.match(/\./g)||[]).length;if(n>1)return void(e.value=this.displayValue);if("-"===i||"."===i||"-."===i)return void(e.value=i);if(i.endsWith(".")&&1===n){const t=i.slice(0,-1),s=this.parseInput(t);if(null!==s){const t=this.formatWithCommas(s);return void(e.value=t+".")}}const r=this.parseInput(i);if(null!==r){if(r<this.min)return void(e.value=this.displayValue);if(r>this.max)return void(e.value=this.displayValue);this.internalValue=r,this.displayValue=this.formatWithCommas(r),e.value=this.displayValue}else e.value=this.displayValue};handleFocus=t=>{this.focused=!0,this.focus?.emit(t)};handleBlur=async t=>{this.updateDisplay(),this.nativeEl&&(this.nativeEl.value=this.displayValue),this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.focused=!1,this.blur?.emit(t)};handleKeyDown=t=>{"ArrowUp"===t.key?(t.preventDefault(),this.handleIncrement()):"ArrowDown"===t.key&&(t.preventDefault(),this.handleDecrement())};handleIncrement=()=>{if(this.isIncrementDisabled())return;const t=this.internalValue??this.min??0;let e=t+this.step;e>this.max&&(e=this.max),e!==t&&(this.internalValue=e)};handleDecrement=()=>{if(this.isDecrementDisabled())return;const t=this.internalValue??this.min??0;let e=t-this.step;e<this.min&&(e=this.min),e!==t&&(this.internalValue=e)};render(){const t=y[this.size]??y.sm,e="md"===this.size?14:12;return i("sd-field",{key:"581504f245674e1644f672aa77dd22f710a3c766",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-number-input-font-size":`${t.fontSize}px`,"--sd-number-input-line-height":`${t.lineHeight}px`,"--sd-number-input-font-weight":t.fontWeight,"--sd-number-input-padding-x":`${t.paddingX}px`,"--sd-number-input-text-color":_.text.default,"--sd-number-input-placeholder-color":_.text.placeholder,"--sd-number-input-disabled-color":_.text.disabled,"--sd-number-input-stepper-size":`${x[this.size]?.size??x.sm.size}px`,"--sd-number-input-stepper-radius":`${x.radius}px`,"--sd-number-input-stepper-bg":x.bg.default,"--sd-number-input-stepper-bg-disabled":x.bg.disabled,"--sd-number-input-stepper-icon-color":x.icon.default,"--sd-number-input-stepper-icon-disabled":x.icon.disabled,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`,"--sd-system-color-field-border-default":_.border.default,"--sd-system-color-field-border-focus":_.border.focus,"--sd-system-color-field-border-danger":_.border.danger,"--sd-system-color-field-bg-default":_.bg.default,"--sd-textinput-input-text-error-message":w.color,"--sd-textinput-input-error-message-typography-font-size":`${w.typography.fontSize}px`,"--sd-textinput-input-error-message-typography-line-height":`${w.typography.lineHeight}px`,"--sd-textinput-input-text-hint":v.color,"--sd-textinput-input-hint-typography-font-size":`${v.typography.fontSize}px`,"--sd-textinput-input-hint-typography-line-height":`${v.typography.lineHeight}px`,"--sd-textinput-input-contents-gap":`${k}px`}},i("div",{key:"f17872e37d0b0369061deb508d44ce7ae4943c5b",class:{"sd-number-input__content":!0,"sd-number-input__content--no-stepper":!this.useButton}},this.useButton&&i("button",{key:"b513ee5c44e2475ab751dae3a333e95405c9a319",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--decrement",disabled:this.isDecrementDisabled(),onClick:this.handleDecrement,tabindex:-1},i("sd-icon",{key:"172dcff1a3559008183bed32c30ec02d98c12664",name:"minus",size:e,color:this.isDecrementDisabled()?x.icon.disabled:x.icon.default})),this.inputPrefix&&i("span",{key:"24d631ea8330ed6e90f2aa77e46707867ff57539",class:"sd-number-input__prefix"},this.inputPrefix),i("input",{key:"ed0c70a534f1f6e246a407073aee9efa3a222b01",name:this.name,ref:t=>this.nativeEl=t,class:`sd-number-input__native ${this.inputClass}`,type:"text",inputMode:"numeric",value:this.displayValue,placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,style:{textAlign:this.useButton?"center":"right",...this.inputStyle}}),this.inputSuffix&&i("span",{key:"7129df3b5cf544301cadaf5111e98ddcf3e7a340",class:"sd-number-input__suffix"},this.inputSuffix),this.useButton&&i("button",{key:"d5cb9acd77be94e494fb4af3b78001cd22dbfe3c",type:"button",class:"sd-number-input__stepper sd-number-input__stepper--increment",disabled:this.isIncrementDisabled(),onClick:this.handleIncrement,tabindex:-1},i("sd-icon",{key:"dba88711bda7f5522425d96187bce402c8516fff",name:"add",size:e,color:this.isIncrementDisabled()?x.icon.disabled:x.icon.default}))))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-number-input{display:inline-flex}sd-number-input .sd-number-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;gap:var(--sd-number-input-padding-x);color:var(--sd-number-input-text-color);font-size:var(--sd-number-input-font-size);line-height:var(--sd-number-input-line-height);font-weight:var(--sd-number-input-font-weight);padding:0 var(--sd-number-input-padding-x)}sd-number-input .sd-number-input__content--no-stepper{padding:0 calc(var(--sd-number-input-padding-x) * 2)}sd-number-input .sd-number-input__content .sd-number-input__native{width:100%;height:100%;min-width:0;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;padding-block:0;padding-inline:0}sd-number-input .sd-number-input__content .sd-number-input__native[disabled]{cursor:not-allowed;color:var(--sd-number-input-disabled-color)}sd-number-input .sd-number-input__content .sd-number-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-number-input .sd-number-input__content .sd-number-input__native::placeholder{color:var(--sd-number-input-placeholder-color)}sd-number-input .sd-number-input__content .sd-number-input__prefix,sd-number-input .sd-number-input__content .sd-number-input__suffix{flex-shrink:0;white-space:nowrap;color:var(--sd-number-input-placeholder-color);font-size:inherit;line-height:inherit}sd-number-input .sd-number-input__content .sd-number-input__stepper{flex-shrink:0;width:var(--sd-number-input-stepper-size);height:var(--sd-number-input-stepper-size);border:none;border-radius:var(--sd-number-input-stepper-radius);background-color:var(--sd-number-input-stepper-bg);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin:0;transition:background-color 0.15s ease}sd-number-input .sd-number-input__content .sd-number-input__stepper:hover:not(:disabled){filter:brightness(0.95)}sd-number-input .sd-number-input__content .sd-number-input__stepper:disabled{background-color:var(--sd-number-input-stepper-bg-disabled);cursor:not-allowed}"}},[512,"sd-number-input",{size:[1],min:[2],max:[2],step:[2],useButton:[4,"use-button"],useDecimal:[4,"use-decimal"],value:[1032],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputPrefix:[1,"input-prefix"],inputSuffix:[1,"input-suffix"],inputClass:[1,"input-class"],readonly:[4],inputStyle:[16],error:[1028],focused:[1028],hovered:[1028],name:[1],internalValue:[32],displayValue:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function z(){"undefined"!=typeof customElements&&["sd-number-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-number-input":customElements.get(n(t))||customElements.define(n(t),F);break;case"sd-button":customElements.get(n(t))||u();break;case"sd-field":customElements.get(n(t))||a();break;case"sd-floating-portal":customElements.get(n(t))||o();break;case"sd-ghost-button":customElements.get(n(t))||l();break;case"sd-icon":customElements.get(n(t))||p();break;case"sd-portal":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||m();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{F as S,z as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as n,t as o}from"./p-
|
|
1
|
+
import{p as e,H as t,c as i,h as n,t as o}from"./p-KSTsd4qM.js";import{d as s}from"./p-DTEO2eLq.js";import{d as l}from"./p-CD0706HD.js";import{d as a}from"./p-7NIombHr.js";var r={textLink:{sm:{gap:"4",icon:"16",typography:{default:{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"},underline:{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:"underline",lineHeight:"20"}}},md:{gap:"8",icon:"16",typography:{default:{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:"14",fontWeight:"500",textDecoration:"none",lineHeight:"24"},underline:{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:"14",fontWeight:"500",textDecoration:"underline",lineHeight:"24"}}},content:{disabled:"#888888"},icon:{default:"#006AC1",disabled:"#BBBBBB"},lg:{typography:{default:{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:"16",fontWeight:"500",textDecoration:"none",lineHeight:"26"},underline:{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:"16",fontWeight:"500",textDecoration:"underline",lineHeight:"26"}},gap:"8",icon:"20"}}};const d={sm:{gap:Number(r.textLink.sm.gap),iconSize:Number(r.textLink.sm.icon),typography:{default:r.textLink.sm.typography.default,underline:r.textLink.sm.typography.underline}},md:{gap:Number(r.textLink.md.gap),iconSize:Number(r.textLink.md.icon),typography:{default:r.textLink.md.typography.default,underline:r.textLink.md.typography.underline}},lg:{gap:Number(r.textLink.lg.gap),iconSize:Number(r.textLink.lg.icon),typography:{default:r.textLink.lg.typography.default,underline:r.textLink.lg.typography.underline}}},c={content:r.textLink.content,icon:r.textLink.icon},p=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.click=i(this,"sdClick",7)}label="";icon="";iconColor="";labelClass="";rightArrow="none";underline=!1;disabled=!1;size="sm";tooltipText;get hostEl(){return this}isTooltipOpen=!1;click;handleClick=()=>{this.disabled||this.click.emit()};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};render(){const e=d[this.size]??d.sm,t=this.underline?e.typography.underline:e.typography.default,i=["sd-text-link__label",this.labelClass].filter(Boolean).join(" "),o=this.disabled?c.icon.disabled:this.iconColor||c.icon.default,s=this.disabled?c.icon.disabled:"#888888",l={"--sd-text-link-gap":`${e.gap}px`,"--sd-text-link-font-size":`${t.fontSize}px`,"--sd-text-link-line-height":`${t.lineHeight}px`,"--sd-text-link-text-decoration":t.textDecoration,...this.disabled?{"--sd-text-link-color":c.content.disabled}:{}},a=(this.tooltipText??"").trim();return n("span",{key:"d9653ed47a77fb5c00dc57f8f7cc2b4dc9035ca4",role:"button",tabindex:this.disabled?-1:0,class:{"sd-text-link":!0,"sd-text-link--disabled":this.disabled},style:l,onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},a.length>0&&this.isTooltipOpen&&n("sd-portal",{key:"62b3cb48c5b5fa6eb0b2b2962ef6c78bac5ac545",parentRef:this.hostEl,open:!0,offset:[this.hostEl.offsetWidth/2,4],placement:"top"},n("div",{key:"5a428366f5bc2f8686a78fc73d91517ccca13eb9",class:"sd-text-link__tooltip-inner","aria-hidden":"true"},n("sd-tag",{key:"3416662595e9bfd164279e684e2ead9d1575a9d8",name:"square_xs_grey",label:a}))),this.icon&&n("sd-icon",{key:"5056f0c55ebe92963e856f2970cfd74143876cfb",name:this.icon,size:e.iconSize,color:o,class:"sd-text-link__icon"}),n("span",{key:"6cf8474ba642c9ec3dc5952c5530f9ba15046053",class:i},this.label),this.rightArrow&&"none"!==this.rightArrow&&n("span",{key:"17a74ec3a3e1a26f18b73f7d4816ea0aee0cb22c",class:"sd-text-link__arrow",style:{width:"16px",height:"16px",display:"inline-flex",alignItems:"center",justifyContent:"center"}},n("sd-icon",{key:"ed0a6bf8b678a93fa8a0da907efb0cbf60427738",name:"chevron"===this.rightArrow?"chevronRight":"caretRight",size:12,color:s})))}static get style(){return"sd-text-link{display:inline-flex}sd-text-link .sd-text-link{position:relative;display:inline-flex;align-items:center;gap:var(--sd-text-link-gap);cursor:pointer;user-select:none}sd-text-link .sd-text-link__label{font-size:var(--sd-text-link-font-size, 12px);line-height:var(--sd-text-link-line-height, 20px);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color, inherit)}sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__label{text-decoration:underline}sd-text-link .sd-text-link--disabled{cursor:not-allowed}sd-text-link .sd-text-link sd-portal{position:absolute;width:0;height:0;overflow:hidden}.sd-text-link__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-text-link__tooltip-inner{transform:none}"}},[512,"sd-text-link",{label:[1],icon:[1],iconColor:[1,"icon-color"],labelClass:[1,"label-class"],rightArrow:[1,"right-arrow"],underline:[516],disabled:[516],size:[513],tooltipText:[1,"tooltip-text"],isTooltipOpen:[32]}]);function h(){"undefined"!=typeof customElements&&["sd-text-link","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-text-link":customElements.get(o(e))||customElements.define(o(e),p);break;case"sd-icon":customElements.get(o(e))||s();break;case"sd-portal":customElements.get(o(e))||l();break;case"sd-tag":customElements.get(o(e))||a()}}))}export{p as S,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as c,c as d,h as s,t as o}from"./p-
|
|
1
|
+
import{p as e,H as c,c as d,h as s,t as o}from"./p-KSTsd4qM.js";import{d as h}from"./p-DTEO2eLq.js";var b={default:{fontWeight:"400",fontSize:"12",lineHeight:"20"},selected:{fontWeight:"500"}},i={bg:{default:"#FFFFFF",hover:"#D9EAFF"},border:{default:"#AAAAAA",hover:"#0075FF"}},r={bg:{default:"#0075FF"},icon:{default:"#FFFFFF",disabled:"#BBBBBB",inverse:"#FFFFFF"},border:{inverse:"#FFFFFF"}},t={default:"#222222",inverse:"#FFFFFF",disabled:"#888888"};const a={size:"16",radius:"2",borderWidth:"1",gap:"8",iconSize:"12"},n={fontSize:b.default.fontSize,lineHeight:b.default.lineHeight,fontWeight:b.default.fontWeight,selectedFontWeight:b.selected.fontWeight},k={unchecked:{bg:i.bg.default,bgHover:i.bg.hover,border:i.border.default,borderHover:i.border.hover},checked:{bg:r.bg.default,icon:r.icon.default,iconDisabled:r.icon.disabled,iconInverse:r.icon.inverse,borderInverse:r.border.inverse},label:t.default,labelInverse:t.inverse,labelDisabled:t.disabled,disabled:{bg:{disabled:"#E1E1E1"}.disabled,border:{disabled:"#CCCCCC"}.disabled}},l=e(class extends c{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7)}get el(){return this}value;val;disabled=!1;inverse=!1;label="";isChecked=!1;hasWarnedMissingVal=!1;inputEl;update;componentWillLoad(){this.updateCheckedState(this.value)}watchValueHandler(e){this.updateCheckedState(e)}get checkboxClasses(){const e=["sd-checkbox","sd-checkbox--"+(this.isChecked?"checked":null===this.isChecked?"indeterminate":"unchecked")];return this.disabled&&e.push("sd-checkbox--disabled"),this.inverse&&e.push("sd-checkbox--inverse"),e.join(" ")}updateCheckedState(e){this.isChecked=null===e?null:"boolean"==typeof e?e:!!Array.isArray(e)&&void 0!==this.val&&e.includes(this.val),this.inputEl&&(this.inputEl.indeterminate=null===this.isChecked)}handleChange=()=>{if(this.disabled)return;let e;if("boolean"==typeof this.value)e=!this.value;else if(Array.isArray(this.value)){void 0!==this.val||this.hasWarnedMissingVal||(console.warn('A "val" property is required when using an array for the "value" property.'),this.hasWarnedMissingVal=!0);const c=new Set(this.value);c.has(this.val)?c.delete(this.val):c.add(this.val),e=Array.from(c)}else e=null!==this.value&&!this.isChecked;this.value=e,this.update.emit(e)};render(){return s("label",{key:"3fa9a68790e4a777904d1c8ec1fc18b646a2e41b",class:this.checkboxClasses,style:{"--sd-checkbox-size":`${a.size}px`,"--sd-checkbox-radius":`${a.radius}px`,"--sd-checkbox-border-width":`${a.borderWidth}px`,"--sd-checkbox-gap":`${a.gap}px`,"--sd-checkbox-font-size":`${n.fontSize}px`,"--sd-checkbox-line-height":`${n.lineHeight}px`,"--sd-checkbox-font-weight":n.fontWeight,"--sd-checkbox-font-weight-selected":n.selectedFontWeight,"--sd-checkbox-unchecked-bg":k.unchecked.bg,"--sd-checkbox-unchecked-bg-hover":k.unchecked.bgHover,"--sd-checkbox-unchecked-border":k.unchecked.border,"--sd-checkbox-unchecked-border-hover":k.unchecked.borderHover,"--sd-checkbox-checked-bg":k.checked.bg,"--sd-checkbox-label-color":k.label,"--sd-checkbox-label-disabled":k.labelDisabled,"--sd-checkbox-disabled-bg":k.disabled.bg,"--sd-checkbox-disabled-border":k.disabled.border,"--sd-checkbox-inverse-border":k.checked.borderInverse,"--sd-checkbox-inverse-icon":k.checked.iconInverse,"--sd-checkbox-inverse-label":k.labelInverse}},s("input",{key:"ecbabd8967c8c73e0b9216157d96b5d5f07777bd",type:"checkbox",ref:e=>{this.inputEl=e},value:this.val,checked:!!this.isChecked,disabled:this.disabled,onChange:this.handleChange,name:this.val?.toString()||"checkbox","aria-label":this.label||"checkbox","aria-checked":null===this.isChecked?"mixed":this.isChecked?"true":"false","aria-disabled":this.disabled?"true":"false"}),s("div",{key:"633c38ae79790aa5745240f68253613705f804cf",class:"sd-checkbox__bg"},!1!==this.isChecked?s("sd-icon",{name:!0===this.isChecked?"checkboxCheck":"checkboxIndeterminate",size:Number(a.iconSize),color:this.disabled?k.checked.iconDisabled:this.inverse?k.checked.iconInverse:k.checked.icon}):null),this.label&&s("span",{key:"6e46c09aa41d4d1b0dbad75b825513d6e4e08f11",class:"sd-checkbox__label","data-text":this.label},this.label))}static get watchers(){return{value:[{watchValueHandler:0}]}}static get style(){return"sd-checkbox{display:block;height:var(--sd-checkbox-line-height);line-height:0}sd-checkbox .sd-checkbox{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-checkbox-gap);height:var(--sd-checkbox-line-height);max-height:var(--sd-checkbox-line-height)}sd-checkbox .sd-checkbox>input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}sd-checkbox .sd-checkbox>input:focus-visible+.sd-checkbox__bg{box-shadow:0 0 0 2px white, 0 0 0 4px var(--sd-checkbox-checked-bg);outline:none}sd-checkbox .sd-checkbox:hover.sd-checkbox--unchecked .sd-checkbox__bg{border-color:var(--sd-checkbox-unchecked-border-hover);background:var(--sd-checkbox-unchecked-bg-hover)}sd-checkbox .sd-checkbox:hover.sd-checkbox--disabled .sd-checkbox__bg{border-color:transparent;background:var(--sd-checkbox-disabled-bg)}sd-checkbox .sd-checkbox__bg{width:var(--sd-checkbox-size);height:var(--sd-checkbox-size);border-radius:var(--sd-checkbox-radius);border:var(--sd-checkbox-border-width) solid var(--sd-checkbox-unchecked-border);box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;line-height:0}sd-checkbox .sd-checkbox__label{display:inline-flex;flex-direction:column;font-size:var(--sd-checkbox-font-size);font-weight:var(--sd-checkbox-font-weight);color:var(--sd-checkbox-label-color);line-height:var(--sd-checkbox-line-height)}sd-checkbox .sd-checkbox__label::after{content:attr(data-text);height:0;font-weight:var(--sd-checkbox-font-weight-selected);overflow:hidden;visibility:hidden;pointer-events:none}sd-checkbox .sd-checkbox--checked .sd-checkbox__label,sd-checkbox .sd-checkbox--indeterminate .sd-checkbox__label{font-weight:var(--sd-checkbox-font-weight-selected)}sd-checkbox .sd-checkbox--checked .sd-checkbox__bg,sd-checkbox .sd-checkbox--indeterminate .sd-checkbox__bg{border-color:var(--sd-checkbox-checked-bg);background:var(--sd-checkbox-checked-bg)}sd-checkbox .sd-checkbox--checked.sd-checkbox--disabled .sd-checkbox__bg,sd-checkbox .sd-checkbox--indeterminate.sd-checkbox--disabled .sd-checkbox__bg{background:var(--sd-checkbox-disabled-bg);border-color:var(--sd-checkbox-disabled-border)}sd-checkbox .sd-checkbox--unchecked .sd-checkbox__bg{background:var(--sd-checkbox-unchecked-bg)}sd-checkbox .sd-checkbox--disabled{cursor:not-allowed}sd-checkbox .sd-checkbox--disabled .sd-checkbox__label{color:var(--sd-checkbox-label-disabled)}sd-checkbox .sd-checkbox--disabled .sd-checkbox__bg{background:var(--sd-checkbox-disabled-bg);border-color:var(--sd-checkbox-disabled-border)}sd-checkbox .sd-checkbox--inverse .sd-checkbox__label{color:var(--sd-checkbox-inverse-label)}sd-checkbox .sd-checkbox--inverse.sd-checkbox--unchecked .sd-checkbox__bg{background:transparent;border-color:var(--sd-checkbox-inverse-border)}sd-checkbox .sd-checkbox--inverse.sd-checkbox--checked .sd-checkbox__bg,sd-checkbox .sd-checkbox--inverse.sd-checkbox--indeterminate .sd-checkbox__bg{background:transparent;border-color:var(--sd-checkbox-inverse-border)}sd-checkbox .sd-checkbox--inverse:hover.sd-checkbox--unchecked .sd-checkbox__bg{background:rgba(255, 255, 255, 0.12);border-color:var(--sd-checkbox-inverse-border)}"}},[512,"sd-checkbox",{value:[1028],val:[8],disabled:[516],inverse:[516],label:[1],isChecked:[32]},void 0,{value:[{watchValueHandler:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-checkbox","sd-icon"].forEach((e=>{switch(e){case"sd-checkbox":customElements.get(o(e))||customElements.define(o(e),l);break;case"sd-icon":customElements.get(o(e))||h()}}))}export{l as S,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,t as c}from"./p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,t as c}from"./p-KSTsd4qM.js";import{S as a}from"./p-DvvGi4J_.js";import{d as l}from"./p-DTEO2eLq.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"e18205c606d8a47de3cd98be6ddad0c9a1ed4f5a",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},i("div",{key:"220a830db70628b4a240d19791db5090c6112cbf",class:"sd-select-list-item-search__inner"},i("sd-icon",{key:"f7680be3c49045f318887a2cd955e84ee4ea6646",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),i("input",{key:"94face3b593e33db6230ede587de77e5cb158774",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),i("button",{key:"38f9de8c7ebf98aea2ef03ce9ddbb03cb9f29f81",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},i("sd-icon",{key:"fe32e9e44afbaa0f7ad07db665022839facbaf83",name:"close",size:12,color:"#888888"}))))}static get style(){return"sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}"}},[512,"sd-select-list-item-search",{isScrolled:[4,"is-scrolled"],searchText:[32],sdFocus:[64]}]);function d(){"undefined"!=typeof customElements&&["sd-select-list-item-search","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item-search":customElements.get(c(e))||customElements.define(c(e),r);break;case"sd-icon":customElements.get(c(e))||l()}}))}export{r as S,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as a,c as d,h as n,t as r}from"./p-CEVDmQdt.js";import{u as t,t as l,W as s,C as c}from"./p-BysikR_g.js";import{d as i}from"./p-B4ua22vZ.js";import{d as o}from"./p-BnhzUsGP.js";import{d as h}from"./p-BckY1cBy.js";import{d as g}from"./p-C7sUn4qb.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;events;elevated=!1;currentYear;currentMonth;update;viewChange;dateUtil=t();_eventMapCache;get eventMap(){const e=this._eventMapCache;if(e&&e.src===this.events)return e.map;const a=new Map;return(this.events??[]).forEach((e=>e.dates.forEach((d=>{const n=a.get(d)??[];n.push({color:e.color,label:e.label}),a.set(d,n)})))),this._eventMapCache={src:this.events,map:a},a}get legendItems(){const e=new Set,a=[];return(this.events??[]).forEach((d=>{const n=`${d.color}|${d.label}`;e.has(n)||(e.add(n),a.push({color:d.color,label:d.label}))})),a}componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||l,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),r=1===a?12:a-1,t=1===a?e-1:e,l=new Date(t,r,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,i=[];for(let e=d-1;e>=0;e--){const a=l-e;i.push({date:this.formatDate(t,r,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=n;d++)i.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-i.length%7)%7;for(let e=1;e<=o;e++)i.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return i}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||(this.value=e.date,this.update.emit(e.date))}render(){const e={"--calendar-bg":c.bg,"--calendar-padding":`${c.paddingXY}px`,"--calendar-gap":`${c.gap}px`,"--calendar-radius":`${c.radius}px`,"--calendar-header-gap":`${c.header.gap}px`,"--calendar-header-divider":c.header.divider,"--calendar-header-font-size":`${c.header.fontSize}px`,"--calendar-header-line-height":`${c.header.lineHeight}px`,"--calendar-header-font-weight":c.header.fontWeight,"--calendar-week-font-size":`${c.week.fontSize}px`,"--calendar-week-line-height":`${c.week.lineHeight}px`,"--calendar-week-font-weight":c.week.fontWeight,"--calendar-week-color":c.week.color,"--calendar-grid-row-gap":`${c.grid.rowGap}px`,"--calendar-day-size":`${c.day.size}px`,"--calendar-day-circle-size":`${c.day.circleSize}px`,"--calendar-day-circle-radius":`${c.day.circleRadius}px`,"--calendar-day-text":c.day.defaultText,"--calendar-day-hover-text":c.day.hoverText,"--calendar-day-hover-border":c.day.hoverBorder,"--calendar-day-select-bg":c.day.selectBg,"--calendar-day-select-text":c.day.selectText,"--calendar-day-disabled-text":c.day.disabledText,"--calendar-day-font-size":`${c.day.fontSize}px`,"--calendar-day-line-height":`${c.day.lineHeight}px`,"--calendar-day-font-weight":c.day.fontWeight,"--calendar-day-bold-font-weight":c.day.boldFontWeight,"--calendar-day-dot-size":`${c.day.dot.size}px`,"--calendar-day-dot-gap":`${c.day.dot.gap}px`,"--calendar-day-dot-padding-y":`${c.day.dot.paddingY}px`,"--calendar-legend-font-size":`${c.legend.fontSize}px`,"--calendar-legend-line-height":`${c.legend.lineHeight}px`,"--calendar-legend-font-weight":c.legend.fontWeight,"--calendar-legend-gap":`${c.legend.gap}px`,"--calendar-legend-group-gap":`${c.legend.groupGap}px`},a=this.eventMap,d=this.legendItems,r=(this.events?.length??0)>0;return n("div",{key:"317beb7cdffbba8982306539441fec46e6330d82",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"0d9e1084ee0bff994b4a00b7f2d490c0e101aa16",class:"sd-calendar__header"},n("div",{key:"8d82438f1820721fcbcd14cf42c1ae00b3a517d9",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"4e3391c57c0fdf3ad95b82d82c7a130c3202229d",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"6a7cbfb0069dd1d29e195cc09a9c55a8ae52aa40",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"239d5e623f830e8ceeb069e78126175772af48de",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"24362199d36afc204eebe5c5f14a41705f6782d9",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"7aa04fa1fbb355d8b3fae4cca011999b4f7f5850",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"ea5d0129d4f7eecaeff5793460363e2f15c238b8",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"7a3879edb74cb71c46fc500d7c230c21e19042c4",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"7532053f6607d9e4940403f22fd32994128fc457",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"ef59638defed69c325e49fc71ca0cc73a7d778bf",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"0205b10254c75567336bc7e4ed8a26d2227ecb33",class:"sd-calendar__grid"},this.cells.map((e=>{const d=e.inCurrentMonth&&""!==this.value&&this.value===e.date,t=e.inCurrentMonth&&l===e.date,s=e.inCurrentMonth&&this.isDisabled(e.date),c=e.inCurrentMonth?a.get(e.date):void 0;return n("button",{type:"button",key:e.date,class:{"sd-calendar__day":!0,"sd-calendar__day--empty":!e.inCurrentMonth,"sd-calendar__day--today":t,"sd-calendar__day--selected":d,"sd-calendar__day--disabled":s},disabled:!e.inCurrentMonth||s,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},n("span",{class:"sd-calendar__day-circle"},e.inCurrentMonth?e.day:""),r&&n("span",{class:"sd-calendar__dot-row","aria-hidden":"true"},c?.map(((e,a)=>n("span",{key:`${e.color}|${e.label}|${a}`,class:"sd-calendar__dot",style:{backgroundColor:e.color}})))))}))),d.length>0&&[n("span",{key:"a06b1cd9ec93891e3762f6334949cd23b643290f",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"8dc6bd2495ab471b56ed6fa252c9e0ad5ebe8341",class:"sd-calendar__legend"},d.map((e=>n("span",{key:`${e.color}|${e.label}`,class:"sd-calendar__legend-item"},n("span",{class:"sd-calendar__legend-dot",style:{backgroundColor:e.color},"aria-hidden":"true"}),n("span",{class:"sd-calendar__legend-label"},e.label)))))])}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);user-select:none}sd-calendar .sd-calendar--elevated{box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-calendar .sd-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);box-sizing:border-box;width:100%;min-height:14px;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}"}},[512,"sd-calendar",{value:[1025],selectable:[16],events:[16],elevated:[4],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-calendar","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-calendar":customElements.get(r(e))||customElements.define(r(e),p);break;case"sd-ghost-button":customElements.get(r(e))||i();break;case"sd-icon":customElements.get(r(e))||o();break;case"sd-portal":customElements.get(r(e))||h();break;case"sd-tag":customElements.get(r(e))||g()}}))}export{p as S,y as d}
|
|
1
|
+
import{p as e,H as a,c as d,h as n,t as r}from"./p-KSTsd4qM.js";import{u as t,t as l,W as s,C as c}from"./p-BysikR_g.js";import{d as i}from"./p-mbe7jmT5.js";import{d as o}from"./p-DTEO2eLq.js";import{d as h}from"./p-CD0706HD.js";import{d as g}from"./p-7NIombHr.js";const p=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=d(this,"sdUpdate",7),this.viewChange=d(this,"sdViewChange",7)}value=null;selectable;events;elevated=!1;currentYear;currentMonth;update;viewChange;dateUtil=t();_eventMapCache;get eventMap(){const e=this._eventMapCache;if(e&&e.src===this.events)return e.map;const a=new Map;return(this.events??[]).forEach((e=>e.dates.forEach((d=>{const n=a.get(d)??[];n.push({color:e.color,label:e.label}),a.set(d,n)})))),this._eventMapCache={src:this.events,map:a},a}get legendItems(){const e=new Set,a=[];return(this.events??[]).forEach((d=>{const n=`${d.color}|${d.label}`;e.has(n)||(e.add(n),a.push({color:d.color,label:d.label}))})),a}componentWillLoad(){this.syncViewFromValue()}handleValueChange(){this.syncViewFromValue()}syncViewFromValue(){const e=this.value||l,[a,d]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=d}formatDate(e,a,d){return`${e}-${String(a).padStart(2,"0")}-${String(d).padStart(2,"0")}`}get cells(){const e=this.currentYear,a=this.currentMonth,d=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),r=1===a?12:a-1,t=1===a?e-1:e,l=new Date(t,r,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,i=[];for(let e=d-1;e>=0;e--){const a=l-e;i.push({date:this.formatDate(t,r,a),day:a,inCurrentMonth:!1})}for(let d=1;d<=n;d++)i.push({date:this.formatDate(e,a,d),day:d,inCurrentMonth:!0});const o=(7-i.length%7)%7;for(let e=1;e<=o;e++)i.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return i}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:d}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=d,this.emitViewChange()};isDisabled(e){if(!this.selectable)return!1;const[a,d]=this.selectable;return""!==a&&e<a||""!==d&&e>d}handleDayClick(e){this.isDisabled(e.date)||(this.value=e.date,this.update.emit(e.date))}render(){const e={"--calendar-bg":c.bg,"--calendar-padding":`${c.paddingXY}px`,"--calendar-gap":`${c.gap}px`,"--calendar-radius":`${c.radius}px`,"--calendar-header-gap":`${c.header.gap}px`,"--calendar-header-divider":c.header.divider,"--calendar-header-font-size":`${c.header.fontSize}px`,"--calendar-header-line-height":`${c.header.lineHeight}px`,"--calendar-header-font-weight":c.header.fontWeight,"--calendar-week-font-size":`${c.week.fontSize}px`,"--calendar-week-line-height":`${c.week.lineHeight}px`,"--calendar-week-font-weight":c.week.fontWeight,"--calendar-week-color":c.week.color,"--calendar-grid-row-gap":`${c.grid.rowGap}px`,"--calendar-day-size":`${c.day.size}px`,"--calendar-day-circle-size":`${c.day.circleSize}px`,"--calendar-day-circle-radius":`${c.day.circleRadius}px`,"--calendar-day-text":c.day.defaultText,"--calendar-day-hover-text":c.day.hoverText,"--calendar-day-hover-border":c.day.hoverBorder,"--calendar-day-select-bg":c.day.selectBg,"--calendar-day-select-text":c.day.selectText,"--calendar-day-disabled-text":c.day.disabledText,"--calendar-day-font-size":`${c.day.fontSize}px`,"--calendar-day-line-height":`${c.day.lineHeight}px`,"--calendar-day-font-weight":c.day.fontWeight,"--calendar-day-bold-font-weight":c.day.boldFontWeight,"--calendar-day-dot-size":`${c.day.dot.size}px`,"--calendar-day-dot-gap":`${c.day.dot.gap}px`,"--calendar-day-dot-padding-y":`${c.day.dot.paddingY}px`,"--calendar-legend-font-size":`${c.legend.fontSize}px`,"--calendar-legend-line-height":`${c.legend.lineHeight}px`,"--calendar-legend-font-weight":c.legend.fontWeight,"--calendar-legend-gap":`${c.legend.gap}px`,"--calendar-legend-group-gap":`${c.legend.groupGap}px`},a=this.eventMap,d=this.legendItems,r=(this.events?.length??0)>0;return n("div",{key:"317beb7cdffbba8982306539441fec46e6330d82",class:{"sd-calendar":!0,"sd-calendar--elevated":this.elevated},style:e},n("div",{key:"0d9e1084ee0bff994b4a00b7f2d490c0e101aa16",class:"sd-calendar__header"},n("div",{key:"8d82438f1820721fcbcd14cf42c1ae00b3a517d9",class:"sd-calendar__nav-group"},n("sd-ghost-button",{key:"4e3391c57c0fdf3ad95b82d82c7a130c3202229d",ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{key:"6a7cbfb0069dd1d29e195cc09a9c55a8ae52aa40",class:"sd-calendar__label"},this.currentYear),n("sd-ghost-button",{key:"239d5e623f830e8ceeb069e78126175772af48de",ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("span",{key:"24362199d36afc204eebe5c5f14a41705f6782d9",class:"sd-calendar__divider","aria-hidden":"true"}),n("div",{key:"7aa04fa1fbb355d8b3fae4cca011999b4f7f5850",class:"sd-calendar__nav-group sd-calendar__nav-group-month"},n("sd-ghost-button",{key:"ea5d0129d4f7eecaeff5793460363e2f15c238b8",ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{key:"7a3879edb74cb71c46fc500d7c230c21e19042c4",class:"sd-calendar__label sd-calendar__label-month"},this.currentMonth,"월"),n("sd-ghost-button",{key:"7532053f6607d9e4940403f22fd32994128fc457",ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth}))),n("div",{key:"ef59638defed69c325e49fc71ca0cc73a7d778bf",class:"sd-calendar__week"},s.map((e=>n("span",{key:e,class:"sd-calendar__week-cell"},e)))),n("div",{key:"0205b10254c75567336bc7e4ed8a26d2227ecb33",class:"sd-calendar__grid"},this.cells.map((e=>{const d=e.inCurrentMonth&&""!==this.value&&this.value===e.date,t=e.inCurrentMonth&&l===e.date,s=e.inCurrentMonth&&this.isDisabled(e.date),c=e.inCurrentMonth?a.get(e.date):void 0;return n("button",{type:"button",key:e.date,class:{"sd-calendar__day":!0,"sd-calendar__day--empty":!e.inCurrentMonth,"sd-calendar__day--today":t,"sd-calendar__day--selected":d,"sd-calendar__day--disabled":s},disabled:!e.inCurrentMonth||s,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>e.inCurrentMonth&&this.handleDayClick(e)},n("span",{class:"sd-calendar__day-circle"},e.inCurrentMonth?e.day:""),r&&n("span",{class:"sd-calendar__dot-row","aria-hidden":"true"},c?.map(((e,a)=>n("span",{key:`${e.color}|${e.label}|${a}`,class:"sd-calendar__dot",style:{backgroundColor:e.color}})))))}))),d.length>0&&[n("span",{key:"a06b1cd9ec93891e3762f6334949cd23b643290f",class:"sd-calendar__divider-bottom","aria-hidden":"true"}),n("div",{key:"8dc6bd2495ab471b56ed6fa252c9e0ad5ebe8341",class:"sd-calendar__legend"},d.map((e=>n("span",{key:`${e.color}|${e.label}`,class:"sd-calendar__legend-item"},n("span",{class:"sd-calendar__legend-dot",style:{backgroundColor:e.color},"aria-hidden":"true"}),n("span",{class:"sd-calendar__legend-label"},e.label)))))])}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-calendar{display:block}sd-calendar .sd-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);width:328px;min-height:328px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);user-select:none}sd-calendar .sd-calendar--elevated{box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2)}sd-calendar .sd-calendar__header{display:flex;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-calendar .sd-calendar__nav-group-month{width:100%}sd-calendar .sd-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-calendar .sd-calendar__label-month{width:100%}sd-calendar .sd-calendar__divider{display:inline-block;width:1px;height:16px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-calendar .sd-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-calendar .sd-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-calendar .sd-calendar__day{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-start;width:var(--calendar-day-size);min-height:var(--calendar-day-circle-size);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__day-circle{display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-calendar .sd-calendar__day:not(:disabled):hover .sd-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-calendar .sd-calendar__day--today .sd-calendar__day-circle{font-weight:700}sd-calendar .sd-calendar__day--selected .sd-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--selected:not(:disabled):hover .sd-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-calendar .sd-calendar__day--disabled{color:var(--calendar-day-disabled-text);background:none !important;cursor:not-allowed}sd-calendar .sd-calendar__day--empty{visibility:hidden;pointer-events:none}sd-calendar .sd-calendar__dot-row{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--calendar-day-dot-gap);box-sizing:border-box;width:100%;min-height:14px;padding-top:var(--calendar-day-dot-padding-y);padding-bottom:var(--calendar-day-dot-padding-y)}sd-calendar .sd-calendar__dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%}sd-calendar .sd-calendar__divider-bottom{display:block;width:100%;height:1px;background:var(--calendar-header-divider)}sd-calendar .sd-calendar__legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:var(--calendar-legend-group-gap);row-gap:4px;font-size:var(--calendar-legend-font-size);line-height:var(--calendar-legend-line-height);font-weight:var(--calendar-legend-font-weight);color:var(--calendar-day-text)}sd-calendar .sd-calendar__legend-item{display:inline-flex;align-items:center;gap:var(--calendar-legend-gap)}sd-calendar .sd-calendar__legend-dot{display:inline-block;width:var(--calendar-day-dot-size);height:var(--calendar-day-dot-size);border-radius:50%;flex-shrink:0}sd-calendar .sd-calendar__legend-label{display:inline-block}"}},[512,"sd-calendar",{value:[1025],selectable:[16],events:[16],elevated:[4],currentYear:[32],currentMonth:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-calendar","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((e=>{switch(e){case"sd-calendar":customElements.get(r(e))||customElements.define(r(e),p);break;case"sd-ghost-button":customElements.get(r(e))||i();break;case"sd-icon":customElements.get(r(e))||o();break;case"sd-portal":customElements.get(r(e))||h();break;case"sd-tag":customElements.get(r(e))||g()}}))}export{p as S,y as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as a}from"./p-D9tQwTWy.js";import{s as t}from"./p-BJfiMC9H.js";const o={height:a.table.header.height,paddingX:a.table.header.paddingX,gap:a.table.header.gap},i={fontFamily:a.table.header.typography.fontFamily,fontWeight:a.table.header.typography.fontWeight,fontSize:a.table.header.typography.fontSize,lineHeight:a.table.header.typography.lineHeight,textDecoration:a.table.header.typography.textDecoration},e={bg:a.table.header.bg},s={color:a.table.header.resizingBar.color,height:a.table.header.resizingBar.height},n={default:{height:a.table.body.default.height,paddingY:a.table.body.default.paddingY},dense:{height:a.table.body.dense.height,paddingY:a.table.body.dense.paddingY},paddingX:a.table.body.paddingX.default,framePadding:a.table.body.paddingX.frame},d={fontFamily:a.table.body.typography.fontFamily,fontWeight:a.table.body.typography.fontWeight,fontSize:a.table.body.typography.fontSize,lineHeight:a.table.body.typography.lineHeight,textDecoration:a.table.body.typography.textDecoration},r={color:a.table.border.color,width:a.table.border.width},g={color:a.table.separator.color,width:a.table.separator.width.default,denseWidth:a.table.separator.width.dense},h=a.table.radius,p=48,f={pageEdit:t.color.darkblue.strong,arrowDown:t.color.darkblue.strong,arrowUp:t.color.darkblue.strong,updown:t.color.grey.strong,pageMove:t.color.darkblue.strong,star:t.color.blue.strong},w=(a,t)=>t??f[a],c=a=>"asc"===a?"arrowDown":"desc"===a?"arrowUp":"updown";export{n as T,p as a,d as b,r as c,h as d,c as e,s as f,i as g,e as h,o as i,g as j,w as r}
|