@sebgroup/green-core 3.27.0 → 3.28.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/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/progress/index.d.ts +1 -0
- package/components/progress/index.js +1 -0
- package/components/progress/progress.component.d.ts +67 -0
- package/components/progress/progress.component.js +172 -0
- package/components/progress/progress.d.ts +2 -0
- package/components/progress/progress.js +6 -0
- package/components/progress/progress.styles.d.ts +2 -0
- package/components/progress/progress.styles.js +175 -0
- package/components/rich-text/rich-text.component.js +7 -3
- package/custom-elements.json +37045 -36108
- package/gds-element.js +1 -1
- package/generated/mcp/components.json +13 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/progress/angular.md +15 -0
- package/generated/mcp/progress/api.md +41 -0
- package/generated/mcp/progress/index.json +8 -0
- package/generated/mcp/progress/react.md +15 -0
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/index.d.ts +10 -9
- package/generated/react/index.js +10 -9
- package/generated/react/progress/index.d.ts +701 -0
- package/generated/react/progress/index.js +14 -0
- package/package.json +3 -1
- package/pure.d.ts +1 -0
- package/pure.js +1 -0
- package/utils/helpers/custom-element-scoping.js +1 -1
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export * from "./mask/index.js";
|
|
|
34
34
|
export * from "./menu-button/index.js";
|
|
35
35
|
export * from "./pagination/index.js";
|
|
36
36
|
export * from "./popover/index.js";
|
|
37
|
+
export * from "./progress/index.js";
|
|
37
38
|
export * from "./radio/index.js";
|
|
38
39
|
export * from "./rich-text/index.js";
|
|
39
40
|
export * from "./segmented-control/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './progress';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./progress.js";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { GdsElement } from '../../gds-element';
|
|
2
|
+
export type GdsProgressVariant = 'information' | 'positive' | 'negative';
|
|
3
|
+
declare class Progress extends GdsElement {
|
|
4
|
+
#private;
|
|
5
|
+
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
6
|
+
/**
|
|
7
|
+
* The accessible label for the progress bar. Also rendered as visible text
|
|
8
|
+
* unless `plain` is set.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* The current progress, expressed on a scale from 0 to `max`.
|
|
13
|
+
*/
|
|
14
|
+
value: number;
|
|
15
|
+
/**
|
|
16
|
+
* The upper bound of the progress scale. Values of 0 or less fall back to 100.
|
|
17
|
+
*/
|
|
18
|
+
max: number;
|
|
19
|
+
/**
|
|
20
|
+
* Visual state of the progress bar. `positive` and `negative` also swap the
|
|
21
|
+
* trailing value text for a status icon.
|
|
22
|
+
*/
|
|
23
|
+
variant: GdsProgressVariant;
|
|
24
|
+
/**
|
|
25
|
+
* Controls the font-size of texts and the track height.
|
|
26
|
+
*/
|
|
27
|
+
size: 'large' | 'small';
|
|
28
|
+
/**
|
|
29
|
+
* Style Expression Property that controls the `flex-direction` property.
|
|
30
|
+
* Supports all valid CSS `flex-direction` values. Use `column-reverse` to
|
|
31
|
+
* place the label row below the bar.
|
|
32
|
+
*/
|
|
33
|
+
'flex-direction'?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Renders an animated, non-measurable progress bar. The native `<progress>`
|
|
36
|
+
* element is left without a value, so assistive tech announces it as
|
|
37
|
+
* indeterminate.
|
|
38
|
+
*/
|
|
39
|
+
indeterminate: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Hides the label row, while still keeping the accessible label.
|
|
42
|
+
*/
|
|
43
|
+
plain: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Hides the trailing text and status icon.
|
|
46
|
+
*/
|
|
47
|
+
hideValue: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Text rendered at the end of the label row, in place of the automatically
|
|
50
|
+
* formatted percentage or the status icon.
|
|
51
|
+
*/
|
|
52
|
+
trail?: string;
|
|
53
|
+
private _currentLocale;
|
|
54
|
+
connectedCallback(): void;
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
render(): any;
|
|
57
|
+
}
|
|
58
|
+
declare const GdsProgress_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").LayoutChildProps) & typeof Progress;
|
|
59
|
+
/**
|
|
60
|
+
* @element gds-progress
|
|
61
|
+
* @status beta
|
|
62
|
+
*
|
|
63
|
+
* @summary A progress bar built on the native `<progress>` element.
|
|
64
|
+
*/
|
|
65
|
+
export declare class GdsProgress extends GdsProgress_base {
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass,
|
|
3
|
+
__privateAdd,
|
|
4
|
+
__privateGet,
|
|
5
|
+
__privateMethod
|
|
6
|
+
} from "../../chunks/chunk.H2T4A5YY.js";
|
|
7
|
+
var _handleLocaleStatus, _Progress_instances, percent_fn, displayValue_fn, renderTrail_fn;
|
|
8
|
+
import { localized, msg } from "@lit/localize";
|
|
9
|
+
import { property, state } from "lit/decorators.js";
|
|
10
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
|
+
import { when } from "lit/directives/when.js";
|
|
12
|
+
import { GdsElement } from "../../gds-element.js";
|
|
13
|
+
import { gdsCustomElement, html } from "../../scoping.js";
|
|
14
|
+
import { tokens } from "../../tokens.style.js";
|
|
15
|
+
import { ariaForwarding } from "../../utils/decorators/aria-forwarding.js";
|
|
16
|
+
import { styleExpressionProperty } from "../../utils/decorators/style-expression-property.js";
|
|
17
|
+
import {
|
|
18
|
+
withLayoutChildProps,
|
|
19
|
+
withMarginProps,
|
|
20
|
+
withSizeXProps
|
|
21
|
+
} from "../../utils/mixins/declarative-layout-mixins.js";
|
|
22
|
+
import { IconCircleCheck } from "../icon/icons/circle-check.component.js";
|
|
23
|
+
import { IconCircleX } from "../icon/icons/circle-x.component.js";
|
|
24
|
+
import ProgressStyles from "./progress.styles.js";
|
|
25
|
+
let Progress = class extends GdsElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
__privateAdd(this, _Progress_instances);
|
|
29
|
+
this.label = "";
|
|
30
|
+
this.value = 0;
|
|
31
|
+
this.max = 100;
|
|
32
|
+
this.variant = "information";
|
|
33
|
+
this.size = "large";
|
|
34
|
+
this.indeterminate = false;
|
|
35
|
+
this.plain = false;
|
|
36
|
+
this.hideValue = false;
|
|
37
|
+
this._currentLocale = navigator.language;
|
|
38
|
+
__privateAdd(this, _handleLocaleStatus, (e) => {
|
|
39
|
+
const detail = e.detail;
|
|
40
|
+
if (detail?.status === "ready") this._currentLocale = detail.readyLocale;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
super.connectedCallback();
|
|
45
|
+
window.addEventListener("lit-localize-status", __privateGet(this, _handleLocaleStatus));
|
|
46
|
+
}
|
|
47
|
+
disconnectedCallback() {
|
|
48
|
+
super.disconnectedCallback();
|
|
49
|
+
window.removeEventListener("lit-localize-status", __privateGet(this, _handleLocaleStatus));
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
const percent = __privateMethod(this, _Progress_instances, percent_fn).call(this);
|
|
53
|
+
return html`
|
|
54
|
+
${when(
|
|
55
|
+
this.plain,
|
|
56
|
+
() => html`<span id="label" class="visually-hidden">${this.label}</span>`,
|
|
57
|
+
() => html`
|
|
58
|
+
<div id="label-row">
|
|
59
|
+
<span id="label">${this.label}</span>
|
|
60
|
+
${__privateMethod(this, _Progress_instances, renderTrail_fn).call(this)}
|
|
61
|
+
</div>
|
|
62
|
+
`
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
<div id="track">
|
|
66
|
+
<progress
|
|
67
|
+
id="control"
|
|
68
|
+
max=${percent.max}
|
|
69
|
+
value=${ifDefined(this.indeterminate ? void 0 : percent.value)}
|
|
70
|
+
aria-labelledby=${ifDefined(this.label ? "label" : void 0)}
|
|
71
|
+
aria-valuetext=${ifDefined(__privateMethod(this, _Progress_instances, displayValue_fn).call(this))}
|
|
72
|
+
></progress>
|
|
73
|
+
${when(
|
|
74
|
+
this.indeterminate,
|
|
75
|
+
() => html`<div id="indeterminate-fill" aria-hidden="true"></div>`
|
|
76
|
+
)}
|
|
77
|
+
</div>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
_handleLocaleStatus = new WeakMap();
|
|
82
|
+
_Progress_instances = new WeakSet();
|
|
83
|
+
percent_fn = function() {
|
|
84
|
+
const max = this.max > 0 ? this.max : 100;
|
|
85
|
+
const value = Math.max(0, Math.min(max, this.value));
|
|
86
|
+
return { value, max, ratio: value / max };
|
|
87
|
+
};
|
|
88
|
+
// Indeterminate progress has no meaningful value to announce, so no valuetext is set.
|
|
89
|
+
displayValue_fn = function() {
|
|
90
|
+
if (this.trail) return this.trail;
|
|
91
|
+
if (this.indeterminate) return void 0;
|
|
92
|
+
return new Intl.NumberFormat(this._currentLocale, {
|
|
93
|
+
style: "percent"
|
|
94
|
+
}).format(__privateMethod(this, _Progress_instances, percent_fn).call(this).ratio);
|
|
95
|
+
};
|
|
96
|
+
renderTrail_fn = function() {
|
|
97
|
+
if (this.hideValue) return null;
|
|
98
|
+
if (this.trail) return html`<span id="trail">${this.trail}</span>`;
|
|
99
|
+
if (this.indeterminate) return null;
|
|
100
|
+
const iconSize = this.size === "small" ? "s" : "m";
|
|
101
|
+
return when(
|
|
102
|
+
this.variant === "positive",
|
|
103
|
+
() => html`<gds-icon-circle-check
|
|
104
|
+
class="status-icon"
|
|
105
|
+
solid
|
|
106
|
+
size=${iconSize}
|
|
107
|
+
label=${msg("Completed")}
|
|
108
|
+
></gds-icon-circle-check>`,
|
|
109
|
+
() => when(
|
|
110
|
+
this.variant === "negative",
|
|
111
|
+
() => html`<gds-icon-circle-x
|
|
112
|
+
class="status-icon"
|
|
113
|
+
solid
|
|
114
|
+
size=${iconSize}
|
|
115
|
+
label=${msg("Failed")}
|
|
116
|
+
></gds-icon-circle-x>`,
|
|
117
|
+
() => html`<span id="trail">${__privateMethod(this, _Progress_instances, displayValue_fn).call(this)}</span>`
|
|
118
|
+
)
|
|
119
|
+
);
|
|
120
|
+
};
|
|
121
|
+
Progress.styles = [tokens, ProgressStyles];
|
|
122
|
+
__decorateClass([
|
|
123
|
+
property()
|
|
124
|
+
], Progress.prototype, "label", 2);
|
|
125
|
+
__decorateClass([
|
|
126
|
+
property({ type: Number })
|
|
127
|
+
], Progress.prototype, "value", 2);
|
|
128
|
+
__decorateClass([
|
|
129
|
+
property({ type: Number })
|
|
130
|
+
], Progress.prototype, "max", 2);
|
|
131
|
+
__decorateClass([
|
|
132
|
+
property({ reflect: true })
|
|
133
|
+
], Progress.prototype, "variant", 2);
|
|
134
|
+
__decorateClass([
|
|
135
|
+
property({ reflect: true })
|
|
136
|
+
], Progress.prototype, "size", 2);
|
|
137
|
+
__decorateClass([
|
|
138
|
+
styleExpressionProperty()
|
|
139
|
+
], Progress.prototype, "flex-direction", 2);
|
|
140
|
+
__decorateClass([
|
|
141
|
+
property({ type: Boolean, reflect: true })
|
|
142
|
+
], Progress.prototype, "indeterminate", 2);
|
|
143
|
+
__decorateClass([
|
|
144
|
+
property({ type: Boolean, reflect: true })
|
|
145
|
+
], Progress.prototype, "plain", 2);
|
|
146
|
+
__decorateClass([
|
|
147
|
+
property({ type: Boolean, reflect: true, attribute: "hide-value" })
|
|
148
|
+
], Progress.prototype, "hideValue", 2);
|
|
149
|
+
__decorateClass([
|
|
150
|
+
property()
|
|
151
|
+
], Progress.prototype, "trail", 2);
|
|
152
|
+
__decorateClass([
|
|
153
|
+
state()
|
|
154
|
+
], Progress.prototype, "_currentLocale", 2);
|
|
155
|
+
Progress = __decorateClass([
|
|
156
|
+
localized(),
|
|
157
|
+
ariaForwarding({
|
|
158
|
+
labelledBy: "#control"
|
|
159
|
+
})
|
|
160
|
+
], Progress);
|
|
161
|
+
let GdsProgress = class extends withSizeXProps(
|
|
162
|
+
withMarginProps(withLayoutChildProps(Progress))
|
|
163
|
+
) {
|
|
164
|
+
};
|
|
165
|
+
GdsProgress = __decorateClass([
|
|
166
|
+
gdsCustomElement("gds-progress", {
|
|
167
|
+
dependsOn: [IconCircleCheck, IconCircleX]
|
|
168
|
+
})
|
|
169
|
+
], GdsProgress);
|
|
170
|
+
export {
|
|
171
|
+
GdsProgress
|
|
172
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import "../../chunks/chunk.H2T4A5YY.js";
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
--_track-bg: var(--gds-sys-color-l3-neutral-02);
|
|
6
|
+
--_fill-color: var(--gds-sys-color-l3-neutral-03);
|
|
7
|
+
--_label-color: var(--gds-sys-color-content-neutral-01);
|
|
8
|
+
--_track-height: var(--gds-sys-space-3xs);
|
|
9
|
+
--_font: var(--gds-sys-text-detail-s-regular);
|
|
10
|
+
--_icon-size: var(--gds-sys-space-m);
|
|
11
|
+
--_row-gap: var(--gds-sys-space-xs);
|
|
12
|
+
--_label-gap: var(--gds-sys-space-s);
|
|
13
|
+
--_indeterminate-inset: 88%;
|
|
14
|
+
--_indeterminate-duration: 2.1s;
|
|
15
|
+
--_indeterminate-easing-lead: cubic-bezier(0.2, 0, 0.3, 1);
|
|
16
|
+
--_indeterminate-easing-trail: cubic-bezier(0.7, 0, 0.8, 1);
|
|
17
|
+
--_t-easing-out: cubic-bezier(var(--gds-sys-motion-easing-ease-out));
|
|
18
|
+
--_t-duration: var(--gds-sys-motion-duration-fast);
|
|
19
|
+
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: var(--_row-gap);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([size='small']) {
|
|
26
|
+
--_font: var(--gds-sys-text-detail-xs-regular);
|
|
27
|
+
--_icon-size: var(--gds-sys-space-s);
|
|
28
|
+
--_row-gap: var(--gds-sys-space-2xs);
|
|
29
|
+
--_label-gap: var(--gds-sys-space-xs);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([variant='positive']) {
|
|
33
|
+
--_fill-color: var(--gds-sys-color-content-positive-01);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([variant='negative']) {
|
|
37
|
+
--_fill-color: var(--gds-sys-color-content-negative-01);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.visually-hidden {
|
|
41
|
+
border: 0;
|
|
42
|
+
clip: rect(0 0 0 0);
|
|
43
|
+
height: 1px;
|
|
44
|
+
margin: -1px;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
padding: 0;
|
|
47
|
+
position: absolute;
|
|
48
|
+
width: 1px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#label-row {
|
|
52
|
+
align-items: center;
|
|
53
|
+
display: flex;
|
|
54
|
+
font: var(--_font);
|
|
55
|
+
gap: var(--_label-gap);
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
min-height: var(--_icon-size);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#label {
|
|
61
|
+
color: var(--_label-color);
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#trail {
|
|
68
|
+
color: var(--_label-color);
|
|
69
|
+
flex: none;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.status-icon {
|
|
74
|
+
display: block;
|
|
75
|
+
flex: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([variant='positive']) .status-icon {
|
|
79
|
+
color: var(--gds-sys-color-content-positive-01);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([variant='negative']) .status-icon {
|
|
83
|
+
color: var(--gds-sys-color-content-negative-01);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
#track {
|
|
87
|
+
border-radius: var(--gds-sys-radius-max);
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
position: relative;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
progress {
|
|
93
|
+
-webkit-appearance: none;
|
|
94
|
+
appearance: none;
|
|
95
|
+
background: var(--_track-bg);
|
|
96
|
+
border: none;
|
|
97
|
+
border-radius: var(--gds-sys-radius-max);
|
|
98
|
+
display: block;
|
|
99
|
+
height: var(--_track-height);
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
progress::-webkit-progress-bar {
|
|
105
|
+
background: var(--_track-bg);
|
|
106
|
+
border-radius: var(--gds-sys-radius-max);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
progress::-webkit-progress-value {
|
|
110
|
+
background: var(--_fill-color);
|
|
111
|
+
border-radius: var(--gds-sys-radius-max);
|
|
112
|
+
transition: inline-size var(--_t-duration) var(--_t-easing-out);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
progress::-moz-progress-bar {
|
|
116
|
+
background: var(--_fill-color);
|
|
117
|
+
border-radius: var(--gds-sys-radius-max);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Painted as a sibling of the native element rather than on it: an indeterminate
|
|
121
|
+
<progress> exposes no value pseudo-element in Chromium. Insets are animated
|
|
122
|
+
rather than transforms so the pill radius isn't squashed by scaling.
|
|
123
|
+
|
|
124
|
+
The two edges run as separate animations over the same span, so neither is ever
|
|
125
|
+
parked while the other catches up. The leading edge pulls away while the trailing
|
|
126
|
+
edge lags, which stretches the bar mid-track and collapses it against each end.
|
|
127
|
+
|
|
128
|
+
Both curves are shaped y1=0 / y2=1, so each edge starts and ends at zero velocity.
|
|
129
|
+
That matters because alternating mirrors the curve: any residual speed at the
|
|
130
|
+
turnaround would flip sign instantly and read as a hard bounce. The difference
|
|
131
|
+
between the curves is where the motion happens, not how it starts or stops. */
|
|
132
|
+
#indeterminate-fill {
|
|
133
|
+
animation:
|
|
134
|
+
gds-progress-indeterminate-head var(--_indeterminate-duration) infinite
|
|
135
|
+
alternate var(--_indeterminate-easing-lead),
|
|
136
|
+
gds-progress-indeterminate-tail var(--_indeterminate-duration) infinite
|
|
137
|
+
alternate var(--_indeterminate-easing-trail);
|
|
138
|
+
background: var(--_fill-color);
|
|
139
|
+
border-radius: var(--gds-sys-radius-max);
|
|
140
|
+
inset-block: 0;
|
|
141
|
+
position: absolute;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@keyframes gds-progress-indeterminate-head {
|
|
145
|
+
from {
|
|
146
|
+
inset-inline-end: var(--_indeterminate-inset);
|
|
147
|
+
}
|
|
148
|
+
to {
|
|
149
|
+
inset-inline-end: 0%;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@keyframes gds-progress-indeterminate-tail {
|
|
154
|
+
from {
|
|
155
|
+
inset-inline-start: 0%;
|
|
156
|
+
}
|
|
157
|
+
to {
|
|
158
|
+
inset-inline-start: var(--_indeterminate-inset);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@media (prefers-reduced-motion: reduce) {
|
|
163
|
+
progress::-webkit-progress-value {
|
|
164
|
+
transition: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host {
|
|
168
|
+
--_indeterminate-duration: 4s;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`;
|
|
172
|
+
var progress_styles_default = styles;
|
|
173
|
+
export {
|
|
174
|
+
progress_styles_default as default
|
|
175
|
+
};
|
|
@@ -37,11 +37,15 @@ let GdsRichText = class extends withLayoutChildProps(
|
|
|
37
37
|
* Forwards innerHTML from the inner shadowRoot.
|
|
38
38
|
*/
|
|
39
39
|
get innerHTML() {
|
|
40
|
-
return this.shadowRoot
|
|
40
|
+
if (this.shadowRoot) return this.shadowRoot.innerHTML;
|
|
41
|
+
return super.innerHTML;
|
|
41
42
|
}
|
|
42
43
|
set innerHTML(value) {
|
|
43
|
-
if (
|
|
44
|
-
|
|
44
|
+
if (this.shadowRoot) {
|
|
45
|
+
this.shadowRoot.innerHTML = value;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
super.innerHTML = value;
|
|
45
49
|
}
|
|
46
50
|
connectedCallback() {
|
|
47
51
|
super.connectedCallback();
|