@sellmate/design-system 0.0.55 → 1.0.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/{select-keyboard-navigation-6fO_V4En.js → base-dropdown-event-Dc6AuxR4.js} +26 -26
- package/dist/cjs/base-dropdown-event-Dc6AuxR4.js.map +1 -0
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-B7tkxTye.js → index-D_J8ScR5.js} +3 -3
- package/dist/cjs/index-D_J8ScR5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{resolveColor-DxvExwgo.js → resolveColor-B7Ku3IGq.js} +4 -5
- package/dist/{esm/resolveColor-BYf-ybt2.js.map → cjs/resolveColor-B7Ku3IGq.js.map} +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +4 -4
- package/dist/cjs/{sd-button_24.cjs.entry.js → sd-button_6.cjs.entry.js} +292 -2842
- package/dist/cjs/sd-card.cjs.entry.js +4 -4
- package/dist/cjs/sd-checkbox.cjs.entry.js +89 -0
- package/dist/cjs/sd-date-box.cjs.entry.js +10 -10
- package/dist/cjs/sd-date-picker.cjs.entry.js +5 -5
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +8 -8
- package/dist/cjs/sd-field_3.cjs.entry.js +422 -0
- package/dist/cjs/sd-file-picker.cjs.entry.js +121 -0
- package/dist/cjs/sd-form.cjs.entry.js +74 -0
- package/dist/cjs/sd-guide.cjs.entry.js +81 -0
- package/dist/cjs/sd-loading-spinner_2.cjs.entry.js +195 -0
- package/dist/cjs/sd-modal-card.cjs.entry.js +8 -8
- package/dist/cjs/sd-number-input.cjs.entry.js +261 -0
- package/dist/cjs/sd-popover.cjs.entry.js +7 -7
- package/dist/cjs/sd-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button-group.cjs.entry.js +8 -21
- package/dist/cjs/sd-radio-group.cjs.entry.js +71 -0
- package/dist/cjs/sd-select-dropdown_3.cjs.entry.js +266 -0
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +446 -0
- package/dist/cjs/sd-select-multiple.cjs.entry.js +74 -152
- package/dist/cjs/sd-select-option-group.cjs.entry.js +69 -0
- package/dist/cjs/sd-table.cjs.entry.js +515 -85
- package/dist/cjs/sd-tabs.cjs.entry.js +66 -0
- package/dist/cjs/sd-tag.cjs.entry.js +57 -0
- package/dist/cjs/sd-toast-message.cjs.entry.js +61 -0
- package/dist/cjs/sd-toggle-button.cjs.entry.js +50 -0
- package/dist/cjs/sd-toggle.cjs.entry.js +46 -0
- package/dist/cjs/{tooltipArrow-8I9A3AOE.js → tooltipArrow-DU2DB2AD.js} +3 -3
- package/dist/cjs/{tooltipArrow-8I9A3AOE.js.map → tooltipArrow-DU2DB2AD.js.map} +1 -1
- package/dist/collection/collection-manifest.json +7 -8
- package/dist/collection/components/sd-badge/sd-badge.css +8 -9
- package/dist/collection/components/sd-badge/sd-badge.js +1 -2
- package/dist/collection/components/sd-badge/sd-badge.js.map +1 -1
- package/dist/collection/components/sd-button/sd-button.css +2 -1
- package/dist/collection/components/sd-button/sd-button.js +2 -34
- package/dist/collection/components/sd-button/sd-button.js.map +1 -1
- package/dist/collection/components/sd-card/sd-card.css +1 -3
- package/dist/collection/components/sd-card/sd-card.js +6 -6
- package/dist/collection/components/sd-card/sd-card.js.map +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +16 -16
- package/dist/collection/components/sd-checkbox/sd-checkbox.js.map +1 -1
- package/dist/collection/components/sd-date-box/sd-date-box.css +1 -0
- package/dist/collection/components/sd-date-box/sd-date-box.js +8 -8
- package/dist/collection/components/sd-date-box/sd-date-box.js.map +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +5 -5
- package/dist/collection/components/sd-date-picker/sd-date-picker.js.map +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.css +9 -6
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +8 -8
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js.map +1 -1
- package/dist/collection/components/sd-field/sd-field.css +100 -0
- package/dist/collection/components/sd-field/sd-field.js +472 -0
- package/dist/collection/components/sd-field/sd-field.js.map +1 -0
- package/dist/collection/components/sd-file-picker/sd-file-picker.css +6 -0
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +8 -8
- package/dist/collection/components/sd-file-picker/sd-file-picker.js.map +1 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +103 -0
- package/dist/collection/components/{sd-tooltip-portal/sd-tooltip-portal.js → sd-floating-portal/sd-floating-portal.js} +18 -9
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js.map +1 -0
- package/dist/collection/components/sd-form/sd-form.js +200 -0
- package/dist/collection/components/sd-form/sd-form.js.map +1 -0
- package/dist/collection/components/sd-guide/sd-guide.css +3 -2
- package/dist/collection/components/sd-guide/sd-guide.js +7 -8
- package/dist/collection/components/sd-guide/sd-guide.js.map +1 -1
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.css +43 -100
- package/dist/collection/components/sd-input/sd-input.js +285 -114
- package/dist/collection/components/sd-input/sd-input.js.map +1 -1
- package/dist/collection/components/sd-modal-card/sd-modal-card.css +1 -0
- package/dist/collection/components/sd-modal-card/sd-modal-card.js +5 -5
- package/dist/collection/components/sd-modal-card/sd-modal-card.js.map +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +18 -84
- package/dist/collection/components/sd-number-input/sd-number-input.js.map +1 -1
- package/dist/collection/components/sd-pagination/sd-pagination.js +4 -3
- package/dist/collection/components/sd-pagination/sd-pagination.js.map +1 -1
- package/dist/collection/components/sd-popover/sd-popover.css +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +4 -5
- package/dist/collection/components/sd-popover/sd-popover.js.map +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +4 -4
- package/dist/collection/components/sd-portal/sd-portal.js.map +1 -1
- package/dist/collection/components/sd-radio-button-group/sd-radio-button-group.js +9 -30
- package/dist/collection/components/sd-radio-button-group/sd-radio-button-group.js.map +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +5 -5
- package/dist/collection/components/sd-radio-group/sd-radio-group.js.map +1 -1
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.css +52 -0
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +441 -0
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js.map +1 -0
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +4 -4
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js.map +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.css +11 -3
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +15 -15
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js.map +1 -1
- package/dist/collection/components/sd-select/sd-select.css +9 -97
- package/dist/collection/components/sd-select/sd-select.js +320 -219
- package/dist/collection/components/sd-select/sd-select.js.map +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.css +16 -102
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +328 -179
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js.map +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.css +8 -45
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +265 -47
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js.map +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js.map +1 -1
- package/dist/collection/components/sd-table/sd-table.css +121 -30
- package/dist/collection/components/sd-table/sd-table.js +629 -92
- package/dist/collection/components/sd-table/sd-table.js.map +1 -1
- package/dist/collection/components/sd-tabs/sd-tabs.css +10 -7
- package/dist/collection/components/sd-tabs/sd-tabs.js +10 -17
- package/dist/collection/components/sd-tabs/sd-tabs.js.map +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +1 -1
- package/dist/collection/components/sd-textarea/sd-textarea.css +66 -0
- package/dist/collection/components/sd-textarea/sd-textarea.js +400 -0
- package/dist/collection/components/sd-textarea/sd-textarea.js.map +1 -0
- package/dist/collection/components/sd-toast-message/sd-toast-message.js +11 -11
- package/dist/collection/components/sd-toast-message/sd-toast-message.js.map +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +8 -14
- package/dist/collection/components/sd-toggle/sd-toggle.js.map +1 -1
- package/dist/collection/components/sd-toggle-button/sd-toggle-button.js +5 -5
- package/dist/collection/components/sd-toggle-button/sd-toggle-button.js.map +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.css +6 -65
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +12 -29
- package/dist/collection/components/sd-tooltip/sd-tooltip.js.map +1 -1
- package/dist/collection/types/select.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-7xekTQRB.js +104 -0
- package/dist/components/p-7xekTQRB.js.map +1 -0
- package/dist/components/{p-BDkKpeVz.js → p-BKSlQGJv.js} +3 -3
- package/dist/components/{p-BDkKpeVz.js.map → p-BKSlQGJv.js.map} +1 -1
- package/dist/components/{p-njRAT-yp.js → p-CVMprLsE.js} +17 -15
- package/dist/components/p-CVMprLsE.js.map +1 -0
- package/dist/components/p-CdGD6AqM.js +92 -0
- package/dist/components/p-CdGD6AqM.js.map +1 -0
- package/dist/components/p-CpRkV7pg.js +201 -0
- package/dist/components/p-CpRkV7pg.js.map +1 -0
- package/dist/components/p-D2movWkD.js +289 -0
- package/dist/components/p-D2movWkD.js.map +1 -0
- package/dist/components/p-D54IEoI6.js +238 -0
- package/dist/components/p-D54IEoI6.js.map +1 -0
- package/dist/components/{p-D5BkkT2U.js → p-DbebUQwg.js} +7 -7
- package/dist/components/{p-D5BkkT2U.js.map → p-DbebUQwg.js.map} +1 -1
- package/dist/components/{p-BYf-ybt2.js → p-DcGvp3RM.js} +5 -5
- package/dist/components/p-DcGvp3RM.js.map +1 -0
- package/dist/components/{p-nqDJZ_gy.js → p-DdKGhMHk.js} +4 -4
- package/dist/components/{p-nqDJZ_gy.js.map → p-DdKGhMHk.js.map} +1 -1
- package/dist/components/{p-BxPT3VKO.js → p-DlJtPR_C.js} +12 -12
- package/dist/components/p-DlJtPR_C.js.map +1 -0
- package/dist/components/{p-vhe6g4Qt.js → p-DnQF6htq.js} +5 -5
- package/dist/components/{p-vhe6g4Qt.js.map → p-DnQF6htq.js.map} +1 -1
- package/dist/components/{p-BA38jFi5.js → p-DssRJcAn.js} +4 -4
- package/dist/components/{p-BA38jFi5.js.map → p-DssRJcAn.js.map} +1 -1
- package/dist/components/{p-B3H_uLbl.js → p-Dt-KAeBx.js} +3 -3
- package/dist/components/{p-B3H_uLbl.js.map → p-Dt-KAeBx.js.map} +1 -1
- package/dist/components/{p-DRGcUx0C.js → p-DxSmO6Tr.js} +8 -7
- package/dist/components/p-DxSmO6Tr.js.map +1 -0
- package/dist/components/{p-CWwMpVqI.js → p-JF61vPAh.js} +9 -9
- package/dist/components/p-JF61vPAh.js.map +1 -0
- package/dist/components/p-RhBqdixM.js +102 -0
- package/dist/components/p-RhBqdixM.js.map +1 -0
- package/dist/components/{p-CKhzpdPk.js → p-UZEmuyIR.js} +19 -19
- package/dist/components/p-UZEmuyIR.js.map +1 -0
- package/dist/components/{p-CQBrru3e.js → p-YLoygqPr.js} +3 -3
- package/dist/components/p-YLoygqPr.js.map +1 -0
- package/dist/components/p-s4Mg_xSz.js +260 -0
- package/dist/components/p-s4Mg_xSz.js.map +1 -0
- package/dist/components/{p-MRYVk6Qh.js → p-zvZtN3nR.js} +8 -8
- package/dist/components/{p-MRYVk6Qh.js.map → p-zvZtN3nR.js.map} +1 -1
- package/dist/components/sd-badge.js +5 -5
- package/dist/components/sd-badge.js.map +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-card.js +5 -5
- package/dist/components/sd-card.js.map +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker.js +37 -13
- package/dist/components/sd-date-picker.js.map +1 -1
- package/dist/components/sd-date-range-picker.js +41 -17
- package/dist/components/sd-date-range-picker.js.map +1 -1
- package/dist/components/{sd-td.d.ts → sd-field.d.ts} +4 -4
- package/dist/components/sd-field.js +9 -0
- package/dist/components/sd-field.js.map +1 -0
- package/dist/components/sd-file-picker.js +10 -10
- package/dist/components/sd-file-picker.js.map +1 -1
- package/dist/components/{sd-table-backup.d.ts → sd-floating-portal.d.ts} +4 -4
- package/dist/components/sd-floating-portal.js +9 -0
- package/dist/components/sd-floating-portal.js.map +1 -0
- package/dist/components/{sd-th.d.ts → sd-form.d.ts} +4 -4
- package/dist/components/sd-form.js +99 -0
- package/dist/components/sd-form.js.map +1 -0
- package/dist/components/sd-guide.js +12 -13
- package/dist/components/sd-guide.js.map +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-modal-card.js +10 -10
- package/dist/components/sd-modal-card.js.map +1 -1
- package/dist/components/sd-number-input.js +19 -43
- package/dist/components/sd-number-input.js.map +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +14 -15
- package/dist/components/sd-popover.js.map +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-progress.js +1 -1
- package/dist/components/sd-radio-button-group.js +10 -26
- package/dist/components/sd-radio-button-group.js.map +1 -1
- package/dist/components/sd-radio-group.js +5 -5
- package/dist/components/sd-radio-group.js.map +1 -1
- package/dist/components/{sd-tbody.d.ts → sd-select-dropdown.d.ts} +4 -4
- package/dist/components/sd-select-dropdown.js +9 -0
- package/dist/components/sd-select-dropdown.js.map +1 -0
- package/dist/components/sd-select-multiple-group.js +97 -40
- package/dist/components/sd-select-multiple-group.js.map +1 -1
- package/dist/components/sd-select-multiple.js +133 -168
- package/dist/components/sd-select-multiple.js.map +1 -1
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table.js +555 -113
- package/dist/components/sd-table.js.map +1 -1
- package/dist/components/sd-tabs.js +13 -16
- package/dist/components/sd-tabs.js.map +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/{sd-tr.d.ts → sd-textarea.d.ts} +4 -4
- package/dist/components/sd-textarea.js +145 -0
- package/dist/components/sd-textarea.js.map +1 -0
- package/dist/components/sd-toast-message.js +14 -14
- package/dist/components/sd-toast-message.js.map +1 -1
- package/dist/components/sd-toggle-button.js +5 -5
- package/dist/components/sd-toggle-button.js.map +1 -1
- package/dist/components/sd-toggle.js +9 -11
- package/dist/components/sd-toggle.js.map +1 -1
- package/dist/components/sd-tooltip.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-02e23509.entry.js +2 -0
- package/dist/design-system/p-02e23509.entry.js.map +1 -0
- package/dist/design-system/p-0a2f733d.entry.js +2 -0
- package/dist/design-system/p-0a2f733d.entry.js.map +1 -0
- package/dist/design-system/p-0d3f019d.entry.js +2 -0
- package/dist/design-system/p-0d3f019d.entry.js.map +1 -0
- package/dist/design-system/p-15dd1289.entry.js +2 -0
- package/dist/design-system/p-15dd1289.entry.js.map +1 -0
- package/dist/design-system/p-216c6543.entry.js +2 -0
- package/dist/design-system/p-216c6543.entry.js.map +1 -0
- package/dist/design-system/p-2400d67b.entry.js +2 -0
- package/dist/design-system/p-2400d67b.entry.js.map +1 -0
- package/dist/design-system/p-282f4087.entry.js +2 -0
- package/dist/design-system/p-282f4087.entry.js.map +1 -0
- package/dist/design-system/{p-7b94b34e.entry.js → p-388d5b9f.entry.js} +2 -2
- package/dist/design-system/p-4d7bb5b6.entry.js +2 -0
- package/dist/design-system/p-4d7bb5b6.entry.js.map +1 -0
- package/dist/design-system/p-53972259.entry.js +2 -0
- package/dist/design-system/p-53972259.entry.js.map +1 -0
- package/dist/design-system/p-6277b220.entry.js +2 -0
- package/dist/design-system/p-6277b220.entry.js.map +1 -0
- package/dist/design-system/p-652c4d37.entry.js +2 -0
- package/dist/design-system/p-652c4d37.entry.js.map +1 -0
- package/dist/design-system/p-661c4553.entry.js +2 -0
- package/dist/design-system/p-661c4553.entry.js.map +1 -0
- package/dist/design-system/p-686958c5.entry.js +2 -0
- package/dist/design-system/p-686958c5.entry.js.map +1 -0
- package/dist/design-system/p-811c5aa4.entry.js +2 -0
- package/dist/design-system/p-811c5aa4.entry.js.map +1 -0
- package/dist/design-system/p-827ca975.entry.js +2 -0
- package/dist/design-system/p-827ca975.entry.js.map +1 -0
- package/dist/design-system/p-8df72aa2.entry.js +2 -0
- package/dist/design-system/p-8df72aa2.entry.js.map +1 -0
- package/dist/design-system/p-9d2459ed.entry.js +2 -0
- package/dist/design-system/p-9d2459ed.entry.js.map +1 -0
- package/dist/design-system/p-BShXSO5x.js +2 -0
- package/dist/design-system/p-BShXSO5x.js.map +1 -0
- package/dist/design-system/{p-7X2nzJWz.js → p-C3qNZ7Qh.js} +3 -3
- package/dist/design-system/p-C3qNZ7Qh.js.map +1 -0
- package/dist/design-system/{p-CdbtuKYR.js → p-DPxE68eG.js} +2 -2
- package/dist/design-system/{p-CdbtuKYR.js.map → p-DPxE68eG.js.map} +1 -1
- package/dist/design-system/{p-BYf-ybt2.js → p-DcGvp3RM.js} +2 -2
- package/dist/design-system/{p-BYf-ybt2.js.map → p-DcGvp3RM.js.map} +1 -1
- package/dist/design-system/p-a7d4c6bd.entry.js +2 -0
- package/dist/design-system/p-a7d4c6bd.entry.js.map +1 -0
- package/dist/design-system/p-ac29c52c.entry.js +2 -0
- package/dist/design-system/p-ac29c52c.entry.js.map +1 -0
- package/dist/design-system/{p-7a424f6b.entry.js → p-b0277422.entry.js} +2 -2
- package/dist/design-system/p-b0277422.entry.js.map +1 -0
- package/dist/design-system/p-c25c4bd6.entry.js +2 -0
- package/dist/design-system/p-c25c4bd6.entry.js.map +1 -0
- package/dist/design-system/p-c3061828.entry.js +2 -0
- package/dist/design-system/p-c3061828.entry.js.map +1 -0
- package/dist/design-system/p-cde56c79.entry.js +2 -0
- package/dist/design-system/{p-2c57bdea.entry.js.map → p-cde56c79.entry.js.map} +1 -1
- package/dist/design-system/p-d77422e4.entry.js +2 -0
- package/dist/design-system/p-d77422e4.entry.js.map +1 -0
- package/dist/design-system/p-dc410414.entry.js +2 -0
- package/dist/design-system/p-dc410414.entry.js.map +1 -0
- package/dist/design-system/p-f254b09a.entry.js +2 -0
- package/dist/design-system/p-f254b09a.entry.js.map +1 -0
- package/dist/design-system/p-f3287206.entry.js +2 -0
- package/dist/design-system/p-f3287206.entry.js.map +1 -0
- package/dist/esm/{select-keyboard-navigation-C2JaR3A6.js → base-dropdown-event-BShXSO5x.js} +26 -26
- package/dist/esm/base-dropdown-event-BShXSO5x.js.map +1 -0
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-7X2nzJWz.js → index-C3qNZ7Qh.js} +3 -3
- package/dist/esm/index-C3qNZ7Qh.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{resolveColor-BYf-ybt2.js → resolveColor-DcGvp3RM.js} +5 -5
- package/dist/{cjs/resolveColor-DxvExwgo.js.map → esm/resolveColor-DcGvp3RM.js.map} +1 -1
- package/dist/esm/sd-badge.entry.js +4 -4
- package/dist/esm/sd-badge.entry.js.map +1 -1
- package/dist/esm/{sd-button_24.entry.js → sd-button_6.entry.js} +291 -2823
- package/dist/esm/sd-card.entry.js +4 -4
- package/dist/esm/sd-card.entry.js.map +1 -1
- package/dist/esm/sd-checkbox.entry.js +87 -0
- package/dist/esm/sd-checkbox.entry.js.map +1 -0
- package/dist/esm/sd-date-box.entry.js +10 -10
- package/dist/esm/sd-date-box.entry.js.map +1 -1
- package/dist/esm/sd-date-picker.entry.js +5 -5
- package/dist/esm/sd-date-picker.entry.js.map +1 -1
- package/dist/esm/sd-date-range-picker.entry.js +8 -8
- package/dist/esm/sd-date-range-picker.entry.js.map +1 -1
- package/dist/esm/sd-field_3.entry.js +418 -0
- package/dist/esm/sd-file-picker.entry.js +119 -0
- package/dist/esm/sd-file-picker.entry.js.map +1 -0
- package/dist/esm/sd-form.entry.js +72 -0
- package/dist/esm/sd-form.entry.js.map +1 -0
- package/dist/esm/sd-guide.entry.js +79 -0
- package/dist/esm/sd-guide.entry.js.map +1 -0
- package/dist/esm/sd-loading-spinner_2.entry.js +192 -0
- package/dist/esm/sd-modal-card.entry.js +8 -8
- package/dist/esm/sd-modal-card.entry.js.map +1 -1
- package/dist/esm/sd-number-input.entry.js +259 -0
- package/dist/esm/sd-number-input.entry.js.map +1 -0
- package/dist/esm/sd-popover.entry.js +7 -7
- package/dist/esm/sd-popover.entry.js.map +1 -1
- package/dist/esm/sd-progress.entry.js +1 -1
- package/dist/esm/sd-radio-button-group.entry.js +8 -21
- package/dist/esm/sd-radio-button-group.entry.js.map +1 -1
- package/dist/esm/sd-radio-group.entry.js +69 -0
- package/dist/esm/sd-radio-group.entry.js.map +1 -0
- package/dist/esm/sd-select-dropdown_3.entry.js +262 -0
- package/dist/esm/sd-select-multiple-group.entry.js +444 -0
- package/dist/esm/sd-select-multiple-group.entry.js.map +1 -0
- package/dist/esm/sd-select-multiple.entry.js +72 -150
- package/dist/esm/sd-select-multiple.entry.js.map +1 -1
- package/dist/esm/sd-select-option-group.entry.js +67 -0
- package/dist/esm/sd-select-option-group.entry.js.map +1 -0
- package/dist/esm/sd-table.entry.js +515 -85
- package/dist/esm/sd-table.entry.js.map +1 -1
- package/dist/esm/sd-tabs.entry.js +64 -0
- package/dist/esm/sd-tabs.entry.js.map +1 -0
- package/dist/esm/sd-tag.entry.js +55 -0
- package/dist/esm/sd-tag.entry.js.map +1 -0
- package/dist/esm/sd-toast-message.entry.js +59 -0
- package/dist/esm/sd-toast-message.entry.js.map +1 -0
- package/dist/esm/sd-toggle-button.entry.js +48 -0
- package/dist/esm/sd-toggle-button.entry.js.map +1 -0
- package/dist/esm/sd-toggle.entry.js +44 -0
- package/dist/esm/sd-toggle.entry.js.map +1 -0
- package/dist/esm/{tooltipArrow-DFRZWz6D.js → tooltipArrow-Ck_14rXC.js} +3 -3
- package/dist/esm/{tooltipArrow-DFRZWz6D.js.map → tooltipArrow-Ck_14rXC.js.map} +1 -1
- package/dist/types/components/sd-button/sd-button.d.ts +0 -3
- package/dist/types/components/sd-card/sd-card.d.ts +1 -1
- package/dist/types/components/sd-checkbox/sd-checkbox.d.ts +2 -2
- package/dist/types/components/sd-date-box/sd-date-box.d.ts +2 -2
- package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +1 -1
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +1 -1
- package/dist/types/components/sd-field/sd-field.d.ts +34 -0
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +1 -1
- package/dist/types/components/{sd-tooltip-portal/sd-tooltip-portal.d.ts → sd-floating-portal/sd-floating-portal.d.ts} +2 -2
- package/dist/types/components/sd-form/sd-form.d.ts +23 -0
- package/dist/types/components/sd-input/sd-input.d.ts +23 -14
- package/dist/types/components/sd-modal-card/sd-modal-card.d.ts +2 -2
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +4 -14
- package/dist/types/components/sd-portal/sd-portal.d.ts +1 -1
- package/dist/types/components/sd-radio-button-group/sd-radio-button-group.d.ts +2 -4
- package/dist/types/components/sd-radio-group/sd-radio-group.d.ts +1 -1
- package/dist/types/components/sd-select/sd-select-dropdown/sd-select-dropdown.d.ts +41 -0
- package/dist/types/components/sd-select/sd-select-option/sd-select-option.d.ts +1 -1
- package/dist/types/components/sd-select/sd-select-search-input/sd-select-search-input.d.ts +4 -4
- package/dist/types/components/sd-select/sd-select.d.ts +28 -21
- package/dist/types/components/sd-select-multiple/sd-select-multiple.d.ts +26 -20
- package/dist/types/components/sd-select-multiple-group/sd-select-multiple-group.d.ts +19 -4
- package/dist/types/components/sd-table/sd-table.d.ts +62 -3
- package/dist/types/components/sd-tabs/sd-tabs.d.ts +1 -2
- package/dist/types/components/sd-textarea/sd-textarea.d.ts +32 -0
- package/dist/types/components/sd-toast-message/sd-toast-message.d.ts +3 -3
- package/dist/types/components/sd-toggle/sd-toggle.d.ts +1 -2
- package/dist/types/components/sd-toggle-button/sd-toggle-button.d.ts +1 -1
- package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +14 -2
- package/dist/types/components.d.ts +705 -399
- package/dist/types/types/form.d.ts +1 -0
- package/dist/types/types/select.d.ts +1 -1
- package/hydrate/index.js +1394 -1322
- package/hydrate/index.mjs +1394 -1322
- package/package.json +4 -3
- package/dist/cjs/index-B7tkxTye.js.map +0 -1
- package/dist/cjs/sd-tbody_3.cjs.entry.js +0 -44
- package/dist/cjs/sd-td.cjs.entry.js +0 -26
- package/dist/cjs/select-keyboard-navigation-6fO_V4En.js.map +0 -1
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -18
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js.map +0 -1
- package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -9
- package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -111
- package/dist/collection/components/sd-table/sd-td/sd-td.js.map +0 -1
- package/dist/collection/components/sd-table/sd-th/sd-th.css +0 -8
- package/dist/collection/components/sd-table/sd-th/sd-th.js +0 -18
- package/dist/collection/components/sd-table/sd-th/sd-th.js.map +0 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -3
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -18
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js.map +0 -1
- package/dist/collection/components/sd-table-backup/sd-table-backup.css +0 -309
- package/dist/collection/components/sd-table-backup/sd-table-backup.js +0 -1219
- package/dist/collection/components/sd-table-backup/sd-table-backup.js.map +0 -1
- package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js.map +0 -1
- package/dist/components/p-BESbtjDi.js +0 -102
- package/dist/components/p-BESbtjDi.js.map +0 -1
- package/dist/components/p-BLidMbc_.js +0 -34
- package/dist/components/p-BLidMbc_.js.map +0 -1
- package/dist/components/p-BYf-ybt2.js.map +0 -1
- package/dist/components/p-BxPT3VKO.js.map +0 -1
- package/dist/components/p-CKhzpdPk.js.map +0 -1
- package/dist/components/p-CQBrru3e.js.map +0 -1
- package/dist/components/p-CWwMpVqI.js.map +0 -1
- package/dist/components/p-CfKJNKMH.js +0 -175
- package/dist/components/p-CfKJNKMH.js.map +0 -1
- package/dist/components/p-DD9g6GYA.js +0 -34
- package/dist/components/p-DD9g6GYA.js.map +0 -1
- package/dist/components/p-DKoWHxRI.js +0 -34
- package/dist/components/p-DKoWHxRI.js.map +0 -1
- package/dist/components/p-DMqinLuj.js +0 -326
- package/dist/components/p-DMqinLuj.js.map +0 -1
- package/dist/components/p-DRGcUx0C.js.map +0 -1
- package/dist/components/p-DroKiQ6J.js +0 -121
- package/dist/components/p-DroKiQ6J.js.map +0 -1
- package/dist/components/p-QNYqIsvU.js +0 -78
- package/dist/components/p-QNYqIsvU.js.map +0 -1
- package/dist/components/p-njRAT-yp.js.map +0 -1
- package/dist/components/sd-table-backup.js +0 -802
- package/dist/components/sd-table-backup.js.map +0 -1
- package/dist/components/sd-tbody.js +0 -9
- package/dist/components/sd-tbody.js.map +0 -1
- package/dist/components/sd-td.js +0 -50
- package/dist/components/sd-td.js.map +0 -1
- package/dist/components/sd-th.js +0 -9
- package/dist/components/sd-th.js.map +0 -1
- package/dist/components/sd-tooltip-portal.d.ts +0 -11
- package/dist/components/sd-tooltip-portal.js +0 -9
- package/dist/components/sd-tooltip-portal.js.map +0 -1
- package/dist/components/sd-tr.js +0 -9
- package/dist/components/sd-tr.js.map +0 -1
- package/dist/design-system/p-0d2814dc.entry.js +0 -2
- package/dist/design-system/p-0d2814dc.entry.js.map +0 -1
- package/dist/design-system/p-27985b84.entry.js +0 -2
- package/dist/design-system/p-27985b84.entry.js.map +0 -1
- package/dist/design-system/p-2c57bdea.entry.js +0 -2
- package/dist/design-system/p-3bc4effa.entry.js +0 -2
- package/dist/design-system/p-3bc4effa.entry.js.map +0 -1
- package/dist/design-system/p-5acdd14a.entry.js +0 -2
- package/dist/design-system/p-5acdd14a.entry.js.map +0 -1
- package/dist/design-system/p-665c5c48.entry.js +0 -2
- package/dist/design-system/p-665c5c48.entry.js.map +0 -1
- package/dist/design-system/p-7X2nzJWz.js.map +0 -1
- package/dist/design-system/p-7a424f6b.entry.js.map +0 -1
- package/dist/design-system/p-97b271a7.entry.js +0 -2
- package/dist/design-system/p-97b271a7.entry.js.map +0 -1
- package/dist/design-system/p-9ade8cd7.entry.js +0 -2
- package/dist/design-system/p-9ade8cd7.entry.js.map +0 -1
- package/dist/design-system/p-C2JaR3A6.js +0 -2
- package/dist/design-system/p-C2JaR3A6.js.map +0 -1
- package/dist/design-system/p-b1b828e6.entry.js +0 -2
- package/dist/design-system/p-b1b828e6.entry.js.map +0 -1
- package/dist/design-system/p-de826a92.entry.js +0 -2
- package/dist/design-system/p-de826a92.entry.js.map +0 -1
- package/dist/design-system/p-e5065700.entry.js +0 -2
- package/dist/design-system/p-e5065700.entry.js.map +0 -1
- package/dist/design-system/p-fc3580fd.entry.js +0 -2
- package/dist/design-system/p-fc3580fd.entry.js.map +0 -1
- package/dist/esm/index-7X2nzJWz.js.map +0 -1
- package/dist/esm/sd-tbody_3.entry.js +0 -40
- package/dist/esm/sd-td.entry.js +0 -24
- package/dist/esm/sd-td.entry.js.map +0 -1
- package/dist/esm/select-keyboard-navigation-C2JaR3A6.js.map +0 -1
- package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -3
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -7
- package/dist/types/components/sd-table/sd-th/sd-th.d.ts +0 -3
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -3
- package/dist/types/components/sd-table-backup/sd-table-backup.d.ts +0 -135
- /package/dist/design-system/{p-7b94b34e.entry.js.map → p-388d5b9f.entry.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -3644,7 +3644,7 @@ const grey_10 = "#f6f6f6";
|
|
|
3644
3644
|
const grey_05 = "#f9f9f9";
|
|
3645
3645
|
const white = "#ffffff";
|
|
3646
3646
|
const black = "#000000";
|
|
3647
|
-
var
|
|
3647
|
+
var rawColors = {
|
|
3648
3648
|
primary: primary,
|
|
3649
3649
|
secondary: secondary,
|
|
3650
3650
|
accent: accent,
|
|
@@ -3773,7 +3773,7 @@ var colors$1 = {
|
|
|
3773
3773
|
black: black
|
|
3774
3774
|
};
|
|
3775
3775
|
|
|
3776
|
-
const colors =
|
|
3776
|
+
const colors = rawColors;
|
|
3777
3777
|
// 주어진 문자열이 color.json의 키이면 매핑된 HEX를 반환하고,
|
|
3778
3778
|
// 아닐 경우 원문 그대로를 반환합니다. 값이 falsy면 기본 색상으로 대체합니다.
|
|
3779
3779
|
function resolveColor(input, fallback = '#025497') {
|
|
@@ -3783,7 +3783,7 @@ function resolveColor(input, fallback = '#025497') {
|
|
|
3783
3783
|
return mapped || input;
|
|
3784
3784
|
}
|
|
3785
3785
|
|
|
3786
|
-
const sdBadgeCss = () =>
|
|
3786
|
+
const sdBadgeCss = () => `sd-badge{display:inline-flex}sd-badge .sd-badge{display:flex;align-items:center;justify-content:center}sd-badge .sd-badge .sd-badge__dot{background:var(--sd-badge-color, #0075ff)}sd-badge .sd-badge .sd-badge__label{margin-left:8px;font-size:12px;font-weight:500;line-height:20px;color:#333333}sd-badge .sd-badge--sm .sd-badge__dot{width:4px;height:4px;min-width:4px;min-height:4px;border-radius:2px}sd-badge .sd-badge--md .sd-badge__dot{width:8px;height:8px;min-width:8px;min-height:8px;border-radius:4px}`;
|
|
3787
3787
|
|
|
3788
3788
|
class SdBadge {
|
|
3789
3789
|
constructor(hostRef) {
|
|
@@ -3794,11 +3794,11 @@ class SdBadge {
|
|
|
3794
3794
|
label = '';
|
|
3795
3795
|
render() {
|
|
3796
3796
|
const resolvedColor = resolveColor(this.color);
|
|
3797
|
-
return (hAsync(Host, { key: '
|
|
3797
|
+
return (hAsync(Host, { key: '8e74db398e9dafb57d276ef22ee8ab5891526e15', style: { '--sd-badge-color': resolvedColor } }, hAsync("div", { key: '23d4800224630f028e26b43e672ec6a33b4d2f28', class: `sd-badge sd-badge--${this.size}` }, hAsync("div", { key: '376446696e366a9b6e1f816a45fcf073ef967c6d', class: "sd-badge__dot" }), hAsync("div", { key: '750ab1c9792fa8174cf5ecdeb0c709bfaff2294a', class: "sd-badge__label" }, this.label))));
|
|
3798
3798
|
}
|
|
3799
3799
|
static get style() { return sdBadgeCss(); }
|
|
3800
3800
|
static get cmpMeta() { return {
|
|
3801
|
-
"$flags$":
|
|
3801
|
+
"$flags$": 768,
|
|
3802
3802
|
"$tagName$": "sd-badge",
|
|
3803
3803
|
"$members$": {
|
|
3804
3804
|
"size": [1],
|
|
@@ -3811,7 +3811,7 @@ class SdBadge {
|
|
|
3811
3811
|
}; }
|
|
3812
3812
|
}
|
|
3813
3813
|
|
|
3814
|
-
const sdButtonCss = () => `sd-button{display:inline-
|
|
3814
|
+
const sdButtonCss = () => `sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{text-decoration:none;cursor:pointer;border-radius:4px;transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none}.sd-button--xs{padding:0 8px;font-size:12px;font-weight:500;line-height:20px;min-height:24px}.sd-button--sm{padding:0 12px;font-size:12px;font-weight:500;line-height:20px;min-height:28px}.sd-button--md{padding:0 20px;font-size:16px;font-weight:500;line-height:26px;min-height:34px}.sd-button--lg{padding:0 28px;font-size:18px;font-weight:500;line-height:30px;min-height:62px}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:1px solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:1px solid #cccccc;background:#e1e1e1;color:#888888;cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:fit-content;height:fit-content;aspect-ratio:1/1}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:4px;z-index:1;font-weight:500}`;
|
|
3815
3815
|
|
|
3816
3816
|
const ICON_SIZES = {
|
|
3817
3817
|
xs: 12,
|
|
@@ -3822,7 +3822,6 @@ const ICON_SIZES = {
|
|
|
3822
3822
|
class SdButton {
|
|
3823
3823
|
constructor(hostRef) {
|
|
3824
3824
|
registerInstance(this, hostRef);
|
|
3825
|
-
this.sdClick = createEvent(this, "sdClick");
|
|
3826
3825
|
}
|
|
3827
3826
|
get el() { return getElement(this); }
|
|
3828
3827
|
variant = 'primary';
|
|
@@ -3837,15 +3836,6 @@ class SdButton {
|
|
|
3837
3836
|
iconRight;
|
|
3838
3837
|
noHover = false;
|
|
3839
3838
|
class = '';
|
|
3840
|
-
sdClick;
|
|
3841
|
-
handleClick = (event) => {
|
|
3842
|
-
if (this.disabled) {
|
|
3843
|
-
event.preventDefault();
|
|
3844
|
-
event.stopPropagation();
|
|
3845
|
-
return;
|
|
3846
|
-
}
|
|
3847
|
-
this.sdClick.emit(event);
|
|
3848
|
-
};
|
|
3849
3839
|
getButtonClasses() {
|
|
3850
3840
|
const classes = ['sd-button'];
|
|
3851
3841
|
classes.push(`sd-button--${this.variant}`);
|
|
@@ -3866,7 +3856,7 @@ class SdButton {
|
|
|
3866
3856
|
const buttonClasses = this.getButtonClasses();
|
|
3867
3857
|
// 유틸로 색상 키 -> HEX 매핑 (없으면 원본 그대로)
|
|
3868
3858
|
const resolvedColor = resolveColor(this.color);
|
|
3869
|
-
return (hAsync(
|
|
3859
|
+
return (hAsync("button", { key: '9b92f98528d06453492eab68bb6137bcaefbf656', class: `${buttonClasses} ${this.class}`, type: this.type, disabled: this.disabled, style: { '--button-color': resolvedColor } }, hAsync("div", { key: 'a7dae76ec9112b95c2ee765cb2f9b0b4fe5f705a', class: "sd-button__content" }, this.icon && (hAsync("sd-icon", { key: '71784bfcb2d08c77305a70311192dfc2c059ff0a', class: "sd-button__icon sd-button__icon--left", name: this.icon, size: this.iconSize ?? ICON_SIZES[this.size], color: this.iconColor ?? (this.variant === 'primary' ? '#fff' : resolvedColor) })), this.label && hAsync("div", { key: 'bc4b7dec430602765e98fa484d397b141686d8e7', class: "sd-button__label" }, this.label), this.iconRight && (hAsync("sd-icon", { key: '26744c6ace43cbbfc9758a8fdf0174b49f24cd2c', class: "sd-button__icon sd-button__icon--right", name: this.iconRight, size: ICON_SIZES[this.size], color: this.variant === 'primary' ? '#fff' : resolvedColor })))));
|
|
3870
3860
|
}
|
|
3871
3861
|
static get style() { return sdButtonCss(); }
|
|
3872
3862
|
static get cmpMeta() { return {
|
|
@@ -3892,16 +3882,16 @@ class SdButton {
|
|
|
3892
3882
|
}; }
|
|
3893
3883
|
}
|
|
3894
3884
|
|
|
3895
|
-
const sdCardCss = () => `sd-card{display:block;height:fit-content
|
|
3885
|
+
const sdCardCss = () => `sd-card{display:block;height:fit-content;border-radius:8px;background:white}sd-card.sd-card--bordered{border:1px solid #e1e1e1}`;
|
|
3896
3886
|
|
|
3897
3887
|
class SdCard {
|
|
3898
3888
|
constructor(hostRef) {
|
|
3899
3889
|
registerInstance(this, hostRef);
|
|
3900
3890
|
}
|
|
3901
3891
|
bordered = true;
|
|
3902
|
-
|
|
3892
|
+
cardClassName = '';
|
|
3903
3893
|
render() {
|
|
3904
|
-
return (hAsync(Host, { key: '
|
|
3894
|
+
return (hAsync(Host, { key: 'f7012e01206131628820f41ede93ce68cb121fe4', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.cardClassName}` }, hAsync("slot", { key: '5b978729afb2cf6fef8a8ad696029ef09dbb0dd9' })));
|
|
3905
3895
|
}
|
|
3906
3896
|
static get style() { return sdCardCss(); }
|
|
3907
3897
|
static get cmpMeta() { return {
|
|
@@ -3909,7 +3899,7 @@ class SdCard {
|
|
|
3909
3899
|
"$tagName$": "sd-card",
|
|
3910
3900
|
"$members$": {
|
|
3911
3901
|
"bordered": [4],
|
|
3912
|
-
"
|
|
3902
|
+
"cardClassName": [1, "card-class-name"]
|
|
3913
3903
|
},
|
|
3914
3904
|
"$listeners$": undefined,
|
|
3915
3905
|
"$lazyBundleId$": "-",
|
|
@@ -3922,11 +3912,11 @@ const sdCheckboxCss = () => `sd-checkbox{display:block;height:20px;line-height:0
|
|
|
3922
3912
|
class SdCheckbox {
|
|
3923
3913
|
constructor(hostRef) {
|
|
3924
3914
|
registerInstance(this, hostRef);
|
|
3925
|
-
this.
|
|
3915
|
+
this.update = createEvent(this, "sdUpdate");
|
|
3926
3916
|
}
|
|
3927
3917
|
get el() { return getElement(this); }
|
|
3928
3918
|
/** 현재 선택 상태 또는 배열 형태의 값 */
|
|
3929
|
-
|
|
3919
|
+
value;
|
|
3930
3920
|
/** 배열 모드에서의 개별 값 */
|
|
3931
3921
|
val;
|
|
3932
3922
|
/** 비활성화 여부 */
|
|
@@ -3936,12 +3926,12 @@ class SdCheckbox {
|
|
|
3936
3926
|
/** 내부 체크 상태 */
|
|
3937
3927
|
isChecked = false;
|
|
3938
3928
|
/** 값 변경 이벤트 */
|
|
3939
|
-
|
|
3929
|
+
update;
|
|
3940
3930
|
componentWillLoad() {
|
|
3941
|
-
this.updateCheckedState(this.
|
|
3931
|
+
this.updateCheckedState(this.value);
|
|
3942
3932
|
}
|
|
3943
3933
|
componentWillRender() {
|
|
3944
|
-
this.updateCheckedState(this.
|
|
3934
|
+
this.updateCheckedState(this.value);
|
|
3945
3935
|
}
|
|
3946
3936
|
watchValueHandler(newValue) {
|
|
3947
3937
|
this.updateCheckedState(newValue);
|
|
@@ -3974,35 +3964,35 @@ class SdCheckbox {
|
|
|
3974
3964
|
if (this.disabled)
|
|
3975
3965
|
return;
|
|
3976
3966
|
let newValue;
|
|
3977
|
-
if (typeof this.
|
|
3978
|
-
newValue = !this.
|
|
3967
|
+
if (typeof this.value === 'boolean') {
|
|
3968
|
+
newValue = !this.value;
|
|
3979
3969
|
}
|
|
3980
|
-
else if (Array.isArray(this.
|
|
3970
|
+
else if (Array.isArray(this.value)) {
|
|
3981
3971
|
if (this.val === undefined) {
|
|
3982
3972
|
console.warn('A "val" property is required when using an array for the "value" property.');
|
|
3983
3973
|
}
|
|
3984
|
-
const valueSet = new Set(this.
|
|
3974
|
+
const valueSet = new Set(this.value);
|
|
3985
3975
|
valueSet.has(this.val) ? valueSet.delete(this.val) : valueSet.add(this.val);
|
|
3986
3976
|
newValue = Array.from(valueSet);
|
|
3987
3977
|
}
|
|
3988
3978
|
else {
|
|
3989
3979
|
newValue = !this.isChecked;
|
|
3990
3980
|
}
|
|
3991
|
-
this.
|
|
3992
|
-
this.
|
|
3981
|
+
this.value = newValue;
|
|
3982
|
+
this.update.emit(newValue);
|
|
3993
3983
|
};
|
|
3994
3984
|
render() {
|
|
3995
|
-
return (hAsync("label", { key: '
|
|
3985
|
+
return (hAsync("label", { key: 'b4f1e82e461cfc649a1bc5414fb55bcd8ea9c87d', "aria-label": this.label || 'checkbox', class: this.checkboxClasses }, hAsync("input", { key: 'bb6f1d911ccc9a62c0149bb9e65bbf73ac86fc9b', type: "checkbox", value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.label || 'checkbox' }), hAsync("div", { key: '2598f80d9028b306f04898544f94af2a06604093', class: "sd-checkbox__bg" }, this.isChecked !== false ? (hAsync("sd-icon", { name: this.isChecked === true ? 'check' : 'minus', size: 12, color: this.disabled ? '#888888' : 'white' })) : null), this.label && hAsync("span", { key: 'd07198f3d0796189988d030db5b882911d80c6bf', class: "sd-checkbox__label" }, this.label)));
|
|
3996
3986
|
}
|
|
3997
3987
|
static get watchers() { return {
|
|
3998
|
-
"
|
|
3988
|
+
"value": ["watchValueHandler"]
|
|
3999
3989
|
}; }
|
|
4000
3990
|
static get style() { return sdCheckboxCss(); }
|
|
4001
3991
|
static get cmpMeta() { return {
|
|
4002
3992
|
"$flags$": 768,
|
|
4003
3993
|
"$tagName$": "sd-checkbox",
|
|
4004
3994
|
"$members$": {
|
|
4005
|
-
"
|
|
3995
|
+
"value": [1028],
|
|
4006
3996
|
"val": [8],
|
|
4007
3997
|
"disabled": [4],
|
|
4008
3998
|
"label": [1],
|
|
@@ -4014,13 +4004,13 @@ class SdCheckbox {
|
|
|
4014
4004
|
}; }
|
|
4015
4005
|
}
|
|
4016
4006
|
|
|
4017
|
-
const sdDateBoxCss = () => `.sd-date-box.sc-sd-date-box-h{display:flex;align-items:center;justify-content:center;width:38px;height:36px;font-size:14px;position:relative;box-sizing:border-box;text-align:center;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);border-radius:14px}.sd-date-box.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box{width:28px;height:28px;border-radius:14px;position:relative}.sd-date-box.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{position:relative;z-index:2;-webkit-user-select:none;user-select:none;line-height:28px}.sd-date-box.sd-date-box--disabled.sc-sd-date-box-h{color:#cccccc;cursor:default !important;pointer-events:none}.sd-date-box.sc-sd-date-box-h:not(.sd-date-box--disabled){cursor:pointer}.sd-date-box.sd-hoverable.sc-sd-date-box-h:hover .sd-date-box__content.sc-sd-date-box{background:#d9eaff}.sd-date-box.sd-date-box--in-range.sc-sd-date-box-h:not(.sd-date-box--disabled) .sd-date-box__content.sc-sd-date-box::before{content:"";position:absolute;top:0;left:-5px;width:calc(100% + 10px);height:100%;background:#d9eaff}.sd-date-box.sd-date-box--in-range.sd-date-box--type-start.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::before{left:auto !important;width:19px !important;right:-5px}.sd-date-box.sd-date-box--in-range.sd-date-box--type-end.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::before{width:19px !important}.sd-date-box.sd-date-box--in-range.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{font-weight:500}.sd-date-box.sd-date-box--selected.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-start.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-end.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;inset:0;background:#0075ff;border-radius:14px;z-index:1}.sd-date-box.sd-date-box--selected.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-start.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-end.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{color:white;font-weight:700}.sd-date-box.sd-date-box--start-date.sd-date-box--end-date.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::before{display:none !important}.sd-date-box.sd-date-box--today.sc-sd-date-box-h:not(.sd-date-box--selected) .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:28px;height:28px;border:1px solid #e1e1e1 !important;border-radius:14px}`;
|
|
4007
|
+
const sdDateBoxCss = () => `.sd-date-box.sc-sd-date-box-h{display:flex;align-items:center;justify-content:center;width:38px;height:36px;font-size:14px;position:relative;box-sizing:border-box;text-align:center;transition:background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);border-radius:14px}.sd-date-box.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box{width:28px;height:28px;border-radius:14px;position:relative}.sd-date-box.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{position:relative;z-index:2;-webkit-user-select:none;user-select:none;line-height:28px}.sd-date-box.sd-date-box--disabled.sc-sd-date-box-h{color:#cccccc;cursor:default !important;pointer-events:none}.sd-date-box.sc-sd-date-box-h:not(.sd-date-box--disabled){color:#333333;cursor:pointer}.sd-date-box.sd-hoverable.sc-sd-date-box-h:hover .sd-date-box__content.sc-sd-date-box{background:#d9eaff}.sd-date-box.sd-date-box--in-range.sc-sd-date-box-h:not(.sd-date-box--disabled) .sd-date-box__content.sc-sd-date-box::before{content:"";position:absolute;top:0;left:-5px;width:calc(100% + 10px);height:100%;background:#d9eaff}.sd-date-box.sd-date-box--in-range.sd-date-box--type-start.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::before{left:auto !important;width:19px !important;right:-5px}.sd-date-box.sd-date-box--in-range.sd-date-box--type-end.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::before{width:19px !important}.sd-date-box.sd-date-box--in-range.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{font-weight:500}.sd-date-box.sd-date-box--selected.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-start.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::after,.sd-date-box.sd-date-box--type-end.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;inset:0;background:#0075ff;border-radius:14px;z-index:1}.sd-date-box.sd-date-box--selected.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-start.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box,.sd-date-box.sd-date-box--type-end.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box .sd-date-box__label.sc-sd-date-box{color:white;font-weight:700}.sd-date-box.sd-date-box--start-date.sd-date-box--end-date.sc-sd-date-box-h .sd-date-box__content.sc-sd-date-box::before{display:none !important}.sd-date-box.sd-date-box--today.sc-sd-date-box-h:not(.sd-date-box--selected) .sd-date-box__content.sc-sd-date-box::after{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:28px;height:28px;border:1px solid #e1e1e1 !important;border-radius:14px}`;
|
|
4018
4008
|
|
|
4019
4009
|
class SdDateBox {
|
|
4020
4010
|
constructor(hostRef) {
|
|
4021
4011
|
registerInstance(this, hostRef);
|
|
4022
|
-
this.
|
|
4023
|
-
this.
|
|
4012
|
+
this.click = createEvent(this, "sdClick");
|
|
4013
|
+
this.mouseOver = createEvent(this, "sdMouseOver");
|
|
4024
4014
|
}
|
|
4025
4015
|
date = null;
|
|
4026
4016
|
disabled = false;
|
|
@@ -4030,22 +4020,22 @@ class SdDateBox {
|
|
|
4030
4020
|
isToday = false;
|
|
4031
4021
|
inRange = false;
|
|
4032
4022
|
type = '';
|
|
4033
|
-
|
|
4034
|
-
|
|
4023
|
+
click;
|
|
4024
|
+
mouseOver;
|
|
4035
4025
|
handleClickDate() {
|
|
4036
4026
|
if (this.disabled)
|
|
4037
4027
|
return;
|
|
4038
4028
|
if (typeof this.date === 'string')
|
|
4039
4029
|
return;
|
|
4040
|
-
this.
|
|
4030
|
+
this.click?.emit(this.date);
|
|
4041
4031
|
}
|
|
4042
4032
|
handleHoverDate() {
|
|
4043
4033
|
if (typeof this.date === 'string')
|
|
4044
4034
|
return;
|
|
4045
|
-
this.
|
|
4035
|
+
this.mouseOver?.emit(this.date);
|
|
4046
4036
|
}
|
|
4047
4037
|
render() {
|
|
4048
|
-
return (hAsync(Host, { key: '
|
|
4038
|
+
return (hAsync(Host, { key: 'a1d4c039cb3b9b3cdd2910c91de1c8b01fc0a278', role: "button", "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
|
|
4049
4039
|
'sd-date-box': true,
|
|
4050
4040
|
'sd-hoverable': !this.disabled || !this.selected || this.type === '',
|
|
4051
4041
|
'sd-date-box--disabled': this.disabled,
|
|
@@ -4056,7 +4046,7 @@ class SdDateBox {
|
|
|
4056
4046
|
'sd-date-box--in-range': this.inRange,
|
|
4057
4047
|
'sd-date-box--type-start': this.type === 'start',
|
|
4058
4048
|
'sd-date-box--type-end': this.type === 'end',
|
|
4059
|
-
}, onClick: () => this.handleClickDate(), onMouseOver: () => this.handleHoverDate() }, hAsync("div", { key: '
|
|
4049
|
+
}, onClick: () => this.handleClickDate(), onMouseOver: () => this.handleHoverDate() }, hAsync("div", { key: '338ffdc873793d66dbc6e2ad39233de227231002', class: "sd-date-box__content" }, hAsync("div", { key: '764ae38ca49f431c1ec00ae35e6b436f32fae735', class: "sd-date-box__label" }, this.date))));
|
|
4060
4050
|
}
|
|
4061
4051
|
static get style() { return sdDateBoxCss(); }
|
|
4062
4052
|
static get cmpMeta() { return {
|
|
@@ -4139,7 +4129,7 @@ const sdDatePickerCss = () => `.sd-date-picker.sc-sd-date-picker{width:100%;disp
|
|
|
4139
4129
|
class SdDatePicker {
|
|
4140
4130
|
constructor(hostRef) {
|
|
4141
4131
|
registerInstance(this, hostRef);
|
|
4142
|
-
this.
|
|
4132
|
+
this.update = createEvent(this, "sdUpdate");
|
|
4143
4133
|
}
|
|
4144
4134
|
get el() { return getElement(this); }
|
|
4145
4135
|
value = null;
|
|
@@ -4151,7 +4141,7 @@ class SdDatePicker {
|
|
|
4151
4141
|
currentDate = null;
|
|
4152
4142
|
currentYear;
|
|
4153
4143
|
currentMonth;
|
|
4154
|
-
|
|
4144
|
+
update;
|
|
4155
4145
|
componentWillLoad() {
|
|
4156
4146
|
this.setCalendar();
|
|
4157
4147
|
}
|
|
@@ -4194,7 +4184,7 @@ class SdDatePicker {
|
|
|
4194
4184
|
this.setCurrentDate(date);
|
|
4195
4185
|
this.isOpen = false;
|
|
4196
4186
|
this.value = date;
|
|
4197
|
-
this.
|
|
4187
|
+
this.update.emit?.(date);
|
|
4198
4188
|
}
|
|
4199
4189
|
isDisabledDate(date) {
|
|
4200
4190
|
if (!this.selectable)
|
|
@@ -4215,7 +4205,7 @@ class SdDatePicker {
|
|
|
4215
4205
|
this.isOpen = false;
|
|
4216
4206
|
};
|
|
4217
4207
|
render() {
|
|
4218
|
-
return (hAsync(Host, { key: '
|
|
4208
|
+
return (hAsync(Host, { key: '4eccf6134d01546c9a47ddc3806233dd68195a8a', class: { 'sd-date-picker': true, 'sd-date-picker--disabled': this.disabled } }, hAsync("sd-input", { key: 'f1c015db2efd3801792266d7abb6391e2751c225', ref: el => (this.inputEl = el), value: this.value, label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-picker__input", onClick: () => this.openMenu() }, hAsync("sd-icon", { key: '671f3d5166618228d2018477b4b9f1b3c13fa312', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (hAsync("sd-portal", { key: 'ca295d75db67328d189fefd16e3598f0a4b1b5fe', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.handleClose }, hAsync("div", { key: 'c9b0d87465936760ecf0453cfb5dad00247b7612', class: "sd-date-picker__menu" }, hAsync("div", { key: 'fac0f5d91634d394cecda4c1a149103e12e210c6', class: "sd-date-picker__header" }, hAsync("div", { key: '2f55a9ec84e74135a7c1f8c1925f557ad85e43a8', class: "year-nav" }, hAsync("button", { key: '811d3eab71e03c23214d3da2e829d62af73c8828', type: "button", name: "prev-year", title: "Previous Year", onClick: () => this.setCurrentYear(this.currentYear - 1) }, hAsync("sd-icon", { key: '60bb560ea0aedc61a6ba7565b4f8daf95a33c9cf', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("span", { key: '976c256e704793d39e98a3e80ac0eb536a32b361', class: "year-nav__current" }, this.currentYear), hAsync("button", { key: '32ecf743b29434b1aeb9ef72d49a2254acd4e514', type: "button", name: "next-year", title: "Next Year", onClick: () => this.setCurrentYear(this.currentYear + 1) }, hAsync("sd-icon", { key: 'a70f679e27d00db53047b387fa9d16520cb0369f', name: "arrowRight", size: "12", color: "#CCCCCC" }))), hAsync("div", { key: '1d5e17dd8b4c0081a2cda2991e8e0055f0c4d24d', class: "month-nav" }, hAsync("button", { key: '3fa7edc4eb796e298b12ea64ac1aa0d83bf6ddb1', type: "button", name: "prev-month", title: "Previous ", onClick: () => this.handleUpdateMonth('prev') }, hAsync("sd-icon", { key: '3d6ed03bb28a1ccb711c97d31ff6d667ada8c410', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("span", { key: '5b3b1c05eb303ff7cb4a7ad599abd45747822589', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), hAsync("button", { key: '6718f389605d55f7c08934360171b61a28e2646d', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, hAsync("sd-icon", { key: '8216564c82d61220f8d99bc9759a83994839a836', name: "arrowRight", size: "12", color: "#CCCCCC" })))), hAsync("div", { key: 'd3e9f16ec52b5ba82af3c5349966402c271ddb00', class: "sd-date-picker__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (hAsync("div", { key: day, class: "day" }, day)))), hAsync("div", { key: 'a2b2b56fefcecc67a06b5db9ae0a7767cca163f5', class: "sd-date-picker__body" }, [
|
|
4219
4209
|
...this.calendar.prevMonthDays,
|
|
4220
4210
|
...this.calendar.days,
|
|
4221
4211
|
...this.calendar.afterMonthDays,
|
|
@@ -4247,12 +4237,12 @@ class SdDatePicker {
|
|
|
4247
4237
|
}; }
|
|
4248
4238
|
}
|
|
4249
4239
|
|
|
4250
|
-
const sdDateRangePickerCss = () =>
|
|
4240
|
+
const sdDateRangePickerCss = () => `sd-date-range-picker.sc-sd-date-range-picker{width:fit-content;display:inline-flex}sd-date-range-picker.sc-sd-date-range-picker .sd-date-range-picker--disabled.sc-sd-date-range-picker .date-icon.sc-sd-date-range-picker{cursor:not-allowed !important;color:#888888 !important}sd-date-range-picker.sc-sd-date-range-picker .sd-date-range-picker--disabled.sc-sd-date-range-picker .sd-input__native.sc-sd-date-range-picker{color:#888888 !important}sd-date-range-picker.sc-sd-date-range-picker .sd-field.sc-sd-date-range-picker .sd-field__control.sc-sd-date-range-picker{min-width:210px}sd-date-range-picker.sc-sd-date-range-picker .sd-field.sc-sd-date-range-picker .sd-input__native.sc-sd-date-range-picker{margin-left:17px !important}.sd-date-range-picker__menu.sc-sd-date-range-picker{width:609px;box-sizing:border-box;border-radius:8px;padding:24px 19px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);background:white}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__header.sc-sd-date-range-picker{margin-bottom:16px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__header.sc-sd-date-range-picker .header-label.sc-sd-date-range-picker{margin:0 12px;width:40px;text-align:center;font-size:14px;line-height:24px}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker{display:flex;flex-flow:row nowrap;align-items:stretch;gap:19px}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker{width:266px}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-header.sc-sd-date-range-picker{width:100%;height:24px;line-height:24px;font-size:14px;text-align:center;position:relative;padding:0 5px}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-header.sc-sd-date-range-picker button.sc-sd-date-range-picker{position:absolute;top:50%;transform:translateY(-50%)}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-header.sc-sd-date-range-picker button.header-button-prev.sc-sd-date-range-picker{left:5px}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-header.sc-sd-date-range-picker button.header-button-next.sc-sd-date-range-picker{right:5px;left:auto}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-days.sc-sd-date-range-picker{padding:0 5px;margin-top:8px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr));column-gap:10px}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-days.sc-sd-date-range-picker .day.sc-sd-date-range-picker{width:28px;height:20px;font-size:12px;line-height:20px;text-align:center;color:#888888}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .calendar-container.sc-sd-date-range-picker .calendar-body.sc-sd-date-range-picker{margin-top:12px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr))}.sd-date-range-picker__menu.sc-sd-date-range-picker .sd-date-range-picker__body.sc-sd-date-range-picker .separator.sc-sd-date-range-picker{width:1px;background-color:#d8d8d8}`;
|
|
4251
4241
|
|
|
4252
4242
|
class SdDateRangePicker {
|
|
4253
4243
|
constructor(hostRef) {
|
|
4254
4244
|
registerInstance(this, hostRef);
|
|
4255
|
-
this.
|
|
4245
|
+
this.update = createEvent(this, "sdUpdate");
|
|
4256
4246
|
}
|
|
4257
4247
|
get el() { return getElement(this); }
|
|
4258
4248
|
value = ['', ''];
|
|
@@ -4266,7 +4256,7 @@ class SdDateRangePicker {
|
|
|
4266
4256
|
hoverDate = '';
|
|
4267
4257
|
prevYear = Number(this.dateRange[0].split('-')[0]);
|
|
4268
4258
|
prevMonth = Number(this.dateRange[0].split('-')[1]);
|
|
4269
|
-
|
|
4259
|
+
update;
|
|
4270
4260
|
inputEl;
|
|
4271
4261
|
dateUtil = useDatePicker();
|
|
4272
4262
|
tempDateRange = ['', ''];
|
|
@@ -4274,7 +4264,7 @@ class SdDateRangePicker {
|
|
|
4274
4264
|
this.syncFromValue(this.value);
|
|
4275
4265
|
}
|
|
4276
4266
|
onValueChange(newValue) {
|
|
4277
|
-
this.
|
|
4267
|
+
this.dateRange = [...newValue];
|
|
4278
4268
|
}
|
|
4279
4269
|
syncFromValue(value) {
|
|
4280
4270
|
this.dateRange = [...value];
|
|
@@ -4400,17 +4390,17 @@ class SdDateRangePicker {
|
|
|
4400
4390
|
const newRange = [this.dateRange[0], selectedDate];
|
|
4401
4391
|
this.setDateRange(newRange);
|
|
4402
4392
|
this.value = newRange;
|
|
4403
|
-
this.
|
|
4393
|
+
this.update.emit?.(newRange);
|
|
4404
4394
|
}
|
|
4405
4395
|
handleDateHover(index, day) {
|
|
4406
4396
|
const hoverDate = this.formatDate(index, day);
|
|
4407
4397
|
this.setHoverDate(hoverDate);
|
|
4408
4398
|
}
|
|
4409
4399
|
render() {
|
|
4410
|
-
return (hAsync(Host, { key: '
|
|
4400
|
+
return (hAsync(Host, { key: '1ac991910d1613bf142520081212be747bbeafd4', class: {
|
|
4411
4401
|
'sd-date-range-picker': true,
|
|
4412
4402
|
'sd-date-range-picker--disabled': this.disabled,
|
|
4413
|
-
} }, hAsync("sd-input", { key: '
|
|
4403
|
+
} }, hAsync("sd-input", { key: 'a9088dd29923544f749e09678856376dc8606f7d', ref: el => (this.inputEl = el), value: !!this.dateRange[0] ? `${this.dateRange[0]} ~ ${this.dateRange[1]}` : '', label: this.label, "inside-label": true, readonly: true, disabled: this.disabled, placeholder: this.placeholder, inputClass: "sd-date-range-picker__input", onClick: () => this.openMenu() }, hAsync("sd-icon", { key: '866ba94372f088fab53a01e0f13fc883356f6586', slot: "prefix", name: "date", size: "16", color: this.disabled ? 'grey_65' : 'grey_70', class: "date-icon", onClick: () => this.openMenu() })), this.isOpen && (hAsync("sd-portal", { key: '95ab0375cf56201bd285c522844d7fa387ae7fc9', open: this.isOpen, parentRef: this.inputEl, onSdClose: this.closeMenu }, hAsync("div", { key: 'fc7bb357b66b7e70ce3351ab6861b778a00eb6d8', class: "sd-date-range-picker__menu" }, hAsync("div", { key: '852ff12fdb66c008b92d7c2e828a6a7a952e7afe', class: "sd-date-range-picker__header mb-16pxr flex flex-nowrap items-center justify-center" }, hAsync("button", { key: '980cb27f0c9e1629b5cf85060b47845db0e1f9b7', type: "button", name: "prev", title: "Previous", onClick: () => this.setPrevYear(this.prevYear - 1) }, hAsync("sd-icon", { key: '7bc19cc051ff2af8fadf4eb7b389456fae03f060', name: "arrowLeft", size: "12", color: "#CCCCCC" })), hAsync("div", { key: '4836b382280bf948afa7ed85eeb024052fd86aab', class: "header-label" }, this.prevYear), hAsync("button", { key: 'fe7b4f50bb0515c8dd294274792dbbe3baca3af7', type: "button", name: "next", title: "Next", onClick: () => this.setPrevYear(this.prevYear + 1) }, hAsync("sd-icon", { key: '2f86e0b14db96213954cf17282bcc66ed0b80ded', name: "arrowRight", size: "12", color: "#CCCCCC" }))), hAsync("div", { key: '0d63ed5aef2ede30dd88dd25b3314e4ec8ae79ce', class: "sd-date-range-picker__body" }, [this.prevCalendar, this.nextCalendar].map((calendar, index) => (hAsync(Fragment, null, index === 1 && hAsync("div", { class: "separator" }), hAsync("div", { key: index, class: "calendar-container" }, hAsync("div", { class: "calendar-header" }, hAsync("button", { type: "button", name: "month", title: "Month", class: index === 0 ? 'header-button-prev' : 'header-button-next', onClick: () => this.updateYearMonth(index === 0 ? 'prev' : 'next') }, hAsync("sd-icon", { name: index === 0 ? 'arrowLeft' : 'arrowRight', size: "12", color: "#CCCCCC" })), index === 0
|
|
4414
4404
|
? `${this.prevYear}.${String(this.prevMonth).padStart(2, '0')}`
|
|
4415
4405
|
: `${this.nextYear}.${String(this.nextMonth).padStart(2, '0')}`), hAsync("div", { class: "calendar-days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (hAsync("sd-date-box", { key: day, date: day, disabled: true, class: "day" })))), hAsync("div", { class: "calendar-body mt-12pxr grid grid-cols-7 gap-y-8pxr" }, [...calendar.prevMonthDays, ...calendar.days, ...calendar.afterMonthDays].map((day, idx) => (hAsync("sd-date-box", { key: `prev${day}_${idx}`, date: !day ? '' : Number(day), selected: this.dateRange.some(date => date === this.formatDate(index, Number(day))), type: this.getDateBoxType(this.formatDate(index, Number(day))), isToday: today === this.formatDate(index, Number(day)), disabled: !day ? true : this.isDisabledDate(this.formatDate(index, Number(day))), inRange: this.isDateInRange(this.formatDate(index, Number(day))), isStartDate: this.dateRange[0] === this.formatDate(index, Number(day)), isEndDate: this.dateRange[1] === this.formatDate(index, Number(day)), onClick: () => this.handleDateClick(index, Number(day)), onMouseOver: () => this.handleDateHover(index, Number(day)) }))))))))))))));
|
|
4416
4406
|
}
|
|
@@ -4422,7 +4412,7 @@ class SdDateRangePicker {
|
|
|
4422
4412
|
"$flags$": 770,
|
|
4423
4413
|
"$tagName$": "sd-date-range-picker",
|
|
4424
4414
|
"$members$": {
|
|
4425
|
-
"value": [
|
|
4415
|
+
"value": [1040],
|
|
4426
4416
|
"label": [1],
|
|
4427
4417
|
"selectable": [16],
|
|
4428
4418
|
"maxRange": [2, "max-range"],
|
|
@@ -4440,12 +4430,175 @@ class SdDateRangePicker {
|
|
|
4440
4430
|
}; }
|
|
4441
4431
|
}
|
|
4442
4432
|
|
|
4443
|
-
const
|
|
4433
|
+
const sdFieldCss = () => `.sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:fit-content}.sd-field *:focus,.sd-field *:focus-visible,.sd-field *:focus-within{outline:none !important}.sd-field:not(.sd-field--disabled):hover .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}.sd-field.sd-field--disabled{cursor:not-allowed}.sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}.sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#cccccc;color:#888888;cursor:not-allowed !important}.sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#eeeeee;border-color:#cccccc;color:#888888;cursor:not-allowed !important}.sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;margin-right:12px}.sd-field--has-label .sd-field__wrapper .sd-field__label__required-icon{margin-right:4px}.sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:12px;line-height:20px;color:#333333;white-space:nowrap}.sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:2px}.sd-field--has-label-inside .sd-field__wrapper .sd-field__label{margin-right:0;display:flex;align-items:center;justify-content:center;padding:3px 12px;border:1px solid #cccccc;border-right:none;border-radius:4px 0 0 4px;border-color:#aaaaaa;background-color:#f6f6f6}.sd-field__wrapper{width:var(--field-width, 200px);height:28px;display:flex;align-items:center;flex-flow:row nowrap;position:relative;color:#333333;cursor:pointer;-webkit-user-select:none;user-select:none}.sd-field__wrapper .sd-field__control{position:relative;width:100%;height:100%;display:flex;flex:1;border:1px solid #aaaaaa;border-radius:4px;background:white}.sd-field__wrapper .sd-field__control--label-inside{border-top-left-radius:0px;border-bottom-left-radius:0px}.sd-field--error:not(:hover) .sd-field__wrapper .sd-field__control{border:1px solid #fb4444 !important}.sd-field.sd-field--focus .sd-field__wrapper .sd-field__control,.sd-field.sd-field--hover .sd-field__wrapper .sd-field__control{border:1px solid #0075ff !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}.sd-field .sd-field__error-message{color:#fb4444;font-size:12px;line-height:20px;margin-top:4px}`;
|
|
4434
|
+
|
|
4435
|
+
const FORM_PARENT_TAGS = [
|
|
4436
|
+
'sd-select',
|
|
4437
|
+
'sd-select-multiple',
|
|
4438
|
+
'sd-select-multiple-group',
|
|
4439
|
+
'sd-input',
|
|
4440
|
+
'sd-textarea',
|
|
4441
|
+
];
|
|
4442
|
+
class SdField {
|
|
4443
|
+
constructor(hostRef) {
|
|
4444
|
+
registerInstance(this, hostRef);
|
|
4445
|
+
}
|
|
4446
|
+
get el() { return getElement(this); }
|
|
4447
|
+
name = '';
|
|
4448
|
+
rules = [];
|
|
4449
|
+
error = false;
|
|
4450
|
+
disabled = false;
|
|
4451
|
+
hovered = false;
|
|
4452
|
+
focused = false;
|
|
4453
|
+
status;
|
|
4454
|
+
// props - label
|
|
4455
|
+
label = '';
|
|
4456
|
+
insideLabel = false;
|
|
4457
|
+
useLabelRequired = false;
|
|
4458
|
+
labelTooltip = '';
|
|
4459
|
+
labelTooltipProps = null;
|
|
4460
|
+
errorMsg = '';
|
|
4461
|
+
hostElement = null;
|
|
4462
|
+
get value() {
|
|
4463
|
+
return this.hostElement?.value ?? null;
|
|
4464
|
+
}
|
|
4465
|
+
get fieldStatus() {
|
|
4466
|
+
let status = '';
|
|
4467
|
+
if (!!this.disabled) {
|
|
4468
|
+
status = 'disabled';
|
|
4469
|
+
return `sd-field--${status}`;
|
|
4470
|
+
}
|
|
4471
|
+
if (!!this.focused) {
|
|
4472
|
+
status = 'focus';
|
|
4473
|
+
return `sd-field--${status}`;
|
|
4474
|
+
}
|
|
4475
|
+
if (!!this.hovered)
|
|
4476
|
+
status = 'hover';
|
|
4477
|
+
if (!!this.status)
|
|
4478
|
+
status = this.status;
|
|
4479
|
+
if (!!this.error)
|
|
4480
|
+
status = 'error';
|
|
4481
|
+
return status ? `sd-field--${status}` : '';
|
|
4482
|
+
}
|
|
4483
|
+
componentDidLoad() {
|
|
4484
|
+
this.hostElement = this.findHostElement();
|
|
4485
|
+
this.registerToForm();
|
|
4486
|
+
}
|
|
4487
|
+
disconnectedCallback() {
|
|
4488
|
+
this.unregisterFromForm();
|
|
4489
|
+
}
|
|
4490
|
+
findHostElement() {
|
|
4491
|
+
for (const tag of FORM_PARENT_TAGS) {
|
|
4492
|
+
const parent = this.el.closest(tag);
|
|
4493
|
+
if (parent && 'value' in parent) {
|
|
4494
|
+
return parent;
|
|
4495
|
+
}
|
|
4496
|
+
}
|
|
4497
|
+
return null;
|
|
4498
|
+
}
|
|
4499
|
+
registerToForm() {
|
|
4500
|
+
if (!this.rules || this.rules.length === 0) {
|
|
4501
|
+
console.warn('[sd-form-field] rules prop is required for sd-form integration');
|
|
4502
|
+
return;
|
|
4503
|
+
}
|
|
4504
|
+
const formEl = this.el.closest('sd-form');
|
|
4505
|
+
if (!formEl)
|
|
4506
|
+
return;
|
|
4507
|
+
formEl.componentOnReady().then(form => {
|
|
4508
|
+
form.sdRegisterField(this);
|
|
4509
|
+
});
|
|
4510
|
+
}
|
|
4511
|
+
unregisterFromForm() {
|
|
4512
|
+
if (!this.name)
|
|
4513
|
+
return;
|
|
4514
|
+
const formEl = this.el.closest('sd-form');
|
|
4515
|
+
formEl?.componentOnReady().then(form => {
|
|
4516
|
+
form.sdUnregisterField(this.name);
|
|
4517
|
+
});
|
|
4518
|
+
}
|
|
4519
|
+
async sdValidate() {
|
|
4520
|
+
if (!this.rules || this.rules.length === 0)
|
|
4521
|
+
return true;
|
|
4522
|
+
for (const rule of this.rules) {
|
|
4523
|
+
const result = rule(this.value ?? '');
|
|
4524
|
+
if (result !== true) {
|
|
4525
|
+
this.setError(true, result);
|
|
4526
|
+
return false;
|
|
4527
|
+
}
|
|
4528
|
+
}
|
|
4529
|
+
this.setError(false, '');
|
|
4530
|
+
return true;
|
|
4531
|
+
}
|
|
4532
|
+
async sdReset() {
|
|
4533
|
+
if (this.hostElement) {
|
|
4534
|
+
this.hostElement.value = null;
|
|
4535
|
+
}
|
|
4536
|
+
this.setError(false, '');
|
|
4537
|
+
}
|
|
4538
|
+
async sdResetValidation() {
|
|
4539
|
+
this.setError(false, '');
|
|
4540
|
+
}
|
|
4541
|
+
async sdFocus() {
|
|
4542
|
+
this.hostElement?.focus?.();
|
|
4543
|
+
this.hostElement?.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
4544
|
+
}
|
|
4545
|
+
setError(error, errorMsg) {
|
|
4546
|
+
this.errorMsg = errorMsg;
|
|
4547
|
+
if (this.hostElement) {
|
|
4548
|
+
this.hostElement.error = error;
|
|
4549
|
+
}
|
|
4550
|
+
}
|
|
4551
|
+
render() {
|
|
4552
|
+
return (hAsync(Host, { key: '16609b3313318dfc4db917a32bd44e6e2cb2f4e7', class: {
|
|
4553
|
+
'sd-field': true,
|
|
4554
|
+
'sd-field--has-label': !!this.label,
|
|
4555
|
+
'sd-field--has-label-inside': !!this.label && this.insideLabel,
|
|
4556
|
+
[this.fieldStatus]: !!this.fieldStatus,
|
|
4557
|
+
} }, hAsync("div", { key: '5c3056123cb54f8d6c26406ae76b13219d289f9c', class: "sd-field__wrapper" }, this.renderLabel(this.label), hAsync("div", { key: '786bcd6ec3651bb226013474fae112c592ec6890', class: {
|
|
4558
|
+
'sd-field__control': true,
|
|
4559
|
+
'sd-field__control--label-inside ': !!this.label && this.insideLabel,
|
|
4560
|
+
} }, hAsync("slot", { key: '60ae2f97cc7225930df9d17958fe78d3dd8e01e3' }))), this.errorMsg && hAsync("div", { key: '4984f7e64c6c6611063c46b5c7ea21a0ae0b5343', class: "sd-field__error-message" }, this.errorMsg)));
|
|
4561
|
+
}
|
|
4562
|
+
renderLabel(label) {
|
|
4563
|
+
if (!label)
|
|
4564
|
+
return null;
|
|
4565
|
+
return (hAsync("label", { class: { 'sd-field__label': true, 'sd-field__label-inside': this.insideLabel } }, this.useLabelRequired && (hAsync("sd-icon", { name: "star", size: "10", color: "brilliantblue_75", class: "sd-field__label__required-icon" })), hAsync("div", { class: "sd-field__label__text" }, label), this.labelTooltip && (hAsync("sd-tooltip", { class: "sd-field__label__tooltip", ...this.labelTooltipProps }, hAsync("div", { slot: "content" }, this.labelTooltip)))));
|
|
4566
|
+
}
|
|
4567
|
+
static get style() { return sdFieldCss(); }
|
|
4568
|
+
static get cmpMeta() { return {
|
|
4569
|
+
"$flags$": 772,
|
|
4570
|
+
"$tagName$": "sd-field",
|
|
4571
|
+
"$members$": {
|
|
4572
|
+
"name": [1],
|
|
4573
|
+
"rules": [16],
|
|
4574
|
+
"error": [1028],
|
|
4575
|
+
"disabled": [1028],
|
|
4576
|
+
"hovered": [1028],
|
|
4577
|
+
"focused": [1028],
|
|
4578
|
+
"status": [1],
|
|
4579
|
+
"label": [1],
|
|
4580
|
+
"insideLabel": [4, "inside-label"],
|
|
4581
|
+
"useLabelRequired": [4, "use-label-required"],
|
|
4582
|
+
"labelTooltip": [1, "label-tooltip"],
|
|
4583
|
+
"labelTooltipProps": [16],
|
|
4584
|
+
"errorMsg": [32],
|
|
4585
|
+
"sdValidate": [64],
|
|
4586
|
+
"sdReset": [64],
|
|
4587
|
+
"sdResetValidation": [64],
|
|
4588
|
+
"sdFocus": [64]
|
|
4589
|
+
},
|
|
4590
|
+
"$listeners$": undefined,
|
|
4591
|
+
"$lazyBundleId$": "-",
|
|
4592
|
+
"$attrsToReflect$": []
|
|
4593
|
+
}; }
|
|
4594
|
+
}
|
|
4595
|
+
|
|
4596
|
+
const sdFilePickerCss = () => `sd-file-picker{display:inline-flex}.sd-file-picker{display:inline-flex;align-items:center;max-width:var(--picker-width, 100%);height:28px;gap:8px;padding:4px 8px;border:1px solid #aaaaaa;border-radius:4px;background-color:#ffffff;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:400;font-size:12px;line-height:20px;color:#aaaaaa}.sd-file-picker__text--active{color:#222222}.sd-file-picker__text--placeholder{color:#aaaaaa}.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:1000;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-file-picker:hover:not(.sd-file-picker--inline):not(.sd-file-picker--disabled){background-color:#f6f6f6}.sd-file-picker--active:not(.sd-file-picker--inline):not(.sd-file-picker--disabled){background-color:#ffffff}.sd-file-picker--active:not(.sd-file-picker--inline):not(.sd-file-picker--disabled) .sd-file-picker__text{color:#222222}.sd-file-picker--disabled:not(.sd-file-picker--inline){background-color:#eeeeee;border-color:#cccccc;cursor:not-allowed !important}.sd-file-picker--disabled:not(.sd-file-picker--inline) .sd-file-picker__text{color:#888888}.sd-file-picker--inline{border:none;background-color:transparent;padding:0;height:auto}.sd-file-picker--inline .sd-file-picker__text{color:#aaaaaa}.sd-file-picker--inline:hover:not(.sd-file-picker--disabled) .sd-file-picker__text{color:#737373}.sd-file-picker--inline.sd-file-picker--active:not(.sd-file-picker--disabled) .sd-file-picker__text--active{color:#222222}.sd-file-picker--inline.sd-file-picker--disabled .sd-file-picker__text{color:#cccccc}`;
|
|
4444
4597
|
|
|
4445
4598
|
class SdFilePicker {
|
|
4446
4599
|
constructor(hostRef) {
|
|
4447
4600
|
registerInstance(this, hostRef);
|
|
4448
|
-
this.
|
|
4601
|
+
this.update = createEvent(this, "sdUpdate");
|
|
4449
4602
|
}
|
|
4450
4603
|
get el() { return getElement(this); }
|
|
4451
4604
|
value = null;
|
|
@@ -4460,7 +4613,7 @@ class SdFilePicker {
|
|
|
4460
4613
|
showTooltip = false;
|
|
4461
4614
|
fileInputRef;
|
|
4462
4615
|
fileNamesRef;
|
|
4463
|
-
|
|
4616
|
+
update;
|
|
4464
4617
|
valueChanged(newValue) {
|
|
4465
4618
|
this.internalValue = newValue;
|
|
4466
4619
|
}
|
|
@@ -4484,14 +4637,14 @@ class SdFilePicker {
|
|
|
4484
4637
|
this.internalValue = fileArray[0];
|
|
4485
4638
|
}
|
|
4486
4639
|
this.value = this.internalValue;
|
|
4487
|
-
this.
|
|
4640
|
+
this.update?.emit(this.value);
|
|
4488
4641
|
};
|
|
4489
4642
|
handleClear = (event) => {
|
|
4490
4643
|
event.stopPropagation();
|
|
4491
4644
|
const clearedValue = this.multiple ? [] : null;
|
|
4492
4645
|
this.value = clearedValue;
|
|
4493
4646
|
this.internalValue = clearedValue;
|
|
4494
|
-
this.
|
|
4647
|
+
this.update?.emit(clearedValue);
|
|
4495
4648
|
if (this.fileInputRef) {
|
|
4496
4649
|
this.fileInputRef.value = '';
|
|
4497
4650
|
}
|
|
@@ -4539,15 +4692,15 @@ class SdFilePicker {
|
|
|
4539
4692
|
render() {
|
|
4540
4693
|
const hasFiles = this.hasFiles();
|
|
4541
4694
|
const displayText = this.getDisplayText();
|
|
4542
|
-
return (hAsync("div", { key: '
|
|
4695
|
+
return (hAsync("div", { key: 'dac7726e25ba3bf4afa0da022cb3e472a8891cec', class: {
|
|
4543
4696
|
'sd-file-picker': true,
|
|
4544
4697
|
[this.getStatusClass()]: true,
|
|
4545
4698
|
'sd-file-picker--inline': this.inline,
|
|
4546
|
-
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("input", { key: '
|
|
4699
|
+
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("input", { key: '1ab733ebf6d98ad792b7b6d06f562b014504a2fe', 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 }), hAsync("sd-icon", { key: 'c82214c83107f01314de1eb380a421fc80af043f', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), hAsync("div", { key: '11f5bfca6d50fd4e78c902ddc52995b3ed399b21', ref: el => (this.fileNamesRef = el), class: {
|
|
4547
4700
|
'sd-file-picker__text': true,
|
|
4548
4701
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
4549
4702
|
'sd-file-picker__text--active': hasFiles,
|
|
4550
|
-
} }, displayText), !this.disabled && hasFiles && (hAsync("sd-icon", { key: '
|
|
4703
|
+
} }, displayText), !this.disabled && hasFiles && (hAsync("sd-icon", { key: 'e429e10a285f12e16d1fa362e51903f12119bf3b', name: "close", size: 12, color: "#888888", class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (hAsync("div", { key: '1a7c924eed094fdb070ed5711a9b09aeea8f3c56', class: "sd-file-picker__tooltip" }, displayText))));
|
|
4551
4704
|
}
|
|
4552
4705
|
static get watchers() { return {
|
|
4553
4706
|
"value": ["valueChanged"]
|
|
@@ -4574,150 +4727,403 @@ class SdFilePicker {
|
|
|
4574
4727
|
}; }
|
|
4575
4728
|
}
|
|
4576
4729
|
|
|
4577
|
-
const
|
|
4730
|
+
const sdFloatingPortalCss = () => `.sd-floating-menu{width:fit-content;padding:12px 20px;border-radius:4px;font-size:12px;position:relative;box-sizing:border-box;background:#07284a;color:#ffffff}.sd-floating-menu .sd-floating-menu__arrow{color:#07284a}.sd-floating-menu--default{background:#07284a;color:#ffffff}.sd-floating-menu--default .sd-floating-menu__arrow{color:#07284a}.sd-floating-menu--caution{background:#fce6e6;color:#fb4444}.sd-floating-menu--caution .sd-floating-menu__arrow{color:#fce6e6}.sd-floating-menu--notice{background:#ffead7;color:#ff6b00}.sd-floating-menu--notice .sd-floating-menu__arrow{color:#ffead7}.sd-floating-menu--accent{background:#e6f1ff;color:#0075ff}.sd-floating-menu--accent .sd-floating-menu__arrow{color:#e6f1ff}.sd-floating-menu__arrow{position:absolute;display:flex;width:9.6px;height:7.2px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-7.2px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-7.2px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-7.2px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-7.2px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-weight:700;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center}.sd-floating-menu__content .sd-floating-menu__buttons--1{justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--2{justify-content:space-between}.sd-floating-menu__close-button{position:absolute;top:16px;right:12px;padding:0;background:none;border:none;cursor:pointer}`;
|
|
4578
4731
|
|
|
4579
|
-
|
|
4580
|
-
help: '활용 TIP',
|
|
4581
|
-
pdf: 'PDF Guide',
|
|
4582
|
-
youtube: 'Video Guide',
|
|
4583
|
-
notion: '사용법 안내',
|
|
4584
|
-
event: 'Event Button',
|
|
4585
|
-
};
|
|
4586
|
-
const GUIDE_ICON = {
|
|
4587
|
-
help: {
|
|
4588
|
-
name: 'helpOutline',
|
|
4589
|
-
size: 20,
|
|
4590
|
-
color: colors$1.green_75,
|
|
4591
|
-
},
|
|
4592
|
-
pdf: { name: 'pdf', size: 20, color: colors$1.red_75 },
|
|
4593
|
-
youtube: { name: 'youtube', size: 20, color: colors$1.red_75 },
|
|
4594
|
-
notion: { name: 'notion', size: 16, color: colors$1.black },
|
|
4595
|
-
event: { name: 'event', size: 16, color: colors$1.brilliantblue_70 },
|
|
4596
|
-
};
|
|
4597
|
-
class SdGuide {
|
|
4732
|
+
class SdFloatingPopover {
|
|
4598
4733
|
constructor(hostRef) {
|
|
4599
4734
|
registerInstance(this, hostRef);
|
|
4735
|
+
this.close = createEvent(this, "sdClose");
|
|
4600
4736
|
}
|
|
4601
4737
|
get el() { return getElement(this); }
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4738
|
+
to = 'body';
|
|
4739
|
+
parentRef = null;
|
|
4740
|
+
offset = [0, 0];
|
|
4741
|
+
zIndex = 9999;
|
|
4742
|
+
placement = 'bottom';
|
|
4743
|
+
open = false;
|
|
4744
|
+
close;
|
|
4745
|
+
container;
|
|
4746
|
+
wrapper;
|
|
4747
|
+
rafId;
|
|
4748
|
+
isInsideClick = false;
|
|
4749
|
+
resizeObserver;
|
|
4750
|
+
mutationObserver;
|
|
4751
|
+
static ARROW_SIZE = 11.2;
|
|
4752
|
+
componentDidLoad() {
|
|
4753
|
+
this.container = this.resolveContainer();
|
|
4754
|
+
this.createWrapper();
|
|
4755
|
+
this.moveSlotContent();
|
|
4756
|
+
// DOM이 완전히 렌더링된 후 위치 계산
|
|
4757
|
+
requestAnimationFrame(() => {
|
|
4758
|
+
this.updatePosition();
|
|
4759
|
+
if (this.wrapper) {
|
|
4760
|
+
this.wrapper.style.visibility = 'visible'; // 위치 계산 후 표시
|
|
4761
|
+
}
|
|
4762
|
+
});
|
|
4763
|
+
this.observeParent();
|
|
4764
|
+
}
|
|
4765
|
+
componentDidRender() {
|
|
4766
|
+
if (!this.wrapper)
|
|
4613
4767
|
return;
|
|
4768
|
+
// this.wrapper.style.display = this.open ? 'block' : 'none';
|
|
4769
|
+
// if (this.open) this.updatePosition();
|
|
4770
|
+
if (this.open) {
|
|
4771
|
+
this.wrapper.style.display = 'block';
|
|
4772
|
+
// RAF를 사용해서 다음 프레임에 위치 업데이트
|
|
4773
|
+
requestAnimationFrame(() => {
|
|
4774
|
+
this.updatePosition();
|
|
4775
|
+
if (this.wrapper) {
|
|
4776
|
+
this.wrapper.style.visibility = 'visible';
|
|
4777
|
+
}
|
|
4778
|
+
});
|
|
4614
4779
|
}
|
|
4615
|
-
|
|
4616
|
-
|
|
4780
|
+
else {
|
|
4781
|
+
this.wrapper.style.display = 'none';
|
|
4782
|
+
this.wrapper.style.visibility = 'hidden';
|
|
4617
4783
|
}
|
|
4618
|
-
};
|
|
4619
|
-
get guideClass() {
|
|
4620
|
-
const classes = ['sd-guide', `sd-guide--${this.type}`];
|
|
4621
|
-
if (this.popupShow)
|
|
4622
|
-
classes.push('sd-guide--active');
|
|
4623
|
-
return classes.join(' ');
|
|
4624
4784
|
}
|
|
4625
|
-
|
|
4626
|
-
this.
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
return (hAsync(Host, { key: '4b773c02856acdbe87d17794d2b09d03687cbfbf', style: {
|
|
4631
|
-
'--sd-guide-color': GUIDE_ICON[this.type].color,
|
|
4632
|
-
} }, hAsync("sd-button", { key: '32f7288469230a3b9f63ee4518e12cd96dc954c5', ref: el => (this.guideRef = el), class: this.guideClass, variant: this.popupShow ? 'primary' : 'outline', label: this.label || GUIDE_LABEL[this.type], size: "sm", color: this.popupShow ? GUIDE_ICON[this.type].color : 'grey_45', icon: iconName, iconColor: this.popupShow ? 'white' : iconColor, iconSize: iconSize, noHover: this.popupShow, onSdClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (hAsync("sd-portal", { key: 'e2f58c514c9f8a7ddf3cbfa01e595476df40555f', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, hAsync("div", { key: '8ecbb7b326c6f69661bc809efcbb9ebbd148e9e8', style: { position: 'absolute', width: '0px', height: '0px' } }, hAsync("div", { key: 'b778c386e9ae56bc55405e80fce8e8b15d92ab80', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, hAsync("sd-button", { key: 'b4e6890b28ffab4ca79119ece1515f898a4b8bdb', class: "sd-guide__popup__close", icon: "close", color: colors$1.grey_65, size: "md", variant: "ghost", noHover: true, onSdClick: this.closeDropdown }), hAsync("div", { key: '8e4ee14399a891be25f4df846e2ff64a26a5bd76', class: "sd-guide__popup__header" }, hAsync("sd-icon", { key: '4de462413f81c110c6bb53984d8a49d3716e1357', name: "helpOutline", size: 24, color: colors$1.green_65 }), hAsync("h3", { key: '2193a1b5759a97907264f9054bea9ad4042716bd', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), hAsync("ul", { key: '455f1c2e9cfb7752d45937d21d2d38e182bfb6ca', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
|
|
4785
|
+
disconnectedCallback() {
|
|
4786
|
+
if (this.rafId)
|
|
4787
|
+
cancelAnimationFrame(this.rafId);
|
|
4788
|
+
this.unobserveParent();
|
|
4789
|
+
this.wrapper?.remove();
|
|
4633
4790
|
}
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
if (Array.isArray(message)) {
|
|
4638
|
-
const depthMsg = message.map(msg => this.renderListItem(msg, depth + 1));
|
|
4639
|
-
listItems.push(...depthMsg.flat());
|
|
4640
|
-
}
|
|
4641
|
-
else {
|
|
4642
|
-
listItems.push(this.renderLi(message, depth));
|
|
4643
|
-
}
|
|
4644
|
-
return listItems;
|
|
4791
|
+
resolveContainer() {
|
|
4792
|
+
const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;
|
|
4793
|
+
return el instanceof HTMLElement ? el : document.body;
|
|
4645
4794
|
}
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
const
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
const
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4795
|
+
createWrapper() {
|
|
4796
|
+
this.wrapper = document.createElement('div');
|
|
4797
|
+
Object.assign(this.wrapper.style, {
|
|
4798
|
+
position: 'absolute',
|
|
4799
|
+
zIndex: this.zIndex.toString(),
|
|
4800
|
+
transition: 'opacity 0.4s',
|
|
4801
|
+
top: '-9999px',
|
|
4802
|
+
left: '-9999px',
|
|
4803
|
+
});
|
|
4804
|
+
this.container.appendChild(this.wrapper);
|
|
4805
|
+
}
|
|
4806
|
+
moveSlotContent() {
|
|
4807
|
+
if (!this.wrapper)
|
|
4808
|
+
return;
|
|
4809
|
+
const nodes = Array.from(this.el.childNodes).filter(n => n.nodeType !== Node.COMMENT_NODE);
|
|
4810
|
+
nodes.forEach(n => this.wrapper.appendChild(n));
|
|
4811
|
+
}
|
|
4812
|
+
// 위치 갱신 (scroll / resize)
|
|
4813
|
+
updatePosition() {
|
|
4814
|
+
if (this.rafId)
|
|
4815
|
+
cancelAnimationFrame(this.rafId);
|
|
4816
|
+
this.rafId = requestAnimationFrame(() => {
|
|
4817
|
+
if (!this.parentRef || !this.wrapper)
|
|
4818
|
+
return;
|
|
4819
|
+
const rect = this.parentRef.getBoundingClientRect();
|
|
4820
|
+
if (!rect.width && !rect.height)
|
|
4821
|
+
return; // 요소가 보이지 않는 경우
|
|
4822
|
+
const [offsetX, offsetY] = this.offset;
|
|
4823
|
+
const ARROW_SIZE = SdFloatingPopover.ARROW_SIZE;
|
|
4824
|
+
let top = 0;
|
|
4825
|
+
let left = 0;
|
|
4826
|
+
switch (this.placement) {
|
|
4827
|
+
case 'top':
|
|
4828
|
+
top = rect.top + window.scrollY - this.wrapper.offsetHeight + offsetY - ARROW_SIZE;
|
|
4829
|
+
left = rect.left + window.scrollX + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
4830
|
+
break;
|
|
4831
|
+
case 'bottom':
|
|
4832
|
+
top = rect.bottom + window.scrollY + offsetY + ARROW_SIZE;
|
|
4833
|
+
left = rect.left + window.scrollX + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
4834
|
+
break;
|
|
4835
|
+
case 'left':
|
|
4836
|
+
top = rect.top + window.scrollY + rect.height / 2 - this.wrapper.offsetHeight / 2 + offsetY;
|
|
4837
|
+
left = rect.left + window.scrollX - this.wrapper.offsetWidth - offsetX - ARROW_SIZE;
|
|
4838
|
+
break;
|
|
4839
|
+
case 'right':
|
|
4840
|
+
top = rect.top + window.scrollY + rect.height / 2 - this.wrapper.offsetHeight / 2 + offsetY;
|
|
4841
|
+
left = rect.right + window.scrollX + offsetX + ARROW_SIZE;
|
|
4842
|
+
break;
|
|
4843
|
+
}
|
|
4844
|
+
Object.assign(this.wrapper.style, {
|
|
4845
|
+
top: `${top}px`,
|
|
4846
|
+
left: `${left}px`,
|
|
4847
|
+
});
|
|
4848
|
+
});
|
|
4849
|
+
}
|
|
4850
|
+
// parentRef의 이동 / 크기변경 감지
|
|
4851
|
+
observeParent() {
|
|
4852
|
+
if (!this.parentRef)
|
|
4853
|
+
return;
|
|
4854
|
+
this.resizeObserver = new ResizeObserver(() => this.updatePosition());
|
|
4855
|
+
this.resizeObserver.observe(this.parentRef);
|
|
4856
|
+
this.mutationObserver = new MutationObserver(() => this.updatePosition());
|
|
4857
|
+
this.mutationObserver.observe(document.body, {
|
|
4858
|
+
childList: true,
|
|
4859
|
+
subtree: true,
|
|
4860
|
+
});
|
|
4861
|
+
}
|
|
4862
|
+
unobserveParent() {
|
|
4863
|
+
this.resizeObserver?.disconnect();
|
|
4864
|
+
this.mutationObserver?.disconnect();
|
|
4865
|
+
}
|
|
4866
|
+
// 외부 클릭 감지
|
|
4867
|
+
handleMouseDown(e) {
|
|
4868
|
+
this.isInsideClick = !!((this.wrapper && this.wrapper.contains(e.target)) ||
|
|
4869
|
+
(this.parentRef && this.parentRef.contains(e.target)));
|
|
4870
|
+
}
|
|
4871
|
+
handleWindowClick(e) {
|
|
4872
|
+
if (this.isInsideClick) {
|
|
4873
|
+
this.isInsideClick = false;
|
|
4874
|
+
return;
|
|
4875
|
+
}
|
|
4876
|
+
if (this.wrapper?.contains(e.target))
|
|
4877
|
+
return;
|
|
4878
|
+
this.close.emit();
|
|
4879
|
+
}
|
|
4880
|
+
render() {
|
|
4881
|
+
return hAsync("slot", { key: 'f2000891d7d3bd71982f591bf953d1421f67fb5e' });
|
|
4882
|
+
}
|
|
4883
|
+
static get style() { return sdFloatingPortalCss(); }
|
|
4884
|
+
static get cmpMeta() { return {
|
|
4885
|
+
"$flags$": 772,
|
|
4886
|
+
"$tagName$": "sd-floating-portal",
|
|
4887
|
+
"$members$": {
|
|
4888
|
+
"to": [1],
|
|
4889
|
+
"parentRef": [16],
|
|
4890
|
+
"offset": [16],
|
|
4891
|
+
"zIndex": [2, "z-index"],
|
|
4892
|
+
"placement": [1],
|
|
4893
|
+
"open": [4]
|
|
4894
|
+
},
|
|
4895
|
+
"$listeners$": [[9, "scroll", "updatePosition"], [9, "resize", "updatePosition"], [9, "mousedown", "handleMouseDown"], [8, "click", "handleWindowClick"]],
|
|
4896
|
+
"$lazyBundleId$": "-",
|
|
4897
|
+
"$attrsToReflect$": []
|
|
4898
|
+
}; }
|
|
4899
|
+
}
|
|
4900
|
+
|
|
4901
|
+
class SdForm {
|
|
4902
|
+
constructor(hostRef) {
|
|
4903
|
+
registerInstance(this, hostRef);
|
|
4904
|
+
this.submitSuccess = createEvent(this, "sdSubmit");
|
|
4905
|
+
this.submitFail = createEvent(this, "sdValidationError");
|
|
4906
|
+
}
|
|
4907
|
+
fields = [];
|
|
4908
|
+
submitSuccess;
|
|
4909
|
+
submitFail;
|
|
4910
|
+
sortFieldsByDomOrder() {
|
|
4911
|
+
this.fields.sort((a, b) => {
|
|
4912
|
+
const elA = a.el;
|
|
4913
|
+
const elB = b.el;
|
|
4914
|
+
if (!elA || !elB)
|
|
4915
|
+
return 0;
|
|
4916
|
+
return elA.compareDocumentPosition(elB) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
4917
|
+
});
|
|
4918
|
+
}
|
|
4919
|
+
async sdRegisterField(field) {
|
|
4920
|
+
if (!field.name) {
|
|
4921
|
+
console.warn('[sd-form] field.name is required');
|
|
4922
|
+
return;
|
|
4923
|
+
}
|
|
4924
|
+
if (this.fields.find(f => f.name === field.name))
|
|
4925
|
+
return;
|
|
4926
|
+
this.fields.push(field);
|
|
4927
|
+
this.sortFieldsByDomOrder();
|
|
4928
|
+
}
|
|
4929
|
+
async sdUnregisterField(name) {
|
|
4930
|
+
this.fields = this.fields.filter(f => f.name !== name);
|
|
4931
|
+
}
|
|
4932
|
+
async sdValidate() {
|
|
4933
|
+
const fieldValidationResults = await Promise.all(this.fields.map(async (field) => {
|
|
4934
|
+
const valid = await field.sdValidate();
|
|
4935
|
+
return {
|
|
4936
|
+
field,
|
|
4937
|
+
valid,
|
|
4938
|
+
};
|
|
4939
|
+
}));
|
|
4940
|
+
const isInValid = fieldValidationResults.find(result => {
|
|
4941
|
+
return !result.valid;
|
|
4942
|
+
});
|
|
4943
|
+
if (isInValid) {
|
|
4944
|
+
isInValid.field.sdFocus();
|
|
4945
|
+
isInValid.field.sdScrollIntoView?.();
|
|
4946
|
+
}
|
|
4947
|
+
return !isInValid;
|
|
4948
|
+
}
|
|
4949
|
+
async sdReset() {
|
|
4950
|
+
this.fields.forEach(f => f.sdReset());
|
|
4951
|
+
}
|
|
4952
|
+
async sdResetValidation() {
|
|
4953
|
+
this.fields.forEach(f => f.sdResetValidation());
|
|
4954
|
+
}
|
|
4955
|
+
async onSubmit(e) {
|
|
4956
|
+
e.preventDefault();
|
|
4957
|
+
const valid = await this.sdValidate();
|
|
4958
|
+
if (!valid) {
|
|
4959
|
+
this.submitFail.emit();
|
|
4960
|
+
return;
|
|
4961
|
+
}
|
|
4962
|
+
this.submitSuccess.emit();
|
|
4963
|
+
}
|
|
4964
|
+
render() {
|
|
4965
|
+
return (hAsync("form", { key: '90203497cd0cb8910f35fd6ac91cb472f89a452f', onSubmit: e => this.onSubmit(e) }, hAsync("slot", { key: '8776a3ecf66efffe1f01288e1e18b575d1778ef3' })));
|
|
4966
|
+
}
|
|
4967
|
+
static get cmpMeta() { return {
|
|
4968
|
+
"$flags$": 260,
|
|
4969
|
+
"$tagName$": "sd-form",
|
|
4970
|
+
"$members$": {
|
|
4971
|
+
"sdRegisterField": [64],
|
|
4972
|
+
"sdUnregisterField": [64],
|
|
4973
|
+
"sdValidate": [64],
|
|
4974
|
+
"sdReset": [64],
|
|
4975
|
+
"sdResetValidation": [64]
|
|
4976
|
+
},
|
|
4977
|
+
"$listeners$": undefined,
|
|
4978
|
+
"$lazyBundleId$": "-",
|
|
4979
|
+
"$attrsToReflect$": []
|
|
4980
|
+
}; }
|
|
4981
|
+
}
|
|
4982
|
+
|
|
4983
|
+
const sdGuideCss = () => `@charset "UTF-8";sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{text-decoration:none;cursor:pointer;border-radius:4px;transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none}.sd-button--xs{padding:0 8px;font-size:12px;font-weight:500;line-height:20px;min-height:24px}.sd-button--sm{padding:0 12px;font-size:12px;font-weight:500;line-height:20px;min-height:28px}.sd-button--md{padding:0 20px;font-size:16px;font-weight:500;line-height:26px;min-height:34px}.sd-button--lg{padding:0 28px;font-size:18px;font-weight:500;line-height:30px;min-height:62px}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:"";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:1px solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:"";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:1px solid #cccccc;background:#e1e1e1;color:#888888;cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:fit-content;height:fit-content;aspect-ratio:1/1}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:4px;z-index:1;font-weight:500}sd-guide{display:inline-flex;align-items:center}sd-guide .sd-guide{display:inline-flex}sd-guide .sd-guide .sd-button{padding:0 16px 0 12px;border-radius:16px;color:#333333 !important;display:flex;align-items:center;transition:none}sd-guide .sd-guide .sd-button .sd-button__content{color:#333333 !important}sd-guide .sd-guide .sd-button .sd-button__content .sd-button__label{color:#333333 !important;margin-left:4px}sd-guide .sd-guide--active .sd-button{border:1px solid #00973c}sd-guide .sd-guide--active .sd-button .sd-button__content .sd-button__label{color:white !important}.sd-guide__popup{position:relative;padding:20px 32px;border-radius:8px;box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:8px;margin-bottom:12px}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;font-size:16px;font-weight:700;line-height:26px;color:#333333}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:#333333;font-size:12px;font-weight:400}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:#333333;font-size:12px;font-weight:400;margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}`;
|
|
4984
|
+
|
|
4985
|
+
const GUIDE_LABEL = {
|
|
4986
|
+
help: '활용 TIP',
|
|
4987
|
+
pdf: 'PDF Guide',
|
|
4988
|
+
youtube: 'Video Guide',
|
|
4989
|
+
notion: '사용법 안내',
|
|
4990
|
+
event: 'Event Button',
|
|
4991
|
+
};
|
|
4992
|
+
const GUIDE_ICON = {
|
|
4993
|
+
help: {
|
|
4994
|
+
name: 'helpOutline',
|
|
4995
|
+
size: 20,
|
|
4996
|
+
color: 'green_75',
|
|
4997
|
+
},
|
|
4998
|
+
pdf: { name: 'pdf', size: 20, color: 'red_75' },
|
|
4999
|
+
youtube: { name: 'youtube', size: 20, color: 'red_75' },
|
|
5000
|
+
notion: { name: 'notion', size: 16, color: 'black' },
|
|
5001
|
+
event: { name: 'event', size: 16, color: 'brilliantblue_70' },
|
|
5002
|
+
};
|
|
5003
|
+
class SdGuide {
|
|
5004
|
+
constructor(hostRef) {
|
|
5005
|
+
registerInstance(this, hostRef);
|
|
5006
|
+
}
|
|
5007
|
+
get el() { return getElement(this); }
|
|
5008
|
+
type = 'help';
|
|
5009
|
+
label = '';
|
|
5010
|
+
message = '';
|
|
5011
|
+
guideUrl = '';
|
|
5012
|
+
popupTitle = '';
|
|
5013
|
+
popupWidth;
|
|
5014
|
+
popupShow = false;
|
|
5015
|
+
guideRef;
|
|
5016
|
+
handleClickGuide = () => {
|
|
5017
|
+
if (this.type === 'help') {
|
|
5018
|
+
this.popupShow = !this.popupShow;
|
|
5019
|
+
return;
|
|
5020
|
+
}
|
|
5021
|
+
if (this.guideUrl) {
|
|
5022
|
+
window.open(this.guideUrl, '_blank');
|
|
5023
|
+
}
|
|
5024
|
+
};
|
|
5025
|
+
get guideClass() {
|
|
5026
|
+
const classes = ['sd-guide', `sd-guide--${this.type}`];
|
|
5027
|
+
if (this.popupShow)
|
|
5028
|
+
classes.push('sd-guide--active');
|
|
5029
|
+
return classes.join(' ');
|
|
5030
|
+
}
|
|
5031
|
+
closeDropdown = () => {
|
|
5032
|
+
this.popupShow = false;
|
|
5033
|
+
};
|
|
5034
|
+
render() {
|
|
5035
|
+
const { name: iconName, size: iconSize, color: iconColor } = GUIDE_ICON[this.type];
|
|
5036
|
+
return (hAsync(Host, { key: 'a7a284528f1bf4c24cbf4c645c600bfdb8ac3397', style: {
|
|
5037
|
+
'--sd-guide-color': GUIDE_ICON[this.type].color,
|
|
5038
|
+
} }, hAsync("sd-button", { key: '7a31bb752942f693d77e687b7ee433772f0fb968', ref: el => (this.guideRef = el), class: this.guideClass, variant: this.popupShow ? 'primary' : 'outline', label: this.label || GUIDE_LABEL[this.type], size: "sm", color: this.popupShow ? GUIDE_ICON[this.type].color : 'grey_45', icon: iconName, iconColor: this.popupShow ? 'white' : iconColor, iconSize: iconSize, noHover: this.popupShow, onClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (hAsync("sd-portal", { key: 'b90a2c0594d2b9a09aad39954400fc648b14b776', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, hAsync("div", { key: '5f74f1b359de72ce3224a6d85971dc599e9eca11', style: { position: 'absolute', width: '0px', height: '0px' } }, hAsync("div", { key: 'c7f0fea72dec238904e6ec696f0de8d7b4d99139', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, hAsync("sd-button", { key: '91d375b51051cc6689d57a22615ece587592d4cd', class: "sd-guide__popup__close", icon: "close", color: "grey_65", size: "md", variant: "ghost", noHover: true, onClick: this.closeDropdown }), hAsync("div", { key: '182d31b38da2082c18ed6d25d6879e8e5d5fc839', class: "sd-guide__popup__header" }, hAsync("sd-icon", { key: '21a45f953f436528e8a5a0d08af988cb7cbbbf0c', name: "helpOutline", size: 24, color: "green_65" }), hAsync("h3", { key: 'f6f24e6584b585fb6719327fed01bff87df8b9b9', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), hAsync("ul", { key: '87fc85b3bb2bdd0e902bd7dc81cd6e36447d5241', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
|
|
5039
|
+
}
|
|
5040
|
+
// 현재 2depth까지만 스타일 적용
|
|
5041
|
+
renderListItem(message, depth = 0) {
|
|
5042
|
+
const listItems = [];
|
|
5043
|
+
if (Array.isArray(message)) {
|
|
5044
|
+
const depthMsg = message.map(msg => this.renderListItem(msg, depth + 1));
|
|
5045
|
+
listItems.push(...depthMsg.flat());
|
|
5046
|
+
}
|
|
5047
|
+
else {
|
|
5048
|
+
listItems.push(this.renderLi(message, depth));
|
|
5049
|
+
}
|
|
5050
|
+
return listItems;
|
|
5051
|
+
}
|
|
5052
|
+
renderLi = (message, depth) => {
|
|
5053
|
+
return (hAsync("li", { class: `sd-guide__popup__list__item sd-guide__popup__list__item--depth-${depth}` }, hAsync("p", { innerHTML: message })));
|
|
5054
|
+
};
|
|
5055
|
+
static get style() { return sdGuideCss(); }
|
|
5056
|
+
static get cmpMeta() { return {
|
|
5057
|
+
"$flags$": 768,
|
|
5058
|
+
"$tagName$": "sd-guide",
|
|
5059
|
+
"$members$": {
|
|
5060
|
+
"type": [1],
|
|
5061
|
+
"label": [1],
|
|
5062
|
+
"message": [1],
|
|
5063
|
+
"guideUrl": [1, "guide-url"],
|
|
5064
|
+
"popupTitle": [1, "popup-title"],
|
|
5065
|
+
"popupWidth": [2, "popup-width"],
|
|
5066
|
+
"popupShow": [32]
|
|
5067
|
+
},
|
|
5068
|
+
"$listeners$": undefined,
|
|
5069
|
+
"$lazyBundleId$": "-",
|
|
5070
|
+
"$attrsToReflect$": []
|
|
5071
|
+
}; }
|
|
5072
|
+
}
|
|
5073
|
+
|
|
5074
|
+
const Add8 = (props) => (hAsync("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M3.99969 0.633484C4.16537 0.633484 4.29948 0.767622 4.2995 0.933289V3.69989H7.06708C7.23245 3.70014 7.36672 3.8343 7.36688 3.99969C7.36688 4.16523 7.23255 4.29925 7.06708 4.2995H4.2995V7.06708C4.29925 7.23255 4.16523 7.36688 3.99969 7.36688C3.8343 7.36672 3.70014 7.23245 3.69989 7.06708V4.2995H0.933289C0.767622 4.29948 0.633484 4.16537 0.633484 3.99969C0.633648 3.83416 0.767724 3.69991 0.933289 3.69989H3.69989V0.933289C3.69991 0.767724 3.83416 0.633648 3.99969 0.633484Z", fill: "currentColor" })));
|
|
5075
|
+
|
|
5076
|
+
const Add10 = (props) => (hAsync("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M5 0.766602C5.22088 0.766602 5.40034 0.946123 5.40039 1.16699V4.59961H8.83398C9.05461 4.59978 9.23317 4.77939 9.2334 5C9.2334 5.22081 9.05475 5.40022 8.83398 5.40039H5.40039V8.83398C5.40021 9.05475 5.22081 9.2334 5 9.2334C4.77939 9.23317 4.59979 9.05461 4.59961 8.83398V5.40039H1.16699C0.946123 5.40034 0.766602 5.22088 0.766602 5C0.766833 4.77931 0.946265 4.59966 1.16699 4.59961H4.59961V1.16699C4.59966 0.946265 4.77931 0.766833 5 0.766602Z", fill: "currentColor" })));
|
|
5077
|
+
|
|
5078
|
+
const Add12 = (props) => (hAsync("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M6.00049 0.899902C6.27638 0.900166 6.50044 1.12396 6.50049 1.3999V5.50049H10.6001C10.8762 5.50059 11.1001 5.72441 11.1001 6.00049C11.0998 6.27634 10.876 6.50038 10.6001 6.50049H6.49951V10.6001C6.49941 10.8762 6.27559 11.1001 5.99951 11.1001C5.72366 11.0998 5.49962 10.876 5.49951 10.6001V6.50049H1.3999C1.12396 6.50044 0.900166 6.27638 0.899902 6.00049C0.899902 5.72438 1.1238 5.50054 1.3999 5.50049H5.50049V1.3999C5.50054 1.1238 5.72438 0.899902 6.00049 0.899902Z", fill: "currentColor" })));
|
|
5079
|
+
|
|
5080
|
+
const Add16 = (props) => (hAsync("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M8.00031 1.36655C8.27627 1.36671 8.50024 1.59056 8.50031 1.86655V7.50034H14.1331C14.4093 7.50034 14.6331 7.72419 14.6331 8.00034C14.6329 8.27632 14.4091 8.50034 14.1331 8.50034H8.50031V14.1331L8.49054 14.2337C8.44406 14.4616 8.24191 14.633 8.00031 14.6331C7.75857 14.6331 7.55657 14.4617 7.51007 14.2337L7.50031 14.1331V8.50034H1.86652C1.59055 8.50026 1.3667 8.27628 1.36652 8.00034C1.36652 7.72424 1.59044 7.50041 1.86652 7.50034H7.50031V1.86655C7.50037 1.59046 7.7242 1.36655 8.00031 1.36655Z", fill: "currentColor" })));
|
|
5081
|
+
|
|
5082
|
+
const Add20 = (props) => (hAsync("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M10.0005 1.7085C10.3455 1.70859 10.6254 1.98845 10.6255 2.3335V9.37549H17.6665C18.0117 9.37549 18.2915 9.65531 18.2915 10.0005C18.2914 10.3456 18.0116 10.6255 17.6665 10.6255H10.6255V17.6665C10.6255 18.0116 10.3456 18.2914 10.0005 18.2915C9.65531 18.2915 9.37549 18.0117 9.37549 17.6665V10.6255H2.3335C1.98843 10.6254 1.70858 10.3456 1.7085 10.0005C1.7085 9.65535 1.98838 9.37556 2.3335 9.37549H9.37549V2.3335C9.37558 1.98839 9.65536 1.7085 10.0005 1.7085Z", fill: "currentColor" })));
|
|
5083
|
+
|
|
5084
|
+
const Add24 = (props) => (hAsync("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M12 2.0498C12.4142 2.0498 12.7499 2.38568 12.75 2.7998V11.25H21.2002L21.2764 11.2539C21.6546 11.2923 21.9502 11.6116 21.9502 12C21.9502 12.3884 21.6546 12.7077 21.2764 12.7461L21.2002 12.75H12.75V21.2002L12.7461 21.2764C12.7077 21.6546 12.3884 21.9502 12 21.9502C11.6116 21.9502 11.2923 21.6546 11.2539 21.2764L11.25 21.2002V12.75H2.7998C2.38568 12.7499 2.0498 12.4142 2.0498 12C2.0498 11.5858 2.38568 11.2501 2.7998 11.25H11.25V2.7998C11.2501 2.38568 11.5858 2.0498 12 2.0498Z", fill: "currentColor" })));
|
|
5085
|
+
|
|
5086
|
+
const add = {
|
|
5087
|
+
8: Add8,
|
|
5088
|
+
10: Add10,
|
|
5089
|
+
12: Add12,
|
|
5090
|
+
16: Add16,
|
|
5091
|
+
20: Add20,
|
|
5092
|
+
24: Add24,
|
|
5093
|
+
};
|
|
5094
|
+
|
|
5095
|
+
var Add = /*#__PURE__*/Object.freeze({
|
|
5096
|
+
__proto__: null,
|
|
5097
|
+
add: add
|
|
5098
|
+
});
|
|
5099
|
+
|
|
5100
|
+
const Alert8 = (props) => (hAsync("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M4.13342 1.06958C4.55552 0.823815 5.0854 1.12799 5.08557 1.61646V6.38306C5.08552 6.85758 4.58317 7.16334 4.16174 6.94556L1.95471 5.802H1.59143C1.05758 5.80198 0.624644 5.36906 0.624634 4.83521V3.31079C0.624851 2.77711 1.05771 2.34402 1.59143 2.34399H1.9469L4.13342 1.06958ZM4.43616 1.58813L2.32776 2.81665V5.3186L4.43713 6.41235C4.44445 6.41611 4.44986 6.41646 4.45374 6.41626C4.45842 6.41599 4.46474 6.41478 4.47034 6.41138C4.47568 6.40799 4.47975 6.40356 4.48206 6.39966C4.48397 6.3963 4.48595 6.39114 4.48596 6.38306V1.61646C4.48593 1.60803 4.48396 1.60309 4.48206 1.59985C4.47962 1.59582 4.47533 1.59063 4.46936 1.58716C4.46358 1.58386 4.45739 1.58244 4.45276 1.58228C4.449 1.58222 4.44356 1.58387 4.43616 1.58813ZM6.20667 2.35278C6.3255 2.23733 6.51751 2.23733 6.63635 2.35278C7.62194 3.3103 7.62194 4.86304 6.63635 5.82056C6.51762 5.93512 6.32529 5.93528 6.20667 5.82056C6.08798 5.70526 6.08732 5.5171 6.20569 5.40161C6.95361 4.675 6.95458 3.49639 6.20667 2.76978C6.08812 2.65439 6.08815 2.46819 6.20667 2.35278ZM1.59143 2.9436C1.38908 2.94363 1.22446 3.10848 1.22424 3.31079V4.83521C1.22425 5.03769 1.38895 5.20139 1.59143 5.20142H1.72717V2.9436H1.59143ZM5.47131 3.06665C5.59007 2.9514 5.78218 2.95151 5.901 3.06665C6.48041 3.62955 6.48041 4.54281 5.901 5.10571C5.78224 5.22052 5.59 5.22063 5.47131 5.10571C5.35257 4.99035 5.35179 4.80224 5.47034 4.68677C5.81204 4.35477 5.81304 3.81661 5.47131 3.48462C5.35248 3.36917 5.35248 3.1821 5.47131 3.06665Z", fill: "currentColor" })));
|
|
5101
|
+
|
|
5102
|
+
const Alert10 = (props) => (hAsync("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M5.15332 1.31549C5.69776 0.998135 6.38184 1.39136 6.38184 2.02155V7.97955C6.38159 8.59158 5.73295 8.98572 5.18945 8.70416L2.4375 7.27838H1.98828C1.30743 7.27813 0.755012 6.72587 0.754883 6.04498V4.13873C0.755059 3.45789 1.30745 2.90559 1.98828 2.90533H2.42676L5.15332 1.31549ZM5.55664 2.0069L2.93457 3.53522V6.63483L5.55762 7.9942C5.5603 7.99557 5.56261 7.99599 5.56348 7.99615H5.56543C5.56706 7.99602 5.5699 7.99518 5.57324 7.99323C5.57675 7.99109 5.57916 7.9888 5.58008 7.98737L5.58105 7.98541C5.58124 7.98473 5.582 7.98284 5.58203 7.97955V2.02155C5.58203 2.01775 5.58124 2.01537 5.58105 2.01471L5.58008 2.01276C5.57917 2.01139 5.57697 2.00905 5.57324 2.0069C5.56932 2.00468 5.56598 2.00399 5.56445 2.00397H5.5625C5.56169 2.00424 5.55963 2.00516 5.55664 2.0069ZM7.74023 2.92291C7.8987 2.76916 8.15607 2.76904 8.31445 2.92291C9.5561 4.12941 9.5552 6.0856 8.31348 7.29205C8.15507 7.44575 7.89864 7.44575 7.74023 7.29205C7.58204 7.13816 7.58203 6.88832 7.74023 6.73444C8.66473 5.83579 8.66497 4.37903 7.74023 3.48053C7.58178 3.32659 7.58178 3.07685 7.74023 2.92291ZM6.82031 3.81549C6.97864 3.66183 7.2361 3.66199 7.39453 3.81549C8.12864 4.52868 8.12853 5.68622 7.39453 6.39948C7.23609 6.55303 6.97865 6.55319 6.82031 6.39948C6.66202 6.24553 6.66289 5.99574 6.82129 5.84186C7.23838 5.43647 7.23751 4.7794 6.82031 4.37408C6.66188 4.22015 6.66187 3.96942 6.82031 3.81549ZM1.98828 3.70612C1.74928 3.70637 1.55584 3.89972 1.55566 4.13873V6.04498C1.55579 6.28404 1.74925 6.47832 1.98828 6.47858H2.13379V3.70612H1.98828Z", fill: "currentColor" })));
|
|
5103
|
+
|
|
5104
|
+
const Alert12 = (props) => (hAsync("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M6.17505 1.56036C6.84139 1.17286 7.67757 1.65366 7.67798 2.42462V9.57404C7.67798 10.3237 6.88364 10.8075 6.21802 10.4627L2.92017 8.75372H2.38599C1.55767 8.75366 0.886079 8.08203 0.885986 7.25372V4.96661C0.885986 4.13823 1.55762 3.46668 2.38599 3.46661H2.90454L6.17505 1.56036ZM3.54126 4.25275V7.94806L6.67798 9.57404V2.42462L3.54126 4.25275ZM9.27368 3.49396C9.47175 3.30157 9.79243 3.30155 9.99048 3.49396C11.4885 4.94946 11.4886 7.309 9.99048 8.76447C9.79248 8.95675 9.47174 8.95667 9.27368 8.76447C9.07564 8.57207 9.0757 8.2606 9.27368 8.06818C10.3757 6.99754 10.3756 5.26092 9.27368 4.19025C9.07562 3.99783 9.07562 3.68638 9.27368 3.49396ZM8.17017 4.56525C8.36814 4.37301 8.68891 4.37313 8.88696 4.56525C9.77588 5.42884 9.77588 6.82959 8.88696 7.69318C8.68895 7.88509 8.3681 7.88521 8.17017 7.69318C7.97213 7.50078 7.97219 7.18834 8.17017 6.99591C8.66279 6.51721 8.66274 5.74124 8.17017 5.26251C7.9721 5.07009 7.9721 4.75767 8.17017 4.56525ZM2.38599 4.46661C2.1099 4.46668 1.88599 4.69051 1.88599 4.96661V7.25372C1.88608 7.52975 2.10996 7.75366 2.38599 7.75372H2.54126V4.46661H2.38599Z", fill: "currentColor" })));
|
|
5105
|
+
|
|
5106
|
+
const Alert16 = (props) => (hAsync("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M8.31763 2.22534C9.09526 1.77243 10.0714 2.33319 10.0715 3.23315V12.7664C10.0714 13.6408 9.14487 14.2045 8.36841 13.8025L3.93481 11.5046H3.18188C2.16974 11.5044 1.3491 10.6838 1.34888 9.67163V6.62183C1.34905 5.60963 2.16971 4.7891 3.18188 4.78882H3.91919L8.31763 2.22534ZM9.07153 3.23315C9.07136 3.10485 8.93251 3.02531 8.82153 3.0896L4.55493 5.57593V10.699L8.82837 12.9138C8.9392 12.971 9.07142 12.8911 9.07153 12.7664V3.23315ZM12.4846 4.77417C12.6827 4.58175 13.0043 4.58175 13.2024 4.77417C15.1337 6.65059 15.1335 9.69257 13.2024 11.5691C13.0043 11.7615 12.6827 11.7615 12.4846 11.5691C12.2871 11.3767 12.2869 11.0651 12.4846 10.8728C14.0199 9.38109 14.02 6.96212 12.4846 5.47046C12.287 5.27807 12.2868 4.96649 12.4846 4.77417ZM3.18188 5.78882C2.722 5.7891 2.34905 6.16191 2.34888 6.62183V9.67163C2.3491 10.1315 2.72203 10.5044 3.18188 10.5046H3.55493V5.78882H3.18188ZM11.0139 6.20288C11.212 6.01053 11.5337 6.01048 11.7317 6.20288C12.8507 7.29009 12.8505 9.05307 11.7317 10.1404C11.5336 10.3328 11.212 10.3328 11.0139 10.1404C10.816 9.94795 10.8159 9.63548 11.0139 9.44312C11.7367 8.74063 11.7368 7.60252 11.0139 6.90015C10.8159 6.70773 10.8159 6.3953 11.0139 6.20288Z", fill: "currentColor" })));
|
|
5107
|
+
|
|
5108
|
+
const Alert20 = (props) => (hAsync("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M10.3964 2.78281C11.3685 2.21612 12.5886 2.91733 12.5887 4.04257V15.9586C12.5885 17.0517 11.4304 17.7564 10.4598 17.2535L4.91785 14.3814H3.97839C2.71289 14.3813 1.68643 13.355 1.6864 12.0894V8.27792C1.6865 7.01245 2.71293 5.98609 3.97839 5.98593H4.90222L10.3964 2.78281ZM11.3387 4.04257C11.3386 3.88194 11.1651 3.78209 11.0262 3.86288L5.69421 6.97031V13.3766L11.035 16.1441C11.1736 16.2158 11.3385 16.1145 11.3387 15.9586V4.04257ZM15.6063 5.96835C15.8539 5.72783 16.2552 5.72785 16.5028 5.96835C18.9171 8.31389 18.9168 12.1158 16.5028 14.4615C16.2552 14.702 15.8539 14.702 15.6063 14.4615C15.3595 14.221 15.3593 13.8317 15.6063 13.5914C17.5253 11.7268 17.5255 8.70397 15.6063 6.83945C15.3588 6.59898 15.3589 6.20889 15.6063 5.96835ZM3.97839 7.23593C3.40329 7.23609 2.9365 7.7028 2.9364 8.27792V12.0894C2.93643 12.6646 3.40324 13.1313 3.97839 13.1314H4.44421V7.23593H3.97839ZM13.7675 7.75449C14.015 7.51396 14.4173 7.51396 14.6649 7.75449C16.0634 9.11341 16.0631 11.3163 14.6649 12.6754C14.4173 12.9159 14.015 12.9159 13.7675 12.6754C13.5206 12.4348 13.5201 12.0446 13.7675 11.8043C14.671 10.9262 14.6712 9.50357 13.7675 8.62558C13.5201 8.38512 13.5202 7.99498 13.7675 7.75449Z", fill: "currentColor" })));
|
|
5109
|
+
|
|
5110
|
+
const Alert24 = (props) => (hAsync("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M12.4755 3.33801C13.642 2.65803 15.107 3.49956 15.1073 4.84973V19.1495C15.1071 20.4614 13.7164 21.3068 12.5516 20.7032L5.90027 17.257H4.77332C3.25468 17.2568 2.02338 16.0256 2.02332 14.507V9.93274C2.02332 8.41404 3.25464 7.18287 4.77332 7.18274H5.87878L12.4755 3.33801ZM13.6073 4.84973C13.607 4.65713 13.3978 4.53709 13.2313 4.63391L6.83289 8.36243V16.0499L13.2421 19.3712C13.4084 19.4573 13.6071 19.3368 13.6073 19.1495V4.84973ZM18.7274 7.16125C19.0245 6.87262 19.5065 6.87262 19.8036 7.16125C22.7006 9.976 22.7006 14.5399 19.8036 17.3546C19.5065 17.643 19.0245 17.643 18.7274 17.3546C18.4304 17.066 18.4305 16.5983 18.7274 16.3097C21.0306 14.0721 21.0306 10.4437 18.7274 8.20618C18.4304 7.91755 18.4303 7.44987 18.7274 7.16125ZM4.77332 8.68274C4.08307 8.68287 3.52332 9.24247 3.52332 9.93274V14.507C3.52338 15.1972 4.08311 15.7568 4.77332 15.757H5.33289V8.68274H4.77332ZM16.5214 9.30481C16.8184 9.01633 17.2995 9.01633 17.5966 9.30481C19.2754 10.9358 19.2754 13.5801 17.5966 15.2111C17.2995 15.4994 16.8184 15.4994 16.5214 15.2111C16.2243 14.9225 16.2244 14.4548 16.5214 14.1661C17.6058 13.1124 17.6058 11.4034 16.5214 10.3497C16.2243 10.0611 16.2243 9.59344 16.5214 9.30481Z", fill: "currentColor" })));
|
|
5111
|
+
|
|
5112
|
+
const alert = {
|
|
5113
|
+
8: Alert8,
|
|
5114
|
+
10: Alert10,
|
|
5115
|
+
12: Alert12,
|
|
5116
|
+
16: Alert16,
|
|
5117
|
+
20: Alert20,
|
|
5118
|
+
24: Alert24,
|
|
5119
|
+
};
|
|
5120
|
+
|
|
5121
|
+
var Alert = /*#__PURE__*/Object.freeze({
|
|
5122
|
+
__proto__: null,
|
|
5123
|
+
alert: alert
|
|
5124
|
+
});
|
|
5125
|
+
|
|
5126
|
+
const AlignKorean8 = (props) => (hAsync("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M2.58368 3.7832C2.74921 3.78338 2.88348 3.91743 2.88348 4.08301V4.44922H3.58368C3.74922 4.44939 3.88348 4.58442 3.88348 4.75C3.8833 4.91542 3.7491 5.04963 3.58368 5.0498H3.23993C3.52292 5.19701 3.71649 5.49196 3.71649 5.83301C3.71649 6.32075 3.32138 6.71662 2.83368 6.7168H2.24969C1.76201 6.71661 1.36689 6.32074 1.36688 5.83301C1.36688 5.49197 1.56046 5.19701 1.84344 5.0498H1.41669C1.25112 5.04979 1.11706 4.91552 1.11688 4.75C1.11688 4.58432 1.25101 4.44923 1.41669 4.44922H2.2829V4.08301C2.2829 3.91733 2.418 3.78321 2.58368 3.7832ZM5.74969 1.2832C5.91538 1.2832 6.05048 1.41732 6.05048 1.58301V5.6377L6.36102 5.29492C6.47228 5.17226 6.66211 5.16321 6.78485 5.27441C6.90753 5.38567 6.91657 5.5755 6.80536 5.69824L5.97235 6.61816C5.91549 6.68079 5.83429 6.7168 5.74969 6.7168C5.66529 6.7167 5.58479 6.68062 5.52802 6.61816L4.69403 5.69824C4.58284 5.57546 4.59276 5.38565 4.71552 5.27441C4.8383 5.16324 5.02812 5.17217 5.13934 5.29492L5.44989 5.6377V1.58301C5.44989 1.41744 5.58417 1.28339 5.74969 1.2832ZM2.24969 5.5498C2.09337 5.54999 1.96649 5.67664 1.96649 5.83301C1.9665 5.98937 2.09338 6.11602 2.24969 6.11621H2.83368C2.99001 6.11603 3.11688 5.98938 3.11688 5.83301C3.11688 5.67664 2.99001 5.54998 2.83368 5.5498H2.24969ZM3.08368 1.2832C3.4332 1.28338 3.71632 1.56649 3.71649 1.91602V3.41602C3.71649 3.5817 3.58237 3.7168 3.41669 3.7168C3.25101 3.71679 3.11689 3.58169 3.11688 3.41602V1.91602C3.11671 1.89786 3.10183 1.88299 3.08368 1.88281H1.41669C1.25101 1.8828 1.11689 1.74868 1.11688 1.58301C1.11688 1.41733 1.25101 1.28321 1.41669 1.2832H3.08368Z", fill: "currentColor" })));
|
|
4721
5127
|
|
|
4722
5128
|
const AlignKorean10 = (props) => (hAsync("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M3.22913 4.7041C3.45003 4.7041 3.62951 4.88358 3.62952 5.10449V5.53809H4.47913C4.69993 5.53809 4.87934 5.71674 4.87952 5.9375C4.87952 6.15841 4.70004 6.33789 4.47913 6.33789H4.14417C4.4605 6.53797 4.67151 6.89001 4.67151 7.29199C4.67151 7.91561 4.16525 8.4209 3.54163 8.4209H2.81311C2.18949 8.4209 1.68323 7.91561 1.68323 7.29199C1.68323 6.89001 1.89424 6.53797 2.21057 6.33789H1.77112C1.5502 6.33789 1.37073 6.15841 1.37073 5.9375C1.37091 5.71674 1.55032 5.53809 1.77112 5.53809H2.82971V5.10449C2.82972 4.88369 3.00836 4.70428 3.22913 4.7041ZM7.18811 1.5791C7.40887 1.57928 7.58752 1.75869 7.58752 1.97949V6.9834L7.93323 6.60254C8.08156 6.43915 8.33407 6.42707 8.49768 6.5752C8.6613 6.72344 8.67406 6.97593 8.526 7.13965L7.48401 8.29004C7.40827 8.37348 7.3008 8.42081 7.18811 8.4209C7.07523 8.4209 6.96706 8.37366 6.89124 8.29004L5.84924 7.13965C5.70136 6.97595 5.71406 6.7234 5.87756 6.5752C6.04127 6.42687 6.29467 6.43883 6.44299 6.60254L6.78772 6.9834V1.97949C6.78773 1.75858 6.9672 1.5791 7.18811 1.5791ZM2.81311 6.96289C2.63132 6.96289 2.48401 7.1102 2.48401 7.29199C2.48401 7.47379 2.63132 7.62109 2.81311 7.62109H3.54163C3.72342 7.62109 3.87073 7.47378 3.87073 7.29199C3.87072 7.1102 3.72341 6.96289 3.54163 6.96289H2.81311ZM3.85413 1.5791C4.30515 1.5791 4.6715 1.94546 4.67151 2.39648V4.27148C4.67133 4.49225 4.49192 4.6709 4.27112 4.6709C4.05031 4.6709 3.8709 4.49225 3.87073 4.27148V2.39648C3.87072 2.38729 3.86333 2.37989 3.85413 2.37988H1.77112C1.5502 2.37988 1.37073 2.20041 1.37073 1.97949C1.37073 1.75858 1.55021 1.5791 1.77112 1.5791H3.85413Z", fill: "currentColor" })));
|
|
4723
5129
|
|
|
@@ -6674,7 +7080,7 @@ class SdIcon {
|
|
|
6674
7080
|
}
|
|
6675
7081
|
render() {
|
|
6676
7082
|
const IconComponent = Icons[this.name]?.[this.size];
|
|
6677
|
-
return (hAsync("i", { key: '
|
|
7083
|
+
return (hAsync("i", { key: '851c9b6fd0ac6bc9393a21e95184e158bced5fe6', class: this.getIconClasses(), style: this.iconStyle }, hAsync(IconComponent, { key: 'a10dcad82179ba12a9e9754b0b2cdd1ef548b4a5', color: this.resolvedColor })));
|
|
6678
7084
|
}
|
|
6679
7085
|
static get style() { return sdIconCss(); }
|
|
6680
7086
|
static get cmpMeta() { return {
|
|
@@ -6694,122 +7100,153 @@ class SdIcon {
|
|
|
6694
7100
|
}; }
|
|
6695
7101
|
}
|
|
6696
7102
|
|
|
6697
|
-
|
|
7103
|
+
var nonSecure;
|
|
7104
|
+
var hasRequiredNonSecure;
|
|
7105
|
+
|
|
7106
|
+
function requireNonSecure () {
|
|
7107
|
+
if (hasRequiredNonSecure) return nonSecure;
|
|
7108
|
+
hasRequiredNonSecure = 1;
|
|
7109
|
+
// This alphabet uses `A-Za-z0-9_-` symbols.
|
|
7110
|
+
// The order of characters is optimized for better gzip and brotli compression.
|
|
7111
|
+
// References to the same file (works both for gzip and brotli):
|
|
7112
|
+
// `'use`, `andom`, and `rict'`
|
|
7113
|
+
// References to the brotli default dictionary:
|
|
7114
|
+
// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
|
|
7115
|
+
let urlAlphabet =
|
|
7116
|
+
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
7117
|
+
|
|
7118
|
+
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
7119
|
+
return (size = defaultSize) => {
|
|
7120
|
+
let id = '';
|
|
7121
|
+
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
7122
|
+
let i = size | 0;
|
|
7123
|
+
while (i--) {
|
|
7124
|
+
// `| 0` is more compact and faster than `Math.floor()`.
|
|
7125
|
+
id += alphabet[(Math.random() * alphabet.length) | 0];
|
|
7126
|
+
}
|
|
7127
|
+
return id
|
|
7128
|
+
}
|
|
7129
|
+
};
|
|
7130
|
+
|
|
7131
|
+
let nanoid = (size = 21) => {
|
|
7132
|
+
let id = '';
|
|
7133
|
+
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
7134
|
+
let i = size | 0;
|
|
7135
|
+
while (i--) {
|
|
7136
|
+
// `| 0` is more compact and faster than `Math.floor()`.
|
|
7137
|
+
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
7138
|
+
}
|
|
7139
|
+
return id
|
|
7140
|
+
};
|
|
7141
|
+
|
|
7142
|
+
nonSecure = { nanoid, customAlphabet };
|
|
7143
|
+
return nonSecure;
|
|
7144
|
+
}
|
|
7145
|
+
|
|
7146
|
+
var nonSecureExports = /*@__PURE__*/ requireNonSecure();
|
|
7147
|
+
|
|
7148
|
+
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)}.sd-date-picker{width:100%;display:inline-block}.sd-date-picker .sd-date-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}.sd-date-picker .sd-date-picker__input{text-align:center !important}.sd-date-picker__menu{width:304px;box-sizing:border-box;border-radius:8px;padding:24px 19px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);background:white}.sd-date-picker__menu .sd-date-picker__header{display:flex;flex-flow:row nowrap;align-items:center;gap:20px;font-size:14px;padding:0 5px;height:24px;line-height:24px}.sd-date-picker__menu .sd-date-picker__header .year-nav,.sd-date-picker__menu .sd-date-picker__header .month-nav{display:flex;flex-flow:row nowrap;align-items:center;gap:12px}.sd-date-picker__menu .sd-date-picker__header .year-nav button,.sd-date-picker__menu .sd-date-picker__header .month-nav button{background:none;border:none;cursor:pointer;margin:0;padding:0}.sd-date-picker__menu .sd-date-picker__header .year-nav__current{width:40px;text-align:center}.sd-date-picker__menu .sd-date-picker__header .month-nav__current{width:100px;text-align:center}.sd-date-picker__menu .sd-date-picker__days{margin-top:8px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr));column-gap:10px;padding:0 5px}.sd-date-picker__menu .sd-date-picker__days .day{width:28px;height:20px;font-size:12px;line-height:20px;text-align:center;color:#888888}.sd-date-picker__menu .sd-date-picker__body{margin-top:12px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr))}sd-date-range-picker{width:fit-content;display:inline-flex}sd-date-range-picker .sd-date-range-picker--disabled .date-icon{cursor:not-allowed !important;color:#888888 !important}sd-date-range-picker .sd-date-range-picker--disabled .sd-input__native{color:#888888 !important}sd-date-range-picker .sd-field .sd-field__control{min-width:210px}sd-date-range-picker .sd-field .sd-input__native{margin-left:17px !important}.sd-date-range-picker__menu{width:609px;box-sizing:border-box;border-radius:8px;padding:24px 19px;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);background:white}.sd-date-range-picker__menu .sd-date-range-picker__header{margin-bottom:16px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.sd-date-range-picker__menu .sd-date-range-picker__header .header-label{margin:0 12px;width:40px;text-align:center;font-size:14px;line-height:24px}.sd-date-range-picker__menu .sd-date-range-picker__body{display:flex;flex-flow:row nowrap;align-items:stretch;gap:19px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container{width:266px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header{width:100%;height:24px;line-height:24px;font-size:14px;text-align:center;position:relative;padding:0 5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button{position:absolute;top:50%;transform:translateY(-50%)}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-prev{left:5px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-header button.header-button-next{right:5px;left:auto}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days{padding:0 5px;margin-top:8px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr));column-gap:10px}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-days .day{width:28px;height:20px;font-size:12px;line-height:20px;text-align:center;color:#888888}.sd-date-range-picker__menu .sd-date-range-picker__body .calendar-container .calendar-body{margin-top:12px;display:grid;grid-template-columns:repeat(7, minmax(0, 1fr))}.sd-date-range-picker__menu .sd-date-range-picker__body .separator{width:1px;background-color:#d8d8d8}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:#333333;font-size:12px;line-height:20px;padding:0 8px}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:#888888}sd-input .sd-input__content .sd-input__native::placeholder{color:#aaaaaa}`;
|
|
6698
7149
|
|
|
6699
7150
|
class SdInput {
|
|
6700
7151
|
constructor(hostRef) {
|
|
6701
7152
|
registerInstance(this, hostRef);
|
|
6702
|
-
this.
|
|
6703
|
-
this.
|
|
6704
|
-
this.
|
|
6705
|
-
this.sdFocus = createEvent(this, "sdFocus");
|
|
6706
|
-
this.sdBlur = createEvent(this, "sdBlur");
|
|
7153
|
+
this.input = createEvent(this, "sdUpdate");
|
|
7154
|
+
this.focus = createEvent(this, "sdFocus");
|
|
7155
|
+
this.blur = createEvent(this, "sdBlur");
|
|
6707
7156
|
}
|
|
6708
|
-
get
|
|
7157
|
+
get host() { return getElement(this); }
|
|
6709
7158
|
value = null;
|
|
6710
|
-
|
|
7159
|
+
// @Prop() name?: string;
|
|
7160
|
+
type = 'text';
|
|
6711
7161
|
insideLabel = false;
|
|
6712
7162
|
placeholder = '입력해 주세요.';
|
|
6713
7163
|
disabled = false;
|
|
6714
7164
|
clearable = false;
|
|
6715
7165
|
width;
|
|
6716
7166
|
barcode = false;
|
|
6717
|
-
rules;
|
|
7167
|
+
rules = [];
|
|
6718
7168
|
autoFocus = false;
|
|
6719
7169
|
status;
|
|
6720
7170
|
inputClass = '';
|
|
6721
7171
|
readonly = false;
|
|
6722
|
-
// props - custom styles
|
|
6723
|
-
inputStyle = {};
|
|
6724
|
-
internalValue = null;
|
|
6725
7172
|
error = false;
|
|
6726
7173
|
focused = false;
|
|
6727
7174
|
hovered = false;
|
|
7175
|
+
// props - label
|
|
7176
|
+
label = '';
|
|
7177
|
+
useLabelRequired = false;
|
|
7178
|
+
labelTooltip = '';
|
|
7179
|
+
labelTooltipProps = null;
|
|
7180
|
+
// props - custom styles
|
|
7181
|
+
inputStyle = {};
|
|
7182
|
+
internalValue = null;
|
|
6728
7183
|
nativeEl = undefined;
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
7184
|
+
formField;
|
|
7185
|
+
name = nonSecureExports.nanoid();
|
|
7186
|
+
input;
|
|
7187
|
+
focus;
|
|
7188
|
+
blur;
|
|
6734
7189
|
valueChanged(newValue) {
|
|
6735
7190
|
this.internalValue = newValue;
|
|
6736
7191
|
}
|
|
6737
7192
|
internalValueChanged(newValue) {
|
|
6738
7193
|
if (newValue !== this.value) {
|
|
6739
7194
|
this.value = newValue;
|
|
6740
|
-
this.
|
|
6741
|
-
}
|
|
6742
|
-
if (!this.rules || this.rules.length === 0)
|
|
6743
|
-
return;
|
|
6744
|
-
this.error = false;
|
|
6745
|
-
for (const rule of this.rules) {
|
|
6746
|
-
const result = rule(newValue);
|
|
6747
|
-
if (result !== true) {
|
|
6748
|
-
this.error = true;
|
|
6749
|
-
break;
|
|
6750
|
-
}
|
|
7195
|
+
this.input?.emit(this.value);
|
|
6751
7196
|
}
|
|
6752
7197
|
}
|
|
6753
|
-
async
|
|
7198
|
+
async sdGetNativeElement() {
|
|
6754
7199
|
return this.nativeEl || null;
|
|
6755
7200
|
}
|
|
7201
|
+
async sdValidate() {
|
|
7202
|
+
this.formField?.sdValidate();
|
|
7203
|
+
}
|
|
7204
|
+
async sdReset() {
|
|
7205
|
+
this.formField?.sdReset();
|
|
7206
|
+
}
|
|
7207
|
+
async sdResetValidate() {
|
|
7208
|
+
this.formField?.sdResetValidation();
|
|
7209
|
+
}
|
|
7210
|
+
async sdFocus() {
|
|
7211
|
+
this.formField?.sdFocus();
|
|
7212
|
+
}
|
|
6756
7213
|
componentWillLoad() {
|
|
6757
7214
|
if (this.value) {
|
|
6758
7215
|
this.internalValue = this.value;
|
|
6759
7216
|
}
|
|
6760
7217
|
}
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
};
|
|
6766
|
-
handleChange = (event) => {
|
|
6767
|
-
const target = event.target;
|
|
6768
|
-
this.internalValue = target.value;
|
|
6769
|
-
this.sdChange?.emit(this.internalValue);
|
|
6770
|
-
};
|
|
6771
|
-
handleFocus = (type, event) => {
|
|
6772
|
-
this.focused = type === 'focus';
|
|
6773
|
-
if (type === 'blur')
|
|
6774
|
-
this.sdBlur?.emit(event);
|
|
6775
|
-
else
|
|
6776
|
-
this.sdFocus?.emit(event);
|
|
6777
|
-
};
|
|
6778
|
-
getInputStatus() {
|
|
6779
|
-
// input 상태 우선순위: hovered > focused > status(상태 주입) > error(rules 검사)
|
|
6780
|
-
if (this.disabled)
|
|
6781
|
-
return 'sd-input--disabled';
|
|
6782
|
-
if (this.hovered)
|
|
6783
|
-
return 'sd-input--hovered';
|
|
6784
|
-
if (this.focused)
|
|
6785
|
-
return 'sd-input--focused';
|
|
6786
|
-
if (this.status)
|
|
6787
|
-
return `sd-input--${this.status}`;
|
|
6788
|
-
if (this.error)
|
|
6789
|
-
return 'sd-input--error';
|
|
6790
|
-
return '';
|
|
7218
|
+
componentDidLoad() {
|
|
7219
|
+
if (this.autoFocus) {
|
|
7220
|
+
this.nativeEl?.focus();
|
|
7221
|
+
}
|
|
6791
7222
|
}
|
|
7223
|
+
handleInput = (event) => {
|
|
7224
|
+
const target = event.target;
|
|
7225
|
+
this.internalValue = target.value;
|
|
7226
|
+
};
|
|
7227
|
+
handleFocus = async (type, event) => {
|
|
7228
|
+
this.focused = type === 'focus';
|
|
7229
|
+
if (type === 'blur') {
|
|
7230
|
+
// Auto-validate on blur if rules exist
|
|
7231
|
+
if (this.rules && this.rules.length > 0) {
|
|
7232
|
+
await this.formField?.sdValidate();
|
|
7233
|
+
}
|
|
7234
|
+
this.blur?.emit(event);
|
|
7235
|
+
}
|
|
7236
|
+
else {
|
|
7237
|
+
this.focus?.emit(event);
|
|
7238
|
+
}
|
|
7239
|
+
};
|
|
6792
7240
|
render() {
|
|
6793
7241
|
const inputWidth = this.width
|
|
6794
7242
|
? {
|
|
6795
7243
|
'--input-width': typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
6796
7244
|
}
|
|
6797
7245
|
: {};
|
|
6798
|
-
return (hAsync(
|
|
6799
|
-
'sd-input': true,
|
|
6800
|
-
'sd-input--with-label': !!this.label,
|
|
6801
|
-
'sd-input--inside-label': !!this.label && this.insideLabel,
|
|
6802
|
-
'sd-input--barcode': !!this.barcode,
|
|
6803
|
-
[this.getInputStatus()]: true,
|
|
6804
|
-
} }, this.label && (hAsync("div", { key: '89009bc9f0bf631a0274c5261cacdc915548c4ca', class: {
|
|
6805
|
-
'sd-input__label': true,
|
|
6806
|
-
} }, this.label)), hAsync("label", { key: '83f40c08eef0754904941fffd00bec035f654bbf', class: {
|
|
6807
|
-
'sd-input__container': true,
|
|
6808
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("slot", { key: '17d648f43076578e54f96c9e4fbd99553af45ef6', name: "prefix" }), hAsync("input", { key: '03a7c6da51930e629e75b8a0af8c3e843169a6df', ref: el => (this.nativeEl = el), class: `sd-input__native_element ${this.inputClass}`, type: "text", value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onChange: this.handleChange, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) }), hAsync("slot", { key: '604948d6bc07fb3e97e644c5459862b1fd3e91f0', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-icon", { key: '124d732eaa54a824dc82896d2bfc7520aa3dc2a2', name: "close", color: "#888", class: "sd-input__clear-icon", onClick: () => {
|
|
7246
|
+
return (hAsync("sd-field", { key: '78d338ae57d61752e8cb691197c3882f32ccfc16', name: this.name, label: this.label, insideLabel: this.insideLabel, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: inputWidth, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("label", { key: '180c948116cb0a644d2696a46a8040cd5f19010d', class: "sd-input__content", style: { width: '100%' } }, hAsync("slot", { key: '4ead5aaaa62ac8c93d6207e04d5555e56f096a58', name: "prefix" }), hAsync("input", { key: 'd5bce7f062c7550f6204f5df416122fe8e4a40f0', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), hAsync("slot", { key: '9ab6a7556416dd5dbfea6b83f90b337366935b49', name: "suffix" }), this.clearable && this.internalValue && (hAsync("sd-icon", { key: '7a803590e461dc740feb8bb55fd69c6dc11f3b62', name: "close", color: "grey_65", size: "16", class: "sd-input__clear-icon", onClick: async () => {
|
|
6809
7247
|
this.internalValue = '';
|
|
6810
|
-
this.
|
|
6811
|
-
|
|
6812
|
-
} }))))));
|
|
7248
|
+
await this.formField?.sdValidate();
|
|
7249
|
+
} })))));
|
|
6813
7250
|
}
|
|
6814
7251
|
static get watchers() { return {
|
|
6815
7252
|
"value": ["valueChanged"],
|
|
@@ -6821,7 +7258,7 @@ class SdInput {
|
|
|
6821
7258
|
"$tagName$": "sd-input",
|
|
6822
7259
|
"$members$": {
|
|
6823
7260
|
"value": [1032],
|
|
6824
|
-
"
|
|
7261
|
+
"type": [1],
|
|
6825
7262
|
"insideLabel": [4, "inside-label"],
|
|
6826
7263
|
"placeholder": [1],
|
|
6827
7264
|
"disabled": [4],
|
|
@@ -6833,12 +7270,20 @@ class SdInput {
|
|
|
6833
7270
|
"status": [1],
|
|
6834
7271
|
"inputClass": [1, "input-class"],
|
|
6835
7272
|
"readonly": [4],
|
|
7273
|
+
"error": [1028],
|
|
7274
|
+
"focused": [1028],
|
|
7275
|
+
"hovered": [1028],
|
|
7276
|
+
"label": [1],
|
|
7277
|
+
"useLabelRequired": [4, "use-label-required"],
|
|
7278
|
+
"labelTooltip": [1, "label-tooltip"],
|
|
7279
|
+
"labelTooltipProps": [16],
|
|
6836
7280
|
"inputStyle": [16],
|
|
6837
7281
|
"internalValue": [32],
|
|
6838
|
-
"
|
|
6839
|
-
"
|
|
6840
|
-
"
|
|
6841
|
-
"
|
|
7282
|
+
"sdGetNativeElement": [64],
|
|
7283
|
+
"sdValidate": [64],
|
|
7284
|
+
"sdReset": [64],
|
|
7285
|
+
"sdResetValidate": [64],
|
|
7286
|
+
"sdFocus": [64]
|
|
6842
7287
|
},
|
|
6843
7288
|
"$listeners$": undefined,
|
|
6844
7289
|
"$lazyBundleId$": "-",
|
|
@@ -6872,13 +7317,13 @@ class SdLoadingSpinner {
|
|
|
6872
7317
|
}; }
|
|
6873
7318
|
}
|
|
6874
7319
|
|
|
6875
|
-
const sdModalCardCss = () => `sd-modal-card{display:block}sd-modal-card .sd-modal-card{position:relative;padding:40px 32px;border-radius:8px;box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-modal-card .sd-modal-card__close-button{position:absolute;top:16px;right:16px;cursor:pointer}sd-modal-card .sd-modal-card sd-icon.sd-modal-card__icon{display:block;width:32px;height:32px;margin:0 auto 12px auto}sd-modal-card .sd-modal-card__title{color:var(--point-color);font-size:18px;font-weight:700;line-height:30px;text-align:center;margin:0 0 20px 0}sd-modal-card .sd-modal-card__message{color:#222222;font-weight:400;font-size:12px;line-height:22px;text-align:center;margin:0}sd-modal-card .sd-modal-card__button-container{display:flex;margin:32px auto 0 auto;justify-content:center;align-items:center;gap:8px}sd-modal-card .sd-modal-card__button-container.flex-column{flex-direction:column}sd-modal-card .sd-modal-card__button-container button.sd-modal-card__button{width:89px}`;
|
|
7320
|
+
const sdModalCardCss = () => `sd-modal-card{display:block}sd-modal-card .sd-modal-card{position:relative;padding:40px 32px;border-radius:8px;box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:white}sd-modal-card .sd-modal-card__close-button{position:absolute;top:16px;right:16px;cursor:pointer}sd-modal-card .sd-modal-card sd-icon.sd-modal-card__icon{display:block;width:32px;height:32px;margin:0 auto 12px auto}sd-modal-card .sd-modal-card__title{color:var(--point-color);font-size:18px;font-weight:700;line-height:30px;text-align:center;margin:0 0 20px 0}sd-modal-card .sd-modal-card__message{color:#222222;font-weight:400;font-size:12px;line-height:22px;text-align:center;margin:0}sd-modal-card .sd-modal-card__button-container{display:flex;margin:32px auto 0 auto;justify-content:center;align-items:center;gap:8px}sd-modal-card .sd-modal-card__button-container.flex-column{flex-direction:column}sd-modal-card .sd-modal-card__button-container button.sd-modal-card__button{width:89px}`;
|
|
6876
7321
|
|
|
6877
7322
|
class SdModalCard {
|
|
6878
7323
|
constructor(hostRef) {
|
|
6879
7324
|
registerInstance(this, hostRef);
|
|
6880
|
-
this.
|
|
6881
|
-
this.
|
|
7325
|
+
this.close = createEvent(this, "sdClose");
|
|
7326
|
+
this.confirm = createEvent(this, "sdConfirm");
|
|
6882
7327
|
}
|
|
6883
7328
|
type = 'info';
|
|
6884
7329
|
system = 'normal';
|
|
@@ -6894,8 +7339,8 @@ class SdModalCard {
|
|
|
6894
7339
|
];
|
|
6895
7340
|
message = [];
|
|
6896
7341
|
modalClass = '';
|
|
6897
|
-
|
|
6898
|
-
|
|
7342
|
+
close;
|
|
7343
|
+
confirm;
|
|
6899
7344
|
get pointColor() {
|
|
6900
7345
|
if (this.type !== 'normal') {
|
|
6901
7346
|
return 'grey_95';
|
|
@@ -6915,7 +7360,7 @@ class SdModalCard {
|
|
|
6915
7360
|
return modalClass;
|
|
6916
7361
|
}
|
|
6917
7362
|
render() {
|
|
6918
|
-
return (hAsync(Host, { key: '
|
|
7363
|
+
return (hAsync(Host, { key: 'e143942e62530660fb9a60dd70a418be197943b7', style: { '--point-color': this.pointColor } }, hAsync("div", { key: '7033fb4220b84ed00eae6fa753fcfc676fc02a7f', class: this.getModalClass }, this.useCloseButton && (hAsync("sd-icon", { key: 'e28d60dcd5281aa62fcd55f72d9eb7bb83767ca7', class: "sd-modal-card__close-button", name: "close", size: "20", color: "grey_65", onClick: () => this.close.emit() })), this.type !== 'normal' && (hAsync("sd-icon", { key: 'e209095abf43af9885ccd63a9bc2183d24863f0c', class: "sd-modal-card__icon", name: this.type === 'info' ? 'notificationOutline' : 'warningOutline', size: "32", color: this.type === 'info' ? 'brilliantblue_75' : 'red_75' })), hAsync("h2", { key: '5beac7a046be5afe446af94e9032dd9bb219cd60', class: "sd-modal-card__title" }, this.modalTitle), hAsync("slot", { key: '83f5e5978ed9489888fdb5bc839eefb4ad99ce6c' }, hAsync("div", { key: 'feaaee161b474b7464a51c515ac1fa5448b140f1', class: `sd-modal-card__message-container` }, this.message.map(msg => (hAsync("p", { class: "sd-modal-card__message" }, msg))))), hAsync("div", { key: 'cb2354ca63ab663aded356f4f931b40d64697209', class: `sd-modal-card__button-container flex-${this.buttonFlexDirection}` }, this.buttonProps.map(button => (hAsync("sd-button", { class: 'sd-modal-card__button', variant: button.variant ? button.variant : 'outline', label: button.label, color: button.color, size: button.size, onClick: () => !button.type || button.type === 'confirm' ? this.confirm.emit() : this.close.emit(), ...(button.class && { class: button.class }) })))))));
|
|
6919
7364
|
}
|
|
6920
7365
|
static get style() { return sdModalCardCss(); }
|
|
6921
7366
|
static get cmpMeta() { return {
|
|
@@ -6942,12 +7387,9 @@ const sdNumberInputCss = () => `sd-icon{display:inline-block;line-height:0}sd-ic
|
|
|
6942
7387
|
class SdNumberInput {
|
|
6943
7388
|
constructor(hostRef) {
|
|
6944
7389
|
registerInstance(this, hostRef);
|
|
6945
|
-
this.
|
|
6946
|
-
this.
|
|
6947
|
-
this.
|
|
6948
|
-
this.sdChange = createEvent(this, "sdChange");
|
|
6949
|
-
this.sdFocus = createEvent(this, "sdFocus");
|
|
6950
|
-
this.sdBlur = createEvent(this, "sdBlur");
|
|
7390
|
+
this.update = createEvent(this, "sdUpdate");
|
|
7391
|
+
this.focus = createEvent(this, "sdFocus");
|
|
7392
|
+
this.blur = createEvent(this, "sdBlur");
|
|
6951
7393
|
}
|
|
6952
7394
|
get el() { return getElement(this); }
|
|
6953
7395
|
min = Number.NEGATIVE_INFINITY;
|
|
@@ -6971,12 +7413,9 @@ class SdNumberInput {
|
|
|
6971
7413
|
hovered = false;
|
|
6972
7414
|
error = false;
|
|
6973
7415
|
nativeEl = undefined;
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
sdChange;
|
|
6978
|
-
sdFocus;
|
|
6979
|
-
sdBlur;
|
|
7416
|
+
update;
|
|
7417
|
+
focus;
|
|
7418
|
+
blur;
|
|
6980
7419
|
formatWithCommas(value) {
|
|
6981
7420
|
if (value === null || value === undefined)
|
|
6982
7421
|
return '';
|
|
@@ -7042,7 +7481,7 @@ class SdNumberInput {
|
|
|
7042
7481
|
this.updateDisplay();
|
|
7043
7482
|
if (newValue !== this.value) {
|
|
7044
7483
|
this.value = newValue;
|
|
7045
|
-
this.
|
|
7484
|
+
this.update?.emit(newValue);
|
|
7046
7485
|
}
|
|
7047
7486
|
if (!this.rules || this.rules.length === 0)
|
|
7048
7487
|
return;
|
|
@@ -7112,29 +7551,15 @@ class SdNumberInput {
|
|
|
7112
7551
|
target.value = this.displayValue;
|
|
7113
7552
|
}
|
|
7114
7553
|
};
|
|
7115
|
-
handleChange = (event) => {
|
|
7116
|
-
const target = event.target;
|
|
7117
|
-
const inputValue = target.value;
|
|
7118
|
-
if (inputValue === '') {
|
|
7119
|
-
this.internalValue = null;
|
|
7120
|
-
}
|
|
7121
|
-
else {
|
|
7122
|
-
const parsed = this.parseInput(inputValue);
|
|
7123
|
-
if (parsed !== null) {
|
|
7124
|
-
this.internalValue = this.clampMinMax(parsed);
|
|
7125
|
-
}
|
|
7126
|
-
}
|
|
7127
|
-
this.sdChange?.emit(this.internalValue);
|
|
7128
|
-
};
|
|
7129
7554
|
handleFocus = (event) => {
|
|
7130
|
-
this.
|
|
7555
|
+
this.focus?.emit(event);
|
|
7131
7556
|
};
|
|
7132
7557
|
handleBlur = (event) => {
|
|
7133
7558
|
this.updateDisplay();
|
|
7134
7559
|
if (this.nativeEl) {
|
|
7135
7560
|
this.nativeEl.value = this.displayValue;
|
|
7136
7561
|
}
|
|
7137
|
-
this.
|
|
7562
|
+
this.blur?.emit(event);
|
|
7138
7563
|
};
|
|
7139
7564
|
handleKeyDown = (event) => {
|
|
7140
7565
|
if (event.key === 'ArrowUp') {
|
|
@@ -7149,32 +7574,28 @@ class SdNumberInput {
|
|
|
7149
7574
|
handleIncrement = () => {
|
|
7150
7575
|
if (this.isIncrementDisabled())
|
|
7151
7576
|
return;
|
|
7152
|
-
const currentVal = this.internalValue ??
|
|
7577
|
+
const currentVal = this.internalValue ?? this.min ?? 0;
|
|
7153
7578
|
let nextVal = currentVal + this.step;
|
|
7154
7579
|
if (nextVal > this.max) {
|
|
7155
7580
|
nextVal = this.max;
|
|
7156
7581
|
}
|
|
7157
7582
|
if (nextVal === currentVal)
|
|
7158
7583
|
return;
|
|
7159
|
-
this.sdIncrement?.emit({ currentVal: nextVal, prevVal: currentVal });
|
|
7160
7584
|
this.internalValue = nextVal;
|
|
7161
|
-
this.sdChange?.emit(nextVal);
|
|
7162
7585
|
};
|
|
7163
7586
|
handleDecrement = () => {
|
|
7164
7587
|
if (this.isDecrementDisabled())
|
|
7165
7588
|
return;
|
|
7166
|
-
const currentVal = this.internalValue ??
|
|
7589
|
+
const currentVal = this.internalValue ?? this.min ?? 0;
|
|
7167
7590
|
let nextVal = currentVal - this.step;
|
|
7168
7591
|
if (nextVal < this.min) {
|
|
7169
7592
|
nextVal = this.min;
|
|
7170
7593
|
}
|
|
7171
7594
|
if (nextVal === currentVal)
|
|
7172
7595
|
return;
|
|
7173
|
-
this.sdDecrement?.emit({ currentVal: nextVal, prevVal: currentVal });
|
|
7174
7596
|
this.internalValue = nextVal;
|
|
7175
|
-
this.sdChange?.emit(nextVal);
|
|
7176
7597
|
};
|
|
7177
|
-
async
|
|
7598
|
+
async sdGetNativeElement() {
|
|
7178
7599
|
return this.nativeEl || null;
|
|
7179
7600
|
}
|
|
7180
7601
|
getInputStatus() {
|
|
@@ -7197,17 +7618,17 @@ class SdNumberInput {
|
|
|
7197
7618
|
const inputStyles = {
|
|
7198
7619
|
textAlign: this.useButton ? 'center' : 'right',
|
|
7199
7620
|
};
|
|
7200
|
-
return (hAsync(Host, { key: '
|
|
7621
|
+
return (hAsync(Host, { key: 'cc0a8b33a183c708f4caab8b085647666f3f6a98', style: inputWidth, onFocus: this.handleFocus, onBlur: this.handleBlur }, this.useButton ? 'use buttons' : 'dont use buttons', this.label && hAsync("div", { key: '65a9e62f1ae8d4c4f8712a93a86e5c179953d398', class: "sd-number-input__label" }, this.label), hAsync("label", { key: '25a1617e500b5c002b540215fa59c9d419468462', class: {
|
|
7201
7622
|
'sd-number-input': true,
|
|
7202
7623
|
[this.getInputStatus()]: true,
|
|
7203
7624
|
'sd-number-input--with-buttons': this.useButton,
|
|
7204
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: '
|
|
7625
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, hAsync("input", { key: '3cdbc6d5f59a6eaa3766e38768c718ca69a2b111', ref: el => (this.nativeEl = el), class: `sd-number-input__input ${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, style: inputStyles }), this.useButton && (hAsync("div", { key: '8929f899d9c3f06510fc7d7d9c9a33fbaf0786ac', class: "sd-number-input__buttons" }, hAsync("button", { key: 'd3673187beb0c5941b38b78016596519bf802935', type: "button", class: {
|
|
7205
7626
|
'sd-number-input__button': true,
|
|
7206
7627
|
'sd-number-input__button--decrement': true,
|
|
7207
|
-
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: '
|
|
7628
|
+
}, disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, hAsync("sd-icon", { key: 'bd0b93c426d1dbc6ca5be932f999e0fa09538571', name: "minus", size: 12, color: this.isDecrementDisabled() ? '#CCCCCC' : '#2D8DFF' })), hAsync("button", { key: 'b763da67109584b0c55dcfeaf3b2779c31c7caa4', type: "button", class: {
|
|
7208
7629
|
'sd-number-input__button': true,
|
|
7209
7630
|
'sd-number-input__button--increment': true,
|
|
7210
|
-
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '
|
|
7631
|
+
}, disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, hAsync("sd-icon", { key: '48c6fc62f19db50be1c23d65706b345a6d543d87', name: "add", size: 12, color: this.isIncrementDisabled() ? '#CCCCCC' : '#2D8DFF' })))))));
|
|
7211
7632
|
}
|
|
7212
7633
|
static get watchers() { return {
|
|
7213
7634
|
"value": ["valueChanged"],
|
|
@@ -7238,7 +7659,7 @@ class SdNumberInput {
|
|
|
7238
7659
|
"displayValue": [32],
|
|
7239
7660
|
"hovered": [32],
|
|
7240
7661
|
"error": [32],
|
|
7241
|
-
"
|
|
7662
|
+
"sdGetNativeElement": [64]
|
|
7242
7663
|
},
|
|
7243
7664
|
"$listeners$": undefined,
|
|
7244
7665
|
"$lazyBundleId$": "-",
|
|
@@ -7259,7 +7680,7 @@ const PER_PAGE = 10;
|
|
|
7259
7680
|
class SdPagination {
|
|
7260
7681
|
constructor(hostRef) {
|
|
7261
7682
|
registerInstance(this, hostRef);
|
|
7262
|
-
this.pageChange = createEvent(this, "
|
|
7683
|
+
this.pageChange = createEvent(this, "sdPageChange");
|
|
7263
7684
|
}
|
|
7264
7685
|
currentPage = 1;
|
|
7265
7686
|
lastPage = 1;
|
|
@@ -7285,6 +7706,7 @@ class SdPagination {
|
|
|
7285
7706
|
handlePageChange(page) {
|
|
7286
7707
|
if (page < 1 || page > this.lastPage)
|
|
7287
7708
|
return;
|
|
7709
|
+
this.currentPage = page;
|
|
7288
7710
|
this.pageChange.emit(page);
|
|
7289
7711
|
}
|
|
7290
7712
|
handleGroupChange(direction) {
|
|
@@ -7320,12 +7742,12 @@ class SdPagination {
|
|
|
7320
7742
|
}
|
|
7321
7743
|
}
|
|
7322
7744
|
render() {
|
|
7323
|
-
return (hAsync("div", { key: '
|
|
7745
|
+
return (hAsync("div", { key: 'de62debd728759c709660924b2d9a5691f1e60ea', class: this.paginationClasses }, hAsync("div", { key: '9da6071df92e8910fe19a9e20cdc38e2ef1e4fe7', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (hAsync("div", { class: "pagination-info" }, hAsync("span", { class: "current-page" }, this.currentPage), hAsync("span", null, "/"), hAsync("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (hAsync("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
7324
7746
|
'pagination-btn': true,
|
|
7325
7747
|
'pagination-btn--selected': this.currentPage === n,
|
|
7326
7748
|
}, disabled: this.currentPage === n, style: {
|
|
7327
7749
|
'--pagination-btn-width': `${this.buttonWidth}px`,
|
|
7328
|
-
}, onClick: () => this.handlePageChange(n) }, n)))), hAsync("div", { key: '
|
|
7750
|
+
}, onClick: () => this.handlePageChange(n) }, n)))), hAsync("div", { key: '7951a5ea2aabf30619d21073cd728dffaf14b7bd', class: "append-btns" }, this.renderNextButtons())));
|
|
7329
7751
|
}
|
|
7330
7752
|
static get style() { return sdPaginationCss(); }
|
|
7331
7753
|
static get cmpMeta() { return {
|
|
@@ -7344,7 +7766,7 @@ class SdPagination {
|
|
|
7344
7766
|
|
|
7345
7767
|
const TooltipArrow = (props) => (hAsync("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, hAsync("path", { d: "M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z", fill: "currentColor" })));
|
|
7346
7768
|
|
|
7347
|
-
const sdPopoverCss = () =>
|
|
7769
|
+
const sdPopoverCss = () => `sd-popover{position:relative;cursor:pointer;display:inline-flex}`;
|
|
7348
7770
|
|
|
7349
7771
|
class SdPopover {
|
|
7350
7772
|
constructor(hostRef) {
|
|
@@ -7379,18 +7801,18 @@ class SdPopover {
|
|
|
7379
7801
|
this.showPopover = false;
|
|
7380
7802
|
};
|
|
7381
7803
|
render() {
|
|
7382
|
-
return (hAsync(Fragment, { key: '
|
|
7383
|
-
'sd-
|
|
7384
|
-
[`sd-
|
|
7804
|
+
return (hAsync(Fragment, { key: 'b968d7b33da86fc38d683e3af1b6cbcb3f3386dd' }, this.label ? (hAsync("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })) : (hAsync("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (hAsync("sd-floating-portal", { key: '43b0962853e830256e7b749e6e27206a74bf08f4', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, hAsync("div", { key: '62767f979f1256937d50a6cddd5d4ddef5270005', class: {
|
|
7805
|
+
'sd-floating-menu': true,
|
|
7806
|
+
[`sd-floating-menu--${this.placement}`]: true,
|
|
7385
7807
|
[this.menuClass]: !!this.menuClass,
|
|
7386
|
-
} }, hAsync("i", { key: '
|
|
7808
|
+
} }, hAsync("i", { key: 'd82bdddc8945f348aebe8087390bf26d91e1e1c4', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, hAsync(TooltipArrow, { key: 'ff7ca429210d6ae88e2442299c8cea5211304e58' })), hAsync("div", { key: '366633e5f65f76126607edb52d857e1918afb0bb', class: "sd-floating-menu__content" }, this.menuTitle && hAsync("div", { key: '66b0783a3f5c4d30d33ecf496f4d0c051b44f3f1', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (hAsync("div", { key: '4f2049e9eee721f674a6c8ae4cbeb4eea9ab59bd', class: "sd-floating-menu__messages" }, this.messages.map(message => (hAsync("div", null, message))))), this.buttons.length > 0 && (hAsync("div", { key: 'da2067ba8bf0279dd914fab6124f58526edff4d4', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (hAsync("sd-button", { ...button })))))), this.useClose && (hAsync("button", { key: '2aeb7b81e322472922802bcb6163d0913f0ee218', class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, hAsync("sd-icon", { key: '1ad55d0c8bf3c1eeedc2069f6f1bcdd75b180446', name: "close", size: "12", color: "#AAAAAA" }))))))));
|
|
7387
7809
|
}
|
|
7388
7810
|
static get watchers() { return {
|
|
7389
7811
|
"show": ["watchShowHandler"]
|
|
7390
7812
|
}; }
|
|
7391
7813
|
static get style() { return sdPopoverCss(); }
|
|
7392
7814
|
static get cmpMeta() { return {
|
|
7393
|
-
"$flags$":
|
|
7815
|
+
"$flags$": 768,
|
|
7394
7816
|
"$tagName$": "sd-popover",
|
|
7395
7817
|
"$members$": {
|
|
7396
7818
|
"show": [1028],
|
|
@@ -7419,7 +7841,7 @@ class SdPopover {
|
|
|
7419
7841
|
class SdPortal {
|
|
7420
7842
|
constructor(hostRef) {
|
|
7421
7843
|
registerInstance(this, hostRef);
|
|
7422
|
-
this.
|
|
7844
|
+
this.close = createEvent(this, "sdClose");
|
|
7423
7845
|
}
|
|
7424
7846
|
get hostEl() { return getElement(this); }
|
|
7425
7847
|
to = 'body';
|
|
@@ -7427,7 +7849,7 @@ class SdPortal {
|
|
|
7427
7849
|
offset = [0, 4];
|
|
7428
7850
|
zIndex = 9999;
|
|
7429
7851
|
open = false;
|
|
7430
|
-
|
|
7852
|
+
close;
|
|
7431
7853
|
container;
|
|
7432
7854
|
wrapper;
|
|
7433
7855
|
rafId;
|
|
@@ -7531,10 +7953,10 @@ class SdPortal {
|
|
|
7531
7953
|
}
|
|
7532
7954
|
if (this.wrapper?.contains(e.target))
|
|
7533
7955
|
return;
|
|
7534
|
-
this.
|
|
7956
|
+
this.close.emit();
|
|
7535
7957
|
}
|
|
7536
7958
|
render() {
|
|
7537
|
-
return hAsync("slot", { key: '
|
|
7959
|
+
return hAsync("slot", { key: '180911ce3dbda3a8e2576facbf0ab16b5cb0b61f' });
|
|
7538
7960
|
}
|
|
7539
7961
|
static get cmpMeta() { return {
|
|
7540
7962
|
"$flags$": 772,
|
|
@@ -7630,32 +8052,22 @@ const sdRadioButtonGroupCss = () => `sd-radio-button-group{display:inline-block}
|
|
|
7630
8052
|
class SdRadioButtonGroup {
|
|
7631
8053
|
constructor(hostRef) {
|
|
7632
8054
|
registerInstance(this, hostRef);
|
|
7633
|
-
this.
|
|
8055
|
+
this.change = createEvent(this, "sdUpdate");
|
|
7634
8056
|
}
|
|
7635
8057
|
value;
|
|
7636
8058
|
radioOptions = [];
|
|
7637
8059
|
size = 'md';
|
|
7638
8060
|
disabled = false;
|
|
7639
8061
|
name;
|
|
7640
|
-
|
|
7641
|
-
sdChange;
|
|
7642
|
-
componentWillLoad() {
|
|
7643
|
-
if (this.value !== undefined && this.value !== null) {
|
|
7644
|
-
this.selectedValue = this.value;
|
|
7645
|
-
}
|
|
7646
|
-
}
|
|
7647
|
-
valueChanged(newValue) {
|
|
7648
|
-
this.selectedValue = newValue;
|
|
7649
|
-
}
|
|
8062
|
+
change;
|
|
7650
8063
|
handleRadioChange = (optionValue, optionDisabled) => {
|
|
7651
8064
|
if (this.disabled || optionDisabled)
|
|
7652
8065
|
return;
|
|
7653
|
-
this.selectedValue = optionValue;
|
|
7654
8066
|
this.value = optionValue;
|
|
7655
|
-
this.
|
|
8067
|
+
this.change.emit(optionValue);
|
|
7656
8068
|
};
|
|
7657
8069
|
isOptionSelected(option) {
|
|
7658
|
-
return this.
|
|
8070
|
+
return this.value === option.value;
|
|
7659
8071
|
}
|
|
7660
8072
|
isOptionDisabled(option) {
|
|
7661
8073
|
return this.disabled || !!option.disabled;
|
|
@@ -7676,32 +8088,28 @@ class SdRadioButtonGroup {
|
|
|
7676
8088
|
const classes = ['sd-radio-button-group', `sd-radio-button-group--${this.size}`];
|
|
7677
8089
|
return classes.join(' ');
|
|
7678
8090
|
}
|
|
8091
|
+
groupName = this.name || `sd-radio-button-group-${crypto.randomUUID()}`;
|
|
7679
8092
|
render() {
|
|
7680
|
-
|
|
7681
|
-
return (hAsync("div", { key: '0142307292f00c3c590f732c465d1fea8b30e49b', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map((option, index) => {
|
|
8093
|
+
return (hAsync("div", { key: '9fe1be694f1c30e4aa71a0be00218b1c5fa4db01', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map(option => {
|
|
7682
8094
|
const isSelected = this.isOptionSelected(option);
|
|
7683
8095
|
const isDisabled = this.isOptionDisabled(option);
|
|
7684
|
-
return (hAsync("label", { key: `radio-${
|
|
8096
|
+
return (hAsync("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), role: "radio", "aria-checked": isSelected.toString(), "aria-disabled": isDisabled.toString(), "aria-label": option.label || 'radio option', "data-label": option.label }, hAsync("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && hAsync("span", { class: "sd-radio-button-group__label" }, option.label)));
|
|
7685
8097
|
})));
|
|
7686
8098
|
}
|
|
7687
|
-
static get watchers() { return {
|
|
7688
|
-
"value": ["valueChanged"]
|
|
7689
|
-
}; }
|
|
7690
8099
|
static get style() { return sdRadioButtonGroupCss(); }
|
|
7691
8100
|
static get cmpMeta() { return {
|
|
7692
8101
|
"$flags$": 768,
|
|
7693
8102
|
"$tagName$": "sd-radio-button-group",
|
|
7694
8103
|
"$members$": {
|
|
7695
|
-
"value": [
|
|
8104
|
+
"value": [1032],
|
|
7696
8105
|
"radioOptions": [1040],
|
|
7697
8106
|
"size": [1],
|
|
7698
8107
|
"disabled": [4],
|
|
7699
|
-
"name": [1]
|
|
7700
|
-
"selectedValue": [32]
|
|
8108
|
+
"name": [1]
|
|
7701
8109
|
},
|
|
7702
8110
|
"$listeners$": undefined,
|
|
7703
8111
|
"$lazyBundleId$": "-",
|
|
7704
|
-
"$attrsToReflect$": [
|
|
8112
|
+
"$attrsToReflect$": []
|
|
7705
8113
|
}; }
|
|
7706
8114
|
}
|
|
7707
8115
|
|
|
@@ -7710,7 +8118,7 @@ const sdRadioGroupCss = () => `sd-radio-group{display:inline-block}sd-radio-grou
|
|
|
7710
8118
|
class SdRadioGroup {
|
|
7711
8119
|
constructor(hostRef) {
|
|
7712
8120
|
registerInstance(this, hostRef);
|
|
7713
|
-
this.
|
|
8121
|
+
this.change = createEvent(this, "sdUpdate");
|
|
7714
8122
|
}
|
|
7715
8123
|
value;
|
|
7716
8124
|
radioOptions = [];
|
|
@@ -7718,7 +8126,7 @@ class SdRadioGroup {
|
|
|
7718
8126
|
disabled = false;
|
|
7719
8127
|
name;
|
|
7720
8128
|
selectedValue;
|
|
7721
|
-
|
|
8129
|
+
change;
|
|
7722
8130
|
componentWillLoad() {
|
|
7723
8131
|
if (this.value) {
|
|
7724
8132
|
this.selectedValue = this.value;
|
|
@@ -7732,7 +8140,7 @@ class SdRadioGroup {
|
|
|
7732
8140
|
return;
|
|
7733
8141
|
this.selectedValue = optionValue;
|
|
7734
8142
|
this.value = optionValue;
|
|
7735
|
-
this.
|
|
8143
|
+
this.change.emit(optionValue);
|
|
7736
8144
|
};
|
|
7737
8145
|
isOptionSelected(option) {
|
|
7738
8146
|
return this.selectedValue === option.value;
|
|
@@ -7758,7 +8166,7 @@ class SdRadioGroup {
|
|
|
7758
8166
|
}
|
|
7759
8167
|
render() {
|
|
7760
8168
|
const groupName = this.name || `sd-radio-group-${Math.random().toString(36).substring(2, 11)}`;
|
|
7761
|
-
return (hAsync("div", { key: '
|
|
8169
|
+
return (hAsync("div", { key: '9599dded7410ed41178f6cbf93aa24897cc9b030', class: this.getGroupClasses(), role: "radiogroup" }, this.radioOptions.map((option, index) => {
|
|
7762
8170
|
const isSelected = this.isOptionSelected(option);
|
|
7763
8171
|
const isDisabled = this.isOptionDisabled(option);
|
|
7764
8172
|
return (hAsync("label", { key: `radio-${index}`, class: this.getRadioClasses(option), role: "radio", "aria-checked": isSelected.toString(), "aria-disabled": isDisabled.toString(), "aria-label": option.label || 'radio option' }, hAsync("input", { type: "radio", name: groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && hAsync("span", { class: "sd-radio-group__label" }, option.label)));
|
|
@@ -7897,111 +8305,94 @@ class SelectKeyboardNavigation {
|
|
|
7897
8305
|
}
|
|
7898
8306
|
}
|
|
7899
8307
|
|
|
7900
|
-
const sdSelectCss = () =>
|
|
8308
|
+
const sdSelectCss = () => `sd-select{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select *:focus,sd-select *:focus-visible,sd-select *:focus-within{outline:none !important}sd-select .sd-select{width:100%}sd-select .sd-select .sd-select__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;height:100%;align-items:center}sd-select .sd-select .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select .sd-select .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select .sd-select .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select .sd-select .sd-select__arrow--open{transform:rotate(180deg)}`;
|
|
7901
8309
|
|
|
7902
8310
|
class SdSelect extends BaseDropdownEvent {
|
|
7903
8311
|
constructor(hostRef) {
|
|
7904
8312
|
super();
|
|
7905
8313
|
registerInstance(this, hostRef);
|
|
7906
|
-
this.
|
|
7907
|
-
this.dropDownShow = createEvent(this, "
|
|
8314
|
+
this.update = createEvent(this, "sdUpdate");
|
|
8315
|
+
this.dropDownShow = createEvent(this, "sdDropDownShow");
|
|
7908
8316
|
}
|
|
7909
8317
|
get el() { return getElement(this); }
|
|
7910
8318
|
// props
|
|
7911
8319
|
value = null;
|
|
7912
|
-
label = '';
|
|
7913
8320
|
options = [];
|
|
7914
8321
|
placeholder = '선택';
|
|
7915
8322
|
optionPlaceholder = '옵션이 없습니다.';
|
|
7916
8323
|
width = '200px';
|
|
7917
8324
|
dropdownHeight = '260px';
|
|
8325
|
+
autoFocus = false;
|
|
7918
8326
|
disabled = false;
|
|
7919
8327
|
clearable = false;
|
|
7920
8328
|
searchable = false;
|
|
8329
|
+
// props - label
|
|
8330
|
+
label = '';
|
|
8331
|
+
insideLabel = false;
|
|
8332
|
+
useLabelRequired = false;
|
|
8333
|
+
labelTooltip = '';
|
|
8334
|
+
labelTooltipProps = null;
|
|
8335
|
+
// props - form
|
|
8336
|
+
name;
|
|
8337
|
+
rules = [];
|
|
8338
|
+
error = false;
|
|
7921
8339
|
// props - custom slots
|
|
7922
8340
|
optionRenderer;
|
|
7923
8341
|
// states
|
|
7924
|
-
filteredOptions = this.options;
|
|
7925
8342
|
isOpen = false;
|
|
7926
|
-
searchText = null;
|
|
7927
8343
|
itemIndex = -1;
|
|
7928
8344
|
isScrolled = false;
|
|
7929
8345
|
// events
|
|
7930
|
-
|
|
8346
|
+
update;
|
|
7931
8347
|
dropDownShow;
|
|
7932
8348
|
selectRef;
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
8349
|
+
triggerRef;
|
|
8350
|
+
formField;
|
|
8351
|
+
filteredOptions = this.options;
|
|
8352
|
+
dropDownWidth = this.width;
|
|
8353
|
+
async sdOpen() {
|
|
7937
8354
|
this.isOpen = true;
|
|
7938
8355
|
}
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
this.sdChange?.emit({ value: selectedOption?.value || null, option: selectedOption || null });
|
|
7942
|
-
}
|
|
7943
|
-
optionsChanged() {
|
|
7944
|
-
this.filteredOptions = this.options;
|
|
7945
|
-
this.filterOptions();
|
|
8356
|
+
async sdValidate() {
|
|
8357
|
+
this.formField?.sdValidate();
|
|
7946
8358
|
}
|
|
7947
|
-
|
|
7948
|
-
this.
|
|
8359
|
+
async sdReset() {
|
|
8360
|
+
this.formField?.sdReset();
|
|
7949
8361
|
}
|
|
7950
|
-
async
|
|
7951
|
-
|
|
7952
|
-
const searchInput = await this.getNativeInputElement();
|
|
7953
|
-
if (this.itemIndex === -1) {
|
|
7954
|
-
searchInput?.focus({ preventScroll: true });
|
|
7955
|
-
return;
|
|
7956
|
-
}
|
|
7957
|
-
else if (searchInput?.matches(':focus')) {
|
|
7958
|
-
searchInput?.blur();
|
|
7959
|
-
}
|
|
7960
|
-
}
|
|
7961
|
-
const optionElements = this.dropdownRef?.querySelectorAll('.sd-select__dropdown sd-select-option') || [];
|
|
7962
|
-
const currentItem = optionElements?.[this.itemIndex];
|
|
7963
|
-
if (!currentItem || !this.isOpen)
|
|
7964
|
-
return;
|
|
7965
|
-
this.optionRef = currentItem;
|
|
7966
|
-
const isOptionDisabled = await this.optionRef.isDisabled();
|
|
7967
|
-
if (isOptionDisabled) {
|
|
7968
|
-
newIndex > oldIndex ? this.itemIndex++ : this.itemIndex--;
|
|
7969
|
-
return;
|
|
7970
|
-
}
|
|
7971
|
-
this.scrollToOption(currentItem);
|
|
8362
|
+
async sdResetValidate() {
|
|
8363
|
+
this.formField?.sdResetValidation();
|
|
7972
8364
|
}
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
this.filteredOptions = this.options;
|
|
7976
|
-
this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화
|
|
8365
|
+
async sdFocus() {
|
|
8366
|
+
this.formField?.sdFocus();
|
|
7977
8367
|
}
|
|
7978
|
-
|
|
7979
|
-
this.
|
|
8368
|
+
async valueChanged() {
|
|
8369
|
+
const selectedOption = this.getSelectedOption();
|
|
8370
|
+
this.update?.emit({ value: selectedOption?.value || null, option: selectedOption || null });
|
|
7980
8371
|
}
|
|
7981
8372
|
async isOpenChanged() {
|
|
7982
8373
|
// Base class의 이벤트 관리 호출 - 다른 select와의 이벤트 충돌 방지
|
|
7983
8374
|
this.onDropdownToggle(this.isOpen);
|
|
7984
|
-
const selectedOption = this.getSelectedOption();
|
|
7985
|
-
if (!selectedOption) {
|
|
7986
|
-
this.itemIndex = /* this.searchable ? */ -1 /* : 0 */;
|
|
7987
|
-
}
|
|
7988
|
-
else {
|
|
7989
|
-
this.itemIndex = this.options.indexOf(selectedOption);
|
|
7990
|
-
}
|
|
7991
8375
|
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
7992
|
-
if (this.isOpen === false)
|
|
7993
|
-
|
|
7994
|
-
await new Promise(resolve => setTimeout(resolve, 10));
|
|
7995
|
-
const optionElements = this.dropdownRef?.querySelectorAll('.sd-select__dropdown sd-select-option') || [];
|
|
7996
|
-
const currentItem = optionElements?.[this.itemIndex];
|
|
7997
|
-
if (this.searchable) {
|
|
7998
|
-
const searchInput = await this.getNativeInputElement();
|
|
7999
|
-
searchInput?.focus({ preventScroll: true });
|
|
8376
|
+
if (this.isOpen === false) {
|
|
8377
|
+
await this.formField?.sdValidate();
|
|
8000
8378
|
}
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8379
|
+
}
|
|
8380
|
+
componentWillLoad() {
|
|
8381
|
+
this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화
|
|
8382
|
+
}
|
|
8383
|
+
componentDidLoad() {
|
|
8384
|
+
if (this.autoFocus) {
|
|
8385
|
+
this.selectRef?.focus();
|
|
8386
|
+
}
|
|
8387
|
+
}
|
|
8388
|
+
// render 이후 label을 제외한 trigger의 너비를 기준으로 dropdown 너비 설정
|
|
8389
|
+
componentDidRender() {
|
|
8390
|
+
const trigger = this.triggerRef;
|
|
8391
|
+
const rect = trigger?.getBoundingClientRect();
|
|
8392
|
+
this.dropDownWidth = rect?.width ? `${rect.width}px` : this.width;
|
|
8393
|
+
}
|
|
8394
|
+
disconnectedCallback() {
|
|
8395
|
+
this.cleanupEvent(); // global dropdown Manager에서 제거 + 이벤트 정리
|
|
8005
8396
|
}
|
|
8006
8397
|
handleDocumentClick(event) {
|
|
8007
8398
|
if (!this.selectRef?.contains(event.target)) {
|
|
@@ -8025,35 +8416,197 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
8025
8416
|
const selectedOption = this.filteredOptions[this.itemIndex];
|
|
8026
8417
|
if (selectedOption && !selectedOption.disabled) {
|
|
8027
8418
|
this.value = selectedOption.value;
|
|
8028
|
-
this.searchText = null;
|
|
8029
8419
|
this.isOpen = false;
|
|
8030
8420
|
}
|
|
8031
|
-
break;
|
|
8032
|
-
case 'Escape':
|
|
8033
|
-
this.isOpen = false;
|
|
8034
|
-
break;
|
|
8035
|
-
}
|
|
8421
|
+
break;
|
|
8422
|
+
case 'Escape':
|
|
8423
|
+
this.isOpen = false;
|
|
8424
|
+
break;
|
|
8425
|
+
}
|
|
8426
|
+
}
|
|
8427
|
+
getSelectedOption() {
|
|
8428
|
+
return this.options.find(option => option.value === this.value);
|
|
8429
|
+
}
|
|
8430
|
+
closeDropdown() {
|
|
8431
|
+
this.isOpen = false;
|
|
8432
|
+
}
|
|
8433
|
+
handleTriggerClick = (event) => {
|
|
8434
|
+
event.stopPropagation();
|
|
8435
|
+
if (!this.disabled) {
|
|
8436
|
+
this.isOpen = !this.isOpen;
|
|
8437
|
+
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
8438
|
+
}
|
|
8439
|
+
};
|
|
8440
|
+
handleOptionClick = (detail) => {
|
|
8441
|
+
const { option, event } = detail;
|
|
8442
|
+
event.stopPropagation();
|
|
8443
|
+
if (!option.disabled) {
|
|
8444
|
+
this.value = option.value;
|
|
8445
|
+
this.isOpen = false;
|
|
8446
|
+
}
|
|
8447
|
+
};
|
|
8448
|
+
render() {
|
|
8449
|
+
return (hAsync("sd-field", { key: '507736637b3b7acee4bfef07eac7175c5e196c86', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, insideLabel: this.insideLabel, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, hAsync("div", { key: 'd905202201f5977d04a929af507653900af3ee75', class: {
|
|
8450
|
+
'sd-select': true,
|
|
8451
|
+
'sd-select--disabled': this.disabled,
|
|
8452
|
+
'sd-select--error': !!this.error,
|
|
8453
|
+
'sd-select--label': !!this.label,
|
|
8454
|
+
}, ref: el => (this.selectRef = el) }, this.renderTrigger(), this.renderDropdown())));
|
|
8455
|
+
}
|
|
8456
|
+
renderTrigger() {
|
|
8457
|
+
const selectedOption = this.getSelectedOption();
|
|
8458
|
+
return (hAsync("div", { class: "sd-select__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick, ref: el => (this.triggerRef = el) }, hAsync("span", { class: "sd-select__value" }, selectedOption ? selectedOption.label : this.placeholder), this.clearable && selectedOption && !this.disabled && (hAsync("sd-icon", { key: "clear-icon", name: "close", size: 10, color: "#888", class: "sd-select__clear", onClick: async (event) => {
|
|
8459
|
+
event.stopPropagation();
|
|
8460
|
+
this.value = null;
|
|
8461
|
+
await this.formField?.sdValidate();
|
|
8462
|
+
} })), hAsync("sd-icon", { key: "arrow-icon", name: "arrowDown", color: "#888", class: { 'sd-select__arrow': true, 'sd-select__arrow--open': this.isOpen } })));
|
|
8463
|
+
}
|
|
8464
|
+
renderDropdown() {
|
|
8465
|
+
if (this.isOpen === false)
|
|
8466
|
+
return null;
|
|
8467
|
+
const parentRef = (this.selectRef?.querySelector('.sd-select__trigger') ||
|
|
8468
|
+
this.selectRef);
|
|
8469
|
+
return (hAsync("sd-portal", { open: this.isOpen, parentRef: parentRef, onSdClose: this.closeDropdown }, hAsync("sd-select-dropdown", { value: this.value, options: this.options, itemIndex: this.itemIndex, width: this.dropDownWidth, dropdownHeight: this.dropdownHeight, searchable: this.searchable, optionPlaceholder: this.optionPlaceholder, onSdOptionClick: ({ detail }) => this.handleOptionClick(detail), onSdOptionFiltered: ({ detail }) => (this.filteredOptions = detail) })));
|
|
8470
|
+
}
|
|
8471
|
+
static get watchers() { return {
|
|
8472
|
+
"value": ["valueChanged"],
|
|
8473
|
+
"isOpen": ["isOpenChanged"]
|
|
8474
|
+
}; }
|
|
8475
|
+
static get style() { return sdSelectCss(); }
|
|
8476
|
+
static get cmpMeta() { return {
|
|
8477
|
+
"$flags$": 768,
|
|
8478
|
+
"$tagName$": "sd-select",
|
|
8479
|
+
"$members$": {
|
|
8480
|
+
"value": [1032],
|
|
8481
|
+
"options": [1040],
|
|
8482
|
+
"placeholder": [1],
|
|
8483
|
+
"optionPlaceholder": [1, "option-placeholder"],
|
|
8484
|
+
"width": [1],
|
|
8485
|
+
"dropdownHeight": [1, "dropdown-height"],
|
|
8486
|
+
"autoFocus": [4, "auto-focus"],
|
|
8487
|
+
"disabled": [4],
|
|
8488
|
+
"clearable": [4],
|
|
8489
|
+
"searchable": [4],
|
|
8490
|
+
"label": [1],
|
|
8491
|
+
"insideLabel": [4, "inside-label"],
|
|
8492
|
+
"useLabelRequired": [4, "use-label-required"],
|
|
8493
|
+
"labelTooltip": [1, "label-tooltip"],
|
|
8494
|
+
"labelTooltipProps": [16],
|
|
8495
|
+
"name": [1],
|
|
8496
|
+
"rules": [16],
|
|
8497
|
+
"error": [4],
|
|
8498
|
+
"optionRenderer": [16],
|
|
8499
|
+
"isOpen": [32],
|
|
8500
|
+
"itemIndex": [32],
|
|
8501
|
+
"isScrolled": [32],
|
|
8502
|
+
"sdOpen": [64],
|
|
8503
|
+
"sdValidate": [64],
|
|
8504
|
+
"sdReset": [64],
|
|
8505
|
+
"sdResetValidate": [64],
|
|
8506
|
+
"sdFocus": [64]
|
|
8507
|
+
},
|
|
8508
|
+
"$listeners$": undefined,
|
|
8509
|
+
"$lazyBundleId$": "-",
|
|
8510
|
+
"$attrsToReflect$": []
|
|
8511
|
+
}; }
|
|
8512
|
+
}
|
|
8513
|
+
|
|
8514
|
+
const sdSelectDropdownCss = () => `.sd-select-dropdown{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-select-dropdown::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-select-dropdown::-webkit-scrollbar:horizontal{height:8px}.sd-select-dropdown::-webkit-scrollbar:vertical{width:8px}.sd-select-dropdown::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-select-dropdown::-webkit-scrollbar-track{background-color:transparent}.sd-select-dropdown .sd-select-option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}.sd-select-dropdown{width:var(--select-dropdown-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;display:flex;flex-direction:column;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-dropdown--ready{opacity:1}`;
|
|
8515
|
+
|
|
8516
|
+
class SdSelectDropdown {
|
|
8517
|
+
constructor(hostRef) {
|
|
8518
|
+
registerInstance(this, hostRef);
|
|
8519
|
+
this.optionClick = createEvent(this, "sdOptionClick");
|
|
8520
|
+
this.optionFiltered = createEvent(this, "sdOptionFiltered");
|
|
8521
|
+
this.scroll = createEvent(this, "sdScroll");
|
|
8522
|
+
}
|
|
8523
|
+
itemIndex;
|
|
8524
|
+
value = null;
|
|
8525
|
+
options;
|
|
8526
|
+
width;
|
|
8527
|
+
dropdownHeight;
|
|
8528
|
+
searchable;
|
|
8529
|
+
optionPlaceholder;
|
|
8530
|
+
useCheckbox = false;
|
|
8531
|
+
useAll = false;
|
|
8532
|
+
filteredOptions = this.options;
|
|
8533
|
+
searchText = null;
|
|
8534
|
+
isScrolled = false;
|
|
8535
|
+
isDropdownReady = false;
|
|
8536
|
+
optionClick;
|
|
8537
|
+
optionFiltered;
|
|
8538
|
+
scroll;
|
|
8539
|
+
filteredOptionsChanged(newValue) {
|
|
8540
|
+
this.optionFiltered.emit(newValue);
|
|
8541
|
+
}
|
|
8542
|
+
searchTextChanged() {
|
|
8543
|
+
this.filterOptions();
|
|
8544
|
+
}
|
|
8545
|
+
async itemIndexChanged(newIndex, oldIndex) {
|
|
8546
|
+
if (this.searchable) {
|
|
8547
|
+
const searchInput = await this.getNativeInputElement();
|
|
8548
|
+
if (this.itemIndex === -1) {
|
|
8549
|
+
searchInput?.focus({ preventScroll: true });
|
|
8550
|
+
return;
|
|
8551
|
+
}
|
|
8552
|
+
else if (searchInput?.matches(':focus')) {
|
|
8553
|
+
searchInput?.blur();
|
|
8554
|
+
}
|
|
8555
|
+
}
|
|
8556
|
+
const optionElements = this.dropdownRef?.querySelectorAll('.sd-select-dropdown sd-select-option') || [];
|
|
8557
|
+
const currentItem = optionElements?.[this.itemIndex];
|
|
8558
|
+
if (!currentItem)
|
|
8559
|
+
return;
|
|
8560
|
+
this.optionRef = currentItem;
|
|
8561
|
+
const isOptionDisabled = await this.optionRef.sdIsDisabled();
|
|
8562
|
+
if (isOptionDisabled) {
|
|
8563
|
+
newIndex > oldIndex ? this.itemIndex++ : this.itemIndex--;
|
|
8564
|
+
return;
|
|
8565
|
+
}
|
|
8566
|
+
this.scrollToOption(currentItem);
|
|
8567
|
+
}
|
|
8568
|
+
componentWillLoad() {
|
|
8569
|
+
this.filteredOptions = this.options;
|
|
8570
|
+
// DOM 렌더링을 기다리기 위해 이중 requestAnimationFrame 사용 - (레이아웃/스타일 계산 - 페인트 이후)
|
|
8571
|
+
requestAnimationFrame(() => {
|
|
8572
|
+
requestAnimationFrame(async () => {
|
|
8573
|
+
const selectedOptions = this.getSelectedOption();
|
|
8574
|
+
// 선택된 옵션이 있으면 첫 번째 선택된 항목으로 스크롤
|
|
8575
|
+
if (selectedOptions) {
|
|
8576
|
+
const selectedIndex = Array.isArray(selectedOptions)
|
|
8577
|
+
? this.options.indexOf(selectedOptions[0])
|
|
8578
|
+
: this.options.indexOf(selectedOptions);
|
|
8579
|
+
const optionElements = Array.from(this.dropdownRef?.querySelectorAll('sd-select-option') || []);
|
|
8580
|
+
// useAll 사용시 "전체" 옵션 포함한 인덱스 사용
|
|
8581
|
+
const actualIndex = this.useAll ? selectedIndex + 1 : selectedIndex;
|
|
8582
|
+
// 선택된 옵션이 화면 가운데에 오도록 index 조정
|
|
8583
|
+
const targetIndex = Math.min(actualIndex + 4, optionElements.length - 1);
|
|
8584
|
+
const currentItem = optionElements?.[targetIndex];
|
|
8585
|
+
if (currentItem) {
|
|
8586
|
+
this.scrollToOption(currentItem, 'instant');
|
|
8587
|
+
}
|
|
8588
|
+
}
|
|
8589
|
+
this.isDropdownReady = true;
|
|
8590
|
+
if (this.searchable) {
|
|
8591
|
+
const searchInput = await this.getNativeInputElement();
|
|
8592
|
+
if (searchInput) {
|
|
8593
|
+
requestAnimationFrame(() => {
|
|
8594
|
+
searchInput.focus({ preventScroll: true });
|
|
8595
|
+
});
|
|
8596
|
+
}
|
|
8597
|
+
}
|
|
8598
|
+
});
|
|
8599
|
+
});
|
|
8036
8600
|
}
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8601
|
+
dropdownRef;
|
|
8602
|
+
searchRef;
|
|
8603
|
+
optionRef;
|
|
8604
|
+
get dropdownSize() {
|
|
8605
|
+
return {
|
|
8606
|
+
'--select-dropdown-width': this.width || '200px',
|
|
8607
|
+
'--select-dropdown-height': this.dropdownHeight || '260px',
|
|
8608
|
+
};
|
|
8040
8609
|
}
|
|
8041
|
-
// event handlers
|
|
8042
|
-
handleTriggerClick = (event) => {
|
|
8043
|
-
event.stopPropagation();
|
|
8044
|
-
if (!this.disabled) {
|
|
8045
|
-
this.isOpen = !this.isOpen;
|
|
8046
|
-
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
8047
|
-
}
|
|
8048
|
-
};
|
|
8049
|
-
handleOptionClick = (detail) => {
|
|
8050
|
-
const { option, event } = detail;
|
|
8051
|
-
event.stopPropagation();
|
|
8052
|
-
if (!option.disabled) {
|
|
8053
|
-
this.value = option.value;
|
|
8054
|
-
this.isOpen = false;
|
|
8055
|
-
}
|
|
8056
|
-
};
|
|
8057
8610
|
filterOptions() {
|
|
8058
8611
|
if (!this.searchText || this.searchText.trim() === '') {
|
|
8059
8612
|
// 검색어가 없으면 전체 옵션 표시
|
|
@@ -8065,21 +8618,24 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
8065
8618
|
}
|
|
8066
8619
|
}
|
|
8067
8620
|
getSelectedOption() {
|
|
8068
|
-
|
|
8621
|
+
if (typeof this.value !== 'object') {
|
|
8622
|
+
return this.options.find(option => option.value === this.value);
|
|
8623
|
+
}
|
|
8624
|
+
return this.options.filter(option => this.value?.includes(option));
|
|
8625
|
+
}
|
|
8626
|
+
isOptionSelected(value) {
|
|
8627
|
+
if (Array.isArray(this.value)) {
|
|
8628
|
+
return this.value.some(selected => selected.value === value);
|
|
8629
|
+
}
|
|
8630
|
+
return value === this.value;
|
|
8069
8631
|
}
|
|
8070
|
-
handleDropdownScroll = (event) => {
|
|
8071
|
-
const target = event.target;
|
|
8072
|
-
const scrollTop = target.scrollTop;
|
|
8073
|
-
// 스크롤이 조금이라도 되면 그림자 표시
|
|
8074
|
-
this.isScrolled = scrollTop > 0;
|
|
8075
|
-
};
|
|
8076
8632
|
async getNativeInputElement() {
|
|
8077
8633
|
if (this.searchRef) {
|
|
8078
|
-
return this.searchRef.
|
|
8634
|
+
return this.searchRef.sdGetNativeElement();
|
|
8079
8635
|
}
|
|
8080
8636
|
return null;
|
|
8081
8637
|
}
|
|
8082
|
-
scrollToOption(optionElement) {
|
|
8638
|
+
scrollToOption(optionElement, scrollBehavior = 'smooth') {
|
|
8083
8639
|
if (!this.dropdownRef || !optionElement)
|
|
8084
8640
|
return;
|
|
8085
8641
|
const dropdown = this.dropdownRef;
|
|
@@ -8087,79 +8643,55 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
8087
8643
|
const optionHeight = optionElement.offsetHeight;
|
|
8088
8644
|
const dropdownScrollTop = dropdown.scrollTop;
|
|
8089
8645
|
const dropdownHeight = dropdown.clientHeight;
|
|
8090
|
-
const searchContainer = dropdown.querySelector('.sd-
|
|
8646
|
+
const searchContainer = dropdown.querySelector('.sd-select-search-input');
|
|
8091
8647
|
const searchOffset = searchContainer ? searchContainer.offsetHeight : 0;
|
|
8092
8648
|
const visibleTop = dropdownScrollTop + searchOffset;
|
|
8093
8649
|
const visibleBottom = dropdownScrollTop + dropdownHeight;
|
|
8094
8650
|
if (optionTop < visibleTop) {
|
|
8095
|
-
dropdown.
|
|
8651
|
+
dropdown.scrollTo({ top: optionTop - searchOffset, behavior: scrollBehavior });
|
|
8096
8652
|
}
|
|
8097
8653
|
else if (optionTop + optionHeight > visibleBottom) {
|
|
8098
|
-
dropdown.
|
|
8654
|
+
dropdown.scrollTo({
|
|
8655
|
+
top: optionTop + optionHeight - dropdownHeight + searchOffset,
|
|
8656
|
+
behavior: scrollBehavior,
|
|
8657
|
+
});
|
|
8099
8658
|
}
|
|
8100
8659
|
}
|
|
8101
|
-
|
|
8660
|
+
handleDropdownScroll = (event) => {
|
|
8661
|
+
const target = event.target;
|
|
8662
|
+
const scrollTop = target.scrollTop;
|
|
8663
|
+
// 스크롤이 조금이라도 되면 그림자 표시
|
|
8664
|
+
this.isScrolled = scrollTop > 0;
|
|
8665
|
+
};
|
|
8102
8666
|
render() {
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
return (hAsync(Host, { key: '8f90fd48d8e20b97d35a047d15507d3116c79b23', style: style }, hAsync("div", { key: '91bc6bab24b9d99ab595357ec5591b56510ed161', class: {
|
|
8108
|
-
'sd-select': true,
|
|
8109
|
-
'sd-select--open': this.isOpen,
|
|
8110
|
-
'sd-select--disabled': this.disabled,
|
|
8111
|
-
}, ref: el => (this.selectRef = el) }, this.renderLabel(this.label), hAsync("div", { key: 'a2ceb7cc71b13887f55f3a44e0f1babd4be388b9', class: "sd-select__container" }, this.renderTrigger(), this.renderDropdown()))));
|
|
8112
|
-
}
|
|
8113
|
-
renderLabel(label) {
|
|
8114
|
-
if (!label)
|
|
8115
|
-
return null;
|
|
8116
|
-
return hAsync("label", { class: "sd-select__label" }, label);
|
|
8117
|
-
}
|
|
8118
|
-
renderTrigger() {
|
|
8119
|
-
const selectedOption = this.getSelectedOption();
|
|
8120
|
-
return (hAsync("div", { class: "sd-select__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick }, hAsync("span", { class: "sd-select__value" }, selectedOption ? selectedOption.label : this.placeholder), this.clearable && selectedOption && !this.disabled && (hAsync("sd-icon", { key: "clear-icon", name: "close", size: 10, color: "#888", class: "sd-select__clear", onClick: event => {
|
|
8121
|
-
event.stopPropagation();
|
|
8122
|
-
this.value = null;
|
|
8123
|
-
} })), hAsync("sd-icon", { key: "arrow-icon", name: "arrowDown", color: "#888", class: { 'sd-select__arrow': true, 'sd-select__arrow--open': this.isOpen } })));
|
|
8124
|
-
}
|
|
8125
|
-
renderDropdown() {
|
|
8126
|
-
const style = {
|
|
8127
|
-
'--select-dropdown-width': this.width || '200px',
|
|
8128
|
-
'--select-dropdown-height': this.dropdownHeight || '260px',
|
|
8129
|
-
};
|
|
8130
|
-
if (this.isOpen === false)
|
|
8131
|
-
return null;
|
|
8132
|
-
return (hAsync("sd-portal", { open: this.isOpen, parentRef: this.selectRef, onSdClose: this.closeDropdown }, hAsync("div", { class: "sd-select__dropdown", style: style, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (hAsync("sd-select-search-input", { ref: el => (this.searchRef = el), isScrolled: this.isScrolled, searchText: this.searchText, onSdSearchInput: (event) => (this.searchText = event.detail || ''), onSdSearchFocus: () => (this.itemIndex = -1) })), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (hAsync("slot", { name: `option-${option.value}` }, hAsync("sd-select-option", { option: option, index: index, isSelected: option.value === this.value, isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.handleOptionClick(detail) }))))) : (hAsync("slot", { name: "option-placeholder" }, hAsync("div", { class: 'sd-select__option-placeholder' }, this.optionPlaceholder))))));
|
|
8667
|
+
return (hAsync(Host, { key: 'de06f67bf93dce6db12fee6bce3c6b11b7ee375f', style: this.dropdownSize }, hAsync("div", { key: '42510dd6a21f1aa224f5141555c02729d09a6baf', class: {
|
|
8668
|
+
'sd-select-dropdown': true,
|
|
8669
|
+
'sd-select-dropdown--ready': this.isDropdownReady,
|
|
8670
|
+
}, onScroll: this.handleDropdownScroll, ref: el => (this.dropdownRef = el) }, this.searchable && (hAsync("sd-select-search-input", { key: '2177a7ad0dc3ea5ded63103a55e03b9b0d4d3913', ref: el => (this.searchRef = el), isScrolled: this.isScrolled, searchText: this.searchText, onSdSearchInput: (event) => (this.searchText = event.detail || ''), onSdSearchFocus: () => (this.itemIndex = -1) })), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (hAsync("slot", { name: `option-${option.value}` }, hAsync("sd-select-option", { option: option, index: index, isSelected: this.isOptionSelected(option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.optionClick.emit(detail), useCheckbox: this.useCheckbox }))))) : (hAsync("slot", { name: "option-placeholder" }, hAsync("div", { class: 'sd-select-option-placeholder' }, this.optionPlaceholder))))));
|
|
8133
8671
|
}
|
|
8134
8672
|
static get watchers() { return {
|
|
8135
|
-
"
|
|
8136
|
-
"options": ["optionsChanged"],
|
|
8673
|
+
"filteredOptions": ["filteredOptionsChanged"],
|
|
8137
8674
|
"searchText": ["searchTextChanged"],
|
|
8138
|
-
"itemIndex": ["itemIndexChanged"]
|
|
8139
|
-
"isOpen": ["isOpenChanged"]
|
|
8675
|
+
"itemIndex": ["itemIndexChanged"]
|
|
8140
8676
|
}; }
|
|
8141
|
-
static get style() { return
|
|
8677
|
+
static get style() { return sdSelectDropdownCss(); }
|
|
8142
8678
|
static get cmpMeta() { return {
|
|
8143
8679
|
"$flags$": 772,
|
|
8144
|
-
"$tagName$": "sd-select",
|
|
8680
|
+
"$tagName$": "sd-select-dropdown",
|
|
8145
8681
|
"$members$": {
|
|
8146
|
-
"
|
|
8147
|
-
"
|
|
8148
|
-
"options": [
|
|
8149
|
-
"placeholder": [1],
|
|
8150
|
-
"optionPlaceholder": [1, "option-placeholder"],
|
|
8682
|
+
"itemIndex": [1026, "item-index"],
|
|
8683
|
+
"value": [8],
|
|
8684
|
+
"options": [16],
|
|
8151
8685
|
"width": [1],
|
|
8152
8686
|
"dropdownHeight": [1, "dropdown-height"],
|
|
8153
|
-
"disabled": [4],
|
|
8154
|
-
"clearable": [4],
|
|
8155
8687
|
"searchable": [4],
|
|
8156
|
-
"
|
|
8688
|
+
"optionPlaceholder": [1, "option-placeholder"],
|
|
8689
|
+
"useCheckbox": [4, "use-checkbox"],
|
|
8690
|
+
"useAll": [4, "use-all"],
|
|
8157
8691
|
"filteredOptions": [32],
|
|
8158
|
-
"isOpen": [32],
|
|
8159
8692
|
"searchText": [32],
|
|
8160
|
-
"itemIndex": [32],
|
|
8161
8693
|
"isScrolled": [32],
|
|
8162
|
-
"
|
|
8694
|
+
"isDropdownReady": [32]
|
|
8163
8695
|
},
|
|
8164
8696
|
"$listeners$": undefined,
|
|
8165
8697
|
"$lazyBundleId$": "-",
|
|
@@ -8167,110 +8699,92 @@ class SdSelect extends BaseDropdownEvent {
|
|
|
8167
8699
|
}; }
|
|
8168
8700
|
}
|
|
8169
8701
|
|
|
8170
|
-
const sdSelectMultipleCss = () =>
|
|
8702
|
+
const sdSelectMultipleCss = () => `sd-select-multiple{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-multiple *:focus,sd-select-multiple *:focus-visible,sd-select-multiple *:focus-within{outline:none !important}sd-select-multiple .sd-select-multiple{width:100%}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger{padding:4px 28px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger .sd-select-multiple__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}sd-select-multiple .sd-select-multiple .sd-select-multiple__trigger .sd-select-multiple__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple .sd-select-multiple__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease;margin-left:8px}sd-select-multiple .sd-select-multiple__arrow--open{transform:rotate(180deg)}`;
|
|
8171
8703
|
|
|
8172
8704
|
class SdSelectMultiple extends BaseDropdownEvent {
|
|
8173
8705
|
constructor(hostRef) {
|
|
8174
8706
|
super();
|
|
8175
8707
|
registerInstance(this, hostRef);
|
|
8176
|
-
this.
|
|
8177
|
-
this.dropDownShow = createEvent(this, "
|
|
8708
|
+
this.update = createEvent(this, "sdUpdate");
|
|
8709
|
+
this.dropDownShow = createEvent(this, "sdDropDownShow");
|
|
8178
8710
|
}
|
|
8179
8711
|
get el() { return getElement(this); }
|
|
8180
8712
|
// props
|
|
8181
8713
|
value = null;
|
|
8182
|
-
label = '';
|
|
8183
8714
|
options = [];
|
|
8184
8715
|
placeholder = '선택';
|
|
8185
8716
|
optionPlaceholder = '옵션이 없습니다.';
|
|
8186
8717
|
width = '200px';
|
|
8187
8718
|
dropdownHeight = '260px';
|
|
8719
|
+
autoFocus = false;
|
|
8188
8720
|
disabled = false;
|
|
8189
8721
|
clearable = false;
|
|
8190
8722
|
searchable = false;
|
|
8723
|
+
// props - select multiple specific
|
|
8724
|
+
useAll = false;
|
|
8191
8725
|
useCheckbox = false;
|
|
8192
|
-
// props -
|
|
8726
|
+
// props - label
|
|
8727
|
+
label = '';
|
|
8728
|
+
useLabelRequired = false;
|
|
8729
|
+
labelTooltip = '';
|
|
8730
|
+
labelTooltipProps = null;
|
|
8731
|
+
// props - form
|
|
8732
|
+
name;
|
|
8733
|
+
rules = [];
|
|
8734
|
+
error = false;
|
|
8193
8735
|
optionRenderer;
|
|
8194
8736
|
// states
|
|
8195
|
-
filteredOptions = this.options;
|
|
8196
8737
|
isOpen = false;
|
|
8197
|
-
searchText = null;
|
|
8198
8738
|
itemIndex = -1;
|
|
8199
8739
|
isScrolled = false;
|
|
8200
8740
|
// events
|
|
8201
|
-
|
|
8741
|
+
update;
|
|
8202
8742
|
dropDownShow;
|
|
8203
8743
|
selectRef;
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8744
|
+
triggerRef;
|
|
8745
|
+
formField;
|
|
8746
|
+
filteredOptions = this.options;
|
|
8747
|
+
dropDownWidth = this.width;
|
|
8748
|
+
async sdOpen() {
|
|
8208
8749
|
this.isOpen = true;
|
|
8209
8750
|
}
|
|
8210
|
-
|
|
8211
|
-
this.
|
|
8751
|
+
async sdValidate() {
|
|
8752
|
+
this.formField?.sdValidate();
|
|
8212
8753
|
}
|
|
8213
|
-
|
|
8214
|
-
this.
|
|
8215
|
-
this.filterOptions();
|
|
8754
|
+
async sdReset() {
|
|
8755
|
+
this.formField?.sdReset();
|
|
8216
8756
|
}
|
|
8217
|
-
|
|
8218
|
-
this.
|
|
8757
|
+
async sdResetValidate() {
|
|
8758
|
+
this.formField?.sdResetValidation();
|
|
8219
8759
|
}
|
|
8220
|
-
async
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
return;
|
|
8226
|
-
}
|
|
8227
|
-
else if (searchInput?.matches(':focus')) {
|
|
8228
|
-
searchInput?.blur();
|
|
8229
|
-
}
|
|
8230
|
-
}
|
|
8231
|
-
const optionElements = Array.from(this.dropdownRef?.querySelectorAll('.sd-select-multiple__dropdown sd-select-option') || []);
|
|
8232
|
-
const currentItem = optionElements?.[this.itemIndex];
|
|
8233
|
-
if (!currentItem || !this.isOpen)
|
|
8234
|
-
return;
|
|
8235
|
-
this.optionRef = currentItem;
|
|
8236
|
-
const isOptionDisabled = await this.optionRef.isDisabled();
|
|
8237
|
-
if (isOptionDisabled) {
|
|
8238
|
-
newIndex > oldIndex ? this.itemIndex++ : this.itemIndex--;
|
|
8239
|
-
return;
|
|
8240
|
-
}
|
|
8241
|
-
this.scrollToOption(currentItem);
|
|
8760
|
+
async sdFocus() {
|
|
8761
|
+
this.formField?.sdFocus();
|
|
8762
|
+
}
|
|
8763
|
+
valueChanged() {
|
|
8764
|
+
this.update?.emit(this.value);
|
|
8242
8765
|
}
|
|
8243
8766
|
async isOpenChanged() {
|
|
8244
8767
|
// Base class의 이벤트 관리 호출 - 다른 select와의 이벤트 충돌 방지
|
|
8245
8768
|
this.onDropdownToggle(this.isOpen);
|
|
8246
|
-
const selectedOption = this.getSelectedOption();
|
|
8247
|
-
if (!selectedOption) {
|
|
8248
|
-
this.itemIndex = -1;
|
|
8249
|
-
}
|
|
8250
|
-
else {
|
|
8251
|
-
this.itemIndex = this.options.indexOf(selectedOption[0]);
|
|
8252
|
-
}
|
|
8253
8769
|
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
8254
|
-
if (this.isOpen === false)
|
|
8255
|
-
|
|
8256
|
-
await new Promise(resolve => setTimeout(resolve, 10));
|
|
8257
|
-
const optionElements = Array.from(this.dropdownRef?.querySelectorAll('.sd-select-multiple__dropdown sd-select-item') || []);
|
|
8258
|
-
const currentItem = optionElements?.[this.itemIndex];
|
|
8259
|
-
// 드롭다운이 열릴 때 검색 입력에 포커스
|
|
8260
|
-
if (this.searchable) {
|
|
8261
|
-
const searchInput = await this.getNativeInputElement();
|
|
8262
|
-
searchInput?.focus();
|
|
8770
|
+
if (this.isOpen === false) {
|
|
8771
|
+
await this.formField?.sdValidate();
|
|
8263
8772
|
}
|
|
8264
|
-
if (!currentItem)
|
|
8265
|
-
return;
|
|
8266
|
-
await new Promise(resolve => setTimeout(resolve, 10)); // 추가 딜레이
|
|
8267
|
-
this.scrollToOption(currentItem);
|
|
8268
8773
|
}
|
|
8269
|
-
|
|
8270
|
-
// props가 모두 설정된 후에 실행되므로 올바른 options 값을 가져올 수 있음
|
|
8271
|
-
this.filteredOptions = this.options;
|
|
8774
|
+
componentWillLoad() {
|
|
8272
8775
|
this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화
|
|
8273
8776
|
}
|
|
8777
|
+
componentDidLoad() {
|
|
8778
|
+
if (this.autoFocus) {
|
|
8779
|
+
this.selectRef?.focus();
|
|
8780
|
+
}
|
|
8781
|
+
}
|
|
8782
|
+
// render 이후 label을 제외한 trigger의 너비를 기준으로 dropdown 너비 설정
|
|
8783
|
+
componentDidRender() {
|
|
8784
|
+
const trigger = this.triggerRef;
|
|
8785
|
+
const rect = trigger?.getBoundingClientRect();
|
|
8786
|
+
this.dropDownWidth = rect?.width ? `${rect.width}px` : this.width;
|
|
8787
|
+
}
|
|
8274
8788
|
disconnectedCallback() {
|
|
8275
8789
|
this.cleanupEvent(); // global dropdown Manager에서 제거 + 이벤트 정리
|
|
8276
8790
|
}
|
|
@@ -8303,44 +8817,6 @@ class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
8303
8817
|
break;
|
|
8304
8818
|
}
|
|
8305
8819
|
}
|
|
8306
|
-
// event handlers
|
|
8307
|
-
handleTriggerClick = (event) => {
|
|
8308
|
-
event.stopPropagation();
|
|
8309
|
-
if (!this.disabled) {
|
|
8310
|
-
this.isOpen = !this.isOpen;
|
|
8311
|
-
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
8312
|
-
}
|
|
8313
|
-
};
|
|
8314
|
-
handleOptionClick = (detail) => {
|
|
8315
|
-
const { option, event } = detail;
|
|
8316
|
-
event.stopPropagation();
|
|
8317
|
-
this.handleOptionSelection(option);
|
|
8318
|
-
};
|
|
8319
|
-
filterOptions() {
|
|
8320
|
-
if (!this.searchText || this.searchText.trim() === '') {
|
|
8321
|
-
// 검색어가 없으면 전체 옵션 표시
|
|
8322
|
-
this.filteredOptions = this.options;
|
|
8323
|
-
}
|
|
8324
|
-
else {
|
|
8325
|
-
// 검색어가 있으면 필터링
|
|
8326
|
-
this.filteredOptions = this.options.filter(option => option.label.toLowerCase().includes(this.searchText.toLowerCase()));
|
|
8327
|
-
}
|
|
8328
|
-
}
|
|
8329
|
-
getSelectedOption() {
|
|
8330
|
-
return this.options.filter(option => this.value?.includes(option));
|
|
8331
|
-
}
|
|
8332
|
-
handleDropdownScroll = (event) => {
|
|
8333
|
-
const target = event.target;
|
|
8334
|
-
const scrollTop = target.scrollTop;
|
|
8335
|
-
// 스크롤이 조금이라도 되면 그림자 표시
|
|
8336
|
-
this.isScrolled = scrollTop > 0;
|
|
8337
|
-
};
|
|
8338
|
-
async getNativeInputElement() {
|
|
8339
|
-
if (this.searchRef) {
|
|
8340
|
-
return this.searchRef.getNativeElement();
|
|
8341
|
-
}
|
|
8342
|
-
return null;
|
|
8343
|
-
}
|
|
8344
8820
|
handleOptionSelection = (option) => {
|
|
8345
8821
|
if (!option || option.disabled)
|
|
8346
8822
|
return;
|
|
@@ -8354,98 +8830,86 @@ class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
8354
8830
|
this.value = [...(this.value || []), option];
|
|
8355
8831
|
}
|
|
8356
8832
|
};
|
|
8833
|
+
getSelectedOption() {
|
|
8834
|
+
return this.options.filter(option => this.value?.includes(option));
|
|
8835
|
+
}
|
|
8357
8836
|
closeDropdown() {
|
|
8358
8837
|
this.isOpen = false;
|
|
8359
8838
|
}
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
const optionHeight = optionElement.offsetHeight;
|
|
8366
|
-
const dropdownScrollTop = dropdown.scrollTop;
|
|
8367
|
-
const dropdownHeight = dropdown.clientHeight;
|
|
8368
|
-
const searchContainer = dropdown.querySelector('.sd-select__search-container');
|
|
8369
|
-
const searchOffset = searchContainer ? searchContainer.offsetHeight : 0;
|
|
8370
|
-
const visibleTop = dropdownScrollTop + searchOffset;
|
|
8371
|
-
const visibleBottom = dropdownScrollTop + dropdownHeight;
|
|
8372
|
-
if (optionTop < visibleTop) {
|
|
8373
|
-
dropdown.scrollTop = optionTop - searchOffset;
|
|
8374
|
-
}
|
|
8375
|
-
else if (optionTop + optionHeight > visibleBottom) {
|
|
8376
|
-
dropdown.scrollTop = optionTop + optionHeight - dropdownHeight + searchOffset;
|
|
8839
|
+
handleTriggerClick = (event) => {
|
|
8840
|
+
event.stopPropagation();
|
|
8841
|
+
if (!this.disabled) {
|
|
8842
|
+
this.isOpen = !this.isOpen;
|
|
8843
|
+
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
8377
8844
|
}
|
|
8378
|
-
}
|
|
8379
|
-
|
|
8845
|
+
};
|
|
8846
|
+
handleOptionClick = (detail) => {
|
|
8847
|
+
const { option, event } = detail;
|
|
8848
|
+
event.stopPropagation();
|
|
8849
|
+
this.handleOptionSelection(option);
|
|
8850
|
+
};
|
|
8380
8851
|
render() {
|
|
8381
|
-
|
|
8382
|
-
'--select-width': this.width || '200px',
|
|
8383
|
-
'--select-dropdown-height': this.dropdownHeight || '260px',
|
|
8384
|
-
};
|
|
8385
|
-
return (hAsync(Host, { key: 'aa11a88a19987be498da603cfa81c95e89f935c0', style: style }, hAsync("div", { key: '35d1a93e5bee37027d43a90fadc32c335569ce66', class: {
|
|
8852
|
+
return (hAsync("sd-field", { key: 'cc40c09b8c1ea2aa049d12857c6cc80cd5a5966b', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, hAsync("div", { key: '0d90b8368287d7e67a384234a976da5d387b065b', class: {
|
|
8386
8853
|
'sd-select-multiple': true,
|
|
8387
8854
|
'sd-select-multiple--open': this.isOpen,
|
|
8388
8855
|
'sd-select-multiple--disabled': this.disabled,
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
renderLabel(label) {
|
|
8392
|
-
if (!label)
|
|
8393
|
-
return null;
|
|
8394
|
-
return hAsync("label", { class: "sd-select-multiple__label" }, label);
|
|
8856
|
+
'sd-select-multiple--error': !!this.error,
|
|
8857
|
+
}, style: { '--select-width': this.width || '200px' }, ref: el => (this.selectRef = el) }, this.renderTrigger(), this.renderDropdown())));
|
|
8395
8858
|
}
|
|
8396
8859
|
renderTrigger() {
|
|
8397
8860
|
const selectedOption = this.getSelectedOption();
|
|
8398
|
-
return (hAsync("div", { class: "sd-select-multiple__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick }, hAsync("span", { class: "sd-select-multiple__value" }, !selectedOption
|
|
8399
|
-
?
|
|
8400
|
-
: selectedOption.length
|
|
8401
|
-
? selectedOption.map(option => option.label).join(', ')
|
|
8402
|
-
: this.placeholder), this.clearable && selectedOption?.length > 0 && !this.disabled && (hAsync("sd-icon", { key: "close-icon", name: "close", size: 10, color: "#888", class: "sd-select-multiple__clear", onClick: event => {
|
|
8861
|
+
return (hAsync("div", { class: "sd-select-multiple__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick, ref: el => (this.triggerRef = el) }, hAsync("span", { class: "sd-select-multiple__value" }, !selectedOption || selectedOption.length === 0
|
|
8862
|
+
? this.placeholder
|
|
8863
|
+
: selectedOption.map(option => option.label).join(', ')), this.clearable && selectedOption?.length > 0 && !this.disabled && (hAsync("sd-icon", { key: "close-icon", name: "close", size: 10, color: "#888", class: "sd-select-multiple__clear", onClick: async (event) => {
|
|
8403
8864
|
event.stopPropagation();
|
|
8404
8865
|
this.value = null;
|
|
8866
|
+
await this.formField?.sdValidate();
|
|
8405
8867
|
} })), hAsync("sd-icon", { key: "arrow-icon", name: "arrowDown", color: "#888", class: { 'sd-select-multiple__arrow': true, 'sd-select-multiple__arrow--open': this.isOpen } })));
|
|
8406
8868
|
}
|
|
8407
8869
|
renderDropdown() {
|
|
8408
8870
|
if (this.isOpen === false)
|
|
8409
8871
|
return null;
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
}, onClick: event => event.stopPropagation() }, hAsync("sd-input", { ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdInput: event => {
|
|
8414
|
-
this.searchText = String(event?.detail);
|
|
8415
|
-
}, onSdFocus: () => {
|
|
8416
|
-
this.itemIndex = -1;
|
|
8417
|
-
} }, hAsync("sd-icon", { name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" })))), this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index) => (hAsync("slot", { name: `option-${option.value}` }, hAsync("sd-select-option", { option: option, index: index, isSelected: this.value?.some(selected => selected.value === option.value), isFocused: index === this.itemIndex, onOptionClick: ({ detail }) => this.handleOptionClick(detail), useCheckbox: this.useCheckbox }))))) : (hAsync("slot", { name: "option-placeholder" }, hAsync("div", { class: 'sd-select-multiple__option-placeholder' }, this.optionPlaceholder))))));
|
|
8872
|
+
const parentRef = (this.selectRef?.querySelector('.sd-select-multiple__trigger') ||
|
|
8873
|
+
this.selectRef);
|
|
8874
|
+
return (hAsync("sd-portal", { open: this.isOpen, parentRef: parentRef, onSdClose: this.closeDropdown }, hAsync("sd-select-dropdown", { value: this.value, options: this.options, itemIndex: this.itemIndex, width: this.dropDownWidth, dropdownHeight: this.dropdownHeight, searchable: this.searchable, optionPlaceholder: this.optionPlaceholder, useCheckbox: this.useCheckbox, useAll: this.useAll, onSdOptionClick: ({ detail }) => this.handleOptionClick(detail), onSdOptionFiltered: ({ detail }) => (this.filteredOptions = detail) })));
|
|
8418
8875
|
}
|
|
8419
8876
|
static get watchers() { return {
|
|
8420
8877
|
"value": ["valueChanged"],
|
|
8421
|
-
"options": ["optionsChanged"],
|
|
8422
|
-
"searchText": ["searchTextChanged"],
|
|
8423
|
-
"itemIndex": ["itemIndexChanged"],
|
|
8424
8878
|
"isOpen": ["isOpenChanged"]
|
|
8425
8879
|
}; }
|
|
8426
8880
|
static get style() { return sdSelectMultipleCss(); }
|
|
8427
8881
|
static get cmpMeta() { return {
|
|
8428
|
-
"$flags$":
|
|
8882
|
+
"$flags$": 768,
|
|
8429
8883
|
"$tagName$": "sd-select-multiple",
|
|
8430
8884
|
"$members$": {
|
|
8431
8885
|
"value": [1040],
|
|
8432
|
-
"label": [1],
|
|
8433
8886
|
"options": [1040],
|
|
8434
8887
|
"placeholder": [1],
|
|
8435
8888
|
"optionPlaceholder": [1, "option-placeholder"],
|
|
8436
8889
|
"width": [1],
|
|
8437
8890
|
"dropdownHeight": [1, "dropdown-height"],
|
|
8891
|
+
"autoFocus": [4, "auto-focus"],
|
|
8438
8892
|
"disabled": [4],
|
|
8439
8893
|
"clearable": [4],
|
|
8440
8894
|
"searchable": [4],
|
|
8895
|
+
"useAll": [4, "use-all"],
|
|
8441
8896
|
"useCheckbox": [4, "use-checkbox"],
|
|
8897
|
+
"label": [1],
|
|
8898
|
+
"useLabelRequired": [4, "use-label-required"],
|
|
8899
|
+
"labelTooltip": [1, "label-tooltip"],
|
|
8900
|
+
"labelTooltipProps": [16],
|
|
8901
|
+
"name": [1],
|
|
8902
|
+
"rules": [16],
|
|
8903
|
+
"error": [4],
|
|
8442
8904
|
"optionRenderer": [16],
|
|
8443
|
-
"filteredOptions": [32],
|
|
8444
8905
|
"isOpen": [32],
|
|
8445
|
-
"searchText": [32],
|
|
8446
8906
|
"itemIndex": [32],
|
|
8447
8907
|
"isScrolled": [32],
|
|
8448
|
-
"
|
|
8908
|
+
"sdOpen": [64],
|
|
8909
|
+
"sdValidate": [64],
|
|
8910
|
+
"sdReset": [64],
|
|
8911
|
+
"sdResetValidate": [64],
|
|
8912
|
+
"sdFocus": [64]
|
|
8449
8913
|
},
|
|
8450
8914
|
"$listeners$": undefined,
|
|
8451
8915
|
"$lazyBundleId$": "-",
|
|
@@ -8453,19 +8917,18 @@ class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
8453
8917
|
}; }
|
|
8454
8918
|
}
|
|
8455
8919
|
|
|
8456
|
-
const sdSelectMultipleGroupCss = () => `.sd-select-multiple-group__dropdown{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-select-multiple-group__dropdown::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-select-multiple-group__dropdown::-webkit-scrollbar:horizontal{height:8px}.sd-select-multiple-group__dropdown::-webkit-scrollbar:vertical{width:8px}.sd-select-multiple-group__dropdown::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-select-multiple-group__dropdown::-webkit-scrollbar-track{background-color:transparent}.sd-select-multiple-group__dropdown .sd-select-multiple-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-multiple-group{display:inline-
|
|
8920
|
+
const sdSelectMultipleGroupCss = () => `.sd-select-multiple-group__dropdown{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-select-multiple-group__dropdown::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-select-multiple-group__dropdown::-webkit-scrollbar:horizontal{height:8px}.sd-select-multiple-group__dropdown::-webkit-scrollbar:vertical{width:8px}.sd-select-multiple-group__dropdown::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-select-multiple-group__dropdown::-webkit-scrollbar-track{background-color:transparent}.sd-select-multiple-group__dropdown .sd-select-multiple-group__option-placeholder{height:48px;display:flex;align-items:center;padding:8px 16px;font-size:12px;line-height:0;text-align:left;color:#888888}sd-select-multiple-group{display:inline-flex;flex-flow:column nowrap;width:fit-content;height:fit-content}sd-select-multiple-group:focus,sd-select-multiple-group:focus-visible,sd-select-multiple-group:focus-within{outline:none !important}sd-select-multiple-group .sd-select-multiple-group{width:100%}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger{padding:4px 20px 4px 12px;display:flex;width:100%;align-items:center}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger .sd-select-multiple-group__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__trigger .sd-select-multiple-group__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}sd-select-multiple-group .sd-select-multiple-group .sd-select-multiple-group__arrow--open{transform:rotate(180deg)}.sd-select-multiple-group__dropdown{width:var(--select-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;opacity:0.5;transition:opacity 0.15s ease-in}.sd-select-multiple-group__dropdown--ready{opacity:1}`;
|
|
8457
8921
|
|
|
8458
8922
|
class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
8459
8923
|
constructor(hostRef) {
|
|
8460
8924
|
super();
|
|
8461
8925
|
registerInstance(this, hostRef);
|
|
8462
|
-
this.
|
|
8463
|
-
this.dropDownShow = createEvent(this, "
|
|
8926
|
+
this.update = createEvent(this, "sdUpdate");
|
|
8927
|
+
this.dropDownShow = createEvent(this, "sdDropDownShow");
|
|
8464
8928
|
}
|
|
8465
8929
|
get el() { return getElement(this); }
|
|
8466
8930
|
// props
|
|
8467
8931
|
value = null;
|
|
8468
|
-
label = '';
|
|
8469
8932
|
options = [];
|
|
8470
8933
|
placeholder = '선택';
|
|
8471
8934
|
optionPlaceholder = '옵션이 없습니다.';
|
|
@@ -8478,6 +8941,15 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8478
8941
|
useAll = false;
|
|
8479
8942
|
allCheckedLabel = '전체';
|
|
8480
8943
|
allCheckOptionLabel = '전체';
|
|
8944
|
+
// props - label
|
|
8945
|
+
label = '';
|
|
8946
|
+
useLabelRequired = false;
|
|
8947
|
+
labelTooltip = '';
|
|
8948
|
+
labelTooltipProps = null;
|
|
8949
|
+
// props - form
|
|
8950
|
+
name;
|
|
8951
|
+
rules = [];
|
|
8952
|
+
error = false;
|
|
8481
8953
|
// props - custom styles
|
|
8482
8954
|
containerStyle = {};
|
|
8483
8955
|
triggerStyle = {};
|
|
@@ -8494,14 +8966,33 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8494
8966
|
isScrolled = false;
|
|
8495
8967
|
isDropdownReady = false;
|
|
8496
8968
|
// events
|
|
8497
|
-
|
|
8969
|
+
update;
|
|
8498
8970
|
dropDownShow;
|
|
8499
8971
|
selectRef;
|
|
8500
8972
|
searchRef;
|
|
8973
|
+
triggerRef;
|
|
8501
8974
|
optionRef;
|
|
8502
8975
|
dropdownRef;
|
|
8976
|
+
formField;
|
|
8977
|
+
dropDownWidth = this.width;
|
|
8978
|
+
async sdOpen() {
|
|
8979
|
+
await new Promise(resolve => setTimeout(resolve, 0));
|
|
8980
|
+
this.isOpen = true;
|
|
8981
|
+
}
|
|
8982
|
+
async sdValidate() {
|
|
8983
|
+
this.formField?.sdValidate();
|
|
8984
|
+
}
|
|
8985
|
+
async sdReset() {
|
|
8986
|
+
this.formField?.sdReset();
|
|
8987
|
+
}
|
|
8988
|
+
async sdResetValidate() {
|
|
8989
|
+
this.formField?.sdResetValidation();
|
|
8990
|
+
}
|
|
8991
|
+
async sdFocus() {
|
|
8992
|
+
this.formField?.sdFocus();
|
|
8993
|
+
}
|
|
8503
8994
|
valueChanged() {
|
|
8504
|
-
this.
|
|
8995
|
+
this.update?.emit(this.value);
|
|
8505
8996
|
}
|
|
8506
8997
|
optionsChanged() {
|
|
8507
8998
|
this.filteredOptions = this.options;
|
|
@@ -8541,6 +9032,7 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8541
9032
|
this.dropDownShow?.emit({ isOpen: this.isOpen });
|
|
8542
9033
|
this.isDropdownReady = false;
|
|
8543
9034
|
if (this.isOpen === false) {
|
|
9035
|
+
await this.formField?.sdValidate();
|
|
8544
9036
|
return;
|
|
8545
9037
|
}
|
|
8546
9038
|
// DOM 렌더링을 기다리기 위해 이중 requestAnimationFrame 사용 - (레이아웃/스타일 계산 - 페인트 이후)
|
|
@@ -8572,15 +9064,17 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8572
9064
|
});
|
|
8573
9065
|
});
|
|
8574
9066
|
}
|
|
8575
|
-
async open() {
|
|
8576
|
-
await new Promise(resolve => setTimeout(resolve, 0));
|
|
8577
|
-
this.isOpen = true;
|
|
8578
|
-
}
|
|
8579
9067
|
componentWillLoad() {
|
|
8580
9068
|
// props가 모두 설정된 후에 실행되므로 올바른 options 값을 가져올 수 있음
|
|
8581
9069
|
this.filteredOptions = this.options;
|
|
8582
9070
|
this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화
|
|
8583
9071
|
}
|
|
9072
|
+
// render 이후 label을 제외한 trigger의 너비를 기준으로 dropdown 너비 설정
|
|
9073
|
+
componentDidRender() {
|
|
9074
|
+
const trigger = this.triggerRef;
|
|
9075
|
+
const rect = trigger?.getBoundingClientRect();
|
|
9076
|
+
this.dropDownWidth = rect?.width ? `${rect.width}px` : this.width;
|
|
9077
|
+
}
|
|
8584
9078
|
disconnectedCallback() {
|
|
8585
9079
|
this.cleanupEvent(); // global dropdown Manager에서 제거 + 이벤트 정리
|
|
8586
9080
|
}
|
|
@@ -8712,7 +9206,7 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8712
9206
|
};
|
|
8713
9207
|
async getNativeInputElement() {
|
|
8714
9208
|
if (this.searchRef) {
|
|
8715
|
-
return this.searchRef.
|
|
9209
|
+
return this.searchRef.sdGetNativeElement();
|
|
8716
9210
|
}
|
|
8717
9211
|
return null;
|
|
8718
9212
|
}
|
|
@@ -8815,26 +9309,19 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8815
9309
|
});
|
|
8816
9310
|
}
|
|
8817
9311
|
render() {
|
|
8818
|
-
|
|
8819
|
-
'--select-width': this.width || '200px',
|
|
8820
|
-
'--select-dropdown-height': this.dropdownHeight || '260px',
|
|
8821
|
-
};
|
|
8822
|
-
return (hAsync(Host, { key: '9b9985d412b87c72d6408acd74f8f120a5918bc2', style: style }, hAsync("div", { key: '3e2c08541d14cc31ecf3f2d383ac20804ce809ef', class: {
|
|
9312
|
+
return (hAsync("sd-field", { key: '7ec71405f801265b0abf2d381491a65454c540cd', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, useLabelRequired: this.useLabelRequired, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, hAsync("div", { key: '80c1db9cd2c47e4acfece06a9b23896cc0acef88', class: {
|
|
8823
9313
|
'sd-select-multiple-group': true,
|
|
8824
9314
|
'sd-select-multiple-group--open': this.isOpen,
|
|
8825
9315
|
'sd-select-multiple-group--disabled': this.disabled,
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
renderLabel(label, labelStyle) {
|
|
8829
|
-
if (!label)
|
|
8830
|
-
return null;
|
|
8831
|
-
return (hAsync("label", { class: "sd-select-multiple-group__label", style: labelStyle }, label));
|
|
9316
|
+
'sd-select-multiple-group--label': !!this.label,
|
|
9317
|
+
}, ref: el => (this.selectRef = el) }, this.renderTrigger(), this.renderDropdown())));
|
|
8832
9318
|
}
|
|
8833
9319
|
renderTrigger() {
|
|
8834
9320
|
const selectedOption = this.getSelectedOption();
|
|
8835
|
-
return (hAsync("div", { class: "sd-select-multiple-group__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick, style: this.triggerStyle }, hAsync("span", { class: "sd-select-multiple-group__value" }, this.getTriggerLabel()), this.clearable && selectedOption?.length > 0 && !this.disabled && (hAsync("sd-icon", { key: "close-icon", name: "close", size: 10, color: "#888", class: "sd-select-multiple-group__clear", onClick: event => {
|
|
9321
|
+
return (hAsync("div", { class: "sd-select-multiple-group__trigger", tabindex: this.disabled ? -1 : 0, onClick: this.handleTriggerClick, style: this.triggerStyle }, hAsync("span", { class: "sd-select-multiple-group__value" }, this.getTriggerLabel()), this.clearable && selectedOption?.length > 0 && !this.disabled && (hAsync("sd-icon", { key: "close-icon", name: "close", size: 10, color: "#888", class: "sd-select-multiple-group__clear", onClick: async (event) => {
|
|
8836
9322
|
event.stopPropagation();
|
|
8837
9323
|
this.value = null;
|
|
9324
|
+
await this.formField?.sdValidate();
|
|
8838
9325
|
} })), hAsync("sd-icon", { key: "arrow-icon", name: "arrowDown", color: "#888", class: {
|
|
8839
9326
|
'sd-select-multiple-group__arrow': true,
|
|
8840
9327
|
'sd-select-multiple-group__arrow--open': this.isOpen,
|
|
@@ -8842,7 +9329,7 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8842
9329
|
}
|
|
8843
9330
|
renderDropdown() {
|
|
8844
9331
|
const style = {
|
|
8845
|
-
'--select-width': this.
|
|
9332
|
+
'--select-width': this.dropDownWidth || '200px',
|
|
8846
9333
|
'--select-dropdown-height': this.dropdownHeight || '260px',
|
|
8847
9334
|
};
|
|
8848
9335
|
if (this.isOpen === false)
|
|
@@ -8872,7 +9359,6 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8872
9359
|
"$tagName$": "sd-select-multiple-group",
|
|
8873
9360
|
"$members$": {
|
|
8874
9361
|
"value": [1040],
|
|
8875
|
-
"label": [1],
|
|
8876
9362
|
"options": [1040],
|
|
8877
9363
|
"placeholder": [1],
|
|
8878
9364
|
"optionPlaceholder": [1, "option-placeholder"],
|
|
@@ -8885,6 +9371,13 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8885
9371
|
"useAll": [4, "use-all"],
|
|
8886
9372
|
"allCheckedLabel": [1, "all-checked-label"],
|
|
8887
9373
|
"allCheckOptionLabel": [1, "all-check-option-label"],
|
|
9374
|
+
"label": [1],
|
|
9375
|
+
"useLabelRequired": [4, "use-label-required"],
|
|
9376
|
+
"labelTooltip": [1, "label-tooltip"],
|
|
9377
|
+
"labelTooltipProps": [16],
|
|
9378
|
+
"name": [1],
|
|
9379
|
+
"rules": [16],
|
|
9380
|
+
"error": [4],
|
|
8888
9381
|
"containerStyle": [16],
|
|
8889
9382
|
"triggerStyle": [16],
|
|
8890
9383
|
"dropdownStyle": [16],
|
|
@@ -8897,7 +9390,11 @@ class SdSelectMultipleGroup extends BaseDropdownEvent {
|
|
|
8897
9390
|
"itemIndex": [32],
|
|
8898
9391
|
"isScrolled": [32],
|
|
8899
9392
|
"isDropdownReady": [32],
|
|
8900
|
-
"
|
|
9393
|
+
"sdOpen": [64],
|
|
9394
|
+
"sdValidate": [64],
|
|
9395
|
+
"sdReset": [64],
|
|
9396
|
+
"sdResetValidate": [64],
|
|
9397
|
+
"sdFocus": [64]
|
|
8901
9398
|
},
|
|
8902
9399
|
"$listeners$": undefined,
|
|
8903
9400
|
"$lazyBundleId$": "-",
|
|
@@ -8921,7 +9418,7 @@ class SdSelectOption {
|
|
|
8921
9418
|
disabled = false;
|
|
8922
9419
|
useCheckbox = false;
|
|
8923
9420
|
isHovered = false;
|
|
8924
|
-
async
|
|
9421
|
+
async sdIsDisabled() {
|
|
8925
9422
|
return !!this.option.disabled;
|
|
8926
9423
|
}
|
|
8927
9424
|
optionClick;
|
|
@@ -8936,13 +9433,13 @@ class SdSelectOption {
|
|
|
8936
9433
|
}
|
|
8937
9434
|
};
|
|
8938
9435
|
render() {
|
|
8939
|
-
return (hAsync(Host, { key: '
|
|
9436
|
+
return (hAsync(Host, { key: '33542be792e3345ee693a6064f9398ecd1fceda1' }, hAsync("div", { key: '408d402f5e4a845ebb896f78a557ac93ca414eaa', class: {
|
|
8940
9437
|
'sd-select__option': true,
|
|
8941
9438
|
'sd-select__option--selected': this.isSelected,
|
|
8942
9439
|
'sd-select__option--disabled': !!this.option.disabled,
|
|
8943
9440
|
'sd-select__option--focused': this.isFocused,
|
|
8944
9441
|
'sd-select__option--use-checkbox': this.useCheckbox,
|
|
8945
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: this.handleClick }, this.useCheckbox ? (hAsync("div", { class: "sd-select__option__checkbox-wrapper" }, hAsync("sd-checkbox", {
|
|
9442
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: this.handleClick }, this.useCheckbox ? (hAsync("div", { class: "sd-select__option__checkbox-wrapper" }, hAsync("sd-checkbox", { value: this.isSelected, disabled: this.option.disabled,
|
|
8946
9443
|
// checkboxStyle={
|
|
8947
9444
|
// !this.isSelected
|
|
8948
9445
|
// ? { borderColor: '#888' }
|
|
@@ -8968,7 +9465,7 @@ class SdSelectOption {
|
|
|
8968
9465
|
"disabled": [4],
|
|
8969
9466
|
"useCheckbox": [4, "use-checkbox"],
|
|
8970
9467
|
"isHovered": [32],
|
|
8971
|
-
"
|
|
9468
|
+
"sdIsDisabled": [64]
|
|
8972
9469
|
},
|
|
8973
9470
|
"$listeners$": undefined,
|
|
8974
9471
|
"$lazyBundleId$": "-",
|
|
@@ -9022,7 +9519,7 @@ class SdSelectOptionGroup {
|
|
|
9022
9519
|
}
|
|
9023
9520
|
};
|
|
9024
9521
|
render() {
|
|
9025
|
-
return (hAsync("div", { key: '
|
|
9522
|
+
return (hAsync("div", { key: '9ba2c1d9963ae5b20d8823ed4e1054f4b1ea1164', class: {
|
|
9026
9523
|
'sd-select__option-group': true,
|
|
9027
9524
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
9028
9525
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -9031,10 +9528,10 @@ class SdSelectOptionGroup {
|
|
|
9031
9528
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
9032
9529
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
9033
9530
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
9034
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, hAsync("div", { key: '
|
|
9531
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, hAsync("div", { key: '6576ff206863a28062566b816cd81955f1890ec2', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (hAsync("sd-checkbox", { key: 'ad1367ec16aff35a09bc1ca62d4981a29ad0c20e', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
9035
9532
|
e.preventDefault();
|
|
9036
9533
|
this.handleClick(this.option, this.isSelected, e);
|
|
9037
|
-
} })), hAsync("span", { key: '
|
|
9534
|
+
} })), hAsync("span", { key: 'a51e3950353966056edd756259d3224bd588c78b', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (hAsync("span", { key: 'ed003ff2d7616096a4759b253718e5fc5a09c007', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
9038
9535
|
}
|
|
9039
9536
|
static get style() { return sdSelectOptionGroupCss(); }
|
|
9040
9537
|
static get cmpMeta() { return {
|
|
@@ -9059,41 +9556,41 @@ class SdSelectOptionGroup {
|
|
|
9059
9556
|
}; }
|
|
9060
9557
|
}
|
|
9061
9558
|
|
|
9062
|
-
const sdSelectSearchInputCss = () =>
|
|
9559
|
+
const sdSelectSearchInputCss = () => `sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center}sd-select-search-input .sd-select-search-input{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}sd-select-search-input .sd-select-search-input sd-input{width:100%}sd-select-search-input .sd-select-search-input--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}`;
|
|
9063
9560
|
|
|
9064
9561
|
class SdSelectSearchInput {
|
|
9065
9562
|
constructor(hostRef) {
|
|
9066
9563
|
registerInstance(this, hostRef);
|
|
9067
|
-
this.
|
|
9068
|
-
this.
|
|
9564
|
+
this.searchInput = createEvent(this, "sdSearchInput");
|
|
9565
|
+
this.searchFocus = createEvent(this, "sdSearchFocus");
|
|
9069
9566
|
}
|
|
9070
9567
|
isScrolled = false;
|
|
9071
9568
|
searchText = '';
|
|
9072
|
-
|
|
9073
|
-
|
|
9569
|
+
searchInput;
|
|
9570
|
+
searchFocus;
|
|
9074
9571
|
searchRef;
|
|
9075
|
-
async
|
|
9572
|
+
async sdGetNativeElement() {
|
|
9076
9573
|
if (this.searchRef) {
|
|
9077
|
-
return this.searchRef.
|
|
9574
|
+
return this.searchRef.sdGetNativeElement();
|
|
9078
9575
|
}
|
|
9079
9576
|
return null;
|
|
9080
9577
|
}
|
|
9081
|
-
async
|
|
9082
|
-
const input = await this.
|
|
9578
|
+
async sdSearchInputFocus() {
|
|
9579
|
+
const input = await this.sdGetNativeElement();
|
|
9083
9580
|
input?.focus({ preventScroll: true });
|
|
9084
9581
|
}
|
|
9085
9582
|
render() {
|
|
9086
|
-
return (hAsync("div", { key: '
|
|
9583
|
+
return (hAsync("div", { key: '199b6bdb1da143241f5e2cf797cc0f484b38aac0', class: {
|
|
9087
9584
|
'sd-select-search-input': true,
|
|
9088
9585
|
'sd-select-search-input--scrolled': !!this.isScrolled,
|
|
9089
|
-
}, onClick: event => event.stopPropagation() }, hAsync("sd-input", { key: '
|
|
9090
|
-
this.
|
|
9586
|
+
}, onClick: event => event.stopPropagation() }, hAsync("sd-input", { key: 'c768d0a2324f3ea40cff3eb049ddfad3cddcb882', ref: el => (this.searchRef = el), value: this.searchText, placeholder: "\uAC80\uC0C9", clearable: true, inputStyle: { 'padding-left': '8px' }, autofocus: true, onSdUpdate: event => {
|
|
9587
|
+
this.searchInput.emit(String(event?.detail));
|
|
9091
9588
|
}, onSdFocus: () => {
|
|
9092
|
-
this.
|
|
9589
|
+
this.searchFocus.emit();
|
|
9093
9590
|
}, onKeyDown: event => {
|
|
9094
9591
|
if (event.code === 'Enter')
|
|
9095
9592
|
event.stopPropagation();
|
|
9096
|
-
} }, hAsync("sd-icon", { key: '
|
|
9593
|
+
} }, hAsync("sd-icon", { key: '21062cf3032b5488487b61a08753de01a5de7b98', name: "search", size: 16, color: "#737373", style: { marginRight: '4px' }, slot: "prefix" }))));
|
|
9097
9594
|
}
|
|
9098
9595
|
static get style() { return sdSelectSearchInputCss(); }
|
|
9099
9596
|
static get cmpMeta() { return {
|
|
@@ -9102,8 +9599,8 @@ class SdSelectSearchInput {
|
|
|
9102
9599
|
"$members$": {
|
|
9103
9600
|
"isScrolled": [4, "is-scrolled"],
|
|
9104
9601
|
"searchText": [1, "search-text"],
|
|
9105
|
-
"
|
|
9106
|
-
"
|
|
9602
|
+
"sdGetNativeElement": [64],
|
|
9603
|
+
"sdSearchInputFocus": [64]
|
|
9107
9604
|
},
|
|
9108
9605
|
"$listeners$": undefined,
|
|
9109
9606
|
"$lazyBundleId$": "-",
|
|
@@ -9111,275 +9608,7 @@ class SdSelectSearchInput {
|
|
|
9111
9608
|
}; }
|
|
9112
9609
|
}
|
|
9113
9610
|
|
|
9114
|
-
const sdTableCss = () => `.sd-table__wrapper .sd-table__container .sd-table__middle{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:horizontal{height:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:vertical{width:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-track{background-color:transparent}.sd-table__wrapper{height:var(--table-height, auto);width:var(--table-width, 100%);color:#222222}.sd-table__wrapper .sd-table__container{width:100%;height:auto;border:1px solid #e1e1e1;border-radius:8px;font-size:12px;overflow:hidden}.sd-table__wrapper .sd-table__container .sd-table__middle{overflow:auto;will-change:scroll-position;height:var(--table-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected{width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-header thead{position:sticky;top:0;z-index:120}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right{position:sticky;background-color:#f5faff;z-index:110 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right{position:sticky;background-color:white;z-index:100 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left{left:var(--sticky-left-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right{right:var(--sticky-right-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell{position:sticky;z-index:102;background-color:#f5faff}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell{position:sticky;z-index:101;background-color:white}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead{opacity:0.4}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead tr th.sd-th{border-bottom:1px solid rgba(225, 225, 225, 0.4) !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-td,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-th,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table .sd-th__content--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead{height:36px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr{width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr sd-th{background:#f5faff;height:36px;padding:0 16px;font-weight:500;vertical-align:middle;border-bottom:1px solid #e1e1e1;-webkit-user-select:none;user-select:none;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr sd-th.sd-th .sd-th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:4px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr sd-th.sd-th .sd-th__content--left{justify-content:flex-start}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr sd-th.sd-th .sd-th__content--center{justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr sd-th.sd-th .sd-th__content--right{justify-content:flex-end}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead sd-tr sd-th.sd-th .sd-th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:16px;cursor:col-resize;z-index:3;border-left:1px solid #cccccc;border-right:1px solid #cccccc}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-tbody .sd-table__loading{position:absolute;top:0;left:0;width:100%;height:calc(var(--table-height, auto) - 36px);min-height:calc(100% - 36px);background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-tbody sd-tr:last-of-type sd-td{border-bottom:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-tbody sd-tr sd-td{height:44px;padding:0 16px;border-bottom:1px solid #e1e1e1;background:white;vertical-align:middle}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-tbody sd-tr sd-td.sd-td--left{text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-tbody sd-tr sd-td.sd-td--center{text-align:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-tbody sd-tr sd-td.sd-td--right{text-align:right}.sd-table__wrapper .sd-table__container .sd-table__bottom{background:white;text-align:center}.sd-table__wrapper .sd-table__pagination{position:relative;background:#f9f9f9;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid #e1e1e1;border-top:none;border-radius:8px}.sd-table__wrapper .sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}`;
|
|
9115
|
-
|
|
9116
|
-
let SdTable$1 = class SdTable {
|
|
9117
|
-
constructor(hostRef) {
|
|
9118
|
-
registerInstance(this, hostRef);
|
|
9119
|
-
this.sdSelectChange = createEvent(this, "sdSelectChange");
|
|
9120
|
-
this.sdPageChange = createEvent(this, "sdPageChange");
|
|
9121
|
-
this.sdRowsPerPageChange = createEvent(this, "sdRowsPerPageChange");
|
|
9122
|
-
}
|
|
9123
|
-
get el() { return getElement(this); }
|
|
9124
|
-
columns;
|
|
9125
|
-
rows;
|
|
9126
|
-
selected = new Set();
|
|
9127
|
-
rowKey = 'id';
|
|
9128
|
-
selectable = false;
|
|
9129
|
-
resizable = false;
|
|
9130
|
-
width;
|
|
9131
|
-
height;
|
|
9132
|
-
stickyHeader = false;
|
|
9133
|
-
stickyColumn = { left: 0, right: 0 };
|
|
9134
|
-
noDataLabel = '데이터가 없습니다.';
|
|
9135
|
-
isLoading = false;
|
|
9136
|
-
pagination;
|
|
9137
|
-
bodyCellRenderer;
|
|
9138
|
-
useInternalPagination = false;
|
|
9139
|
-
useRowsPerPageSelect = false;
|
|
9140
|
-
rowsPerPageOption = [
|
|
9141
|
-
{ label: '10개씩 보기', value: 10 },
|
|
9142
|
-
{ label: '25개씩 보기', value: 25 },
|
|
9143
|
-
{ label: '50개씩 보기', value: 50 },
|
|
9144
|
-
{ label: '100개씩 보기', value: 100 },
|
|
9145
|
-
];
|
|
9146
|
-
sdSelectChange;
|
|
9147
|
-
sdPageChange;
|
|
9148
|
-
sdRowsPerPageChange;
|
|
9149
|
-
currentPage = this.pagination?.page || 1;
|
|
9150
|
-
innerRows = [];
|
|
9151
|
-
innerSelected = new Set();
|
|
9152
|
-
columnWidths = [];
|
|
9153
|
-
scrolledLeft = false;
|
|
9154
|
-
scrolledRight = false;
|
|
9155
|
-
handleColumnsChange(newCols) {
|
|
9156
|
-
this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
|
|
9157
|
-
}
|
|
9158
|
-
handleRowsChange(newRows) {
|
|
9159
|
-
this.innerRows = [...newRows];
|
|
9160
|
-
}
|
|
9161
|
-
handleSelectedChange(newSelected) {
|
|
9162
|
-
this.innerSelected = new Set(newSelected);
|
|
9163
|
-
}
|
|
9164
|
-
handlePaginationChange(newVal) {
|
|
9165
|
-
if (newVal?.page && newVal.page !== this.currentPage)
|
|
9166
|
-
this.currentPage = newVal.page;
|
|
9167
|
-
}
|
|
9168
|
-
componentWillLoad() {
|
|
9169
|
-
this.innerRows = [...(this.rows || [])];
|
|
9170
|
-
this.innerSelected = new Set(this.selected);
|
|
9171
|
-
this.columnWidths = (this.columns || []).map(c => parseInt(c.width || '120', 10));
|
|
9172
|
-
}
|
|
9173
|
-
componentDidLoad() {
|
|
9174
|
-
// SSR 환경 체크
|
|
9175
|
-
if (typeof window === 'undefined')
|
|
9176
|
-
return;
|
|
9177
|
-
const middle = this.el.querySelector('.sd-table__middle');
|
|
9178
|
-
if (!middle)
|
|
9179
|
-
return;
|
|
9180
|
-
const onScroll = () => {
|
|
9181
|
-
const { scrollLeft, scrollWidth, clientWidth } = middle;
|
|
9182
|
-
this.scrolledLeft = scrollLeft > 0;
|
|
9183
|
-
this.scrolledRight = scrollLeft + clientWidth < scrollWidth;
|
|
9184
|
-
};
|
|
9185
|
-
middle.addEventListener('scroll', onScroll, { passive: true });
|
|
9186
|
-
onScroll();
|
|
9187
|
-
}
|
|
9188
|
-
// ----- Derived getters -----
|
|
9189
|
-
get visibleColumns() {
|
|
9190
|
-
return this.columns.filter(col => col.visible !== false);
|
|
9191
|
-
}
|
|
9192
|
-
get paginatedRows() {
|
|
9193
|
-
if (!this.pagination || !this.useInternalPagination)
|
|
9194
|
-
return this.innerRows;
|
|
9195
|
-
const { rowsPerPage = this.rows.length } = this.pagination || {};
|
|
9196
|
-
const result = this.innerRows.slice((this.currentPage - 1) * rowsPerPage, this.currentPage * rowsPerPage);
|
|
9197
|
-
return result;
|
|
9198
|
-
}
|
|
9199
|
-
get lastPageNumber() {
|
|
9200
|
-
const { lastPage, rowsPerPage = this.rows.length } = this.pagination || {};
|
|
9201
|
-
return lastPage ?? Math.max(1, Math.ceil(this.rows.length / rowsPerPage));
|
|
9202
|
-
}
|
|
9203
|
-
get sdTableClasses() {
|
|
9204
|
-
return [
|
|
9205
|
-
'sd-table',
|
|
9206
|
-
this.stickyHeader && 'sd-table--sticky-header',
|
|
9207
|
-
this.selectable && 'sd-table--selectable',
|
|
9208
|
-
this.resizable && 'sd-table--resizable',
|
|
9209
|
-
!this.innerRows.length && 'sd-table--no-data',
|
|
9210
|
-
((this.stickyColumn?.left ?? 0) > 0 || (this.stickyColumn?.right ?? 0) > 0) &&
|
|
9211
|
-
'sd-table--sticky-column',
|
|
9212
|
-
this.scrolledLeft && 'sd-table--scrolled-left',
|
|
9213
|
-
this.scrolledRight && 'sd-table--scrolled-right',
|
|
9214
|
-
]
|
|
9215
|
-
.filter(Boolean)
|
|
9216
|
-
.join(' ');
|
|
9217
|
-
}
|
|
9218
|
-
// ----- Selection -----
|
|
9219
|
-
// private isRowSelected(row: Row): boolean {
|
|
9220
|
-
// return Array.from(this.innerSelected).some(r => r[this.rowKey] === row[this.rowKey]);
|
|
9221
|
-
// }
|
|
9222
|
-
// private updateRowSelect(row: Row) {
|
|
9223
|
-
// const selectedArray = Array.from(this.innerSelected);
|
|
9224
|
-
// const exists = this.isRowSelected(row);
|
|
9225
|
-
// const newSelected = exists
|
|
9226
|
-
// ? selectedArray.filter(r => r[this.rowKey] !== row[this.rowKey])
|
|
9227
|
-
// : [...selectedArray, row];
|
|
9228
|
-
// // 동일 상태면 set하지 않음 → 불필요 렌더 방지
|
|
9229
|
-
// if (newSelected.length === selectedArray.length) return;
|
|
9230
|
-
// this.innerSelected = new Set(newSelected);
|
|
9231
|
-
// this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
9232
|
-
// }
|
|
9233
|
-
toggleSelectAll(checked) {
|
|
9234
|
-
if (checked) {
|
|
9235
|
-
const pageRows = new Set([...this.paginatedRows]);
|
|
9236
|
-
this.innerSelected = new Set([...this.innerSelected, ...pageRows]);
|
|
9237
|
-
}
|
|
9238
|
-
else {
|
|
9239
|
-
const currentPageKeys = this.paginatedRows.map(r => r[this.rowKey]);
|
|
9240
|
-
this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey])));
|
|
9241
|
-
}
|
|
9242
|
-
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
9243
|
-
}
|
|
9244
|
-
get isAllChecked() {
|
|
9245
|
-
const total = this.paginatedRows.length;
|
|
9246
|
-
const selectedCount = this.paginatedRows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey] === row[this.rowKey])).length;
|
|
9247
|
-
if (selectedCount === 0)
|
|
9248
|
-
return false; // 아무것도 안 선택됨
|
|
9249
|
-
if (selectedCount === total)
|
|
9250
|
-
return true; // 전부 선택됨
|
|
9251
|
-
return null; // 일부만 선택됨
|
|
9252
|
-
}
|
|
9253
|
-
// ----- Helpers -----
|
|
9254
|
-
getStickyStyle(colIdx) {
|
|
9255
|
-
const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this.selectable ? 52 : 0);
|
|
9256
|
-
const rightOffset = this.columnWidths
|
|
9257
|
-
.filter((_, i) => i >= this.visibleColumns.length - (this.stickyColumn.right || 0) && i > colIdx)
|
|
9258
|
-
.reduce((a, b) => a + b, 0);
|
|
9259
|
-
return {
|
|
9260
|
-
'--sticky-left-offset': `${leftOffset}px`,
|
|
9261
|
-
'--sticky-right-offset': `${rightOffset}px`,
|
|
9262
|
-
'width': `${this.columnWidths[colIdx]}px`,
|
|
9263
|
-
'minWidth': `${this.columnWidths[colIdx]}px`,
|
|
9264
|
-
'maxWidth': `${this.columnWidths[colIdx]}px`,
|
|
9265
|
-
};
|
|
9266
|
-
}
|
|
9267
|
-
handleResize(index, event) {
|
|
9268
|
-
// SSR 환경 체크
|
|
9269
|
-
if (typeof document === 'undefined')
|
|
9270
|
-
return;
|
|
9271
|
-
const startX = event.clientX;
|
|
9272
|
-
const startWidth = this.columnWidths[index];
|
|
9273
|
-
const handleMouseMove = (moveEvent) => {
|
|
9274
|
-
const newWidth = Math.max(startWidth + moveEvent.clientX - startX, 50);
|
|
9275
|
-
this.columnWidths = this.columnWidths.map((width, idx) => (idx === index ? newWidth : width));
|
|
9276
|
-
};
|
|
9277
|
-
const handleMouseUp = () => {
|
|
9278
|
-
document.removeEventListener('mousemove', handleMouseMove);
|
|
9279
|
-
document.removeEventListener('mouseup', handleMouseUp);
|
|
9280
|
-
};
|
|
9281
|
-
document.addEventListener('mousemove', handleMouseMove);
|
|
9282
|
-
document.addEventListener('mouseup', handleMouseUp);
|
|
9283
|
-
}
|
|
9284
|
-
// private getCellValue(column: SdTableColumn, row: Row) {
|
|
9285
|
-
// const { field, format, name } = column;
|
|
9286
|
-
// const value = typeof field === 'function' ? field(row) : field ? row[field] : row[name];
|
|
9287
|
-
// return format ? format(value, row) : value;
|
|
9288
|
-
// }
|
|
9289
|
-
// ----- Render -----
|
|
9290
|
-
renderHeader() {
|
|
9291
|
-
return (hAsync("thead", null, hAsync("sd-tr", null, this.selectable && (hAsync("sd-th", { class: {
|
|
9292
|
-
'sd-th': true,
|
|
9293
|
-
'sd-th--selected': true,
|
|
9294
|
-
'sticky-left': Boolean(this.stickyColumn.left && this.stickyColumn.left > 0),
|
|
9295
|
-
}, style: {
|
|
9296
|
-
'--sticky-left-offset': '0px',
|
|
9297
|
-
} }, hAsync("sd-checkbox", { checked: this.isAllChecked, disabled: !this.paginatedRows.length, onSdChange: (e) => this.toggleSelectAll(e.detail) }))), this.visibleColumns.map((col, colIdx) => (hAsync("sd-th", { key: col.name, class: {
|
|
9298
|
-
'sd-th': true,
|
|
9299
|
-
[`${col.thClass}`]: Boolean(col.thClass),
|
|
9300
|
-
'sticky-left': Boolean(this.stickyColumn.left && colIdx < this.stickyColumn.left),
|
|
9301
|
-
'sticky-right': Boolean(this.stickyColumn.right && colIdx >= this.visibleColumns.length - this.stickyColumn.right),
|
|
9302
|
-
'sticky-left-edge': Boolean(this.stickyColumn.left && colIdx === this.stickyColumn.left - 1),
|
|
9303
|
-
'sticky-right-edge': Boolean(this.stickyColumn.right &&
|
|
9304
|
-
colIdx === this.visibleColumns.length - this.stickyColumn.right),
|
|
9305
|
-
}, style: this.getStickyStyle(colIdx) }, hAsync("div", { class: `sd-th__content sd-th__content--${col.align || 'left'}` }, hAsync("slot", { name: `header-cell-${col.name}` }, hAsync("div", { class: "sd-th__content--label" }, col.label)), col.usePageMoveIcon && hAsync("sd-icon", { name: "pageMove", size: "12", color: "#006AC1" }), col.tooltip && (hAsync("sd-tooltip", { ...col.tooltipOptions }, hAsync("div", { slot: "content" }, col.tooltip.map(text => (hAsync("p", null, text))))))), this.resizable && typeof window !== 'undefined' && (hAsync("div", { class: "sd-th__resizer", onMouseDown: (evt) => this.handleResize(colIdx, evt) }))))))));
|
|
9306
|
-
}
|
|
9307
|
-
render() {
|
|
9308
|
-
return (hAsync(Host, { key: '2ebf8e9464f1cdf23182fca5c51b16a05bfe0dd7' }, hAsync("div", { key: 'd4fc8f59fd9b9d161514149a27746d83f99dc0f4', class: "sd-table__wrapper", style: {
|
|
9309
|
-
'--table-width': this.width,
|
|
9310
|
-
'--table-height': this.height,
|
|
9311
|
-
} }, hAsync("div", { key: '0788f53b9e0945d4bdc0c0d57c946c3771034772', class: "sd-table__container" }, hAsync("div", { key: 'a784983bbd7fcc36d92a54bd3dbfa0726e03abbe', class: "sd-table__middle", role: "table" }, hAsync("div", { key: '17c733dd95289a3c96ed6715905c874c97a83815', part: "table", class: this.sdTableClasses }, this.renderHeader(), hAsync("sd-tbody", { key: '9c4190b99f8c25479860b2caf330a0153a995215' }, hAsync("slot", { key: '135f42fe21f830703b7e04acfdcd8a572b6dbf50' })))), hAsync("div", { key: '5e8955886809083ad94bf77c68cc5cc69ca893ac', class: "sd-table__bottom" })), this.pagination && this.innerRows.length > 0 && (hAsync("div", { key: 'c1c9fa082e817f4df5e393d21fb749c78f40db02', class: "sd-table__pagination" }, hAsync("sd-pagination", { key: 'a10b36dbf2ae6fa80ee69f945e0577b38fd0fcee', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onPageChange: (e) => {
|
|
9312
|
-
if (!this.useInternalPagination) {
|
|
9313
|
-
this.sdPageChange.emit(e.detail);
|
|
9314
|
-
}
|
|
9315
|
-
else {
|
|
9316
|
-
this.currentPage = e.detail;
|
|
9317
|
-
this.sdPageChange.emit(this.currentPage);
|
|
9318
|
-
}
|
|
9319
|
-
} }), this.useRowsPerPageSelect && (hAsync("sd-select", { key: '005995ad1681f5e7dc16b0a711e87eccc2bedb01', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdChange: (e) => {
|
|
9320
|
-
const changedRowsPerPage = e.detail.value ? Number(e.detail.value) : 0;
|
|
9321
|
-
if (!this.useInternalPagination) {
|
|
9322
|
-
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
9323
|
-
}
|
|
9324
|
-
else {
|
|
9325
|
-
const newRowsPerPage = Number(e.detail.value || 0);
|
|
9326
|
-
let newLastPage = Math.max(1, Math.ceil(this.innerRows.length / newRowsPerPage));
|
|
9327
|
-
let newCurrentPage = this.currentPage;
|
|
9328
|
-
if (newCurrentPage > newLastPage) {
|
|
9329
|
-
newCurrentPage = newLastPage;
|
|
9330
|
-
}
|
|
9331
|
-
this.pagination = {
|
|
9332
|
-
page: newCurrentPage,
|
|
9333
|
-
rowsPerPage: newRowsPerPage,
|
|
9334
|
-
lastPage: newLastPage,
|
|
9335
|
-
};
|
|
9336
|
-
this.currentPage = newCurrentPage;
|
|
9337
|
-
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
9338
|
-
}
|
|
9339
|
-
} })))))));
|
|
9340
|
-
}
|
|
9341
|
-
static get watchers() { return {
|
|
9342
|
-
"columns": ["handleColumnsChange"],
|
|
9343
|
-
"rows": ["handleRowsChange"],
|
|
9344
|
-
"selected": ["handleSelectedChange"],
|
|
9345
|
-
"pagination": ["handlePaginationChange"]
|
|
9346
|
-
}; }
|
|
9347
|
-
static get style() { return sdTableCss(); }
|
|
9348
|
-
static get cmpMeta() { return {
|
|
9349
|
-
"$flags$": 772,
|
|
9350
|
-
"$tagName$": "sd-table",
|
|
9351
|
-
"$members$": {
|
|
9352
|
-
"columns": [16],
|
|
9353
|
-
"rows": [1040],
|
|
9354
|
-
"selected": [1040],
|
|
9355
|
-
"rowKey": [1, "row-key"],
|
|
9356
|
-
"selectable": [4],
|
|
9357
|
-
"resizable": [4],
|
|
9358
|
-
"width": [1],
|
|
9359
|
-
"height": [1],
|
|
9360
|
-
"stickyHeader": [4, "sticky-header"],
|
|
9361
|
-
"stickyColumn": [16],
|
|
9362
|
-
"noDataLabel": [1, "no-data-label"],
|
|
9363
|
-
"isLoading": [4, "is-loading"],
|
|
9364
|
-
"pagination": [16],
|
|
9365
|
-
"bodyCellRenderer": [16],
|
|
9366
|
-
"useInternalPagination": [4, "use-internal-pagination"],
|
|
9367
|
-
"useRowsPerPageSelect": [4, "use-rows-per-page-select"],
|
|
9368
|
-
"rowsPerPageOption": [16],
|
|
9369
|
-
"currentPage": [32],
|
|
9370
|
-
"innerRows": [32],
|
|
9371
|
-
"innerSelected": [32],
|
|
9372
|
-
"columnWidths": [32],
|
|
9373
|
-
"scrolledLeft": [32],
|
|
9374
|
-
"scrolledRight": [32]
|
|
9375
|
-
},
|
|
9376
|
-
"$listeners$": undefined,
|
|
9377
|
-
"$lazyBundleId$": "-",
|
|
9378
|
-
"$attrsToReflect$": []
|
|
9379
|
-
}; }
|
|
9380
|
-
};
|
|
9381
|
-
|
|
9382
|
-
const sdTableBackupCss = () => `.sd-table__wrapper .sd-table__container .sd-table__middle{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:horizontal{height:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:vertical{width:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-track{background-color:transparent}.sd-table__wrapper{height:var(--table-height, auto);width:var(--table-width, 100%);color:#222222}.sd-table__wrapper .sd-table__container{width:100%;height:var(--table-container-height, auto);position:relative;border:1px solid #e1e1e1;border-radius:8px;font-size:12px;overflow:hidden;background:#ffffff}.sd-table__wrapper .sd-table__container .sd-table__middle{overflow:auto;will-change:scroll-position;min-height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--scrollable{height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--loading{overflow:hidden !important;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle--loading__spinner{position:absolute;top:0;left:0;width:100%;height:var(--table-container-height, 100%);min-height:var(--table-container-height, 100%);background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll{position:relative;height:var(--total-virtual-height, --table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr:not([aria-hidden=true]){width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]{padding:0;border:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]:not(.sd-table__virtual-row-spacer) td{display:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected{width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-header thead{position:sticky;top:0;z-index:120}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right{position:sticky;background-color:#f5faff;z-index:110 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right{position:sticky;background-color:white;z-index:100 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left{left:var(--sticky-left-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right{right:var(--sticky-right-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell{position:sticky;z-index:102;background-color:#f5faff}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell{position:sticky;z-index:101;background-color:white}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead{opacity:0.4}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead tr th.sd-th{border-bottom:1px solid rgba(225, 225, 225, 0.4) !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-td,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-th,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table .sd-th__content--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead{height:36px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr{width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th{background:#f5faff;height:36px;padding:0 16px;font-weight:500;vertical-align:middle;border-bottom:1px solid #e1e1e1;-webkit-user-select:none;user-select:none;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:4px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--left{justify-content:flex-start}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--center{justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--right{justify-content:flex-end}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:16px;cursor:col-resize;z-index:3;border-left:1px solid #cccccc;border-right:1px solid #cccccc}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td{height:44px;padding:0 16px;border-bottom:1px solid #e1e1e1;background:white;vertical-align:middle}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--left{text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--center{text-align:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--right{text-align:right}.sd-table__wrapper .sd-table__container .sd-table__bottom{background:white;text-align:center}.sd-table__wrapper .sd-table__container .sd-table__bottom .sd-table__no-data{padding-top:15%;color:#888888}.sd-table__wrapper .sd-table__pagination{position:relative;background:#f9f9f9;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid #e1e1e1;border-top:none;border-radius:8px}.sd-table__wrapper .sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.sd-table__wrapper .sd-table__virtual-spacer,.sd-table__wrapper .sd-table__virtual-row-spacer{padding:0 !important}.sd-table__wrapper .sd-table__virtual-spacer td,.sd-table__wrapper .sd-table__virtual-row-spacer td{padding:0 !important;border:none}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton{width:100%;height:100%;background-image:repeating-linear-gradient(0deg, rgba(246, 246, 246, 0.3) 0px, rgba(225, 225, 225, 0.5) calc(var(--row-height, 44px) / 2), rgba(246, 246, 246, 0.3) var(--row-height, 44px));background-size:100% 200%;animation:skeleton-loading 1.5s ease-in-out infinite;position:relative}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton::before,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row-height, 44px) - 1px), #e1e1e1 calc(var(--row-height, 44px) - 1px), #e1e1e1 var(--row-height, 44px));pointer-events:none}.sd-table__wrapper .sd-table__skeleton-cell{width:100%;height:20px;background:linear-gradient(90deg, rgba(246, 246, 246, 0.3) 0%, rgba(225, 225, 225, 0.5) 50%, rgba(246, 246, 246, 0.3) 100%);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}@keyframes skeleton-loading{0%{background-position:0% 0%}50%{background-position:100% 100%}100%{background-position:0% 0%}}`;
|
|
9611
|
+
const sdTableCss = () => `.sd-table__wrapper .sd-table__container .sd-table__middle{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:horizontal{height:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:vertical{width:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-track{background-color:transparent}.sd-table__wrapper{height:var(--table-height, auto);width:var(--table-width, 100%);color:#222222}.sd-table__wrapper .sd-table__container{width:100%;height:var(--table-container-height, auto);display:flex;flex-direction:column;position:relative;border:1px solid #e1e1e1;border-radius:8px;font-size:12px;overflow:hidden;background:#ffffff}.sd-table__wrapper .sd-table__container .sd-table__middle{overflow:auto;will-change:scroll-position;min-height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--scrollable{height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--loading{overflow:hidden !important;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle--loading__spinner{position:absolute;top:0;left:0;width:100%;height:var(--table-container-height, 100%);min-height:var(--table-container-height, 100%);background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll{position:relative;height:var(--total-virtual-height, --table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr:not([aria-hidden=true]){width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]{padding:0;border:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]:not(.sd-table__virtual-row-spacer) td{display:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected{position:relative;width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected sd-checkbox label,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected sd-checkbox label{position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected sd-checkbox label:before,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-header thead{position:sticky;top:0;z-index:120}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right{position:sticky;background-color:#f5faff;z-index:110 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right{position:sticky;background-color:white;z-index:100 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left{left:var(--sticky-left-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right{right:var(--sticky-right-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell{position:sticky;z-index:102;background-color:#f5faff}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell{position:sticky;z-index:101;background-color:white}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead{opacity:0.4}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead tr th.sd-th{border-bottom:1px solid rgba(225, 225, 225, 0.4) !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-td,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-th,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table .sd-th__content--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead{height:36px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr{width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th{background:#f5faff;height:36px;padding:0 16px;font-weight:500;vertical-align:middle;border-bottom:1px solid #e1e1e1;-webkit-user-select:none;user-select:none;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:4px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--left{justify-content:flex-start}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--center{justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--right{justify-content:flex-end}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:16px;cursor:col-resize;z-index:3;border-left:1px solid #cccccc;border-right:1px solid #cccccc}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td{height:44px;padding:0 16px;border-bottom:1px solid #e1e1e1;background:white;vertical-align:middle}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--left{text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--center{text-align:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--right{text-align:right}.sd-table__wrapper .sd-table__container .sd-table__bottom{background:transparent;text-align:center;display:flex;align-items:center;justify-content:center;flex:1;min-height:240px;translate:0 -10%;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__bottom .sd-table__no-data{font-size:12px;color:#888888}.sd-table__wrapper .sd-table__pagination{position:relative;background:#f9f9f9;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid #e1e1e1;border-top:none;border-radius:8px}.sd-table__wrapper .sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.sd-table__wrapper .sd-table__virtual-spacer,.sd-table__wrapper .sd-table__virtual-row-spacer{padding:0 !important}.sd-table__wrapper .sd-table__virtual-spacer td,.sd-table__wrapper .sd-table__virtual-row-spacer td{padding:0 !important;border:none}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton{width:100%;height:100%;background-image:repeating-linear-gradient(0deg, rgba(246, 246, 246, 0.3) 0px, rgba(225, 225, 225, 0.5) calc(var(--row-height, 44px) / 2), rgba(246, 246, 246, 0.3) var(--row-height, 44px));background-size:100% 200%;animation:skeleton-loading 1.5s ease-in-out infinite;position:relative}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton::before,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row-height, 44px) - 1px), #e1e1e1 calc(var(--row-height, 44px) - 1px), #e1e1e1 var(--row-height, 44px));pointer-events:none}.sd-table__wrapper .sd-table__skeleton-cell{width:100%;height:20px;background:linear-gradient(90deg, rgba(246, 246, 246, 0.3) 0%, rgba(225, 225, 225, 0.5) 50%, rgba(246, 246, 246, 0.3) 100%);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}@keyframes skeleton-loading{0%{background-position:0% 0%}50%{background-position:100% 100%}100%{background-position:0% 0%}}`;
|
|
9383
9612
|
|
|
9384
9613
|
class SdTable {
|
|
9385
9614
|
constructor(hostRef) {
|
|
@@ -9391,7 +9620,7 @@ class SdTable {
|
|
|
9391
9620
|
get el() { return getElement(this); }
|
|
9392
9621
|
columns;
|
|
9393
9622
|
rows;
|
|
9394
|
-
selected =
|
|
9623
|
+
selected = [];
|
|
9395
9624
|
rowKey = 'id';
|
|
9396
9625
|
selectable = false;
|
|
9397
9626
|
resizable = false;
|
|
@@ -9506,7 +9735,7 @@ class SdTable {
|
|
|
9506
9735
|
}
|
|
9507
9736
|
componentWillLoad() {
|
|
9508
9737
|
this.innerRows = [...(this.rows || [])];
|
|
9509
|
-
this.innerSelected = new Set(this.selected);
|
|
9738
|
+
this.innerSelected = new Set(this.selected || []);
|
|
9510
9739
|
this.columnWidths = (this.columns || []).map(c => parseInt(c.width || '120', 10));
|
|
9511
9740
|
if (this.pagination?.page) {
|
|
9512
9741
|
this.currentPage = this.pagination.page;
|
|
@@ -9706,6 +9935,7 @@ class SdTable {
|
|
|
9706
9935
|
return;
|
|
9707
9936
|
this.innerSelected = new Set(newSelected);
|
|
9708
9937
|
this.cachedIsAllChecked = undefined;
|
|
9938
|
+
this.selected = Array.from(this.innerSelected);
|
|
9709
9939
|
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
9710
9940
|
}
|
|
9711
9941
|
toggleSelectAll(checked) {
|
|
@@ -9718,6 +9948,7 @@ class SdTable {
|
|
|
9718
9948
|
this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey])));
|
|
9719
9949
|
}
|
|
9720
9950
|
this.cachedIsAllChecked = undefined;
|
|
9951
|
+
this.selected = Array.from(this.innerSelected);
|
|
9721
9952
|
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
9722
9953
|
}
|
|
9723
9954
|
get isAllChecked() {
|
|
@@ -9925,7 +10156,7 @@ class SdTable {
|
|
|
9925
10156
|
'sticky-left': Boolean(this.stickyColumn.left && this.stickyColumn.left > 0),
|
|
9926
10157
|
}, style: {
|
|
9927
10158
|
'--sticky-left-offset': '0px',
|
|
9928
|
-
} }, hAsync("sd-checkbox", {
|
|
10159
|
+
} }, hAsync("sd-checkbox", { value: this.isAllChecked, disabled: !this.paginatedRows.length, onSdUpdate: (e) => this.toggleSelectAll(e.detail) }))), stickyLeftCols.map((col, idx) => {
|
|
9929
10160
|
const rendered = this.headerCellRenderer?.(col);
|
|
9930
10161
|
return (hAsync("th", { key: col.name, class: {
|
|
9931
10162
|
'sd-th': true,
|
|
@@ -9969,7 +10200,7 @@ class SdTable {
|
|
|
9969
10200
|
'sticky-left': Boolean(this.stickyColumn.left && this.stickyColumn.left > 0),
|
|
9970
10201
|
}, style: {
|
|
9971
10202
|
'--sticky-left-offset': '0px',
|
|
9972
|
-
} }, hAsync("sd-checkbox", {
|
|
10203
|
+
} }, hAsync("sd-checkbox", { value: this.isRowSelected(row), disabled: !this.paginatedRows.length, onSdUpdate: () => this.updateRowSelect(row) }))), stickyLeftCols.map((column, idx) => {
|
|
9973
10204
|
const rendered = this.bodyCellRenderer?.(column, row);
|
|
9974
10205
|
return (hAsync("td", { key: column.name, part: `td-${column.name}`, class: {
|
|
9975
10206
|
'sd-td': true,
|
|
@@ -10022,16 +10253,16 @@ class SdTable {
|
|
|
10022
10253
|
}, "aria-hidden": "true" }, hAsync("div", { class: "sd-table__skeleton-cell" })));
|
|
10023
10254
|
}
|
|
10024
10255
|
render() {
|
|
10025
|
-
return (hAsync(Host, { key: '
|
|
10256
|
+
return (hAsync(Host, { key: 'e6ec01e7493b69bab1bf2766d9c322cee388b274' }, hAsync("div", { key: 'cc717d111a6ce64c34b6a23b1feb9cc8933a0438', class: "sd-table__wrapper", style: {
|
|
10026
10257
|
'--table-width': this.width,
|
|
10027
10258
|
'--table-height': this.height,
|
|
10028
|
-
} }, hAsync("div", { key: '
|
|
10259
|
+
} }, hAsync("div", { key: '0c89a798a475bb25c10c5959b5e50c81f01503c4', class: "sd-table__container", style: {
|
|
10029
10260
|
'--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
|
|
10030
|
-
} }, hAsync("div", { key: '
|
|
10261
|
+
} }, hAsync("div", { key: 'e83ee499928d95e719ffca0411a422deeed162d0', class: {
|
|
10031
10262
|
'sd-table__middle': true,
|
|
10032
10263
|
'sd-table__middle--scrollable': this.paginatedRows.length > 0,
|
|
10033
10264
|
'sd-table__middle--loading': this.isLoading,
|
|
10034
|
-
} }, this.isLoading && (hAsync("div", { key: '
|
|
10265
|
+
} }, this.isLoading && (hAsync("div", { key: '30d8283122a21484e0029128e637fdd9a5c6ae8c', class: "sd-table__middle--loading__spinner" }, hAsync("sd-loading-spinner", { key: '92911a08fa4d0776712e8c30be2f16d59d512cbc' }))), hAsync("table", { key: '209eb39f61bb46e9027046be619da492be2b080e', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), !this.paginatedRows.length && (hAsync("div", { key: 'cb1fccb96bb51a4e14d40c2ff286f17d8bc8ce11', class: "sd-table__bottom" }, hAsync("div", { key: '9149ee50257114145d14e0666239f72dcfc5b01a', class: "sd-table__no-data" }, hAsync("slot", { key: 'a5ead23bc5a2e32418473f6f6737f3b156177842', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (hAsync("div", { key: 'd5482e1bb04d20579a88841bf8d885d08c1593b1', class: "sd-table__pagination" }, hAsync("sd-pagination", { key: '65425eff37a1f2c1add27b8923cd86fe8d98ba98', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (hAsync("sd-select", { key: 'dfb3ba8654e33dc334392f37189f422d6a1f1416', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdUpdate: (e) => this.changeRowsPerPage(e.detail.value) })))))));
|
|
10035
10266
|
}
|
|
10036
10267
|
static get watchers() { return {
|
|
10037
10268
|
"columns": ["handleColumnsChange"],
|
|
@@ -10040,10 +10271,10 @@ class SdTable {
|
|
|
10040
10271
|
"selected": ["handleSelectedChange"],
|
|
10041
10272
|
"pagination": ["handlePaginationChange"]
|
|
10042
10273
|
}; }
|
|
10043
|
-
static get style() { return
|
|
10274
|
+
static get style() { return sdTableCss(); }
|
|
10044
10275
|
static get cmpMeta() { return {
|
|
10045
10276
|
"$flags$": 772,
|
|
10046
|
-
"$tagName$": "sd-table
|
|
10277
|
+
"$tagName$": "sd-table",
|
|
10047
10278
|
"$members$": {
|
|
10048
10279
|
"columns": [16],
|
|
10049
10280
|
"rows": [1040],
|
|
@@ -10086,34 +10317,33 @@ class SdTable {
|
|
|
10086
10317
|
}; }
|
|
10087
10318
|
}
|
|
10088
10319
|
|
|
10089
|
-
const sdTabsCss = () => `sd-tabs{display:inline-block}sd-tabs .sd-tabs{display:flex;flex-direction:row;gap:4px;border-bottom:1px solid #0075ff}sd-tabs .sd-tabs__tab{display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;border:1px solid #cccccc;border-bottom:none;border-radius:4px 4px 0 0;background-color:#f6f6f6;color:#888888;font-weight:400;transition:all 0.2s ease;position:relative;user-select:none}sd-tabs .sd-tabs__tab::
|
|
10320
|
+
const sdTabsCss = () => `sd-tabs{display:inline-block}sd-tabs .sd-tabs{display:flex;flex-direction:row;gap:4px;border-bottom:1px solid #0075ff}sd-tabs .sd-tabs__tab{display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;border:1px solid #cccccc;border-bottom:none;border-radius:4px 4px 0 0;background-color:#f6f6f6;color:#888888;font-weight:400;transition:all 0.2s ease;position:relative;user-select:none}sd-tabs .sd-tabs__tab::before{content:"";position:absolute;inset:0;opacity:0;transition:all 0.3s}sd-tabs .sd-tabs__tab--selected{border-color:#0075ff;color:#0075ff;background-color:white}sd-tabs .sd-tabs__tab--selected .sd-tabs__label::before{font-weight:700}sd-tabs .sd-tabs__tab--selected:hover::before{background-color:#0075ff;opacity:0.15}sd-tabs .sd-tabs__tab--unselected:hover::before{background-color:#888888;opacity:0.15}sd-tabs .sd-tabs__label{user-select:none;font-weight:700;visibility:hidden;position:relative}sd-tabs .sd-tabs__label::before{content:attr(data-label);visibility:visible;position:absolute;inset:0;font-weight:400;transition:font-weight 0.2s ease}sd-tabs .sd-tabs--md .sd-tabs__tab{padding:12px 32px;font-size:12px;line-height:20px}sd-tabs .sd-tabs--sm .sd-tabs__tab{padding:8px 20px;font-size:12px;line-height:16px}sd-tabs .sd-tabs--sub{gap:32px;border-bottom:none}sd-tabs .sd-tabs--sub .sd-tabs__tab{border:none;border-radius:0;background-color:transparent;color:#222222;font-weight:400;padding:0 0 2px 0;position:relative}sd-tabs .sd-tabs--sub .sd-tabs__tab::before{content:"";position:absolute;top:100%;left:0;right:0;height:1px;width:100%;background-color:#0075ff;opacity:0;transition:opacity 0.2s ease}sd-tabs .sd-tabs--sub .sd-tabs__tab::after{font-weight:400}sd-tabs .sd-tabs--sub .sd-tabs__tab--selected{color:#0075ff;background-color:transparent}sd-tabs .sd-tabs--sub .sd-tabs__tab--selected::before{opacity:1}sd-tabs .sd-tabs--sub .sd-tabs__tab--selected::after{font-weight:700}`;
|
|
10090
10321
|
|
|
10091
10322
|
class SdTabs {
|
|
10092
10323
|
constructor(hostRef) {
|
|
10093
10324
|
registerInstance(this, hostRef);
|
|
10094
|
-
this.
|
|
10325
|
+
this.update = createEvent(this, "sdUpdate");
|
|
10095
10326
|
}
|
|
10096
10327
|
value;
|
|
10097
10328
|
tabs = [];
|
|
10098
10329
|
size = 'md';
|
|
10099
10330
|
isSub = false;
|
|
10100
|
-
|
|
10101
|
-
sdChange;
|
|
10331
|
+
update;
|
|
10102
10332
|
componentWillLoad() {
|
|
10103
10333
|
if (this.value !== undefined && this.value !== null) {
|
|
10104
|
-
this.
|
|
10334
|
+
this.value = this.value;
|
|
10105
10335
|
}
|
|
10106
10336
|
}
|
|
10107
10337
|
valueChanged(newValue) {
|
|
10108
|
-
this.
|
|
10338
|
+
this.value = newValue;
|
|
10109
10339
|
}
|
|
10110
10340
|
handleTabClick = (tabValue) => {
|
|
10111
|
-
this.selectedValue = tabValue;
|
|
10112
10341
|
this.value = tabValue;
|
|
10113
|
-
this.
|
|
10342
|
+
this.value = tabValue;
|
|
10343
|
+
this.update.emit(tabValue);
|
|
10114
10344
|
};
|
|
10115
10345
|
isTabSelected(tab) {
|
|
10116
|
-
return this.
|
|
10346
|
+
return this.value === tab.value;
|
|
10117
10347
|
}
|
|
10118
10348
|
getTabClasses(tab) {
|
|
10119
10349
|
const classes = [
|
|
@@ -10136,10 +10366,9 @@ class SdTabs {
|
|
|
10136
10366
|
return { bgColor: '#E5E5E5', textColor: '#737373' };
|
|
10137
10367
|
}
|
|
10138
10368
|
render() {
|
|
10139
|
-
return (hAsync("div", { key: '
|
|
10140
|
-
const isSelected = this.isTabSelected(tab);
|
|
10369
|
+
return (hAsync("div", { key: '1f9b39d82a7a98bb9dffd522d9f703b41682ae71', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
|
|
10141
10370
|
const badgeColors = this.getBadgeColors(tab);
|
|
10142
|
-
return (hAsync("div", { key: `tab-${index}`, class: this.getTabClasses(tab),
|
|
10371
|
+
return (hAsync("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, hAsync("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && (hAsync("sd-tag", { size: this.size, label: tab.badge.toString(), bgColor: badgeColors.bgColor, textColor: badgeColors.textColor, rounded: false }))));
|
|
10143
10372
|
})));
|
|
10144
10373
|
}
|
|
10145
10374
|
static get watchers() { return {
|
|
@@ -10153,8 +10382,7 @@ class SdTabs {
|
|
|
10153
10382
|
"value": [1537],
|
|
10154
10383
|
"tabs": [1040],
|
|
10155
10384
|
"size": [1],
|
|
10156
|
-
"isSub": [4, "is-sub"]
|
|
10157
|
-
"selectedValue": [32]
|
|
10385
|
+
"isSub": [4, "is-sub"]
|
|
10158
10386
|
},
|
|
10159
10387
|
"$listeners$": undefined,
|
|
10160
10388
|
"$lazyBundleId$": "-",
|
|
@@ -10205,7 +10433,7 @@ class SdTag {
|
|
|
10205
10433
|
}
|
|
10206
10434
|
render() {
|
|
10207
10435
|
const tagClasses = this.getTagClasses();
|
|
10208
|
-
return (hAsync("span", { key: '
|
|
10436
|
+
return (hAsync("span", { key: '2a25443d15ad9d0c9205455e80cf236d02cec6d9', class: tagClasses, style: {
|
|
10209
10437
|
'--tag-bg-color': this.bgColor,
|
|
10210
10438
|
'--tag-text-color': this.textColor,
|
|
10211
10439
|
}, "aria-label": this.label || 'tag' }, this.renderContent()));
|
|
@@ -10220,60 +10448,7 @@ class SdTag {
|
|
|
10220
10448
|
"rounded": [4],
|
|
10221
10449
|
"label": [1],
|
|
10222
10450
|
"bgColor": [1, "bg-color"],
|
|
10223
|
-
"textColor": [1, "text-color"]
|
|
10224
|
-
},
|
|
10225
|
-
"$listeners$": undefined,
|
|
10226
|
-
"$lazyBundleId$": "-",
|
|
10227
|
-
"$attrsToReflect$": []
|
|
10228
|
-
}; }
|
|
10229
|
-
}
|
|
10230
|
-
|
|
10231
|
-
const sdTbodyCss = () => `sd-tbody{display:table-row-group}`;
|
|
10232
|
-
|
|
10233
|
-
class SdTbody {
|
|
10234
|
-
constructor(hostRef) {
|
|
10235
|
-
registerInstance(this, hostRef);
|
|
10236
|
-
}
|
|
10237
|
-
render() {
|
|
10238
|
-
return (hAsync(Host, { key: 'bef033a85bc25bdd4c08be9ac93e1dd7904d3b92' }, hAsync("slot", { key: '380295c93446b7c99068bddb1ebefeee25056759' })));
|
|
10239
|
-
}
|
|
10240
|
-
static get style() { return sdTbodyCss(); }
|
|
10241
|
-
static get cmpMeta() { return {
|
|
10242
|
-
"$flags$": 260,
|
|
10243
|
-
"$tagName$": "sd-tbody",
|
|
10244
|
-
"$members$": undefined,
|
|
10245
|
-
"$listeners$": undefined,
|
|
10246
|
-
"$lazyBundleId$": "-",
|
|
10247
|
-
"$attrsToReflect$": []
|
|
10248
|
-
}; }
|
|
10249
|
-
}
|
|
10250
|
-
|
|
10251
|
-
const sdTdCss = () => `sd-td{display:table-cell;padding:12px 16px;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}`;
|
|
10252
|
-
|
|
10253
|
-
class SdTd {
|
|
10254
|
-
constructor(hostRef) {
|
|
10255
|
-
registerInstance(this, hostRef);
|
|
10256
|
-
}
|
|
10257
|
-
name = '';
|
|
10258
|
-
align = 'left';
|
|
10259
|
-
tdStyle;
|
|
10260
|
-
tdClass;
|
|
10261
|
-
render() {
|
|
10262
|
-
return (hAsync(Host, { key: 'b220b330eccc8e87ba9b0333f25d5d8e922fbf5e', role: "cell", class: {
|
|
10263
|
-
'sd-td': true,
|
|
10264
|
-
[`sd-td--${this.align}`]: true,
|
|
10265
|
-
[this.tdClass || '']: Boolean(this.tdClass),
|
|
10266
|
-
}, style: this.tdStyle }, hAsync("slot", { key: '807cf20b823a3efa00ce4f690ff1be2226d6ad8f' })));
|
|
10267
|
-
}
|
|
10268
|
-
static get style() { return sdTdCss(); }
|
|
10269
|
-
static get cmpMeta() { return {
|
|
10270
|
-
"$flags$": 772,
|
|
10271
|
-
"$tagName$": "sd-td",
|
|
10272
|
-
"$members$": {
|
|
10273
|
-
"name": [1],
|
|
10274
|
-
"align": [1],
|
|
10275
|
-
"tdStyle": [16],
|
|
10276
|
-
"tdClass": [1, "td-class"]
|
|
10451
|
+
"textColor": [1, "text-color"]
|
|
10277
10452
|
},
|
|
10278
10453
|
"$listeners$": undefined,
|
|
10279
10454
|
"$lazyBundleId$": "-",
|
|
@@ -10281,20 +10456,125 @@ class SdTd {
|
|
|
10281
10456
|
}; }
|
|
10282
10457
|
}
|
|
10283
10458
|
|
|
10284
|
-
const
|
|
10459
|
+
const sdTextareaCss = () => `.sd-textarea{display:flex;flex-direction:column;color:#333333;font-size:12px;line-height:20px;width:var(--textarea-width, 100%)}.sd-textarea .sd-textarea__content{width:100%;display:flex;border:1px solid #aaaaaa;border-radius:4px;background:white}.sd-textarea .sd-textarea__content .sd-textarea__native{width:100%;min-height:100px;border:none;outline:none;background:transparent;padding:4px 8px;font-family:inherit;font-size:12px;line-height:20px;color:#333333;resize:vertical}.sd-textarea .sd-textarea__content .sd-textarea__native::placeholder{color:#aaaaaa}.sd-textarea--hovered .sd-textarea__content,.sd-textarea--focused .sd-textarea__content{border-color:#0075ff;box-shadow:0 0 4px 0 rgba(0, 113, 255, 0.4)}.sd-textarea--disabled{cursor:not-allowed !important;box-shadow:none !important}.sd-textarea--disabled .sd-textarea__content{background:#eeeeee !important;border:1px solid #cccccc !important;color:#888888 !important}.sd-textarea--disabled .sd-textarea__content .sd-textarea__native{cursor:not-allowed !important;color:#888888 !important}.sd-textarea .sd-textarea__footer{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:12px;line-height:20px}.sd-textarea .sd-textarea__help-text{font-size:12px;line-height:20px;font-weight:400;color:#222222}.sd-textarea .sd-textarea__counter{color:#cccccc;margin-left:auto}`;
|
|
10285
10460
|
|
|
10286
|
-
class
|
|
10461
|
+
class SdTextarea {
|
|
10287
10462
|
constructor(hostRef) {
|
|
10288
10463
|
registerInstance(this, hostRef);
|
|
10464
|
+
this.input = createEvent(this, "sdUpdate");
|
|
10465
|
+
this.focus = createEvent(this, "sdFocus");
|
|
10466
|
+
this.blur = createEvent(this, "sdBlur");
|
|
10467
|
+
}
|
|
10468
|
+
get host() { return getElement(this); }
|
|
10469
|
+
value = null;
|
|
10470
|
+
name;
|
|
10471
|
+
disabled = false;
|
|
10472
|
+
width;
|
|
10473
|
+
autoFocus = false;
|
|
10474
|
+
textareaClass = '';
|
|
10475
|
+
helpText;
|
|
10476
|
+
maxLength;
|
|
10477
|
+
placeholder = '입력해 주세요.';
|
|
10478
|
+
internalValue = null;
|
|
10479
|
+
focused = false;
|
|
10480
|
+
hovered = false;
|
|
10481
|
+
nativeEl = undefined;
|
|
10482
|
+
input;
|
|
10483
|
+
focus;
|
|
10484
|
+
blur;
|
|
10485
|
+
valueChanged(newValue) {
|
|
10486
|
+
this.internalValue = newValue;
|
|
10487
|
+
}
|
|
10488
|
+
internalValueChanged(newValue) {
|
|
10489
|
+
if (newValue !== this.value) {
|
|
10490
|
+
this.value = newValue;
|
|
10491
|
+
this.input?.emit(this.value);
|
|
10492
|
+
}
|
|
10493
|
+
}
|
|
10494
|
+
async sdFocus() {
|
|
10495
|
+
this.nativeEl?.focus();
|
|
10496
|
+
}
|
|
10497
|
+
async getNativeElement() {
|
|
10498
|
+
return this.nativeEl || null;
|
|
10499
|
+
}
|
|
10500
|
+
componentWillLoad() {
|
|
10501
|
+
if (this.value !== null && this.value !== undefined) {
|
|
10502
|
+
this.internalValue = this.value;
|
|
10503
|
+
}
|
|
10504
|
+
}
|
|
10505
|
+
componentDidLoad() {
|
|
10506
|
+
if (this.autoFocus) {
|
|
10507
|
+
this.nativeEl?.focus();
|
|
10508
|
+
}
|
|
10509
|
+
}
|
|
10510
|
+
handleInput(event) {
|
|
10511
|
+
const target = event.target;
|
|
10512
|
+
this.internalValue = target.value;
|
|
10513
|
+
}
|
|
10514
|
+
handleFocus(type, event) {
|
|
10515
|
+
this.focused = type === 'focus';
|
|
10516
|
+
if (type === 'blur') {
|
|
10517
|
+
this.blur?.emit(event);
|
|
10518
|
+
}
|
|
10519
|
+
else {
|
|
10520
|
+
this.focus?.emit(event);
|
|
10521
|
+
}
|
|
10522
|
+
}
|
|
10523
|
+
getTextareaStatus() {
|
|
10524
|
+
if (this.disabled)
|
|
10525
|
+
return 'sd-textarea--disabled';
|
|
10526
|
+
if (this.hovered)
|
|
10527
|
+
return 'sd-textarea--hovered';
|
|
10528
|
+
if (this.focused)
|
|
10529
|
+
return 'sd-textarea--focused';
|
|
10530
|
+
return '';
|
|
10531
|
+
}
|
|
10532
|
+
getMaxLengthCounter() {
|
|
10533
|
+
if (this.maxLength === undefined) {
|
|
10534
|
+
return null;
|
|
10535
|
+
}
|
|
10536
|
+
const currentLength = (this.internalValue || '').length;
|
|
10537
|
+
return `${currentLength}/${this.maxLength}`;
|
|
10538
|
+
}
|
|
10539
|
+
hasFooter() {
|
|
10540
|
+
return this.helpText !== undefined || this.maxLength !== undefined;
|
|
10289
10541
|
}
|
|
10290
10542
|
render() {
|
|
10291
|
-
|
|
10543
|
+
const textareaWidth = this.width
|
|
10544
|
+
? {
|
|
10545
|
+
'--textarea-width': typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
10546
|
+
}
|
|
10547
|
+
: {};
|
|
10548
|
+
const maxLengthCounter = this.getMaxLengthCounter();
|
|
10549
|
+
return (hAsync(Host, { key: 'db95720b6b96d950d6435b1881f95d58c6bc4637', style: textareaWidth, class: {
|
|
10550
|
+
'sd-textarea': true,
|
|
10551
|
+
[this.getTextareaStatus()]: true,
|
|
10552
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, hAsync("div", { key: '3dae36a9b56837fa7d770f295359d8ed9aa2a3e4', class: "sd-textarea__content" }, hAsync("textarea", { key: 'b9e4ff3cffc1b06e4ef6e5ffee240579c80c6d94', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, autofocus: this.autoFocus, maxLength: this.maxLength, onInput: this.handleInput.bind(this), onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) })), this.hasFooter() && (hAsync("div", { key: 'b0de9e449897f2a8d1e6a7204d2383551d3ae2e4', class: "sd-textarea__footer" }, this.helpText !== undefined && hAsync("span", { key: 'b4528beb70095d70a030a70f451c59e511865fcb', class: "sd-textarea__help-text" }, this.helpText), maxLengthCounter !== null && hAsync("span", { key: 'ce2d33888c7bd85ea240ce00851aec7ecd945adc', class: "sd-textarea__counter" }, maxLengthCounter)))));
|
|
10292
10553
|
}
|
|
10293
|
-
static get
|
|
10554
|
+
static get watchers() { return {
|
|
10555
|
+
"value": ["valueChanged"],
|
|
10556
|
+
"internalValue": ["internalValueChanged"]
|
|
10557
|
+
}; }
|
|
10558
|
+
static get style() { return sdTextareaCss(); }
|
|
10294
10559
|
static get cmpMeta() { return {
|
|
10295
|
-
"$flags$":
|
|
10296
|
-
"$tagName$": "sd-
|
|
10297
|
-
"$members$":
|
|
10560
|
+
"$flags$": 768,
|
|
10561
|
+
"$tagName$": "sd-textarea",
|
|
10562
|
+
"$members$": {
|
|
10563
|
+
"value": [1025],
|
|
10564
|
+
"name": [1],
|
|
10565
|
+
"disabled": [4],
|
|
10566
|
+
"width": [8],
|
|
10567
|
+
"autoFocus": [4, "auto-focus"],
|
|
10568
|
+
"textareaClass": [1, "textarea-class"],
|
|
10569
|
+
"helpText": [1, "help-text"],
|
|
10570
|
+
"maxLength": [2, "max-length"],
|
|
10571
|
+
"placeholder": [1],
|
|
10572
|
+
"internalValue": [32],
|
|
10573
|
+
"focused": [32],
|
|
10574
|
+
"hovered": [32],
|
|
10575
|
+
"sdFocus": [64],
|
|
10576
|
+
"getNativeElement": [64]
|
|
10577
|
+
},
|
|
10298
10578
|
"$listeners$": undefined,
|
|
10299
10579
|
"$lazyBundleId$": "-",
|
|
10300
10580
|
"$attrsToReflect$": []
|
|
@@ -10306,18 +10586,18 @@ const sdToastMessageCss = () => `.sd-toast-message.sc-sd-toast-message{display:f
|
|
|
10306
10586
|
class SdToastMessage {
|
|
10307
10587
|
constructor(hostRef) {
|
|
10308
10588
|
registerInstance(this, hostRef);
|
|
10309
|
-
this.
|
|
10310
|
-
this.
|
|
10589
|
+
this.close = createEvent(this, "sdClose");
|
|
10590
|
+
this.buttonClick = createEvent(this, "sdButtonClick");
|
|
10311
10591
|
}
|
|
10312
10592
|
icon;
|
|
10313
10593
|
message;
|
|
10314
10594
|
link;
|
|
10315
10595
|
linkLabel;
|
|
10316
10596
|
buttonLabel;
|
|
10317
|
-
|
|
10597
|
+
useClose = false;
|
|
10318
10598
|
type = 'basicDark';
|
|
10319
|
-
|
|
10320
|
-
|
|
10599
|
+
close;
|
|
10600
|
+
buttonClick;
|
|
10321
10601
|
isVisible = true;
|
|
10322
10602
|
static COLOR_OF_TYPE = {
|
|
10323
10603
|
basicLight: { background: 'white', text: 'grey_95' },
|
|
@@ -10329,10 +10609,10 @@ class SdToastMessage {
|
|
|
10329
10609
|
};
|
|
10330
10610
|
handleClose = () => {
|
|
10331
10611
|
this.isVisible = false;
|
|
10332
|
-
this.
|
|
10612
|
+
this.close.emit();
|
|
10333
10613
|
};
|
|
10334
10614
|
handleButtonClick = () => {
|
|
10335
|
-
this.
|
|
10615
|
+
this.buttonClick.emit();
|
|
10336
10616
|
};
|
|
10337
10617
|
getContainerClasses() {
|
|
10338
10618
|
const classes = ['sd-toast-message', `sd-toast-message--${this.type}`];
|
|
@@ -10347,10 +10627,10 @@ class SdToastMessage {
|
|
|
10347
10627
|
background: resolveColor(colorTokens.background),
|
|
10348
10628
|
text: resolveColor(colorTokens.text),
|
|
10349
10629
|
};
|
|
10350
|
-
return (hAsync(Host, { key: '
|
|
10630
|
+
return (hAsync(Host, { key: 'edd60b2a74bae15c88131baedaa3e913dc5326ae', style: {
|
|
10351
10631
|
'--sd-toast-bg': colors.background,
|
|
10352
10632
|
'--sd-toast-text': colors.text,
|
|
10353
|
-
} }, hAsync("div", { key: '
|
|
10633
|
+
} }, hAsync("div", { key: 'b41ad15e9fe7520ee8fbf683f6d95e327c59ac6c', class: this.getContainerClasses(), role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (hAsync("div", { key: 'def78fc8bc05ead9b97144dccc4f105fad953477', class: "sd-toast-message__icon" }, hAsync("sd-icon", { key: 'a01368892d295aee0339fa027663bffe31fb2c2b', name: this.icon, size: 16, color: colors.text }))), hAsync("div", { key: 'f0c6d32da360c2135aee2374b1091c27bddf4d22', class: "sd-toast-message__content" }, hAsync("span", { key: '0f1f7d81154470ad9bcc3d8d4c1ed0c0994da7bb', class: "sd-toast-message__message" }, this.message)), this.link && (hAsync("a", { key: '2a4f7b21940e2234653a18e8a677aba9586d18e3', href: this.link, class: "sd-toast-message__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (hAsync("sd-button", { key: 'd399961349429bee81fa395c555879fabef86136', class: `sd-toast-message__button ${this.type === 'basicLight' ? 'text-white' : ''}`, label: this.buttonLabel, variant: "primary", color: this.type === 'basicLight' ? 'oceanblue_75' : 'white', size: "sm", onClick: this.handleButtonClick, style: this.type !== 'basicLight' ? { '--button-text-color': resolveColor('grey_95') } : {} })), this.useClose && (hAsync("button", { key: '4bfae7573d5a5204c29d5ef0e2dc71e9a7622d62', type: "button", class: "sd-toast-message__close", onClick: this.handleClose, "aria-label": "Close", title: "Close" }, hAsync("sd-icon", { key: '7ac20a34965ee46c8af76c6c862a69269a73f1a2', name: "close", size: 12, color: colors.text }))))));
|
|
10354
10634
|
}
|
|
10355
10635
|
static get style() { return sdToastMessageCss(); }
|
|
10356
10636
|
static get cmpMeta() { return {
|
|
@@ -10362,7 +10642,7 @@ class SdToastMessage {
|
|
|
10362
10642
|
"link": [1],
|
|
10363
10643
|
"linkLabel": [1, "link-label"],
|
|
10364
10644
|
"buttonLabel": [1, "button-label"],
|
|
10365
|
-
"
|
|
10645
|
+
"useClose": [4, "use-close"],
|
|
10366
10646
|
"type": [1],
|
|
10367
10647
|
"isVisible": [32]
|
|
10368
10648
|
},
|
|
@@ -10377,13 +10657,12 @@ const sdToggleCss = () => `sd-toggle{display:inline-block;height:20px;line-heigh
|
|
|
10377
10657
|
class SdToggle {
|
|
10378
10658
|
constructor(hostRef) {
|
|
10379
10659
|
registerInstance(this, hostRef);
|
|
10380
|
-
this.
|
|
10660
|
+
this.change = createEvent(this, "sdUpdate");
|
|
10381
10661
|
}
|
|
10382
10662
|
value = false;
|
|
10383
10663
|
label = '';
|
|
10384
10664
|
disabled = false;
|
|
10385
|
-
|
|
10386
|
-
sdChange;
|
|
10665
|
+
change;
|
|
10387
10666
|
componentWillLoad() {
|
|
10388
10667
|
this.updateCheckedState(this.value);
|
|
10389
10668
|
}
|
|
@@ -10391,10 +10670,10 @@ class SdToggle {
|
|
|
10391
10670
|
this.updateCheckedState(this.value);
|
|
10392
10671
|
}
|
|
10393
10672
|
updateCheckedState(value) {
|
|
10394
|
-
this.
|
|
10673
|
+
this.value = value;
|
|
10395
10674
|
}
|
|
10396
10675
|
get toggleClasses() {
|
|
10397
|
-
const classes = ['sd-toggle', this.
|
|
10676
|
+
const classes = ['sd-toggle', this.value ? 'sd-toggle--checked' : 'sd-toggle--unchecked'];
|
|
10398
10677
|
if (this.disabled) {
|
|
10399
10678
|
classes.push('sd-toggle--disabled');
|
|
10400
10679
|
}
|
|
@@ -10405,24 +10684,23 @@ class SdToggle {
|
|
|
10405
10684
|
return;
|
|
10406
10685
|
const newValue = !this.value;
|
|
10407
10686
|
this.value = newValue;
|
|
10408
|
-
this.
|
|
10687
|
+
this.change.emit(newValue);
|
|
10409
10688
|
};
|
|
10410
10689
|
render() {
|
|
10411
|
-
return (hAsync("label", { key: '
|
|
10690
|
+
return (hAsync("label", { key: 'ca85bc0493aff9ff17108696ddb8af29734b00f5', "aria-label": this.label || 'toggle', class: this.toggleClasses }, hAsync("input", { key: 'b99a4fa0d557968e50b302332778faaf1b46f8cc', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && hAsync("span", { key: 'e62ca806b95463c7807f82ace61b4aa0affec962', class: "sd-toggle__label" }, this.label), hAsync("div", { key: '6923da9a043df0d0d7fc0ecf2fe175857279e9b3', class: "sd-toggle__track" }, hAsync("div", { key: '090dfbcf308f26b8e200d0e2cd69d44b0f5cb8bf', class: "sd-toggle__thumb" }))));
|
|
10412
10691
|
}
|
|
10413
10692
|
static get style() { return sdToggleCss(); }
|
|
10414
10693
|
static get cmpMeta() { return {
|
|
10415
10694
|
"$flags$": 768,
|
|
10416
10695
|
"$tagName$": "sd-toggle",
|
|
10417
10696
|
"$members$": {
|
|
10418
|
-
"value": [
|
|
10697
|
+
"value": [1028],
|
|
10419
10698
|
"label": [1],
|
|
10420
|
-
"disabled": [4]
|
|
10421
|
-
"isChecked": [32]
|
|
10699
|
+
"disabled": [4]
|
|
10422
10700
|
},
|
|
10423
10701
|
"$listeners$": undefined,
|
|
10424
10702
|
"$lazyBundleId$": "-",
|
|
10425
|
-
"$attrsToReflect$": [
|
|
10703
|
+
"$attrsToReflect$": []
|
|
10426
10704
|
}; }
|
|
10427
10705
|
}
|
|
10428
10706
|
|
|
@@ -10431,13 +10709,13 @@ const sdToggleButtonCss = () => `sd-toggle-button{display:inline-block;line-heig
|
|
|
10431
10709
|
class SdToggleButton {
|
|
10432
10710
|
constructor(hostRef) {
|
|
10433
10711
|
registerInstance(this, hostRef);
|
|
10434
|
-
this.
|
|
10712
|
+
this.change = createEvent(this, "sdUpdate");
|
|
10435
10713
|
}
|
|
10436
10714
|
value = false;
|
|
10437
10715
|
label = '';
|
|
10438
10716
|
disabled = false;
|
|
10439
10717
|
isActive = false;
|
|
10440
|
-
|
|
10718
|
+
change;
|
|
10441
10719
|
componentWillLoad() {
|
|
10442
10720
|
this.updateActiveState(this.value);
|
|
10443
10721
|
}
|
|
@@ -10462,10 +10740,10 @@ class SdToggleButton {
|
|
|
10462
10740
|
return;
|
|
10463
10741
|
const newValue = !this.value;
|
|
10464
10742
|
this.value = newValue;
|
|
10465
|
-
this.
|
|
10743
|
+
this.change.emit(newValue);
|
|
10466
10744
|
};
|
|
10467
10745
|
render() {
|
|
10468
|
-
return (hAsync("label", { key: '
|
|
10746
|
+
return (hAsync("label", { key: '9eb4abcfe8f3894198c8d8643150daa507e6f0e9', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, hAsync("input", { key: 'e3d952af461da0fac978b8ce6bd55a6990907fb3', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
10469
10747
|
}
|
|
10470
10748
|
static get style() { return sdToggleButtonCss(); }
|
|
10471
10749
|
static get cmpMeta() { return {
|
|
@@ -10483,7 +10761,7 @@ class SdToggleButton {
|
|
|
10483
10761
|
}; }
|
|
10484
10762
|
}
|
|
10485
10763
|
|
|
10486
|
-
const sdTooltipCss = () => `sd-tooltip
|
|
10764
|
+
const sdTooltipCss = () => `sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip{position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}`;
|
|
10487
10765
|
|
|
10488
10766
|
class SdTooltip {
|
|
10489
10767
|
constructor(hostRef) {
|
|
@@ -10502,25 +10780,16 @@ class SdTooltip {
|
|
|
10502
10780
|
noHover = true;
|
|
10503
10781
|
useClose = false;
|
|
10504
10782
|
showTooltip = false;
|
|
10505
|
-
|
|
10506
|
-
static COLOR_OF_TYPE = {
|
|
10507
|
-
default: { background: 'oceanblue_85', text: 'white' },
|
|
10508
|
-
caution: { background: 'red_20', text: 'red_70' },
|
|
10509
|
-
notice: { background: 'orange_10', text: 'orange_65' },
|
|
10510
|
-
accent: { background: 'brilliantblue_20', text: 'brilliantblue_75' },
|
|
10511
|
-
};
|
|
10783
|
+
slotContentHTML = '';
|
|
10512
10784
|
buttonEl;
|
|
10513
10785
|
handleClose = () => {
|
|
10514
10786
|
this.showTooltip = false;
|
|
10515
10787
|
};
|
|
10516
|
-
// 현재 tooltip popover가 조건부 렌더링이여서 초기 slot이 렌더링 되지 않은 시점에
|
|
10517
|
-
// 데이터 매핑에 실패 (light dom에 저장된 slot내용을 shadow dom을 찾지못해 매핑 실패)
|
|
10518
|
-
// 따라서 slot내용을 받은 후에 복제하여 state에 저장
|
|
10519
10788
|
componentWillLoad() {
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10789
|
+
this.slotContentHTML = this.el.innerHTML;
|
|
10790
|
+
this.el.replaceChildren();
|
|
10791
|
+
// 깜빡이는 현상을 막기 위해 기본으로 <sd-tooltip></sd-tooltip> hidden이 된 elment를 visible로 만들어줌
|
|
10792
|
+
this.el.classList.toggle('visible', true);
|
|
10524
10793
|
}
|
|
10525
10794
|
render() {
|
|
10526
10795
|
const handleTrigger = this.trigger === 'hover'
|
|
@@ -10531,20 +10800,12 @@ class SdTooltip {
|
|
|
10531
10800
|
: {
|
|
10532
10801
|
onClick: () => (this.showTooltip = !this.showTooltip),
|
|
10533
10802
|
};
|
|
10534
|
-
return (hAsync(Fragment, { key: '
|
|
10535
|
-
'sd-
|
|
10536
|
-
[`sd-
|
|
10537
|
-
[`sd-
|
|
10538
|
-
'sd-
|
|
10539
|
-
|
|
10540
|
-
[`text-${SdTooltip.COLOR_OF_TYPE[this.type].text}`]: true,
|
|
10541
|
-
} }, hAsync("i", { key: 'e8b1f776aa1f42355cbdfd36ed3018c18ccb974a', class: `sd-tooltip-menu__arrow sd-tooltip-menu__arrow--${this.placement}` }, hAsync(TooltipArrow, { key: '34af873af0b9705baae638f91daa99fdf283e11b', class: {
|
|
10542
|
-
[`text-${SdTooltip.COLOR_OF_TYPE[this.type].background}`]: true,
|
|
10543
|
-
} })), hAsync("div", { key: '079e229d6edd5dbddcdd284bc476d65824e39123', class: "sd-tooltip-menu__content", ref: el => {
|
|
10544
|
-
if (el && this.slotContent && !el.hasChildNodes()) {
|
|
10545
|
-
el.appendChild(this.slotContent.cloneNode(true));
|
|
10546
|
-
}
|
|
10547
|
-
} }, !this.slotContent && hAsync("span", { key: '4d83f9d9289673949af26a2d3a22891effaad6cd' }, this.el.textContent)), this.useClose && (hAsync("div", { key: '8794541b5a28fc1b452cdf64ab716ccc5b92b77e', class: "sd-tooltip-menu__close-button" }, hAsync("button", { key: '98434991dc4d234903d19598d897499ed25b1ffb', type: "button", "aria-label": "Close tooltip", title: "Close tooltip", onClick: () => this.handleClose() }, hAsync("sd-icon", { key: '6a79435ca69bd531929ef0be82989dc766dd833d', name: "close", size: "12", color: "#AAAAAA" })))))))));
|
|
10803
|
+
return (hAsync(Fragment, { key: 'd0db4bd2d57b38eae1522abd96c2776d6ffdd7c7' }, this.label ? (hAsync("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-tooltip", ...handleTrigger })) : (hAsync("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-tooltip", ...handleTrigger })), this.showTooltip && (hAsync("sd-floating-portal", { key: 'ef5951d34aa4a0b5b831eadf464ab2c6711b9320', parentRef: this.buttonEl, onSdClose: this.handleClose.bind(this), placement: this.placement }, hAsync("div", { key: '07f7090e1de9461d1a67b092631e1c8daae1abaa', class: {
|
|
10804
|
+
'sd-floating-menu': true,
|
|
10805
|
+
[`sd-floating-menu--${this.type}`]: true,
|
|
10806
|
+
[`sd-floating-menu--${this.placement}`]: true,
|
|
10807
|
+
'sd-floating-menu--with-close': this.useClose,
|
|
10808
|
+
} }, hAsync("i", { key: '2e8a1f6d7c2159ed48819229ee41ab75237ad2c2', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, hAsync(TooltipArrow, { key: '8bc18f6aeb197026ead06ef02837a70f924752f5' })), hAsync("div", { key: 'cb91d969f481e7e1cf22e4a84aed3237b7b22376', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }), this.useClose && (hAsync("div", { key: '856bf6d63862406177c32400e3d919f5fcd1c8df', class: "sd-floating-menu__close-button" }, hAsync("button", { key: '83e107c58f9bc7927c449a186b19e6fa4730e53f', type: "button", "aria-label": "Close tooltip", title: "Close tooltip", onClick: this.handleClose.bind(this) }, hAsync("sd-icon", { key: 'dc9dc331be0c6eb3ae96150ea50515f021746260', name: "close", size: "12", color: "#AAAAAA" })))))))));
|
|
10548
10809
|
}
|
|
10549
10810
|
static get style() { return sdTooltipCss(); }
|
|
10550
10811
|
static get cmpMeta() { return {
|
|
@@ -10563,196 +10824,8 @@ class SdTooltip {
|
|
|
10563
10824
|
"noHover": [4, "no-hover"],
|
|
10564
10825
|
"useClose": [4, "use-close"],
|
|
10565
10826
|
"showTooltip": [32],
|
|
10566
|
-
"
|
|
10567
|
-
},
|
|
10568
|
-
"$listeners$": undefined,
|
|
10569
|
-
"$lazyBundleId$": "-",
|
|
10570
|
-
"$attrsToReflect$": []
|
|
10571
|
-
}; }
|
|
10572
|
-
}
|
|
10573
|
-
|
|
10574
|
-
class SdTooltipPortal {
|
|
10575
|
-
constructor(hostRef) {
|
|
10576
|
-
registerInstance(this, hostRef);
|
|
10577
|
-
this.sdClose = createEvent(this, "sdClose");
|
|
10578
|
-
}
|
|
10579
|
-
get el() { return getElement(this); }
|
|
10580
|
-
to = 'body';
|
|
10581
|
-
parentRef = null;
|
|
10582
|
-
offset = [0, 0];
|
|
10583
|
-
zIndex = 9999;
|
|
10584
|
-
placement = 'bottom';
|
|
10585
|
-
open = false;
|
|
10586
|
-
sdClose;
|
|
10587
|
-
container;
|
|
10588
|
-
wrapper;
|
|
10589
|
-
rafId;
|
|
10590
|
-
isInsideClick = false;
|
|
10591
|
-
resizeObserver;
|
|
10592
|
-
mutationObserver;
|
|
10593
|
-
static ARROW_SIZE = 11.2;
|
|
10594
|
-
componentDidLoad() {
|
|
10595
|
-
this.container = this.resolveContainer();
|
|
10596
|
-
this.createWrapper();
|
|
10597
|
-
this.moveSlotContent();
|
|
10598
|
-
// DOM이 완전히 렌더링된 후 위치 계산
|
|
10599
|
-
requestAnimationFrame(() => {
|
|
10600
|
-
this.updatePosition();
|
|
10601
|
-
if (this.wrapper) {
|
|
10602
|
-
this.wrapper.style.visibility = 'visible'; // 위치 계산 후 표시
|
|
10603
|
-
}
|
|
10604
|
-
});
|
|
10605
|
-
this.observeParent();
|
|
10606
|
-
}
|
|
10607
|
-
componentDidRender() {
|
|
10608
|
-
if (!this.wrapper)
|
|
10609
|
-
return;
|
|
10610
|
-
// this.wrapper.style.display = this.open ? 'block' : 'none';
|
|
10611
|
-
// if (this.open) this.updatePosition();
|
|
10612
|
-
if (this.open) {
|
|
10613
|
-
this.wrapper.style.display = 'block';
|
|
10614
|
-
// RAF를 사용해서 다음 프레임에 위치 업데이트
|
|
10615
|
-
requestAnimationFrame(() => {
|
|
10616
|
-
this.updatePosition();
|
|
10617
|
-
if (this.wrapper) {
|
|
10618
|
-
this.wrapper.style.visibility = 'visible';
|
|
10619
|
-
}
|
|
10620
|
-
});
|
|
10621
|
-
}
|
|
10622
|
-
else {
|
|
10623
|
-
this.wrapper.style.display = 'none';
|
|
10624
|
-
this.wrapper.style.visibility = 'hidden';
|
|
10625
|
-
}
|
|
10626
|
-
}
|
|
10627
|
-
disconnectedCallback() {
|
|
10628
|
-
if (this.rafId)
|
|
10629
|
-
cancelAnimationFrame(this.rafId);
|
|
10630
|
-
this.unobserveParent();
|
|
10631
|
-
this.wrapper?.remove();
|
|
10632
|
-
}
|
|
10633
|
-
resolveContainer() {
|
|
10634
|
-
const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;
|
|
10635
|
-
return el instanceof HTMLElement ? el : document.body;
|
|
10636
|
-
}
|
|
10637
|
-
createWrapper() {
|
|
10638
|
-
this.wrapper = document.createElement('div');
|
|
10639
|
-
Object.assign(this.wrapper.style, {
|
|
10640
|
-
position: 'absolute',
|
|
10641
|
-
zIndex: this.zIndex.toString(),
|
|
10642
|
-
transition: 'opacity 0.4s',
|
|
10643
|
-
top: '-9999px',
|
|
10644
|
-
left: '-9999px',
|
|
10645
|
-
});
|
|
10646
|
-
this.container.appendChild(this.wrapper);
|
|
10647
|
-
}
|
|
10648
|
-
moveSlotContent() {
|
|
10649
|
-
if (!this.wrapper)
|
|
10650
|
-
return;
|
|
10651
|
-
const nodes = Array.from(this.el.childNodes).filter(n => n.nodeType !== Node.COMMENT_NODE);
|
|
10652
|
-
nodes.forEach(n => this.wrapper.appendChild(n));
|
|
10653
|
-
}
|
|
10654
|
-
// 위치 갱신 (scroll / resize)
|
|
10655
|
-
updatePosition() {
|
|
10656
|
-
if (this.rafId)
|
|
10657
|
-
cancelAnimationFrame(this.rafId);
|
|
10658
|
-
this.rafId = requestAnimationFrame(() => {
|
|
10659
|
-
if (!this.parentRef || !this.wrapper)
|
|
10660
|
-
return;
|
|
10661
|
-
const rect = this.parentRef.getBoundingClientRect();
|
|
10662
|
-
if (!rect.width && !rect.height)
|
|
10663
|
-
return; // 요소가 보이지 않는 경우
|
|
10664
|
-
const [offsetX, offsetY] = this.offset;
|
|
10665
|
-
const ARROW_SIZE = SdTooltipPortal.ARROW_SIZE;
|
|
10666
|
-
let top = 0;
|
|
10667
|
-
let left = 0;
|
|
10668
|
-
switch (this.placement) {
|
|
10669
|
-
case 'top':
|
|
10670
|
-
top = rect.top + window.scrollY - this.wrapper.offsetHeight + offsetY - ARROW_SIZE;
|
|
10671
|
-
left = rect.left + window.scrollX + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
10672
|
-
break;
|
|
10673
|
-
case 'bottom':
|
|
10674
|
-
top = rect.bottom + window.scrollY + offsetY + ARROW_SIZE;
|
|
10675
|
-
left = rect.left + window.scrollX + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
10676
|
-
break;
|
|
10677
|
-
case 'left':
|
|
10678
|
-
top = rect.top + window.scrollY + rect.height / 2 - this.wrapper.offsetHeight / 2 + offsetY;
|
|
10679
|
-
left = rect.left + window.scrollX - this.wrapper.offsetWidth - offsetX - ARROW_SIZE;
|
|
10680
|
-
break;
|
|
10681
|
-
case 'right':
|
|
10682
|
-
top = rect.top + window.scrollY + rect.height / 2 - this.wrapper.offsetHeight / 2 + offsetY;
|
|
10683
|
-
left = rect.right + window.scrollX + offsetX + ARROW_SIZE;
|
|
10684
|
-
break;
|
|
10685
|
-
}
|
|
10686
|
-
Object.assign(this.wrapper.style, {
|
|
10687
|
-
top: `${top}px`,
|
|
10688
|
-
left: `${left}px`,
|
|
10689
|
-
});
|
|
10690
|
-
});
|
|
10691
|
-
}
|
|
10692
|
-
// parentRef의 이동 / 크기변경 감지
|
|
10693
|
-
observeParent() {
|
|
10694
|
-
if (!this.parentRef)
|
|
10695
|
-
return;
|
|
10696
|
-
this.resizeObserver = new ResizeObserver(() => this.updatePosition());
|
|
10697
|
-
this.resizeObserver.observe(this.parentRef);
|
|
10698
|
-
this.mutationObserver = new MutationObserver(() => this.updatePosition());
|
|
10699
|
-
this.mutationObserver.observe(document.body, {
|
|
10700
|
-
childList: true,
|
|
10701
|
-
subtree: true,
|
|
10702
|
-
});
|
|
10703
|
-
}
|
|
10704
|
-
unobserveParent() {
|
|
10705
|
-
this.resizeObserver?.disconnect();
|
|
10706
|
-
this.mutationObserver?.disconnect();
|
|
10707
|
-
}
|
|
10708
|
-
// 외부 클릭 감지
|
|
10709
|
-
handleMouseDown(e) {
|
|
10710
|
-
this.isInsideClick = !!((this.wrapper && this.wrapper.contains(e.target)) ||
|
|
10711
|
-
(this.parentRef && this.parentRef.contains(e.target)));
|
|
10712
|
-
}
|
|
10713
|
-
handleWindowClick(e) {
|
|
10714
|
-
if (this.isInsideClick) {
|
|
10715
|
-
this.isInsideClick = false;
|
|
10716
|
-
return;
|
|
10717
|
-
}
|
|
10718
|
-
if (this.wrapper?.contains(e.target))
|
|
10719
|
-
return;
|
|
10720
|
-
this.sdClose.emit();
|
|
10721
|
-
}
|
|
10722
|
-
render() {
|
|
10723
|
-
return hAsync("slot", { key: 'aa077fc67880fd159b08f0333e000b4cc73df394' });
|
|
10724
|
-
}
|
|
10725
|
-
static get cmpMeta() { return {
|
|
10726
|
-
"$flags$": 777,
|
|
10727
|
-
"$tagName$": "sd-tooltip-portal",
|
|
10728
|
-
"$members$": {
|
|
10729
|
-
"to": [1],
|
|
10730
|
-
"parentRef": [16],
|
|
10731
|
-
"offset": [16],
|
|
10732
|
-
"zIndex": [2, "z-index"],
|
|
10733
|
-
"placement": [1],
|
|
10734
|
-
"open": [4]
|
|
10827
|
+
"slotContentHTML": [32]
|
|
10735
10828
|
},
|
|
10736
|
-
"$listeners$": [[9, "scroll", "updatePosition"], [9, "resize", "updatePosition"], [9, "mousedown", "handleMouseDown"], [8, "click", "handleWindowClick"]],
|
|
10737
|
-
"$lazyBundleId$": "-",
|
|
10738
|
-
"$attrsToReflect$": []
|
|
10739
|
-
}; }
|
|
10740
|
-
}
|
|
10741
|
-
|
|
10742
|
-
const sdTrCss = () => `sd-tr{display:table-row}`;
|
|
10743
|
-
|
|
10744
|
-
class SdTr {
|
|
10745
|
-
constructor(hostRef) {
|
|
10746
|
-
registerInstance(this, hostRef);
|
|
10747
|
-
}
|
|
10748
|
-
render() {
|
|
10749
|
-
return (hAsync(Host, { key: '384b83fc792b3482a2f5e299c248ccfe52e23aab', role: "row" }, hAsync("slot", { key: '49d0f2140923af7709222b596e6cdc511bbac0a3' })));
|
|
10750
|
-
}
|
|
10751
|
-
static get style() { return sdTrCss(); }
|
|
10752
|
-
static get cmpMeta() { return {
|
|
10753
|
-
"$flags$": 260,
|
|
10754
|
-
"$tagName$": "sd-tr",
|
|
10755
|
-
"$members$": undefined,
|
|
10756
10829
|
"$listeners$": undefined,
|
|
10757
10830
|
"$lazyBundleId$": "-",
|
|
10758
10831
|
"$attrsToReflect$": []
|
|
@@ -10767,7 +10840,10 @@ registerComponents([
|
|
|
10767
10840
|
SdDateBox,
|
|
10768
10841
|
SdDatePicker,
|
|
10769
10842
|
SdDateRangePicker,
|
|
10843
|
+
SdField,
|
|
10770
10844
|
SdFilePicker,
|
|
10845
|
+
SdFloatingPopover,
|
|
10846
|
+
SdForm,
|
|
10771
10847
|
SdGuide,
|
|
10772
10848
|
SdIcon,
|
|
10773
10849
|
SdInput,
|
|
@@ -10781,24 +10857,20 @@ registerComponents([
|
|
|
10781
10857
|
SdRadioButtonGroup,
|
|
10782
10858
|
SdRadioGroup,
|
|
10783
10859
|
SdSelect,
|
|
10860
|
+
SdSelectDropdown,
|
|
10784
10861
|
SdSelectMultiple,
|
|
10785
10862
|
SdSelectMultipleGroup,
|
|
10786
10863
|
SdSelectOption,
|
|
10787
10864
|
SdSelectOptionGroup,
|
|
10788
10865
|
SdSelectSearchInput,
|
|
10789
|
-
SdTable$1,
|
|
10790
10866
|
SdTable,
|
|
10791
10867
|
SdTabs,
|
|
10792
10868
|
SdTag,
|
|
10793
|
-
|
|
10794
|
-
SdTd,
|
|
10795
|
-
SdTh,
|
|
10869
|
+
SdTextarea,
|
|
10796
10870
|
SdToastMessage,
|
|
10797
10871
|
SdToggle,
|
|
10798
10872
|
SdToggleButton,
|
|
10799
10873
|
SdTooltip,
|
|
10800
|
-
SdTooltipPortal,
|
|
10801
|
-
SdTr,
|
|
10802
10874
|
]);
|
|
10803
10875
|
|
|
10804
10876
|
exports.hydrateApp = hydrateApp;
|