@sellmate/design-system 1.0.37 → 1.0.38
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 +124 -19
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/{sd-button-v2.cjs.entry.js → sd-button-v2_2.cjs.entry.js} +184 -2
- package/dist/cjs/{sd-button_21.cjs.entry.js → sd-button_20.cjs.entry.js} +34 -77
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +199 -0
- package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +3 -3
- package/dist/cjs/sd-file-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-modal-container.cjs.entry.js +263 -0
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2-list-item_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-select-v2-listbox_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-v2.cjs.entry.js +2 -1
- package/dist/cjs/sd-tabs.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-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +2 -2
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.config.js +17 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +67 -0
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +384 -0
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +4 -4
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.js +3 -3
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +3 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-guide/sd-guide.js +2 -2
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +1 -1
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-modal-container/sd-modal-container.config.js +1 -0
- package/dist/collection/components/sd-modal-container/sd-modal-container.css +58 -0
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +399 -0
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.config.js +3 -0
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.css +61 -0
- package/dist/collection/components/sd-notice-modal/sd-notice-modal.js +324 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button-group/sd-radio-button-group.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +3 -3
- package/dist/collection/components/sd-select/sd-select.js +1 -1
- package/dist/collection/components/sd-select-group/sd-select-group.js +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +1 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js +3 -3
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +1 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +2 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +22 -1
- package/dist/collection/components/sd-table/sd-table.js +4 -4
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- 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-toggle-button/sd-toggle-button.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/modal.js +103 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-eM9OCX16.js → p-B0wG418y.js} +1 -1
- package/dist/components/{p-CyfWQr0q.js → p-BAghib4O.js} +1 -1
- package/dist/components/{p-D8OiOEB8.js → p-BCPAPvp8.js} +1 -1
- package/dist/components/{p-Cva7D7mF.js → p-BHLuiIDM.js} +1 -1
- package/dist/components/{p-BvBroZuS.js → p-BcrOYmsG.js} +1 -1
- package/dist/components/{p-CdOU_SOg.js → p-BdjLD8BG.js} +1 -1
- package/dist/components/{p-DKcKp__V.js → p-BiCK6R-J.js} +1 -1
- package/dist/components/{p-CXoqcDFa.js → p-BzS0YntY.js} +1 -1
- package/dist/components/{p-CpfPgt7c.js → p-BzUx5X3N.js} +1 -1
- package/dist/components/{p-gnF0_mDJ.js → p-CKi7RueC.js} +1 -1
- package/dist/components/{p-CgwiT7OF.js → p-CNUx4rbY.js} +1 -1
- package/dist/components/{p-BBpn_mYj.js → p-CQfrNtCG.js} +1 -1
- package/dist/components/p-CXKpL2GZ.js +1 -0
- package/dist/components/{p-CtOFXnU0.js → p-C_3U90D_.js} +1 -1
- package/dist/components/p-C_L-UaCP.js +1 -0
- package/dist/components/p-CyJZik9T.js +1 -0
- package/dist/components/p-D23gFKrT.js +1 -0
- package/dist/components/{p-72hNB1Fw.js → p-DASdfaPf.js} +1 -1
- package/dist/components/{p-yQoaU7-d.js → p-DEBuE-pW.js} +1 -1
- package/dist/components/{p-CiHU8TZa.js → p-DEP3qjY2.js} +1 -1
- package/dist/components/{p-41grr69M.js → p-DNyoL0F-.js} +1 -1
- package/dist/components/{p-DOt_ptQc.js → p-DQhPxH3o.js} +1 -1
- package/dist/components/p-Di17TAvI.js +1 -0
- package/dist/components/{p-zUWRVubn.js → p-DjOSobI6.js} +1 -1
- package/dist/components/{p-CxT7-293.js → p-Dpi-ww3O.js} +1 -1
- package/dist/components/{p-C6uWXKpX.js → p-DyFykTJN.js} +1 -1
- package/dist/components/{p-dBp4oI6E.js → p-eZ82xLZt.js} +1 -1
- package/dist/components/{p-DkjKNMgx.js → p-iusjOpcc.js} +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-confirm-modal.d.ts +11 -0
- package/dist/components/sd-confirm-modal.js +1 -0
- package/dist/components/sd-date-picker.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-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-modal-container.d.ts +11 -0
- package/dist/components/sd-modal-container.js +1 -0
- package/dist/components/{sd-modal-card.d.ts → sd-notice-modal.d.ts} +4 -4
- package/dist/components/sd-notice-modal.js +1 -0
- 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-portal.js +1 -1
- package/dist/components/sd-progress.js +1 -1
- package/dist/components/sd-radio-button-group.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2-list-item-search.js +1 -1
- package/dist/components/sd-select-v2-list-item.js +1 -1
- package/dist/components/sd-select-v2-listbox.js +1 -1
- package/dist/components/sd-select-v2-trigger.js +1 -1
- package/dist/components/sd-select-v2.js +1 -1
- package/dist/components/sd-select.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-textarea.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-button.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/index.esm.js +1 -1
- package/dist/design-system/{p-a35adbbc.entry.js → p-021e4171.entry.js} +1 -1
- package/dist/design-system/{p-d817c235.entry.js → p-0cca5deb.entry.js} +1 -1
- package/dist/design-system/{p-5b2d9ef2.entry.js → p-12f04366.entry.js} +1 -1
- package/dist/design-system/{p-2119dddc.entry.js → p-13d4baf3.entry.js} +1 -1
- package/dist/design-system/{p-e4a19588.entry.js → p-1b80635f.entry.js} +1 -1
- package/dist/design-system/p-26fc1fc0.entry.js +1 -0
- package/dist/design-system/{p-270227ae.entry.js → p-29a60707.entry.js} +1 -1
- package/dist/design-system/{p-c4f9aeed.entry.js → p-37e9e161.entry.js} +1 -1
- package/dist/design-system/{p-b3473468.entry.js → p-6d9e16bd.entry.js} +1 -1
- package/dist/design-system/{p-a88dabbd.entry.js → p-72b09ede.entry.js} +1 -1
- package/dist/design-system/{p-fea7dbce.entry.js → p-812d7c00.entry.js} +1 -1
- package/dist/design-system/p-87a783a7.entry.js +1 -0
- package/dist/design-system/{p-97bfc75f.entry.js → p-9933475e.entry.js} +1 -1
- package/dist/design-system/{p-CdOU_SOg.js → p-BdjLD8BG.js} +1 -1
- package/dist/design-system/{p-0c2e44fb.entry.js → p-a4e87345.entry.js} +1 -1
- package/dist/design-system/{p-594dee9b.entry.js → p-acb529cb.entry.js} +1 -1
- package/dist/design-system/p-ba393cc8.entry.js +1 -0
- package/dist/design-system/p-c549e2c0.entry.js +1 -0
- package/dist/design-system/{p-1d7ea568.entry.js → p-c7c66261.entry.js} +1 -1
- package/dist/design-system/{p-2185ffaa.entry.js → p-cc837ebf.entry.js} +1 -1
- package/dist/design-system/p-d8b04e91.entry.js +1 -0
- package/dist/design-system/{p-01a7b38b.entry.js → p-e0ef7658.entry.js} +1 -1
- package/dist/design-system/{p-89578577.entry.js → p-e641f41f.entry.js} +1 -1
- package/dist/design-system/{p-93c2d29f.entry.js → p-e8fbedcd.entry.js} +1 -1
- package/dist/design-system/p-f186c0f4.entry.js +1 -0
- package/dist/design-system/p-f5460c6e.entry.js +1 -0
- package/dist/design-system/{p-a94ed4a3.entry.js → p-f7203145.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/index.js +124 -20
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/{sd-button-v2.config-CRtF2Br0.js → sd-button-v2.config-Dtf44MOf.js} +1 -1
- package/dist/esm/{sd-button-v2.entry.js → sd-button-v2_2.entry.js} +185 -4
- package/dist/esm/{sd-button_21.entry.js → sd-button_20.entry.js} +35 -77
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +196 -0
- package/dist/esm/sd-date-picker.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +4 -4
- package/dist/esm/sd-file-picker.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-modal-container.entry.js +261 -0
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-radio-button-group.entry.js +1 -1
- package/dist/esm/sd-radio-group.entry.js +1 -1
- package/dist/esm/sd-select-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple.entry.js +1 -1
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-select-v2-list-item_2.entry.js +5 -5
- package/dist/esm/sd-select-v2-listbox_2.entry.js +3 -3
- package/dist/esm/sd-select-v2.entry.js +2 -1
- package/dist/esm/sd-tabs.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-button.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +14 -0
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +31 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +45 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +27 -0
- package/dist/types/components/sd-notice-modal/sd-notice-modal.config.d.ts +5 -0
- package/dist/types/components/sd-notice-modal/sd-notice-modal.d.ts +28 -0
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +1 -0
- package/dist/types/components.d.ts +216 -56
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/modal.d.ts +12 -0
- package/hydrate/index.js +565 -112
- package/hydrate/index.mjs +565 -112
- package/package.json +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +0 -186
- package/dist/collection/components/sd-modal-card/sd-modal-card.css +0 -51
- package/dist/collection/components/sd-modal-card/sd-modal-card.js +0 -254
- package/dist/components/p-d1GtjL2y.js +0 -1
- package/dist/components/sd-modal-card.js +0 -1
- package/dist/design-system/p-35473290.entry.js +0 -1
- package/dist/design-system/p-4810e846.entry.js +0 -1
- package/dist/design-system/p-62581abe.entry.js +0 -1
- package/dist/design-system/p-687f8414.entry.js +0 -1
- package/dist/design-system/p-e7654632.entry.js +0 -1
- package/dist/design-system/p-ebee1495.entry.js +0 -1
- package/dist/esm/sd-tag.entry.js +0 -184
- package/dist/types/components/sd-modal-card/sd-modal-card.d.ts +0 -25
|
@@ -100,15 +100,15 @@ const SdFilePicker = class {
|
|
|
100
100
|
render() {
|
|
101
101
|
const hasFiles = this.hasFiles();
|
|
102
102
|
const displayText = this.getDisplayText();
|
|
103
|
-
return (index.h("div", { key: '
|
|
103
|
+
return (index.h("div", { key: '598e284933fe6dbcbd1a1f77a8f530aa22be5456', class: {
|
|
104
104
|
'sd-file-picker': true,
|
|
105
105
|
[this.getStatusClass()]: true,
|
|
106
106
|
'sd-file-picker--inline': this.inline,
|
|
107
|
-
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, index.h("input", { key: '
|
|
107
|
+
}, onClick: this.handleClick, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, index.h("input", { key: '3f84b668c107219a3acecb32c8d473f12c162e3f', ref: el => (this.fileInputRef = el), type: "file", class: "sd-file-picker__input", disabled: this.disabled, multiple: this.multiple, accept: this.accept, onInput: this.handleFileChange, "aria-label": this.placeholder }), index.h("sd-icon", { key: '0fcc77f108d858f0ede5043c4da71988e68d8bd0', name: "attachFile", size: 16, color: this.getIconColor(), class: "sd-file-picker__icon" }), index.h("div", { key: '5aeb75690a1922d765e19ada43cf7ab034f79979', ref: el => (this.fileNamesRef = el), class: {
|
|
108
108
|
'sd-file-picker__text': true,
|
|
109
109
|
'sd-file-picker__text--placeholder': !hasFiles,
|
|
110
110
|
'sd-file-picker__text--active': hasFiles,
|
|
111
|
-
} }, displayText), !this.disabled && hasFiles && (index.h("sd-icon", { key: '
|
|
111
|
+
} }, displayText), !this.disabled && hasFiles && (index.h("sd-icon", { key: '1da963ffaded05153eb72803b3ca4127e82b7386', name: "close", size: 12, color: "#888888", class: "sd-file-picker__clear-icon", onClick: this.handleClear })), this.showTooltip && hasFiles && this.hovered && (index.h("div", { key: 'd4fdd2e2ed990c17c35eca0164f93f3323ba728c', class: "sd-file-picker__tooltip" }, displayText))));
|
|
112
112
|
}
|
|
113
113
|
static get watchers() { return {
|
|
114
114
|
"value": [{
|
|
@@ -55,9 +55,9 @@ const SdGuide = class {
|
|
|
55
55
|
};
|
|
56
56
|
render() {
|
|
57
57
|
const { name: iconName, size: iconSize, color: iconColor } = GUIDE_ICON[this.type];
|
|
58
|
-
return (index.h("div", { key: '
|
|
58
|
+
return (index.h("div", { key: '6160f0e15482053eadd72d57a15f3396541b083a', class: "sd-guide", style: {
|
|
59
59
|
'--sd-guide-color': GUIDE_ICON[this.type].color,
|
|
60
|
-
} }, index.h("sd-button", { key: '
|
|
60
|
+
} }, index.h("sd-button", { key: 'cec37bacab4a2f2e932db6e55674d63cb4203ffd', ref: el => (this.guideRef = el), class: this.guideClass, variant: this.popupShow ? 'primary' : 'outline', label: this.label || GUIDE_LABEL[this.type], size: "sm", color: this.popupShow ? GUIDE_ICON[this.type].color : 'grey_45', icon: iconName, iconColor: this.popupShow ? 'white' : iconColor, iconSize: iconSize, noHover: this.popupShow, onSdClick: this.handleClickGuide }), this.type === 'help' && this.popupShow && (index.h("sd-portal", { key: 'be8e6a105b6cadbdccabb76d48c8077957da3a37', open: this.popupShow, parentRef: this.guideRef, onSdClose: this.closeDropdown, offset: [0, 4] }, index.h("div", { key: '321c6fd059d24d632b434abc77e19dfb552756a0', style: { position: 'absolute', width: '0px', height: '0px' } }, index.h("div", { key: '90e051c0c7609ba0b9cc5e654aba8d806b278b8a', class: "sd-guide__popup", style: { width: this.popupWidth ? this.popupWidth + 'px' : '426px' } }, index.h("sd-button", { key: '58712e7346d7482d6495394e981df5bfc42e1cdc', class: "sd-guide__popup__close", icon: "close", color: "grey_65", size: "md", variant: "ghost", noHover: true, onSdClick: this.closeDropdown }), index.h("div", { key: '55e4711ee0bee9a4fd11280aacee78a41e613f5b', class: "sd-guide__popup__header" }, index.h("sd-icon", { key: '461cea2bab8c257d192623068793af58f821d7c9', name: "helpOutline", size: 24, color: "green_65" }), index.h("h3", { key: '0240dc09042adef7da4c6c57f888e7e4923c595e', class: "sd-guide__popup__title" }, this.popupTitle || GUIDE_LABEL[this.type])), index.h("ul", { key: '906c5ac6ef8532482014478d360bdf892764acb0', class: "sd-guide__popup__list" }, this.renderListItem(this.message))))))));
|
|
61
61
|
}
|
|
62
62
|
// 현재 2depth까지만 스타일 적용
|
|
63
63
|
renderListItem(message, depth = 0) {
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Qvv0fGgj.js');
|
|
4
|
+
|
|
5
|
+
const sdModalContainerCss = () => `sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 10000);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}`;
|
|
6
|
+
|
|
7
|
+
let modalIdCounter = 0;
|
|
8
|
+
const ANIMATION_DURATION = 350;
|
|
9
|
+
const SdModalContainer = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
get el() { return index.getElement(this); }
|
|
14
|
+
entries = [];
|
|
15
|
+
isVisible = false;
|
|
16
|
+
isBackdropVisible = false;
|
|
17
|
+
contentRef;
|
|
18
|
+
containerDismissTimerId;
|
|
19
|
+
handleKeydown(e) {
|
|
20
|
+
if (e.key === 'Escape') {
|
|
21
|
+
const top = this.getTopEntry();
|
|
22
|
+
if (!top)
|
|
23
|
+
return;
|
|
24
|
+
if (top.persistent) {
|
|
25
|
+
this.shakeModal(top.modalEl);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.requestDismiss(top.id, 'cancel');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async open(options, chain) {
|
|
32
|
+
const id = `modal-${++modalIdCounter}`;
|
|
33
|
+
const modalEl = this.createConfirmModal(id, options);
|
|
34
|
+
if (this.containerDismissTimerId) {
|
|
35
|
+
clearTimeout(this.containerDismissTimerId);
|
|
36
|
+
this.containerDismissTimerId = undefined;
|
|
37
|
+
}
|
|
38
|
+
this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closing: false }];
|
|
39
|
+
this.isVisible = true;
|
|
40
|
+
// Append after the container renders, then wait until the modal can paint before starting transitions.
|
|
41
|
+
requestAnimationFrame(() => {
|
|
42
|
+
if (this.contentRef) {
|
|
43
|
+
this.contentRef.appendChild(modalEl);
|
|
44
|
+
this.waitForModalReady(modalEl).then(() => {
|
|
45
|
+
requestAnimationFrame(() => {
|
|
46
|
+
const currentEntry = (this.entries ?? []).find(item => item.id === id);
|
|
47
|
+
if (!currentEntry || currentEntry.closing || !modalEl.isConnected)
|
|
48
|
+
return;
|
|
49
|
+
this.isBackdropVisible = true;
|
|
50
|
+
modalEl.classList.add('sd-modal-container__modal--visible');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return id;
|
|
56
|
+
}
|
|
57
|
+
async openNotice(options, chain) {
|
|
58
|
+
const id = `modal-${++modalIdCounter}`;
|
|
59
|
+
const modalEl = this.createNoticeModal(id, options);
|
|
60
|
+
if (this.containerDismissTimerId) {
|
|
61
|
+
clearTimeout(this.containerDismissTimerId);
|
|
62
|
+
this.containerDismissTimerId = undefined;
|
|
63
|
+
}
|
|
64
|
+
this.entries = [...(this.entries ?? []), { id, modalEl, chain, persistent: !!options.persistent, closing: false }];
|
|
65
|
+
this.isVisible = true;
|
|
66
|
+
requestAnimationFrame(() => {
|
|
67
|
+
if (this.contentRef) {
|
|
68
|
+
this.contentRef.appendChild(modalEl);
|
|
69
|
+
this.waitForModalReady(modalEl).then(() => {
|
|
70
|
+
requestAnimationFrame(() => {
|
|
71
|
+
const currentEntry = (this.entries ?? []).find(item => item.id === id);
|
|
72
|
+
if (!currentEntry || currentEntry.closing || !modalEl.isConnected)
|
|
73
|
+
return;
|
|
74
|
+
this.isBackdropVisible = true;
|
|
75
|
+
modalEl.classList.add('sd-modal-container__modal--visible');
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return id;
|
|
81
|
+
}
|
|
82
|
+
async update(id, props) {
|
|
83
|
+
const entry = (this.entries ?? []).find(e => e.id === id);
|
|
84
|
+
if (!entry || entry.closing)
|
|
85
|
+
return;
|
|
86
|
+
this.applyProps(entry.modalEl, props);
|
|
87
|
+
}
|
|
88
|
+
createConfirmModal(id, options) {
|
|
89
|
+
const el = document.createElement('sd-confirm-modal');
|
|
90
|
+
el.setAttribute('data-modal-id', id);
|
|
91
|
+
el.classList.add('sd-modal-container__modal');
|
|
92
|
+
this.applyProps(el, options);
|
|
93
|
+
el.addEventListener('sdConfirm', () => {
|
|
94
|
+
this.requestDismiss(id, 'confirm');
|
|
95
|
+
});
|
|
96
|
+
el.addEventListener('sdClose', () => {
|
|
97
|
+
this.requestDismiss(id, 'cancel');
|
|
98
|
+
});
|
|
99
|
+
return el;
|
|
100
|
+
}
|
|
101
|
+
applyProps(el, options) {
|
|
102
|
+
if (this.hasOwnProp(options, 'type'))
|
|
103
|
+
this.setAttr(el, 'type', options.type);
|
|
104
|
+
if (this.hasOwnProp(options, 'title'))
|
|
105
|
+
this.setAttr(el, 'modal-title', options.title);
|
|
106
|
+
if (this.hasOwnProp(options, 'titleClass'))
|
|
107
|
+
this.setAttr(el, 'title-class', options.titleClass);
|
|
108
|
+
if (this.hasOwnProp(options, 'mainButtonLabel')) {
|
|
109
|
+
this.setAttr(el, 'main-button-label', options.mainButtonLabel);
|
|
110
|
+
}
|
|
111
|
+
if (this.hasOwnProp(options, 'mainButtonName')) {
|
|
112
|
+
this.setAttr(el, 'main-button-name', options.mainButtonName);
|
|
113
|
+
}
|
|
114
|
+
if (this.hasOwnProp(options, 'subButtonLabel')) {
|
|
115
|
+
this.setAttr(el, 'sub-button-label', options.subButtonLabel);
|
|
116
|
+
}
|
|
117
|
+
if (this.hasOwnProp(options, 'tagPreset'))
|
|
118
|
+
this.setAttr(el, 'tag-preset', options.tagPreset);
|
|
119
|
+
if (this.hasOwnProp(options, 'tagLabel'))
|
|
120
|
+
this.setAttr(el, 'tag-label', options.tagLabel);
|
|
121
|
+
if (this.hasOwnProp(options, 'slotLabel'))
|
|
122
|
+
this.setAttr(el, 'slot-label', options.slotLabel);
|
|
123
|
+
if (this.hasOwnProp(options, 'topMessage'))
|
|
124
|
+
el.topMessage = options.topMessage ?? [];
|
|
125
|
+
if (this.hasOwnProp(options, 'bottomMessage'))
|
|
126
|
+
el.bottomMessage = options.bottomMessage ?? [];
|
|
127
|
+
if (this.hasOwnProp(options, 'tagContents'))
|
|
128
|
+
el.tagContents = options.tagContents;
|
|
129
|
+
}
|
|
130
|
+
createNoticeModal(id, options) {
|
|
131
|
+
const el = document.createElement('sd-notice-modal');
|
|
132
|
+
el.setAttribute('data-modal-id', id);
|
|
133
|
+
el.classList.add('sd-modal-container__modal');
|
|
134
|
+
this.applyNoticeProps(el, options);
|
|
135
|
+
el.addEventListener('sdConfirm', () => {
|
|
136
|
+
this.requestDismiss(id, 'confirm');
|
|
137
|
+
});
|
|
138
|
+
el.addEventListener('sdClose', () => {
|
|
139
|
+
this.requestDismiss(id, 'cancel');
|
|
140
|
+
});
|
|
141
|
+
return el;
|
|
142
|
+
}
|
|
143
|
+
applyNoticeProps(el, options) {
|
|
144
|
+
if (this.hasOwnProp(options, 'title'))
|
|
145
|
+
this.setAttr(el, 'modal-title', options.title);
|
|
146
|
+
if (this.hasOwnProp(options, 'titleClass'))
|
|
147
|
+
this.setAttr(el, 'title-class', options.titleClass);
|
|
148
|
+
if (this.hasOwnProp(options, 'mainButtonLabel')) {
|
|
149
|
+
this.setAttr(el, 'main-button-label', options.mainButtonLabel);
|
|
150
|
+
}
|
|
151
|
+
if (this.hasOwnProp(options, 'subButtonLabel')) {
|
|
152
|
+
this.setAttr(el, 'sub-button-label', options.subButtonLabel);
|
|
153
|
+
}
|
|
154
|
+
if (this.hasOwnProp(options, 'tagPreset'))
|
|
155
|
+
this.setAttr(el, 'tag-preset', options.tagPreset);
|
|
156
|
+
if (this.hasOwnProp(options, 'tagLabel'))
|
|
157
|
+
this.setAttr(el, 'tag-label', options.tagLabel);
|
|
158
|
+
if (this.hasOwnProp(options, 'slotLabel'))
|
|
159
|
+
this.setAttr(el, 'slot-label', options.slotLabel);
|
|
160
|
+
if (this.hasOwnProp(options, 'topMessage'))
|
|
161
|
+
el.topMessage = options.topMessage ?? [];
|
|
162
|
+
if (this.hasOwnProp(options, 'bottomMessage'))
|
|
163
|
+
el.bottomMessage = options.bottomMessage ?? [];
|
|
164
|
+
if (this.hasOwnProp(options, 'tagContents'))
|
|
165
|
+
el.tagContents = options.tagContents;
|
|
166
|
+
}
|
|
167
|
+
handleBackdropClick = () => {
|
|
168
|
+
const top = this.getTopEntry();
|
|
169
|
+
if (!top)
|
|
170
|
+
return;
|
|
171
|
+
if (top.persistent) {
|
|
172
|
+
this.shakeModal(top.modalEl);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.requestDismiss(top.id, 'cancel');
|
|
176
|
+
};
|
|
177
|
+
shakeModal(modalEl) {
|
|
178
|
+
const cls = 'sd-modal-container__modal--shake';
|
|
179
|
+
modalEl.classList.remove(cls);
|
|
180
|
+
modalEl.addEventListener('animationend', () => modalEl.classList.remove(cls), { once: true });
|
|
181
|
+
requestAnimationFrame(() => {
|
|
182
|
+
modalEl.classList.add(cls);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
disconnectedCallback() {
|
|
186
|
+
(this.entries ?? []).forEach(entry => {
|
|
187
|
+
if (entry.dismissTimerId)
|
|
188
|
+
clearTimeout(entry.dismissTimerId);
|
|
189
|
+
});
|
|
190
|
+
if (this.containerDismissTimerId)
|
|
191
|
+
clearTimeout(this.containerDismissTimerId);
|
|
192
|
+
}
|
|
193
|
+
getTopEntry() {
|
|
194
|
+
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
195
|
+
}
|
|
196
|
+
requestDismiss(id, reason) {
|
|
197
|
+
const entry = (this.entries ?? []).find(item => item.id === id);
|
|
198
|
+
if (!entry || entry.closing)
|
|
199
|
+
return;
|
|
200
|
+
entry.modalEl.classList.remove('sd-modal-container__modal--visible');
|
|
201
|
+
// fade out backdrop simultaneously if this is the last active modal
|
|
202
|
+
const remainingActive = (this.entries ?? []).filter(item => item.id !== id && !item.closing);
|
|
203
|
+
if (remainingActive.length === 0) {
|
|
204
|
+
this.isBackdropVisible = false;
|
|
205
|
+
}
|
|
206
|
+
const dismissTimerId = setTimeout(() => {
|
|
207
|
+
this.finalizeDismiss(id);
|
|
208
|
+
}, ANIMATION_DURATION);
|
|
209
|
+
this.entries = (this.entries ?? []).map(item => item.id === id ? { ...item, closing: true, dismissTimerId } : item);
|
|
210
|
+
if (reason === 'confirm')
|
|
211
|
+
entry.chain._triggerOk();
|
|
212
|
+
if (reason === 'cancel')
|
|
213
|
+
entry.chain._triggerCancel();
|
|
214
|
+
}
|
|
215
|
+
finalizeDismiss(id) {
|
|
216
|
+
const entry = (this.entries ?? []).find(item => item.id === id);
|
|
217
|
+
if (!entry)
|
|
218
|
+
return;
|
|
219
|
+
if (entry.dismissTimerId)
|
|
220
|
+
clearTimeout(entry.dismissTimerId);
|
|
221
|
+
entry.modalEl.remove();
|
|
222
|
+
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
223
|
+
this.entries = nextEntries;
|
|
224
|
+
if (nextEntries.length === 0) {
|
|
225
|
+
this.containerDismissTimerId = setTimeout(() => {
|
|
226
|
+
if ((this.entries ?? []).length === 0) {
|
|
227
|
+
this.isVisible = false;
|
|
228
|
+
}
|
|
229
|
+
this.containerDismissTimerId = undefined;
|
|
230
|
+
}, ANIMATION_DURATION);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
waitForModalReady(modalEl) {
|
|
234
|
+
const componentOnReady = modalEl.componentOnReady;
|
|
235
|
+
if (typeof componentOnReady === 'function') {
|
|
236
|
+
return componentOnReady.call(modalEl).then(() => undefined);
|
|
237
|
+
}
|
|
238
|
+
return new Promise(resolve => {
|
|
239
|
+
requestAnimationFrame(() => {
|
|
240
|
+
requestAnimationFrame(() => resolve());
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
hasOwnProp(options, key) {
|
|
245
|
+
return Object.prototype.hasOwnProperty.call(options, key);
|
|
246
|
+
}
|
|
247
|
+
setAttr(el, name, value) {
|
|
248
|
+
if (value == null)
|
|
249
|
+
return;
|
|
250
|
+
el.setAttribute(name, value);
|
|
251
|
+
}
|
|
252
|
+
render() {
|
|
253
|
+
if (!this.isVisible)
|
|
254
|
+
return null;
|
|
255
|
+
return (index.h("div", { class: "sd-modal-container" }, index.h("div", { class: {
|
|
256
|
+
'sd-modal-container__backdrop': true,
|
|
257
|
+
'sd-modal-container__backdrop--visible': this.isBackdropVisible,
|
|
258
|
+
}, onClick: this.handleBackdropClick }), index.h("div", { class: "sd-modal-container__content", ref: el => { this.contentRef = el; } })));
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
SdModalContainer.style = sdModalContainerCss();
|
|
262
|
+
|
|
263
|
+
exports.sd_modal_container = SdModalContainer;
|
|
@@ -48,14 +48,14 @@ const SdPopover = class {
|
|
|
48
48
|
this.showPopover = false;
|
|
49
49
|
};
|
|
50
50
|
render() {
|
|
51
|
-
return (index.h(index.Fragment, { key: '
|
|
51
|
+
return (index.h(index.Fragment, { key: '583cb5e2f7cb123dc1a11edeff0e6f6075e95950' }, this.label ? (index.h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: this.icon, size: this.buttonSize, color: this.color, variant: this.buttonVariant, class: "sd-popover", onSdClick: () => (this.showPopover = !this.showPopover) })) : (index.h("sd-icon", { ref: el => (this.buttonEl = el), name: this.icon, size: this.iconSize, color: this.color, class: "sd-popover", onClick: () => (this.showPopover = !this.showPopover) })), this.showPopover && (index.h("sd-floating-portal", { key: 'a0a4242a6cd1925a29b2e7be27f50b20377120de', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, index.h("div", { key: '251ddf3c159ae0f79c32643da7e1bef3d25caeeb', class: {
|
|
52
52
|
'sd-floating-menu': true,
|
|
53
53
|
'sd-floating-menu--popover': true,
|
|
54
54
|
[`sd-floating-menu--${this.placement}`]: true,
|
|
55
55
|
[this.menuClass]: !!this.menuClass,
|
|
56
56
|
}, style: {
|
|
57
57
|
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
58
|
-
} }, index.h("i", { key: '
|
|
58
|
+
} }, index.h("i", { key: '4ce84717389086099d17ac8c69519d4dfd707d64', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, index.h(tooltipArrow.TooltipArrow, { key: 'da5b99c7236bd9e6199971121cafc2537b5d96ee' })), index.h("div", { key: 'cc5dc4fc0abb24b4e515eae7031c812bf1178633', class: "sd-floating-menu__content" }, this.menuTitle && index.h("div", { key: '818f93a2a9820422652df595e0fd027873f6a93d', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (index.h("div", { key: '4f9cd0152c8f3697f419b63e73170a95def35a7b', class: "sd-floating-menu__messages" }, this.messages.map(message => (index.h("div", null, message))))), this.buttons.length > 0 && (index.h("div", { key: 'd1fe902b212315eab787b73ac3f38b0bf67f7955', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (index.h("sd-button", { ...button })))))), this.useClose && (index.h("button", { key: 'b043c92f872ef490715ee9735a413835d9350e32', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, index.h("sd-icon", { key: '19b5e26bec245315ff2d1187b7559bcf592a2490', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
|
|
59
59
|
}
|
|
60
60
|
static get watchers() { return {
|
|
61
61
|
"show": [{
|
|
@@ -41,10 +41,10 @@ const SdProgress = class {
|
|
|
41
41
|
return this.statusColor[this.progressStatus];
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (index.h("div", { key: '
|
|
44
|
+
return (index.h("div", { key: '6d111e7d5de2efd5565cc92fbef5f0d9ee8cb2ec', style: {
|
|
45
45
|
'--progress-color': this.progressColor,
|
|
46
46
|
'--progress-percentage': `${this.progressPercentage}%`,
|
|
47
|
-
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && index.h("div", { key: '
|
|
47
|
+
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && index.h("div", { key: '8ff2f14809c2ae3107debd1f9bcee510e2d5594f', class: "sd-progress__label" }, this.label)));
|
|
48
48
|
}
|
|
49
49
|
renderBarProgress() {
|
|
50
50
|
return (index.h("div", { class: `sd-progress__bar sd-progress__bar--${this.progressStatus}` }, index.h("div", { class: ['sd-progress__bar__percent', this.progressPercentage < 100 ? 'proceed' : ''].join(' ') }), index.h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.progressPercentage, "%"), index.h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.progressPercentage, "%")));
|
|
@@ -45,7 +45,7 @@ const SdRadioButtonGroup = class {
|
|
|
45
45
|
}
|
|
46
46
|
groupName = this.name || `sd-radio-button-group-${crypto.randomUUID()}`;
|
|
47
47
|
render() {
|
|
48
|
-
return (index.h("div", { key: '
|
|
48
|
+
return (index.h("div", { key: '05df370841cb40291e350df3c7edf6b75be01f14', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map(option => {
|
|
49
49
|
const isSelected = this.isOptionSelected(option);
|
|
50
50
|
const isDisabled = this.isOptionDisabled(option);
|
|
51
51
|
return (index.h("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), "aria-label": option.label || 'radio option', "data-label": option.label }, index.h("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && index.h("span", { class: "sd-radio-button-group__label" }, option.label)));
|
|
@@ -29,7 +29,7 @@ const SdRadioGroup = class {
|
|
|
29
29
|
return classes.join(' ');
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (index.h("div", { key: '
|
|
32
|
+
return (index.h("div", { key: '264fed43fa10c8869762dab2b0530989e7901178', class: this.getGroupClasses(), role: "radiogroup" }, this.radioOptions.map(option => {
|
|
33
33
|
return (index.h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: this.value, label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
|
|
34
34
|
})));
|
|
35
35
|
}
|
|
@@ -275,7 +275,7 @@ const SdSelectGroup = class extends baseDropdownEvent.BaseDropdownEvent {
|
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
render() {
|
|
278
|
-
return (index.h("sd-field", { key: '
|
|
278
|
+
return (index.h("sd-field", { key: '343870c96352644f1f32570296473d2f06a65750', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, insideLabel: this.insideLabel, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, index.h("div", { key: '05d7ced4e332e5ab2f66b44b517f4e59b12ecf64', class: {
|
|
279
279
|
'sd-select-group': true,
|
|
280
280
|
'sd-select-group--open': this.isOpen,
|
|
281
281
|
'sd-select-group--disabled': this.disabled,
|
|
@@ -397,7 +397,7 @@ const SdSelectMultipleGroup = class extends baseDropdownEvent.BaseDropdownEvent
|
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
render() {
|
|
400
|
-
return (index.h("sd-field", { key: '
|
|
400
|
+
return (index.h("sd-field", { key: '350c7b2df807166a1439a2151f0f168385adac4a', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: { '--field-width': this.width || '200px' } }, index.h("div", { key: 'cce989263e1c7dcb38216e734aabe6eea643676a', class: {
|
|
401
401
|
'sd-select-multiple-group': true,
|
|
402
402
|
'sd-select-multiple-group--open': this.isOpen,
|
|
403
403
|
'sd-select-multiple-group--disabled': this.disabled,
|
|
@@ -155,7 +155,7 @@ const SdSelectMultiple = class extends baseDropdownEvent.BaseDropdownEvent {
|
|
|
155
155
|
this.handleOptionSelection(option);
|
|
156
156
|
};
|
|
157
157
|
render() {
|
|
158
|
-
return (index.h("sd-field", { key: '
|
|
158
|
+
return (index.h("sd-field", { key: '8de4ef57a8dd1c6f2fd6ab9ae22fe4df3e99ed16', label: this.label, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, index.h("div", { key: '8b57b5500a152853db07de205ab006f7a92f30a8', class: {
|
|
159
159
|
'sd-select-multiple': true,
|
|
160
160
|
'sd-select-multiple--open': this.isOpen,
|
|
161
161
|
'sd-select-multiple--disabled': this.disabled,
|
|
@@ -48,7 +48,7 @@ const SdSelectOptionGroup = class {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
render() {
|
|
51
|
-
return (index.h("div", { key: '
|
|
51
|
+
return (index.h("div", { key: '7581caff61d1257d653b6f58b8d76c21225b3cc5', class: {
|
|
52
52
|
'sd-select__option-group': true,
|
|
53
53
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
54
54
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -57,10 +57,10 @@ const SdSelectOptionGroup = class {
|
|
|
57
57
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
58
58
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
59
59
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
60
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, index.h("div", { key: '
|
|
60
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, index.h("div", { key: 'ddb33f6afaa6bc6d6dd3dc494f6ec74b9c023a42', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (index.h("sd-checkbox", { key: '14f2c7fc347718d2909e5006bf2500a9a51b0a66', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
61
61
|
e.preventDefault();
|
|
62
62
|
this.handleClick(this.option, this.isSelected, e);
|
|
63
|
-
} })), index.h("span", { key: '
|
|
63
|
+
} })), index.h("span", { key: '99415ed662cc2f8f29d31e3811eb4496f8fcac47', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (index.h("span", { key: 'a3c7dc6455a94ecd4587f8b13b4d1f10e3b58819', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
SdSelectOptionGroup.style = sdSelectOptionGroupCss();
|
|
@@ -73,7 +73,7 @@ const SdSelectV2ListItem = class {
|
|
|
73
73
|
if (isDepth1Group) {
|
|
74
74
|
cssVars['--list-item-border-top'] = `${sdSelectV2_config.LIST_ITEM_COLORS.depth1.borderWidth}px solid ${sdSelectV2_config.LIST_ITEM_COLORS.depth1.border}`;
|
|
75
75
|
}
|
|
76
|
-
return (index.h("div", { key: '
|
|
76
|
+
return (index.h("div", { key: '0abaaaf9e87dd7faa5ca7566d54367fc1a883d6e', class: {
|
|
77
77
|
'sd-select-v2-list-item': true,
|
|
78
78
|
'sd-select-v2-list-item--group': isGroup,
|
|
79
79
|
'sd-select-v2-list-item--depth1-group': isDepth1Group,
|
|
@@ -83,7 +83,7 @@ const SdSelectV2ListItem = class {
|
|
|
83
83
|
'sd-select-v2-list-item--focused': this.isFocused,
|
|
84
84
|
'sd-select-v2-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
85
85
|
'sd-select-v2-list-item--disabled': !!this.option.disabled,
|
|
86
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (index.h("sd-checkbox", { key: '
|
|
86
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (index.h("sd-checkbox", { key: 'd2b00059ae0792d7d162e8ea7c8f35640ab6086f', value: this.isSelected === null ? null : !!this.isSelected, disabled: this.option.disabled, class: "sd-select-v2-list-item__checkbox", onClick: this.handleCheckboxClick, onSdUpdate: this.handleCheckboxUpdate })), index.h("span", { key: '588434f01076bc963ca733eabf62a74795788c07', class: "sd-select-v2-list-item__label" }, this.option.label), this.countInfo && (index.h("span", { key: '6238cac7c3da53813eb8e65f98167874947625af', class: "sd-select-v2-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
SdSelectV2ListItem.style = sdSelectV2ListItemCss();
|
|
@@ -145,12 +145,12 @@ const SdSelectV2ListItemSearch = class {
|
|
|
145
145
|
clearTimeout(this.debounceTimer);
|
|
146
146
|
}
|
|
147
147
|
render() {
|
|
148
|
-
return (index.h("div", { key: '
|
|
148
|
+
return (index.h("div", { key: '0b97d37d739a22f488b313cfcc6e210c19cd3b7f', class: {
|
|
149
149
|
'sd-select-v2-list-item-search': true,
|
|
150
150
|
'sd-select-v2-list-item-search--scrolled': this.isScrolled,
|
|
151
|
-
} }, index.h("div", { key: '
|
|
151
|
+
} }, index.h("div", { key: 'c0667cb553c481507149baa6da6b07cdc3ed69c4', class: "sd-select-v2-list-item-search__inner" }, index.h("sd-icon", { key: '0a9f76e5f8bb9a202ca921d076552f7ca8868528', name: "search", size: 16, color: "grey_70", class: "sd-select-v2-list-item-search__icon" }), index.h("input", { key: 'ac3dffc2b22f14ed356c92f64f8d1d46e57040f7', ref: el => {
|
|
152
152
|
this.inputEl = el;
|
|
153
|
-
}, type: "text", class: "sd-select-v2-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: () => this.searchFocus.emit() }), this.searchText && (index.h("button", { key: '
|
|
153
|
+
}, type: "text", class: "sd-select-v2-list-item-search__input", placeholder: "\uAC80\uC0C9\uC5B4 \uC785\uB825", value: this.searchText, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: () => this.searchFocus.emit() }), this.searchText && (index.h("button", { key: 'c81a0a057ad862603c3ccb627102182898fd004f', type: "button", class: "sd-select-v2-list-item-search__clear", onClick: this.handleClear }, index.h("sd-icon", { key: 'b65fcc15d27b3feafba27944dada2c9ed844b870', name: "close", size: 12, color: "#888888" }))))));
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
SdSelectV2ListItemSearch.style = sdSelectV2ListItemSearchCss();
|
|
@@ -132,7 +132,7 @@ const SdSelectV2Listbox = class {
|
|
|
132
132
|
'--listbox-radius': `${sdSelectV2_config.LIST_BOX_LAYOUT.radius}px`,
|
|
133
133
|
'--listbox-padding-bottom': `${sdSelectV2_config.LIST_BOX_LAYOUT.paddingBottom}px`,
|
|
134
134
|
};
|
|
135
|
-
return (index.h("div", { key: '
|
|
135
|
+
return (index.h("div", { key: '0f92a96e763d00ee241cdca62b3b7ccad90c811a', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (index.h("sd-select-v2-list-item-search", { key: '7c85122be46cc77db8c28c8b3cf072bfd445d56d', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), index.h("div", { key: '08a4a00208e70bc77cddec12f6ad71ed8cad0071', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll }, this.isEmpty ? (index.h("div", { class: "sd-select-v2-listbox__empty" }, sdSelectV2_config.EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (index.h("sd-select-v2-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick })))))));
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
SdSelectV2Listbox.style = sdSelectV2ListboxCss();
|
|
@@ -174,11 +174,11 @@ const SdSelectV2Trigger = class {
|
|
|
174
174
|
? sdSelectV2_config.SELECT_COLORS.addonLabel.border.disabled
|
|
175
175
|
: sdSelectV2_config.SELECT_COLORS.addonLabel.border.default,
|
|
176
176
|
};
|
|
177
|
-
return (index.h("div", { key: '
|
|
177
|
+
return (index.h("div", { key: '00f76c08c517d52499f1c75315ba1d9b0f7f6a06', class: {
|
|
178
178
|
'sd-select-v2-trigger': true,
|
|
179
179
|
'sd-select-v2-trigger--open': this.isOpen,
|
|
180
180
|
'sd-select-v2-trigger--disabled': this.disabled,
|
|
181
|
-
}, style: cssVars, onClick: this.handleClick }, this.addonLabel && (index.h("div", { key: '
|
|
181
|
+
}, style: cssVars, onClick: this.handleClick }, this.addonLabel && (index.h("div", { key: 'bca73972b68ae98abc92cb882f65ef5622fc6d49', class: "sd-select-v2-trigger__addon" }, this.addonLabel)), index.h("div", { key: 'ae66f445590c28064b8cdf0d4048c1c009759291', class: "sd-select-v2-trigger__content" }, index.h("span", { key: 'e08841d7f17a24142f652d3929017786c37ad486', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), index.h("sd-icon", { key: '5e4ea15d1ec3e066daff92ecf012087789ba7b87', name: "arrowDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
182
182
|
'sd-select-v2-trigger__icon': true,
|
|
183
183
|
'sd-select-v2-trigger__icon--open': this.isOpen,
|
|
184
184
|
} }))));
|
|
@@ -31,6 +31,7 @@ const SdSelectV2 = class {
|
|
|
31
31
|
labelTooltip = '';
|
|
32
32
|
labelTooltipProps = null;
|
|
33
33
|
emitValue = false;
|
|
34
|
+
width = '100%';
|
|
34
35
|
isOpen = false;
|
|
35
36
|
isAnimatingOut = false;
|
|
36
37
|
triggerWidth = '200px';
|
|
@@ -216,7 +217,7 @@ const SdSelectV2 = class {
|
|
|
216
217
|
viewportPadding: SdSelectV2.VIEWPORT_PADDING,
|
|
217
218
|
onSdClose: () => { this.closeDropdown(); },
|
|
218
219
|
};
|
|
219
|
-
return (index.h("sd-field", { key: '
|
|
220
|
+
return (index.h("sd-field", { key: 'e87b15f9a6698de2ea29104540c8864f3cdb2b3c', name: this.fieldName || this.internalName, label: this.label, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => { this.hovered = true; }, onMouseLeave: () => { this.hovered = false; }, style: { width: /^\d+$/.test(this.width) ? `${this.width}px` : this.width, minWidth: '80px' } }, index.h("div", { key: '06762f1ec63d1a7a5a52a3fb80bdd22deb2d5447', class: "sd-select-v2", ref: el => { this.triggerRef = el; } }, index.h("sd-select-v2-trigger", { key: 'ec9a3721ff4f6fb3c762728f7ee339caab3486ab', displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, addonLabel: this.addonLabel, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: '57c0e77f7f55b98c0df60028aa7fc52bb0575925', ...portalProps }, index.h("sd-select-v2-listbox", { key: 'acc04cc0ed76920a7bbb95f3b61936cd0b415c61', name: this.name, options: this.options, value: this.value, emitValue: this.emitValue, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
|
|
220
221
|
}
|
|
221
222
|
static get watchers() { return {
|
|
222
223
|
"isOpen": [{
|
|
@@ -49,7 +49,7 @@ const SdTabs = class {
|
|
|
49
49
|
return `square_${this.size}_${color}`;
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (index.h("div", { key: '
|
|
52
|
+
return (index.h("div", { key: 'c179db82ee130f4ccbdca7cb1af7b156ad174df8', class: this.getContainerClasses() }, this.tabs.map((tab, index$1) => {
|
|
53
53
|
const badgeName = this.getBadgeName(tab);
|
|
54
54
|
return (index.h("div", { key: `tab-${index$1}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, index.h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && (index.h("sd-tag", { name: badgeName, label: tab.badge.toString() }))));
|
|
55
55
|
})));
|
|
@@ -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: 'ae174f148eb5191be7d4ad6704c77568f4b5abb2', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
238
238
|
this.expanded = true;
|
|
239
239
|
this.pauseTimers();
|
|
240
240
|
}, onMouseLeave: () => {
|
|
@@ -57,10 +57,10 @@ const SdToast = class {
|
|
|
57
57
|
render() {
|
|
58
58
|
const typeConfig = TOAST_TYPE_CONFIG[this.type] ?? TOAST_TYPE_CONFIG.default;
|
|
59
59
|
const iconSize = Number(TOAST_LAYOUT.iconSize);
|
|
60
|
-
return (index.h("div", { key: '
|
|
60
|
+
return (index.h("div", { key: 'fb12707835d196216266d9d3451c0b78b3d5c910', style: {
|
|
61
61
|
'--sd-toast-bg': typeConfig.bg,
|
|
62
62
|
'--sd-toast-text': typeConfig.content,
|
|
63
|
-
} }, index.h("div", { key: '
|
|
63
|
+
} }, index.h("div", { key: '5d02fbcc7640d40431d8a10d0ff966cbdc208564', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (index.h("div", { key: 'a0d31efadb3ece5d4491118b127dd6c824bce31a', class: "sd-toast__icon" }, index.h("sd-icon", { key: '6a6bf80ed9378d8b8c2b057dab5afeaf4ba638f7', name: this.icon, size: iconSize, color: typeConfig.content }))), index.h("div", { key: '2024f644815a136e44f96d58d97aea7f25623f2c', class: "sd-toast__content" }, index.h("span", { key: '0d903bb1c6e6d0518d1f6f71ece3e7a71efbe636', class: "sd-toast__message" }, this.message)), this.link && (index.h("a", { key: '574b52ba0bbd5f37657084b70f1b6818d06e77fe', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.useClose && (index.h("button", { key: '55c489e0c52879c229734f01a2ddf9c1206e0bfc', type: "button", class: "sd-toast__close", onClick: () => this.close.emit(), "aria-label": "Close", title: "Close" }, index.h("sd-icon", { key: 'd726e7d65a169024fbfdc924375f81b70caebf75', name: "close", size: iconSize, color: typeConfig.content }))))));
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
SdToast.style = sdToastCss();
|
|
@@ -41,7 +41,7 @@ const SdToggleButton = class {
|
|
|
41
41
|
this.change.emit(newValue);
|
|
42
42
|
};
|
|
43
43
|
render() {
|
|
44
|
-
return (index.h("label", { key: '
|
|
44
|
+
return (index.h("label", { key: '3fa26fc680be2568ceed35ce3e828d68c28bef28', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, index.h("input", { key: 'ac81ea350a145a166cc6cefdb341b326ce84d6f3', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
SdToggleButton.style = sdToggleButtonCss();
|
|
@@ -37,7 +37,7 @@ const SdToggle = class {
|
|
|
37
37
|
this.change.emit(newValue);
|
|
38
38
|
};
|
|
39
39
|
render() {
|
|
40
|
-
return (index.h("label", { key: '
|
|
40
|
+
return (index.h("label", { key: 'f6501486607b113d7ca127193eb7fdbcbac00260', "aria-label": this.label || 'toggle', class: this.toggleClasses }, index.h("input", { key: 'e63d90a710779cd3d6b90c865716c9efc43c81d2', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && index.h("span", { key: '10675257acc33a71f7ed76ea9474879f04acc0e0', class: "sd-toggle__label" }, this.label), index.h("div", { key: 'ec67a74eb272b24739867b50b5fe89f62995719a', class: "sd-toggle__track" }, index.h("div", { key: '57c785afe9cecc62a17ca3fa7eb6663d302d9c56', class: "sd-toggle__thumb" }))));
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
SdToggle.style = sdToggleCss();
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"components/sd-checkbox/sd-checkbox.js",
|
|
6
6
|
"components/sd-date-box/sd-date-box.js",
|
|
7
7
|
"components/sd-form/sd-form.js",
|
|
8
|
-
"components/sd-modal-card/sd-modal-card.js",
|
|
9
8
|
"components/sd-radio/sd-radio.js",
|
|
10
9
|
"components/sd-radio-button-group/sd-radio-button-group.js",
|
|
11
10
|
"components/sd-radio-group/sd-radio-group.js",
|
|
@@ -16,6 +15,7 @@
|
|
|
16
15
|
"components/sd-badge/sd-badge.js",
|
|
17
16
|
"components/sd-button-v2/sd-button-v2.js",
|
|
18
17
|
"components/sd-card/sd-card.js",
|
|
18
|
+
"components/sd-confirm-modal/sd-confirm-modal.js",
|
|
19
19
|
"components/sd-date-picker/sd-date-picker.js",
|
|
20
20
|
"components/sd-date-range-picker/sd-date-range-picker.js",
|
|
21
21
|
"components/sd-portal/sd-portal.js",
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"components/sd-icon/sd-icon.js",
|
|
28
28
|
"components/sd-input/sd-input.js",
|
|
29
29
|
"components/sd-loading-spinner/sd-loading-spinner.js",
|
|
30
|
+
"components/sd-modal-container/sd-modal-container.js",
|
|
31
|
+
"components/sd-notice-modal/sd-notice-modal.js",
|
|
30
32
|
"components/sd-number-input/sd-number-input.js",
|
|
31
33
|
"components/sd-pagination/sd-pagination.js",
|
|
32
34
|
"components/sd-popover/sd-popover.js",
|