@sellmate/design-system 1.26.1 → 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 +1 -1
- package/dist/cjs/{index-BuaQW9U4.js → index-BTqAmfdr.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +6 -16
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-field_3.cjs.entry.js +2 -2
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +2 -3
- 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 +2 -2
- package/dist/cjs/sd-loading-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +3 -3
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-popup.cjs.entry.js +8 -13
- 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 +1 -1
- package/dist/cjs/sd-select_3.cjs.entry.js +2 -2
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +4 -4
- package/dist/cjs/{sd-table.config-B7MuRLoR.js → sd-table.config-DzC55sap.js} +3 -3
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +2 -3
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -3
- 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-circle-progress/sd-circle-progress.config.js +4 -5
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +1 -1
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.config.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.config.js +6 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.css +16 -0
- 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/components/index.js +1 -1
- package/dist/components/{p-DiJvHjSG.js → p-7NIombHr.js} +1 -1
- package/dist/components/{p-346Z6-KH.js → p-B0NEmngm.js} +1 -1
- package/dist/components/{p-DoJxhlz2.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-DlBZuGIN.js → p-BIFt5zIX.js} +1 -1
- package/dist/components/{p-UIytIOVz.js → p-BJoG95Kt.js} +1 -1
- package/dist/components/{p-D3dq5pt5.js → p-BKBd44No.js} +1 -1
- package/dist/components/{p-DGBRubiD.js → p-BKg1YV-H.js} +1 -1
- package/dist/components/{p-D9tjoBhH.js → p-BL9Vy4Fd.js} +1 -1
- package/dist/components/p-BXcizROm.js +1 -0
- package/dist/components/{p-BTWJkT9Y.js → p-Bcp4vs0m.js} +1 -1
- package/dist/components/{p-B90EQBEX.js → p-BeR_5Fwe.js} +1 -1
- package/dist/components/p-BsJ3_flK.js +1 -0
- package/dist/components/{p-BVVYrEje.js → p-BuubsWWz.js} +1 -1
- package/dist/components/{p-BBRQlkBM.js → p-C-xm1A4R.js} +1 -1
- package/dist/components/{p-DhgwAPO4.js → p-CD0706HD.js} +1 -1
- package/dist/components/{p-c9mdxFTZ.js → p-CDiIm8f6.js} +1 -1
- package/dist/components/{p-BSnINeoq.js → p-CHvrvQsZ.js} +1 -1
- package/dist/components/{p-BNxNJ3CK.js → p-CJYl_ssf.js} +1 -1
- package/dist/components/{p-C3rAloxT.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-k89ztBz6.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-j1n74q9u.js → p-DHINsZ60.js} +1 -1
- package/dist/components/{p-Dz70SQco.js → p-DJsKwChT.js} +1 -1
- package/dist/components/{p-C4Vfr3RI.js → p-DObwsGYE.js} +1 -1
- package/dist/components/{p-BnhzUsGP.js → p-DTEO2eLq.js} +1 -1
- package/dist/components/{p-DUHiXyfJ.js → p-DYHntcvV.js} +1 -1
- package/dist/components/p-De0OtxK5.js +1 -0
- package/dist/components/{p-BxiJsH7Z.js → p-DgK8EUjx.js} +1 -1
- package/dist/components/{p-BOTW76OV.js → p-DuMx_9he.js} +1 -1
- package/dist/components/{p-DsZ3vasC.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-D6AroYk-.js → p-V8hUcpnj.js} +1 -1
- package/dist/components/{p-DlROb9xa.js → p-b9Q4MYgR.js} +1 -1
- package/dist/components/{p-h-EFBJM4.js → p-hd2Gc2Z3.js} +1 -1
- package/dist/components/{p-B_12VhSA.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-f089fc54.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-6e702726.entry.js → p-0f3d40f2.entry.js} +1 -1
- package/dist/design-system/{p-f910d33f.entry.js → p-12eabcc9.entry.js} +1 -1
- package/dist/design-system/{p-eb1233ff.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-8c5451f2.entry.js → p-36275d32.entry.js} +1 -1
- package/dist/design-system/{p-25a11d7d.entry.js → p-3f347a3a.entry.js} +1 -1
- package/dist/design-system/{p-a76a8463.entry.js → p-4f4b3dab.entry.js} +1 -1
- package/dist/design-system/{p-352a72ef.entry.js → p-59ecccb2.entry.js} +1 -1
- package/dist/design-system/{p-7cf2305b.entry.js → p-6324bbde.entry.js} +1 -1
- package/dist/design-system/{p-3f16f44b.entry.js → p-63804698.entry.js} +1 -1
- package/dist/design-system/{p-90a360ca.entry.js → p-669dfbe4.entry.js} +1 -1
- package/dist/design-system/{p-43c47cd5.entry.js → p-66cb4a7c.entry.js} +1 -1
- package/dist/design-system/{p-0fcb6fb3.entry.js → p-7e1f14a6.entry.js} +1 -1
- package/dist/design-system/{p-250b8e5d.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-8be26652.entry.js → p-9860b9d9.entry.js} +1 -1
- 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-1680b427.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-992f9509.entry.js → p-b6a139b7.entry.js} +1 -1
- package/dist/design-system/{p-a32704bc.entry.js → p-b8394ddb.entry.js} +1 -1
- package/dist/design-system/{p-20bb91ed.entry.js → p-c561595a.entry.js} +1 -1
- package/dist/design-system/{p-3064d7c6.entry.js → p-c5bd0dc9.entry.js} +1 -1
- 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-a0349edd.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-89c8585f.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 +2 -2
- package/dist/esm/{index-BZ5lcC25.js → index-BwIs2-fm.js} +1 -1
- package/dist/esm/loader.js +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +6 -16
- package/dist/esm/sd-confirm-modal_2.entry.js +2 -2
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker_7.entry.js +1 -1
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +2 -2
- package/dist/esm/sd-field_3.entry.js +2 -2
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_3.entry.js +2 -3
- 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 +2 -2
- package/dist/esm/sd-loading-container.entry.js +1 -1
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-pagination_4.entry.js +3 -3
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-popup.entry.js +8 -13
- 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 +1 -1
- package/dist/esm/sd-select_3.entry.js +2 -2
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/{sd-table.config-B3wuA5wX.js → sd-table.config-BbIWNUE2.js} +3 -3
- package/dist/esm/sd-table.entry.js +4 -4
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-text-link.entry.js +2 -3
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +2 -3
- package/dist/esm/{tooltipArrow-ByHjyr3Z.js → tooltipArrow-CJxhdfqT.js} +1 -1
- package/hydrate/index.js +60 -69
- package/hydrate/index.mjs +60 -69
- 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-DLZRxIKh.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-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-c4e0c490.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
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import modalTokens from "../../tokens/generated/component.modal.json";
|
|
2
|
+
import overlayTokens from "../../tokens/generated/component.overlay.json";
|
|
2
3
|
const { modal } = modalTokens;
|
|
3
4
|
const action = modal.action;
|
|
5
|
+
const overlayHeader = overlayTokens.overlay.header;
|
|
4
6
|
export const ACTION_MODAL_LAYOUT = {
|
|
5
7
|
radius: Number(modal.radius),
|
|
6
8
|
bg: modal.bg,
|
|
7
|
-
headerPaddingX: Number(
|
|
8
|
-
headerPaddingY: Number(
|
|
9
|
-
headerGap: Number(
|
|
9
|
+
headerPaddingX: Number(overlayHeader.paddingX),
|
|
10
|
+
headerPaddingY: Number(overlayHeader.paddingY),
|
|
11
|
+
headerGap: Number(overlayHeader.gap),
|
|
10
12
|
bodyPaddingX: Number(action.body.paddingX),
|
|
11
13
|
bodyPaddingBottom: Number(action.body.paddingBottom),
|
|
12
14
|
footerPaddingX: Number(action.footer.paddingX),
|
|
@@ -16,9 +18,9 @@ export const ACTION_MODAL_LAYOUT = {
|
|
|
16
18
|
footerBorder: action.footer.border,
|
|
17
19
|
};
|
|
18
20
|
export const ACTION_MODAL_TITLE = {
|
|
19
|
-
color:
|
|
20
|
-
fontFamily:
|
|
21
|
-
fontWeight:
|
|
22
|
-
fontSize: Number(
|
|
23
|
-
lineHeight: Number(
|
|
21
|
+
color: overlayHeader.title.color,
|
|
22
|
+
fontFamily: overlayHeader.title.typography.fontFamily,
|
|
23
|
+
fontWeight: overlayHeader.title.typography.fontWeight,
|
|
24
|
+
fontSize: Number(overlayHeader.title.typography.fontSize),
|
|
25
|
+
lineHeight: Number(overlayHeader.title.typography.lineHeight),
|
|
24
26
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import spinnerTokens from "../../tokens/generated/component.spinner.json";
|
|
2
1
|
import progressTokens from "../../tokens/generated/component.progress.json";
|
|
3
2
|
import systemTokens from "../../tokens/generated/system.json";
|
|
4
3
|
export const CIRCLE_PROGRESS_LABEL_COLOR = progressTokens.progress.color.label;
|
|
@@ -6,8 +5,8 @@ export const CIRCLE_PROGRESS_PERCENT_ZERO_COLOR = systemTokens.color.fg.tertiary
|
|
|
6
5
|
// TODO: error/complete 색상 및 inverse 흰색은 토큰 반영 후 교체
|
|
7
6
|
export const CIRCLE_PROGRESS_COLOR_MAP = {
|
|
8
7
|
primary: {
|
|
9
|
-
arc:
|
|
10
|
-
track:
|
|
8
|
+
arc: progressTokens.progress.active.color,
|
|
9
|
+
track: progressTokens.progress.color.track,
|
|
11
10
|
},
|
|
12
11
|
inverse: {
|
|
13
12
|
arc: '#FFFFFF',
|
|
@@ -15,11 +14,11 @@ export const CIRCLE_PROGRESS_COLOR_MAP = {
|
|
|
15
14
|
},
|
|
16
15
|
error: {
|
|
17
16
|
arc: '#E30000',
|
|
18
|
-
track:
|
|
17
|
+
track: progressTokens.progress.color.track,
|
|
19
18
|
},
|
|
20
19
|
complete: {
|
|
21
20
|
arc: '#01BB4B',
|
|
22
|
-
track:
|
|
21
|
+
track: progressTokens.progress.color.track,
|
|
23
22
|
},
|
|
24
23
|
};
|
|
25
24
|
export const CIRCLE_PROGRESS_VIEWBOX_SIZE = 80;
|
|
@@ -6,7 +6,7 @@ export const KEY_VALUE_TABLE_LAYOUT = {
|
|
|
6
6
|
thWidth: 120,
|
|
7
7
|
borderRadius: Number(t.radius),
|
|
8
8
|
thPaddingX: Number(t.header.paddingX),
|
|
9
|
-
padding: Number(t.keyValue.body.
|
|
9
|
+
padding: Number(t.keyValue.body.paddingY),
|
|
10
10
|
helpIconSize: 16,
|
|
11
11
|
requiredIconSize: 12,
|
|
12
12
|
gap: Number(t.header.gap),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import modalTokens from "../../tokens/generated/component.modal.json";
|
|
2
|
-
import
|
|
2
|
+
import progressTokens from "../../tokens/generated/component.progress.json";
|
|
3
3
|
export const LOADING_MODAL_LAYOUT = {
|
|
4
4
|
minWidth: Number(modalTokens.modal.loading.width),
|
|
5
5
|
minHeight: Number(modalTokens.modal.loading.height),
|
|
@@ -11,8 +11,8 @@ export const LOADING_MODAL_COLORS = {
|
|
|
11
11
|
bg: modalTokens.modal.bg,
|
|
12
12
|
messageColor: modalTokens.modal.loading.message.color,
|
|
13
13
|
errorIcon: modalTokens.modal.confirm.negative.icon,
|
|
14
|
-
spinnerTrack:
|
|
15
|
-
spinnerArc:
|
|
14
|
+
spinnerTrack: progressTokens.progress.color.track,
|
|
15
|
+
spinnerArc: progressTokens.progress.active.color,
|
|
16
16
|
};
|
|
17
17
|
export const LOADING_MODAL_TYPOGRAPHY = {
|
|
18
18
|
fontFamily: modalTokens.modal.loading.message.typography.fontFamily,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import popupTokens from "../../tokens/generated/component.popup.json";
|
|
2
|
+
import overlayTokens from "../../tokens/generated/component.overlay.json";
|
|
2
3
|
import systemTokens from "../../tokens/generated/system.json";
|
|
3
4
|
const { popup } = popupTokens;
|
|
5
|
+
const { overlay } = overlayTokens;
|
|
4
6
|
const shadowSpreadMd = systemTokens.shadow.spread.md;
|
|
5
7
|
export const POPUP_LAYOUT = {
|
|
6
8
|
bodyBg: popup.bg,
|
|
@@ -23,10 +25,10 @@ export const POPUP_HEADER = {
|
|
|
23
25
|
paddingY: 10,
|
|
24
26
|
};
|
|
25
27
|
export const POPUP_FOOTER = {
|
|
26
|
-
bg:
|
|
27
|
-
paddingX: Number(
|
|
28
|
-
paddingY: Number(
|
|
29
|
-
gap: Number(
|
|
28
|
+
bg: overlay.footer.bg.default,
|
|
29
|
+
paddingX: Number(overlay.footer.paddingX),
|
|
30
|
+
paddingY: Number(overlay.footer.paddingY),
|
|
31
|
+
gap: Number(overlay.footer.gap),
|
|
30
32
|
height: 52,
|
|
31
33
|
slotHeight: 36,
|
|
32
34
|
shadow: `${shadowSpreadMd.x}px ${shadowSpreadMd.y}px ${shadowSpreadMd.blur}px ${shadowSpreadMd.spread}px ${shadowSpreadMd.color}`,
|
|
@@ -19,6 +19,22 @@
|
|
|
19
19
|
overflow-y: auto;
|
|
20
20
|
padding-bottom: 0;
|
|
21
21
|
}
|
|
22
|
+
:host .sd-select-listbox__list::-webkit-scrollbar {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
width: 8px;
|
|
25
|
+
background: #E5E5E5;
|
|
26
|
+
}
|
|
27
|
+
:host .sd-select-listbox__list::-webkit-scrollbar:horizontal {
|
|
28
|
+
height: 8px;
|
|
29
|
+
}
|
|
30
|
+
:host .sd-select-listbox__list::-webkit-scrollbar-thumb {
|
|
31
|
+
height: 80px;
|
|
32
|
+
background-color: #CCCCCC;
|
|
33
|
+
border-radius: 4px;
|
|
34
|
+
}
|
|
35
|
+
:host .sd-select-listbox__list::-webkit-scrollbar-track {
|
|
36
|
+
background-color: #E5E5E5;
|
|
37
|
+
}
|
|
22
38
|
:host .sd-select-listbox__empty {
|
|
23
39
|
padding: 12px;
|
|
24
40
|
text-align: center;
|
|
@@ -30,8 +30,8 @@ export const TABLE_BODY_LAYOUT = {
|
|
|
30
30
|
height: tableTokens.table.body.dense.height,
|
|
31
31
|
paddingY: tableTokens.table.body.dense.paddingY,
|
|
32
32
|
},
|
|
33
|
-
paddingX: tableTokens.table.body.paddingX,
|
|
34
|
-
framePadding: tableTokens.table.body.frame
|
|
33
|
+
paddingX: tableTokens.table.body.paddingX.default,
|
|
34
|
+
framePadding: tableTokens.table.body.paddingX.frame,
|
|
35
35
|
};
|
|
36
36
|
export const TABLE_BODY_TYPOGRAPHY = {
|
|
37
37
|
fontFamily: tableTokens.table.body.typography.fontFamily,
|
|
@@ -69,7 +69,7 @@ export const TABLE_BAR_COLORS = {
|
|
|
69
69
|
};
|
|
70
70
|
// ── KeyValue Tokens ──
|
|
71
71
|
export const TABLE_KEY_VALUE = {
|
|
72
|
-
bodyPadding: tableTokens.table.keyValue.body.
|
|
72
|
+
bodyPadding: tableTokens.table.keyValue.body.paddingY,
|
|
73
73
|
height: tableTokens.table.keyValue.height,
|
|
74
74
|
};
|
|
75
75
|
// ── Selectable Column ──
|
|
@@ -50,6 +50,22 @@ sd-table *,
|
|
|
50
50
|
overflow: auto;
|
|
51
51
|
background: #FFFFFF;
|
|
52
52
|
}
|
|
53
|
+
.sd-table__scroll-container::-webkit-scrollbar {
|
|
54
|
+
opacity: 0;
|
|
55
|
+
width: 8px;
|
|
56
|
+
background: #E5E5E5;
|
|
57
|
+
}
|
|
58
|
+
.sd-table__scroll-container::-webkit-scrollbar:horizontal {
|
|
59
|
+
height: 8px;
|
|
60
|
+
}
|
|
61
|
+
.sd-table__scroll-container::-webkit-scrollbar-thumb {
|
|
62
|
+
height: 80px;
|
|
63
|
+
background-color: #CCCCCC;
|
|
64
|
+
border-radius: 4px;
|
|
65
|
+
}
|
|
66
|
+
.sd-table__scroll-container::-webkit-scrollbar-track {
|
|
67
|
+
background-color: #E5E5E5;
|
|
68
|
+
}
|
|
53
69
|
.sd-table__scroll-container--loading {
|
|
54
70
|
overflow: hidden !important;
|
|
55
71
|
pointer-events: none;
|
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 a}from"./p-
|
|
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-DlROb9xa.js";import{d as o}from"./p-h-EFBJM4.js";import{d as l}from"./p-B_12VhSA.js";import{d as p}from"./p-BnhzUsGP.js";import{d as h}from"./p-DhgwAPO4.js";import{d as m}from"./p-DiJvHjSG.js";import{d as c}from"./p-B90EQBEX.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,E=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),E);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{E as S,z 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}
|