@sellmate/design-system 1.6.0 → 1.7.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/loader.cjs.js +1 -1
- package/dist/cjs/sd-chip.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +2 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +52 -24
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +5 -4
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-modal-container.cjs.entry.js +3 -0
- package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/sd-popover.cjs.entry.js +8 -5
- package/dist/cjs/sd-popup.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 +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- 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/collection/components/sd-chip/sd-chip.js +3 -3
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.js +2 -1
- package/dist/collection/components/sd-file-picker/sd-file-picker.css +15 -1
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +44 -16
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-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 +21 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +3 -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-popover/sd-popover.js +13 -23
- package/dist/collection/components/sd-popup/sd-popup.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 +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-CwQTEZWO.js → p-5_BC8C6x.js} +1 -1
- package/dist/components/p-BFAQ4nY2.js +1 -0
- package/dist/components/{p-EcuI_UmK.js → p-BNXKU1BW.js} +1 -1
- package/dist/components/{p-DZ_3ZYMC.js → p-BVvVDIo0.js} +1 -1
- package/dist/components/{p-z564gmGG.js → p-C1Fk1556.js} +1 -1
- package/dist/components/{p-BCeq6-MU.js → p-CWGbMz0J.js} +1 -1
- package/dist/components/{p-BZRMoE3E.js → p-CnbeQ2DI.js} +1 -1
- package/dist/components/{p-BYU3wOaN.js → p-CtXad9by.js} +1 -1
- package/dist/components/{p-lOVBaLB7.js → p-D155awu4.js} +1 -1
- package/dist/components/{p-BqYASycS.js → p-DAAHX92J.js} +1 -1
- package/dist/components/p-DK4Jvax0.js +1 -0
- package/dist/components/p-DR1f1cS9.js +1 -0
- package/dist/components/p-DY1iQfib.js +1 -0
- package/dist/components/{p-BNUsawW7.js → p-DeHt0RYQ.js} +1 -1
- package/dist/components/{p-CARYLqH9.js → p-Dq38kgOY.js} +1 -1
- package/dist/components/{p-DP0Dp12H.js → p-DwKYjjIC.js} +1 -1
- package/dist/components/{p-uVZjhyvS.js → p-EbF6qsnG.js} +1 -1
- package/dist/components/{p-sRzhIrJR.js → p-F7yyGdIc.js} +1 -1
- package/dist/components/p-LZKaKr8O.js +1 -0
- package/dist/components/p-vZLoby4N.js +1 -0
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-divider.js +1 -1
- package/dist/components/sd-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-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-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-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/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-2c0a8333.entry.js → p-0060136e.entry.js} +1 -1
- package/dist/design-system/{p-18d3ae55.entry.js → p-08798232.entry.js} +1 -1
- package/dist/design-system/{p-20a2e0d2.entry.js → p-102c2153.entry.js} +1 -1
- package/dist/design-system/{p-95bbba4f.entry.js → p-10f579ba.entry.js} +1 -1
- package/dist/design-system/p-17ec576c.entry.js +1 -0
- package/dist/design-system/{p-ff33d019.entry.js → p-282b1260.entry.js} +1 -1
- package/dist/design-system/{p-e6bd8ab1.entry.js → p-2e4d1fe1.entry.js} +1 -1
- package/dist/design-system/{p-07b0d118.entry.js → p-32d96a70.entry.js} +1 -1
- package/dist/design-system/{p-17883b40.entry.js → p-4ef942a8.entry.js} +1 -1
- package/dist/design-system/{p-1aafbc7b.entry.js → p-643c004a.entry.js} +1 -1
- package/dist/design-system/p-69a208c0.entry.js +1 -0
- package/dist/design-system/{p-deec1ef0.entry.js → p-914d74c4.entry.js} +1 -1
- package/dist/design-system/p-9c74571a.entry.js +1 -0
- package/dist/design-system/{p-696764b0.entry.js → p-9e75a5dc.entry.js} +1 -1
- package/dist/design-system/{p-97b405aa.entry.js → p-adce8704.entry.js} +1 -1
- package/dist/design-system/{p-969665c0.entry.js → p-b5e9320f.entry.js} +1 -1
- package/dist/design-system/{p-a5930cbd.entry.js → p-d1da969d.entry.js} +1 -1
- package/dist/design-system/{p-1219699a.entry.js → p-e1350f4d.entry.js} +1 -1
- package/dist/design-system/p-e159f70d.entry.js +1 -0
- package/dist/design-system/{p-c73cadc7.entry.js → p-f172920e.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-chip.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +2 -1
- package/dist/esm/sd-date-picker_7.entry.js +52 -24
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +5 -4
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-modal-container.entry.js +3 -0
- package/dist/esm/sd-pagination_4.entry.js +8 -8
- package/dist/esm/sd-popover.entry.js +8 -5
- package/dist/esm/sd-popup.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.entry.js +6 -6
- package/dist/esm/sd-tabs.entry.js +1 -1
- 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/types/components/sd-chip/sd-chip.d.ts +1 -1
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +3 -0
- package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -0
- package/dist/types/components/sd-popover/sd-popover.d.ts +2 -1
- package/dist/types/components.d.ts +3 -8
- package/hydrate/index.js +117 -80
- package/hydrate/index.mjs +117 -80
- package/package.json +1 -1
- package/dist/components/p-BE-21GLH.js +0 -1
- package/dist/components/p-BUW6I_d5.js +0 -1
- package/dist/components/p-DSIM5Mkt.js +0 -1
- package/dist/components/p-DoREs-rv.js +0 -1
- package/dist/components/p-Dwko_Bx3.js +0 -1
- package/dist/design-system/p-18057222.entry.js +0 -1
- package/dist/design-system/p-3a848c36.entry.js +0 -1
- package/dist/design-system/p-4bd9f005.entry.js +0 -1
- package/dist/design-system/p-c5c4a66b.entry.js +0 -1
|
@@ -18,10 +18,10 @@ const SdLoadingContainer = class {
|
|
|
18
18
|
this.visible = false;
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (index.h("div", { key: '
|
|
21
|
+
return (index.h("div", { key: 'bae5e9473237c0389d6fb404294abe6897c9847c', class: {
|
|
22
22
|
'sd-loading-container': true,
|
|
23
23
|
'sd-loading-container--visible': this.visible,
|
|
24
|
-
}, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("div", { key: '
|
|
24
|
+
}, "aria-hidden": this.visible ? 'false' : 'true' }, index.h("div", { key: 'd78b4d84c7cd34739452b0ab84df640c94939b2b', class: "sd-loading-container__backdrop" }), index.h("div", { key: '890c86605412bf67ab878155fd299c2f0b84e375', class: "sd-loading-container__content" }, index.h("sd-circle-progress", { key: '0912c4b7c23700b6ccf8ffdc6b4ce0d67b568320', indeterminate: true, type: "inverse" }), this.message && (index.h("p", { key: '373d1765d0a7c24b54bb22e65a8a6a525771ed78', class: "sd-loading-container__message" }, this.message)))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
SdLoadingContainer.style = sdLoadingContainerCss();
|
|
@@ -203,6 +203,9 @@ const SdModalContainer = class {
|
|
|
203
203
|
if (this.hasOwnProp(options, 'height')) {
|
|
204
204
|
this.setAttr(el, 'height', options.height != null ? String(options.height) : undefined);
|
|
205
205
|
}
|
|
206
|
+
if (this.hasOwnProp(options, 'progress')) {
|
|
207
|
+
el.progress = options.progress;
|
|
208
|
+
}
|
|
206
209
|
}
|
|
207
210
|
applyProps(el, options) {
|
|
208
211
|
if (this.hasOwnProp(options, 'type'))
|
|
@@ -154,13 +154,13 @@ const SdPagination = class {
|
|
|
154
154
|
'--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
|
|
155
155
|
'--sd-pagination-item-width': `${this.buttonWidth}px`,
|
|
156
156
|
};
|
|
157
|
-
return (index.h("div", { key: '
|
|
157
|
+
return (index.h("div", { key: 'a5d1cb7e22c1d582800f329e6b02ffd9f5e6605c', class: {
|
|
158
158
|
'sd-pagination': true,
|
|
159
159
|
'sd-pagination--simple': this.simple,
|
|
160
|
-
}, style: cssVars }, index.h("div", { key: '
|
|
160
|
+
}, style: cssVars }, index.h("div", { key: '196f7f2b3cc0fc896ddbcd4449b23d31729c7ec3', class: "sd-pagination__group sd-pagination__group--prev" }, this.renderPrevButtons()), this.simple ? (index.h("div", { class: "sd-pagination__info" }, index.h("span", { class: "sd-pagination__current" }, this.currentPage), index.h("span", { class: "sd-pagination__divider" }, "/"), index.h("span", { class: "sd-pagination__last" }, this.lastPage))) : (index.h("div", { class: "sd-pagination__numbers" }, this.pageNumbers.map(n => (index.h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
161
161
|
'sd-pagination__item': true,
|
|
162
162
|
'sd-pagination__item--selected': this.currentPage === n,
|
|
163
|
-
}, onClick: () => this.handlePageChange(n) }, n))))), index.h("div", { key: '
|
|
163
|
+
}, onClick: () => this.handlePageChange(n) }, n))))), index.h("div", { key: '5fe50f0cef43f8b5ef72556ed4d19653cb30a7e9', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
166
|
SdPagination.style = sdPaginationCss();
|
|
@@ -215,9 +215,9 @@ const SdTbody = class {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
render() {
|
|
218
|
-
return (index.h(index.Host, { key: '
|
|
218
|
+
return (index.h(index.Host, { key: 'b35f308e703fd3240f8c8dc30bc04432a213fb14', slot: `${this.tableId}-body` }, index.h("tbody", { key: 'b43c4347f84f13b9babad33ba841ffc18630ac55', class: { tbody: true } }, [
|
|
219
219
|
this.topSpacerHeight > 0 && (index.h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
|
|
220
|
-
index.h("slot", { key: '
|
|
220
|
+
index.h("slot", { key: 'ac0cbfc76b8c38743f73e38c584459176c2a5b94' }),
|
|
221
221
|
this.bottomSpacerHeight > 0 && (index.h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
|
|
222
222
|
])));
|
|
223
223
|
}
|
|
@@ -392,16 +392,16 @@ const SdThead = class {
|
|
|
392
392
|
'--table-border-color': sdTable_config.TABLE_BORDER.color,
|
|
393
393
|
'--table-border-width': `${sdTable_config.TABLE_BORDER.width}px`,
|
|
394
394
|
};
|
|
395
|
-
return (index.h(index.Host, { key: '
|
|
395
|
+
return (index.h(index.Host, { key: 'aa5409734259c4c9dce1be6808a622e1dad8e577', slot: `${this.tableId}-head`, style: headStyle }, index.h("thead", { key: '4c8aac4d2b9a0f9288abb67a03bd2c47510af676', class: {
|
|
396
396
|
'thead': true,
|
|
397
397
|
'thead--sticky': this._stickyHeader,
|
|
398
|
-
} }, index.h("tr", { key: '
|
|
398
|
+
} }, index.h("tr", { key: 'be0af465f9406a898649bb0cea1b1972fc131a9b', class: "tr" }, this._selectable && (index.h("th", { key: '72a763c4116dc03c372131629d64a92d9f338b65', class: {
|
|
399
399
|
'th': true,
|
|
400
400
|
'th--selected': true,
|
|
401
401
|
'sticky-left': true,
|
|
402
402
|
'sticky-left-edge': stickyLeftCount === 0,
|
|
403
403
|
'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
|
|
404
|
-
}, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: '
|
|
404
|
+
}, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: '2076f3b5a6baef3b6c1cfa6bab96953144f8a669', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), index.h("div", { key: '39dd8464081671945828859cec50862b1979de36', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (index.h("th", { key: col.name, class: {
|
|
405
405
|
'th': true,
|
|
406
406
|
[`${col.thClass}`]: Boolean(col.thClass),
|
|
407
407
|
'sticky-left': true,
|
|
@@ -29,10 +29,10 @@ const SdPopover = class {
|
|
|
29
29
|
disabled = false;
|
|
30
30
|
type = 'button';
|
|
31
31
|
menuTitle;
|
|
32
|
-
messages = [];
|
|
33
32
|
leftLink;
|
|
34
33
|
button;
|
|
35
34
|
menuClass = '';
|
|
35
|
+
slotContentHTML = '';
|
|
36
36
|
showChange;
|
|
37
37
|
buttonEl;
|
|
38
38
|
setShow = (next) => {
|
|
@@ -54,27 +54,30 @@ const SdPopover = class {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
handleClose = () => this.setShow(false);
|
|
57
|
+
componentWillLoad() {
|
|
58
|
+
this.slotContentHTML = this.el.innerHTML;
|
|
59
|
+
this.el.innerHTML = '';
|
|
60
|
+
}
|
|
57
61
|
render() {
|
|
58
62
|
const placement = this.placement ?? 'bottom';
|
|
59
63
|
const color = this.color ?? '#01BB4B';
|
|
60
64
|
const icon = this.icon ?? 'helpOutline';
|
|
61
65
|
const iconSize = this.iconSize ?? 12;
|
|
62
66
|
const menuClass = this.menuClass ?? '';
|
|
63
|
-
const messages = Array.isArray(this.messages) ? this.messages : [];
|
|
64
67
|
const leftLink = this.leftLink;
|
|
65
68
|
const button = this.button;
|
|
66
69
|
const hasFooter = !!leftLink || !!button;
|
|
67
|
-
return (index.h(index.Fragment, { key: '
|
|
70
|
+
return (index.h(index.Fragment, { key: '3eb48b91ccf49d78cf332bf2c83268ca903be3ef' }, this.label !== '' ? (index.h("sd-button", { ref: el => (this.buttonEl = el), name: this.name ?? 'primary_sm', label: this.label, icon: icon, rightIcon: this.rightIcon, ariaLabel: this.ariaLabel || this.label || icon || 'Open popover', disabled: this.disabled, type: this.type ?? 'button', class: "sd-popover", onSdClick: () => this.setShow(!this.show) })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: iconSize, color: color, class: "sd-popover", onClick: () => this.setShow(!this.show) })), this.show && (index.h("sd-floating-portal", { key: '94c0b1d56307b29944d078d03bdd686c3eacaee0', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.popoverOffset }, index.h("div", { key: '3f969dcad5785973e80cab6090e8b687461bbbe2', class: {
|
|
68
71
|
'sd-floating-menu': true,
|
|
69
72
|
'sd-floating-menu--popover': true,
|
|
70
73
|
[`sd-floating-menu--${placement}`]: true,
|
|
71
74
|
[menuClass]: menuClass !== '',
|
|
72
75
|
}, style: {
|
|
73
76
|
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
74
|
-
} }, index.h("i", { key: '
|
|
77
|
+
} }, index.h("i", { key: '3992cc7f589dc932c59a9bd88376b93e66e37cd0', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, index.h(tooltipArrow.TooltipArrow, { key: 'b2d27b5131e022d3d22a82cccf9cd80afc414194' })), index.h("div", { key: '48b33b11d8179e51fe4b3f0fbc24084d197b5447', class: "sd-floating-menu__content" }, this.menuTitle && index.h("div", { key: 'b955fb4707b66d003414197254a165388ceafb11', class: "sd-floating-menu__title" }, this.menuTitle), this.slotContentHTML && (index.h("div", { key: 'c5416ab9a7f4f0bcda01af31304e4358f25ff6e2', class: "sd-floating-menu__messages", innerHTML: this.slotContentHTML })), hasFooter && (index.h("div", { key: '51db3b7a70e4f1befc49b7ee26422a634a38d9e1', class: {
|
|
75
78
|
'sd-floating-menu__buttons': true,
|
|
76
79
|
'sd-floating-menu__buttons--with-link': !!leftLink,
|
|
77
|
-
} }, leftLink && (index.h("sd-text-link", { key: '
|
|
80
|
+
} }, leftLink && (index.h("sd-text-link", { key: 'a2a164fa9ab3294c0b0e726c7c69405a612de264', class: "sd-floating-menu__left-link", label: leftLink.label, icon: leftLink.icon ?? '', iconColor: leftLink.iconColor ?? '', useArrow: !!leftLink.useArrow, underline: !!leftLink.underline, disabled: !!leftLink.disabled, onSdClick: leftLink.onClick })), button && (index.h("sd-button", { key: '41c917026e1255ac2bd355042500c6efa0e76cb0', name: button.name ?? 'secondary_xs', label: button.label, icon: button.icon, rightIcon: button.rightIcon, ariaLabel: button.ariaLabel || button.label || button.icon || 'Open popover', disabled: button.disabled, type: button.type, onSdClick: button.onClick }))))), index.h("sd-ghost-button", { key: 'dde5bbb7bc8b9b5ce6b122eb566ce961dd640ad0', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xs", onClick: this.handleClose }))))));
|
|
78
81
|
}
|
|
79
82
|
};
|
|
80
83
|
SdPopover.style = sdPopoverCss();
|
|
@@ -105,7 +105,7 @@ const SdPopup = class {
|
|
|
105
105
|
...DEFAULT_SUBMIT_BUTTON_PROPS,
|
|
106
106
|
...this.submitButtonProps,
|
|
107
107
|
};
|
|
108
|
-
return (index.h("div", { key: '
|
|
108
|
+
return (index.h("div", { key: '53c0cca8c1188f36569ffaf79767fe81f9a5bf87', class: `sd-popup sd-popup--${this.type}`, style: cssVars }, index.h("header", { key: 'f8459d43d2568e1f8fbcb19f789ba2a9998db8e7', class: "sd-popup__header" }, index.h("h2", { key: '56b960c73d215e4ce878007acd0b04e1371ee87b', class: "sd-popup__title" }, this.popupTitle)), index.h("div", { key: '513de018b9826c54672bdc8019447b3026fb2d9f', class: "sd-popup__body" }, index.h("slot", { key: '60109bc7ee30ac100a08285e50d24027e6bc22d0' })), this.useFooter && (index.h("footer", { key: '4daa5fa938f2d79b2ab4d13de1d6aeb0b02d78e1', class: "sd-popup__footer" }, index.h("div", { key: '6f885be6acb363054c659f7f844558b9bda1ca74', class: "sd-popup__footer-slot sd-popup__footer-slot--left" }, index.h("slot", { key: '57231c78bb0512407323c8ef16a90011027abbc4', name: "footer-left" })), index.h("sd-button", { key: 'ce4c1e577d4b3346d368e22ce713ccc57f54f231', ...submitButtonProps, class: "sd-popup__submit", onSdClick: () => this.submit.emit() })))));
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
SdPopup.style = sdPopupCss();
|
|
@@ -79,7 +79,7 @@ const SdSelectListItem = class {
|
|
|
79
79
|
return (
|
|
80
80
|
// 키보드 네비게이션은 부모 listbox 의 ArrowUp/Down + Enter 가 담당. 항목 자체는 role=option, tabindex=-1 으로 표시.
|
|
81
81
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
82
|
-
index.h("div", { key: '
|
|
82
|
+
index.h("div", { key: 'd1030a5fb5797ea6be89f6a3a32201145e5fa387', role: "option", tabindex: -1, "aria-selected": this.isSelected === true ? 'true' : 'false', class: {
|
|
83
83
|
'sd-select-list-item': true,
|
|
84
84
|
'sd-select-list-item--group': isGroup,
|
|
85
85
|
'sd-select-list-item--depth1-group': isDepth1Group,
|
|
@@ -89,7 +89,7 @@ const SdSelectListItem = class {
|
|
|
89
89
|
'sd-select-list-item--focused': this.isFocused,
|
|
90
90
|
'sd-select-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
91
91
|
'sd-select-list-item--disabled': !!this.option.disabled,
|
|
92
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (index.h("sd-checkbox", { key: '
|
|
92
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (index.h("sd-checkbox", { key: '1f8a7812f567ece12b7e064a9e9738366b0a0e11', 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 })), index.h("span", { key: '55e2e4c9497aea99fc0502b40ac16809c257206e', class: "sd-select-list-item__label" }, this.option.label), this.countInfo && (index.h("span", { key: '722599bf0022770c91c02d4e67a6e234da4e0f80', class: "sd-select-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
SdSelectListItem.style = sdSelectListItemCss();
|
|
@@ -142,15 +142,15 @@ const SdSelectListItemSearch = class {
|
|
|
142
142
|
clearTimeout(this.debounceTimer);
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
|
-
return (index.h("div", { key: '
|
|
145
|
+
return (index.h("div", { key: '69416e32b3915ca27d8e2f25a7f36d1868835696', class: {
|
|
146
146
|
'sd-select-list-item-search': true,
|
|
147
147
|
'sd-select-list-item-search--scrolled': this.isScrolled,
|
|
148
|
-
} }, index.h("div", { key: '
|
|
148
|
+
} }, index.h("div", { key: '3917460421d197d70abc7b6b9c75fa85ce9e6631', class: "sd-select-list-item-search__inner" }, index.h("sd-icon", { key: '42a0d8221d2479457af32db35111bb35d7a28e53', name: "search", size: 16, color: "grey_70", class: "sd-select-list-item-search__icon" }), index.h("input", { key: '48ab6ef174ddf194aa2616d0cbfbc09fa2032222', ref: el => {
|
|
149
149
|
this.inputEl = el;
|
|
150
|
-
}, 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() }), index.h("button", { key: '
|
|
150
|
+
}, 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() }), index.h("button", { key: 'ead5c189a8ef2b8cb3696cc6536c58dd4864c71e', type: "button", class: {
|
|
151
151
|
'sd-select-list-item-search__clear': true,
|
|
152
152
|
'sd-select-list-item-search__clear--hidden': this.searchText === '',
|
|
153
|
-
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, index.h("sd-icon", { key: '
|
|
153
|
+
}, onClick: this.handleClear, tabindex: this.searchText !== '' ? 0 : -1, "aria-hidden": this.searchText !== '' ? 'false' : 'true' }, index.h("sd-icon", { key: '6590c0acd5114722126459f4886c587b320a17e1', name: "close", size: 12, color: "#888888" })))));
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
SdSelectListItemSearch.style = sdSelectListItemSearchCss();
|
|
@@ -265,15 +265,15 @@ const SdSelect = class {
|
|
|
265
265
|
this.closeDropdown();
|
|
266
266
|
},
|
|
267
267
|
};
|
|
268
|
-
return (index.h("sd-field", { key: '
|
|
268
|
+
return (index.h("sd-field", { key: '08992d05403b6e7ba6aec7968dd6fa99d8857666', 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: () => {
|
|
269
269
|
this.hovered = true;
|
|
270
270
|
}, onMouseLeave: () => {
|
|
271
271
|
this.hovered = false;
|
|
272
|
-
} }, index.h("div", { key: '
|
|
272
|
+
} }, index.h("div", { key: '3372029d54087654b8172d4d374126c0be703f5c', class: "sd-select", ref: el => {
|
|
273
273
|
this.triggerRef = el;
|
|
274
|
-
} }, index.h("sd-select-trigger", { key: '
|
|
274
|
+
} }, index.h("sd-select-trigger", { key: 'af832319b490501468b05da69eeed964a07f00ea', ref: el => {
|
|
275
275
|
this.triggerComponentRef = el;
|
|
276
|
-
}, 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) && (index.h("sd-portal", { key: '
|
|
276
|
+
}, 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) && (index.h("sd-portal", { key: 'b6b9211aadd5ef643716948dfa67d6d923420679', ...portalProps }, index.h("sd-select-listbox", { key: '9d532180439c8d1867e349d89914626b644ac224', 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) })))));
|
|
277
277
|
}
|
|
278
278
|
static get watchers() { return {
|
|
279
279
|
"isOpen": [{
|
|
@@ -637,9 +637,9 @@ const SdSelectListbox = class {
|
|
|
637
637
|
'--listbox-max-height': this.maxHeight ?? '260px',
|
|
638
638
|
'--listbox-radius': `${sdSelect_config.LIST_BOX_LAYOUT.radius}px`,
|
|
639
639
|
};
|
|
640
|
-
return (index.h("div", { key: '
|
|
640
|
+
return (index.h("div", { key: 'f2b243788074de1aa3e78a78566a622ab3116351', class: "sd-select-listbox", style: cssVars }, this.showSearch && (index.h("sd-select-list-item-search", { key: 'a9f9f30a43e1965756095e29a24f75b4f1c14100', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), index.h("div", { key: 'b500f705a69e2c98e3ad79bf04c2bb2a4b8a6162', class: "sd-select-listbox__list", onScroll: this.handleScroll, ref: el => {
|
|
641
641
|
this.listEl = el;
|
|
642
|
-
} }, this.showSelectAll && (index.h("sd-select-list-item", { key: '
|
|
642
|
+
} }, this.showSelectAll && (index.h("sd-select-list-item", { key: 'c47e41ebce483ee311cae261b2f4fe21c134e437', 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 ? (index.h("div", { class: "sd-select-listbox__empty" }, sdSelect_config.EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (index.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) })))))));
|
|
643
643
|
}
|
|
644
644
|
static get watchers() { return {
|
|
645
645
|
"searchKeyword": [{
|
|
@@ -699,7 +699,7 @@ const SdSelectTrigger = class {
|
|
|
699
699
|
? sdSelect_config.SELECT_COLORS.icon.disabled
|
|
700
700
|
: sdSelect_config.SELECT_COLORS.icon.default,
|
|
701
701
|
};
|
|
702
|
-
return (index.h("div", { key: '
|
|
702
|
+
return (index.h("div", { key: '471e6df2948987989fa192474b0305ad0c8bcd32', ref: el => {
|
|
703
703
|
this.triggerEl = el;
|
|
704
704
|
}, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
|
|
705
705
|
'sd-select-trigger': true,
|
|
@@ -710,7 +710,7 @@ const SdSelectTrigger = class {
|
|
|
710
710
|
e.preventDefault();
|
|
711
711
|
this.handleClick();
|
|
712
712
|
}
|
|
713
|
-
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("div", { key: '
|
|
713
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, index.h("div", { key: '8133b44065cd4a27d6aa71980c8684c363c7e7ba', class: "sd-select-trigger__content" }, index.h("span", { key: 'd8ee3d118cf760b687b491387592efe0c7532cf2', class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택')), index.h("sd-icon", { key: '0271061d32f1236346812a21a2e483402a94415c', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
714
714
|
'sd-select-trigger__icon': true,
|
|
715
715
|
'sd-select-trigger__icon--open': this.isOpen,
|
|
716
716
|
} }))));
|
|
@@ -102,7 +102,7 @@ const SdSwitch = class {
|
|
|
102
102
|
'--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
|
|
103
103
|
'--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
|
|
104
104
|
};
|
|
105
|
-
return (index.h("label", { key: '
|
|
105
|
+
return (index.h("label", { key: 'b5dc0e7a9a59d679402226aa18f3155e42f6b7c2', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, index.h("input", { key: 'aa77eb38e07dfc911eb3a72c3ab3b3287423deaa', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), index.h("div", { key: 'b973671f6229fea3aab8d4040cc2916e32001eaf', class: "sd-switch__track" }, index.h("div", { key: 'db6073df05c1d77681559490fd773fdce24c6ca4', class: "sd-switch__knob" })), this.label && index.h("span", { key: '8ee1f5ba9fc1561a351d6982929721cc33ce0650', class: "sd-switch__label" }, this.label)));
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
SdSwitch.style = sdSwitchCss();
|
|
@@ -842,25 +842,25 @@ const SdTable = class {
|
|
|
842
842
|
'--table-body-text-decoration': sdTable_config.TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
843
843
|
'--table-selectable-width': `${sdTable_config.TABLE_SELECTABLE_COLUMN_WIDTH}px`,
|
|
844
844
|
};
|
|
845
|
-
return (index.h(index.Host, { key: '
|
|
845
|
+
return (index.h(index.Host, { key: '73046beb47b356f351ae89b162c8e8af2942b0b2', style: hostStyle }, index.h("div", { key: 'f56b8a425d15a3598e6c1f3373d21ef263cbd800', class: "sd-table__container", style: {
|
|
846
846
|
'--table-width': this.width,
|
|
847
847
|
'--table-height': effectiveTableHeight,
|
|
848
848
|
'--table-container-height': `calc(${effectiveTableHeight} - ${paginationHeight}px)`,
|
|
849
|
-
} }, index.h("div", { key: '
|
|
849
|
+
} }, index.h("div", { key: '519a193ab21616ce0a423c9043e0114c489539f3', class: {
|
|
850
850
|
'sd-table__wrapper': true,
|
|
851
851
|
'sd-table__wrapper--use-top': this.useTop,
|
|
852
|
-
} }, index.h("div", { key: '
|
|
852
|
+
} }, index.h("div", { key: 'ef96c9e2ef6b70023c35e5709048f3d994a5bebc', class: {
|
|
853
853
|
'sd-table__scroll-container': true,
|
|
854
854
|
'sd-table__scroll-container--loading': this.isLoading,
|
|
855
855
|
'sd-table__scroll-container--no-data': isNoData,
|
|
856
|
-
} }, this.isLoading && (index.h("div", { key: '
|
|
856
|
+
} }, this.isLoading && (index.h("div", { key: '94f9bbc56855af3548a73ccbbf228b2247764f54', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, index.h("sd-circle-progress", { key: '2f8a0bfbc0c5829779b7474a9520ddec70a977ea', indeterminate: true }))), isNoData && (index.h(index.h.Fragment, null, index.h("div", { key: 'fab3d44147ecbc99ff3745908ec69da003b4e7cf', class: "sd-table__no-data-header-overlay" }), index.h("div", { key: '10f8b13e6bba12c80001e5d4432715b0abe2f2f2', class: "sd-table__no-data" }, index.h("div", { key: '8c411450fc0780df83e69c86ad06c2d09cf80350', class: "sd-table__no-data-content", ref: el => {
|
|
857
857
|
this.noDataContentEl = el;
|
|
858
858
|
if (el)
|
|
859
859
|
this.syncNoDataContentObserver();
|
|
860
|
-
} }, index.h("slot", { key: '
|
|
860
|
+
} }, index.h("slot", { key: '661b982cde4f4a6dfa9f6c712efed6745e20f3bf', name: "no-data" }, index.h("span", { key: '76330839b2614611266315bb8b482b6a8571f1f4' }, this.resolvedNoDataLabel)))))), index.h("table", { key: '89d9f80c6a0c9963b311d2c121ae0cb0a3289da0', class: this.tableClasses }, this.autoThead ? (index.h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, index.h("sd-thead", { rows: this.rows ?? [] }))) : (index.h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (index.h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, index.h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (index.h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
|
|
861
861
|
this.pagination.rowsPerPage > 0 &&
|
|
862
862
|
this.rowCount > 0 &&
|
|
863
|
-
!this.useVirtualScroll && (index.h("div", { key: '
|
|
863
|
+
!this.useVirtualScroll && (index.h("div", { key: '02e675535bbdc30ab7177378f1b2b13799a9e5c8', class: "sd-table__pagination" }, index.h("sd-pagination", { key: '83537d5e2f6d5b92e2a4b7dd9e4624372adf0433', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (index.h("sd-select", { key: 'f843f063b736e534b017fd7f881f049c4258c792', value: this.useInternalPagination
|
|
864
864
|
? this.innerRowsPerPage
|
|
865
865
|
: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
|
|
866
866
|
if (!this.isRowsPerPageValue(e.detail))
|
|
@@ -188,7 +188,7 @@ const SdTabs = class {
|
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
render() {
|
|
191
|
-
return (index.h("div", { key: '
|
|
191
|
+
return (index.h("div", { key: '880f1aa80c29f2d578ffe2d5e5e5e0c008c898d3', class: this.getContainerClasses(), style: this.buildCssVars() }, this.tabs.map((tab, index$1) => {
|
|
192
192
|
const badgeName = this.getBadgeName(tab);
|
|
193
193
|
return (index.h("div", { key: `tab-${index$1}`, 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 => {
|
|
194
194
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -158,7 +158,7 @@ const SdTd = class {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
return (index.h(index.Host, { key: '
|
|
161
|
+
return (index.h(index.Host, { key: '5c40fa3dd98dbd88850bd14836ee5578ceb04349', class: { [`align-${this.align}`]: Boolean(this.align) } }, index.h("slot", { key: '864b000e178c0b6de25b930aa5a84b4f7d7c189b' })));
|
|
162
162
|
}
|
|
163
163
|
static get watchers() { return {
|
|
164
164
|
"field": [{
|
|
@@ -234,7 +234,7 @@ const SdToastContainer = class {
|
|
|
234
234
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
235
235
|
const indexMap = new Map();
|
|
236
236
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
237
|
-
return (index.h("div", { key: '
|
|
237
|
+
return (index.h("div", { key: 'bc3c9591b6453eed7df462841e29784c29b3aeef', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
238
238
|
this.expanded = true;
|
|
239
239
|
this.pauseTimers();
|
|
240
240
|
}, onMouseLeave: () => {
|
|
@@ -84,12 +84,12 @@ const SdToast = class {
|
|
|
84
84
|
const linkColor = typeConfig.linkColor ?? typeConfig.content;
|
|
85
85
|
const useDefaultCloseIntent = ['default', 'caution', 'info'].includes(this.type);
|
|
86
86
|
const buttonName = TOAST_BUTTON_NAME_BY_TYPE[this.type] ?? TOAST_BUTTON_NAME_BY_TYPE.default;
|
|
87
|
-
return (index.h("div", { key: '
|
|
87
|
+
return (index.h("div", { key: 'db3ffaf51dc96c39c05558017f25929c679a59df', style: {
|
|
88
88
|
'--sd-toast-bg': typeConfig.bg,
|
|
89
89
|
'--sd-toast-text': typeConfig.content,
|
|
90
90
|
'--sd-toast-icon': iconColor,
|
|
91
91
|
'--sd-toast-link': linkColor,
|
|
92
|
-
} }, index.h("div", { key: '
|
|
92
|
+
} }, index.h("div", { key: '92344f5bb95b0d4787591207f2e017d7dd177091', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (index.h("div", { key: '991db58b2cb019dd3a787e000e9d8813014bbb09', class: "sd-toast__icon" }, index.h("sd-icon", { key: '24d53cd77fdea82ec07663a8968493ec2b794751', name: this.icon, size: iconSize, color: iconColor }))), index.h("div", { key: '70cfad4ef389cca798be9baeac99bfc41efcc615', class: "sd-toast__content" }, index.h("span", { key: '5927023435b17dc25ee07630fc4ae4568aadd9b9', class: "sd-toast__message" }, this.message)), this.link && (index.h("a", { key: '410c024fd81ebcc78175c1855a86f590566d1a81', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.buttonLabel && (index.h("sd-button", { key: 'd85287e7ef796a11f850a0ce5cde87f5881fa5c9', class: "sd-toast__button", name: buttonName, label: this.buttonLabel, onSdClick: (event) => this.buttonClick.emit(event.detail) })), this.useClose && (index.h("sd-ghost-button", { key: '55a6bf6457bd89254f6eb01072d46a0edbb8b510', class: "sd-toast__close", icon: "close", intent: useDefaultCloseIntent ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
SdToast.style = sdToastCss();
|
|
@@ -120,7 +120,7 @@ const SdToggle = class {
|
|
|
120
120
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
121
121
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
122
122
|
};
|
|
123
|
-
return (index.h("label", { key: '
|
|
123
|
+
return (index.h("label", { key: 'b16577aa25863a9dc337314d9059328799c1cd1e', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, index.h("input", { key: '6130825b74df8a573f4e062671fd694508759e82', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
SdToggle.style = sdToggleCss();
|
|
@@ -11,7 +11,7 @@ export class SdChip {
|
|
|
11
11
|
internalValue = '';
|
|
12
12
|
isEditing = false;
|
|
13
13
|
update;
|
|
14
|
-
|
|
14
|
+
delete;
|
|
15
15
|
focus;
|
|
16
16
|
blur;
|
|
17
17
|
inputEl;
|
|
@@ -145,7 +145,7 @@ export class SdChip {
|
|
|
145
145
|
event.stopPropagation();
|
|
146
146
|
if (this.disabled)
|
|
147
147
|
return;
|
|
148
|
-
this.
|
|
148
|
+
this.delete.emit();
|
|
149
149
|
};
|
|
150
150
|
syncInputValue(value) {
|
|
151
151
|
if (!this.inputEl)
|
|
@@ -378,7 +378,7 @@ export class SdChip {
|
|
|
378
378
|
"references": {}
|
|
379
379
|
}
|
|
380
380
|
}, {
|
|
381
|
-
"method": "
|
|
381
|
+
"method": "delete",
|
|
382
382
|
"name": "sdRemove",
|
|
383
383
|
"bubbles": true,
|
|
384
384
|
"cancelable": true,
|
|
@@ -7,7 +7,7 @@ export class SdDivider {
|
|
|
7
7
|
const hostStyle = {
|
|
8
8
|
'--sd-divider-color': DIVIDER_COLORS.default,
|
|
9
9
|
};
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '3b3c22b1c5bf2d1bfa52c136113719e26b2e6767', style: hostStyle }, h("hr", { key: '4eca9f280e452330a2f57b03466e00f04688ad06', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "sd-divider"; }
|
|
13
13
|
static get originalStyleUrls() {
|
|
@@ -185,7 +185,8 @@ export class SdField {
|
|
|
185
185
|
: {} }, h("div", { key: '1f3c5f2009a0d96b8a3544c58b96f7ecc4ddee6b', class: {
|
|
186
186
|
'sd-field__control': true,
|
|
187
187
|
'sd-field__control--has-addon': addon !== '',
|
|
188
|
-
} }, addon && h("div", { key: '
|
|
188
|
+
} }, addon && (h("div", { key: 'e4f180f0183267ea99e2b8b65b6e4cd769a47946', class: "sd-field__addon" }, this.icon && (h("sd-icon", { key: 'c5503a823d8c5534abd27dc59bbd399702a07283', name: this.icon.name, size: this.icon.size ??
|
|
189
|
+
Number(FIELD_LABEL_SIZE_MAP[(this.size in FIELD_LABEL_SIZE_MAP ? this.size : 'sm')].icon), color: this.icon.color, rotate: this.icon.rotate })), addon)), h("slot", { key: '8b8bd230703e0b1e45eab3a5334dbdbb55fae8c9' })), this.errorMsg !== '' || this.errorMessage !== '' ? (h("div", { class: "sd-field__error-message" }, this.errorMsg !== '' ? this.errorMsg : this.errorMessage)) : (this.hint !== '' && h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
189
190
|
}
|
|
190
191
|
renderLabel(label) {
|
|
191
192
|
if (label == null || label === '')
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
sd-file-picker {
|
|
2
|
-
display:
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sd-file-picker__wrapper {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
3
10
|
width: 100%;
|
|
4
11
|
}
|
|
5
12
|
|
|
13
|
+
.sd-file-picker__chip-list {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
margin-top: 8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
6
20
|
.sd-file-picker__content {
|
|
7
21
|
width: 100%;
|
|
8
22
|
height: 100%;
|
|
@@ -65,11 +65,11 @@ export class SdFilePicker {
|
|
|
65
65
|
return undefined;
|
|
66
66
|
return typeof value === 'string' ? Number(value) : value;
|
|
67
67
|
}
|
|
68
|
-
validateFiles(files) {
|
|
68
|
+
validateFiles(files, existingCount = 0) {
|
|
69
69
|
const maxFileSize = this.toBytes(this.maxFileSize);
|
|
70
70
|
const maxTotalSize = this.toBytes(this.maxTotalSize);
|
|
71
71
|
const maxFiles = this.maxFiles != null ? Number(this.maxFiles) : undefined;
|
|
72
|
-
if (maxFiles != null && files.length > maxFiles) {
|
|
72
|
+
if (maxFiles != null && existingCount + files.length > maxFiles) {
|
|
73
73
|
return { accepted: [], rejected: files, reason: 'max-files' };
|
|
74
74
|
}
|
|
75
75
|
if (maxFileSize != null) {
|
|
@@ -93,22 +93,34 @@ export class SdFilePicker {
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
const fileArray = Array.from(files);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
if (this.multiple) {
|
|
97
|
+
const existing = Array.isArray(this.internalValue) ? this.internalValue : [];
|
|
98
|
+
const { accepted, rejected, reason } = this.validateFiles(fileArray, existing.length);
|
|
99
99
|
if (this.fileInputRef) {
|
|
100
100
|
this.fileInputRef.value = '';
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
if (reason != null) {
|
|
103
|
+
this.reject?.emit({ files: rejected, reason });
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const merged = [...existing, ...accepted];
|
|
107
|
+
this.internalValue = merged;
|
|
108
|
+
this.value = merged;
|
|
109
|
+
this.update?.emit(this.value);
|
|
106
110
|
}
|
|
107
111
|
else {
|
|
112
|
+
const { accepted, rejected, reason } = this.validateFiles(fileArray);
|
|
113
|
+
if (reason != null) {
|
|
114
|
+
this.reject?.emit({ files: rejected, reason });
|
|
115
|
+
if (this.fileInputRef) {
|
|
116
|
+
this.fileInputRef.value = '';
|
|
117
|
+
}
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
108
120
|
this.internalValue = accepted[0];
|
|
121
|
+
this.value = this.internalValue;
|
|
122
|
+
this.update?.emit(this.value);
|
|
109
123
|
}
|
|
110
|
-
this.value = this.internalValue;
|
|
111
|
-
this.update?.emit(this.value);
|
|
112
124
|
};
|
|
113
125
|
handleClear = (event) => {
|
|
114
126
|
if (this.disabled)
|
|
@@ -128,6 +140,8 @@ export class SdFilePicker {
|
|
|
128
140
|
this.fileInputRef?.click();
|
|
129
141
|
};
|
|
130
142
|
hasFiles() {
|
|
143
|
+
if (this.multiple)
|
|
144
|
+
return false;
|
|
131
145
|
if (!this.internalValue)
|
|
132
146
|
return false;
|
|
133
147
|
if (Array.isArray(this.internalValue)) {
|
|
@@ -135,14 +149,28 @@ export class SdFilePicker {
|
|
|
135
149
|
}
|
|
136
150
|
return true;
|
|
137
151
|
}
|
|
152
|
+
hasChips() {
|
|
153
|
+
return Array.isArray(this.internalValue) && this.internalValue.length > 0;
|
|
154
|
+
}
|
|
138
155
|
getDisplayText() {
|
|
139
156
|
if (!this.hasFiles())
|
|
140
157
|
return this.placeholder ?? 'Click to upload';
|
|
141
|
-
if (Array.isArray(this.internalValue)) {
|
|
142
|
-
return this.internalValue.map(f => f.name).join(', ');
|
|
143
|
-
}
|
|
144
158
|
return this.internalValue?.name || (this.placeholder ?? 'Click to upload');
|
|
145
159
|
}
|
|
160
|
+
handleChipRemove = (index) => {
|
|
161
|
+
if (!Array.isArray(this.internalValue))
|
|
162
|
+
return;
|
|
163
|
+
const newFiles = [...this.internalValue];
|
|
164
|
+
newFiles.splice(index, 1);
|
|
165
|
+
this.internalValue = newFiles;
|
|
166
|
+
this.value = newFiles;
|
|
167
|
+
this.update?.emit(this.value);
|
|
168
|
+
};
|
|
169
|
+
renderChipList() {
|
|
170
|
+
if (!this.hasChips())
|
|
171
|
+
return null;
|
|
172
|
+
return (h("div", { class: "sd-file-picker__chip-list" }, this.internalValue.map((file, index) => (h("sd-chip", { value: file.name, onSdRemove: () => this.handleChipRemove(index) })))));
|
|
173
|
+
}
|
|
146
174
|
checkOverflow() {
|
|
147
175
|
if (!this.fileNamesRef)
|
|
148
176
|
return;
|
|
@@ -182,9 +210,9 @@ export class SdFilePicker {
|
|
|
182
210
|
return (h("div", { class: {
|
|
183
211
|
'sd-file-picker--inline': true,
|
|
184
212
|
'sd-file-picker--inline-disabled': this.disabled,
|
|
185
|
-
}, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content));
|
|
213
|
+
}, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content, this.renderChipList()));
|
|
186
214
|
}
|
|
187
|
-
return (h("sd-field", { name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false)
|
|
215
|
+
return (h("div", { class: "sd-file-picker__wrapper", style: cssVars }, h("sd-field", { name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content), this.renderChipList()));
|
|
188
216
|
}
|
|
189
217
|
static get is() { return "sd-file-picker"; }
|
|
190
218
|
static get originalStyleUrls() {
|
|
@@ -153,7 +153,7 @@ export class SdFloatingPopover {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
render() {
|
|
156
|
-
return h("slot", { key: '
|
|
156
|
+
return h("slot", { key: 'b1514fc54df3e304cfb53b824df96431fa815a6e' });
|
|
157
157
|
}
|
|
158
158
|
static get is() { return "sd-floating-portal"; }
|
|
159
159
|
static get originalStyleUrls() {
|
|
@@ -112,12 +112,12 @@ export class SdInput {
|
|
|
112
112
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
113
113
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
114
114
|
};
|
|
115
|
-
return (h("sd-field", { key: '
|
|
115
|
+
return (h("sd-field", { key: '44bf19bfbe047e00eb02530a4f9c9eac37d9f0fb', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, readonly: this.readonly, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("label", { key: '2f610f980107fc552554b9415d878a7b8464e460', class: "sd-input__content" }, h("slot", { key: 'da4fa13a9f4c8e5cabb238743b74dbc216cf3d27', name: "prefix" }), h("input", { key: 'dd4fc95ef5136348e764552fb8847a7fedf6fd42', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : (this.type ?? 'text'), value: this.internalValue || '', placeholder: this.placeholder ?? '입력해 주세요.', disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), h("slot", { key: 'ab2403fafd7eecf37bc03b0147025b06154230a7', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && !this.readonly && (h("sd-ghost-button", { key: '7b6ca184d3c08fc160556abf135939d1e8064b98', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
116
116
|
if (this.disabled || this.readonly)
|
|
117
117
|
return;
|
|
118
118
|
this.internalValue = '';
|
|
119
119
|
await this.formField?.sdValidate();
|
|
120
|
-
} })), this.type === 'password' && (h("sd-ghost-button", { key: '
|
|
120
|
+
} })), this.type === 'password' && (h("sd-ghost-button", { key: '52b5a72f6140b441ea971330594749208e302597', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled || this.readonly, class: "sd-input__password-icon", onClick: () => {
|
|
121
121
|
if (this.disabled || this.readonly)
|
|
122
122
|
return;
|
|
123
123
|
this.passwordVisible = !this.passwordVisible;
|