@sellmate/design-system 1.0.78 → 1.1.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.table-B7brIpIQ.js +56 -0
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index--F2wGuAi.js → index-BlxrCRYi.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{resolveColor-LhfOKtTZ.js → resolveColor-B0hzQNLG.js} +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +3 -3
- package/dist/cjs/sd-badge.cjs.entry.js +2 -3
- package/dist/cjs/sd-barcode-input.cjs.entry.js +3 -3
- package/dist/cjs/{sd-button-v2.config-CnqCQQMi.js → sd-button.config-DH08UNfl.js} +114 -28
- package/dist/cjs/{sd-button-v2_2.cjs.entry.js → sd-button_2.cjs.entry.js} +101 -85
- package/dist/cjs/sd-calendar.cjs.entry.js +15 -15
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/sd-chip.cjs.entry.js +2 -2
- package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +19 -11
- package/dist/cjs/sd-date-box.cjs.entry.js +4 -4
- package/dist/cjs/{sd-date-picker-calendar.cjs.entry.js → sd-date-picker-calendar_2.cjs.entry.js} +51 -3
- package/dist/cjs/{sd-date-picker.config-CRgCT5dn.js → sd-date-picker.config-CjvrFpYK.js} +1 -2
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +1230 -0
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +3 -3
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +28 -27
- package/dist/cjs/{sd-button_4.cjs.entry.js → sd-field_3.cjs.entry.js} +26 -82
- package/dist/cjs/sd-form.cjs.entry.js +2 -2
- package/dist/cjs/sd-ghost-button.cjs.entry.js +12 -10
- package/dist/cjs/sd-guide.cjs.entry.js +9 -9
- package/dist/cjs/sd-key-value-table.cjs.entry.js +230 -0
- package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/{sd-pagination_5.cjs.entry.js → sd-pagination_4.cjs.entry.js} +34 -296
- package/dist/cjs/sd-popover.cjs.entry.js +17 -10
- package/dist/cjs/sd-popup.cjs.entry.js +112 -0
- package/dist/cjs/sd-portal.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button.cjs.entry.js +4 -4
- package/dist/cjs/sd-radio.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +155 -0
- package/dist/cjs/sd-select.config-B19ptCT2.js +178 -0
- package/dist/cjs/{sd-select-list-item_4.cjs.entry.js → sd-select_3.cjs.entry.js} +286 -318
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +40 -23
- package/dist/cjs/sd-table.config-CDyioyE2.js +65 -0
- package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sd-tag.cjs.entry.js +49 -14
- package/dist/cjs/sd-td.cjs.entry.js +2 -2
- package/dist/cjs/sd-text-link.cjs.entry.js +8 -5
- package/dist/cjs/sd-toast-container.cjs.entry.js +5 -5
- package/dist/cjs/sd-toast.cjs.entry.js +35 -5
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{system-DpTN1vBC.js → system-VmZRYp6V.js} +4 -2
- package/dist/cjs/{tooltipArrow-D1-wcNm1.js → tooltipArrow-N6nQ1QT-.js} +1 -1
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/assets/CheckboxCheck.js +5 -0
- package/dist/collection/components/assets/CheckboxIndeterminate.js +5 -0
- package/dist/collection/components/assets/index.js +4 -0
- package/dist/collection/components/sd-action-modal/sd-action-modal.css +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +7 -7
- package/dist/collection/components/sd-badge/sd-badge.config.js +10 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -22
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +4 -4
- package/dist/collection/components/{sd-button-v2/sd-button-v2.config.js → sd-button/sd-button.config.js} +1 -1
- package/dist/collection/components/sd-button/sd-button.css +47 -93
- package/dist/collection/components/sd-button/sd-button.js +99 -173
- package/dist/collection/components/sd-calendar/sd-calendar.js +14 -14
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +3 -3
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +13 -8
- package/dist/collection/components/sd-date-box/sd-date-box.js +3 -3
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.css +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +7 -5
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +4 -4
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +4 -4
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +13 -11
- package/dist/collection/components/sd-field/sd-field.css +6 -2
- package/dist/collection/components/sd-field/sd-field.js +30 -5
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +4 -4
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +1 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +3 -3
- package/dist/collection/components/sd-form/sd-form.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +12 -10
- package/dist/collection/components/sd-guide/sd-guide.css +8 -172
- package/dist/collection/components/sd-guide/sd-guide.js +6 -4
- package/dist/collection/components/sd-icon/sd-icon.js +4 -4
- package/dist/collection/components/sd-input/sd-input.css +4 -2
- package/dist/collection/components/sd-input/sd-input.js +5 -5
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +36 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +119 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +301 -0
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +6 -3
- package/dist/collection/components/sd-number-input/sd-number-input.css +7 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +6 -3
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +128 -35
- package/dist/collection/components/sd-popup/sd-popup.config.js +34 -0
- package/dist/collection/components/sd-popup/sd-popup.css +73 -0
- package/dist/collection/components/sd-popup/sd-popup.js +163 -0
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +3 -3
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.css +4 -4
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +5 -5
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +5 -5
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.config.js +2 -2
- package/dist/collection/components/sd-table/sd-table.css +8 -8
- package/dist/collection/components/sd-table/sd-table.js +54 -18
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +4 -0
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +21 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.config.js +40 -8
- package/dist/collection/components/sd-tag/sd-tag.js +9 -6
- package/dist/collection/components/sd-text-link/sd-text-link.css +1 -0
- package/dist/collection/components/sd-text-link/sd-text-link.js +5 -4
- package/dist/collection/components/sd-textarea/sd-textarea.css +3 -0
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- package/dist/collection/components/sd-toast/sd-toast.config.js +14 -0
- package/dist/collection/components/sd-toast/sd-toast.css +3 -5
- package/dist/collection/components/sd-toast/sd-toast.js +52 -5
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +4 -4
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +77 -30
- package/dist/collection/utils/color/resolveColor.js +2 -2
- package/dist/collection/utils/dropdown-manager.js +1 -1
- package/dist/collection/utils/toast.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/p--t9jBTYS.js +1 -0
- package/dist/components/p-At6nBeyO.js +1 -0
- package/dist/components/p-B1MabGRR.js +1 -0
- package/dist/components/{p-CeVMl_M9.js → p-B73VhbYi.js} +1 -1
- package/dist/components/p-BDQQllAo.js +1 -0
- package/dist/components/p-BDr27lvk.js +1 -0
- package/dist/components/p-BPsOJlCP.js +1 -0
- package/dist/components/p-BQ6at17Y.js +1 -0
- package/dist/components/p-BW_sBt7X.js +1 -0
- package/dist/components/p-BX3TJuQY.js +1 -0
- package/dist/components/p-BeK8amzx.js +1 -0
- package/dist/components/{p-Bvq0Vpln.js → p-BfkuCNCI.js} +1 -1
- package/dist/components/p-Bm_T3qE0.js +1 -0
- package/dist/components/{p-DegvQLTF.js → p-BnzK4uU4.js} +1 -1
- package/dist/components/{p-q0VWISKA.js → p-BqkJ0rZv.js} +1 -1
- package/dist/components/p-C4PmGpW8.js +1 -0
- package/dist/components/{p-Nvx13YlG.js → p-C9CszVFl.js} +1 -1
- package/dist/components/p-CGBnxqG2.js +1 -0
- package/dist/components/p-CGQWERwE.js +1 -0
- package/dist/components/{p-DkJqVXpD.js → p-CT3dfy3K.js} +1 -1
- package/dist/components/p-CZmKBmKx.js +1 -0
- package/dist/components/p-CnarDyZi.js +1 -0
- package/dist/components/p-Cr2ghUra.js +1 -0
- package/dist/components/{p-BStczlLa.js → p-Cspm6LxP.js} +1 -1
- package/dist/components/p-Cx3jXw9J.js +1 -0
- package/dist/components/{p-Dcc2Vm6z.js → p-D5TRyquv.js} +1 -1
- package/dist/components/p-D8WAP9T3.js +1 -0
- package/dist/components/p-DG-4Ifco.js +1 -0
- package/dist/components/{p-TwGlKfsC.js → p-DG45uNxd.js} +1 -1
- package/dist/components/p-DdLntfiw.js +1 -0
- package/dist/components/{p-BJsHakU2.js → p-DfXAgw0E.js} +1 -1
- package/dist/components/p-Dr1AMbBj.js +1 -0
- package/dist/components/p-GBlVDmy4.js +1 -0
- package/dist/components/p-MMkRcTBd.js +1 -0
- package/dist/components/p-MQTl8fGT.js +1 -0
- package/dist/components/p-ZstG0XdT.js +1 -0
- package/dist/components/p-h7eBUL4i.js +1 -0
- package/dist/components/p-lyB7zSp-.js +1 -0
- package/dist/components/{p-D1DpOp6M.js → p-oIM6jNZe.js} +1 -1
- package/dist/components/p-oKHZl8yu.js +1 -0
- package/dist/components/p-ofkgu5aS.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.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-calendar.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-form.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.d.ts +11 -0
- package/dist/components/sd-key-value-table.js +1 -0
- 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-button-v2.d.ts → sd-popup.d.ts} +4 -4
- package/dist/components/sd-popup.js +1 -0
- 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/index.esm.js +1 -1
- package/dist/design-system/p-02289728.entry.js +1 -0
- package/dist/design-system/p-17d66d85.entry.js +1 -0
- package/dist/design-system/p-18466728.entry.js +1 -0
- package/dist/design-system/p-1bb86d69.entry.js +1 -0
- package/dist/design-system/p-20a50702.entry.js +1 -0
- package/dist/design-system/p-21874054.entry.js +1 -0
- package/dist/design-system/p-282cbefa.entry.js +1 -0
- package/dist/design-system/p-29ed11e5.entry.js +1 -0
- package/dist/design-system/p-328fae12.entry.js +1 -0
- package/dist/design-system/p-35dce399.entry.js +1 -0
- package/dist/design-system/{p-1cf87e87.entry.js → p-39ff56b4.entry.js} +1 -1
- package/dist/design-system/p-3cb712a6.entry.js +1 -0
- package/dist/design-system/{p-f522c91d.entry.js → p-4e2953eb.entry.js} +1 -1
- package/dist/design-system/p-7610153d.entry.js +1 -0
- package/dist/design-system/{p-25a08e98.entry.js → p-7722ddeb.entry.js} +1 -1
- package/dist/design-system/{p-6bfe3612.entry.js → p-7882e388.entry.js} +1 -1
- package/dist/design-system/p-7bfa0cf9.entry.js +1 -0
- package/dist/design-system/p-824ecfb5.entry.js +1 -0
- package/dist/design-system/p-9a04b341.entry.js +1 -0
- package/dist/design-system/p-BDjErF_K.js +1 -0
- package/dist/design-system/p-BQ6at17Y.js +1 -0
- package/dist/design-system/p-CGQWERwE.js +1 -0
- package/dist/design-system/p-CLCoul8o.js +2 -0
- package/dist/design-system/{p-BxPyZJaz.js → p-Ce0cmS4R.js} +1 -1
- package/dist/design-system/p-CxOCk_ge.js +1 -0
- package/dist/design-system/{p-DnCBBIoq.js → p-Dmf0PYdM.js} +1 -1
- package/dist/design-system/p-GBlVDmy4.js +1 -0
- package/dist/design-system/{p-455dccf5.entry.js → p-a7a0ca14.entry.js} +1 -1
- package/dist/design-system/{p-f44786a9.entry.js → p-a942dfbe.entry.js} +1 -1
- package/dist/design-system/p-b04b22c6.entry.js +1 -0
- package/dist/design-system/p-b1bb0d72.entry.js +1 -0
- package/dist/design-system/{p-ead3e688.entry.js → p-b6ca4461.entry.js} +1 -1
- package/dist/design-system/p-b96c694c.entry.js +1 -0
- package/dist/design-system/p-baed13e4.entry.js +1 -0
- package/dist/design-system/{p-045bc426.entry.js → p-bd45e65d.entry.js} +1 -1
- package/dist/design-system/p-bf4156d8.entry.js +1 -0
- package/dist/design-system/{p-e5cebccd.entry.js → p-c0f60b00.entry.js} +1 -1
- package/dist/design-system/p-c228c2c7.entry.js +1 -0
- package/dist/design-system/p-cbda9194.entry.js +1 -0
- package/dist/design-system/{p-fe9cef6a.entry.js → p-cd8e4dd6.entry.js} +1 -1
- package/dist/design-system/p-cf382479.entry.js +1 -0
- package/dist/design-system/p-d0de34fd.entry.js +1 -0
- package/dist/design-system/p-d78fbe16.entry.js +1 -0
- package/dist/design-system/p-e1c0a3c9.entry.js +1 -0
- package/dist/design-system/{p-797517b5.entry.js → p-f3cfff78.entry.js} +1 -1
- package/dist/design-system/{p-3f7bc660.entry.js → p-f5576a0d.entry.js} +1 -1
- package/dist/design-system/p-f60cc7be.entry.js +1 -0
- package/dist/design-system/{p-33bc3176.entry.js → p-feeb0cc5.entry.js} +1 -1
- package/dist/esm/component.table-BQ6at17Y.js +54 -0
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Cnwbjz1F.js → index-CLCoul8o.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{resolveColor-BxPyZJaz.js → resolveColor-Ce0cmS4R.js} +2 -2
- package/dist/esm/sd-action-modal.entry.js +3 -3
- package/dist/esm/sd-badge.entry.js +2 -3
- package/dist/esm/sd-barcode-input.entry.js +3 -3
- package/dist/esm/{sd-button-v2.config-CV4xelxV.js → sd-button.config-BDjErF_K.js} +88 -3
- package/dist/esm/{sd-button-v2_2.entry.js → sd-button_2.entry.js} +101 -85
- package/dist/esm/sd-calendar.entry.js +15 -15
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +4 -4
- package/dist/esm/sd-chip.entry.js +2 -2
- package/dist/esm/sd-circle-progress.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +19 -11
- package/dist/esm/sd-date-box.entry.js +4 -4
- package/dist/esm/{sd-date-picker-calendar.entry.js → sd-date-picker-calendar_2.entry.js} +51 -4
- package/dist/esm/{sd-date-picker.config-C2fDbE9d.js → sd-date-picker.config-B6cqMQaM.js} +1 -2
- package/dist/esm/sd-date-picker_7.entry.js +1222 -0
- package/dist/esm/sd-date-range-picker-calendar.entry.js +3 -3
- package/dist/esm/sd-dropdown-button.entry.js +15 -14
- package/dist/esm/{sd-button_4.entry.js → sd-field_3.entry.js} +27 -82
- package/dist/esm/sd-form.entry.js +2 -2
- package/dist/esm/sd-ghost-button.entry.js +12 -10
- package/dist/esm/sd-guide.entry.js +9 -9
- package/dist/esm/sd-key-value-table.entry.js +228 -0
- package/dist/esm/sd-linear-progress.entry.js +3 -3
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/{sd-pagination_5.entry.js → sd-pagination_4.entry.js} +35 -296
- package/dist/esm/sd-popover.entry.js +17 -10
- package/dist/esm/sd-popup.entry.js +110 -0
- package/dist/esm/sd-portal.entry.js +2 -2
- package/dist/esm/sd-radio-button.entry.js +4 -4
- package/dist/esm/sd-radio.entry.js +2 -2
- package/dist/esm/sd-select-list-item_2.entry.js +152 -0
- package/dist/esm/sd-select.config-CxOCk_ge.js +165 -0
- package/dist/esm/{sd-select-list-item_4.entry.js → sd-select_3.entry.js} +271 -302
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/{sd-table.config-Bj-EEo7N.js → sd-table.config-0Te8GLCI.js} +4 -44
- package/dist/esm/sd-table.entry.js +40 -23
- package/dist/esm/sd-tabs.entry.js +2 -2
- package/dist/esm/sd-tag.entry.js +49 -14
- package/dist/esm/sd-td.entry.js +2 -2
- package/dist/esm/sd-text-link.entry.js +8 -5
- package/dist/esm/sd-toast-container.entry.js +5 -5
- package/dist/esm/sd-toast.entry.js +35 -5
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{system-CZ4ltUOw.js → system-GBlVDmy4.js} +4 -2
- package/dist/esm/{tooltipArrow-D8sr81Xw.js → tooltipArrow-Bc-yw2nt.js} +1 -1
- package/dist/types/components/assets/CheckboxCheck.d.ts +1 -0
- package/dist/types/components/assets/CheckboxIndeterminate.d.ts +1 -0
- package/dist/types/components/assets/index.d.ts +2 -0
- package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +2 -2
- package/dist/types/components/sd-badge/sd-badge.d.ts +0 -1
- package/dist/types/components/{sd-button-v2/sd-button-v2.config.d.ts → sd-button/sd-button.config.d.ts} +9 -15
- package/dist/types/components/sd-button/sd-button.d.ts +11 -13
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +3 -3
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +2 -1
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +3 -3
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
- package/dist/types/components/sd-field/sd-field.d.ts +1 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +105 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +38 -0
- package/dist/types/components/sd-loading-modal/sd-loading-modal.config.d.ts +2 -2
- package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
- package/dist/types/components/sd-popover/sd-popover.d.ts +16 -10
- package/dist/types/components/sd-popup/sd-popup.config.d.ts +30 -0
- package/dist/types/components/sd-popup/sd-popup.d.ts +11 -0
- package/dist/types/components/sd-table/sd-table.d.ts +2 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +2 -0
- package/dist/types/components/sd-tag/sd-tag.d.ts +1 -0
- package/dist/types/components/sd-toast/sd-toast.config.d.ts +5 -1
- package/dist/types/components/sd-toast/sd-toast.d.ts +2 -0
- package/dist/types/components/sd-toast-container/sd-toast-container.config.d.ts +2 -0
- package/dist/types/components/sd-tooltip/sd-tooltip.config.d.ts +2 -13
- package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +6 -4
- package/dist/types/components.d.ts +237 -184
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/form.d.ts +1 -1
- package/dist/types/types/global.d.ts +14 -13
- package/dist/types/utils/toast.d.ts +1 -1
- package/hydrate/index.js +5182 -4738
- package/hydrate/index.mjs +5182 -4738
- package/package.json +111 -97
- package/readme.md +13 -7
- package/dist/cjs/component.button-cqV-iCG5.js +0 -90
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +0 -51
- package/dist/cjs/sd-date-picker.cjs.entry.js +0 -117
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +0 -123
- package/dist/cjs/sd-file-picker.cjs.entry.js +0 -244
- package/dist/cjs/sd-input.cjs.entry.js +0 -175
- package/dist/cjs/sd-number-input.cjs.entry.js +0 -409
- package/dist/cjs/sd-radio-group.cjs.entry.js +0 -46
- package/dist/cjs/sd-table.config-Cb0Ot3C6.js +0 -105
- package/dist/cjs/sd-textarea.cjs.entry.js +0 -146
- package/dist/collection/components/sd-button-v2/sd-button-v2.css +0 -125
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +0 -273
- package/dist/components/p-B1XBwjCW.js +0 -1
- package/dist/components/p-B8jXOXtJ.js +0 -1
- package/dist/components/p-BE6TxbtX.js +0 -1
- package/dist/components/p-BcMNA89i.js +0 -1
- package/dist/components/p-BheX6lAy.js +0 -1
- package/dist/components/p-BmYM7-4v.js +0 -1
- package/dist/components/p-BppjYHF6.js +0 -1
- package/dist/components/p-BwWDMpJc.js +0 -1
- package/dist/components/p-C-kw2p2a.js +0 -1
- package/dist/components/p-C5qZtNLl.js +0 -1
- package/dist/components/p-C7DajKYn.js +0 -1
- package/dist/components/p-CZ4ltUOw.js +0 -1
- package/dist/components/p-D3gjBBCU.js +0 -1
- package/dist/components/p-DC-6inj0.js +0 -1
- package/dist/components/p-DRF0He-x.js +0 -1
- package/dist/components/p-Dey-lS6x.js +0 -1
- package/dist/components/p-DfH_fO01.js +0 -1
- package/dist/components/p-DngV3MT1.js +0 -1
- package/dist/components/p-EbjZr2OA.js +0 -1
- package/dist/components/p-LwWOleLJ.js +0 -1
- package/dist/components/p-ZMpCZhXP.js +0 -1
- package/dist/components/p-dNJIFthT.js +0 -1
- package/dist/components/p-xnLvZ-xn.js +0 -1
- package/dist/components/sd-button-v2.js +0 -1
- package/dist/design-system/p-0356c195.entry.js +0 -1
- package/dist/design-system/p-12dfd239.entry.js +0 -1
- package/dist/design-system/p-16d3a485.entry.js +0 -1
- package/dist/design-system/p-1706ed6f.entry.js +0 -1
- package/dist/design-system/p-182548f7.entry.js +0 -1
- package/dist/design-system/p-1a79edce.entry.js +0 -1
- package/dist/design-system/p-2812b9ce.entry.js +0 -1
- package/dist/design-system/p-38f661ea.entry.js +0 -1
- package/dist/design-system/p-429dab5c.entry.js +0 -1
- package/dist/design-system/p-59313838.entry.js +0 -1
- package/dist/design-system/p-6af01ab0.entry.js +0 -1
- package/dist/design-system/p-70d4903f.entry.js +0 -1
- package/dist/design-system/p-767e99f9.entry.js +0 -1
- package/dist/design-system/p-7c370335.entry.js +0 -1
- package/dist/design-system/p-7fe8be6a.entry.js +0 -1
- package/dist/design-system/p-83b262dc.entry.js +0 -1
- package/dist/design-system/p-881adaa5.entry.js +0 -1
- package/dist/design-system/p-88d7303c.entry.js +0 -1
- package/dist/design-system/p-8a601e0f.entry.js +0 -1
- package/dist/design-system/p-B1XBwjCW.js +0 -1
- package/dist/design-system/p-BsrEibf7.js +0 -1
- package/dist/design-system/p-C5qZtNLl.js +0 -1
- package/dist/design-system/p-CZ4ltUOw.js +0 -1
- package/dist/design-system/p-Cnwbjz1F.js +0 -2
- package/dist/design-system/p-a82be987.entry.js +0 -1
- package/dist/design-system/p-b917c82a.entry.js +0 -1
- package/dist/design-system/p-b9f00eef.entry.js +0 -1
- package/dist/design-system/p-bcb53788.entry.js +0 -1
- package/dist/design-system/p-c24344ac.entry.js +0 -1
- package/dist/design-system/p-d76192bd.entry.js +0 -1
- package/dist/design-system/p-d9d8c51b.entry.js +0 -1
- package/dist/design-system/p-de67937d.entry.js +0 -1
- package/dist/design-system/p-ea5e6c2c.entry.js +0 -1
- package/dist/design-system/p-eeb1cac2.entry.js +0 -1
- package/dist/design-system/p-f1a74359.entry.js +0 -1
- package/dist/design-system/p-f69c7539.entry.js +0 -1
- package/dist/esm/component.button-B1XBwjCW.js +0 -88
- package/dist/esm/sd-date-picker-trigger.entry.js +0 -49
- package/dist/esm/sd-date-picker.entry.js +0 -115
- package/dist/esm/sd-date-range-picker.entry.js +0 -121
- package/dist/esm/sd-file-picker.entry.js +0 -242
- package/dist/esm/sd-input.entry.js +0 -173
- package/dist/esm/sd-number-input.entry.js +0 -407
- package/dist/esm/sd-radio-group.entry.js +0 -44
- package/dist/esm/sd-textarea.entry.js +0 -144
- package/dist/types/components/sd-button-v2/sd-button-v2.d.ts +0 -19
- /package/dist/components/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
- /package/dist/design-system/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Cnwbjz1F.js';
|
|
2
|
-
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
|
-
import { D as DATEPICKER_COLORS, a as DATEPICKER_SIZE_MAP } from './sd-date-picker.config-C2fDbE9d.js';
|
|
4
|
-
|
|
5
|
-
const sdDatePickerCss = () => `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%}`;
|
|
6
|
-
|
|
7
|
-
const SdDatePicker = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.update = createEvent(this, "sdUpdate", 7);
|
|
11
|
-
this.viewChange = createEvent(this, "sdViewChange", 7);
|
|
12
|
-
}
|
|
13
|
-
static CLOSE_ANIMATION_DURATION = 150;
|
|
14
|
-
get el() { return getElement(this); }
|
|
15
|
-
value = null;
|
|
16
|
-
size = 'sm';
|
|
17
|
-
placeholder = 'YYYY-MM-DD';
|
|
18
|
-
selectable;
|
|
19
|
-
disabled = false;
|
|
20
|
-
width = '';
|
|
21
|
-
// sd-field 공통 props
|
|
22
|
-
label = '';
|
|
23
|
-
labelWidth = '';
|
|
24
|
-
addonLabel = '';
|
|
25
|
-
addonAlign = 'start';
|
|
26
|
-
hint = '';
|
|
27
|
-
errorMessage = '';
|
|
28
|
-
rules = [];
|
|
29
|
-
error = false;
|
|
30
|
-
icon = undefined;
|
|
31
|
-
labelTooltip = '';
|
|
32
|
-
labelTooltipProps = null;
|
|
33
|
-
isOpen = false;
|
|
34
|
-
isAnimatingOut = false;
|
|
35
|
-
focused = false;
|
|
36
|
-
hovered = false;
|
|
37
|
-
update;
|
|
38
|
-
viewChange;
|
|
39
|
-
triggerRef;
|
|
40
|
-
formField;
|
|
41
|
-
closeAnimationTimer;
|
|
42
|
-
name = nanoid();
|
|
43
|
-
watchIsOpen(newValue) {
|
|
44
|
-
this.focused = newValue;
|
|
45
|
-
}
|
|
46
|
-
async sdValidate() {
|
|
47
|
-
return this.formField?.sdValidate();
|
|
48
|
-
}
|
|
49
|
-
async sdReset() {
|
|
50
|
-
return this.formField?.sdReset();
|
|
51
|
-
}
|
|
52
|
-
async sdResetValidate() {
|
|
53
|
-
return this.formField?.sdResetValidation();
|
|
54
|
-
}
|
|
55
|
-
closeDropdown() {
|
|
56
|
-
if (!this.isOpen)
|
|
57
|
-
return;
|
|
58
|
-
this.isOpen = false;
|
|
59
|
-
this.isAnimatingOut = true;
|
|
60
|
-
if (this.closeAnimationTimer)
|
|
61
|
-
clearTimeout(this.closeAnimationTimer);
|
|
62
|
-
this.closeAnimationTimer = setTimeout(() => {
|
|
63
|
-
this.isAnimatingOut = false;
|
|
64
|
-
}, SdDatePicker.CLOSE_ANIMATION_DURATION);
|
|
65
|
-
}
|
|
66
|
-
handleTriggerClick = () => {
|
|
67
|
-
if (this.disabled)
|
|
68
|
-
return;
|
|
69
|
-
if (this.isOpen) {
|
|
70
|
-
this.closeDropdown();
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
if (this.closeAnimationTimer)
|
|
74
|
-
clearTimeout(this.closeAnimationTimer);
|
|
75
|
-
this.isAnimatingOut = false;
|
|
76
|
-
this.isOpen = true;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
handleSelect = (e) => {
|
|
80
|
-
this.closeDropdown();
|
|
81
|
-
this.value = e.detail;
|
|
82
|
-
const nextValue = this.value;
|
|
83
|
-
requestAnimationFrame(() => {
|
|
84
|
-
this.update.emit(nextValue);
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
handleViewChange = (e) => {
|
|
88
|
-
this.viewChange.emit(e.detail);
|
|
89
|
-
};
|
|
90
|
-
disconnectedCallback() {
|
|
91
|
-
if (this.closeAnimationTimer)
|
|
92
|
-
clearTimeout(this.closeAnimationTimer);
|
|
93
|
-
}
|
|
94
|
-
render() {
|
|
95
|
-
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.md;
|
|
96
|
-
const cssVars = {
|
|
97
|
-
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
98
|
-
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
99
|
-
'--sd-system-color-field-border-default': DATEPICKER_COLORS.border.default,
|
|
100
|
-
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
101
|
-
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
102
|
-
};
|
|
103
|
-
return (h("sd-field", { key: 'd55b2123cc862d5f12fdd429b02b622946b58cc4', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '79e47e4e02e8b30dc2651a9c4aab3950a8662f52', class: "sd-date-picker", ref: el => {
|
|
104
|
-
this.triggerRef = el;
|
|
105
|
-
} }, h("sd-date-picker-trigger", { key: '7b09873b1e58aed36d4fb0dadb02d21ea6c2b309', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: 'fd60a9df30dfc459798a8e537acdf16ed9f94844', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-picker-calendar", { key: '0478f726cb51fe533b829f3eb0ce46d2fbf0ba94', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
106
|
-
}
|
|
107
|
-
static get watchers() { return {
|
|
108
|
-
"isOpen": [{
|
|
109
|
-
"watchIsOpen": 0
|
|
110
|
-
}]
|
|
111
|
-
}; }
|
|
112
|
-
};
|
|
113
|
-
SdDatePicker.style = sdDatePickerCss();
|
|
114
|
-
|
|
115
|
-
export { SdDatePicker as sd_date_picker };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Cnwbjz1F.js';
|
|
2
|
-
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
|
-
import { D as DATEPICKER_COLORS, a as DATEPICKER_SIZE_MAP } from './sd-date-picker.config-C2fDbE9d.js';
|
|
4
|
-
|
|
5
|
-
const sdDateRangePickerCss = () => `sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}`;
|
|
6
|
-
|
|
7
|
-
const SdDateRangePicker = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.update = createEvent(this, "sdUpdate", 7);
|
|
11
|
-
this.viewChange = createEvent(this, "sdViewChange", 7);
|
|
12
|
-
}
|
|
13
|
-
static CLOSE_ANIMATION_DURATION = 150;
|
|
14
|
-
get el() { return getElement(this); }
|
|
15
|
-
value = null;
|
|
16
|
-
size = 'sm';
|
|
17
|
-
placeholder = 'YYYY-MM-DD ~ YYYY-MM-DD';
|
|
18
|
-
selectable;
|
|
19
|
-
maxRange;
|
|
20
|
-
disabled = false;
|
|
21
|
-
width = '';
|
|
22
|
-
// sd-field 공통 props
|
|
23
|
-
label = '';
|
|
24
|
-
labelWidth = '';
|
|
25
|
-
addonLabel = '';
|
|
26
|
-
addonAlign = 'start';
|
|
27
|
-
hint = '';
|
|
28
|
-
errorMessage = '';
|
|
29
|
-
rules = [];
|
|
30
|
-
error = false;
|
|
31
|
-
icon = undefined;
|
|
32
|
-
labelTooltip = '';
|
|
33
|
-
labelTooltipProps = null;
|
|
34
|
-
isOpen = false;
|
|
35
|
-
isAnimatingOut = false;
|
|
36
|
-
focused = false;
|
|
37
|
-
hovered = false;
|
|
38
|
-
update;
|
|
39
|
-
viewChange;
|
|
40
|
-
triggerRef;
|
|
41
|
-
formField;
|
|
42
|
-
closeAnimationTimer;
|
|
43
|
-
name = nanoid();
|
|
44
|
-
watchIsOpen(newValue) {
|
|
45
|
-
this.focused = newValue;
|
|
46
|
-
}
|
|
47
|
-
async sdValidate() {
|
|
48
|
-
return this.formField?.sdValidate();
|
|
49
|
-
}
|
|
50
|
-
async sdReset() {
|
|
51
|
-
return this.formField?.sdReset();
|
|
52
|
-
}
|
|
53
|
-
async sdResetValidate() {
|
|
54
|
-
return this.formField?.sdResetValidation();
|
|
55
|
-
}
|
|
56
|
-
closeDropdown() {
|
|
57
|
-
if (!this.isOpen)
|
|
58
|
-
return;
|
|
59
|
-
this.isOpen = false;
|
|
60
|
-
this.isAnimatingOut = true;
|
|
61
|
-
if (this.closeAnimationTimer)
|
|
62
|
-
clearTimeout(this.closeAnimationTimer);
|
|
63
|
-
this.closeAnimationTimer = setTimeout(() => {
|
|
64
|
-
this.isAnimatingOut = false;
|
|
65
|
-
}, SdDateRangePicker.CLOSE_ANIMATION_DURATION);
|
|
66
|
-
}
|
|
67
|
-
handleTriggerClick = () => {
|
|
68
|
-
if (this.disabled)
|
|
69
|
-
return;
|
|
70
|
-
if (this.isOpen) {
|
|
71
|
-
this.closeDropdown();
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
if (this.closeAnimationTimer)
|
|
75
|
-
clearTimeout(this.closeAnimationTimer);
|
|
76
|
-
this.isAnimatingOut = false;
|
|
77
|
-
this.isOpen = true;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
handleSelect = (e) => {
|
|
81
|
-
this.closeDropdown();
|
|
82
|
-
this.value = e.detail;
|
|
83
|
-
const nextValue = this.value;
|
|
84
|
-
requestAnimationFrame(() => {
|
|
85
|
-
this.update.emit(nextValue);
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
handleViewChange = (e) => {
|
|
89
|
-
this.viewChange.emit(e.detail);
|
|
90
|
-
};
|
|
91
|
-
get displayText() {
|
|
92
|
-
if (!this.value || !this.value[0] || !this.value[1])
|
|
93
|
-
return '';
|
|
94
|
-
return `${this.value[0]} ~ ${this.value[1]}`;
|
|
95
|
-
}
|
|
96
|
-
disconnectedCallback() {
|
|
97
|
-
if (this.closeAnimationTimer)
|
|
98
|
-
clearTimeout(this.closeAnimationTimer);
|
|
99
|
-
}
|
|
100
|
-
render() {
|
|
101
|
-
const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.md;
|
|
102
|
-
const cssVars = {
|
|
103
|
-
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
104
|
-
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
105
|
-
'--sd-system-color-field-border-default': DATEPICKER_COLORS.border.default,
|
|
106
|
-
'--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
|
|
107
|
-
'--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
|
|
108
|
-
};
|
|
109
|
-
return (h("sd-field", { key: '221d930a7243334d00b281724d3c204159e721a4', 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: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '6bc1723f00169bb31cc1a153824fc8bbea6caf98', class: "sd-date-range-picker", ref: el => {
|
|
110
|
-
this.triggerRef = el;
|
|
111
|
-
} }, h("sd-date-picker-trigger", { key: 'd1805fe995410ecfce8ca7854cfac5055474d44a', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '22f42d9941e315d598233939a010034138e5bcbb', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-range-picker-calendar", { key: '192a66291e9f318c4bba267b98a427fd0819b1be', value: this.value, selectable: this.selectable, maxRange: this.maxRange, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
|
|
112
|
-
}
|
|
113
|
-
static get watchers() { return {
|
|
114
|
-
"isOpen": [{
|
|
115
|
-
"watchIsOpen": 0
|
|
116
|
-
}]
|
|
117
|
-
}; }
|
|
118
|
-
};
|
|
119
|
-
SdDateRangePicker.style = sdDateRangePickerCss();
|
|
120
|
-
|
|
121
|
-
export { SdDateRangePicker as sd_date_range_picker };
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Cnwbjz1F.js';
|
|
2
|
-
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
|
-
|
|
4
|
-
const filepicker = {
|
|
5
|
-
height: "28",
|
|
6
|
-
paddingX: "12",
|
|
7
|
-
gap: "8",
|
|
8
|
-
radius: "4",
|
|
9
|
-
typography: {
|
|
10
|
-
fontWeight: "400",
|
|
11
|
-
fontSize: "12",
|
|
12
|
-
lineHeight: "20"},
|
|
13
|
-
size: {
|
|
14
|
-
icon: "16"
|
|
15
|
-
},
|
|
16
|
-
text: {
|
|
17
|
-
"default": "#222222",
|
|
18
|
-
placeholder: "#AAAAAA",
|
|
19
|
-
disabled: "#888888"
|
|
20
|
-
},
|
|
21
|
-
icon: {
|
|
22
|
-
disabled: "#BBBBBB"
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
var filePickerTokens = {
|
|
26
|
-
filepicker: filepicker
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const fp = filePickerTokens.filepicker;
|
|
30
|
-
const FILE_PICKER_LAYOUT = {
|
|
31
|
-
height: fp.height,
|
|
32
|
-
paddingX: fp.paddingX,
|
|
33
|
-
gap: fp.gap,
|
|
34
|
-
radius: fp.radius,
|
|
35
|
-
fontSize: fp.typography.fontSize,
|
|
36
|
-
lineHeight: fp.typography.lineHeight,
|
|
37
|
-
fontWeight: fp.typography.fontWeight,
|
|
38
|
-
iconSize: fp.size.icon};
|
|
39
|
-
const FILE_PICKER_COLORS = {
|
|
40
|
-
text: fp.text,
|
|
41
|
-
icon: {
|
|
42
|
-
default: '#888888', // TODO: 토큰 반영 후 교체
|
|
43
|
-
disabled: fp.icon.disabled,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const sdFilePickerCss = () => `sd-file-picker{display:inline-flex;width:100%}.sd-file-picker__content{width:100%;height:100%;display:flex;align-items:center;padding:0 var(--sd-file-picker-padding-x);gap:var(--sd-file-picker-gap);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;vertical-align:middle}.sd-file-picker__text{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--sd-file-picker-font-weight);font-size:var(--sd-file-picker-font-size);line-height:var(--sd-file-picker-line-height);color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker__text--placeholder{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker__icon{flex-shrink:0}.sd-file-picker__clear-icon{flex-shrink:0;cursor:pointer;transition:opacity 0.2s ease}.sd-file-picker__clear-icon:hover{opacity:0.7}.sd-file-picker__input{display:none}.sd-file-picker__tooltip{position:absolute;top:calc(100% - 4px);left:50%;transform:translate(-50%);z-index:998;white-space:nowrap;padding:8px 12px;background:rgba(0, 0, 0, 0.8);color:white;font-size:12px;line-height:18px;border-radius:4px;pointer-events:none}.sd-field--disabled .sd-file-picker__content{cursor:not-allowed}.sd-field--disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}.sd-file-picker--inline .sd-file-picker__content{border:none;background-color:transparent;padding:0;height:auto}.sd-file-picker--inline .sd-file-picker__text{color:var(--sd-file-picker-placeholder-color)}.sd-file-picker--inline:hover:not(.sd-file-picker--inline-disabled) .sd-file-picker__text{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline .sd-file-picker__text--active{color:var(--sd-file-picker-text-color)}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__content{cursor:not-allowed}.sd-file-picker--inline.sd-file-picker--inline-disabled .sd-file-picker__text{color:var(--sd-file-picker-disabled-color)}`;
|
|
48
|
-
|
|
49
|
-
const SdFilePicker = class {
|
|
50
|
-
constructor(hostRef) {
|
|
51
|
-
registerInstance(this, hostRef);
|
|
52
|
-
this.update = createEvent(this, "sdUpdate", 7);
|
|
53
|
-
this.reject = createEvent(this, "sdReject", 7);
|
|
54
|
-
}
|
|
55
|
-
get el() { return getElement(this); }
|
|
56
|
-
value = null;
|
|
57
|
-
placeholder = 'Click to upload';
|
|
58
|
-
disabled = false;
|
|
59
|
-
inline = false;
|
|
60
|
-
multiple = false;
|
|
61
|
-
accept;
|
|
62
|
-
maxFileSize;
|
|
63
|
-
maxTotalSize;
|
|
64
|
-
maxFiles;
|
|
65
|
-
// sd-field 패스스루 props
|
|
66
|
-
name = nanoid();
|
|
67
|
-
label = '';
|
|
68
|
-
labelWidth = '';
|
|
69
|
-
addonLabel = '';
|
|
70
|
-
addonAlign = 'start';
|
|
71
|
-
hint = '';
|
|
72
|
-
errorMessage = '';
|
|
73
|
-
width = '';
|
|
74
|
-
rules;
|
|
75
|
-
error = false;
|
|
76
|
-
status;
|
|
77
|
-
icon = undefined;
|
|
78
|
-
labelTooltip = '';
|
|
79
|
-
labelTooltipProps = null;
|
|
80
|
-
focused = false;
|
|
81
|
-
hovered = false;
|
|
82
|
-
internalValue = null;
|
|
83
|
-
showTooltip = false;
|
|
84
|
-
fileInputRef;
|
|
85
|
-
fileNamesRef;
|
|
86
|
-
formField;
|
|
87
|
-
update;
|
|
88
|
-
reject;
|
|
89
|
-
valueChanged(newValue) {
|
|
90
|
-
this.internalValue = newValue;
|
|
91
|
-
}
|
|
92
|
-
componentDidLoad() {
|
|
93
|
-
this.checkOverflow();
|
|
94
|
-
}
|
|
95
|
-
componentDidUpdate() {
|
|
96
|
-
this.checkOverflow();
|
|
97
|
-
}
|
|
98
|
-
async sdValidate() {
|
|
99
|
-
return this.formField?.sdValidate() ?? Promise.resolve(true);
|
|
100
|
-
}
|
|
101
|
-
async sdReset() {
|
|
102
|
-
const clearedValue = this.multiple ? [] : null;
|
|
103
|
-
this.value = clearedValue;
|
|
104
|
-
this.internalValue = clearedValue;
|
|
105
|
-
if (this.fileInputRef) {
|
|
106
|
-
this.fileInputRef.value = '';
|
|
107
|
-
}
|
|
108
|
-
await this.formField?.sdResetValidation();
|
|
109
|
-
}
|
|
110
|
-
async sdResetValidate() {
|
|
111
|
-
await this.formField?.sdResetValidation();
|
|
112
|
-
}
|
|
113
|
-
toBytes(value) {
|
|
114
|
-
if (value == null)
|
|
115
|
-
return undefined;
|
|
116
|
-
return typeof value === 'string' ? Number(value) : value;
|
|
117
|
-
}
|
|
118
|
-
validateFiles(files) {
|
|
119
|
-
const maxFileSize = this.toBytes(this.maxFileSize);
|
|
120
|
-
const maxTotalSize = this.toBytes(this.maxTotalSize);
|
|
121
|
-
const maxFiles = this.maxFiles != null ? Number(this.maxFiles) : undefined;
|
|
122
|
-
if (maxFiles != null && files.length > maxFiles) {
|
|
123
|
-
return { accepted: [], rejected: files, reason: 'max-files' };
|
|
124
|
-
}
|
|
125
|
-
if (maxFileSize != null) {
|
|
126
|
-
const oversized = files.filter(f => f.size > maxFileSize);
|
|
127
|
-
if (oversized.length > 0) {
|
|
128
|
-
return { accepted: [], rejected: oversized, reason: 'max-file-size' };
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (maxTotalSize != null) {
|
|
132
|
-
const totalSize = files.reduce((sum, f) => sum + f.size, 0);
|
|
133
|
-
if (totalSize > maxTotalSize) {
|
|
134
|
-
return { accepted: [], rejected: files, reason: 'max-total-size' };
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return { accepted: files, rejected: [] };
|
|
138
|
-
}
|
|
139
|
-
handleFileChange = (event) => {
|
|
140
|
-
const input = event.target;
|
|
141
|
-
const files = input.files;
|
|
142
|
-
if (!files || files.length === 0) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
const fileArray = Array.from(files);
|
|
146
|
-
const { accepted, rejected, reason } = this.validateFiles(fileArray);
|
|
147
|
-
if (reason) {
|
|
148
|
-
this.reject?.emit({ files: rejected, reason });
|
|
149
|
-
if (this.fileInputRef) {
|
|
150
|
-
this.fileInputRef.value = '';
|
|
151
|
-
}
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
if (this.multiple) {
|
|
155
|
-
this.internalValue = accepted;
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
this.internalValue = accepted[0];
|
|
159
|
-
}
|
|
160
|
-
this.value = this.internalValue;
|
|
161
|
-
this.update?.emit(this.value);
|
|
162
|
-
};
|
|
163
|
-
handleClear = (event) => {
|
|
164
|
-
if (this.disabled)
|
|
165
|
-
return;
|
|
166
|
-
event.stopPropagation();
|
|
167
|
-
const clearedValue = this.multiple ? [] : null;
|
|
168
|
-
this.value = clearedValue;
|
|
169
|
-
this.internalValue = clearedValue;
|
|
170
|
-
this.update?.emit(clearedValue);
|
|
171
|
-
if (this.fileInputRef) {
|
|
172
|
-
this.fileInputRef.value = '';
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
handleClick = () => {
|
|
176
|
-
if (this.disabled)
|
|
177
|
-
return;
|
|
178
|
-
this.fileInputRef?.click();
|
|
179
|
-
};
|
|
180
|
-
hasFiles() {
|
|
181
|
-
if (!this.internalValue)
|
|
182
|
-
return false;
|
|
183
|
-
if (Array.isArray(this.internalValue)) {
|
|
184
|
-
return this.internalValue.length > 0;
|
|
185
|
-
}
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
getDisplayText() {
|
|
189
|
-
if (!this.hasFiles())
|
|
190
|
-
return this.placeholder;
|
|
191
|
-
if (Array.isArray(this.internalValue)) {
|
|
192
|
-
return this.internalValue.map(f => f.name).join(', ');
|
|
193
|
-
}
|
|
194
|
-
return this.internalValue?.name || this.placeholder;
|
|
195
|
-
}
|
|
196
|
-
checkOverflow() {
|
|
197
|
-
if (!this.fileNamesRef)
|
|
198
|
-
return;
|
|
199
|
-
const isOverflowing = this.fileNamesRef.scrollWidth > this.fileNamesRef.clientWidth;
|
|
200
|
-
this.showTooltip = isOverflowing;
|
|
201
|
-
}
|
|
202
|
-
getIconColor() {
|
|
203
|
-
return this.disabled ? FILE_PICKER_COLORS.icon.disabled : FILE_PICKER_COLORS.icon.default;
|
|
204
|
-
}
|
|
205
|
-
render() {
|
|
206
|
-
const hasFiles = this.hasFiles();
|
|
207
|
-
const displayText = this.getDisplayText();
|
|
208
|
-
const cssVars = {
|
|
209
|
-
'--sd-file-picker-font-size': `${FILE_PICKER_LAYOUT.fontSize}px`,
|
|
210
|
-
'--sd-file-picker-line-height': `${FILE_PICKER_LAYOUT.lineHeight}px`,
|
|
211
|
-
'--sd-file-picker-font-weight': FILE_PICKER_LAYOUT.fontWeight,
|
|
212
|
-
'--sd-file-picker-padding-x': `${FILE_PICKER_LAYOUT.paddingX}px`,
|
|
213
|
-
'--sd-file-picker-gap': `${FILE_PICKER_LAYOUT.gap}px`,
|
|
214
|
-
'--sd-file-picker-text-color': FILE_PICKER_COLORS.text.default,
|
|
215
|
-
'--sd-file-picker-placeholder-color': FILE_PICKER_COLORS.text.placeholder,
|
|
216
|
-
'--sd-file-picker-disabled-color': FILE_PICKER_COLORS.text.disabled,
|
|
217
|
-
// sd-field 시스템 변수 override
|
|
218
|
-
'--sd-system-size-field-sm-height': `${FILE_PICKER_LAYOUT.height}px`,
|
|
219
|
-
'--sd-system-radius-field-sm': `${FILE_PICKER_LAYOUT.radius}px`,
|
|
220
|
-
};
|
|
221
|
-
const content = (h("div", { class: "sd-file-picker__content", onClick: this.handleClick }, h("input", { ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder }), h("sd-icon", { name: "attachFile", size: Number(FILE_PICKER_LAYOUT.iconSize), color: this.getIconColor(), class: "sd-file-picker__icon" }), h("div", { ref: el => (this.fileNamesRef = el), class: {
|
|
222
|
-
'sd-file-picker__text': true,
|
|
223
|
-
'sd-file-picker__text--placeholder': !hasFiles,
|
|
224
|
-
'sd-file-picker__text--active': hasFiles,
|
|
225
|
-
} }, displayText), !this.disabled && hasFiles && (h("sd-ghost-button", { icon: "close", size: "xxs", ariaLabel: "clear", disabled: this.disabled, class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (h("div", { class: "sd-file-picker__tooltip" }, displayText))));
|
|
226
|
-
if (this.inline) {
|
|
227
|
-
return (h("div", { class: {
|
|
228
|
-
'sd-file-picker--inline': true,
|
|
229
|
-
'sd-file-picker--inline-disabled': this.disabled,
|
|
230
|
-
}, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content));
|
|
231
|
-
}
|
|
232
|
-
return (h("sd-field", { 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, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
|
|
233
|
-
}
|
|
234
|
-
static get watchers() { return {
|
|
235
|
-
"value": [{
|
|
236
|
-
"valueChanged": 0
|
|
237
|
-
}]
|
|
238
|
-
}; }
|
|
239
|
-
};
|
|
240
|
-
SdFilePicker.style = sdFilePickerCss();
|
|
241
|
-
|
|
242
|
-
export { SdFilePicker as sd_file_picker };
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Cnwbjz1F.js';
|
|
2
|
-
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
|
-
import { i as inputTokens } from './component.textinput-ByhWX2NK.js';
|
|
4
|
-
|
|
5
|
-
const sm = inputTokens.textinput.sm;
|
|
6
|
-
const md = inputTokens.textinput.md;
|
|
7
|
-
const INPUT_SIZE_MAP = {
|
|
8
|
-
sm: {
|
|
9
|
-
height: sm.height,
|
|
10
|
-
paddingX: sm.paddingX,
|
|
11
|
-
gap: sm.gap,
|
|
12
|
-
radius: sm.radius,
|
|
13
|
-
fontSize: sm.typography.fontSize,
|
|
14
|
-
lineHeight: sm.typography.lineHeight,
|
|
15
|
-
fontWeight: sm.typography.fontWeight,
|
|
16
|
-
},
|
|
17
|
-
md: {
|
|
18
|
-
height: md.height,
|
|
19
|
-
paddingX: md.paddingX,
|
|
20
|
-
gap: md.gap,
|
|
21
|
-
radius: md.radius,
|
|
22
|
-
fontSize: md.typography.fontSize,
|
|
23
|
-
lineHeight: md.typography.lineHeight,
|
|
24
|
-
fontWeight: md.typography.fontWeight,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const INPUT_COLORS = {
|
|
28
|
-
text: inputTokens.textinput.text,
|
|
29
|
-
icon: inputTokens.textinput.icon,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const sdInputCss = () => `sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native[readonly]{color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}`;
|
|
33
|
-
|
|
34
|
-
const SdInput = class {
|
|
35
|
-
constructor(hostRef) {
|
|
36
|
-
registerInstance(this, hostRef);
|
|
37
|
-
this.input = createEvent(this, "sdUpdate", 7);
|
|
38
|
-
this.focus = createEvent(this, "sdFocus", 7);
|
|
39
|
-
this.blur = createEvent(this, "sdBlur", 7);
|
|
40
|
-
}
|
|
41
|
-
get host() { return getElement(this); }
|
|
42
|
-
value = null;
|
|
43
|
-
type = 'text';
|
|
44
|
-
size = 'sm';
|
|
45
|
-
addonLabel = '';
|
|
46
|
-
addonAlign = 'start';
|
|
47
|
-
placeholder = '입력해 주세요.';
|
|
48
|
-
disabled = false;
|
|
49
|
-
clearable = false;
|
|
50
|
-
width = '';
|
|
51
|
-
rules = [];
|
|
52
|
-
autoFocus = false;
|
|
53
|
-
autocomplete = '';
|
|
54
|
-
maxlength;
|
|
55
|
-
minlength;
|
|
56
|
-
inputmode;
|
|
57
|
-
enterkeyhint;
|
|
58
|
-
spellcheck = false;
|
|
59
|
-
status;
|
|
60
|
-
hint = '';
|
|
61
|
-
errorMessage = '';
|
|
62
|
-
inputClass = '';
|
|
63
|
-
readonly = false;
|
|
64
|
-
error = false;
|
|
65
|
-
focused = false;
|
|
66
|
-
hovered = false;
|
|
67
|
-
// props - label
|
|
68
|
-
label = '';
|
|
69
|
-
labelWidth = '';
|
|
70
|
-
icon = undefined;
|
|
71
|
-
labelTooltip = '';
|
|
72
|
-
labelTooltipProps = null;
|
|
73
|
-
// props - custom styles
|
|
74
|
-
inputStyle = {};
|
|
75
|
-
internalValue = null;
|
|
76
|
-
passwordVisible = false;
|
|
77
|
-
nativeEl = undefined;
|
|
78
|
-
formField;
|
|
79
|
-
name = nanoid();
|
|
80
|
-
input;
|
|
81
|
-
focus;
|
|
82
|
-
blur;
|
|
83
|
-
valueChanged(newValue) {
|
|
84
|
-
this.internalValue = newValue;
|
|
85
|
-
}
|
|
86
|
-
internalValueChanged(newValue) {
|
|
87
|
-
if (newValue !== this.value) {
|
|
88
|
-
this.value = newValue;
|
|
89
|
-
this.input?.emit(this.value);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
async sdGetNativeElement() {
|
|
93
|
-
return this.nativeEl || null;
|
|
94
|
-
}
|
|
95
|
-
async sdValidate() {
|
|
96
|
-
this.formField?.sdValidate();
|
|
97
|
-
}
|
|
98
|
-
async sdReset() {
|
|
99
|
-
this.formField?.sdReset();
|
|
100
|
-
}
|
|
101
|
-
async sdResetValidate() {
|
|
102
|
-
this.formField?.sdResetValidation();
|
|
103
|
-
}
|
|
104
|
-
async sdFocus() {
|
|
105
|
-
this.formField?.sdFocus();
|
|
106
|
-
}
|
|
107
|
-
componentWillLoad() {
|
|
108
|
-
if (this.value) {
|
|
109
|
-
this.internalValue = this.value;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
componentDidLoad() {
|
|
113
|
-
if (this.autoFocus) {
|
|
114
|
-
this.nativeEl?.focus();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
handleInput = (event) => {
|
|
118
|
-
const target = event.target;
|
|
119
|
-
this.internalValue = target.value;
|
|
120
|
-
};
|
|
121
|
-
handleFocus = async (type, event) => {
|
|
122
|
-
this.focused = type === 'focus';
|
|
123
|
-
if (type === 'blur') {
|
|
124
|
-
// Auto-validate on blur if rules exist
|
|
125
|
-
if (this.rules && this.rules.length > 0) {
|
|
126
|
-
await this.formField?.sdValidate();
|
|
127
|
-
}
|
|
128
|
-
this.blur?.emit(event);
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
this.focus?.emit(event);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
render() {
|
|
135
|
-
const sizeTokens = INPUT_SIZE_MAP[this.size] ?? INPUT_SIZE_MAP.sm;
|
|
136
|
-
const cssVars = {
|
|
137
|
-
// sd-input 자체 토큰
|
|
138
|
-
'--sd-input-font-size': `${sizeTokens.fontSize}px`,
|
|
139
|
-
'--sd-input-line-height': `${sizeTokens.lineHeight}px`,
|
|
140
|
-
'--sd-input-font-weight': sizeTokens.fontWeight,
|
|
141
|
-
'--sd-input-padding-x': `${sizeTokens.paddingX}px`,
|
|
142
|
-
'--sd-input-gap': `${sizeTokens.gap}px`,
|
|
143
|
-
'--sd-input-text-color': INPUT_COLORS.text.default,
|
|
144
|
-
'--sd-input-placeholder-color': INPUT_COLORS.text.placeholder,
|
|
145
|
-
'--sd-input-disabled-color': INPUT_COLORS.text.disabled,
|
|
146
|
-
'--sd-input-icon-color': INPUT_COLORS.icon.default,
|
|
147
|
-
// sd-field 시스템 변수 override (size별 높이/반경)
|
|
148
|
-
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
149
|
-
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
150
|
-
};
|
|
151
|
-
return (h("sd-field", { key: 'ff139feaafdaa57e012dc559ab1a0db26dfd97b0', 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, status: this.status, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("label", { key: '188f24de316b14315fa0bdf312c58140e757cfa3', class: "sd-input__content" }, h("slot", { key: '35d2213601e3c3508b7392096719d7841aebc6bb', name: "prefix" }), h("input", { key: '0148de670febb2bc02a95a3c6c4c1a6cee523626', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), h("slot", { key: '4a8bd55a4cfd25f482b1fcabb84f8ffffbbc8072', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && (h("sd-ghost-button", { key: '5c11a19971dceba378a4ea77f3f40d7b3d928214', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
152
|
-
if (this.disabled)
|
|
153
|
-
return;
|
|
154
|
-
this.internalValue = '';
|
|
155
|
-
await this.formField?.sdValidate();
|
|
156
|
-
} })), this.type === 'password' && (h("sd-ghost-button", { key: '92cb57b65e70a499c48e73f028e30715f1b1356c', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled, class: "sd-input__password-icon", onClick: () => {
|
|
157
|
-
if (this.disabled)
|
|
158
|
-
return;
|
|
159
|
-
this.passwordVisible = !this.passwordVisible;
|
|
160
|
-
} })))));
|
|
161
|
-
}
|
|
162
|
-
static get watchers() { return {
|
|
163
|
-
"value": [{
|
|
164
|
-
"valueChanged": 0
|
|
165
|
-
}],
|
|
166
|
-
"internalValue": [{
|
|
167
|
-
"internalValueChanged": 0
|
|
168
|
-
}]
|
|
169
|
-
}; }
|
|
170
|
-
};
|
|
171
|
-
SdInput.style = sdInputCss();
|
|
172
|
-
|
|
173
|
-
export { SdInput as sd_input };
|