@sebgroup/green-core 1.48.1 → 1.49.1
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/chunks/{chunk.EKAEOSP2.js → chunk.2LFIIGFP.js} +1 -1
- package/chunks/{chunk.YXNS2LKL.js → chunk.2ZBKBKY3.js} +2 -2
- package/chunks/{chunk.D2D3PBHZ.js → chunk.364FA4Y6.js} +1 -1
- package/chunks/{chunk.EPSMJG5C.js → chunk.3RMPIH7U.js} +1 -1
- package/chunks/{chunk.HJN3YB2D.js → chunk.42ZA2AFF.js} +112 -109
- package/chunks/{chunk.A5P7OJGA.js → chunk.4ZBJEQCZ.js} +1 -1
- package/chunks/{chunk.DGD5TZFC.js → chunk.525UYGPO.js} +1 -1
- package/chunks/{chunk.SR5JX47T.js → chunk.5ZN5KKL3.js} +2 -2
- package/chunks/{chunk.ORLQETME.js → chunk.7D3WJJSZ.js} +1 -1
- package/chunks/{chunk.FOYCPY43.js → chunk.ANHTAX6Y.js} +5 -5
- package/chunks/{chunk.HN2SFIDU.js → chunk.BIKXIJTT.js} +1 -1
- package/chunks/{chunk.FZ66S7UU.js → chunk.C6LHORY3.js} +2 -2
- package/chunks/{chunk.DTU2LBK6.js → chunk.CUDVSZRE.js} +1 -1
- package/chunks/{chunk.VCCAP3FV.js → chunk.DDPLK4SS.js} +2 -2
- package/chunks/{chunk.KWTCQUEX.js → chunk.EFOOA2YV.js} +1 -1
- package/chunks/{chunk.5B7BX533.js → chunk.EJNAK2K2.js} +1 -1
- package/chunks/{chunk.FN5Q2BYA.js → chunk.HWZIMEHI.js} +1 -1
- package/chunks/{chunk.XZ7JV2IR.js → chunk.IWQT4TKV.js} +2 -2
- package/chunks/{chunk.74TG2AA6.js → chunk.JUON57CD.js} +1 -1
- package/chunks/chunk.MLXMQIEV.js +1 -1
- package/chunks/{chunk.JZDHTZFT.js → chunk.OHOWIVVP.js} +1 -64
- package/chunks/{chunk.JEE3SBSU.js → chunk.QDDWGVGW.js} +1 -1
- package/chunks/{chunk.2V3TCESQ.js → chunk.RAPECWKI.js} +1 -1
- package/chunks/{chunk.BMDXQUSK.js → chunk.S5TW7D44.js} +1 -1
- package/chunks/{chunk.IGNJ4N5H.js → chunk.TVILWIZI.js} +1 -1
- package/chunks/{chunk.MO3DOOTC.js → chunk.TWRFSLE6.js} +1 -1
- package/chunks/{chunk.FYKNZB2R.js → chunk.UC7MNYMZ.js} +1 -1
- package/chunks/{chunk.45UVYPY2.js → chunk.UFDLCGCX.js} +1 -1
- package/chunks/{chunk.JTFRDC3C.js → chunk.UPDOJQOA.js} +1 -1
- package/chunks/{chunk.REX22V5K.js → chunk.WK4MCKEH.js} +22 -16
- package/chunks/{chunk.USR4U2ZL.js → chunk.WOEEUFXQ.js} +1 -1
- package/chunks/chunk.WXHJIZTY.js +68 -0
- package/chunks/chunk.YZ6FM7P6.js +103 -0
- package/components/badge/badge.js +3 -2
- package/components/badge/index.js +3 -2
- package/components/button/button.js +4 -3
- package/components/button/index.js +4 -3
- package/components/calendar/calendar.js +3 -2
- package/components/calendar/index.js +3 -2
- package/components/card/card.js +4 -3
- package/components/card/index.js +4 -3
- package/components/container/container.js +3 -2
- package/components/container/index.js +3 -2
- package/components/datepicker/datepicker.js +8 -7
- package/components/datepicker/index.js +8 -7
- package/components/dialog/dialog.js +9 -8
- package/components/dialog/index.js +9 -8
- package/components/dialog/scroll-lock.js +2 -1
- package/components/divider/divider.js +3 -2
- package/components/divider/index.js +3 -2
- package/components/dropdown/dropdown.js +6 -5
- package/components/dropdown/index.js +6 -5
- package/components/fab/fab.js +5 -4
- package/components/fab/index.js +5 -4
- package/components/filter-chips/filter-chip/filter-chip.js +4 -3
- package/components/filter-chips/filter-chip/index.js +4 -3
- package/components/filter-chips/filter-chips.js +4 -3
- package/components/filter-chips/index.js +4 -3
- package/components/flex/flex.js +4 -3
- package/components/flex/index.js +4 -3
- package/components/form/index.js +5 -4
- package/components/form/summary/index.js +5 -4
- package/components/form/summary/summary.js +5 -4
- package/components/grid/grid.js +4 -3
- package/components/grid/index.js +4 -3
- package/components/img/img.js +3 -2
- package/components/img/index.js +3 -2
- package/components/index.d.ts +1 -0
- package/components/index.js +38 -33
- package/components/input/index.js +11 -10
- package/components/input/input.js +11 -10
- package/components/link/index.d.ts +1 -0
- package/components/link/index.js +13 -0
- package/components/link/link.d.ts +35 -0
- package/components/link/link.js +13 -0
- package/components/link/link.styles.d.ts +2 -0
- package/components/mask/index.js +5 -4
- package/components/mask/mask.js +5 -4
- package/components/menu-button/index.js +3 -2
- package/components/menu-button/menu-button.js +3 -2
- package/components/menu-button/menu-button.styles.d.ts +2 -0
- package/components/rich-text/index.js +3 -2
- package/components/rich-text/rich-text.js +3 -2
- package/components/segmented-control/index.js +4 -3
- package/components/segmented-control/segment/index.js +3 -2
- package/components/segmented-control/segment/segment.js +3 -2
- package/components/segmented-control/segmented-control.js +4 -3
- package/components/signal/index.js +3 -2
- package/components/signal/signal.js +3 -2
- package/components/spacer/index.js +3 -2
- package/components/spacer/spacer.js +3 -2
- package/components/text/index.js +3 -2
- package/components/text/text.js +3 -2
- package/components/textarea/index.js +11 -10
- package/components/textarea/textarea.js +11 -10
- package/components/theme/index.js +3 -2
- package/components/theme/theme.js +3 -2
- package/components/video/index.js +3 -2
- package/components/video/video.js +3 -2
- package/index.js +38 -33
- package/package.json +1 -1
- package/primitives/form-control-footer/form-control-footer.js +4 -3
- package/primitives/form-control-footer/index.js +4 -3
- package/primitives/form-control-header/form-control-header.js +6 -5
- package/primitives/form-control-header/index.js +6 -5
- package/primitives/listbox/index.js +3 -2
- package/primitives/listbox/listbox.js +3 -2
- package/primitives/listbox/option.js +3 -2
- package/primitives/ripple/index.js +4 -2
- package/primitives/ripple/ripple.js +4 -2
- /package/chunks/{chunk.CYWCFGJ4.js → chunk.4EWOQKZC.js} +0 -0
- /package/components/flex/{flex.style.d.ts → flex.styles.d.ts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsFlex
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.ANHTAX6Y.js";
|
|
4
4
|
import {
|
|
5
5
|
styleExpressionProperty
|
|
6
6
|
} from "./chunk.H2KG3F2S.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.WK4MCKEH.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement
|
|
12
12
|
} from "./chunk.MLXMQIEV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tokens
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.WK4MCKEH.js";
|
|
4
4
|
import {
|
|
5
5
|
GdsElement
|
|
6
6
|
} from "./chunk.6X2WDWO3.js";
|
|
@@ -20,129 +20,132 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
20
20
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
21
21
|
import { literal, html as staticHtml } from "lit/static-html.js";
|
|
22
22
|
|
|
23
|
-
// libs/core/src/components/menu-button/menu-button.
|
|
24
|
-
|
|
23
|
+
// libs/core/src/components/menu-button/menu-button.styles.ts
|
|
24
|
+
import { css } from "lit";
|
|
25
|
+
var style = css`
|
|
26
|
+
@layer tokens, a11y, core, variants, sizes, sets, disabled;
|
|
25
27
|
|
|
26
|
-
@layer tokens {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
@layer tokens {
|
|
29
|
+
:host {
|
|
30
|
+
--_gap: 8px;
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
--_padding-inline: var(--gds-space-m);
|
|
33
|
+
--_padding-block: var(--gds-space-xs);
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
--_color-bg: transparent;
|
|
36
|
+
--_color-text: var(--gds-sys-color-primary-text);
|
|
37
|
+
--_color-border: transparent;
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
--_color-outline-alpha: 60%;
|
|
40
|
+
--_color-outline: var(--gds-sys-color-border-stroke);
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
--_font-size: 1rem;
|
|
43
|
+
--_font-weight: 400;
|
|
44
|
+
--_line-height: 1.25;
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@layer core {
|
|
52
|
-
.button {
|
|
53
|
-
align-items: center;
|
|
54
|
-
|
|
55
|
-
background-color: var(--_color-bg);
|
|
56
|
-
|
|
57
|
-
border-color: var(--_color-border);
|
|
58
|
-
border-style: none;
|
|
59
|
-
border-bottom-style: solid;
|
|
60
|
-
border-bottom-width: 2px;
|
|
61
|
-
|
|
62
|
-
box-sizing: border-box;
|
|
63
|
-
color: var(--_color-text);
|
|
64
|
-
color-scheme: dark light;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
|
|
67
|
-
display: inline-flex;
|
|
68
|
-
gap: var(--_gap);
|
|
69
|
-
height: 100%;
|
|
70
|
-
|
|
71
|
-
inline-size: 100%;
|
|
72
|
-
justify-content: space-between;
|
|
73
|
-
justify-items: center;
|
|
74
|
-
outline-color: transparent;
|
|
75
|
-
outline-offset: 2px;
|
|
76
|
-
outline-style: solid;
|
|
77
|
-
outline-width: 2px;
|
|
78
|
-
padding-block: var(--_padding-block);
|
|
79
|
-
padding-inline: var(--_padding-inline);
|
|
80
|
-
position: relative;
|
|
81
|
-
font-family: inherit;
|
|
82
|
-
font-size: var(--_font-size);
|
|
83
|
-
font-weight: var(--_font-weight);
|
|
84
|
-
line-height: var(--_line-height);
|
|
85
|
-
|
|
86
|
-
&:focus-visible {
|
|
87
|
-
outline-color: color-mix(
|
|
88
|
-
in srgb,
|
|
89
|
-
var(--_color-outline),
|
|
90
|
-
transparent var(--_color-outline-alpha)
|
|
91
|
-
);
|
|
92
|
-
border-radius: 2px;
|
|
93
|
-
overflow: visible;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
isolation: isolate;
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
height: 100%;
|
|
94
50
|
}
|
|
51
|
+
}
|
|
95
52
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
53
|
+
@layer core {
|
|
54
|
+
.button {
|
|
55
|
+
align-items: center;
|
|
56
|
+
|
|
57
|
+
background-color: var(--_color-bg);
|
|
58
|
+
|
|
59
|
+
border-color: var(--_color-border);
|
|
60
|
+
border-style: none;
|
|
61
|
+
border-bottom-style: solid;
|
|
62
|
+
border-bottom-width: 2px;
|
|
63
|
+
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
color: var(--_color-text);
|
|
66
|
+
color-scheme: dark light;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
gap: var(--_gap);
|
|
71
|
+
height: 100%;
|
|
72
|
+
|
|
73
|
+
inline-size: 100%;
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
justify-items: center;
|
|
76
|
+
outline-color: transparent;
|
|
77
|
+
outline-offset: 2px;
|
|
78
|
+
outline-style: solid;
|
|
79
|
+
outline-width: 2px;
|
|
80
|
+
padding-block: var(--_padding-block);
|
|
81
|
+
padding-inline: var(--_padding-inline);
|
|
82
|
+
position: relative;
|
|
83
|
+
font-family: inherit;
|
|
84
|
+
font-size: var(--_font-size);
|
|
85
|
+
font-weight: var(--_font-weight);
|
|
86
|
+
line-height: var(--_line-height);
|
|
87
|
+
|
|
88
|
+
&:focus-visible {
|
|
89
|
+
outline-color: color-mix(
|
|
90
|
+
in srgb,
|
|
91
|
+
var(--_color-outline),
|
|
92
|
+
transparent var(--_color-outline-alpha)
|
|
93
|
+
);
|
|
94
|
+
border-radius: 2px;
|
|
95
|
+
overflow: visible;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:hover,
|
|
99
|
+
&.selected:hover,
|
|
100
|
+
&:active {
|
|
101
|
+
--_color-bg: var(--gds-sys-color-base200);
|
|
102
|
+
--_color-border: var(--gds-sys-color-base600);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.selected {
|
|
106
|
+
--_color-bg: var(--gds-sys-color-base100);
|
|
107
|
+
--_color-border: var(--gds-sys-color-base700);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
slot:not([name]) {
|
|
111
|
+
display: inline-block;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-overflow: ellipsis;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
101
116
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
--
|
|
117
|
+
.compact {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
--_padding-inline: var(--gds-space-s);
|
|
121
|
+
--_gap: 1px;
|
|
122
|
+
font-size: 0.875rem;
|
|
123
|
+
height: 56px;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
|
|
126
|
+
& > slot[name] {
|
|
127
|
+
order: 0;
|
|
128
|
+
}
|
|
129
|
+
& > slot:not([name]) {
|
|
130
|
+
order: 1;
|
|
131
|
+
}
|
|
106
132
|
}
|
|
107
133
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
text-overflow: ellipsis;
|
|
112
|
-
white-space: nowrap;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
.compact {
|
|
116
|
-
display: flex;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
--_padding-inline: var(--gds-space-s);
|
|
119
|
-
--_gap: 1px;
|
|
120
|
-
font-size: 0.875rem;
|
|
121
|
-
height: 56px;
|
|
122
|
-
justify-content: center;
|
|
123
|
-
|
|
124
|
-
& > slot[name] {
|
|
125
|
-
order: 0;
|
|
126
|
-
}
|
|
127
|
-
& > slot:not([name]) {
|
|
128
|
-
order: 1;
|
|
134
|
+
a {
|
|
135
|
+
text-decoration: none;
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
138
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
--_color-bg: var(--gds-sys-color-container-container-disabled);
|
|
140
|
-
border-color: var(--_color-bg);
|
|
141
|
-
color: var(--gds-sys-color-content-content-disabled);
|
|
142
|
-
pointer-events: none;
|
|
139
|
+
@layer disabled {
|
|
140
|
+
:disabled {
|
|
141
|
+
--_color-bg: var(--gds-sys-color-container-container-disabled);
|
|
142
|
+
border-color: var(--_color-bg);
|
|
143
|
+
color: var(--gds-sys-color-content-content-disabled);
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
143
146
|
}
|
|
144
|
-
}
|
|
145
147
|
`;
|
|
148
|
+
var menu_button_styles_default = style;
|
|
146
149
|
|
|
147
150
|
// libs/core/src/components/menu-button/menu-button.ts
|
|
148
151
|
var _isLink, isLink_get, _defaultRel, defaultRel_get;
|
|
@@ -189,7 +192,7 @@ _defaultRel = new WeakSet();
|
|
|
189
192
|
defaultRel_get = function() {
|
|
190
193
|
return this.target === "_blank" ? "noreferrer noopener" : void 0;
|
|
191
194
|
};
|
|
192
|
-
GdsMenuButton.styles = [tokens, unsafeCSS(
|
|
195
|
+
GdsMenuButton.styles = [tokens, unsafeCSS(menu_button_styles_default)];
|
|
193
196
|
GdsMenuButton.shadowRootOptions = {
|
|
194
197
|
mode: "open",
|
|
195
198
|
delegatesFocus: true
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk.H2KG3F2S.js";
|
|
4
4
|
import {
|
|
5
5
|
forwardAttributes
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.BIKXIJTT.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsFormControlElement
|
|
9
9
|
} from "./chunk.JPBBNSKG.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk.TYGMNHNO.js";
|
|
13
13
|
import {
|
|
14
14
|
tokens
|
|
15
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.WK4MCKEH.js";
|
|
16
16
|
import {
|
|
17
17
|
gdsCustomElement,
|
|
18
18
|
html
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsContainer
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.JUON57CD.js";
|
|
4
4
|
import {
|
|
5
5
|
styleExpressionProperty
|
|
6
6
|
} from "./chunk.H2KG3F2S.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.WK4MCKEH.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
__decorateClass
|
|
16
16
|
} from "./chunk.SEHSDSX2.js";
|
|
17
17
|
|
|
18
|
-
// libs/core/src/components/flex/flex.
|
|
18
|
+
// libs/core/src/components/flex/flex.styles.ts
|
|
19
19
|
import { css } from "lit";
|
|
20
20
|
var style = css`
|
|
21
21
|
:host {
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
-
var
|
|
25
|
+
var flex_styles_default = style;
|
|
26
26
|
|
|
27
27
|
// libs/core/src/components/flex/flex.ts
|
|
28
28
|
var GdsFlex = class extends GdsContainer {
|
|
@@ -34,7 +34,7 @@ var GdsFlex = class extends GdsContainer {
|
|
|
34
34
|
return html`<slot></slot>`;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
GdsFlex.styles = [tokens,
|
|
37
|
+
GdsFlex.styles = [tokens, flex_styles_default];
|
|
38
38
|
__decorateClass([
|
|
39
39
|
styleExpressionProperty({
|
|
40
40
|
styleTemplate: (_prop, values) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsContainer
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.JUON57CD.js";
|
|
4
4
|
import {
|
|
5
5
|
styleExpressionProperty
|
|
6
6
|
} from "./chunk.H2KG3F2S.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.WK4MCKEH.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsContainer
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.JUON57CD.js";
|
|
4
4
|
import {
|
|
5
5
|
styleExpressionProperty
|
|
6
6
|
} from "./chunk.H2KG3F2S.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.WK4MCKEH.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forwardAttributes
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.BIKXIJTT.js";
|
|
4
4
|
import {
|
|
5
5
|
GdsFormControlElement
|
|
6
6
|
} from "./chunk.JPBBNSKG.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.WK4MCKEH.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
package/chunks/chunk.MLXMQIEV.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
// libs/core/src/utils/helpers/custom-element-scoping.ts
|
|
7
7
|
import { html as litHtml } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
-
var VER_SUFFIX = "-
|
|
9
|
+
var VER_SUFFIX = "-087d7c";
|
|
10
10
|
var ScopedElementRegistry = class {
|
|
11
11
|
static get instance() {
|
|
12
12
|
var _a;
|
|
@@ -7,9 +7,6 @@ import {
|
|
|
7
7
|
__privateMethod
|
|
8
8
|
} from "./chunk.SEHSDSX2.js";
|
|
9
9
|
|
|
10
|
-
// libs/core/src/components/dialog/scroll-lock.ts
|
|
11
|
-
import { css } from "lit";
|
|
12
|
-
|
|
13
10
|
// libs/core/src/utils/global-styles.ts
|
|
14
11
|
var _useLegacyStylesheets, _styleSheets, _legacyStyleSheets, _initialStyleSheets, _injectStylesLegacy, injectStylesLegacy_fn, _injectStyles, injectStyles_fn;
|
|
15
12
|
var _GlobalStylesRegistry = class _GlobalStylesRegistry {
|
|
@@ -69,66 +66,6 @@ injectStyles_fn = function(key, styleSheet) {
|
|
|
69
66
|
};
|
|
70
67
|
var GlobalStylesRegistry = _GlobalStylesRegistry;
|
|
71
68
|
|
|
72
|
-
// libs/core/src/components/dialog/scroll-lock.ts
|
|
73
|
-
var locks = /* @__PURE__ */ new Set();
|
|
74
|
-
function registerGlobalScrollLockStyles() {
|
|
75
|
-
GlobalStylesRegistry.instance.injectGlobalStyles(
|
|
76
|
-
"dialog-scroll-lock",
|
|
77
|
-
css`
|
|
78
|
-
.gds-scroll-lock body {
|
|
79
|
-
padding-right: var(--gds-scroll-lock-size) !important;
|
|
80
|
-
overflow: hidden !important;
|
|
81
|
-
}
|
|
82
|
-
`
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
function lockBodyScrolling(lockingEl) {
|
|
86
|
-
locks.add(lockingEl);
|
|
87
|
-
if (!document.documentElement.classList.contains("gds-scroll-lock")) {
|
|
88
|
-
const scrollbarWidth = getScrollbarWidth() + getExistingBodyPadding();
|
|
89
|
-
let scrollbarGutterProperty = getComputedStyle(
|
|
90
|
-
document.documentElement
|
|
91
|
-
).scrollbarGutter;
|
|
92
|
-
if (!scrollbarGutterProperty || scrollbarGutterProperty === "auto") {
|
|
93
|
-
scrollbarGutterProperty = "stable";
|
|
94
|
-
}
|
|
95
|
-
if (scrollbarWidth < 2) {
|
|
96
|
-
scrollbarGutterProperty = "";
|
|
97
|
-
}
|
|
98
|
-
document.documentElement.style.setProperty(
|
|
99
|
-
"--gds-scroll-lock-gutter",
|
|
100
|
-
scrollbarGutterProperty
|
|
101
|
-
);
|
|
102
|
-
document.documentElement.classList.add("gds-scroll-lock");
|
|
103
|
-
document.documentElement.style.setProperty(
|
|
104
|
-
"--gds-scroll-lock-size",
|
|
105
|
-
`${scrollbarWidth}px`
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function unlockBodyScrolling(lockingEl) {
|
|
110
|
-
locks.delete(lockingEl);
|
|
111
|
-
if (locks.size === 0) {
|
|
112
|
-
document.documentElement.classList.remove("gds-scroll-lock");
|
|
113
|
-
document.documentElement.style.removeProperty("--gds-scroll-lock-size");
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function getScrollbarWidth() {
|
|
117
|
-
const documentWidth = document.documentElement.clientWidth;
|
|
118
|
-
return Math.abs(window.innerWidth - documentWidth);
|
|
119
|
-
}
|
|
120
|
-
function getExistingBodyPadding() {
|
|
121
|
-
const padding = Number(
|
|
122
|
-
getComputedStyle(document.body).paddingRight.replace(/px/, "")
|
|
123
|
-
);
|
|
124
|
-
if (isNaN(padding) || !padding) {
|
|
125
|
-
return 0;
|
|
126
|
-
}
|
|
127
|
-
return padding;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
69
|
export {
|
|
131
|
-
|
|
132
|
-
lockBodyScrolling,
|
|
133
|
-
unlockBodyScrolling
|
|
70
|
+
GlobalStylesRegistry
|
|
134
71
|
};
|