@sellmate/design-system 1.0.75 → 1.0.76
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 +5 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-button_4.cjs.entry.js +2 -2
- package/dist/cjs/sd-ghost-button.cjs.entry.js +10 -5
- package/dist/cjs/sd-modal-container.cjs.entry.js +76 -68
- package/dist/cjs/sd-pagination_5.cjs.entry.js +889 -0
- package/dist/cjs/sd-radio-button.cjs.entry.js +6 -1
- package/dist/cjs/sd-select-v2-list-item_4.cjs.entry.js +65 -5
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +167 -20
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +2 -2
- package/dist/cjs/sd-td.cjs.entry.js +53 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +3 -3
- package/dist/cjs/sd-textarea.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +10 -5
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +77 -71
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +103 -3
- 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 +82 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.css +1 -1
- package/dist/collection/components/sd-table/sd-table.js +170 -21
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +7 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +91 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +9 -4
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +8 -0
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +62 -12
- 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-text-link/sd-text-link.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/collection/utils/modal.js +5 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BALOEavB.js → p-6AvsuYqF.js} +1 -1
- package/dist/components/{p-CTwEbxRN.js → p-6PsyRF61.js} +1 -1
- package/dist/components/{p-DEBakAhm.js → p-7DKZPPev.js} +1 -1
- package/dist/components/p-BBD_1E3n.js +1 -0
- package/dist/components/p-BQvugXhH.js +1 -0
- package/dist/components/p-BRfPoWUn.js +1 -0
- package/dist/components/{p-CHFGWh0m.js → p-C-BOe23n.js} +1 -1
- package/dist/components/p-C7h8lwnU.js +1 -0
- package/dist/components/{p-SDBnyM8D.js → p-CUg9NH6y.js} +1 -1
- package/dist/components/{p-C3dI7f7C.js → p-CgMyz4NQ.js} +1 -1
- package/dist/components/p-Csfj4h1A.js +1 -0
- package/dist/components/{p-Bp0B8tcl.js → p-DAC3TaZV.js} +1 -1
- package/dist/components/p-DfOYYI9m.js +1 -0
- package/dist/components/{p-H-9uoufd.js → p-d4UB2UF7.js} +1 -1
- package/dist/components/p-eEC3ITv0.js +1 -0
- package/dist/components/{p-CWEeXx2E.js → p-nVHDJc9g.js} +1 -1
- package/dist/components/{p-D8fG9Yt7.js → p-rnbt1m4L.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker-calendar.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-radio-button.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-search-input.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-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/p-0e1b27cc.entry.js +1 -0
- package/dist/design-system/p-11029f6e.entry.js +1 -0
- package/dist/design-system/{p-cc62c180.entry.js → p-140b40ab.entry.js} +1 -1
- package/dist/design-system/p-34f7345b.entry.js +1 -0
- package/dist/design-system/p-363c9451.entry.js +1 -0
- package/dist/design-system/{p-fdcfaa7c.entry.js → p-506f2b68.entry.js} +1 -1
- package/dist/design-system/{p-8200b5f2.entry.js → p-531a6a82.entry.js} +1 -1
- package/dist/design-system/p-55b65a41.entry.js +1 -0
- package/dist/design-system/{p-d1dfa0e1.entry.js → p-68d0d67e.entry.js} +1 -1
- package/dist/design-system/p-7fe3a466.entry.js +1 -0
- package/dist/design-system/{p-05a1c092.entry.js → p-9466cd93.entry.js} +1 -1
- package/dist/design-system/{p-33bec0e3.entry.js → p-b683f2fe.entry.js} +1 -1
- package/dist/design-system/p-c521e731.entry.js +1 -0
- package/dist/design-system/{p-16a15368.entry.js → p-c9eb70f5.entry.js} +1 -1
- package/dist/design-system/p-d1846df9.entry.js +1 -0
- package/dist/design-system/{p-2d154fe0.entry.js → p-fdb52620.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-button_4.entry.js +2 -2
- package/dist/esm/sd-ghost-button.entry.js +10 -5
- package/dist/esm/sd-modal-container.entry.js +76 -68
- package/dist/esm/sd-pagination_5.entry.js +883 -0
- package/dist/esm/sd-radio-button.entry.js +6 -1
- package/dist/esm/sd-select-v2-list-item_4.entry.js +65 -5
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +168 -21
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +2 -2
- package/dist/esm/sd-td.entry.js +53 -1
- package/dist/esm/sd-text-link.entry.js +3 -3
- package/dist/esm/sd-textarea.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +6 -4
- package/dist/types/components/sd-radio-button/sd-radio-button.d.ts +1 -0
- package/dist/types/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.d.ts +9 -0
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +4 -0
- package/dist/types/components/sd-table/sd-table.d.ts +17 -0
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +8 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +4 -0
- package/dist/types/components.d.ts +52 -0
- package/hydrate/index.js +481 -141
- package/hydrate/index.mjs +481 -141
- package/package.json +1 -1
- package/dist/cjs/sd-pagination_2.cjs.entry.js +0 -427
- package/dist/cjs/sd-tbody.cjs.entry.js +0 -66
- package/dist/cjs/sd-thead.cjs.entry.js +0 -179
- package/dist/cjs/sd-tr.cjs.entry.js +0 -171
- package/dist/components/p-Bbs5Ws0k.js +0 -1
- package/dist/components/p-CgL8_FSD.js +0 -1
- package/dist/components/p-DuMkBStM.js +0 -1
- package/dist/components/p-vQDL-PZ8.js +0 -1
- package/dist/design-system/p-380198bc.entry.js +0 -1
- package/dist/design-system/p-6b537e2f.entry.js +0 -1
- package/dist/design-system/p-6e90fb80.entry.js +0 -1
- package/dist/design-system/p-7b77c65c.entry.js +0 -1
- package/dist/design-system/p-8f88bd67.entry.js +0 -1
- package/dist/design-system/p-ba5fea6f.entry.js +0 -1
- package/dist/design-system/p-be54d6bd.entry.js +0 -1
- package/dist/design-system/p-c3379a6e.entry.js +0 -1
- package/dist/design-system/p-dc07d618.entry.js +0 -1
- package/dist/design-system/p-ef09409c.entry.js +0 -1
- package/dist/design-system/p-f8237991.entry.js +0 -1
- package/dist/esm/sd-pagination_2.entry.js +0 -424
- package/dist/esm/sd-tbody.entry.js +0 -64
- package/dist/esm/sd-thead.entry.js +0 -177
- package/dist/esm/sd-tr.entry.js +0 -169
|
@@ -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: '77954c9d285339cb48032eec5eca0dcbe308affc', 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: '73c792f19982140f91397a3ec7d6e22914ca316f', class: "sd-toast", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.icon && (index.h("div", { key: 'cc140bfd043b0d0cd6a7697053f736dac707f86b', class: "sd-toast__icon" }, index.h("sd-icon", { key: '85f38036cd39cb4d0f4a43ef0d307ef9faa03eb1', name: this.icon, size: iconSize, color: typeConfig.content }))), index.h("div", { key: '4d36e34a9ccac80fc2ed01f33b1e2aa80d70c78b', class: "sd-toast__content" }, index.h("span", { key: '9105d37004bbde90e8a7118ca5a58a6e4d6953f5', class: "sd-toast__message" }, this.message)), this.link && (index.h("a", { key: 'fdaabae7d8efb6540ce770cc5783b286789cdb3c', href: this.link, class: "sd-toast__link", target: "_blank", rel: "noopener noreferrer" }, this.linkLabel || this.link)), this.useClose && (index.h("sd-ghost-button", { key: 'c5985e50041b8f3e8c77e142fd06afaf0537de47', class: "sd-toast__close", icon: "close", intent: this.type === 'caution' ? 'default' : 'inverse', ariaLabel: "close", size: "xs", onClick: () => this.close.emit() })))));
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
SdToast.style = sdToastCss();
|
|
@@ -120,7 +120,7 @@ const SdToggle = class {
|
|
|
120
120
|
'--sd-toggle-content-select': TOGGLE_COLORS.content.select,
|
|
121
121
|
'--sd-toggle-content-disabled': TOGGLE_COLORS.content.disabled,
|
|
122
122
|
};
|
|
123
|
-
return (index.h("label", { key: '
|
|
123
|
+
return (index.h("label", { key: 'e9bb126d92605cdd3a88ff1840aa79a4b66c7cf8', class: this.toggleClasses, style: cssVars, "aria-label": this.label || 'toggle' }, this.label, index.h("input", { key: '41c18a29c10ae91b84ecd6d2619a40ab99f5d151', style: { display: 'none' }, type: "checkbox", onInput: this.handleChange })));
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
SdToggle.style = sdToggleCss();
|
|
@@ -8,6 +8,11 @@ export class SdGhostButton {
|
|
|
8
8
|
disabled = false;
|
|
9
9
|
click;
|
|
10
10
|
hasWarnedMissingAriaLabel = false;
|
|
11
|
+
componentWillLoad() {
|
|
12
|
+
this.size ??= 'sm';
|
|
13
|
+
this.intent ??= 'default';
|
|
14
|
+
this.ariaLabel ??= '';
|
|
15
|
+
}
|
|
11
16
|
handleClick = (event) => {
|
|
12
17
|
if (this.disabled) {
|
|
13
18
|
event.preventDefault();
|
|
@@ -32,19 +37,19 @@ export class SdGhostButton {
|
|
|
32
37
|
render() {
|
|
33
38
|
const sizeConfig = GHOST_BUTTON_SIZES[this.size];
|
|
34
39
|
const contentColor = this.disabled
|
|
35
|
-
? GHOST_BUTTON_DISABLED_COLORS[this.intent
|
|
36
|
-
: GHOST_BUTTON_CONTENT_COLORS[this.intent
|
|
40
|
+
? GHOST_BUTTON_DISABLED_COLORS[this.intent]
|
|
41
|
+
: GHOST_BUTTON_CONTENT_COLORS[this.intent];
|
|
37
42
|
const accessibleName = this.ariaLabel.trim() || undefined;
|
|
38
|
-
return (h("button", { key: '
|
|
43
|
+
return (h("button", { key: 'd7f6fcbed3526ffb8b90b205dbe2bbf55abf03a0', class: {
|
|
39
44
|
'sd-ghost-button': true,
|
|
40
45
|
'sd-ghost-button--disabled': this.disabled,
|
|
41
46
|
}, type: "button", disabled: this.disabled, "aria-label": accessibleName, style: {
|
|
42
47
|
'--sd-ghost-button-size': `${sizeConfig.size}px`,
|
|
43
48
|
'--sd-ghost-button-radius': `${GHOST_BUTTON_RADIUS[this.size]}px`,
|
|
44
|
-
'--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[this.intent
|
|
49
|
+
'--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[this.intent],
|
|
45
50
|
'--sd-ghost-button-hover-opacity': GHOST_BUTTON_HOVER_OPACITY,
|
|
46
51
|
'--sd-ghost-button-accent': GHOST_BUTTON_FOCUS_RING_COLOR,
|
|
47
|
-
}, onClick: this.handleClick }, h("sd-icon", { key: '
|
|
52
|
+
}, onClick: this.handleClick }, h("sd-icon", { key: '9efc3a3fbf7878a9a50b2efbf054b335d9cddfe0', name: this.icon, size: sizeConfig.icon, color: contentColor })));
|
|
48
53
|
}
|
|
49
54
|
static get is() { return "sd-ghost-button"; }
|
|
50
55
|
static get originalStyleUrls() {
|
|
@@ -5,10 +5,8 @@ const ANIMATION_DURATION = 350;
|
|
|
5
5
|
export class SdModalContainer {
|
|
6
6
|
el;
|
|
7
7
|
autoRemove = false;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
backdropVisible = false;
|
|
11
|
-
layerRef;
|
|
8
|
+
entries = [];
|
|
9
|
+
layerRefs = new Map();
|
|
12
10
|
async open(options, modalRef) {
|
|
13
11
|
const id = `modal-${++modalIdCounter}`;
|
|
14
12
|
const modalEl = this.createConfirmModal(id, options);
|
|
@@ -19,6 +17,7 @@ export class SdModalContainer {
|
|
|
19
17
|
modalRef,
|
|
20
18
|
persistent: !!options.persistent,
|
|
21
19
|
closing: false,
|
|
20
|
+
backdropVisible: false,
|
|
22
21
|
});
|
|
23
22
|
return id;
|
|
24
23
|
}
|
|
@@ -32,6 +31,7 @@ export class SdModalContainer {
|
|
|
32
31
|
modalRef,
|
|
33
32
|
persistent: !!options.persistent,
|
|
34
33
|
closing: false,
|
|
34
|
+
backdropVisible: false,
|
|
35
35
|
});
|
|
36
36
|
return id;
|
|
37
37
|
}
|
|
@@ -46,91 +46,93 @@ export class SdModalContainer {
|
|
|
46
46
|
modalRef,
|
|
47
47
|
persistent: !!options.persistent,
|
|
48
48
|
closing: false,
|
|
49
|
+
backdropVisible: false,
|
|
49
50
|
});
|
|
50
51
|
return id;
|
|
51
52
|
}
|
|
52
53
|
componentDidRender() {
|
|
53
|
-
if (!
|
|
54
|
+
if (!Array.isArray(this.entries))
|
|
54
55
|
return;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
for (const entry of this.entries) {
|
|
57
|
+
if (entry.closing || entry.modalEl.isConnected)
|
|
58
|
+
continue;
|
|
59
|
+
const layerRef = this.layerRefs.get(entry.id);
|
|
60
|
+
if (!layerRef)
|
|
61
|
+
continue;
|
|
62
|
+
const { id, modalEl } = entry;
|
|
63
|
+
layerRef.appendChild(modalEl);
|
|
64
|
+
this.waitForModalReady(modalEl).then(() => {
|
|
65
|
+
requestAnimationFrame(() => {
|
|
66
|
+
const current = this.entries.find(e => e.id === id);
|
|
67
|
+
if (!current || current.closing || !modalEl.isConnected)
|
|
68
|
+
return;
|
|
69
|
+
this.entries = this.entries.map(e => e.id === id ? { ...e, backdropVisible: true } : e);
|
|
70
|
+
modalEl.classList.add('sd-modal-container__modal--visible');
|
|
71
|
+
});
|
|
65
72
|
});
|
|
66
|
-
}
|
|
73
|
+
}
|
|
67
74
|
}
|
|
68
75
|
disconnectedCallback() {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
unregisterModal(
|
|
76
|
+
for (const entry of this.entries ?? []) {
|
|
77
|
+
if (entry.dismissTimerId)
|
|
78
|
+
clearTimeout(entry.dismissTimerId);
|
|
79
|
+
unregisterModal(entry.id);
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
async dismissById(id, reason) {
|
|
75
|
-
|
|
83
|
+
const entry = this.entries.find(e => e.id === id);
|
|
84
|
+
if (!entry)
|
|
76
85
|
return;
|
|
77
|
-
this.requestDismiss(reason);
|
|
86
|
+
this.requestDismiss(id, reason);
|
|
78
87
|
}
|
|
79
88
|
async update(id, props) {
|
|
80
|
-
|
|
89
|
+
const entry = this.entries.find(e => e.id === id && !e.closing);
|
|
90
|
+
if (!entry)
|
|
81
91
|
return;
|
|
82
|
-
const tag =
|
|
92
|
+
const tag = entry.modalEl.tagName.toLowerCase();
|
|
83
93
|
if (tag === 'sd-loading-modal') {
|
|
84
|
-
this.applyLoadingProps(
|
|
94
|
+
this.applyLoadingProps(entry.modalEl, props);
|
|
85
95
|
return;
|
|
86
96
|
}
|
|
87
|
-
this.applyProps(
|
|
97
|
+
this.applyProps(entry.modalEl, props);
|
|
88
98
|
}
|
|
89
99
|
mountEntry(entry) {
|
|
90
|
-
|
|
91
|
-
throw new Error('[sd-modal-container] This instance already manages an active modal.');
|
|
92
|
-
}
|
|
93
|
-
this.entry = entry;
|
|
94
|
-
this.backdropVisible = false;
|
|
95
|
-
this.isVisible = true;
|
|
100
|
+
this.entries = [...(this.entries ?? []), entry];
|
|
96
101
|
registerModal({
|
|
97
102
|
id: entry.id,
|
|
98
103
|
persistent: entry.persistent,
|
|
99
|
-
requestClose: () => this.dispatchClose(),
|
|
104
|
+
requestClose: () => this.dispatchClose(entry.id),
|
|
100
105
|
shake: () => this.shakeModal(entry.modalEl),
|
|
101
106
|
setZIndex: zIndex => {
|
|
102
107
|
this.el.style.setProperty('--sd-modal-container-z-index', String(zIndex));
|
|
103
108
|
},
|
|
104
109
|
});
|
|
105
110
|
}
|
|
106
|
-
attachModalEventListeners(
|
|
107
|
-
modalEl.addEventListener('sdOk', () => this.requestDismiss('confirm'));
|
|
108
|
-
modalEl.addEventListener('sdCancel', () => this.requestDismiss('cancel'));
|
|
109
|
-
modalEl.addEventListener('sdClose', () => this.requestDismiss('close'));
|
|
111
|
+
attachModalEventListeners(id, modalEl) {
|
|
112
|
+
modalEl.addEventListener('sdOk', () => this.requestDismiss(id, 'confirm'));
|
|
113
|
+
modalEl.addEventListener('sdCancel', () => this.requestDismiss(id, 'cancel'));
|
|
114
|
+
modalEl.addEventListener('sdClose', () => this.requestDismiss(id, 'close'));
|
|
110
115
|
}
|
|
111
|
-
attachLoadingModalEventListeners(
|
|
116
|
+
attachLoadingModalEventListeners(id, modalEl) {
|
|
112
117
|
modalEl.addEventListener('sdClick', () => {
|
|
113
|
-
this.
|
|
118
|
+
const entry = this.entries.find(e => e.id === id);
|
|
119
|
+
entry?.modalRef._triggerClick?.();
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
|
-
dispatchClose() {
|
|
117
|
-
this.
|
|
122
|
+
dispatchClose(id) {
|
|
123
|
+
const entry = this.entries.find(e => e.id === id);
|
|
124
|
+
entry?.modalEl.dispatchEvent(new CustomEvent('sdClose'));
|
|
118
125
|
}
|
|
119
|
-
requestDismiss(reason) {
|
|
120
|
-
const currentEntry = this.
|
|
126
|
+
requestDismiss(id, reason) {
|
|
127
|
+
const currentEntry = this.entries.find(e => e.id === id);
|
|
121
128
|
if (!currentEntry || currentEntry.closing)
|
|
122
129
|
return;
|
|
123
130
|
currentEntry.modalEl.classList.remove('sd-modal-container__modal--visible');
|
|
124
131
|
const dismissTimerId = setTimeout(() => {
|
|
125
|
-
this.finalizeDismiss(
|
|
132
|
+
this.finalizeDismiss(id);
|
|
126
133
|
}, ANIMATION_DURATION);
|
|
127
|
-
setModalInteractive(
|
|
128
|
-
this.
|
|
129
|
-
...currentEntry,
|
|
130
|
-
closing: true,
|
|
131
|
-
dismissTimerId,
|
|
132
|
-
};
|
|
133
|
-
this.backdropVisible = false;
|
|
134
|
+
setModalInteractive(id, false);
|
|
135
|
+
this.entries = (this.entries ?? []).map(e => e.id === id ? { ...e, closing: true, dismissTimerId, backdropVisible: false } : e);
|
|
134
136
|
if (reason === 'confirm')
|
|
135
137
|
currentEntry.modalRef._triggerOk();
|
|
136
138
|
else if (reason === 'cancel')
|
|
@@ -139,18 +141,17 @@ export class SdModalContainer {
|
|
|
139
141
|
currentEntry.modalRef._triggerClose();
|
|
140
142
|
}
|
|
141
143
|
finalizeDismiss(id) {
|
|
142
|
-
const currentEntry = this.
|
|
143
|
-
if (!currentEntry
|
|
144
|
+
const currentEntry = this.entries.find(e => e.id === id);
|
|
145
|
+
if (!currentEntry)
|
|
144
146
|
return;
|
|
145
147
|
if (currentEntry.dismissTimerId)
|
|
146
148
|
clearTimeout(currentEntry.dismissTimerId);
|
|
147
149
|
currentEntry.modalEl.remove();
|
|
148
150
|
unregisterModal(id);
|
|
149
151
|
currentEntry.modalRef._triggerDismissed();
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
if (this.autoRemove) {
|
|
152
|
+
this.layerRefs.delete(id);
|
|
153
|
+
this.entries = (this.entries ?? []).filter(e => e.id !== id);
|
|
154
|
+
if (this.autoRemove && this.entries.length === 0) {
|
|
154
155
|
this.el.remove();
|
|
155
156
|
}
|
|
156
157
|
}
|
|
@@ -171,8 +172,14 @@ export class SdModalContainer {
|
|
|
171
172
|
applyLoadingProps(el, options) {
|
|
172
173
|
if (this.hasOwnProp(options, 'state'))
|
|
173
174
|
this.setAttr(el, 'state', options.state);
|
|
174
|
-
if (this.hasOwnProp(options, 'message'))
|
|
175
|
-
|
|
175
|
+
if (this.hasOwnProp(options, 'message')) {
|
|
176
|
+
if (Array.isArray(options.message)) {
|
|
177
|
+
el.message = options.message;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
this.setAttr(el, 'message', options.message);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
176
183
|
if (this.hasOwnProp(options, 'useButton')) {
|
|
177
184
|
if (options.useButton)
|
|
178
185
|
el.setAttribute('use-button', '');
|
|
@@ -218,11 +225,11 @@ export class SdModalContainer {
|
|
|
218
225
|
if (this.hasOwnProp(options, 'tagContents'))
|
|
219
226
|
el.tagContents = options.tagContents;
|
|
220
227
|
}
|
|
221
|
-
handleBackdropClick
|
|
222
|
-
if (!
|
|
228
|
+
handleBackdropClick(id) {
|
|
229
|
+
if (!isTopInteractiveModal(id))
|
|
223
230
|
return;
|
|
224
|
-
requestCloseForModal(
|
|
225
|
-
}
|
|
231
|
+
requestCloseForModal(id);
|
|
232
|
+
}
|
|
226
233
|
shakeModal(modalEl) {
|
|
227
234
|
const cls = 'sd-modal-container__modal--shake';
|
|
228
235
|
modalEl.classList.remove(cls);
|
|
@@ -251,14 +258,15 @@ export class SdModalContainer {
|
|
|
251
258
|
el.setAttribute(name, value);
|
|
252
259
|
}
|
|
253
260
|
render() {
|
|
254
|
-
if (!this.
|
|
261
|
+
if (!this.entries?.length)
|
|
255
262
|
return null;
|
|
256
|
-
return (h("div", { class: "sd-modal-container" }, h("div", { class: "sd-modal-container__layer", "data-modal-id":
|
|
257
|
-
|
|
263
|
+
return (h("div", { class: "sd-modal-container" }, this.entries.map((entry, index) => (h("div", { key: entry.id, class: "sd-modal-container__layer", style: { zIndex: String(index + 1) }, "data-modal-id": entry.id, ref: el => {
|
|
264
|
+
if (el)
|
|
265
|
+
this.layerRefs.set(entry.id, el);
|
|
258
266
|
} }, h("div", { class: {
|
|
259
267
|
'sd-modal-container__backdrop': true,
|
|
260
|
-
'sd-modal-container__backdrop--visible':
|
|
261
|
-
}, onClick: this.handleBackdropClick }))));
|
|
268
|
+
'sd-modal-container__backdrop--visible': entry.backdropVisible,
|
|
269
|
+
}, onClick: () => this.handleBackdropClick(entry.id) }))))));
|
|
262
270
|
}
|
|
263
271
|
static get is() { return "sd-modal-container"; }
|
|
264
272
|
static get originalStyleUrls() {
|
|
@@ -297,9 +305,7 @@ export class SdModalContainer {
|
|
|
297
305
|
}
|
|
298
306
|
static get states() {
|
|
299
307
|
return {
|
|
300
|
-
"
|
|
301
|
-
"isVisible": {},
|
|
302
|
-
"backdropVisible": {}
|
|
308
|
+
"entries": {}
|
|
303
309
|
};
|
|
304
310
|
}
|
|
305
311
|
static get methods() {
|
|
@@ -7,6 +7,11 @@ export class SdRadioButton {
|
|
|
7
7
|
disabled = false;
|
|
8
8
|
name;
|
|
9
9
|
change;
|
|
10
|
+
componentWillLoad() {
|
|
11
|
+
this.size ??= 'sm';
|
|
12
|
+
this.options ??= [];
|
|
13
|
+
this.disabled ??= false;
|
|
14
|
+
}
|
|
10
15
|
handleRadioChange = (optionValue, optionDisabled) => {
|
|
11
16
|
if (this.disabled || optionDisabled)
|
|
12
17
|
return;
|
|
@@ -67,7 +72,7 @@ export class SdRadioButton {
|
|
|
67
72
|
'--sd-radio-button-content-select': RADIO_BUTTON_COLORS.content.select,
|
|
68
73
|
'--sd-radio-button-content-disabled': RADIO_BUTTON_COLORS.content.disabled,
|
|
69
74
|
};
|
|
70
|
-
return (h("div", { key: '
|
|
75
|
+
return (h("div", { key: 'fbc0246d9cf615956121295e29bf8c702ee73edc', class: this.getGroupClasses(), style: cssVars, role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.options.map(option => {
|
|
71
76
|
const isSelected = this.isOptionSelected(option);
|
|
72
77
|
const isDisabled = this.isOptionDisabled(option);
|
|
73
78
|
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__label" }, option.label)));
|
package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js
CHANGED
|
@@ -5,6 +5,8 @@ export class SdSelectV2Listbox {
|
|
|
5
5
|
options = [];
|
|
6
6
|
value = null;
|
|
7
7
|
emitValue = false;
|
|
8
|
+
useSearch = false;
|
|
9
|
+
useSelectAll = false;
|
|
8
10
|
triggerWidth = '200px';
|
|
9
11
|
maxWidth = '640px';
|
|
10
12
|
maxHeight = '260px';
|
|
@@ -22,7 +24,40 @@ export class SdSelectV2Listbox {
|
|
|
22
24
|
get isMulti() {
|
|
23
25
|
return this.type === 'multi' || this.type === 'multi_depth';
|
|
24
26
|
}
|
|
27
|
+
static SELECT_ALL_OPTION = {
|
|
28
|
+
value: '__select_all__',
|
|
29
|
+
label: '전체',
|
|
30
|
+
};
|
|
31
|
+
get showSelectAll() {
|
|
32
|
+
return this.useSelectAll && this.isMulti;
|
|
33
|
+
}
|
|
34
|
+
getAllNonDisabledLeaves() {
|
|
35
|
+
const collect = (opts) => opts.flatMap(o => {
|
|
36
|
+
if (o.disabled)
|
|
37
|
+
return [];
|
|
38
|
+
if (o.children)
|
|
39
|
+
return collect(o.children);
|
|
40
|
+
return [o];
|
|
41
|
+
});
|
|
42
|
+
return collect(this.options);
|
|
43
|
+
}
|
|
44
|
+
get selectAllState() {
|
|
45
|
+
if (!this.showSelectAll)
|
|
46
|
+
return false;
|
|
47
|
+
const allLeaves = this.getAllNonDisabledLeaves();
|
|
48
|
+
if (allLeaves.length === 0)
|
|
49
|
+
return false;
|
|
50
|
+
const selectedValues = this.getSelectedValues();
|
|
51
|
+
const selectedCount = allLeaves.filter(l => selectedValues.has(l.value)).length;
|
|
52
|
+
if (selectedCount === 0)
|
|
53
|
+
return false;
|
|
54
|
+
if (selectedCount === allLeaves.length)
|
|
55
|
+
return true;
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
25
58
|
get showSearch() {
|
|
59
|
+
if (!this.useSearch)
|
|
60
|
+
return false;
|
|
26
61
|
const count = this.isDepth ? countLeaves(this.options) : this.options.length;
|
|
27
62
|
return count >= SEARCH_THRESHOLD;
|
|
28
63
|
}
|
|
@@ -124,6 +159,9 @@ export class SdSelectV2Listbox {
|
|
|
124
159
|
}
|
|
125
160
|
get navigableOptions() {
|
|
126
161
|
const items = [];
|
|
162
|
+
if (this.showSelectAll) {
|
|
163
|
+
items.push(SdSelectV2Listbox.SELECT_ALL_OPTION);
|
|
164
|
+
}
|
|
127
165
|
const walk = (opts) => {
|
|
128
166
|
for (const opt of opts) {
|
|
129
167
|
const isGroup = !!opt.children;
|
|
@@ -137,6 +175,22 @@ export class SdSelectV2Listbox {
|
|
|
137
175
|
walk(this.filteredOptions);
|
|
138
176
|
return items;
|
|
139
177
|
}
|
|
178
|
+
isSelectAllOption(option) {
|
|
179
|
+
return this.showSelectAll && option.value === SdSelectV2Listbox.SELECT_ALL_OPTION.value;
|
|
180
|
+
}
|
|
181
|
+
emitSelectAll() {
|
|
182
|
+
if (!this.showSelectAll)
|
|
183
|
+
return;
|
|
184
|
+
const allLeaves = this.getAllNonDisabledLeaves();
|
|
185
|
+
this.optionSelect.emit({
|
|
186
|
+
option: { ...SdSelectV2Listbox.SELECT_ALL_OPTION, children: allLeaves },
|
|
187
|
+
leaves: allLeaves,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
handleSelectAllClick = (e) => {
|
|
191
|
+
e.stopPropagation();
|
|
192
|
+
this.emitSelectAll();
|
|
193
|
+
};
|
|
140
194
|
isOptionFocused(option) {
|
|
141
195
|
if (this.focusedIndex < 0)
|
|
142
196
|
return false;
|
|
@@ -209,7 +263,13 @@ export class SdSelectV2Listbox {
|
|
|
209
263
|
return;
|
|
210
264
|
e.preventDefault();
|
|
211
265
|
e.stopPropagation();
|
|
212
|
-
|
|
266
|
+
const focused = items[this.focusedIndex];
|
|
267
|
+
if (this.isSelectAllOption(focused)) {
|
|
268
|
+
this.emitSelectAll();
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
this.emitOptionSelect(focused);
|
|
272
|
+
}
|
|
213
273
|
}
|
|
214
274
|
};
|
|
215
275
|
/**
|
|
@@ -288,9 +348,9 @@ export class SdSelectV2Listbox {
|
|
|
288
348
|
'--listbox-max-height': this.maxHeight,
|
|
289
349
|
'--listbox-radius': `${LIST_BOX_LAYOUT.radius}px`,
|
|
290
350
|
};
|
|
291
|
-
return (h("div", { key: '
|
|
351
|
+
return (h("div", { key: '34efe12dfb3829dd7024eb473d0bb6460ad07e61', class: "sd-select-v2-listbox", style: cssVars }, this.showSearch && (h("sd-select-v2-list-item-search", { key: 'd59a97386213e93f905a817b7c3242d1fb5d5035', isScrolled: this.isScrolled, onSdSearchFilter: this.handleSearchFilter })), h("div", { key: '0feb6763afe5ac661de85df2c1a3683e56b17035', class: "sd-select-v2-listbox__list", onScroll: this.handleScroll, ref: el => {
|
|
292
352
|
this.listEl = el;
|
|
293
|
-
} }, 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), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
|
|
353
|
+
} }, this.showSelectAll && (h("sd-select-v2-list-item", { key: 'b4a765ddfadd39808baafd925d0cd2fcdab78800', option: SdSelectV2Listbox.SELECT_ALL_OPTION, depth: 1, isSelected: this.selectAllState, isFocused: this.isOptionFocused(SdSelectV2Listbox.SELECT_ALL_OPTION), useCheckbox: true, onSdListItemClick: this.handleSelectAllClick, onMouseEnter: () => this.handleOptionHover(SdSelectV2Listbox.SELECT_ALL_OPTION) })), 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), isFocused: this.isOptionFocused(option), useCheckbox: this.isMulti, onSdListItemClick: this.handleOptionClick, onMouseEnter: () => this.handleOptionHover(option) })))))));
|
|
294
354
|
}
|
|
295
355
|
static get is() { return "sd-select-v2-listbox"; }
|
|
296
356
|
static get encapsulation() { return "shadow"; }
|
|
@@ -405,6 +465,46 @@ export class SdSelectV2Listbox {
|
|
|
405
465
|
"attribute": "emit-value",
|
|
406
466
|
"defaultValue": "false"
|
|
407
467
|
},
|
|
468
|
+
"useSearch": {
|
|
469
|
+
"type": "boolean",
|
|
470
|
+
"mutable": false,
|
|
471
|
+
"complexType": {
|
|
472
|
+
"original": "boolean",
|
|
473
|
+
"resolved": "boolean",
|
|
474
|
+
"references": {}
|
|
475
|
+
},
|
|
476
|
+
"required": false,
|
|
477
|
+
"optional": false,
|
|
478
|
+
"docs": {
|
|
479
|
+
"tags": [],
|
|
480
|
+
"text": ""
|
|
481
|
+
},
|
|
482
|
+
"getter": false,
|
|
483
|
+
"setter": false,
|
|
484
|
+
"reflect": false,
|
|
485
|
+
"attribute": "use-search",
|
|
486
|
+
"defaultValue": "false"
|
|
487
|
+
},
|
|
488
|
+
"useSelectAll": {
|
|
489
|
+
"type": "boolean",
|
|
490
|
+
"mutable": false,
|
|
491
|
+
"complexType": {
|
|
492
|
+
"original": "boolean",
|
|
493
|
+
"resolved": "boolean",
|
|
494
|
+
"references": {}
|
|
495
|
+
},
|
|
496
|
+
"required": false,
|
|
497
|
+
"optional": false,
|
|
498
|
+
"docs": {
|
|
499
|
+
"tags": [],
|
|
500
|
+
"text": ""
|
|
501
|
+
},
|
|
502
|
+
"getter": false,
|
|
503
|
+
"setter": false,
|
|
504
|
+
"reflect": false,
|
|
505
|
+
"attribute": "use-select-all",
|
|
506
|
+
"defaultValue": "false"
|
|
507
|
+
},
|
|
408
508
|
"triggerWidth": {
|
|
409
509
|
"type": "string",
|
|
410
510
|
"mutable": false,
|
package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js
CHANGED
|
@@ -42,13 +42,13 @@ export class SdSelectV2Trigger {
|
|
|
42
42
|
? SELECT_COLORS.icon.disabled
|
|
43
43
|
: SELECT_COLORS.icon.default,
|
|
44
44
|
};
|
|
45
|
-
return (h("div", { key: '
|
|
45
|
+
return (h("div", { key: 'ec8bf544b2878082a046fbe881afa2369709033f', ref: el => {
|
|
46
46
|
this.triggerEl = el;
|
|
47
47
|
}, tabindex: this.disabled ? -1 : 0, class: {
|
|
48
48
|
'sd-select-v2-trigger': true,
|
|
49
49
|
'sd-select-v2-trigger--open': this.isOpen,
|
|
50
50
|
'sd-select-v2-trigger--disabled': this.disabled,
|
|
51
|
-
}, style: cssVars, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '
|
|
51
|
+
}, style: cssVars, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '1a6a5cf66208aa5a996e788886ff593ec0830d51', class: "sd-select-v2-trigger__content" }, h("span", { key: 'bd905f9149f3842e5e169e1a6086b33164b0ab66', class: "sd-select-v2-trigger__text" }, hasValue ? this.displayText : this.placeholder), h("sd-icon", { key: 'cc487e430f42fdd61540e265a9e5bb01e9045a58', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
52
52
|
'sd-select-v2-trigger__icon': true,
|
|
53
53
|
'sd-select-v2-trigger__icon--open': this.isOpen,
|
|
54
54
|
} }))));
|
|
@@ -25,6 +25,9 @@ export class SdSelectV2 {
|
|
|
25
25
|
labelTooltipProps = null;
|
|
26
26
|
emitValue = false;
|
|
27
27
|
width = '';
|
|
28
|
+
useSearch = false;
|
|
29
|
+
allSelectedLabel = '전체';
|
|
30
|
+
useSelectAll = false;
|
|
28
31
|
isOpen = false;
|
|
29
32
|
isAnimatingOut = false;
|
|
30
33
|
triggerWidth = '200px';
|
|
@@ -66,6 +69,12 @@ export class SdSelectV2 {
|
|
|
66
69
|
if (this.isMulti) {
|
|
67
70
|
if (!Array.isArray(this.value) || this.value.length === 0)
|
|
68
71
|
return '';
|
|
72
|
+
const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
|
|
73
|
+
const selected = this.getSelectedOptions();
|
|
74
|
+
const allSelected = nonDisabledLeaves.length > 0 &&
|
|
75
|
+
nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
|
|
76
|
+
if (allSelected)
|
|
77
|
+
return this.allSelectedLabel ?? '전체';
|
|
69
78
|
const flat = this.flattenOptions(this.options);
|
|
70
79
|
return this.value
|
|
71
80
|
.map(item => {
|
|
@@ -90,6 +99,15 @@ export class SdSelectV2 {
|
|
|
90
99
|
flattenOptions(options) {
|
|
91
100
|
return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
|
|
92
101
|
}
|
|
102
|
+
getNonDisabledLeaves(options) {
|
|
103
|
+
return options.flatMap(o => {
|
|
104
|
+
if (o.disabled)
|
|
105
|
+
return [];
|
|
106
|
+
if (o.children)
|
|
107
|
+
return this.getNonDisabledLeaves(o.children);
|
|
108
|
+
return [o];
|
|
109
|
+
});
|
|
110
|
+
}
|
|
93
111
|
getSelectedOptions() {
|
|
94
112
|
const val = this.value;
|
|
95
113
|
if (!val || !Array.isArray(val))
|
|
@@ -236,15 +254,15 @@ export class SdSelectV2 {
|
|
|
236
254
|
this.closeDropdown();
|
|
237
255
|
},
|
|
238
256
|
};
|
|
239
|
-
return (h("sd-field", { key: '
|
|
257
|
+
return (h("sd-field", { key: '62bb998e1d455a3792001da4849ba867c60cdd9f', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
|
|
240
258
|
this.hovered = true;
|
|
241
259
|
}, onMouseLeave: () => {
|
|
242
260
|
this.hovered = false;
|
|
243
|
-
} }, h("div", { key: '
|
|
261
|
+
} }, h("div", { key: '42fa82a3c53804d9f90aadb0465d52fd9f4e446e', class: "sd-select-v2", ref: el => {
|
|
244
262
|
this.triggerRef = el;
|
|
245
|
-
} }, h("sd-select-v2-trigger", { key: '
|
|
263
|
+
} }, h("sd-select-v2-trigger", { key: 'c97ae1e67019b099eee72f829d554b9e0350af30', ref: el => {
|
|
246
264
|
this.triggerComponentRef = el;
|
|
247
|
-
}, displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '
|
|
265
|
+
}, displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '5018c8bf4c60a13541f0872149d12b92f164ca96', ...portalProps }, h("sd-select-v2-listbox", { key: 'b7222f7649a8f096f085840a3dd97b7aa069152c', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
|
|
248
266
|
}
|
|
249
267
|
static get is() { return "sd-select-v2"; }
|
|
250
268
|
static get originalStyleUrls() {
|
|
@@ -698,6 +716,66 @@ export class SdSelectV2 {
|
|
|
698
716
|
"attribute": "width",
|
|
699
717
|
"defaultValue": "''"
|
|
700
718
|
},
|
|
719
|
+
"useSearch": {
|
|
720
|
+
"type": "boolean",
|
|
721
|
+
"mutable": false,
|
|
722
|
+
"complexType": {
|
|
723
|
+
"original": "boolean",
|
|
724
|
+
"resolved": "boolean",
|
|
725
|
+
"references": {}
|
|
726
|
+
},
|
|
727
|
+
"required": false,
|
|
728
|
+
"optional": false,
|
|
729
|
+
"docs": {
|
|
730
|
+
"tags": [],
|
|
731
|
+
"text": ""
|
|
732
|
+
},
|
|
733
|
+
"getter": false,
|
|
734
|
+
"setter": false,
|
|
735
|
+
"reflect": false,
|
|
736
|
+
"attribute": "use-search",
|
|
737
|
+
"defaultValue": "false"
|
|
738
|
+
},
|
|
739
|
+
"allSelectedLabel": {
|
|
740
|
+
"type": "string",
|
|
741
|
+
"mutable": false,
|
|
742
|
+
"complexType": {
|
|
743
|
+
"original": "string",
|
|
744
|
+
"resolved": "string",
|
|
745
|
+
"references": {}
|
|
746
|
+
},
|
|
747
|
+
"required": false,
|
|
748
|
+
"optional": false,
|
|
749
|
+
"docs": {
|
|
750
|
+
"tags": [],
|
|
751
|
+
"text": ""
|
|
752
|
+
},
|
|
753
|
+
"getter": false,
|
|
754
|
+
"setter": false,
|
|
755
|
+
"reflect": false,
|
|
756
|
+
"attribute": "all-selected-label",
|
|
757
|
+
"defaultValue": "'\uC804\uCCB4'"
|
|
758
|
+
},
|
|
759
|
+
"useSelectAll": {
|
|
760
|
+
"type": "boolean",
|
|
761
|
+
"mutable": false,
|
|
762
|
+
"complexType": {
|
|
763
|
+
"original": "boolean",
|
|
764
|
+
"resolved": "boolean",
|
|
765
|
+
"references": {}
|
|
766
|
+
},
|
|
767
|
+
"required": false,
|
|
768
|
+
"optional": false,
|
|
769
|
+
"docs": {
|
|
770
|
+
"tags": [],
|
|
771
|
+
"text": ""
|
|
772
|
+
},
|
|
773
|
+
"getter": false,
|
|
774
|
+
"setter": false,
|
|
775
|
+
"reflect": false,
|
|
776
|
+
"attribute": "use-select-all",
|
|
777
|
+
"defaultValue": "false"
|
|
778
|
+
},
|
|
701
779
|
"name": {
|
|
702
780
|
"type": "string",
|
|
703
781
|
"mutable": false,
|