@govtechsg/sgds-web-component 3.3.3-rc.2 → 3.4.0-rc.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/Masthead/index.js +1 -1
- package/base/card-element.d.ts +2 -1
- package/base/card-element.js +2 -10
- package/base/card-element.js.map +1 -1
- package/base/card.js +1 -1
- package/base/sgds-element2.js +1 -1
- package/components/Accordion/index.umd.js +1 -1
- package/components/Alert/index.umd.js +1 -1
- package/components/Badge/index.umd.js +1 -1
- package/components/Breadcrumb/index.umd.js +1 -1
- package/components/Button/index.umd.js +1 -1
- package/components/Card/index.umd.js +3716 -3705
- package/components/Card/index.umd.js.map +1 -1
- package/components/Card/sgds-card.d.ts +8 -1
- package/components/Card/sgds-card.js +47 -14
- package/components/Card/sgds-card.js.map +1 -1
- package/components/Checkbox/index.umd.js +1 -1
- package/components/ComboBox/index.umd.js +9 -1
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +4 -0
- package/components/ComboBox/sgds-combo-box.js +8 -0
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/index.umd.js +1 -1
- package/components/DescriptionList/index.umd.js +1 -1
- package/components/Divider/index.umd.js +1 -1
- package/components/Drawer/drawer.js +1 -1
- package/components/Drawer/index.umd.js +17 -4
- package/components/Drawer/index.umd.js.map +1 -1
- package/components/Drawer/sgds-drawer.d.ts +8 -0
- package/components/Drawer/sgds-drawer.js +15 -2
- package/components/Drawer/sgds-drawer.js.map +1 -1
- package/components/Dropdown/index.umd.js +1 -1
- package/components/FileUpload/index.umd.js +1 -1
- package/components/Footer/index.umd.js +1 -1
- package/components/Icon/index.umd.js +1 -1
- package/components/IconButton/index.umd.js +1 -1
- package/components/IconCard/index.umd.js +93 -137
- package/components/IconCard/index.umd.js.map +1 -1
- package/components/IconCard/sgds-icon-card.d.ts +7 -2
- package/components/IconCard/sgds-icon-card.js +39 -12
- package/components/IconCard/sgds-icon-card.js.map +1 -1
- package/components/IconList/index.umd.js +1 -1
- package/components/ImageCard/index.umd.js +91 -136
- package/components/ImageCard/index.umd.js.map +1 -1
- package/components/ImageCard/sgds-image-card.d.ts +7 -2
- package/components/ImageCard/sgds-image-card.js +37 -11
- package/components/ImageCard/sgds-image-card.js.map +1 -1
- package/components/Input/index.umd.js +1 -1
- package/components/Link/index.umd.js +1 -1
- package/components/Mainnav/index.umd.js +44 -63
- package/components/Mainnav/index.umd.js.map +1 -1
- package/components/Mainnav/mainnav-context.d.ts +4 -1
- package/components/Mainnav/mainnav-context.js +3 -2
- package/components/Mainnav/mainnav-context.js.map +1 -1
- package/components/Mainnav/sgds-mainnav-dropdown.d.ts +1 -3
- package/components/Mainnav/sgds-mainnav-dropdown.js +13 -33
- package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/components/Mainnav/sgds-mainnav-item.js +4 -2
- package/components/Mainnav/sgds-mainnav-item.js.map +1 -1
- package/components/Mainnav/sgds-mainnav.d.ts +4 -2
- package/components/Mainnav/sgds-mainnav.js +26 -28
- package/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/components/Masthead/index.umd.js +1 -1
- package/components/Modal/index.umd.js +1 -1
- package/components/OverflowMenu/index.umd.js +1 -1
- package/components/Pagination/index.umd.js +1 -1
- package/components/ProgressBar/index.umd.js +1 -1
- package/components/QuantityToggle/index.umd.js +1 -1
- package/components/Radio/index.umd.js +1 -1
- package/components/Select/index.umd.js +12 -1
- package/components/Select/index.umd.js.map +1 -1
- package/components/Select/sgds-select.d.ts +5 -0
- package/components/Select/sgds-select.js +11 -0
- package/components/Select/sgds-select.js.map +1 -1
- package/components/Sidenav/index.umd.js +1 -1
- package/components/Skeleton/index.umd.js +1 -1
- package/components/Spinner/index.umd.js +1 -1
- package/components/Stepper/index.umd.js +1 -1
- package/components/Subnav/index.umd.js +1 -1
- package/components/Switch/index.umd.js +1 -1
- package/components/Tab/index.umd.js +1 -1
- package/components/Table/index.umd.js +1 -1
- package/components/TableOfContents/index.umd.js +1 -1
- package/components/Textarea/index.umd.js +1 -1
- package/components/ThumbnailCard/index.umd.js +93 -142
- package/components/ThumbnailCard/index.umd.js.map +1 -1
- package/components/ThumbnailCard/sgds-thumbnail-card.d.ts +7 -2
- package/components/ThumbnailCard/sgds-thumbnail-card.js +38 -16
- package/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/components/ThumbnailCard/thumbnail-card.js +1 -1
- package/components/Toast/index.umd.js +1 -1
- package/components/Tooltip/index.umd.js +1 -1
- package/components/index.umd.js +238 -121
- package/components/index.umd.js.map +1 -1
- package/index.umd.js +238 -121
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/react/base/card-element.cjs.js +2 -10
- package/react/base/card-element.cjs.js.map +1 -1
- package/react/base/card-element.js +2 -10
- package/react/base/card-element.js.map +1 -1
- package/react/base/card.cjs.js +1 -1
- package/react/base/card.js +1 -1
- package/react/base/sgds-element.cjs2.js +1 -1
- package/react/base/sgds-element2.js +1 -1
- package/react/combo-box/index.cjs.js +3 -0
- package/react/combo-box/index.cjs.js.map +1 -1
- package/react/combo-box/index.js +3 -0
- package/react/combo-box/index.js.map +1 -1
- package/react/components/Card/sgds-card.cjs.js +46 -13
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js +47 -14
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +8 -0
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +8 -0
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/Drawer/drawer.cjs.js +1 -1
- package/react/components/Drawer/drawer.js +1 -1
- package/react/components/Drawer/sgds-drawer.cjs.js +15 -2
- package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
- package/react/components/Drawer/sgds-drawer.js +15 -2
- package/react/components/Drawer/sgds-drawer.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.cjs.js +38 -11
- package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.js +39 -12
- package/react/components/IconCard/sgds-icon-card.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.cjs.js +36 -10
- package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.js +37 -11
- package/react/components/ImageCard/sgds-image-card.js.map +1 -1
- package/react/components/Mainnav/mainnav-context.cjs.js +4 -2
- package/react/components/Mainnav/mainnav-context.cjs.js.map +1 -1
- package/react/components/Mainnav/mainnav-context.js +3 -2
- package/react/components/Mainnav/mainnav-context.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js +12 -32
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.js +13 -33
- package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-item.cjs.js +4 -2
- package/react/components/Mainnav/sgds-mainnav-item.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-item.js +4 -2
- package/react/components/Mainnav/sgds-mainnav-item.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.cjs.js +25 -27
- package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav.js +26 -28
- package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
- package/react/components/Select/sgds-select.cjs.js +11 -0
- package/react/components/Select/sgds-select.cjs.js.map +1 -1
- package/react/components/Select/sgds-select.js +11 -0
- package/react/components/Select/sgds-select.js.map +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js +37 -15
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js.map +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js +38 -16
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/react/components/ThumbnailCard/thumbnail-card.cjs.js +1 -1
- package/react/components/ThumbnailCard/thumbnail-card.js +1 -1
- package/react/select/index.cjs.js +3 -0
- package/react/select/index.cjs.js.map +1 -1
- package/react/select/index.js +3 -0
- package/react/select/index.js.map +1 -1
|
@@ -11,19 +11,24 @@ import { CardImageAdjustment, CardImagePosition } from "../Card/types";
|
|
|
11
11
|
* @slot title - The title of the card
|
|
12
12
|
* @slot description - The paragrapher text of the card
|
|
13
13
|
* @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.
|
|
14
|
-
* @slot
|
|
14
|
+
* @slot footer - Footer area of the card. Accepts links, actions, or any custom content.
|
|
15
|
+
* @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.
|
|
16
|
+
* Legacy slot for anchor elements. Use `footer` instead.
|
|
15
17
|
*/
|
|
16
18
|
export declare class SgdsImageCard extends CardElement {
|
|
17
19
|
static styles: import("lit").CSSResult[];
|
|
18
20
|
/** @internal */
|
|
19
21
|
_imageNode: Array<Node>;
|
|
22
|
+
private footerNode;
|
|
23
|
+
private linkNode;
|
|
20
24
|
/** Removes the card's internal padding when set to true. */
|
|
21
25
|
noPadding: boolean;
|
|
22
26
|
/** Sets the image position of the card. Available options: `before`, `after` */
|
|
23
27
|
imagePosition: CardImagePosition;
|
|
24
28
|
/** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */
|
|
25
29
|
imageAdjustment: CardImageAdjustment;
|
|
26
|
-
private
|
|
30
|
+
private get linkSlotItems();
|
|
31
|
+
private get footerSlotItems();
|
|
27
32
|
protected firstUpdated(): void;
|
|
28
33
|
handleImgSlotChange(e: Event): void;
|
|
29
34
|
render(): import("lit-html").TemplateResult;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import { nothing } from 'lit';
|
|
3
3
|
import { literal, html } from 'lit/static-html.js';
|
|
4
|
-
import { queryAssignedNodes, property } from 'lit/decorators.js';
|
|
4
|
+
import { queryAssignedNodes, queryAssignedElements, property } from 'lit/decorators.js';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
6
|
import { CardElement } from '../../base/card-element.js';
|
|
7
|
-
import { HasSlotController } from '../../utils/slot.js';
|
|
8
7
|
import css_248z from './image-card.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -18,7 +17,9 @@ import css_248z from './image-card.js';
|
|
|
18
17
|
* @slot title - The title of the card
|
|
19
18
|
* @slot description - The paragrapher text of the card
|
|
20
19
|
* @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.
|
|
21
|
-
* @slot
|
|
20
|
+
* @slot footer - Footer area of the card. Accepts links, actions, or any custom content.
|
|
21
|
+
* @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.
|
|
22
|
+
* Legacy slot for anchor elements. Use `footer` instead.
|
|
22
23
|
*/
|
|
23
24
|
class SgdsImageCard extends CardElement {
|
|
24
25
|
constructor() {
|
|
@@ -29,9 +30,21 @@ class SgdsImageCard extends CardElement {
|
|
|
29
30
|
this.imagePosition = "before";
|
|
30
31
|
/** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */
|
|
31
32
|
this.imageAdjustment = "default";
|
|
32
|
-
|
|
33
|
+
}
|
|
34
|
+
get linkSlotItems() {
|
|
35
|
+
if (!this.linkNode || this.linkNode.length === 0)
|
|
36
|
+
return null;
|
|
37
|
+
const element = this.linkNode[0];
|
|
38
|
+
return (element.querySelector("a") || element);
|
|
39
|
+
}
|
|
40
|
+
get footerSlotItems() {
|
|
41
|
+
if (!this.footerNode || this.footerNode.length === 0)
|
|
42
|
+
return null;
|
|
43
|
+
const element = this.footerNode[0];
|
|
44
|
+
return (element.querySelector("a") || element);
|
|
33
45
|
}
|
|
34
46
|
firstUpdated() {
|
|
47
|
+
var _a, _b;
|
|
35
48
|
if (this._imageNode.length === 0) {
|
|
36
49
|
const image = this.shadowRoot.querySelector(".card-image");
|
|
37
50
|
const body = this.shadowRoot.querySelector(".card-body");
|
|
@@ -39,6 +52,16 @@ class SgdsImageCard extends CardElement {
|
|
|
39
52
|
if (this.noPadding)
|
|
40
53
|
body.style.padding = "0px";
|
|
41
54
|
}
|
|
55
|
+
if (this.stretchedLink) {
|
|
56
|
+
const footerHref = (_a = this.footerSlotItems) === null || _a === void 0 ? void 0 : _a.href;
|
|
57
|
+
const linkHref = (_b = this.linkSlotItems) === null || _b === void 0 ? void 0 : _b.href;
|
|
58
|
+
if (footerHref) {
|
|
59
|
+
this.card.setAttribute("href", footerHref);
|
|
60
|
+
}
|
|
61
|
+
else if (linkHref) {
|
|
62
|
+
this.card.setAttribute("href", linkHref);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
42
65
|
}
|
|
43
66
|
handleImgSlotChange(e) {
|
|
44
67
|
const childNodes = e.target.assignedNodes({ flatten: true });
|
|
@@ -49,7 +72,6 @@ class SgdsImageCard extends CardElement {
|
|
|
49
72
|
render() {
|
|
50
73
|
const tag = this.stretchedLink ? literal `a` : literal `div`;
|
|
51
74
|
const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;
|
|
52
|
-
const hasDescriptionSlot = this.hasSlotController.test("description");
|
|
53
75
|
return html `
|
|
54
76
|
<${tag}
|
|
55
77
|
class="card ${classMap({
|
|
@@ -72,13 +94,11 @@ class SgdsImageCard extends CardElement {
|
|
|
72
94
|
</div>
|
|
73
95
|
<slot></slot>
|
|
74
96
|
</div>
|
|
75
|
-
|
|
76
|
-
? html `<p class="card-text">
|
|
77
|
-
<slot name="description"></slot>
|
|
78
|
-
</p>`
|
|
79
|
-
: nothing}
|
|
97
|
+
<slot name="description"></slot>
|
|
80
98
|
<slot name="lower"></slot>
|
|
81
|
-
<slot name="
|
|
99
|
+
<slot name="footer">
|
|
100
|
+
<slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
|
|
101
|
+
</slot>
|
|
82
102
|
</div>
|
|
83
103
|
</${tag}>
|
|
84
104
|
`;
|
|
@@ -88,6 +108,12 @@ SgdsImageCard.styles = [...CardElement.styles, css_248z];
|
|
|
88
108
|
__decorate([
|
|
89
109
|
queryAssignedNodes({ slot: "image", flatten: true })
|
|
90
110
|
], SgdsImageCard.prototype, "_imageNode", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
queryAssignedElements({ slot: "footer" })
|
|
113
|
+
], SgdsImageCard.prototype, "footerNode", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
queryAssignedElements({ slot: "link" })
|
|
116
|
+
], SgdsImageCard.prototype, "linkNode", void 0);
|
|
91
117
|
__decorate([
|
|
92
118
|
property({ type: Boolean, reflect: true })
|
|
93
119
|
], SgdsImageCard.prototype, "noPadding", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-image-card.js","sources":["../../../src/components/ImageCard/sgds-image-card.ts"],"sourcesContent":["import { nothing } from \"lit\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { property, queryAssignedNodes } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { CardElement } from \"../../base/card-element\";\nimport {
|
|
1
|
+
{"version":3,"file":"sgds-image-card.js","sources":["../../../src/components/ImageCard/sgds-image-card.ts"],"sourcesContent":["import { nothing } from \"lit\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { property, queryAssignedElements, queryAssignedNodes } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { CardElement } from \"../../base/card-element\";\nimport { CardImageAdjustment, CardImagePosition } from \"../Card/types\";\nimport SgdsLink from \"../Link/sgds-link\";\nimport imageCardStyle from \"./image-card.css\";\n\n/**\n * @summary Image cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.\n * @slot default - The content area of the card, placed directly under the title. Accepts any HTML or custom elements.\n * @slot image - Accepts an image or svg element of the card. Only a single element is allowed to be passed in.\n * @slot image-badge - Accepts an element for a badge, positioned at the top-left corner of the image.\n * @slot image-action - Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the image. Typically used for action menu.\n * @slot upper - Accepts any content to be displayed at the top of the subtitle. Commonly used for badges, status indicators, or decorative elements.\n * @slot subtitle - The subtitle of the card\n * @slot title - The title of the card\n * @slot description - The paragrapher text of the card\n * @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.\n * @slot footer - Footer area of the card. Accepts links, actions, or any custom content.\n * @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.\n * Legacy slot for anchor elements. Use `footer` instead.\n */\nexport class SgdsImageCard extends CardElement {\n static styles = [...CardElement.styles, imageCardStyle];\n\n /** @internal */\n @queryAssignedNodes({ slot: \"image\", flatten: true })\n _imageNode!: Array<Node>;\n @queryAssignedElements({ slot: \"footer\" })\n private footerNode!: HTMLElement[];\n @queryAssignedElements({ slot: \"link\" })\n private linkNode!: HTMLAnchorElement[] | SgdsLink[];\n\n /** Removes the card's internal padding when set to true. */\n @property({ type: Boolean, reflect: true }) noPadding = false;\n\n /** Sets the image position of the card. Available options: `before`, `after` */\n @property({ type: String, reflect: true }) imagePosition: CardImagePosition = \"before\";\n\n /** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */\n @property({ type: String, reflect: true }) imageAdjustment: CardImageAdjustment = \"default\";\n\n private get linkSlotItems(): HTMLAnchorElement | null {\n if (!this.linkNode || this.linkNode.length === 0) return null;\n const element = this.linkNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private get footerSlotItems(): HTMLAnchorElement | null {\n if (!this.footerNode || this.footerNode.length === 0) return null;\n const element = this.footerNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n protected firstUpdated() {\n if (this._imageNode.length === 0) {\n const image = this.shadowRoot.querySelector(\".card-image\") as HTMLDivElement;\n const body = this.shadowRoot.querySelector(\".card-body\") as HTMLDivElement;\n image.style.display = \"none\";\n if (this.noPadding) body.style.padding = \"0px\";\n }\n\n if (this.stretchedLink) {\n const footerHref = this.footerSlotItems?.href;\n const linkHref = this.linkSlotItems?.href;\n\n if (footerHref) {\n this.card.setAttribute(\"href\", footerHref);\n } else if (linkHref) {\n this.card.setAttribute(\"href\", linkHref);\n }\n }\n }\n\n handleImgSlotChange(e: Event) {\n const childNodes = (e.target as HTMLSlotElement).assignedNodes({ flatten: true }) as Array<HTMLOrSVGImageElement>;\n\n if (childNodes.length > 1) {\n return console.error(\"Multiple elements passed into SgdsCard's image slot\");\n }\n }\n\n render() {\n const tag = this.stretchedLink ? literal`a` : literal`div`;\n const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;\n\n return html`\n <${tag} \n class=\"card ${classMap({\n disabled: this.disabled\n })}\"\n tabindex=${cardTabIndex}\n >\n ${this.tinted && !this.noPadding ? html`<div class=\"card-tinted-bg\"></div>` : nothing}\n <div class=\"card-image\">\n\t\t\t\t\t<slot name=\"image\" @slotchange=${this.handleImgSlotChange}></slot>\n\t\t\t\t\t<slot name=\"image-badge\"></slot>\n\t\t\t\t\t<slot name=\"image-action\"></slot>\n </div>\n <div class=\"card-body\">\n\t\t\t\t\t<slot name=\"upper\"></slot>\n <div class=\"card-header-container\">\n <div class=\"card-header\">\n <slot name=\"subtitle\"></slot>\n <h3 class=\"card-title\"><slot name=\"title\" @slotchange=${this.handleTitleSlotChange}></slot></h3>\n </div>\n <slot></slot>\n </div>\n <slot name=\"description\"></slot>\n <slot name=\"lower\"></slot>\n <slot name=\"footer\">\n <slot name=\"link\" @slotchange=${this.handleLinkSlotChange}></slot>\n </slot>\n </div>\n </${tag}>\n `;\n }\n}\n\nexport default SgdsImageCard;\n"],"names":["imageCardStyle"],"mappings":"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"}
|
|
@@ -4534,7 +4534,7 @@
|
|
|
4534
4534
|
|
|
4535
4535
|
var css_248z$5 = css`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-body)}`;
|
|
4536
4536
|
|
|
4537
|
-
var css_248z$4 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4537
|
+
var css_248z$4 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4538
4538
|
|
|
4539
4539
|
/**
|
|
4540
4540
|
* @cssprop --sgds-{stateColor} - State colors in hexadecimal value
|
|
@@ -4075,7 +4075,7 @@
|
|
|
4075
4075
|
(globalThis.litIssuedWarnings ??= new Set());
|
|
4076
4076
|
}
|
|
4077
4077
|
|
|
4078
|
-
var css_248z$1 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4078
|
+
var css_248z$1 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4079
4079
|
|
|
4080
4080
|
/**
|
|
4081
4081
|
* @cssprop --sgds-{stateColor} - State colors in hexadecimal value
|
|
@@ -4899,7 +4899,7 @@
|
|
|
4899
4899
|
*/
|
|
4900
4900
|
const classMap = directive(ClassMapDirective);
|
|
4901
4901
|
|
|
4902
|
-
var css_248z$9 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4902
|
+
var css_248z$9 = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4903
4903
|
|
|
4904
4904
|
/**
|
|
4905
4905
|
* @cssprop --sgds-{stateColor} - State colors in hexadecimal value
|
|
@@ -7835,7 +7835,8 @@
|
|
|
7835
7835
|
property({ type: String, reflect: true })
|
|
7836
7836
|
], SgdsIconButton.prototype, "name", void 0);
|
|
7837
7837
|
|
|
7838
|
-
const
|
|
7838
|
+
const MainnavBreakpointContext = createContext("mainnav-context");
|
|
7839
|
+
const MainnavExpandedContext = createContext("mainnav-expanded-context");
|
|
7839
7840
|
|
|
7840
7841
|
var css_248z$5 = css`:host{z-index:1200}nav{background-color:var(--sgds-surface-default);box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08)}.navbar{align-items:stretch;display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);justify-content:space-between;margin:auto;max-width:var(--sgds-mainnav-max-width);min-height:80px;padding:0 var(--sgds-mainnav-padding-x);position:relative;width:100%}@media screen and (max-width:768px){.navbar{padding:0 var(--sgds-mainnav-mobile-padding-x)}}.navbar-brand{align-items:center;display:flex;text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:focus-visible{outline:0}.navbar-brand:focus-visible{box-shadow:var(--sgds-box-shadow-focus)}.navbar-nav{display:flex;flex-direction:column;height:100%;margin-bottom:0;margin-top:0;width:100%}nav>.navbar-body{background-color:var(--sgds-surface-default);border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-translucent);bottom:0;box-shadow:0 2px 2px 0 hsla(0,0%,5%,.08);padding:var(--sgds-padding-md) 0;position:absolute;transition:transform .2s ease-in-out;width:100%;z-index:2000}nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-padding-x)}@media screen and (max-width:768px){nav>.navbar-body slot::slotted(:not(sgds-mainnav-item):not(sgds-mainnav-dropdown)){padding:var(--sgds-padding-sm) var(--sgds-mainnav-mobile-padding-x)}}.navbar-collapse{align-items:center;flex-basis:100%;flex-grow:1}.navbar-toggler{align-self:center}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-nav-scroll{overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (min-width:1024px){.navbar-expand-lg{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (min-width:1280px){.navbar-expand-xl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .nav-link{padding-left:var(--mainnav-nav-link-padding-x);padding-right:var(--mainnav-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (min-width:1440px){.navbar-expand-xxl{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}}.navbar-expand{flex-wrap:nowrap;gap:var(--sgds-gap-xl);justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}slot[name=non-collapsible]{align-items:center;display:flex;gap:var(--sgds-spacer-4);margin-left:auto}.slot-end{align-items:stretch;display:flex;gap:var(--sgds-gap-xs);margin-left:auto}.slot-end::slotted(:not([name$=-mainnav-item]):not([name$=-mainnav-dropdown])){align-self:center}`;
|
|
7841
7842
|
|
|
@@ -7866,6 +7867,10 @@
|
|
|
7866
7867
|
constructor() {
|
|
7867
7868
|
super();
|
|
7868
7869
|
this._breakpointReached = false;
|
|
7870
|
+
/** Indicates if mobile menu is open or closed */
|
|
7871
|
+
this.expanded = false;
|
|
7872
|
+
/** Denotes the transition state of mobile mainnav menu opening */
|
|
7873
|
+
this.expanding = false;
|
|
7869
7874
|
/** The href link for brand logo */
|
|
7870
7875
|
this.brandHref = "";
|
|
7871
7876
|
this.collapseId = genId("mainnav", "collapse");
|
|
@@ -7873,8 +7878,6 @@
|
|
|
7873
7878
|
this.expand = "lg";
|
|
7874
7879
|
/** @internal */
|
|
7875
7880
|
this.breakpointReached = false;
|
|
7876
|
-
/** @internal */
|
|
7877
|
-
this.expanded = false;
|
|
7878
7881
|
window.addEventListener("resize", () => {
|
|
7879
7882
|
const newBreakpointReachedValue = window.innerWidth < SIZES[this.expand];
|
|
7880
7883
|
if (newBreakpointReachedValue !== this.breakpointReached) {
|
|
@@ -7882,7 +7885,8 @@
|
|
|
7882
7885
|
}
|
|
7883
7886
|
else {
|
|
7884
7887
|
this.body ? (this.body.hidden = true) : null;
|
|
7885
|
-
this.expanded = false;
|
|
7888
|
+
// this.expanded = false;
|
|
7889
|
+
this.expanding = false;
|
|
7886
7890
|
}
|
|
7887
7891
|
if (newBreakpointReachedValue) {
|
|
7888
7892
|
this._handleMobileNav();
|
|
@@ -7907,20 +7911,10 @@
|
|
|
7907
7911
|
connectedCallback() {
|
|
7908
7912
|
super.connectedCallback();
|
|
7909
7913
|
this.addEventListener("click", (event) => this._handleClickOutOfElement(event, this.body));
|
|
7910
|
-
this.addEventListener("sgds-mainnav-close", () => {
|
|
7911
|
-
if (this.breakpointReached) {
|
|
7912
|
-
this.hide();
|
|
7913
|
-
}
|
|
7914
|
-
});
|
|
7915
7914
|
}
|
|
7916
7915
|
disconnectedCallback() {
|
|
7917
7916
|
super.disconnectedCallback();
|
|
7918
7917
|
this.removeEventListener("click", (event) => this._handleClickOutOfElement(event, this.body));
|
|
7919
|
-
this.removeEventListener("sgds-mainnav-close", () => {
|
|
7920
|
-
if (this.breakpointReached) {
|
|
7921
|
-
this.hide();
|
|
7922
|
-
}
|
|
7923
|
-
});
|
|
7924
7918
|
}
|
|
7925
7919
|
firstUpdated() {
|
|
7926
7920
|
if (this.breakpointReached && this.body) {
|
|
@@ -7947,7 +7941,6 @@
|
|
|
7947
7941
|
document.querySelector("body").style.overflow = "hidden";
|
|
7948
7942
|
this.show();
|
|
7949
7943
|
}
|
|
7950
|
-
this.header.focus();
|
|
7951
7944
|
}
|
|
7952
7945
|
async _handleMobileNav() {
|
|
7953
7946
|
if (!this.nav)
|
|
@@ -7967,6 +7960,7 @@
|
|
|
7967
7960
|
async _animateToShow() {
|
|
7968
7961
|
const sgdsShow = this.emit("sgds-show", { cancelable: true });
|
|
7969
7962
|
if (sgdsShow.defaultPrevented) {
|
|
7963
|
+
this.expanding = false;
|
|
7970
7964
|
this.expanded = false;
|
|
7971
7965
|
return;
|
|
7972
7966
|
}
|
|
@@ -7980,6 +7974,7 @@
|
|
|
7980
7974
|
async _animateToHide() {
|
|
7981
7975
|
const slHide = this.emit("sgds-hide", { cancelable: true });
|
|
7982
7976
|
if (slHide.defaultPrevented) {
|
|
7977
|
+
this.expanding = false;
|
|
7983
7978
|
this.expanded = true;
|
|
7984
7979
|
return;
|
|
7985
7980
|
}
|
|
@@ -7991,13 +7986,16 @@
|
|
|
7991
7986
|
this.emit("sgds-after-hide");
|
|
7992
7987
|
}
|
|
7993
7988
|
async handleOpenChange() {
|
|
7994
|
-
if (this.
|
|
7989
|
+
if (this.expanding) {
|
|
7995
7990
|
// Show
|
|
7996
|
-
this._animateToShow();
|
|
7991
|
+
await this._animateToShow();
|
|
7992
|
+
this.expanded = true;
|
|
7997
7993
|
}
|
|
7998
7994
|
else {
|
|
7995
|
+
this.header.focus();
|
|
7999
7996
|
// Hide
|
|
8000
|
-
this._animateToHide();
|
|
7997
|
+
await this._animateToHide();
|
|
7998
|
+
this.expanded = false;
|
|
8001
7999
|
}
|
|
8002
8000
|
}
|
|
8003
8001
|
/** Shows the menu. For when mainnav is in the collapsed form */
|
|
@@ -8005,7 +8003,7 @@
|
|
|
8005
8003
|
if (this.expanded) {
|
|
8006
8004
|
return;
|
|
8007
8005
|
}
|
|
8008
|
-
this.
|
|
8006
|
+
this.expanding = true;
|
|
8009
8007
|
return waitForEvent(this, "sgds-after-show");
|
|
8010
8008
|
}
|
|
8011
8009
|
/** Hide the menu. For when mainnav is in the collapsed form */
|
|
@@ -8013,11 +8011,8 @@
|
|
|
8013
8011
|
if (!this.expanded) {
|
|
8014
8012
|
return;
|
|
8015
8013
|
}
|
|
8016
|
-
this.
|
|
8014
|
+
this.expanding = false;
|
|
8017
8015
|
document.querySelector("body").style.removeProperty("overflow");
|
|
8018
|
-
setTimeout(() => {
|
|
8019
|
-
this.emit("close-dropdown-menu");
|
|
8020
|
-
}, 200);
|
|
8021
8016
|
return waitForEvent(this, "sgds-after-hide");
|
|
8022
8017
|
}
|
|
8023
8018
|
// assigning name attribute to elements added in slot="end", to use wildcard css selector to assign styles only to *-mainnav-item
|
|
@@ -8077,9 +8072,16 @@
|
|
|
8077
8072
|
"sgds-icon-button": SgdsIconButton
|
|
8078
8073
|
};
|
|
8079
8074
|
__decorate([
|
|
8080
|
-
provide({ context:
|
|
8075
|
+
provide({ context: MainnavBreakpointContext }),
|
|
8081
8076
|
state()
|
|
8082
8077
|
], SgdsMainnav.prototype, "_breakpointReached", void 0);
|
|
8078
|
+
__decorate([
|
|
8079
|
+
provide({ context: MainnavExpandedContext }),
|
|
8080
|
+
state()
|
|
8081
|
+
], SgdsMainnav.prototype, "expanded", void 0);
|
|
8082
|
+
__decorate([
|
|
8083
|
+
state()
|
|
8084
|
+
], SgdsMainnav.prototype, "expanding", void 0);
|
|
8083
8085
|
__decorate([
|
|
8084
8086
|
query("nav")
|
|
8085
8087
|
], SgdsMainnav.prototype, "nav", void 0);
|
|
@@ -8107,9 +8109,6 @@
|
|
|
8107
8109
|
__decorate([
|
|
8108
8110
|
state()
|
|
8109
8111
|
], SgdsMainnav.prototype, "breakpointReached", void 0);
|
|
8110
|
-
__decorate([
|
|
8111
|
-
state()
|
|
8112
|
-
], SgdsMainnav.prototype, "expanded", void 0);
|
|
8113
8112
|
__decorate([
|
|
8114
8113
|
queryAssignedElements()
|
|
8115
8114
|
], SgdsMainnav.prototype, "defaultNodes", void 0);
|
|
@@ -8117,7 +8116,7 @@
|
|
|
8117
8116
|
queryAssignedElements({ slot: "end" })
|
|
8118
8117
|
], SgdsMainnav.prototype, "endNodes", void 0);
|
|
8119
8118
|
__decorate([
|
|
8120
|
-
watch("
|
|
8119
|
+
watch("expanding", { waitUntilFirstUpdate: true })
|
|
8121
8120
|
], SgdsMainnav.prototype, "handleOpenChange", null);
|
|
8122
8121
|
setDefaultAnimation("mainnav.show", {
|
|
8123
8122
|
keyframes: [
|
|
@@ -12226,6 +12225,7 @@
|
|
|
12226
12225
|
class SgdsMainnavDropdown extends SgdsElement {
|
|
12227
12226
|
constructor() {
|
|
12228
12227
|
super(...arguments);
|
|
12228
|
+
this._breakpointReached = true;
|
|
12229
12229
|
/** @internal Forwards value to id attribute of toggle button of Dropdown. An unique id generated by default */
|
|
12230
12230
|
this.togglerId = genId("dropdown", "button");
|
|
12231
12231
|
/** When true, applies active styles on the dropdown button */
|
|
@@ -12237,30 +12237,6 @@
|
|
|
12237
12237
|
get defaultSlotItems() {
|
|
12238
12238
|
return [...(this.defaultNodes || [])].filter((node) => typeof node.tagName !== "undefined");
|
|
12239
12239
|
}
|
|
12240
|
-
connectedCallback() {
|
|
12241
|
-
super.connectedCallback();
|
|
12242
|
-
document.addEventListener("close-dropdown-menu", () => {
|
|
12243
|
-
this._resetDropdownMenu();
|
|
12244
|
-
this._hideDropdownMenuItems();
|
|
12245
|
-
});
|
|
12246
|
-
}
|
|
12247
|
-
disconnectedCallback() {
|
|
12248
|
-
super.disconnectedCallback();
|
|
12249
|
-
// Clean up the event listener when the element is removed from the DOM
|
|
12250
|
-
document.removeEventListener("close-dropdown-menu", () => {
|
|
12251
|
-
this._resetDropdownMenu();
|
|
12252
|
-
this._hideDropdownMenuItems();
|
|
12253
|
-
});
|
|
12254
|
-
}
|
|
12255
|
-
willUpdate(changedProperties) {
|
|
12256
|
-
super.willUpdate(changedProperties);
|
|
12257
|
-
if (!this.shadowRoot) {
|
|
12258
|
-
return;
|
|
12259
|
-
}
|
|
12260
|
-
if (this._breakpointReached) {
|
|
12261
|
-
this.shadowRoot.adoptedStyleSheets = [css_248z$3.styleSheet, css_248z$2.styleSheet];
|
|
12262
|
-
}
|
|
12263
|
-
}
|
|
12264
12240
|
updated() {
|
|
12265
12241
|
if (this._breakpointReached) {
|
|
12266
12242
|
this._copyTextToMenu();
|
|
@@ -12282,8 +12258,10 @@
|
|
|
12282
12258
|
link.setAttribute("tabindex", "-1");
|
|
12283
12259
|
}
|
|
12284
12260
|
else {
|
|
12285
|
-
link.addEventListener("click", () => {
|
|
12286
|
-
|
|
12261
|
+
link.addEventListener("click", (e) => {
|
|
12262
|
+
const target = e.target;
|
|
12263
|
+
const mainnav = target.closest("sgds-mainnav");
|
|
12264
|
+
mainnav.hide();
|
|
12287
12265
|
});
|
|
12288
12266
|
}
|
|
12289
12267
|
});
|
|
@@ -12402,12 +12380,9 @@
|
|
|
12402
12380
|
}
|
|
12403
12381
|
}
|
|
12404
12382
|
_closeMenu() {
|
|
12405
|
-
// 200ms delay as the transform transition is set to this timing
|
|
12406
12383
|
this._resetDropdownMenu();
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
this.navLink.focus();
|
|
12410
|
-
}, 200);
|
|
12384
|
+
this._hideDropdownMenuItems();
|
|
12385
|
+
this.navLink.focus();
|
|
12411
12386
|
}
|
|
12412
12387
|
render() {
|
|
12413
12388
|
const mobileView = html$1 `
|
|
@@ -12473,9 +12448,13 @@
|
|
|
12473
12448
|
"sgds-icon": SgdsIcon
|
|
12474
12449
|
};
|
|
12475
12450
|
__decorate([
|
|
12476
|
-
consume({ context:
|
|
12451
|
+
consume({ context: MainnavBreakpointContext, subscribe: true }),
|
|
12477
12452
|
state()
|
|
12478
12453
|
], SgdsMainnavDropdown.prototype, "_breakpointReached", void 0);
|
|
12454
|
+
__decorate([
|
|
12455
|
+
consume({ context: MainnavExpandedContext, subscribe: true }),
|
|
12456
|
+
state()
|
|
12457
|
+
], SgdsMainnavDropdown.prototype, "expanded", void 0);
|
|
12479
12458
|
__decorate([
|
|
12480
12459
|
query(".nav-link")
|
|
12481
12460
|
], SgdsMainnavDropdown.prototype, "navLink", void 0);
|
|
@@ -12546,8 +12525,10 @@
|
|
|
12546
12525
|
anchor.setAttribute("tabindex", "-1");
|
|
12547
12526
|
return;
|
|
12548
12527
|
}
|
|
12549
|
-
anchor.addEventListener("click", () => {
|
|
12550
|
-
|
|
12528
|
+
anchor.addEventListener("click", (e) => {
|
|
12529
|
+
const target = e.target;
|
|
12530
|
+
const mainnav = target.closest("sgds-mainnav");
|
|
12531
|
+
mainnav.hide();
|
|
12551
12532
|
});
|
|
12552
12533
|
}
|
|
12553
12534
|
}
|