@sellmate/design-system 1.4.0 → 1.5.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/design-system.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sanitize-inline-html-BZCCwH_U.js +65 -0
- package/dist/cjs/sd-calendar_2.cjs.entry.js +7 -6
- package/dist/cjs/sd-callout.cjs.entry.js +152 -0
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +9 -4
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +4 -3
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +6 -5
- package/dist/cjs/sd-field_3.cjs.entry.js +7 -7
- package/dist/cjs/sd-guide.cjs.entry.js +5 -4
- package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-linear-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination_4.cjs.entry.js +10 -10
- package/dist/cjs/sd-popup.cjs.entry.js +6 -5
- package/dist/cjs/sd-portal.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +19 -16
- package/dist/cjs/{sd-table.config-B7psrvV4.js → sd-table.config-DqgNOdXO.js} +1 -1
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +4 -2
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/cjs/{system-VmZRYp6V.js → system-wrt-tcOq.js} +12 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/sd-calendar/sd-calendar.css +3 -1
- package/dist/collection/components/sd-calendar/sd-calendar.js +24 -3
- package/dist/collection/components/sd-callout/sd-callout.config.js +45 -0
- package/dist/collection/components/sd-callout/sd-callout.css +87 -0
- package/dist/collection/components/sd-callout/sd-callout.js +114 -0
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +9 -4
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +3 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +5 -4
- package/dist/collection/components/sd-field/sd-field.js +4 -4
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-guide/sd-guide.js +4 -3
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +8 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.config.js +3 -4
- package/dist/collection/components/sd-popup/sd-popup.js +4 -2
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +17 -14
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +4 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/collection/utils/html/sanitize-inline-html.js +61 -0
- package/dist/collection/utils/modal.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Da5i_Sa6.js → p-AO2RGdjH.js} +1 -1
- package/dist/components/{p-X-8I-A3g.js → p-B3sb3aIX.js} +1 -1
- package/dist/components/{p-CIUE4qr7.js → p-BGb86o0p.js} +1 -1
- package/dist/components/{p-C3fqSH7A.js → p-BLhu2So8.js} +1 -1
- package/dist/components/{p-INdVvadB.js → p-BSQsJHnV.js} +1 -1
- package/dist/components/{p-xX3QT-8K.js → p-BZCvsLRf.js} +1 -1
- package/dist/components/{p-BFC3Etk2.js → p-BqrZA_Nl.js} +1 -1
- package/dist/components/{p-DS7Ypvt5.js → p-C54v30vB.js} +1 -1
- package/dist/components/{p-DlREBZ-C.js → p-CJ-QHG0F.js} +1 -1
- package/dist/components/{p-kSfaCwf1.js → p-CbXb6ylI.js} +1 -1
- package/dist/components/{p-BRxXhFqt.js → p-CgYjGJEh.js} +1 -1
- package/dist/components/{p-CLxVZFEG.js → p-Co3H5873.js} +1 -1
- package/dist/components/{p-BRk9YZBe.js → p-Cvk-Luhs.js} +1 -1
- package/dist/components/{p-BeBiPTbd.js → p-D5inekTL.js} +1 -1
- package/dist/components/{p-Bs1Z5QtN.js → p-DChOBMCc.js} +1 -1
- package/dist/components/p-DGlmvjGc.js +1 -0
- package/dist/components/{p-DwgaMhOM.js → p-DUcbofDO.js} +1 -1
- package/dist/components/{p-DykVq5VY.js → p-DZbc1mgp.js} +1 -1
- package/dist/components/{p-t161LJqb.js → p-DeK3og10.js} +1 -1
- package/dist/components/{p-BjpbUGud.js → p-DmaopssQ.js} +1 -1
- package/dist/components/p-DopVneZA.js +1 -0
- package/dist/components/p-DrrsZftV.js +1 -0
- package/dist/components/{p-CpgTSxf0.js → p-DyZNk1VT.js} +1 -1
- package/dist/components/{p-oyZgWRnC.js → p-HK6Bwtz8.js} +1 -1
- package/dist/components/{p-Z5Vk33zf.js → p-IThoLpLs.js} +1 -1
- package/dist/components/{p-JlZdKw4C.js → p-J3eT660D.js} +1 -1
- package/dist/components/p-fpzgqVv1.js +1 -0
- package/dist/components/{p-DiP0LJGq.js → p-iCuIUhaK.js} +1 -1
- package/dist/components/p-m_OtjUs1.js +1 -0
- package/dist/components/{p-BwPmM1Pm.js → p-uHITnW_J.js} +1 -1
- package/dist/components/{p-Cx_d5vsS.js → p-yH47DvUh.js} +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.d.ts +11 -0
- package/dist/components/sd-callout.js +1 -0
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/{p-74bf0ed9.entry.js → p-06a6798d.entry.js} +1 -1
- package/dist/design-system/{p-e611dcd4.entry.js → p-0894c492.entry.js} +1 -1
- package/dist/design-system/p-14e30f67.entry.js +1 -0
- package/dist/design-system/{p-9b9bf9db.entry.js → p-1e530c87.entry.js} +1 -1
- package/dist/design-system/{p-84a94775.entry.js → p-2bdceecb.entry.js} +1 -1
- package/dist/design-system/{p-a98f9a29.entry.js → p-339cb954.entry.js} +1 -1
- package/dist/design-system/{p-a7ea1cf0.entry.js → p-352c68ae.entry.js} +1 -1
- package/dist/design-system/p-3d61e68f.entry.js +1 -0
- package/dist/design-system/{p-fe3ae346.entry.js → p-3f4a281f.entry.js} +1 -1
- package/dist/design-system/p-40bdbe5a.entry.js +1 -0
- package/dist/design-system/{p-481e6934.entry.js → p-435ae69e.entry.js} +1 -1
- package/dist/design-system/p-4473c051.entry.js +1 -0
- package/dist/design-system/p-61f4238b.entry.js +1 -0
- package/dist/design-system/p-786c72e9.entry.js +1 -0
- package/dist/design-system/{p-d890a680.entry.js → p-78de36f2.entry.js} +1 -1
- package/dist/design-system/p-795bae4c.entry.js +1 -0
- package/dist/design-system/{p-522d1481.entry.js → p-819e28fe.entry.js} +1 -1
- package/dist/design-system/{p-32e2d71e.entry.js → p-843d4b16.entry.js} +1 -1
- package/dist/design-system/{p-cc97f4b4.entry.js → p-8ee990bd.entry.js} +1 -1
- package/dist/design-system/{p-42f7febe.entry.js → p-9404ab06.entry.js} +1 -1
- package/dist/design-system/p-DGlmvjGc.js +1 -0
- package/dist/design-system/{p-DykVq5VY.js → p-DZbc1mgp.js} +1 -1
- package/dist/design-system/p-DopVneZA.js +1 -0
- package/dist/design-system/{p-e8e64511.entry.js → p-aac84d22.entry.js} +1 -1
- package/dist/design-system/{p-f7074386.entry.js → p-b868d747.entry.js} +1 -1
- package/dist/design-system/{p-3b8954d9.entry.js → p-b8e34533.entry.js} +1 -1
- package/dist/design-system/p-c3e4853c.entry.js +1 -0
- package/dist/design-system/{p-11b904a3.entry.js → p-d226bd61.entry.js} +1 -1
- package/dist/design-system/{p-dbeaeb31.entry.js → p-d3cc8538.entry.js} +1 -1
- package/dist/design-system/{p-ae117afa.entry.js → p-eae21a79.entry.js} +1 -1
- package/dist/design-system/{p-e23dac79.entry.js → p-fa670cc4.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sanitize-inline-html-DopVneZA.js +63 -0
- package/dist/esm/sd-calendar_2.entry.js +7 -6
- package/dist/esm/sd-callout.entry.js +150 -0
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +9 -4
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +4 -3
- package/dist/esm/sd-date-picker_7.entry.js +9 -9
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +6 -5
- package/dist/esm/sd-field_3.entry.js +7 -7
- package/dist/esm/sd-guide.entry.js +5 -4
- package/dist/esm/sd-key-value-table.entry.js +1 -1
- package/dist/esm/sd-linear-progress.entry.js +2 -2
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-pagination_4.entry.js +10 -10
- package/dist/esm/sd-popup.entry.js +6 -5
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/{sd-table.config-DU7Pc6YH.js → sd-table.config-CFHtQ8LX.js} +1 -1
- package/dist/esm/sd-table.entry.js +19 -16
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +4 -2
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/esm/{system-GBlVDmy4.js → system-DGlmvjGc.js} +12 -1
- package/dist/types/components/sd-calendar/sd-calendar.d.ts +1 -0
- package/dist/types/components/sd-callout/sd-callout.config.d.ts +34 -0
- package/dist/types/components/sd-callout/sd-callout.d.ts +11 -0
- package/dist/types/components.d.ts +43 -0
- package/dist/types/utils/html/sanitize-inline-html.d.ts +1 -0
- package/hydrate/index.js +338 -95
- package/hydrate/index.mjs +338 -95
- package/package.json +1 -1
- package/dist/components/p-BDVrZ5mV.js +0 -1
- package/dist/components/p-CETxX4-M.js +0 -1
- package/dist/components/p-CyObYB-g.js +0 -1
- package/dist/components/p-GBlVDmy4.js +0 -1
- package/dist/design-system/p-29fd86d8.entry.js +0 -1
- package/dist/design-system/p-36d744fb.entry.js +0 -1
- package/dist/design-system/p-8f4ccae4.entry.js +0 -1
- package/dist/design-system/p-9f7f1b8b.entry.js +0 -1
- package/dist/design-system/p-GBlVDmy4.js +0 -1
- package/dist/design-system/p-a640e509.entry.js +0 -1
- package/dist/design-system/p-a97033a2.entry.js +0 -1
- package/dist/design-system/p-fc5c4f85.entry.js +0 -1
|
@@ -70,7 +70,7 @@ export class SdSelectListItem {
|
|
|
70
70
|
return (
|
|
71
71
|
// 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
|
|
72
72
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
73
|
-
h("div", { key: '
|
|
73
|
+
h("div", { key: '37189acb2854061fd120d662050fddddb396170c', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
|
|
74
74
|
'sd-select-list-item': true,
|
|
75
75
|
'sd-select-list-item--group': isGroup,
|
|
76
76
|
'sd-select-list-item--depth1-group': isDepth1Group,
|
|
@@ -80,7 +80,7 @@ export class SdSelectListItem {
|
|
|
80
80
|
'sd-select-list-item--focused': this.isFocused,
|
|
81
81
|
'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
82
82
|
'sd-select-list-item--disabled': !!this.option.disabled,
|
|
83
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '
|
|
83
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '7cc43ed0a1c4a2019be3a7f6f60de1c7f03a6148', value: this.isSelected === null ? null : !!this.isSelected, disabled: this.option.disabled, inverse: this.isFocused && this.isSelected !== false, class: "sd-select-list-item__checkbox", onClick: this.handleCheckboxClick, onSdUpdate: this.handleCheckboxUpdate })), h("span", { key: '331c7d1ded82834521f3292dc739612f24d7209e', class: "sd-select-list-item__label" }, this.option.label), this.countInfo && (h("span", { key: '80b34cd1a6e67719d50c62afedf23c0903259c78', class: "sd-select-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
84
84
|
}
|
|
85
85
|
static get is() { return "sd-select-list-item"; }
|
|
86
86
|
static get originalStyleUrls() {
|
|
@@ -41,15 +41,15 @@ export class SdSelectListItemSearch {
|
|
|
41
41
|
clearTimeout(this.debounceTimer);
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h("div", { key: '
|
|
44
|
+
return (h("div", { key: 'a8b62b61ec6a0afd69de50b8df02e57de2a04c8c', class: {
|
|
45
45
|
'sd-select-list-item-search': true,
|
|
46
46
|
'sd-select-list-item-search--scrolled': this.isScrolled,
|
|
47
|
-
} }, h("div", { key: '
|
|
47
|
+
} }, h("div", { key: '2b04a677a8b4e3212eff83c07609a4b7d89799c1', class: "sd-select-list-item-search__inner" }, h("sd-icon", { key: 'c0c51d4b0150fee7151c7e2bcc5aaf8428d31043', name: "search", size: 16, color: "grey_70", class: "sd-select-list-item-search__icon" }), h("input", { key: '85d2309cbb037851053c34baeca5f59c690c0881', ref: el => {
|
|
48
48
|
this.inputEl = el;
|
|
49
|
-
}, type: "text", class: "sd-select-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), h("button", { key: '
|
|
49
|
+
}, type: "text", class: "sd-select-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onFocus: () => this.searchFocus.emit() }), h("button", { key: '564b6ae6dbab1fa5f4f6d977fa9fd52bb9114873', type: "button", class: {
|
|
50
50
|
'sd-select-list-item-search__clear': true,
|
|
51
51
|
'sd-select-list-item-search__clear--hidden': this.searchText === '',
|
|
52
|
-
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, h("sd-icon", { key: '
|
|
52
|
+
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, h("sd-icon", { key: '8ae0f92f8762681cc4c2a6fc11340498b8b01c98', name: "close", size: 12, color: "#888888" })))));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "sd-select-list-item-search"; }
|
|
55
55
|
static get originalStyleUrls() {
|
|
@@ -348,9 +348,9 @@ export class SdSelectListbox {
|
|
|
348
348
|
'--listbox-max-height': this.maxHeight ?? '260px',
|
|
349
349
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
350
350
|
};
|
|
351
|
-
return (h("div", { key: '
|
|
351
|
+
return (h("div", { key: '1834dbfee219988e78ad47d3640ebafb9983298c', class: "sd-select-listbox", style: cssVars }, this.showSearch && (h("sd-select-list-item-search", { key: '28fbfce57184f2a8c090d628c5b33cecf9337c3c', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: 'b7430d72cdb26cad59b226af8cf98d796645390c', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
|
|
352
352
|
this.listEl = el;
|
|
353
|
-
} }, this.showSelectAll && (h("sd-select-list-item", { key: '
|
|
353
|
+
} }, this.showSelectAll && (h("sd-select-list-item", { key: '8f159cdef838c0f39bb7aad1717a88c04c75dbda', option: SdSelectListbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectListbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectListbox.SELECT_ALL_OPTION) })), this.isEmpty ? (h("div", { class: "sd-select-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
|
|
354
354
|
}
|
|
355
355
|
static get is() { return "sd-select-listbox"; }
|
|
356
356
|
static get encapsulation() { return "shadow"; }
|
|
@@ -42,7 +42,7 @@ export class SdSelectTrigger {
|
|
|
42
42
|
? SELECT_COLORS.icon.disabled
|
|
43
43
|
: SELECT_COLORS.icon.default,
|
|
44
44
|
};
|
|
45
|
-
return (h("div", { key: '
|
|
45
|
+
return (h("div", { key: '645d8e7ff5065664a3510b127628cb54d97fb613', ref: el => {
|
|
46
46
|
this.triggerEl = el;
|
|
47
47
|
}, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
|
|
48
48
|
'sd-select-trigger': true,
|
|
@@ -53,7 +53,7 @@ export class SdSelectTrigger {
|
|
|
53
53
|
e.preventDefault();
|
|
54
54
|
this.handleClick();
|
|
55
55
|
}
|
|
56
|
-
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '
|
|
56
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '515dda6d98ad09b0854e0ef0e04f0bf8c9592d1a', class: "sd-select-trigger__content" }, h("span", { key: '9d92577675d0c7e6ba32174ae0cdd754788dbccb', class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택')), h("sd-icon", { key: '347532a73d9ff2929d9f716fb8d2e314af7d7069', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
57
57
|
'sd-select-trigger__icon': true,
|
|
58
58
|
'sd-select-trigger__icon--open': this.isOpen,
|
|
59
59
|
} }))));
|
|
@@ -254,15 +254,15 @@ export class SdSelect {
|
|
|
254
254
|
this.closeDropdown();
|
|
255
255
|
},
|
|
256
256
|
};
|
|
257
|
-
return (h("sd-field", { key: '
|
|
257
|
+
return (h("sd-field", { key: '21849c194994f51c36b2fa5eafd606230b21e365', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
|
|
258
258
|
this.hovered = true;
|
|
259
259
|
}, onMouseLeave: () => {
|
|
260
260
|
this.hovered = false;
|
|
261
|
-
} }, h("div", { key: '
|
|
261
|
+
} }, h("div", { key: 'bcba54ed8d325a540d14af14c9b3bf332f631ce8', class: "sd-select", ref: el => {
|
|
262
262
|
this.triggerRef = el;
|
|
263
|
-
} }, h("sd-select-trigger", { key: '
|
|
263
|
+
} }, h("sd-select-trigger", { key: '72e361ca6e162eee56b82398902e89226e980d3d', ref: el => {
|
|
264
264
|
this.triggerComponentRef = el;
|
|
265
|
-
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '
|
|
265
|
+
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '0ff55857cbc146db57caa53d560752d0fae8413b', ...portalProps }, h("sd-select-listbox", { key: '20c103309dc7f2eaf4bee6abae271606b64ace8b', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
|
|
266
266
|
}
|
|
267
267
|
static get is() { return "sd-select"; }
|
|
268
268
|
static get originalStyleUrls() {
|
|
@@ -40,7 +40,7 @@ export class SdSwitch {
|
|
|
40
40
|
'--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
|
|
41
41
|
'--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
|
|
42
42
|
};
|
|
43
|
-
return (h("label", { key: '
|
|
43
|
+
return (h("label", { key: '3d9449733d73dcbd2d7a95505b6afd930a43a114', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, h("input", { key: 'f8d35ea743b5f85697d9d4de8fe915ce2d8f7b56', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), h("div", { key: 'b62a6bfa60c488270184698610337926b688baff', class: "sd-switch__track" }, h("div", { key: 'da7764fe4a4202366fe0a922de687ece121eb73f', class: "sd-switch__knob" })), this.label && h("span", { key: '924c2939f0cb2196ff69be560e1c7f113590c73b', class: "sd-switch__label" }, this.label)));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "sd-switch"; }
|
|
46
46
|
static get originalStyleUrls() {
|
|
@@ -209,6 +209,10 @@ export class SdTable {
|
|
|
209
209
|
if (this.pagination?.rowsPerPage != null) {
|
|
210
210
|
this.innerRowsPerPage = this.pagination.rowsPerPage;
|
|
211
211
|
}
|
|
212
|
+
// host element 에 자식 컴포넌트(sd-thead/sd-tbody/sd-tr) 가 직접 접근하는 internal sync helpers 를 monkey-patch.
|
|
213
|
+
// 28개 메서드 전체를 typed interface 로 노출하면 코드 비용이 크고, 어차피 internal 이라 외부 사용자가 호출하지 않는다.
|
|
214
|
+
// 정식 @Method 노출로 옮기는 작업은 별도 이슈로 분리.
|
|
215
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
212
216
|
const el = this.el;
|
|
213
217
|
el.isRowSelectedSync = this.isRowSelectedSync.bind(this);
|
|
214
218
|
el.updateRowSelectSync = this.updateRowSelectSync.bind(this);
|
|
@@ -325,7 +329,6 @@ export class SdTable {
|
|
|
325
329
|
}
|
|
326
330
|
});
|
|
327
331
|
}
|
|
328
|
-
// light DOM(manual mode 자식)과 shadow DOM(autoThead/autoTbody fallback) 양쪽 모두에서 자식을 찾는다.
|
|
329
332
|
queryChildEl(selector) {
|
|
330
333
|
return (this.el.querySelector(selector) ??
|
|
331
334
|
this.el.shadowRoot?.querySelector(selector) ??
|
|
@@ -353,12 +356,12 @@ export class SdTable {
|
|
|
353
356
|
refreshChildrenSelection() {
|
|
354
357
|
const thead = this.queryChildEl('sd-thead');
|
|
355
358
|
thead?.refreshSelection?.();
|
|
356
|
-
this.queryAllTr().forEach(tr => tr
|
|
359
|
+
this.queryAllTr().forEach(tr => tr.refreshSelection?.());
|
|
357
360
|
}
|
|
358
361
|
refreshChildrenConfig() {
|
|
359
362
|
const thead = this.queryChildEl('sd-thead');
|
|
360
363
|
thead?.refreshConfig?.();
|
|
361
|
-
this.queryAllTr().forEach(tr => tr
|
|
364
|
+
this.queryAllTr().forEach(tr => tr.refreshConfig?.());
|
|
362
365
|
}
|
|
363
366
|
maybeEmitVirtualReachEnd(start, end) {
|
|
364
367
|
const threshold = Math.max(1, this.virtualEndThreshold);
|
|
@@ -390,6 +393,7 @@ export class SdTable {
|
|
|
390
393
|
this.vsEnd = end;
|
|
391
394
|
const topHeight = start * this.effectiveRowHeight;
|
|
392
395
|
const bottomHeight = Math.max(0, (this.rowCount - end) * this.effectiveRowHeight);
|
|
396
|
+
// setSpacersSync 는 sd-tbody 가 host element 에 monkey-patch 하는 internal sync helper.
|
|
393
397
|
const tbody = this.queryChildEl('sd-tbody');
|
|
394
398
|
tbody?.setSpacersSync?.(topHeight, bottomHeight);
|
|
395
399
|
if (rangeChanged) {
|
|
@@ -510,7 +514,7 @@ export class SdTable {
|
|
|
510
514
|
this.updateRowsVisibility();
|
|
511
515
|
}
|
|
512
516
|
updateRowsVisibility() {
|
|
513
|
-
this.queryAllTr().forEach(tr => tr
|
|
517
|
+
this.queryAllTr().forEach(tr => tr.updateVisibility?.());
|
|
514
518
|
}
|
|
515
519
|
changeRowsPerPage(perPage) {
|
|
516
520
|
const changedRowsPerPage = perPage != null && perPage !== '' ? Number(perPage) : 0;
|
|
@@ -549,7 +553,7 @@ export class SdTable {
|
|
|
549
553
|
this.columnWidths = this.columnWidths.map((width, idx) => (idx === index ? newWidth : width));
|
|
550
554
|
const thead = this.queryChildEl('sd-thead');
|
|
551
555
|
thead?.setColumnWidths?.(this.columnWidths);
|
|
552
|
-
this.queryAllTr().forEach(tr => tr
|
|
556
|
+
this.queryAllTr().forEach(tr => tr.setColumnWidths?.(this.columnWidths));
|
|
553
557
|
const stickyRightCount = this.stickyColumn?.right || 0;
|
|
554
558
|
const visibleColCount = this.columns.filter(c => c.visible !== false).length;
|
|
555
559
|
const isRightStickyEdgeResizer = stickyRightCount > 0 && index === visibleColCount - stickyRightCount;
|
|
@@ -604,9 +608,8 @@ export class SdTable {
|
|
|
604
608
|
// 경우가 있어, sd-tr의 @State (spansVersion)을 통해 재렌더를 강제한다.
|
|
605
609
|
requestAllTrUpdate() {
|
|
606
610
|
this.queryAllTr().forEach(tr => {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
trAny.bumpSpansVersion();
|
|
611
|
+
if (typeof tr.bumpSpansVersion === 'function') {
|
|
612
|
+
tr.bumpSpansVersion();
|
|
610
613
|
}
|
|
611
614
|
else {
|
|
612
615
|
forceUpdate(tr);
|
|
@@ -846,25 +849,25 @@ export class SdTable {
|
|
|
846
849
|
'--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
|
|
847
850
|
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
848
851
|
};
|
|
849
|
-
return (h(Host, { key: '
|
|
852
|
+
return (h(Host, { key: '9ee5b528b330f9edf406ff40ec089136c0807653', style: hostStyle }, h("div", { key: '9ac6cbba84b7ef7d0897474168748811fb15af92', class: "sd-table__container", style: {
|
|
850
853
|
'--table-width': this.width,
|
|
851
854
|
'--table-height': effectiveTableHeight,
|
|
852
855
|
'--table-container-height': `calc(${effectiveTableHeight} - ${paginationHeight}px)`,
|
|
853
|
-
} }, h("div", { key: '
|
|
856
|
+
} }, h("div", { key: '11f916debfd443e1d243bfa2335dbb0a3cb094bc', class: {
|
|
854
857
|
'sd-table__wrapper': true,
|
|
855
858
|
'sd-table__wrapper--radius-use-top': this.radius === 'useTop',
|
|
856
|
-
} }, h("div", { key: '
|
|
859
|
+
} }, h("div", { key: '3cad3d86f731a3edc0d2b5a680bcaf6ad6be7399', class: {
|
|
857
860
|
'sd-table__scroll-container': true,
|
|
858
861
|
'sd-table__scroll-container--loading': this.isLoading,
|
|
859
862
|
'sd-table__scroll-container--no-data': isNoData,
|
|
860
|
-
} }, this.isLoading && (h("div", { key: '
|
|
863
|
+
} }, this.isLoading && (h("div", { key: '6f0aac84dcb3d9ca721ed82cd45214b3956d3f94', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '8bb6b8025fceee6ef856efd9cafefe925fc95272', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '69e6e22b68261832a299de470c8ca7f5a16205dd', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'c797a2d41c752698bed1f034beefddc4bf8b951d', class: "sd-table__no-data" }, h("div", { key: '0f0306bc89b5d9046de2aec935822eab0c3ca36c', class: "sd-table__no-data-content", ref: el => {
|
|
861
864
|
this.noDataContentEl = el;
|
|
862
865
|
if (el)
|
|
863
866
|
this.syncNoDataContentObserver();
|
|
864
|
-
} }, h("slot", { key: '
|
|
867
|
+
} }, h("slot", { key: '042671d4c65c4031a756da386ed010146c17f736', name: "no-data" }, h("span", { key: '5994f656dbea3fd1dea69c105907b188658f8c41' }, this.resolvedNoDataLabel)))))), h("table", { key: '16bb3a7c6b32e5312eda79015cd7d90bef37bdff', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
|
|
865
868
|
this.pagination.rowsPerPage > 0 &&
|
|
866
869
|
this.rowCount > 0 &&
|
|
867
|
-
!this.useVirtualScroll && (h("div", { key: '
|
|
870
|
+
!this.useVirtualScroll && (h("div", { key: '6c3ee5d93fb395154c4c42c914669af535c1a5bc', class: "sd-table__pagination" }, h("sd-pagination", { key: '46053012374e1255037706a8fa4d068dbc60f2d9', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: 'df04b19e857e823be8237148d84456d492575ce3', value: this.useInternalPagination
|
|
868
871
|
? this.innerRowsPerPage
|
|
869
872
|
: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
|
|
870
873
|
if (!this.isRowsPerPageValue(e.detail))
|
|
@@ -45,9 +45,9 @@ export class SdTbody {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: 'a3d0ee1c1820474e97e430ba91f48e12ee0e252d', slot: `${this.tableId}-body` }, h("tbody", { key: 'bbd5b9acf02150b146c9b25d07f2e7a9dd347921', class: { tbody: true } }, [
|
|
49
49
|
this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
|
|
50
|
-
h("slot", { key: '
|
|
50
|
+
h("slot", { key: 'f0ec0aa4d7e7190fc93d96afe5591004174fff63' }),
|
|
51
51
|
this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
|
|
52
52
|
])));
|
|
53
53
|
}
|
|
@@ -150,7 +150,7 @@ export class SdTd {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
render() {
|
|
153
|
-
return (h(Host, { key: '
|
|
153
|
+
return (h(Host, { key: '91c033a0c4c3a6c3c9b29c0be99912c5ac1283ee', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: 'abfbc911c707012bc7d924e328ba07d71b96f9a9' })));
|
|
154
154
|
}
|
|
155
155
|
static get is() { return "sd-td"; }
|
|
156
156
|
static get originalStyleUrls() {
|
|
@@ -157,16 +157,16 @@ export class SdThead {
|
|
|
157
157
|
'--table-border-color': TABLE_BORDER.color,
|
|
158
158
|
'--table-border-width': `${TABLE_BORDER.width}px`,
|
|
159
159
|
};
|
|
160
|
-
return (h(Host, { key: '
|
|
160
|
+
return (h(Host, { key: '234ca55bb2507aef21df976066e5ce377c2e9e89', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: 'fecd6b54f72a8643b663c3af1988eed60300d08d', class: {
|
|
161
161
|
'thead': true,
|
|
162
162
|
'thead--sticky': this._stickyHeader,
|
|
163
|
-
} }, h("tr", { key: '
|
|
163
|
+
} }, h("tr", { key: '21d56c50076d3340733b7fa0a8e569fec005e415', class: "tr" }, this._selectable && (h("th", { key: 'ace570ae2157ae63a21ec6ba60d8b8898dd0c33c', class: {
|
|
164
164
|
'th': true,
|
|
165
165
|
'th--selected': true,
|
|
166
166
|
'sticky-left': true,
|
|
167
167
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
168
168
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
169
|
-
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '
|
|
169
|
+
}, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: '4b30536f427b9985355c4e22b6b532a3033306c0', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
|
|
170
170
|
'th': true,
|
|
171
171
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
172
172
|
'sticky-left': true,
|
|
@@ -67,7 +67,7 @@ export class SdTabs {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h("div", { key: '
|
|
70
|
+
return (h("div", { key: '181916a72512a6802a06dc56fca418a806d18a0e', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index) => {
|
|
71
71
|
const badgeName = this.getBadgeName(tab);
|
|
72
72
|
return (h("div", { key: `tab-${index}`, role: "tab", tabindex: 0, "aria-selected": tab.value === this.value ? 'true' : 'false', class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab), onKeyDown: e => {
|
|
73
73
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -4,6 +4,8 @@ export class SdTag {
|
|
|
4
4
|
name = 'square_sm_grey';
|
|
5
5
|
label = '';
|
|
6
6
|
icon;
|
|
7
|
+
// 아이콘이 좌측 배치되는 게 자연스러운 default. prop 이름 변경(isRight 등)은 public API breaking 이라 별도 이슈로 분리.
|
|
8
|
+
// eslint-disable-next-line stencil/ban-default-true
|
|
7
9
|
isLeft = true;
|
|
8
10
|
componentWillLoad() {
|
|
9
11
|
this.name = this.name ?? 'square_sm_grey';
|
|
@@ -25,7 +27,7 @@ export class SdTag {
|
|
|
25
27
|
render() {
|
|
26
28
|
const config = this.resolvedConfig;
|
|
27
29
|
const iconNode = this.renderIcon(config.icon, config.iconSize);
|
|
28
|
-
return (h("span", { key: '
|
|
30
|
+
return (h("span", { key: 'c8b8b88e2c83401bb9d3e05004b0517d7e4a3a6a', class: "sd-tag", style: {
|
|
29
31
|
'--sd-tag-background': config.background,
|
|
30
32
|
'--sd-tag-content': config.content,
|
|
31
33
|
'--sd-tag-height': config.height,
|
|
@@ -35,7 +37,7 @@ export class SdTag {
|
|
|
35
37
|
'--sd-tag-font-weight': config.fontWeight,
|
|
36
38
|
'--sd-tag-line-height': config.lineHeight,
|
|
37
39
|
'--sd-tag-radius': config.radius,
|
|
38
|
-
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '
|
|
40
|
+
}, "aria-label": this.label || 'tag' }, this.icon && this.isLeft && iconNode, h("span", { key: '67094b09ab1d7b7e865c9f6b8017f8c5c3f8274a', class: "sd-tag__label" }, this.label), this.icon && !this.isLeft && iconNode));
|
|
39
41
|
}
|
|
40
42
|
static get is() { return "sd-tag"; }
|
|
41
43
|
static get originalStyleUrls() {
|
|
@@ -105,7 +105,7 @@ export class SdTextarea {
|
|
|
105
105
|
'--sd-system-size-field-sm-height': 'auto',
|
|
106
106
|
'--sd-system-radius-field-sm': `${TEXTAREA_TOKENS.radius}px`,
|
|
107
107
|
};
|
|
108
|
-
return (h("sd-field", { key: '
|
|
108
|
+
return (h("sd-field", { key: 'd877d2598cad84c2bf495e76e0cc1d087f52cc8e', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'c4e864b958b806d4ecc293bd47375dabe0b9e825', class: "sd-textarea__content" }, h("textarea", { key: '8d12c0178392c07150f0fdde5bab4c0e91534efb', name: this.name, ref: el => (this.nativeEl = el), class: `sd-textarea__native ${this.textareaClass}`, value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readOnly: this.readonly, autofocus: this.autoFocus, maxLength: this.maxLength, rows: this.rows, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.textareaStyle }))));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "sd-textarea"; }
|
|
111
111
|
static get originalStyleUrls() {
|
|
@@ -17,12 +17,12 @@ export class SdToast {
|
|
|
17
17
|
const linkColor = typeConfig.linkColor ?? typeConfig.content;
|
|
18
18
|
const useDefaultCloseIntent = ['default', 'caution', 'info'].includes(this.type);
|
|
19
19
|
const buttonName = TOAST_BUTTON_NAME_BY_TYPE[this.type] ?? TOAST_BUTTON_NAME_BY_TYPE.default;
|
|
20
|
-
return (h("div", { key: '
|
|
20
|
+
return (h("div", { key: '82579581897d7845b95456ccb5e2a1745c84bcc5', style: {
|
|
21
21
|
'--sd-toast-bg': typeConfig.bg,
|
|
22
22
|
'--sd-toast-text': typeConfig.content,
|
|
23
23
|
'--sd-toast-icon': iconColor,
|
|
24
24
|
'--sd-toast-link': linkColor,
|
|
25
|
-
} }, h("div", { key: '
|
|
25
|
+
} }, h("div", { key: '5f41392a25dee4e53917255453c97c2203940f21', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: '8f38f7c9842ec295510135589a63994011a856f4', class: "sd-toast__icon" }, h("sd-icon", { key: '62ef897ddfc3b47fe7b640d430d0baf95bdb5b51', name: this.icon, size: iconSize, color: iconColor }))), h("div", { key: 'f6db6cb9776cb41400c9a9052cdea94990245298', class: "sd-toast__content" }, h("span", { key: 'fbd7cdd72422e9ad08f99302b4dcd607d058926f', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: 'f599928ad9d0d7536086d7dd2d1ce65b429fd8f4', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (h("sd-button", { key: '2be68a412c4b6b9dac64dbd89447c4905fa7512f', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (h("sd-ghost-button", { key: '065030362b37383ee7ae31e9b8a771b160427cbe', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "sd-toast"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -216,7 +216,7 @@ export class SdToastContainer {
|
|
|
216
216
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
217
217
|
const indexMap = new Map();
|
|
218
218
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
219
|
-
return (h("div", { key: '
|
|
219
|
+
return (h("div", { key: 'c80d46b63f50591d4d92b810c0625701e4741e3a', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
220
220
|
this.expanded = true;
|
|
221
221
|
this.pauseTimers();
|
|
222
222
|
}, onMouseLeave: () => {
|
|
@@ -45,7 +45,7 @@ export class SdToggle {
|
|
|
45
45
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
46
46
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
47
47
|
};
|
|
48
|
-
return (h("label", { key: '
|
|
48
|
+
return (h("label", { key: 'c5c8b9448dabb6619e80fd55b11f94bf78706994', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, h("input", { key: 'bd43e7f286da217653461ec3128998c5f5a821d9', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "sd-toggle"; }
|
|
51
51
|
static get originalStyleUrls() {
|
|
@@ -84,14 +84,14 @@ export class SdTooltip {
|
|
|
84
84
|
const hasLabel = this.label !== undefined && this.label !== '';
|
|
85
85
|
const divTrigger = trigger === 'hover' ? hoverTrigger : hasLabel ? {} : { onClick: toggleTooltip };
|
|
86
86
|
const buttonClickTrigger = trigger === 'click' && hasLabel ? { onSdClick: toggleTooltip } : {};
|
|
87
|
-
return (h(Fragment, { key: '
|
|
87
|
+
return (h(Fragment, { key: 'c7ed53cfd1505b394353a9a37d0fe012cdf29217' }, h("div", { key: 'd31332c8717dd954bb1c79bb9d0fd974f74d6e73', class: `sd-tooltip-trigger ${this.sdClass !== undefined && this.sdClass !== '' ? this.sdClass : ''}`, ...divTrigger }, hasLabel ? (h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel, disabled: this.disabled, type: this.type ?? 'button', class: "sd-tooltip", ...buttonClickTrigger })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: this.iconSize ?? 12, color: color, class: "sd-tooltip" }))), this.showTooltip && (h("sd-floating-portal", { key: 'a63971f2fa15e9ef8a6294a2284284e7d7154a8f', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.tooltipOffset }, h("div", { key: 'dc3259612bf303b320fdc849bbb83f224f410737', ref: el => (this.menuEl = el), class: {
|
|
88
88
|
'sd-floating-menu': true,
|
|
89
89
|
[`sd-floating-menu--${tooltipType}`]: true,
|
|
90
90
|
[`sd-floating-menu--${placement}`]: true,
|
|
91
91
|
}, style: {
|
|
92
92
|
'--sd-floating-bg': typeConfig.bg,
|
|
93
93
|
'--sd-floating-content': typeConfig.content,
|
|
94
|
-
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: '
|
|
94
|
+
}, onMouseEnter: () => this.show(), onMouseLeave: () => this.startHideTimer() }, h("i", { key: '8b3d132320c27710c9346f5313ee7c173df4275e', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '66e90298fa62b7660e3d785abd024e9acae38fe3' })), h("div", { key: '115d0ee83abb2d9ca607759f009c47acd34196e2', class: "sd-floating-menu__content", innerHTML: this.slotContentHTML }))))));
|
|
95
95
|
}
|
|
96
96
|
static get is() { return "sd-tooltip"; }
|
|
97
97
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const ALLOWED_INLINE_TAGS = new Set(['B', 'STRONG', 'I', 'EM', 'BR', 'SPAN']);
|
|
2
|
+
const DROP_CONTENT_TAGS = new Set([
|
|
3
|
+
'SCRIPT',
|
|
4
|
+
'STYLE',
|
|
5
|
+
'IFRAME',
|
|
6
|
+
'OBJECT',
|
|
7
|
+
'EMBED',
|
|
8
|
+
'META',
|
|
9
|
+
'LINK',
|
|
10
|
+
'BASE',
|
|
11
|
+
'NOSCRIPT',
|
|
12
|
+
]);
|
|
13
|
+
const escapeHtml = (value) => value
|
|
14
|
+
.replaceAll('&', '&')
|
|
15
|
+
.replaceAll('<', '<')
|
|
16
|
+
.replaceAll('>', '>')
|
|
17
|
+
.replaceAll('"', '"')
|
|
18
|
+
.replaceAll("'", ''');
|
|
19
|
+
const createSanitizerTemplate = () => {
|
|
20
|
+
if (typeof document === 'undefined') {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return document.createElement('template');
|
|
24
|
+
};
|
|
25
|
+
const sanitizeNode = (node, doc) => {
|
|
26
|
+
if (node.nodeType === Node.COMMENT_NODE) {
|
|
27
|
+
node.remove();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const element = node;
|
|
34
|
+
const tagName = element.tagName;
|
|
35
|
+
if (DROP_CONTENT_TAGS.has(tagName)) {
|
|
36
|
+
element.remove();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
Array.from(element.childNodes).forEach(child => sanitizeNode(child, doc));
|
|
40
|
+
Array.from(element.attributes).forEach(attr => element.removeAttribute(attr.name));
|
|
41
|
+
if (ALLOWED_INLINE_TAGS.has(tagName)) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const parent = element.parentNode;
|
|
45
|
+
if (parent == null) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
while (element.firstChild) {
|
|
49
|
+
parent.insertBefore(element.firstChild, element);
|
|
50
|
+
}
|
|
51
|
+
parent.removeChild(element);
|
|
52
|
+
};
|
|
53
|
+
export const sanitizeInlineHtml = (value) => {
|
|
54
|
+
const template = createSanitizerTemplate();
|
|
55
|
+
if (template == null) {
|
|
56
|
+
return escapeHtml(value);
|
|
57
|
+
}
|
|
58
|
+
template.innerHTML = value;
|
|
59
|
+
Array.from(template.content.childNodes).forEach(child => sanitizeNode(child, template.ownerDocument));
|
|
60
|
+
return template.innerHTML;
|
|
61
|
+
};
|
|
@@ -42,7 +42,7 @@ class ModalDialogRefImpl {
|
|
|
42
42
|
}
|
|
43
43
|
update(props) {
|
|
44
44
|
this.runOrQueue(() => {
|
|
45
|
-
this.containerRef
|
|
45
|
+
this.containerRef?.update(this.modalId, props);
|
|
46
46
|
});
|
|
47
47
|
return this;
|
|
48
48
|
}
|
|
@@ -61,7 +61,7 @@ class ModalDialogRefImpl {
|
|
|
61
61
|
this.dismissRequested = true;
|
|
62
62
|
const containerReason = REASON_TO_CONTAINER[reason];
|
|
63
63
|
this.runOrQueue(() => {
|
|
64
|
-
this.containerRef
|
|
64
|
+
this.containerRef?.dismissById(this.modalId, containerReason);
|
|
65
65
|
});
|
|
66
66
|
return this;
|
|
67
67
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BjkROjjt.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function o(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function i(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=o(s);return await i(c),c.create({message:t,type:n,...r})},async dismiss(t){if(null!=n)return await i(n),n.dismiss(t)},async dismissAll(){if(null!=n)return await i(n),n.dismissAll()},configure(t){o(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BjkROjjt.js";import{c as t}from"./p-DRVnqiWc.js";let n=null;function e(t,n){void 0!==n&&(void 0!==n.position&&t.setAttribute("position",n.position),null!=n.maxVisible&&t.setAttribute("max-visible",n.maxVisible+""),null!=n.defaultDuration&&t.setAttribute("default-duration",n.defaultDuration+""),null!=n.zIndex&&t.setAttribute("z-index",n.zIndex+""))}function o(t){return n&&document.body.contains(n)?(e(n,t),n):(n=document.createElement("sd-toast-container"),e(n,t),document.body.appendChild(n),n)}function i(t){return"function"==typeof t.create?Promise.resolve():new Promise((n=>{const e=()=>{"function"==typeof t.create?n():requestAnimationFrame(e)};requestAnimationFrame(e)}))}const c={async create(t,n,e){const{globalOptions:s,...r}=e??{},c=o(s);return await i(c),c.create({message:t,type:n,...r})},async dismiss(t){if(null!=n)return await i(n),n.dismiss(t)},async dismissAll(){if(null!=n)return await i(n),n.dismissAll()},configure(t){o(t)}},u="sd-modal-container";let d=null;const l={ok:"confirm",cancel:"cancel",close:"close"};class m{modalId;okFn;cancelFn;closeFn;clickFn;dismissedFn;containerRef;pendingActions=[];dismissRequested=!1;constructor(t,n){this.modalId=t,this.containerRef=n}onOk(t){return this.okFn=t,this}onCancel(t){return this.cancelFn=t,this}onClose(t){return this.closeFn=t,this}onClick(t){return this.clickFn=t,this}onDismissed(t){return this.dismissedFn=t,this}update(t){return this.runOrQueue((()=>{this.containerRef?.update(this.modalId,t)})),this}ok(){return this.dismiss("ok")}cancel(){return this.dismiss("cancel")}close(){return this.dismiss("close")}dismiss(t="close"){if(this.dismissRequested)return this;this.dismissRequested=!0;const n=l[t];return this.runOrQueue((()=>{this.containerRef?.dismissById(this.modalId,n)})),this}_triggerOk(){this.okFn?.()}_triggerCancel(){this.cancelFn?.()}_triggerClose(){this.closeFn?.()}_triggerClick(){this.clickFn?.()}_triggerDismissed(){this.dismissedFn?.()}_setId(t){this.modalId=t;const n=[...this.pendingActions];this.pendingActions=[],n.forEach((t=>t()))}_setContainer(t){this.containerRef=t}runOrQueue(t){""===this.modalId||null==this.containerRef?this.pendingActions.push(t):t()}}function f(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdModal] Browser APIs are unavailable. Use `sdModal` only on the client.")}function h(){if(f(),function(){if(!customElements.get(u))throw Error("[sdModal] `sd-modal-container` is not registered. Call `defineCustomElements(window)` before using `sdModal`.")}(),d&&d.isConnected)return d;const t=document.createElement(u);return t.setAttribute("auto-remove",""),document.body.appendChild(t),d=t,t}async function w(t){if(await customElements.whenDefined(u),"function"==typeof t.open)return Promise.resolve();throw Error("[sdModal] `sd-modal-container` is registered but not ready to open dialogs.")}function p(){return new m("")}function y(t,n){const{component:e,persistent:s}=n,o=h(),i={persistent:s};t._setContainer(o),w(o).then((async()=>{const n=await o.createCustom(e,i,t);t._setId(n)}))}const E={confirm(t){const n=h(),e=new m("",n);return w(n).then((async()=>{const s=await n.open(t,e);e._setId(s)})),e},loading(t={}){const n=h(),e=new m("",n);return w(n).then((async()=>{const s=await n.openLoading(t,e);e._setId(s)})),e},create(t){const n=p();return y(n,t),n},configure(n){f(),t(n)}},C="sd-loading-container";let k=null;async function A(t){const n=(function(){if("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof customElements)throw Error("[sdLoading] Browser APIs are unavailable. Use `sdLoading` only on the client.")}(),function(){if(!customElements.get(C))throw Error("[sdLoading] `sd-loading-container` is not registered. Call `defineCustomElements(window)` before using `sdLoading`.")}(),k&&document.body.contains(k)||(k=document.createElement(C),document.body.appendChild(k)),k);await customElements.whenDefined(C),t(n)}const P={show(t={}){A((n=>{n.show?.(t)}))},hide(){k&&A((t=>{t.hide?.()}))}};export{y as _attachSdModalWithRef,p as _createSdModalRef,P as sdLoading,E as sdModal,c as sdToast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,t as c}from"./p-BjkROjjt.js";import{S as a}from"./p-C4uWhzoG.js";import{d as l}from"./p-BSfu4DO2.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"
|
|
1
|
+
import{p as e,H as s,c as t,h as i,t as c}from"./p-BjkROjjt.js";import{S as a}from"./p-C4uWhzoG.js";import{d as l}from"./p-BSfu4DO2.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"a8b62b61ec6a0afd69de50b8df02e57de2a04c8c",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},i("div",{key:"2b04a677a8b4e3212eff83c07609a4b7d89799c1",class:"sd-select-list-item-search__inner"},i("sd-icon",{key:"c0c51d4b0150fee7151c7e2bcc5aaf8428d31043",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),i("input",{key:"85d2309cbb037851053c34baeca5f59c690c0881",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),i("button",{key:"564b6ae6dbab1fa5f4f6d977fa9fd52bb9114873",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},i("sd-icon",{key:"8ae0f92f8762681cc4c2a6fc11340498b8b01c98",name:"close",size:12,color:"#888888"}))))}static get style(){return"sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}"}},[512,"sd-select-list-item-search",{isScrolled:[4,"is-scrolled"],searchText:[32],sdFocus:[64]}]);function d(){"undefined"!=typeof customElements&&["sd-select-list-item-search","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item-search":customElements.get(c(e))||customElements.define(c(e),r);break;case"sd-icon":customElements.get(c(e))||l()}}))}export{r as S,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as a,h as s,t as
|
|
1
|
+
import{p as e,H as t,c as a,h as s,t as d}from"./p-BjkROjjt.js";import{n as i}from"./p-CCwNgVmC.js";import{i as r}from"./p-ByhWX2NK.js";import{d as l}from"./p-VuxN5d2D.js";import{d as o}from"./p-DyZNk1VT.js";import{d as n}from"./p-BGb86o0p.js";import{d as h}from"./p-BSfu4DO2.js";import{d as c}from"./p-IThoLpLs.js";const u={paddingX:r.textinput.sm.paddingX,paddingY:r.textinput.sm.paddingY,radius:r.textinput.sm.radius,fontSize:r.textinput.sm.typography.fontSize,lineHeight:r.textinput.sm.typography.lineHeight,fontWeight:r.textinput.sm.typography.fontWeight},x={text:r.textinput.text,bg:r.textinput.bg,border:r.textinput.border,resizer:r.textinput.resizer},p=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.input=a(this,"sdUpdate",7),this.focus=a(this,"sdFocus",7),this.blur=a(this,"sdBlur",7)}get host(){return this}value=null;placeholder="입력해 주세요.";disabled=!1;readonly=!1;autoFocus=!1;textareaClass="";textareaStyle={};maxLength;rows;spellcheck=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";icon=void 0;labelTooltip="";labelTooltipProps=null;rules=[];error=!1;status;focused=!1;hovered=!1;internalValue=null;nativeEl=void 0;formField;name=i();input;focus;blur;valueChanged(e){this.internalValue=e}internalValueChanged(e){e!==this.value&&(this.value=e,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=e=>{this.internalValue=e.target.value};handleFocus=async(e,t)=>{this.focused="focus"===e,"blur"===e?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(t)):this.focus?.emit(t)};render(){return s("sd-field",{key:"d877d2598cad84c2bf495e76e0cc1d087f52cc8e",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-textarea-font-size":`${u.fontSize}px`,"--sd-textarea-line-height":`${u.lineHeight}px`,"--sd-textarea-font-weight":u.fontWeight,"--sd-textarea-padding-x":`${u.paddingX}px`,"--sd-textarea-padding-y":`${u.paddingY}px`,"--sd-textarea-radius":`${u.radius}px`,"--sd-textarea-text-color":x.text.default,"--sd-textarea-placeholder-color":x.text.placeholder,"--sd-textarea-disabled-color":x.text.disabled,"--sd-textarea-bg-color":x.bg.default,"--sd-textarea-disabled-bg-color":x.bg.disabled,"--sd-textarea-border-color":x.border.default,"--sd-textarea-resizer-color":x.resizer.color,"--sd-system-size-field-sm-height":"auto","--sd-system-radius-field-sm":`${u.radius}px`}},s("div",{key:"c4e864b958b806d4ecc293bd47375dabe0b9e825",class:"sd-textarea__content"},s("textarea",{key:"8d12c0178392c07150f0fdde5bab4c0e91534efb",name:this.name,ref:e=>this.nativeEl=e,class:`sd-textarea__native ${this.textareaClass}`,value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readOnly:this.readonly,autofocus:this.autoFocus,maxLength:this.maxLength,rows:this.rows,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:e=>this.handleFocus("focus",e),onBlur:e=>this.handleFocus("blur",e),style:this.textareaStyle})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-textarea{display:inline-flex}sd-textarea .sd-textarea__content{width:100%;display:flex}sd-textarea .sd-textarea__content .sd-textarea__native{width:100%;min-height:100px;border:none;outline:none;background:transparent;padding:var(--sd-textarea-padding-y) var(--sd-textarea-padding-x);font-family:inherit;font-size:var(--sd-textarea-font-size);line-height:var(--sd-textarea-line-height);font-weight:var(--sd-textarea-font-weight);color:var(--sd-textarea-text-color);resize:vertical}sd-textarea .sd-textarea__content .sd-textarea__native::placeholder{color:var(--sd-textarea-placeholder-color)}sd-textarea .sd-textarea__content .sd-textarea__native:disabled{cursor:not-allowed;color:var(--sd-textarea-disabled-color)}sd-textarea .sd-textarea__content .sd-textarea__native[readonly]{color:var(--sd-system-color-field-text-read-only)}"}},[512,"sd-textarea",{value:[1025],placeholder:[1],disabled:[4],readonly:[4],autoFocus:[4,"auto-focus"],textareaClass:[1,"textarea-class"],textareaStyle:[16],maxLength:[2,"max-length"],rows:[2],spellcheck:[4],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],rules:[16],error:[1028],status:[1],focused:[1028],hovered:[1028],name:[1],internalValue:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function m(){"undefined"!=typeof customElements&&["sd-textarea","sd-button","sd-field","sd-floating-portal","sd-icon","sd-tooltip"].forEach((e=>{switch(e){case"sd-textarea":customElements.get(d(e))||customElements.define(d(e),p);break;case"sd-button":customElements.get(d(e))||l();break;case"sd-field":customElements.get(d(e))||o();break;case"sd-floating-portal":customElements.get(d(e))||n();break;case"sd-icon":customElements.get(d(e))||h();break;case"sd-tooltip":customElements.get(d(e))||c()}}))}export{p as S,m as d}
|