@scania/tegel 1.30.0 → 1.31.1-feat-button-name-attribute-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-accordion-item.cjs.entry.js +25 -3
- package/dist/cjs/tds-button.cjs.entry.js +5 -4
- package/dist/cjs/tds-folder-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +2 -2
- package/dist/cjs/tds-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +2 -2
- package/dist/cjs/tds-modal.cjs.entry.js +14 -4
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +4 -4
- package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/tds-text-field.cjs.entry.js +5 -5
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -3
- package/dist/cjs/tds-toast.cjs.entry.js +3 -3
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
- package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +77 -4
- package/dist/collection/components/button/button.css +11 -11
- package/dist/collection/components/button/button.js +21 -3
- package/dist/collection/components/modal/modal.js +45 -4
- package/dist/collection/components/popover-core/tds-popover-core.css +843 -12
- package/dist/collection/components/table/table-toolbar/table-toolbar.css +6 -1
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +3 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +2 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +4 -4
- package/dist/collection/components/text-field/text-field.js +5 -5
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toggle/toggle.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/components/{p-d4fa1832.js → p-516d8085.js} +1 -1
- package/dist/components/{p-a2dafd0e.js → p-69109003.js} +3 -3
- package/dist/components/p-96e83134.js +2098 -0
- package/dist/components/tds-accordion-item.js +30 -5
- package/dist/components/tds-button.js +6 -4
- package/dist/components/tds-folder-tab.js +2 -2
- package/dist/components/tds-folder-tabs.js +2 -2
- package/dist/components/tds-header-dropdown.js +2 -2
- package/dist/components/tds-header-launcher.js +2 -2
- package/dist/components/tds-inline-tab.js +2 -2
- package/dist/components/tds-inline-tabs.js +2 -2
- package/dist/components/tds-modal.js +15 -4
- package/dist/components/tds-navigation-tab.js +2 -2
- package/dist/components/tds-navigation-tabs.js +4 -4
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu.js +1 -1
- package/dist/components/tds-table-toolbar.js +3 -3
- package/dist/components/tds-text-field.js +5 -5
- package/dist/components/tds-textarea.js +5 -5
- package/dist/components/tds-toast.js +3 -3
- package/dist/components/tds-toggle.js +2 -2
- package/dist/components/tds-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-accordion-item.entry.js +25 -3
- package/dist/esm/tds-button.entry.js +5 -4
- package/dist/esm/tds-folder-tab.entry.js +2 -2
- package/dist/esm/tds-folder-tabs.entry.js +2 -2
- package/dist/esm/tds-inline-tab.entry.js +2 -2
- package/dist/esm/tds-inline-tabs.entry.js +2 -2
- package/dist/esm/tds-modal.entry.js +14 -4
- package/dist/esm/tds-navigation-tab.entry.js +2 -2
- package/dist/esm/tds-navigation-tabs.entry.js +4 -4
- package/dist/esm/tds-popover-core.entry.js +1 -1
- package/dist/esm/tds-table-toolbar.entry.js +3 -3
- package/dist/esm/tds-text-field.entry.js +5 -5
- package/dist/esm/tds-textarea.entry.js +3 -3
- package/dist/esm/tds-toast.entry.js +3 -3
- package/dist/esm/tds-toggle.entry.js +2 -2
- package/dist/esm/tds-tooltip.entry.js +2 -2
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/{p-a1262f8f.entry.js → p-106e048d.entry.js} +1 -1
- package/dist/tegel/{p-2286d4c3.entry.js → p-10dfd194.entry.js} +1 -1
- package/dist/tegel/p-1297d40e.entry.js +1 -0
- package/dist/tegel/{p-0ca95c76.entry.js → p-212e1fff.entry.js} +1 -1
- package/dist/tegel/p-2b8e97e1.entry.js +1 -0
- package/dist/tegel/p-2c36022d.entry.js +1 -0
- package/dist/tegel/p-3a92d554.entry.js +1 -0
- package/dist/tegel/p-3e4707fb.entry.js +1 -0
- package/dist/tegel/p-3f81c19a.entry.js +1 -0
- package/dist/tegel/{p-2774f177.entry.js → p-46b66490.entry.js} +1 -1
- package/dist/tegel/{p-1116da44.entry.js → p-52adc30c.entry.js} +1 -1
- package/dist/tegel/{p-87ba6285.entry.js → p-64be21db.entry.js} +1 -1
- package/dist/tegel/{p-d29a777f.entry.js → p-67b4b2cf.entry.js} +1 -1
- package/dist/tegel/{p-e7a452a8.entry.js → p-76faaf70.entry.js} +1 -1
- package/dist/tegel/{p-9d8bb017.entry.js → p-78823da3.entry.js} +1 -1
- package/dist/tegel/p-b58c7bed.entry.js +1 -0
- package/dist/tegel/tegel.css +2 -2
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +6 -0
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/modal/modal.d.ts +6 -2
- package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +1 -0
- package/dist/types/components.d.ts +29 -0
- package/package.json +6 -1
- package/dist/components/p-2e25c35b.js +0 -2098
- package/dist/tegel/p-0955d5fc.entry.js +0 -1
- package/dist/tegel/p-26e8f033.entry.js +0 -1
- package/dist/tegel/p-5ade1970.entry.js +0 -1
- package/dist/tegel/p-b6a4f459.entry.js +0 -1
- package/dist/tegel/p-c3d91dfa.entry.js +0 -1
- package/dist/tegel/p-d38039b3.entry.js +0 -1
- package/dist/tegel/p-d56f426f.entry.js +0 -1
|
@@ -11,11 +11,16 @@ export class TdsModal {
|
|
|
11
11
|
this.handleClose = (event) => {
|
|
12
12
|
const closeEvent = this.tdsClose.emit(event);
|
|
13
13
|
this.returnFocusOnClose();
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (closeEvent.defaultPrevented) {
|
|
15
|
+
return;
|
|
16
16
|
}
|
|
17
|
+
this.isShown = false;
|
|
17
18
|
};
|
|
18
19
|
this.handleShow = () => {
|
|
20
|
+
const showEvent = this.tdsOpen.emit();
|
|
21
|
+
if (showEvent.defaultPrevented) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
19
24
|
this.isShown = true;
|
|
20
25
|
};
|
|
21
26
|
/** Checks if click on Modal is on overlay, if so it closes the Modal if prevent is not true. */
|
|
@@ -80,6 +85,10 @@ export class TdsModal {
|
|
|
80
85
|
this.isShown = false;
|
|
81
86
|
this.returnFocusOnClose();
|
|
82
87
|
}
|
|
88
|
+
/** Returns the current open state of the Modal. */
|
|
89
|
+
async isOpen() {
|
|
90
|
+
return this.isShown;
|
|
91
|
+
}
|
|
83
92
|
connectedCallback() {
|
|
84
93
|
if (this.closable === undefined) {
|
|
85
94
|
this.closable = true;
|
|
@@ -196,10 +205,10 @@ export class TdsModal {
|
|
|
196
205
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
197
206
|
const headerId = this.header ? `tds-modal-header-${generateUniqueId()}` : undefined;
|
|
198
207
|
const bodyId = `tds-modal-body-${generateUniqueId()}`;
|
|
199
|
-
return (h(Host, { key: '
|
|
208
|
+
return (h(Host, { key: '2d39760de58fd957585e4370aa88447d85249eca', role: this.tdsAlertDialog, "aria-modal": "true", "aria-describedby": bodyId, "aria-labelledby": headerId, class: {
|
|
200
209
|
show: this.isShown,
|
|
201
210
|
hide: !this.isShown,
|
|
202
|
-
}, onClick: (event) => this.handleOverlayClick(event) }, h("div", { key: '
|
|
211
|
+
}, onClick: (event) => this.handleOverlayClick(event) }, h("div", { key: '5eeaf5c29529bf77ddde4892067f13d312d1bba7', class: "tds-modal-backdrop" }), h("div", { key: '8a6ccd911dfec947a809320a0631d5f9904ef78d', class: `tds-modal tds-modal__actions-${this.actionsPosition} tds-modal-${this.size}` }, h("div", { key: 'b7c760ebded4e98319cec75c161002a579316902', id: headerId, class: "header" }, this.header && h("div", { key: 'db14e71913052ba5367ab95a41a366c7f2dea4a3', class: "header-text" }, this.header), usesHeaderSlot && h("slot", { key: '62b394718c78e564fd50e7ff3328e637a63679e6', name: "header" }), this.closable && (h("button", { key: '9ff8ad81be4f72ee6a298a9ba39a1024269d3ec2', class: "tds-modal-close", "aria-label": "close", onClick: (event) => this.handleClose(event) }, h("tds-icon", { key: 'b34b8a55c7f5c65ce7a3fdee6114c66ee4ab82c3', name: "cross", size: "20px" })))), h("div", { key: 'ab04e506dd94c69d8f91fb774fa85f355f3629d4', id: bodyId, class: "body" }, h("slot", { key: 'f4a8e2377b4cae3a9c4fa1032e896b0b0c58a06a', name: "body" })), usesActionsSlot && h("slot", { key: '09137d7c8b81f91dbf419b10c8a085de25df1272', name: "actions" }))));
|
|
203
212
|
}
|
|
204
213
|
static get is() { return "tds-modal"; }
|
|
205
214
|
static get encapsulation() { return "shadow"; }
|
|
@@ -400,6 +409,21 @@ export class TdsModal {
|
|
|
400
409
|
"resolved": "any",
|
|
401
410
|
"references": {}
|
|
402
411
|
}
|
|
412
|
+
}, {
|
|
413
|
+
"method": "tdsOpen",
|
|
414
|
+
"name": "tdsOpen",
|
|
415
|
+
"bubbles": true,
|
|
416
|
+
"cancelable": true,
|
|
417
|
+
"composed": true,
|
|
418
|
+
"docs": {
|
|
419
|
+
"tags": [],
|
|
420
|
+
"text": "Emits just before Modal is opened."
|
|
421
|
+
},
|
|
422
|
+
"complexType": {
|
|
423
|
+
"original": "void",
|
|
424
|
+
"resolved": "void",
|
|
425
|
+
"references": {}
|
|
426
|
+
}
|
|
403
427
|
}];
|
|
404
428
|
}
|
|
405
429
|
static get methods() {
|
|
@@ -438,6 +462,23 @@ export class TdsModal {
|
|
|
438
462
|
"tags": []
|
|
439
463
|
}
|
|
440
464
|
},
|
|
465
|
+
"isOpen": {
|
|
466
|
+
"complexType": {
|
|
467
|
+
"signature": "() => Promise<boolean>",
|
|
468
|
+
"parameters": [],
|
|
469
|
+
"references": {
|
|
470
|
+
"Promise": {
|
|
471
|
+
"location": "global",
|
|
472
|
+
"id": "global::Promise"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"return": "Promise<boolean>"
|
|
476
|
+
},
|
|
477
|
+
"docs": {
|
|
478
|
+
"text": "Returns the current open state of the Modal.",
|
|
479
|
+
"tags": []
|
|
480
|
+
}
|
|
481
|
+
},
|
|
441
482
|
"initializeModal": {
|
|
442
483
|
"complexType": {
|
|
443
484
|
"signature": "() => Promise<void>",
|