@scania/tegel 1.18.0-popover-menu-beta.2 → 1.18.0-popover-menu-beta.4
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-popover-canvas.cjs.entry.js +4 -3
- package/dist/cjs/tds-popover-core.cjs.entry.js +10 -16
- package/dist/cjs/tds-popover-menu.cjs.entry.js +4 -3
- package/dist/cjs/tds-tooltip.cjs.entry.js +4 -3
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/popover-canvas/popover-canvas.js +23 -5
- package/dist/collection/components/popover-core/popover-core.js +31 -19
- package/dist/collection/components/popover-menu/popover-menu.js +23 -5
- package/dist/collection/components/tooltip/tooltip.js +23 -5
- package/dist/components/{p-d70c4fac.js → p-0a052639.js} +6 -4
- package/dist/components/{p-7f2b5fef.js → p-3e1ca414.js} +12 -16
- package/dist/components/tds-header-dropdown.js +2 -2
- package/dist/components/tds-header-launcher.js +2 -2
- 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 +6 -4
- package/dist/components/tds-tooltip.js +7 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-popover-canvas.entry.js +4 -3
- package/dist/esm/tds-popover-core.entry.js +10 -16
- package/dist/esm/tds-popover-menu.entry.js +4 -3
- package/dist/esm/tds-tooltip.entry.js +4 -3
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-1de95bce.entry.js +1 -0
- package/dist/tegel/p-34d7654b.entry.js +1 -0
- package/dist/tegel/p-94e14ba0.entry.js +1 -0
- package/dist/tegel/p-9f47e5a1.entry.js +1 -0
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +2 -0
- package/dist/types/components/popover-core/popover-core.d.ts +3 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +2 -0
- package/dist/types/components.d.ts +32 -0
- package/package.json +1 -1
- package/dist/tegel/p-4bab99d5.entry.js +0 -1
- package/dist/tegel/p-73dd2dbb.entry.js +0 -1
- package/dist/tegel/p-9c328037.entry.js +0 -1
- package/dist/tegel/p-f0d46e61.entry.js +0 -1
|
@@ -30,7 +30,7 @@ export class TdsPopoverCore {
|
|
|
30
30
|
event.stopPropagation();
|
|
31
31
|
this.setIsShown(false);
|
|
32
32
|
}.bind(this);
|
|
33
|
-
this.selector =
|
|
33
|
+
this.selector = undefined;
|
|
34
34
|
this.referenceEl = undefined;
|
|
35
35
|
this.show = null;
|
|
36
36
|
this.placement = 'auto';
|
|
@@ -39,10 +39,12 @@ export class TdsPopoverCore {
|
|
|
39
39
|
this.modifiers = [];
|
|
40
40
|
this.trigger = 'click';
|
|
41
41
|
this.autoHide = true;
|
|
42
|
+
this.disableLogic = false;
|
|
42
43
|
this.renderedShowValue = false;
|
|
43
44
|
this.popperInstance = undefined;
|
|
44
45
|
this.target = undefined;
|
|
45
46
|
this.isShown = false;
|
|
47
|
+
this.disableLogicState = false;
|
|
46
48
|
}
|
|
47
49
|
/** Property for closing popover programmatically */
|
|
48
50
|
async close() {
|
|
@@ -76,7 +78,6 @@ export class TdsPopoverCore {
|
|
|
76
78
|
onReferenceElChanged(newValue, oldValue) {
|
|
77
79
|
if (newValue !== oldValue) {
|
|
78
80
|
this.initialize({ referenceEl: newValue, trigger: this.trigger });
|
|
79
|
-
console.log('initialize called from onReferenceElChanged');
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
onTriggerChanged(newValue) {
|
|
@@ -84,17 +85,14 @@ export class TdsPopoverCore {
|
|
|
84
85
|
referenceEl: this.referenceEl,
|
|
85
86
|
trigger: newValue,
|
|
86
87
|
});
|
|
87
|
-
console.log('initialize called from onTriggerChanged');
|
|
88
88
|
}
|
|
89
89
|
initialize({ referenceEl, trigger, }) {
|
|
90
90
|
this.cleanUp();
|
|
91
91
|
if (typeof referenceEl !== 'undefined') {
|
|
92
92
|
this.target = referenceEl;
|
|
93
|
-
console.log('target set to referenceEl:', referenceEl);
|
|
94
93
|
}
|
|
95
94
|
else {
|
|
96
95
|
this.target = this.selector ? document.querySelector(this.selector) : null;
|
|
97
|
-
console.log('target set to selector:', this.selector);
|
|
98
96
|
}
|
|
99
97
|
this.popperInstance = this.target
|
|
100
98
|
? createPopper(this.target, this.host, {
|
|
@@ -114,9 +112,6 @@ export class TdsPopoverCore {
|
|
|
114
112
|
if (!this.popperInstance) {
|
|
115
113
|
console.error(`Could not initialize: reference element not found.`);
|
|
116
114
|
}
|
|
117
|
-
else {
|
|
118
|
-
console.log('popperInstance initialized');
|
|
119
|
-
}
|
|
120
115
|
if (trigger === 'click' && this.show === null) {
|
|
121
116
|
this.target.addEventListener('click', this.onClickTarget);
|
|
122
117
|
}
|
|
@@ -146,34 +141,33 @@ export class TdsPopoverCore {
|
|
|
146
141
|
(_h = this.popperInstance) === null || _h === void 0 ? void 0 : _h.destroy();
|
|
147
142
|
}
|
|
148
143
|
connectedCallback() {
|
|
149
|
-
|
|
144
|
+
if ((this.selector === undefined && this.referenceEl === undefined) || this.disableLogic) {
|
|
145
|
+
this.disableLogicState = true;
|
|
146
|
+
console.warn('TDS-POPOVER-CORE: Popover internal logic disabled.');
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
150
149
|
this.initialize({
|
|
151
150
|
referenceEl: this.referenceEl,
|
|
152
151
|
trigger: this.trigger,
|
|
153
152
|
});
|
|
154
|
-
console.log('connectedCallback exit:', this.referenceEl, this.trigger);
|
|
155
153
|
}
|
|
156
154
|
componentDidRender() {
|
|
157
|
-
|
|
158
|
-
if (this.isShown && !this.renderedShowValue) {
|
|
155
|
+
if (this.isShown && !this.renderedShowValue && !this.disableLogicState) {
|
|
159
156
|
// Here we update the popper position since its position is wrong
|
|
160
157
|
// before it is rendered.
|
|
161
158
|
this.popperInstance.update();
|
|
162
159
|
}
|
|
163
160
|
this.renderedShowValue = this.isShown;
|
|
164
|
-
console.log('componentDidRender exit:', this.popperInstance);
|
|
165
161
|
}
|
|
166
162
|
disconnectedCallback() {
|
|
167
|
-
console.log('disconnectedCallback entry:');
|
|
168
163
|
this.cleanUp();
|
|
169
|
-
console.log('disconnectedCallback exit:');
|
|
170
164
|
}
|
|
171
165
|
render() {
|
|
172
166
|
let hostStyle = {};
|
|
173
167
|
if (this.autoHide) {
|
|
174
168
|
hostStyle = { display: this.isShown ? 'block' : 'none' };
|
|
175
169
|
}
|
|
176
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: '811d53e1c2a8b4a87e5e319eea4fa1a34084e997', style: hostStyle, id: `tds-popover-core-${this.uuid}` }, h("slot", { key: 'd529c08dcc752475ec546d74f00d2d33479f4033' })));
|
|
177
171
|
}
|
|
178
172
|
static get is() { return "tds-popover-core"; }
|
|
179
173
|
static get encapsulation() { return "scoped"; }
|
|
@@ -194,8 +188,7 @@ export class TdsPopoverCore {
|
|
|
194
188
|
"text": "The CSS-selector for an element that will trigger the pop-over"
|
|
195
189
|
},
|
|
196
190
|
"attribute": "selector",
|
|
197
|
-
"reflect": false
|
|
198
|
-
"defaultValue": "''"
|
|
191
|
+
"reflect": false
|
|
199
192
|
},
|
|
200
193
|
"referenceEl": {
|
|
201
194
|
"type": "unknown",
|
|
@@ -351,6 +344,24 @@ export class TdsPopoverCore {
|
|
|
351
344
|
"attribute": "auto-hide",
|
|
352
345
|
"reflect": false,
|
|
353
346
|
"defaultValue": "true"
|
|
347
|
+
},
|
|
348
|
+
"disableLogic": {
|
|
349
|
+
"type": "boolean",
|
|
350
|
+
"mutable": false,
|
|
351
|
+
"complexType": {
|
|
352
|
+
"original": "boolean",
|
|
353
|
+
"resolved": "boolean",
|
|
354
|
+
"references": {}
|
|
355
|
+
},
|
|
356
|
+
"required": false,
|
|
357
|
+
"optional": false,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [],
|
|
360
|
+
"text": "Decides if the popover should disable its internal logic. Leaving selector or referenceEl empty will disable logic too."
|
|
361
|
+
},
|
|
362
|
+
"attribute": "disable-logic",
|
|
363
|
+
"reflect": false,
|
|
364
|
+
"defaultValue": "false"
|
|
354
365
|
}
|
|
355
366
|
};
|
|
356
367
|
}
|
|
@@ -359,7 +370,8 @@ export class TdsPopoverCore {
|
|
|
359
370
|
"renderedShowValue": {},
|
|
360
371
|
"popperInstance": {},
|
|
361
372
|
"target": {},
|
|
362
|
-
"isShown": {}
|
|
373
|
+
"isShown": {},
|
|
374
|
+
"disableLogicState": {}
|
|
363
375
|
};
|
|
364
376
|
}
|
|
365
377
|
static get events() {
|
|
@@ -6,13 +6,14 @@ import inheritAttributes from "../../utils/inheritAttributes";
|
|
|
6
6
|
export class TdsPopoverMenu {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.inheritedAttributes = [];
|
|
9
|
-
this.selector =
|
|
9
|
+
this.selector = undefined;
|
|
10
10
|
this.referenceEl = undefined;
|
|
11
11
|
this.show = null;
|
|
12
12
|
this.placement = 'auto';
|
|
13
13
|
this.offsetSkidding = 0;
|
|
14
14
|
this.offsetDistance = 8;
|
|
15
15
|
this.fluidWidth = false;
|
|
16
|
+
this.disableLogic = false;
|
|
16
17
|
this.childRef = undefined;
|
|
17
18
|
}
|
|
18
19
|
/** Property for closing popover programmatically */
|
|
@@ -25,13 +26,13 @@ export class TdsPopoverMenu {
|
|
|
25
26
|
}
|
|
26
27
|
render() {
|
|
27
28
|
var _a;
|
|
28
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: '4304608f4f9e861855baf58202190e0d75649d6d' }, h("tds-popover-core", { key: '8c29640234fce29c8cf467f5f84c239b6632a9c2', class: {
|
|
29
30
|
'tds-popover-menu': true,
|
|
30
31
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
31
32
|
'fluid-width': this.fluidWidth,
|
|
32
33
|
}, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, ref: (el) => {
|
|
33
34
|
this.childRef = el;
|
|
34
|
-
} }, h("div", { key: '
|
|
35
|
+
}, disableLogic: this.disableLogic }, h("div", { key: 'e1627372bdcd36ac48c613b69e633066da891fa5', role: "list" }, h("slot", { key: '29551d047ed414e37298194833a5a7510c79e9fe' })))));
|
|
35
36
|
}
|
|
36
37
|
static get is() { return "tds-popover-menu"; }
|
|
37
38
|
static get encapsulation() { return "scoped"; }
|
|
@@ -62,8 +63,7 @@ export class TdsPopoverMenu {
|
|
|
62
63
|
"text": "The CSS-selector for an element that will trigger the pop-over"
|
|
63
64
|
},
|
|
64
65
|
"attribute": "selector",
|
|
65
|
-
"reflect": false
|
|
66
|
-
"defaultValue": "''"
|
|
66
|
+
"reflect": false
|
|
67
67
|
},
|
|
68
68
|
"referenceEl": {
|
|
69
69
|
"type": "unknown",
|
|
@@ -180,6 +180,24 @@ export class TdsPopoverMenu {
|
|
|
180
180
|
"attribute": "fluid-width",
|
|
181
181
|
"reflect": false,
|
|
182
182
|
"defaultValue": "false"
|
|
183
|
+
},
|
|
184
|
+
"disableLogic": {
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "boolean",
|
|
189
|
+
"resolved": "boolean",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": false,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": "Decides if the popover should disable its internal logic. Leaving selector or referenceEl empty will disable logic too."
|
|
197
|
+
},
|
|
198
|
+
"attribute": "disable-logic",
|
|
199
|
+
"reflect": false,
|
|
200
|
+
"defaultValue": "false"
|
|
183
201
|
}
|
|
184
202
|
};
|
|
185
203
|
}
|
|
@@ -31,7 +31,7 @@ export class TdsTooltip {
|
|
|
31
31
|
];
|
|
32
32
|
this.inheritedAttributes = [];
|
|
33
33
|
this.text = '';
|
|
34
|
-
this.selector =
|
|
34
|
+
this.selector = undefined;
|
|
35
35
|
this.referenceEl = undefined;
|
|
36
36
|
this.mouseOverTooltip = false;
|
|
37
37
|
this.trigger = 'hover';
|
|
@@ -39,6 +39,7 @@ export class TdsTooltip {
|
|
|
39
39
|
this.placement = 'bottom';
|
|
40
40
|
this.offsetSkidding = 0;
|
|
41
41
|
this.offsetDistance = 8;
|
|
42
|
+
this.disableLogic = false;
|
|
42
43
|
}
|
|
43
44
|
componentWillLoad() {
|
|
44
45
|
this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
|
|
@@ -51,7 +52,7 @@ export class TdsTooltip {
|
|
|
51
52
|
}
|
|
52
53
|
render() {
|
|
53
54
|
var _a;
|
|
54
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '0ba06d727ee800ced695616820ac073fb5edf0bd' }, h("tds-popover-core", Object.assign({ key: 'c361b1cec7c55cc6ce2a758f647f9e5022929cf6' }, this.inheritedAttributes, { class: {
|
|
55
56
|
'tds-tooltip': true,
|
|
56
57
|
[`tds-tooltip-${this.border}`]: true,
|
|
57
58
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
@@ -60,7 +61,7 @@ export class TdsTooltip {
|
|
|
60
61
|
this.show = true;
|
|
61
62
|
}, onInternalTdsClose: () => {
|
|
62
63
|
this.show = false;
|
|
63
|
-
} }), this.text, h("slot", { key: '
|
|
64
|
+
}, disableLogic: this.disableLogic }), this.text, h("slot", { key: 'd38f0605a9b903b7aed147c65bb2aa98a885c73b' }))));
|
|
64
65
|
}
|
|
65
66
|
static get is() { return "tds-tooltip"; }
|
|
66
67
|
static get encapsulation() { return "scoped"; }
|
|
@@ -109,8 +110,7 @@ export class TdsTooltip {
|
|
|
109
110
|
"text": "The CSS-selector for an element that will trigger the Tooltip"
|
|
110
111
|
},
|
|
111
112
|
"attribute": "selector",
|
|
112
|
-
"reflect": false
|
|
113
|
-
"defaultValue": "''"
|
|
113
|
+
"reflect": false
|
|
114
114
|
},
|
|
115
115
|
"referenceEl": {
|
|
116
116
|
"type": "unknown",
|
|
@@ -245,6 +245,24 @@ export class TdsTooltip {
|
|
|
245
245
|
"attribute": "offset-distance",
|
|
246
246
|
"reflect": false,
|
|
247
247
|
"defaultValue": "8"
|
|
248
|
+
},
|
|
249
|
+
"disableLogic": {
|
|
250
|
+
"type": "boolean",
|
|
251
|
+
"mutable": false,
|
|
252
|
+
"complexType": {
|
|
253
|
+
"original": "boolean",
|
|
254
|
+
"resolved": "boolean",
|
|
255
|
+
"references": {}
|
|
256
|
+
},
|
|
257
|
+
"required": false,
|
|
258
|
+
"optional": false,
|
|
259
|
+
"docs": {
|
|
260
|
+
"tags": [],
|
|
261
|
+
"text": "Decides if the popover should disable its internal logic. Leaving selector or referenceEl empty will disable logic too."
|
|
262
|
+
},
|
|
263
|
+
"attribute": "disable-logic",
|
|
264
|
+
"reflect": false,
|
|
265
|
+
"defaultValue": "false"
|
|
248
266
|
}
|
|
249
267
|
};
|
|
250
268
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { i as inheritAttributes } from './p-3fe9cbbf.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-3e1ca414.js';
|
|
4
4
|
|
|
5
5
|
const popoverCanvasCss = ".tds-popover-canvas.sc-tds-popover-canvas{box-sizing:border-box;display:inline-block;color:var(--tds-popover-canvas-color);background-color:var(--tds-popover-canvas-background);box-shadow:0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);border-radius:4px;z-index:900}.tds-popover-canvas.sc-tds-popover-canvas *.sc-tds-popover-canvas{box-sizing:border-box}";
|
|
6
6
|
const TdsPopoverCanvasStyle0 = popoverCanvasCss;
|
|
@@ -10,13 +10,14 @@ const TdsPopoverCanvas = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCanvas
|
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
this.inheritedAttributes = [];
|
|
13
|
-
this.selector =
|
|
13
|
+
this.selector = undefined;
|
|
14
14
|
this.referenceEl = undefined;
|
|
15
15
|
this.show = null;
|
|
16
16
|
this.placement = 'auto';
|
|
17
17
|
this.offsetSkidding = 0;
|
|
18
18
|
this.offsetDistance = 8;
|
|
19
19
|
this.modifiers = [];
|
|
20
|
+
this.disableLogic = false;
|
|
20
21
|
this.childRef = undefined;
|
|
21
22
|
}
|
|
22
23
|
/** Property for closing popover programmatically */
|
|
@@ -29,12 +30,12 @@ const TdsPopoverCanvas = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCanvas
|
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
32
|
var _a;
|
|
32
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '4ed77f8b8004d757ffdcc82fff8328cb010ea3a9' }, h("tds-popover-core", Object.assign({ key: 'da00016b2f9fa1370e1a60a1bce57a6e17b8a056' }, this.inheritedAttributes, { class: {
|
|
33
34
|
'tds-popover-canvas': true,
|
|
34
35
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
35
36
|
}, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, modifiers: this.modifiers, trigger: 'click', ref: (el) => {
|
|
36
37
|
this.childRef = el;
|
|
37
|
-
} }), h("div", { key: '
|
|
38
|
+
}, disableLogic: this.disableLogic }), h("div", { key: '341205d74cd392f945be736b50858a2b75e7847d' }, h("slot", { key: '42dee58764e8d5a1f5287e0a878c3859cdfdf74d' })))));
|
|
38
39
|
}
|
|
39
40
|
get host() { return this; }
|
|
40
41
|
static get style() { return TdsPopoverCanvasStyle0; }
|
|
@@ -46,6 +47,7 @@ const TdsPopoverCanvas = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCanvas
|
|
|
46
47
|
"offsetSkidding": [2, "offset-skidding"],
|
|
47
48
|
"offsetDistance": [2, "offset-distance"],
|
|
48
49
|
"modifiers": [16],
|
|
50
|
+
"disableLogic": [4, "disable-logic"],
|
|
49
51
|
"childRef": [32],
|
|
50
52
|
"close": [64]
|
|
51
53
|
}]);
|
|
@@ -1825,7 +1825,7 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1825
1825
|
event.stopPropagation();
|
|
1826
1826
|
this.setIsShown(false);
|
|
1827
1827
|
}.bind(this);
|
|
1828
|
-
this.selector =
|
|
1828
|
+
this.selector = undefined;
|
|
1829
1829
|
this.referenceEl = undefined;
|
|
1830
1830
|
this.show = null;
|
|
1831
1831
|
this.placement = 'auto';
|
|
@@ -1834,10 +1834,12 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1834
1834
|
this.modifiers = [];
|
|
1835
1835
|
this.trigger = 'click';
|
|
1836
1836
|
this.autoHide = true;
|
|
1837
|
+
this.disableLogic = false;
|
|
1837
1838
|
this.renderedShowValue = false;
|
|
1838
1839
|
this.popperInstance = undefined;
|
|
1839
1840
|
this.target = undefined;
|
|
1840
1841
|
this.isShown = false;
|
|
1842
|
+
this.disableLogicState = false;
|
|
1841
1843
|
}
|
|
1842
1844
|
/** Property for closing popover programmatically */
|
|
1843
1845
|
async close() {
|
|
@@ -1871,7 +1873,6 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1871
1873
|
onReferenceElChanged(newValue, oldValue) {
|
|
1872
1874
|
if (newValue !== oldValue) {
|
|
1873
1875
|
this.initialize({ referenceEl: newValue, trigger: this.trigger });
|
|
1874
|
-
console.log('initialize called from onReferenceElChanged');
|
|
1875
1876
|
}
|
|
1876
1877
|
}
|
|
1877
1878
|
onTriggerChanged(newValue) {
|
|
@@ -1879,17 +1880,14 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1879
1880
|
referenceEl: this.referenceEl,
|
|
1880
1881
|
trigger: newValue,
|
|
1881
1882
|
});
|
|
1882
|
-
console.log('initialize called from onTriggerChanged');
|
|
1883
1883
|
}
|
|
1884
1884
|
initialize({ referenceEl, trigger, }) {
|
|
1885
1885
|
this.cleanUp();
|
|
1886
1886
|
if (typeof referenceEl !== 'undefined') {
|
|
1887
1887
|
this.target = referenceEl;
|
|
1888
|
-
console.log('target set to referenceEl:', referenceEl);
|
|
1889
1888
|
}
|
|
1890
1889
|
else {
|
|
1891
1890
|
this.target = this.selector ? document.querySelector(this.selector) : null;
|
|
1892
|
-
console.log('target set to selector:', this.selector);
|
|
1893
1891
|
}
|
|
1894
1892
|
this.popperInstance = this.target
|
|
1895
1893
|
? createPopper(this.target, this.host, {
|
|
@@ -1909,9 +1907,6 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1909
1907
|
if (!this.popperInstance) {
|
|
1910
1908
|
console.error(`Could not initialize: reference element not found.`);
|
|
1911
1909
|
}
|
|
1912
|
-
else {
|
|
1913
|
-
console.log('popperInstance initialized');
|
|
1914
|
-
}
|
|
1915
1910
|
if (trigger === 'click' && this.show === null) {
|
|
1916
1911
|
this.target.addEventListener('click', this.onClickTarget);
|
|
1917
1912
|
}
|
|
@@ -1941,34 +1936,33 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1941
1936
|
(_h = this.popperInstance) === null || _h === void 0 ? void 0 : _h.destroy();
|
|
1942
1937
|
}
|
|
1943
1938
|
connectedCallback() {
|
|
1944
|
-
|
|
1939
|
+
if ((this.selector === undefined && this.referenceEl === undefined) || this.disableLogic) {
|
|
1940
|
+
this.disableLogicState = true;
|
|
1941
|
+
console.warn('TDS-POPOVER-CORE: Popover internal logic disabled.');
|
|
1942
|
+
return;
|
|
1943
|
+
}
|
|
1945
1944
|
this.initialize({
|
|
1946
1945
|
referenceEl: this.referenceEl,
|
|
1947
1946
|
trigger: this.trigger,
|
|
1948
1947
|
});
|
|
1949
|
-
console.log('connectedCallback exit:', this.referenceEl, this.trigger);
|
|
1950
1948
|
}
|
|
1951
1949
|
componentDidRender() {
|
|
1952
|
-
|
|
1953
|
-
if (this.isShown && !this.renderedShowValue) {
|
|
1950
|
+
if (this.isShown && !this.renderedShowValue && !this.disableLogicState) {
|
|
1954
1951
|
// Here we update the popper position since its position is wrong
|
|
1955
1952
|
// before it is rendered.
|
|
1956
1953
|
this.popperInstance.update();
|
|
1957
1954
|
}
|
|
1958
1955
|
this.renderedShowValue = this.isShown;
|
|
1959
|
-
console.log('componentDidRender exit:', this.popperInstance);
|
|
1960
1956
|
}
|
|
1961
1957
|
disconnectedCallback() {
|
|
1962
|
-
console.log('disconnectedCallback entry:');
|
|
1963
1958
|
this.cleanUp();
|
|
1964
|
-
console.log('disconnectedCallback exit:');
|
|
1965
1959
|
}
|
|
1966
1960
|
render() {
|
|
1967
1961
|
let hostStyle = {};
|
|
1968
1962
|
if (this.autoHide) {
|
|
1969
1963
|
hostStyle = { display: this.isShown ? 'block' : 'none' };
|
|
1970
1964
|
}
|
|
1971
|
-
return (h(Host, { key: '
|
|
1965
|
+
return (h(Host, { key: '811d53e1c2a8b4a87e5e319eea4fa1a34084e997', style: hostStyle, id: `tds-popover-core-${this.uuid}` }, h("slot", { key: 'd529c08dcc752475ec546d74f00d2d33479f4033' })));
|
|
1972
1966
|
}
|
|
1973
1967
|
get host() { return this; }
|
|
1974
1968
|
static get watchers() { return {
|
|
@@ -1986,10 +1980,12 @@ const TdsPopoverCore = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCore ext
|
|
|
1986
1980
|
"modifiers": [16],
|
|
1987
1981
|
"trigger": [1],
|
|
1988
1982
|
"autoHide": [4, "auto-hide"],
|
|
1983
|
+
"disableLogic": [4, "disable-logic"],
|
|
1989
1984
|
"renderedShowValue": [32],
|
|
1990
1985
|
"popperInstance": [32],
|
|
1991
1986
|
"target": [32],
|
|
1992
1987
|
"isShown": [32],
|
|
1988
|
+
"disableLogicState": [32],
|
|
1993
1989
|
"close": [64]
|
|
1994
1990
|
}, [[8, "click", "onAnyClick"], [8, "internalTdsShow", "onTdsShow"]], {
|
|
1995
1991
|
"show": ["onShowChange"],
|
|
@@ -3,8 +3,8 @@ import { g as generateUniqueId } from './p-11648030.js';
|
|
|
3
3
|
import { d as defineCustomElement$6 } from './p-30de8ac4.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './p-0676aa23.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-3e74be57.js';
|
|
6
|
-
import { d as defineCustomElement$3 } from './p-
|
|
7
|
-
import { d as defineCustomElement$2 } from './p-
|
|
6
|
+
import { d as defineCustomElement$3 } from './p-0a052639.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './p-3e1ca414.js';
|
|
8
8
|
|
|
9
9
|
const headerDropdownCss = ":host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .menu::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .menu::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}:host .menu::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .menu::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .menu{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}:host .state-open .dropdown-icon{transform:rotatetds-z-index(180deg)}:host .state-open .button{position:relative;z-index:901}";
|
|
10
10
|
const TdsHeaderDropdownStyle0 = headerDropdownCss;
|
|
@@ -5,8 +5,8 @@ import { d as defineCustomElement$7 } from './p-30de8ac4.js';
|
|
|
5
5
|
import { d as defineCustomElement$6 } from './p-0676aa23.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './p-8e74bb22.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './p-3e74be57.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './p-
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-0a052639.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-3e1ca414.js';
|
|
10
10
|
|
|
11
11
|
const headerLauncherCss = ":host{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}:host .wrapper{height:var(--tds-header-height);position:relative}:host .wrapper .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-radius:0}:host .wrapper .menu:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background:var(--tds-scrollbar-hover-thumb-color);background-clip:padding-box}:host .wrapper .menu::-webkit-scrollbar{width:var(--tds-scrollbar-width)}:host .wrapper .menu::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}:host .wrapper .menu::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}:host .wrapper .menu::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){:host .wrapper .menu{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}@media all and (max-width: 384px){:host .wrapper .menu{width:100vw}}:host .wrapper.state-list-type-menu .menu{height:calc(100vh - var(--tds-header-height))}:host .wrapper.state-open .button{position:relative;z-index:901}";
|
|
12
12
|
const TdsHeaderLauncherStyle0 = headerLauncherCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TdsPopoverCanvas$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { T as TdsPopoverCanvas$1, d as defineCustomElement$1 } from './p-0a052639.js';
|
|
2
2
|
|
|
3
3
|
const TdsPopoverCanvas = TdsPopoverCanvas$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { i as inheritAttributes } from './p-3fe9cbbf.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-3e1ca414.js';
|
|
4
4
|
|
|
5
5
|
const popoverMenuCss = ".tds-popover-menu.sc-tds-popover-menu{box-sizing:border-box;overflow:hidden;width:160px;background-color:var(--tds-popover-menu-background);padding:16px 6px;box-shadow:0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);border-radius:4px;z-index:900}.tds-popover-menu.sc-tds-popover-menu *.sc-tds-popover-menu{box-sizing:border-box}.tds-popover-menu.fluid-width.sc-tds-popover-menu{width:unset}tds-popover-core.sc-tds-popover-menu{padding:6px 0 !important}.sc-tds-popover-menu-s>tds-divider{display:block;padding:6px !important}";
|
|
6
6
|
const TdsPopoverMenuStyle0 = popoverMenuCss;
|
|
@@ -10,13 +10,14 @@ const TdsPopoverMenu$1 = /*@__PURE__*/ proxyCustomElement(class TdsPopoverMenu e
|
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
this.inheritedAttributes = [];
|
|
13
|
-
this.selector =
|
|
13
|
+
this.selector = undefined;
|
|
14
14
|
this.referenceEl = undefined;
|
|
15
15
|
this.show = null;
|
|
16
16
|
this.placement = 'auto';
|
|
17
17
|
this.offsetSkidding = 0;
|
|
18
18
|
this.offsetDistance = 8;
|
|
19
19
|
this.fluidWidth = false;
|
|
20
|
+
this.disableLogic = false;
|
|
20
21
|
this.childRef = undefined;
|
|
21
22
|
}
|
|
22
23
|
/** Property for closing popover programmatically */
|
|
@@ -29,13 +30,13 @@ const TdsPopoverMenu$1 = /*@__PURE__*/ proxyCustomElement(class TdsPopoverMenu e
|
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
32
|
var _a;
|
|
32
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '4304608f4f9e861855baf58202190e0d75649d6d' }, h("tds-popover-core", { key: '8c29640234fce29c8cf467f5f84c239b6632a9c2', class: {
|
|
33
34
|
'tds-popover-menu': true,
|
|
34
35
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
35
36
|
'fluid-width': this.fluidWidth,
|
|
36
37
|
}, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, ref: (el) => {
|
|
37
38
|
this.childRef = el;
|
|
38
|
-
} }, h("div", { key: '
|
|
39
|
+
}, disableLogic: this.disableLogic }, h("div", { key: 'e1627372bdcd36ac48c613b69e633066da891fa5', role: "list" }, h("slot", { key: '29551d047ed414e37298194833a5a7510c79e9fe' })))));
|
|
39
40
|
}
|
|
40
41
|
get host() { return this; }
|
|
41
42
|
static get style() { return TdsPopoverMenuStyle0; }
|
|
@@ -47,6 +48,7 @@ const TdsPopoverMenu$1 = /*@__PURE__*/ proxyCustomElement(class TdsPopoverMenu e
|
|
|
47
48
|
"offsetSkidding": [2, "offset-skidding"],
|
|
48
49
|
"offsetDistance": [2, "offset-distance"],
|
|
49
50
|
"fluidWidth": [4, "fluid-width"],
|
|
51
|
+
"disableLogic": [4, "disable-logic"],
|
|
50
52
|
"childRef": [32],
|
|
51
53
|
"close": [64]
|
|
52
54
|
}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { i as inheritAttributes } from './p-3fe9cbbf.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-3e1ca414.js';
|
|
4
4
|
|
|
5
5
|
const tooltipCss = ".tds-tooltip.sc-tds-tooltip{box-sizing:border-box;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-tooltip-color);background-color:var(--tds-tooltip-background);border-radius:4px;padding:8px;word-wrap:break-word;max-width:192px;z-index:900;opacity:0;visibility:hidden;transition:opacity 200ms ease-in, visibility 200ms ease-in}.tds-tooltip.sc-tds-tooltip *.sc-tds-tooltip{box-sizing:border-box}.tds-tooltip.tds-tooltip-top-left.sc-tds-tooltip{border-radius:0 4px 4px}.tds-tooltip.tds-tooltip-top-right.sc-tds-tooltip{border-radius:4px 0 4px 4px}.tds-tooltip.tds-tooltip-bottom-right.sc-tds-tooltip{border-radius:4px 4px 0}.tds-tooltip.tds-tooltip-bottom-left.sc-tds-tooltip{border-radius:4px 4px 4px 0}.tds-tooltip-show.sc-tds-tooltip{opacity:1;visibility:visible}";
|
|
6
6
|
const TdsTooltipStyle0 = tooltipCss;
|
|
@@ -35,7 +35,7 @@ const TdsTooltip$1 = /*@__PURE__*/ proxyCustomElement(class TdsTooltip extends H
|
|
|
35
35
|
];
|
|
36
36
|
this.inheritedAttributes = [];
|
|
37
37
|
this.text = '';
|
|
38
|
-
this.selector =
|
|
38
|
+
this.selector = undefined;
|
|
39
39
|
this.referenceEl = undefined;
|
|
40
40
|
this.mouseOverTooltip = false;
|
|
41
41
|
this.trigger = 'hover';
|
|
@@ -43,6 +43,7 @@ const TdsTooltip$1 = /*@__PURE__*/ proxyCustomElement(class TdsTooltip extends H
|
|
|
43
43
|
this.placement = 'bottom';
|
|
44
44
|
this.offsetSkidding = 0;
|
|
45
45
|
this.offsetDistance = 8;
|
|
46
|
+
this.disableLogic = false;
|
|
46
47
|
}
|
|
47
48
|
componentWillLoad() {
|
|
48
49
|
this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
|
|
@@ -55,7 +56,7 @@ const TdsTooltip$1 = /*@__PURE__*/ proxyCustomElement(class TdsTooltip extends H
|
|
|
55
56
|
}
|
|
56
57
|
render() {
|
|
57
58
|
var _a;
|
|
58
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '0ba06d727ee800ced695616820ac073fb5edf0bd' }, h("tds-popover-core", Object.assign({ key: 'c361b1cec7c55cc6ce2a758f647f9e5022929cf6' }, this.inheritedAttributes, { class: {
|
|
59
60
|
'tds-tooltip': true,
|
|
60
61
|
[`tds-tooltip-${this.border}`]: true,
|
|
61
62
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
@@ -64,7 +65,7 @@ const TdsTooltip$1 = /*@__PURE__*/ proxyCustomElement(class TdsTooltip extends H
|
|
|
64
65
|
this.show = true;
|
|
65
66
|
}, onInternalTdsClose: () => {
|
|
66
67
|
this.show = false;
|
|
67
|
-
} }), this.text, h("slot", { key: '
|
|
68
|
+
}, disableLogic: this.disableLogic }), this.text, h("slot", { key: 'd38f0605a9b903b7aed147c65bb2aa98a885c73b' }))));
|
|
68
69
|
}
|
|
69
70
|
get host() { return this; }
|
|
70
71
|
static get style() { return TdsTooltipStyle0; }
|
|
@@ -77,7 +78,8 @@ const TdsTooltip$1 = /*@__PURE__*/ proxyCustomElement(class TdsTooltip extends H
|
|
|
77
78
|
"show": [1028],
|
|
78
79
|
"placement": [1],
|
|
79
80
|
"offsetSkidding": [2, "offset-skidding"],
|
|
80
|
-
"offsetDistance": [2, "offset-distance"]
|
|
81
|
+
"offsetDistance": [2, "offset-distance"],
|
|
82
|
+
"disableLogic": [4, "disable-logic"]
|
|
81
83
|
}]);
|
|
82
84
|
function defineCustomElement$1() {
|
|
83
85
|
if (typeof customElements === "undefined") {
|