@sebgroup/green-core 1.66.1 → 1.67.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.CUO2GKQU.js → chunk.3MJMOQOX.js} +2 -2
- package/chunks/{chunk.YCBBHBJE.js → chunk.3NBQ2PRS.js} +1 -1
- package/chunks/{chunk.NZPQWRHY.js → chunk.4YRO4E64.js} +1 -1
- package/chunks/{chunk.ZTC4XBBD.js → chunk.6V6QLNQB.js} +2 -2
- package/chunks/{chunk.SR2K6TIR.js → chunk.7LNHHH57.js} +1 -1
- package/chunks/{chunk.H6NW2AZI.js → chunk.7MIJL6FL.js} +1 -1
- package/chunks/{chunk.UCWZMGLJ.js → chunk.AL24X7CY.js} +2 -2
- package/chunks/{chunk.CGCEAKK2.js → chunk.AOINZYY2.js} +2 -2
- package/chunks/{chunk.PKIA4VAQ.js → chunk.AYIH4D6U.js} +1 -1
- package/chunks/{chunk.JATJPE5A.js → chunk.B5GHCIGU.js} +1 -1
- package/chunks/{chunk.PLEPR2D6.js → chunk.CHDZQWNG.js} +2 -2
- package/chunks/{chunk.PFDA2XEU.js → chunk.CMRJ2RCK.js} +1 -1
- package/chunks/{chunk.RL6DEFTH.js → chunk.E6IZLZQR.js} +1 -1
- package/chunks/{chunk.LQWSUUSO.js → chunk.EK22LULQ.js} +1 -1
- package/chunks/{chunk.PRZWHTIF.js → chunk.EMUIGV5M.js} +1 -1
- package/chunks/{chunk.FWPPRWSD.js → chunk.G3XFYBF2.js} +2 -2
- package/chunks/{chunk.ABTQCCBV.js → chunk.ID34XSGN.js} +1 -1
- package/chunks/{chunk.K7LF45RZ.js → chunk.IOOPZ72S.js} +2 -2
- package/chunks/{chunk.K5MGPWSI.js → chunk.JL3K5XJY.js} +1 -1
- package/chunks/{chunk.WL6NWVQ4.js → chunk.JQWF2E4U.js} +1 -1
- package/chunks/{chunk.2TZQ3MDQ.js → chunk.KTN7YXSZ.js} +6 -6
- package/chunks/{chunk.GA3YH7BJ.js → chunk.KXTVFUVF.js} +1 -1
- package/chunks/{chunk.SFLNKTO7.js → chunk.MQSA6VMY.js} +2 -2
- package/chunks/{chunk.IWPDKCOR.js → chunk.NOU3HFTT.js} +1 -1
- package/chunks/{chunk.JG7YSP2S.js → chunk.OCESWEVH.js} +1 -1
- package/chunks/{chunk.MB4N2TLS.js → chunk.OTU6ZHPU.js} +1 -1
- package/chunks/{chunk.LIZU7Q7S.js → chunk.P7CFNKD7.js} +2 -2
- package/chunks/chunk.QK3R23GV.js +1 -1
- package/chunks/{chunk.X24GDWPW.js → chunk.QKBLZWH4.js} +2 -1
- package/chunks/{chunk.FXUCA5WD.js → chunk.QRX476LW.js} +1 -1
- package/chunks/{chunk.RQIXSEFI.js → chunk.QTI7K6I6.js} +2 -2
- package/chunks/{chunk.A2ARMXHR.js → chunk.RDWBPCWR.js} +5 -1
- package/chunks/{chunk.DUSS7BGM.js → chunk.TNIKDP6L.js} +2 -2
- package/chunks/{chunk.U34BD2JF.js → chunk.TU34GJER.js} +1 -1
- package/chunks/{chunk.B3PSMHT6.js → chunk.WL2S22CZ.js} +23 -17
- package/chunks/{chunk.PKUTRSH5.js → chunk.WXVS3SLU.js} +1 -1
- package/chunks/{chunk.OS6N3LBH.js → chunk.XIWEH3MB.js} +61 -36
- package/chunks/{chunk.PKLJ2TLQ.js → chunk.XSUNNKLW.js} +2 -2
- package/chunks/{chunk.BQMZCIMP.js → chunk.YPWOTBMN.js} +2 -2
- package/chunks/{chunk.GKVOMAJ2.js → chunk.ZHOLTMVV.js} +1 -1
- package/chunks/{chunk.X25JMZXD.js → chunk.ZT2O7MBG.js} +2 -2
- package/components/badge/badge.js +4 -4
- package/components/badge/index.js +4 -4
- package/components/button/button.js +4 -4
- package/components/button/button.trans.styles.js +2 -2
- package/components/button/index.js +4 -4
- package/components/calendar/calendar.js +3 -3
- package/components/calendar/calendar.trans.styles.js +2 -2
- package/components/calendar/index.js +3 -3
- package/components/card/card.js +3 -3
- package/components/card/index.js +3 -3
- package/components/container/container.js +3 -3
- package/components/container/index.js +3 -3
- package/components/context-menu/context-menu.js +6 -6
- package/components/context-menu/context-menu.trans.styles.js +2 -2
- package/components/context-menu/index.js +7 -7
- package/components/datepicker/datepicker.js +16 -16
- package/components/datepicker/datepicker.trans.styles.js +2 -2
- package/components/datepicker/index.js +16 -16
- package/components/dialog/dialog.js +7 -7
- package/components/dialog/index.js +7 -7
- package/components/div/div.js +2 -2
- package/components/div/index.js +2 -2
- package/components/divider/divider.js +2 -2
- package/components/divider/index.js +2 -2
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +13 -13
- package/components/dropdown/dropdown.trans.styles.js +2 -2
- package/components/dropdown/index.js +14 -14
- package/components/fab/fab.js +5 -5
- package/components/fab/index.js +5 -5
- package/components/filter-chips/filter-chip/filter-chip.js +5 -5
- package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +2 -2
- package/components/filter-chips/filter-chip/index.js +5 -5
- package/components/filter-chips/filter-chips.js +5 -5
- package/components/filter-chips/filter-chips.trans.styles.js +2 -2
- package/components/filter-chips/index.js +5 -5
- package/components/flex/flex.js +3 -3
- package/components/flex/index.js +3 -3
- package/components/form/index.js +6 -6
- package/components/form/summary/index.js +6 -6
- package/components/form/summary/summary.js +6 -6
- package/components/grid/grid.js +3 -3
- package/components/grid/index.js +3 -3
- package/components/grouped-list/grouped-list.js +3 -3
- package/components/grouped-list/grouped-list.trans.styles.js +2 -2
- package/components/grouped-list/index.js +3 -3
- package/components/img/img.js +2 -2
- package/components/img/index.js +2 -2
- package/components/index.js +38 -38
- package/components/input/index.js +10 -10
- package/components/input/input.js +10 -10
- package/components/input/input.trans.styles.js +2 -2
- package/components/link/index.js +2 -2
- package/components/link/link.js +2 -2
- package/components/mask/index.js +4 -4
- package/components/mask/mask.js +4 -4
- package/components/menu-button/index.js +2 -2
- package/components/menu-button/menu-button.js +2 -2
- package/components/popover/index.js +3 -3
- package/components/popover/popover.d.ts +2 -1
- package/components/popover/popover.js +3 -3
- package/components/popover/popover.trans.styles.js +2 -2
- package/components/rich-text/index.js +2 -2
- package/components/rich-text/rich-text.js +2 -2
- package/components/segmented-control/index.js +4 -4
- package/components/segmented-control/segment/index.js +3 -3
- package/components/segmented-control/segment/segment.js +3 -3
- package/components/segmented-control/segment/segment.trans.styles.js +2 -2
- package/components/segmented-control/segmented-control.js +4 -4
- package/components/segmented-control/segmented-control.trans.styles.js +2 -2
- package/components/select/index.js +10 -10
- package/components/select/select.js +10 -10
- package/components/select/select.trans.styles.js +2 -2
- package/components/signal/index.js +2 -2
- package/components/signal/signal.js +2 -2
- package/components/spacer/index.js +2 -2
- package/components/spacer/spacer.js +2 -2
- package/components/text/index.js +3 -3
- package/components/text/text.js +3 -3
- package/components/textarea/index.js +10 -10
- package/components/textarea/textarea.js +10 -10
- package/components/theme/index.js +3 -3
- package/components/theme/theme.js +3 -3
- package/components/theme/theme.trans.styles.js +2 -2
- package/components/video/index.js +2 -2
- package/components/video/video.js +2 -2
- package/generated/locale-codes.d.ts +2 -2
- package/generated/locales/da.d.ts +42 -0
- package/generated/locales/de.d.ts +42 -0
- package/generated/locales/fi.d.ts +42 -0
- package/generated/locales/fr.d.ts +42 -0
- package/generated/locales/it.d.ts +42 -0
- package/generated/locales/nl.d.ts +42 -0
- package/generated/locales/no.d.ts +42 -0
- package/index.js +38 -38
- package/localization.js +365 -6
- package/package.json +1 -1
- package/primitives/field-base/field-base.js +3 -3
- package/primitives/field-base/index.js +3 -3
- package/primitives/form-control-footer/form-control-footer.js +4 -4
- package/primitives/form-control-footer/index.js +4 -4
- package/primitives/form-control-header/form-control-header.js +6 -6
- package/primitives/form-control-header/index.js +6 -6
- package/primitives/listbox/index.js +4 -4
- package/primitives/listbox/listbox.js +4 -4
- package/primitives/listbox/option.js +3 -3
- package/primitives/menu/index.js +4 -4
- package/primitives/menu/menu-heading.js +3 -3
- package/primitives/menu/menu-item.js +3 -3
- package/primitives/menu/menu.js +4 -4
- package/primitives/ripple/index.js +2 -2
- package/primitives/ripple/ripple.js +2 -2
- package/transitional-styles.js +2 -2
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk.UEJZWDMS.js";
|
|
4
4
|
import {
|
|
5
5
|
GdsDiv
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.E6IZLZQR.js";
|
|
7
7
|
import {
|
|
8
8
|
styleExpressionProperty
|
|
9
9
|
} from "./chunk.NUUST5OZ.js";
|
|
10
10
|
import {
|
|
11
11
|
tokens
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
13
13
|
import {
|
|
14
14
|
gdsCustomElement
|
|
15
15
|
} from "./chunk.QK3R23GV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsDiv
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.E6IZLZQR.js";
|
|
4
4
|
import {
|
|
5
5
|
forSpaceTokens
|
|
6
6
|
} from "./chunk.76QWARGM.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk.NUUST5OZ.js";
|
|
10
10
|
import {
|
|
11
11
|
tokens
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
13
13
|
import {
|
|
14
14
|
gdsCustomElement,
|
|
15
15
|
html
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk.ZRKILGXZ.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.OCESWEVH.js";
|
|
8
8
|
import {
|
|
9
9
|
watch
|
|
10
10
|
} from "./chunk.TYGMNHNO.js";
|
|
11
11
|
import {
|
|
12
12
|
tokens
|
|
13
|
-
} from "./chunk.
|
|
13
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
14
14
|
import {
|
|
15
15
|
GdsElement
|
|
16
16
|
} from "./chunk.TMEWQZER.js";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
} from "./chunk.TWXTKG4B.js";
|
|
12
12
|
import {
|
|
13
13
|
TransitionalStyles
|
|
14
|
-
} from "./chunk.
|
|
14
|
+
} from "./chunk.OCESWEVH.js";
|
|
15
15
|
import {
|
|
16
16
|
tokens
|
|
17
|
-
} from "./chunk.
|
|
17
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
18
18
|
import {
|
|
19
19
|
gdsCustomElement,
|
|
20
20
|
html
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forwardAttributes
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.AOINZYY2.js";
|
|
4
4
|
import {
|
|
5
5
|
GdsFormControlElement
|
|
6
6
|
} from "./chunk.VA6TUMR2.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk.TWXTKG4B.js";
|
|
12
12
|
import {
|
|
13
13
|
tokens
|
|
14
|
-
} from "./chunk.
|
|
14
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
15
15
|
import {
|
|
16
16
|
gdsCustomElement,
|
|
17
17
|
html
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsDiv
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.E6IZLZQR.js";
|
|
4
4
|
import {
|
|
5
5
|
styleExpressionProperty
|
|
6
6
|
} from "./chunk.NUUST5OZ.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement,
|
|
12
12
|
html
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk.VHN4JEZC.js";
|
|
4
4
|
import {
|
|
5
5
|
forwardAttributes
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.AOINZYY2.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsFormControlElement
|
|
9
9
|
} from "./chunk.VA6TUMR2.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk.TYGMNHNO.js";
|
|
21
21
|
import {
|
|
22
22
|
tokens
|
|
23
|
-
} from "./chunk.
|
|
23
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
24
24
|
import {
|
|
25
25
|
gdsCustomElement,
|
|
26
26
|
html
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
// dist/libs/tokens/internal/dark.css?inline
|
|
6
6
|
var dark_default = `/**
|
|
7
7
|
* Do not edit directly
|
|
8
|
-
* Generated on
|
|
8
|
+
* Generated on Wed, 26 Feb 2025 13:02:34 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
color-scheme: dark;
|
|
@@ -119,7 +119,7 @@ color-scheme: dark;
|
|
|
119
119
|
// dist/libs/tokens/internal/light.css?inline
|
|
120
120
|
var light_default = `/**
|
|
121
121
|
* Do not edit directly
|
|
122
|
-
* Generated on
|
|
122
|
+
* Generated on Wed, 26 Feb 2025 13:02:34 GMT
|
|
123
123
|
*/
|
|
124
124
|
|
|
125
125
|
color-scheme: light;
|
|
@@ -236,7 +236,7 @@ import { css, unsafeCSS } from "lit";
|
|
|
236
236
|
// dist/libs/tokens/internal/motion.css?inline
|
|
237
237
|
var motion_default = `/**
|
|
238
238
|
* Do not edit directly
|
|
239
|
-
* Generated on
|
|
239
|
+
* Generated on Wed, 26 Feb 2025 13:02:34 GMT
|
|
240
240
|
*/
|
|
241
241
|
|
|
242
242
|
:host {
|
|
@@ -255,7 +255,7 @@ var motion_default = `/**
|
|
|
255
255
|
// dist/libs/tokens/internal/shadow.css?inline
|
|
256
256
|
var shadow_default = `/**
|
|
257
257
|
* Do not edit directly
|
|
258
|
-
* Generated on
|
|
258
|
+
* Generated on Wed, 26 Feb 2025 13:02:34 GMT
|
|
259
259
|
*/
|
|
260
260
|
|
|
261
261
|
:host {
|
|
@@ -270,7 +270,7 @@ var shadow_default = `/**
|
|
|
270
270
|
// dist/libs/tokens/internal/size.css?inline
|
|
271
271
|
var size_default = `/**
|
|
272
272
|
* Do not edit directly
|
|
273
|
-
* Generated on
|
|
273
|
+
* Generated on Wed, 26 Feb 2025 13:02:34 GMT
|
|
274
274
|
*/
|
|
275
275
|
|
|
276
276
|
:host {
|
|
@@ -297,7 +297,7 @@ var size_default = `/**
|
|
|
297
297
|
// dist/libs/tokens/internal/text.css?inline
|
|
298
298
|
var text_default = `/**
|
|
299
299
|
* Do not edit directly
|
|
300
|
-
* Generated on
|
|
300
|
+
* Generated on Wed, 26 Feb 2025 13:02:34 GMT
|
|
301
301
|
*/
|
|
302
302
|
|
|
303
303
|
:host {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsFlex
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.P7CFNKD7.js";
|
|
4
4
|
import {
|
|
5
5
|
styleExpressionProperty
|
|
6
6
|
} from "./chunk.NUUST5OZ.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
10
10
|
import {
|
|
11
11
|
gdsCustomElement
|
|
12
12
|
} from "./chunk.QK3R23GV.js";
|
package/chunks/chunk.QK3R23GV.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 = "-cde2ab";
|
|
10
10
|
var ScopedElementRegistry = class {
|
|
11
11
|
static get instance() {
|
|
12
12
|
var _a;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk.TWXTKG4B.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.OCESWEVH.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
10
|
} from "./chunk.TMEWQZER.js";
|
|
@@ -98,6 +98,7 @@ var GdsContextMenu = class extends withMarginProps(
|
|
|
98
98
|
</button>
|
|
99
99
|
<gds-popover
|
|
100
100
|
id="menu"
|
|
101
|
+
autofocus
|
|
101
102
|
.open=${this.open}
|
|
102
103
|
.triggerRef=${this.elTriggerBtn}
|
|
103
104
|
.anchorRef=${this.elTriggerBtn}
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
} from "./chunk.TWXTKG4B.js";
|
|
9
9
|
import {
|
|
10
10
|
TransitionalStyles
|
|
11
|
-
} from "./chunk.
|
|
11
|
+
} from "./chunk.OCESWEVH.js";
|
|
12
12
|
import {
|
|
13
13
|
watch
|
|
14
14
|
} from "./chunk.TYGMNHNO.js";
|
|
15
15
|
import {
|
|
16
16
|
tokens
|
|
17
|
-
} from "./chunk.
|
|
17
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
18
18
|
import {
|
|
19
19
|
GdsElement
|
|
20
20
|
} from "./chunk.TMEWQZER.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk.TYGMNHNO.js";
|
|
15
15
|
import {
|
|
16
16
|
tokens
|
|
17
|
-
} from "./chunk.
|
|
17
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
18
18
|
import {
|
|
19
19
|
gdsCustomElement,
|
|
20
20
|
html
|
|
@@ -171,6 +171,7 @@ var Select = class extends GdsFormControlElement {
|
|
|
171
171
|
const CLASSES = {
|
|
172
172
|
multiple: this.multiple
|
|
173
173
|
};
|
|
174
|
+
this.selectElement && (this.selectElement.disabled = this.disabled);
|
|
174
175
|
return html`
|
|
175
176
|
<gds-form-control-header class="size-${this.size}">
|
|
176
177
|
<label for="select" slot="label" id="label-text">${this.label}</label>
|
|
@@ -208,8 +209,11 @@ var Select = class extends GdsFormControlElement {
|
|
|
208
209
|
"supporting-text extended-supporting-text sub-label message"
|
|
209
210
|
);
|
|
210
211
|
clone.setAttribute("id", "select");
|
|
212
|
+
clone.disabled = this.disabled;
|
|
211
213
|
if (!__privateGet(this, _isValueInitialized))
|
|
212
214
|
this.value = clone.value;
|
|
215
|
+
else
|
|
216
|
+
clone.value = this.value;
|
|
213
217
|
return clone;
|
|
214
218
|
});
|
|
215
219
|
this._elSelectContainer.replaceChildren(...cloned);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TransitionalStyles
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.OCESWEVH.js";
|
|
4
4
|
import {
|
|
5
5
|
watch
|
|
6
6
|
} from "./chunk.TYGMNHNO.js";
|
|
7
7
|
import {
|
|
8
8
|
tokens
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.KTN7YXSZ.js";
|
|
10
10
|
import {
|
|
11
11
|
GdsElement
|
|
12
12
|
} from "./chunk.TMEWQZER.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk.WM7HBMMV.js";
|
|
4
4
|
import {
|
|
5
5
|
TransitionalStyles
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.OCESWEVH.js";
|
|
7
7
|
import {
|
|
8
8
|
watch
|
|
9
9
|
} from "./chunk.TYGMNHNO.js";
|
|
@@ -71,6 +71,10 @@ var style = css`
|
|
|
71
71
|
border-radius: 0.5rem;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
:host([nonmodal]) dialog {
|
|
75
|
+
z-index: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
@media (max-width: 767px) {
|
|
75
79
|
dialog.use-modal-in-mobile {
|
|
76
80
|
border-radius: 1rem 1rem 0 0;
|
|
@@ -152,27 +156,30 @@ var GdsPopover = class extends GdsElement {
|
|
|
152
156
|
__privateAdd(this, _isMobileViewport, false);
|
|
153
157
|
__privateAdd(this, _backdropEl, void 0);
|
|
154
158
|
__privateAdd(this, _handleCancel, () => {
|
|
155
|
-
this.
|
|
156
|
-
|
|
159
|
+
if (__privateGet(this, _dispatchUiStateEvent).call(this, "cancel"))
|
|
160
|
+
this.open = false;
|
|
157
161
|
});
|
|
158
162
|
__privateAdd(this, _dispatchUiStateEvent, (reason) => {
|
|
159
|
-
|
|
163
|
+
const toState = reason === "show" ? true : false;
|
|
164
|
+
return this.dispatchEvent(
|
|
160
165
|
new CustomEvent("gds-ui-state", {
|
|
161
|
-
detail: { open:
|
|
166
|
+
detail: { open: toState, reason },
|
|
162
167
|
bubbles: false,
|
|
163
|
-
composed: false
|
|
168
|
+
composed: false,
|
|
169
|
+
cancelable: true
|
|
164
170
|
})
|
|
165
171
|
);
|
|
166
172
|
});
|
|
167
173
|
__privateAdd(this, _handleCloseButton, (e) => {
|
|
168
174
|
e.stopPropagation();
|
|
169
175
|
e.preventDefault();
|
|
170
|
-
this.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
if (__privateGet(this, _dispatchUiStateEvent).call(this, "close")) {
|
|
177
|
+
this.open = false;
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
var _a;
|
|
180
|
+
return (_a = this._trigger) == null ? void 0 : _a.focus();
|
|
181
|
+
}, 250);
|
|
182
|
+
}
|
|
176
183
|
});
|
|
177
184
|
/**
|
|
178
185
|
* ArrowDown or ArrowUp on the trigger element will trigger the popover by default, and escape will close it.
|
|
@@ -189,8 +196,8 @@ var GdsPopover = class extends GdsElement {
|
|
|
189
196
|
});
|
|
190
197
|
__privateAdd(this, _handleTriggerClick, (e) => {
|
|
191
198
|
e.preventDefault();
|
|
192
|
-
this.
|
|
193
|
-
|
|
199
|
+
if (__privateGet(this, _dispatchUiStateEvent).call(this, this.open ? "close" : "show"))
|
|
200
|
+
this.open = !this.open;
|
|
194
201
|
});
|
|
195
202
|
/**
|
|
196
203
|
* Move focus to the first slotted child.
|
|
@@ -209,9 +216,8 @@ var GdsPopover = class extends GdsElement {
|
|
|
209
216
|
if (isNotEnterKey && dialog && this.open) {
|
|
210
217
|
const rect = dialog.getBoundingClientRect();
|
|
211
218
|
const isInDialog = rect.top <= e.clientY && e.clientY <= rect.top + rect.height && rect.left <= e.clientX && e.clientX <= rect.left + rect.width;
|
|
212
|
-
if (!isInDialog) {
|
|
219
|
+
if (!isInDialog && __privateGet(this, _dispatchUiStateEvent).call(this, "close")) {
|
|
213
220
|
this.open = false;
|
|
214
|
-
__privateGet(this, _dispatchUiStateEvent).call(this, "close");
|
|
215
221
|
}
|
|
216
222
|
}
|
|
217
223
|
});
|
|
@@ -472,7 +478,7 @@ __decorateClass([
|
|
|
472
478
|
property({ attribute: false })
|
|
473
479
|
], GdsPopover.prototype, "calcMaxHeight", 2);
|
|
474
480
|
__decorateClass([
|
|
475
|
-
property({ type: Boolean })
|
|
481
|
+
property({ type: Boolean, reflect: true })
|
|
476
482
|
], GdsPopover.prototype, "nonmodal", 2);
|
|
477
483
|
__decorateClass([
|
|
478
484
|
property()
|