@sellmate/design-system 1.0.36 → 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} +57 -79
- 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 +29 -5
- 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 +30 -6
- 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.css +4 -0
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +29 -4
- 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 +24 -3
- 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.css +3 -0
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +50 -25
- 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-DEBuE-pW.js +1 -0
- 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.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/{p-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-5875a54c.entry.js → p-e641f41f.entry.js} +1 -1
- package/dist/design-system/p-e8fbedcd.entry.js +1 -0
- 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} +58 -79
- 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 +30 -6
- 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 +30 -6
- 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-dropdown-button/sd-dropdown-button.d.ts +3 -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-portal/sd-portal.d.ts +1 -0
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +5 -1
- package/dist/types/components.d.ts +210 -59
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/modal.d.ts +12 -0
- package/hydrate/index.js +645 -123
- package/hydrate/index.mjs +645 -123
- 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-DV5ewRYP.js +0 -1
- package/dist/components/p-VX95YxcY.js +0 -1
- package/dist/components/sd-modal-card.js +0 -1
- package/dist/design-system/p-1370b0d8.entry.js +0 -1
- package/dist/design-system/p-35473290.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-e8ebb400.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
|
@@ -46,14 +46,14 @@ const SdPopover = class {
|
|
|
46
46
|
this.showPopover = false;
|
|
47
47
|
};
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Fragment, { key: '
|
|
49
|
+
return (h(Fragment, { key: '583cb5e2f7cb123dc1a11edeff0e6f6075e95950' }, this.label ? (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) })) : (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 && (h("sd-floating-portal", { key: 'a0a4242a6cd1925a29b2e7be27f50b20377120de', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: this.placement }, h("div", { key: '251ddf3c159ae0f79c32643da7e1bef3d25caeeb', class: {
|
|
50
50
|
'sd-floating-menu': true,
|
|
51
51
|
'sd-floating-menu--popover': true,
|
|
52
52
|
[`sd-floating-menu--${this.placement}`]: true,
|
|
53
53
|
[this.menuClass]: !!this.menuClass,
|
|
54
54
|
}, style: {
|
|
55
55
|
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
56
|
-
} }, h("i", { key: '
|
|
56
|
+
} }, h("i", { key: '4ce84717389086099d17ac8c69519d4dfd707d64', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${this.placement}` }, h(TooltipArrow, { key: 'da5b99c7236bd9e6199971121cafc2537b5d96ee' })), h("div", { key: 'cc5dc4fc0abb24b4e515eae7031c812bf1178633', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: '818f93a2a9820422652df595e0fd027873f6a93d', class: "sd-floating-menu__title" }, this.menuTitle), this.messages.length > 0 && (h("div", { key: '4f9cd0152c8f3697f419b63e73170a95def35a7b', class: "sd-floating-menu__messages" }, this.messages.map(message => (h("div", null, message))))), this.buttons.length > 0 && (h("div", { key: 'd1fe902b212315eab787b73ac3f38b0bf67f7955', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${this.buttons.length}` }, this.buttons.map(button => (h("sd-button", { ...button })))))), this.useClose && (h("button", { key: 'b043c92f872ef490715ee9735a413835d9350e32', title: "close", class: "sd-floating-menu__close-button", onClick: () => this.handleClose() }, h("sd-icon", { key: '19b5e26bec245315ff2d1187b7559bcf592a2490', name: "close", size: popoverTokens.popover.close.icon, color: popoverTokens.popover.close.color }))))))));
|
|
57
57
|
}
|
|
58
58
|
static get watchers() { return {
|
|
59
59
|
"show": [{
|
|
@@ -39,10 +39,10 @@ const SdProgress = class {
|
|
|
39
39
|
return this.statusColor[this.progressStatus];
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '6d111e7d5de2efd5565cc92fbef5f0d9ee8cb2ec', style: {
|
|
43
43
|
'--progress-color': this.progressColor,
|
|
44
44
|
'--progress-percentage': `${this.progressPercentage}%`,
|
|
45
|
-
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: '
|
|
45
|
+
} }, this.type === 'bar' ? this.renderBarProgress() : this.renderSpinnerProgress(), this.label && h("div", { key: '8ff2f14809c2ae3107debd1f9bcee510e2d5594f', class: "sd-progress__label" }, this.label)));
|
|
46
46
|
}
|
|
47
47
|
renderBarProgress() {
|
|
48
48
|
return (h("div", { class: `sd-progress__bar sd-progress__bar--${this.progressStatus}` }, h("div", { class: ['sd-progress__bar__percent', this.progressPercentage < 100 ? 'proceed' : ''].join(' ') }), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--left" }, this.progressPercentage, "%"), h("div", { class: "sd-progress__bar__indicator sd-progress__bar__indicator--right" }, this.progressPercentage, "%")));
|
|
@@ -43,7 +43,7 @@ const SdRadioButtonGroup = class {
|
|
|
43
43
|
}
|
|
44
44
|
groupName = this.name || `sd-radio-button-group-${crypto.randomUUID()}`;
|
|
45
45
|
render() {
|
|
46
|
-
return (h("div", { key: '
|
|
46
|
+
return (h("div", { key: '05df370841cb40291e350df3c7edf6b75be01f14', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map(option => {
|
|
47
47
|
const isSelected = this.isOptionSelected(option);
|
|
48
48
|
const isDisabled = this.isOptionDisabled(option);
|
|
49
49
|
return (h("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), "aria-label": option.label || 'radio option', "data-label": option.label }, h("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && h("span", { class: "sd-radio-button-group__label" }, option.label)));
|
|
@@ -27,7 +27,7 @@ const SdRadioGroup = class {
|
|
|
27
27
|
return classes.join(' ');
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h("div", { key: '
|
|
30
|
+
return (h("div", { key: '264fed43fa10c8869762dab2b0530989e7901178', class: this.getGroupClasses(), role: "radiogroup" }, this.radioOptions.map(option => {
|
|
31
31
|
return (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) }));
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
@@ -273,7 +273,7 @@ const SdSelectGroup = class extends BaseDropdownEvent {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
render() {
|
|
276
|
-
return (h("sd-field", { key: '
|
|
276
|
+
return (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' } }, h("div", { key: '05d7ced4e332e5ab2f66b44b517f4e59b12ecf64', class: {
|
|
277
277
|
'sd-select-group': true,
|
|
278
278
|
'sd-select-group--open': this.isOpen,
|
|
279
279
|
'sd-select-group--disabled': this.disabled,
|
|
@@ -395,7 +395,7 @@ const SdSelectMultipleGroup = class extends BaseDropdownEvent {
|
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
render() {
|
|
398
|
-
return (h("sd-field", { key: '
|
|
398
|
+
return (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' } }, h("div", { key: 'cce989263e1c7dcb38216e734aabe6eea643676a', class: {
|
|
399
399
|
'sd-select-multiple-group': true,
|
|
400
400
|
'sd-select-multiple-group--open': this.isOpen,
|
|
401
401
|
'sd-select-multiple-group--disabled': this.disabled,
|
|
@@ -153,7 +153,7 @@ const SdSelectMultiple = class extends BaseDropdownEvent {
|
|
|
153
153
|
this.handleOptionSelection(option);
|
|
154
154
|
};
|
|
155
155
|
render() {
|
|
156
|
-
return (h("sd-field", { key: '
|
|
156
|
+
return (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) }, h("div", { key: '8b57b5500a152853db07de205ab006f7a92f30a8', class: {
|
|
157
157
|
'sd-select-multiple': true,
|
|
158
158
|
'sd-select-multiple--open': this.isOpen,
|
|
159
159
|
'sd-select-multiple--disabled': this.disabled,
|
|
@@ -46,7 +46,7 @@ const SdSelectOptionGroup = class {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
render() {
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: '7581caff61d1257d653b6f58b8d76c21225b3cc5', class: {
|
|
50
50
|
'sd-select__option-group': true,
|
|
51
51
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
52
52
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -55,10 +55,10 @@ const SdSelectOptionGroup = class {
|
|
|
55
55
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
56
56
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
57
57
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
58
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '
|
|
58
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: 'ddb33f6afaa6bc6d6dd3dc494f6ec74b9c023a42', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: '14f2c7fc347718d2909e5006bf2500a9a51b0a66', value: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
59
59
|
e.preventDefault();
|
|
60
60
|
this.handleClick(this.option, this.isSelected, e);
|
|
61
|
-
} })), h("span", { key: '
|
|
61
|
+
} })), h("span", { key: '99415ed662cc2f8f29d31e3811eb4496f8fcac47', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: 'a3c7dc6455a94ecd4587f8b13b4d1f10e3b58819', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
SdSelectOptionGroup.style = sdSelectOptionGroupCss();
|
|
@@ -71,7 +71,7 @@ const SdSelectV2ListItem = class {
|
|
|
71
71
|
if (isDepth1Group) {
|
|
72
72
|
cssVars['--list-item-border-top'] = `${LIST_ITEM_COLORS.depth1.borderWidth}px solid ${LIST_ITEM_COLORS.depth1.border}`;
|
|
73
73
|
}
|
|
74
|
-
return (h("div", { key: '
|
|
74
|
+
return (h("div", { key: '0abaaaf9e87dd7faa5ca7566d54367fc1a883d6e', class: {
|
|
75
75
|
'sd-select-v2-list-item': true,
|
|
76
76
|
'sd-select-v2-list-item--group': isGroup,
|
|
77
77
|
'sd-select-v2-list-item--depth1-group': isDepth1Group,
|
|
@@ -81,7 +81,7 @@ const SdSelectV2ListItem = class {
|
|
|
81
81
|
'sd-select-v2-list-item--focused': this.isFocused,
|
|
82
82
|
'sd-select-v2-list-item--selectable': this.isSelectable && !this.option.disabled,
|
|
83
83
|
'sd-select-v2-list-item--disabled': !!this.option.disabled,
|
|
84
|
-
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (h("sd-checkbox", { key: '
|
|
84
|
+
}, style: cssVars, onClick: this.handleClick }, this.useCheckbox && (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 })), h("span", { key: '588434f01076bc963ca733eabf62a74795788c07', class: "sd-select-v2-list-item__label" }, this.option.label), this.countInfo && (h("span", { key: '6238cac7c3da53813eb8e65f98167874947625af', class: "sd-select-v2-list-item__count" }, "(", this.countInfo.selected, "/", this.countInfo.total, ")"))));
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
SdSelectV2ListItem.style = sdSelectV2ListItemCss();
|
|
@@ -143,12 +143,12 @@ const SdSelectV2ListItemSearch = class {
|
|
|
143
143
|
clearTimeout(this.debounceTimer);
|
|
144
144
|
}
|
|
145
145
|
render() {
|
|
146
|
-
return (h("div", { key: '
|
|
146
|
+
return (h("div", { key: '0b97d37d739a22f488b313cfcc6e210c19cd3b7f', class: {
|
|
147
147
|
'sd-select-v2-list-item-search': true,
|
|
148
148
|
'sd-select-v2-list-item-search--scrolled': this.isScrolled,
|
|
149
|
-
} }, h("div", { key: '
|
|
149
|
+
} }, h("div", { key: 'c0667cb553c481507149baa6da6b07cdc3ed69c4', class: "sd-select-v2-list-item-search__inner" }, h("sd-icon", { key: '0a9f76e5f8bb9a202ca921d076552f7ca8868528', name: "search", size: 16, color: "grey_70", class: "sd-select-v2-list-item-search__icon" }), h("input", { key: 'ac3dffc2b22f14ed356c92f64f8d1d46e57040f7', ref: el => {
|
|
150
150
|
this.inputEl = el;
|
|
151
|
-
}, 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 && (h("button", { key: '
|
|
151
|
+
}, 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 && (h("button", { key: 'c81a0a057ad862603c3ccb627102182898fd004f', type: "button", class: "sd-select-v2-list-item-search__clear", onClick: this.handleClear }, h("sd-icon", { key: 'b65fcc15d27b3feafba27944dada2c9ed844b870', name: "close", size: 12, color: "#888888" }))))));
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
SdSelectV2ListItemSearch.style = sdSelectV2ListItemSearchCss();
|
|
@@ -130,7 +130,7 @@ const SdSelectV2Listbox = class {
|
|
|
130
130
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
131
131
|
'--listbox-padding-bottom': `${LIST_BOX_LAYOUT.paddingBottom}px`,
|
|
132
132
|
};
|
|
133
|
-
return (h("div", { key: '
|
|
133
|
+
return (h("div", { key: '0f92a96e763d00ee241cdca62b3b7ccad90c811a', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (h("sd-select-v2-list-item-search", { key: '7c85122be46cc77db8c28c8b3cf072bfd445d56d', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '08a4a00208e70bc77cddec12f6ad71ed8cad0071', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll }, this.isEmpty ? (h("div", { class: "sd-select-v2-listbox__empty" }, EMPTY_MESSAGE)) : this.isDepth ? (this.renderOptions(this.filteredOptions)) : (this.filteredOptions.map(option => (h("sd-select-v2-list-item", { option: option, depth: 1, isSelected: this.isOptionSelected(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick })))))));
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
SdSelectV2Listbox.style = sdSelectV2ListboxCss();
|
|
@@ -172,11 +172,11 @@ const SdSelectV2Trigger = class {
|
|
|
172
172
|
? SELECT_COLORS.addonLabel.border.disabled
|
|
173
173
|
: SELECT_COLORS.addonLabel.border.default,
|
|
174
174
|
};
|
|
175
|
-
return (h("div", { key: '
|
|
175
|
+
return (h("div", { key: '00f76c08c517d52499f1c75315ba1d9b0f7f6a06', class: {
|
|
176
176
|
'sd-select-v2-trigger': true,
|
|
177
177
|
'sd-select-v2-trigger--open': this.isOpen,
|
|
178
178
|
'sd-select-v2-trigger--disabled': this.disabled,
|
|
179
|
-
}, style: cssVars, onClick: this.handleClick }, this.addonLabel && (h("div", { key: '
|
|
179
|
+
}, style: cssVars, onClick: this.handleClick }, this.addonLabel && (h("div", { key: 'bca73972b68ae98abc92cb882f65ef5622fc6d49', class: "sd-select-v2-trigger__addon" }, this.addonLabel)), h("div", { key: 'ae66f445590c28064b8cdf0d4048c1c009759291', class: "sd-select-v2-trigger__content" }, h("span", { key: 'e08841d7f17a24142f652d3929017786c37ad486', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), h("sd-icon", { key: '5e4ea15d1ec3e066daff92ecf012087789ba7b87', name: "arrowDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
180
180
|
'sd-select-v2-trigger__icon': true,
|
|
181
181
|
'sd-select-v2-trigger__icon--open': this.isOpen,
|
|
182
182
|
} }))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-B8tGP77V.js';
|
|
2
2
|
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
3
|
|
|
4
|
-
const sdSelectV2Css = () => `sd-select-v2{display:inline-flex}sd-select-v2 .sd-select-v2{position:relative;width:100%;height:100%}`;
|
|
4
|
+
const sdSelectV2Css = () => `sd-select-v2{display:inline-flex}sd-select-v2 sd-portal{display:none}sd-select-v2 .sd-select-v2{position:relative;width:100%;height:100%}`;
|
|
5
5
|
|
|
6
6
|
const SdSelectV2 = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -11,12 +11,12 @@ const SdSelectV2 = class {
|
|
|
11
11
|
}
|
|
12
12
|
static VIEWPORT_PADDING = 20;
|
|
13
13
|
static PORTAL_OFFSET_Y = 4;
|
|
14
|
+
static CLOSE_ANIMATION_DURATION = 150;
|
|
14
15
|
get el() { return getElement(this); }
|
|
15
16
|
name = 'default';
|
|
16
17
|
value = null;
|
|
17
18
|
options = [];
|
|
18
19
|
placeholder = '선택';
|
|
19
|
-
width = '200px';
|
|
20
20
|
maxDropdownWidth = '640px';
|
|
21
21
|
dropdownHeight = '260px';
|
|
22
22
|
disabled = false;
|
|
@@ -29,7 +29,9 @@ const SdSelectV2 = class {
|
|
|
29
29
|
labelTooltip = '';
|
|
30
30
|
labelTooltipProps = null;
|
|
31
31
|
emitValue = false;
|
|
32
|
+
width = '100%';
|
|
32
33
|
isOpen = false;
|
|
34
|
+
isAnimatingOut = false;
|
|
33
35
|
triggerWidth = '200px';
|
|
34
36
|
resolvedDropdownHeight = '260px';
|
|
35
37
|
resolvedMaxDropdownWidth = '640px';
|
|
@@ -38,6 +40,7 @@ const SdSelectV2 = class {
|
|
|
38
40
|
update;
|
|
39
41
|
dropDownShow;
|
|
40
42
|
triggerRef;
|
|
43
|
+
closeAnimationTimer;
|
|
41
44
|
internalName = nanoid();
|
|
42
45
|
watchIsOpen(newValue) {
|
|
43
46
|
this.focused = newValue;
|
|
@@ -129,12 +132,31 @@ const SdSelectV2 = class {
|
|
|
129
132
|
}
|
|
130
133
|
return undefined;
|
|
131
134
|
}
|
|
135
|
+
closeDropdown() {
|
|
136
|
+
if (!this.isOpen)
|
|
137
|
+
return;
|
|
138
|
+
this.isOpen = false;
|
|
139
|
+
this.isAnimatingOut = true;
|
|
140
|
+
if (this.closeAnimationTimer)
|
|
141
|
+
clearTimeout(this.closeAnimationTimer);
|
|
142
|
+
this.closeAnimationTimer = setTimeout(() => {
|
|
143
|
+
this.isAnimatingOut = false;
|
|
144
|
+
}, SdSelectV2.CLOSE_ANIMATION_DURATION);
|
|
145
|
+
}
|
|
132
146
|
handleTriggerClick = () => {
|
|
133
147
|
if (this.triggerRef) {
|
|
134
148
|
this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
|
|
135
149
|
}
|
|
136
150
|
this.updateDropdownViewportConstraints();
|
|
137
|
-
this.isOpen
|
|
151
|
+
if (this.isOpen) {
|
|
152
|
+
this.closeDropdown();
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
if (this.closeAnimationTimer)
|
|
156
|
+
clearTimeout(this.closeAnimationTimer);
|
|
157
|
+
this.isAnimatingOut = false;
|
|
158
|
+
this.isOpen = true;
|
|
159
|
+
}
|
|
138
160
|
};
|
|
139
161
|
emitUpdate(value, option) {
|
|
140
162
|
this.update.emit(this.emitValue ? value : { value, option });
|
|
@@ -146,7 +168,7 @@ const SdSelectV2 = class {
|
|
|
146
168
|
else {
|
|
147
169
|
this.value = this.emitValue ? option.value : option;
|
|
148
170
|
this.emitUpdate(this.value, option);
|
|
149
|
-
this.
|
|
171
|
+
this.closeDropdown();
|
|
150
172
|
}
|
|
151
173
|
};
|
|
152
174
|
handleMultiSelect(option) {
|
|
@@ -183,15 +205,17 @@ const SdSelectV2 = class {
|
|
|
183
205
|
}
|
|
184
206
|
disconnectedCallback() {
|
|
185
207
|
window.removeEventListener('resize', this.handleViewportResize);
|
|
208
|
+
if (this.closeAnimationTimer)
|
|
209
|
+
clearTimeout(this.closeAnimationTimer);
|
|
186
210
|
}
|
|
187
211
|
render() {
|
|
188
212
|
const portalProps = {
|
|
189
213
|
open: this.isOpen,
|
|
190
214
|
parentRef: this.triggerRef,
|
|
191
215
|
viewportPadding: SdSelectV2.VIEWPORT_PADDING,
|
|
192
|
-
onSdClose: () => { this.
|
|
216
|
+
onSdClose: () => { this.closeDropdown(); },
|
|
193
217
|
};
|
|
194
|
-
return (h("sd-field", { key: '
|
|
218
|
+
return (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' } }, h("div", { key: '06762f1ec63d1a7a5a52a3fb80bdd22deb2d5447', class: "sd-select-v2", ref: el => { this.triggerRef = el; } }, 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) && (h("sd-portal", { key: '57c0e77f7f55b98c0df60028aa7fc52bb0575925', ...portalProps }, 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) })))));
|
|
195
219
|
}
|
|
196
220
|
static get watchers() { return {
|
|
197
221
|
"isOpen": [{
|
|
@@ -47,7 +47,7 @@ const SdTabs = class {
|
|
|
47
47
|
return `square_${this.size}_${color}`;
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (h("div", { key: '
|
|
50
|
+
return (h("div", { key: 'c179db82ee130f4ccbdca7cb1af7b156ad174df8', class: this.getContainerClasses() }, this.tabs.map((tab, index) => {
|
|
51
51
|
const badgeName = this.getBadgeName(tab);
|
|
52
52
|
return (h("div", { key: `tab-${index}`, class: this.getTabClasses(tab), "aria-label": tab.label || 'tab', onClick: () => this.handleTabClick(tab.value) }, h("span", { "data-label": tab.label, class: "sd-tabs__label" }, tab.label), tab.badge && (h("sd-tag", { name: badgeName, label: tab.badge.toString() }))));
|
|
53
53
|
})));
|
|
@@ -232,7 +232,7 @@ const SdToastContainer = class {
|
|
|
232
232
|
const activeToasts = toasts.filter(t => t.state !== 'exiting').reverse();
|
|
233
233
|
const indexMap = new Map();
|
|
234
234
|
activeToasts.forEach((t, i) => indexMap.set(t.id, i));
|
|
235
|
-
return (h("div", { key: '
|
|
235
|
+
return (h("div", { key: 'ae174f148eb5191be7d4ad6704c77568f4b5abb2', class: "sd-toast-container", style: this.getContainerStyles(), onMouseEnter: () => {
|
|
236
236
|
this.expanded = true;
|
|
237
237
|
this.pauseTimers();
|
|
238
238
|
}, onMouseLeave: () => {
|
|
@@ -55,10 +55,10 @@ const SdToast = class {
|
|
|
55
55
|
render() {
|
|
56
56
|
const typeConfig = TOAST_TYPE_CONFIG[this.type] ?? TOAST_TYPE_CONFIG.default;
|
|
57
57
|
const iconSize = Number(TOAST_LAYOUT.iconSize);
|
|
58
|
-
return (h("div", { key: '
|
|
58
|
+
return (h("div", { key: 'fb12707835d196216266d9d3451c0b78b3d5c910', style: {
|
|
59
59
|
'--sd-toast-bg': typeConfig.bg,
|
|
60
60
|
'--sd-toast-text': typeConfig.content,
|
|
61
|
-
} }, h("div", { key: '
|
|
61
|
+
} }, h("div", { key: '5d02fbcc7640d40431d8a10d0ff966cbdc208564', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (h("div", { key: 'a0d31efadb3ece5d4491118b127dd6c824bce31a', class: "sd-toast__icon" }, h("sd-icon", { key: '6a6bf80ed9378d8b8c2b057dab5afeaf4ba638f7', name: this.icon, size: iconSize, color: typeConfig.content }))), h("div", { key: '2024f644815a136e44f96d58d97aea7f25623f2c', class: "sd-toast__content" }, h("span", { key: '0d903bb1c6e6d0518d1f6f71ece3e7a71efbe636', class: "sd-toast__message" }, this.message)), this.link && (h("a", { key: '574b52ba0bbd5f37657084b70f1b6818d06e77fe', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.useClose && (h("button", { key: '55c489e0c52879c229734f01a2ddf9c1206e0bfc', type: "button", class: "sd-toast__close", onClick: () => this.close.emit(), "aria-label": "Close", title: "Close" }, h("sd-icon", { key: 'd726e7d65a169024fbfdc924375f81b70caebf75', name: "close", size: iconSize, color: typeConfig.content }))))));
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
SdToast.style = sdToastCss();
|
|
@@ -39,7 +39,7 @@ const SdToggleButton = class {
|
|
|
39
39
|
this.change.emit(newValue);
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h("label", { key: '
|
|
42
|
+
return (h("label", { key: '3fa26fc680be2568ceed35ce3e828d68c28bef28', class: this.buttonClasses, "aria-label": this.label || 'toggle button' }, this.label, h("input", { key: 'ac81ea350a145a166cc6cefdb341b326ce84d6f3', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
SdToggleButton.style = sdToggleButtonCss();
|
|
@@ -35,7 +35,7 @@ const SdToggle = class {
|
|
|
35
35
|
this.change.emit(newValue);
|
|
36
36
|
};
|
|
37
37
|
render() {
|
|
38
|
-
return (h("label", { key: '
|
|
38
|
+
return (h("label", { key: 'f6501486607b113d7ca127193eb7fdbcbac00260', "aria-label": this.label || 'toggle', class: this.toggleClasses }, h("input", { key: 'e63d90a710779cd3d6b90c865716c9efc43c81d2', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), this.label && h("span", { key: '10675257acc33a71f7ed76ea9474879f04acc0e0', class: "sd-toggle__label" }, this.label), h("div", { key: 'ec67a74eb272b24739867b50b5fe89f62995719a', class: "sd-toggle__track" }, h("div", { key: '57c785afe9cecc62a17ca3fa7eb6663d302d9c56', class: "sd-toggle__thumb" }))));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
SdToggle.style = sdToggleCss();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TagName } from '../sd-tag/sd-tag.config';
|
|
2
|
+
import type { ButtonV2Name } from '../sd-button-v2/sd-button-v2.config';
|
|
3
|
+
export type ConfirmModalType = 'positive' | 'negative';
|
|
4
|
+
export type PositiveMainButton = 'primary_md' | 'primary_outline_md';
|
|
5
|
+
export type NegativeMainButton = 'danger_md' | 'danger_outline_md';
|
|
6
|
+
export type ConfirmModalMainButton = PositiveMainButton | NegativeMainButton;
|
|
7
|
+
export declare const CONFIRM_MODAL_DEFAULT_BUTTON: Record<ConfirmModalType, ConfirmModalMainButton>;
|
|
8
|
+
export declare const CONFIRM_MODAL_ICON_MAP: Record<ConfirmModalType, IconName>;
|
|
9
|
+
export declare const CONFIRM_MODAL_ICON_COLOR: Record<ConfirmModalType, string>;
|
|
10
|
+
export declare const TITLE_ICON_SIZE: number;
|
|
11
|
+
export declare const CLOSE_ICON_SIZE: number;
|
|
12
|
+
export declare const CLOSE_ICON_COLOR: string;
|
|
13
|
+
export declare const SUB_BUTTON_PRESET: ButtonV2Name;
|
|
14
|
+
export type { TagName, ButtonV2Name };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type ConfirmModalType, type ConfirmModalMainButton, type TagName } from './sd-confirm-modal.config';
|
|
3
|
+
export declare class SdConfirmModal {
|
|
4
|
+
el: HTMLElement;
|
|
5
|
+
private hasSlottedContent;
|
|
6
|
+
private customContentRef?;
|
|
7
|
+
private slotObserver?;
|
|
8
|
+
type: ConfirmModalType;
|
|
9
|
+
modalTitle: string;
|
|
10
|
+
titleClass: string;
|
|
11
|
+
topMessage: string[];
|
|
12
|
+
bottomMessage: string[];
|
|
13
|
+
mainButtonName?: ConfirmModalMainButton;
|
|
14
|
+
mainButtonLabel: string;
|
|
15
|
+
subButtonLabel: string;
|
|
16
|
+
tagPreset?: TagName;
|
|
17
|
+
tagLabel: string;
|
|
18
|
+
slotLabel: string;
|
|
19
|
+
tagContents?: HTMLElement;
|
|
20
|
+
close: EventEmitter<void>;
|
|
21
|
+
confirm: EventEmitter<void>;
|
|
22
|
+
componentWillLoad(): void;
|
|
23
|
+
componentDidLoad(): void;
|
|
24
|
+
componentDidRender(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
private get resolvedMainButton();
|
|
27
|
+
private get hasTagContent();
|
|
28
|
+
private get showContentBox();
|
|
29
|
+
private syncHasSlottedContent;
|
|
30
|
+
render(): any;
|
|
31
|
+
}
|
|
@@ -7,10 +7,13 @@ export declare class SdDropdownButton extends BaseDropdownEvent {
|
|
|
7
7
|
label: string;
|
|
8
8
|
items: DropdownButtonItem[];
|
|
9
9
|
disabled: boolean;
|
|
10
|
+
private static readonly CLOSE_ANIMATION_DURATION;
|
|
10
11
|
isOpen: boolean;
|
|
12
|
+
isAnimatingOut: boolean;
|
|
11
13
|
itemIndex: number;
|
|
12
14
|
private triggerRef?;
|
|
13
15
|
private menuRef?;
|
|
16
|
+
private closeAnimationTimer?;
|
|
14
17
|
click: EventEmitter<DropdownButtonValue>;
|
|
15
18
|
dropDownShow: EventEmitter<{
|
|
16
19
|
isOpen: boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ConfirmModalType, ConfirmModalMainButton } from '../sd-confirm-modal/sd-confirm-modal.config';
|
|
2
|
+
import type { TagName } from '../sd-tag/sd-tag.config';
|
|
3
|
+
export interface ConfirmModalOptions {
|
|
4
|
+
type?: ConfirmModalType;
|
|
5
|
+
title?: string;
|
|
6
|
+
titleClass?: string;
|
|
7
|
+
topMessage?: string[];
|
|
8
|
+
bottomMessage?: string[];
|
|
9
|
+
mainButtonName?: ConfirmModalMainButton;
|
|
10
|
+
mainButtonLabel?: string;
|
|
11
|
+
subButtonLabel?: string;
|
|
12
|
+
tagPreset?: TagName;
|
|
13
|
+
tagLabel?: string;
|
|
14
|
+
slotLabel?: string;
|
|
15
|
+
tagContents?: HTMLElement;
|
|
16
|
+
persistent?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface NoticeModalOptions {
|
|
19
|
+
title?: string;
|
|
20
|
+
titleClass?: string;
|
|
21
|
+
topMessage?: string[];
|
|
22
|
+
bottomMessage?: string[];
|
|
23
|
+
mainButtonLabel?: string;
|
|
24
|
+
subButtonLabel?: string;
|
|
25
|
+
tagPreset?: TagName;
|
|
26
|
+
tagLabel?: string;
|
|
27
|
+
slotLabel?: string;
|
|
28
|
+
tagContents?: HTMLElement;
|
|
29
|
+
persistent?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface ModalEntry {
|
|
32
|
+
id: string;
|
|
33
|
+
modalEl: HTMLElement;
|
|
34
|
+
chain: ModalDialogChainLike;
|
|
35
|
+
persistent: boolean;
|
|
36
|
+
closing: boolean;
|
|
37
|
+
dismissTimerId?: ReturnType<typeof setTimeout>;
|
|
38
|
+
}
|
|
39
|
+
export interface ModalDialogChainLike {
|
|
40
|
+
_triggerOk(): void;
|
|
41
|
+
_triggerCancel(): void;
|
|
42
|
+
}
|
|
43
|
+
export interface SdModalGlobalOptions {
|
|
44
|
+
zIndex?: number;
|
|
45
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConfirmModalOptions, NoticeModalOptions, ModalEntry, ModalDialogChainLike } from './sd-modal-container.config';
|
|
2
|
+
export declare class SdModalContainer {
|
|
3
|
+
el: HTMLElement;
|
|
4
|
+
entries: ModalEntry[];
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
isBackdropVisible: boolean;
|
|
7
|
+
private contentRef?;
|
|
8
|
+
private containerDismissTimerId?;
|
|
9
|
+
handleKeydown(e: KeyboardEvent): void;
|
|
10
|
+
open(options: ConfirmModalOptions, chain: ModalDialogChainLike): Promise<string>;
|
|
11
|
+
openNotice(options: NoticeModalOptions, chain: ModalDialogChainLike): Promise<string>;
|
|
12
|
+
update(id: string, props: Partial<ConfirmModalOptions & NoticeModalOptions>): Promise<void>;
|
|
13
|
+
private createConfirmModal;
|
|
14
|
+
private applyProps;
|
|
15
|
+
private createNoticeModal;
|
|
16
|
+
private applyNoticeProps;
|
|
17
|
+
private handleBackdropClick;
|
|
18
|
+
private shakeModal;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
private getTopEntry;
|
|
21
|
+
private requestDismiss;
|
|
22
|
+
private finalizeDismiss;
|
|
23
|
+
private waitForModalReady;
|
|
24
|
+
private hasOwnProp;
|
|
25
|
+
private setAttr;
|
|
26
|
+
render(): any;
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CLOSE_ICON_SIZE, CLOSE_ICON_COLOR, type TagName } from '../sd-confirm-modal/sd-confirm-modal.config';
|
|
2
|
+
import type { ButtonV2Name } from '../sd-button-v2/sd-button-v2.config';
|
|
3
|
+
export declare const NOTICE_BUTTON_PRESET: ButtonV2Name;
|
|
4
|
+
export { CLOSE_ICON_SIZE, CLOSE_ICON_COLOR, };
|
|
5
|
+
export type { TagName, ButtonV2Name };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type TagName } from './sd-notice-modal.config';
|
|
3
|
+
export declare class SdNoticeModal {
|
|
4
|
+
el: HTMLElement;
|
|
5
|
+
private hasSlottedContent;
|
|
6
|
+
private customContentRef?;
|
|
7
|
+
private slotObserver?;
|
|
8
|
+
modalTitle: string;
|
|
9
|
+
titleClass: string;
|
|
10
|
+
topMessage: string[];
|
|
11
|
+
bottomMessage: string[];
|
|
12
|
+
mainButtonLabel: string;
|
|
13
|
+
subButtonLabel: string;
|
|
14
|
+
tagPreset?: TagName;
|
|
15
|
+
tagLabel: string;
|
|
16
|
+
slotLabel: string;
|
|
17
|
+
tagContents?: HTMLElement;
|
|
18
|
+
close: EventEmitter<void>;
|
|
19
|
+
confirm: EventEmitter<void>;
|
|
20
|
+
componentWillLoad(): void;
|
|
21
|
+
componentDidLoad(): void;
|
|
22
|
+
componentDidRender(): void;
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
private get hasTagContent();
|
|
25
|
+
private get showContentBox();
|
|
26
|
+
private syncHasSlottedContent;
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|
|
@@ -5,12 +5,12 @@ import type { SdTooltipProps } from '../sd-tooltip/sd-tooltip.config';
|
|
|
5
5
|
export declare class SdSelectV2 {
|
|
6
6
|
private static readonly VIEWPORT_PADDING;
|
|
7
7
|
private static readonly PORTAL_OFFSET_Y;
|
|
8
|
+
private static readonly CLOSE_ANIMATION_DURATION;
|
|
8
9
|
el: HTMLElement;
|
|
9
10
|
name: SelectV2Name;
|
|
10
11
|
value: SelectV2Value;
|
|
11
12
|
options: SelectV2Option[];
|
|
12
13
|
placeholder: string;
|
|
13
|
-
width: string;
|
|
14
14
|
maxDropdownWidth: string;
|
|
15
15
|
dropdownHeight: string;
|
|
16
16
|
disabled: boolean;
|
|
@@ -23,7 +23,9 @@ export declare class SdSelectV2 {
|
|
|
23
23
|
labelTooltip: string;
|
|
24
24
|
labelTooltipProps: SdTooltipProps | null;
|
|
25
25
|
emitValue: boolean;
|
|
26
|
+
width: string;
|
|
26
27
|
private isOpen;
|
|
28
|
+
private isAnimatingOut;
|
|
27
29
|
private triggerWidth;
|
|
28
30
|
private resolvedDropdownHeight;
|
|
29
31
|
private resolvedMaxDropdownWidth;
|
|
@@ -34,6 +36,7 @@ export declare class SdSelectV2 {
|
|
|
34
36
|
isOpen: boolean;
|
|
35
37
|
}>;
|
|
36
38
|
private triggerRef?;
|
|
39
|
+
private closeAnimationTimer?;
|
|
37
40
|
private internalName;
|
|
38
41
|
watchIsOpen(newValue: boolean): void;
|
|
39
42
|
private get isMulti();
|
|
@@ -46,6 +49,7 @@ export declare class SdSelectV2 {
|
|
|
46
49
|
private updateDropdownViewportConstraints;
|
|
47
50
|
private handleViewportResize;
|
|
48
51
|
private findOriginalOption;
|
|
52
|
+
private closeDropdown;
|
|
49
53
|
private handleTriggerClick;
|
|
50
54
|
private emitUpdate;
|
|
51
55
|
private handleOptionSelect;
|