@nectary/components 5.50.6 → 5.50.7
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/bundle.js +17 -5
- package/button-group/index.js +1 -1
- package/package.json +1 -1
- package/toast-manager/index.js +16 -4
package/bundle.js
CHANGED
|
@@ -2565,7 +2565,7 @@ const formTypeValues = [
|
|
|
2565
2565
|
"reset",
|
|
2566
2566
|
"button"
|
|
2567
2567
|
];
|
|
2568
|
-
const templateHTML$15 = '<style>:host{display:block}#wrapper{display:flex;box-sizing:border-box;width:100%;height:100
|
|
2568
|
+
const templateHTML$15 = '<style>:host{display:block}#wrapper{display:flex;box-sizing:border-box;width:100%;height:100%;position:relative;z-index:0}</style><div id="wrapper"><slot></slot></div>';
|
|
2569
2569
|
const template$15 = document.createElement("template");
|
|
2570
2570
|
template$15.innerHTML = templateHTML$15;
|
|
2571
2571
|
class ButtonGroup extends NectaryElement {
|
|
@@ -18457,17 +18457,29 @@ class ToastManager extends NectaryElement {
|
|
|
18457
18457
|
item.querySelector("[slot=close]")?.removeEventListener("-click", this.#onCloneCloseClick);
|
|
18458
18458
|
item.querySelector("[slot=action]")?.removeEventListener("-click", this.#onCloneActionClick);
|
|
18459
18459
|
}
|
|
18460
|
+
#itemWrapper(e) {
|
|
18461
|
+
return e.target.closest(".item-wrapper");
|
|
18462
|
+
}
|
|
18463
|
+
#dispatchOriginalSlotClick(item, slotName) {
|
|
18464
|
+
this.#map.get(item)?.querySelector(`[slot=${slotName}]`)?.dispatchEvent(
|
|
18465
|
+
new MouseEvent("click", {
|
|
18466
|
+
bubbles: true,
|
|
18467
|
+
cancelable: true,
|
|
18468
|
+
composed: true
|
|
18469
|
+
})
|
|
18470
|
+
);
|
|
18471
|
+
}
|
|
18460
18472
|
#onCloneCloseClick = (e) => {
|
|
18461
|
-
const item = e
|
|
18473
|
+
const item = this.#itemWrapper(e);
|
|
18462
18474
|
if (item != null) {
|
|
18463
18475
|
item.setAttribute("data-delete-now", "");
|
|
18464
|
-
this.#
|
|
18476
|
+
this.#dispatchOriginalSlotClick(item, "close");
|
|
18465
18477
|
}
|
|
18466
18478
|
};
|
|
18467
18479
|
#onCloneActionClick = (e) => {
|
|
18468
|
-
const item = e
|
|
18480
|
+
const item = this.#itemWrapper(e);
|
|
18469
18481
|
if (item != null) {
|
|
18470
|
-
this.#
|
|
18482
|
+
this.#dispatchOriginalSlotClick(item, "action");
|
|
18471
18483
|
}
|
|
18472
18484
|
};
|
|
18473
18485
|
}
|
package/button-group/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { typeValues } from "../button/utils.js";
|
|
|
2
2
|
import { updateLiteralAttribute, getLiteralAttribute } from "../utils/dom.js";
|
|
3
3
|
import { defineCustomElement, NectaryElement } from "../utils/element.js";
|
|
4
4
|
import { sizeExValues, DEFAULT_SIZE } from "../utils/size.js";
|
|
5
|
-
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;box-sizing:border-box;width:100%;height:100
|
|
5
|
+
const templateHTML = '<style>:host{display:block}#wrapper{display:flex;box-sizing:border-box;width:100%;height:100%;position:relative;z-index:0}</style><div id="wrapper"><slot></slot></div>';
|
|
6
6
|
const template = document.createElement("template");
|
|
7
7
|
template.innerHTML = templateHTML;
|
|
8
8
|
class ButtonGroup extends NectaryElement {
|
package/package.json
CHANGED
package/toast-manager/index.js
CHANGED
|
@@ -187,17 +187,29 @@ class ToastManager extends NectaryElement {
|
|
|
187
187
|
item.querySelector("[slot=close]")?.removeEventListener("-click", this.#onCloneCloseClick);
|
|
188
188
|
item.querySelector("[slot=action]")?.removeEventListener("-click", this.#onCloneActionClick);
|
|
189
189
|
}
|
|
190
|
+
#itemWrapper(e) {
|
|
191
|
+
return e.target.closest(".item-wrapper");
|
|
192
|
+
}
|
|
193
|
+
#dispatchOriginalSlotClick(item, slotName) {
|
|
194
|
+
this.#map.get(item)?.querySelector(`[slot=${slotName}]`)?.dispatchEvent(
|
|
195
|
+
new MouseEvent("click", {
|
|
196
|
+
bubbles: true,
|
|
197
|
+
cancelable: true,
|
|
198
|
+
composed: true
|
|
199
|
+
})
|
|
200
|
+
);
|
|
201
|
+
}
|
|
190
202
|
#onCloneCloseClick = (e) => {
|
|
191
|
-
const item = e
|
|
203
|
+
const item = this.#itemWrapper(e);
|
|
192
204
|
if (item != null) {
|
|
193
205
|
item.setAttribute("data-delete-now", "");
|
|
194
|
-
this.#
|
|
206
|
+
this.#dispatchOriginalSlotClick(item, "close");
|
|
195
207
|
}
|
|
196
208
|
};
|
|
197
209
|
#onCloneActionClick = (e) => {
|
|
198
|
-
const item = e
|
|
210
|
+
const item = this.#itemWrapper(e);
|
|
199
211
|
if (item != null) {
|
|
200
|
-
this.#
|
|
212
|
+
this.#dispatchOriginalSlotClick(item, "action");
|
|
201
213
|
}
|
|
202
214
|
};
|
|
203
215
|
}
|