scb-wc 0.1.78 → 0.1.80
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/README.md +41 -22
- package/all.js +0 -2
- package/index.js +88 -90
- package/mvc/components/all.js +0 -2
- package/mvc/components/scb-accordion/scb-accordion-item.js +3 -173
- package/mvc/components/scb-accordion/scb-accordion.js +4 -33
- package/mvc/components/scb-app-bar/scb-app-bar.js +2 -110
- package/mvc/components/scb-avatar/scb-avatar.js +2 -94
- package/mvc/components/scb-badge/scb-badge.js +2 -72
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -12
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +4 -91
- package/mvc/components/scb-button/scb-button.js +47 -309
- package/mvc/components/scb-calendar/scb-calendar-event.js +2 -6
- package/mvc/components/scb-calendar/scb-calendar.js +6 -120
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +21 -350
- package/mvc/components/scb-card/scb-card.js +54 -819
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +3 -31
- package/mvc/components/scb-checkbox/scb-checkbox.js +5 -127
- package/mvc/components/scb-chip/scb-chip.js +2 -76
- package/mvc/components/scb-collapse/scb-collapse.js +2 -44
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +7 -73
- package/mvc/components/scb-dialog/scb-dialog.js +2 -213
- package/mvc/components/scb-divider/scb-divider.js +1 -69
- package/mvc/components/scb-drawer/scb-drawer.js +6 -102
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +2 -410
- package/mvc/components/scb-dropdown/scb-dropdown.js +17 -222
- package/mvc/components/scb-fab/scb-fab.js +7 -95
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +2 -69
- package/mvc/components/scb-fact-card/scb-fact-card.js +2 -214
- package/mvc/components/scb-footer/scb-footer-section.js +1 -3
- package/mvc/components/scb-footer/scb-footer.js +3 -172
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +2 -112
- package/mvc/components/scb-grid/scb-grid-item.js +1 -32
- package/mvc/components/scb-grid/scb-grid.js +1 -99
- package/mvc/components/scb-grid/scb-stack.js +1 -33
- package/mvc/components/scb-header/scb-header-menu-item.js +1 -5
- package/mvc/components/scb-header/scb-header-tab.js +1 -5
- package/mvc/components/scb-header/scb-header.js +75 -888
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +43 -168
- package/mvc/components/scb-icon-button/scb-icon-button.js +59 -171
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +17 -218
- package/mvc/components/scb-link/scb-link.js +4 -55
- package/mvc/components/scb-list/scb-list-item.js +23 -126
- package/mvc/components/scb-list/scb-list.js +5 -26
- package/mvc/components/scb-menu/scb-menu-item.js +16 -190
- package/mvc/components/scb-menu/scb-menu-section.js +4 -36
- package/mvc/components/scb-menu/scb-menu.js +5 -69
- package/mvc/components/scb-menu/scb-sub-menu.js +2 -7
- package/mvc/components/scb-nav/scb-nav-item.js +1 -28
- package/mvc/components/scb-nav/scb-nav.js +5 -98
- package/mvc/components/scb-notification-card/scb-notification-card.js +7 -364
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +3 -50
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -82
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +2 -31
- package/mvc/components/scb-overlay/scb-overlay.js +3 -43
- package/mvc/components/scb-pagination/scb-pagination.js +19 -221
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +2 -67
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +4 -121
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +2 -56
- package/mvc/components/scb-radio-button/scb-radio-button.js +5 -116
- package/mvc/components/scb-radio-button/scb-radio-group.js +2 -32
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +2 -61
- package/mvc/components/scb-search/scb-search.js +5 -249
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +1 -32
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +2 -70
- package/mvc/components/scb-select/scb-select-option.js +2 -54
- package/mvc/components/scb-select/scb-select.js +4 -244
- package/mvc/components/scb-skeleton/scb-skeleton.js +2 -35
- package/mvc/components/scb-slider/scb-slider.js +5 -9
- package/mvc/components/scb-snackbar/scb-snackbar.js +9 -84
- package/mvc/components/scb-status-pill/scb-status-pill.js +2 -43
- package/mvc/components/scb-stepper/scb-step.js +8 -186
- package/mvc/components/scb-stepper/scb-stepper.js +2 -130
- package/mvc/components/scb-switch/scb-switch.js +4 -49
- package/mvc/components/scb-table/scb-table.js +2 -48
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +2 -53
- package/mvc/components/scb-tabs/scb-primary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-secondary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-tabs.js +4 -31
- package/mvc/components/scb-textfield/scb-textfield.js +142 -388
- package/mvc/components/scb-toc/scb-toc-item.js +3 -251
- package/mvc/components/scb-toc/scb-toc.js +2 -16
- package/mvc/components/scb-tooltip/scb-tooltip.js +8 -155
- package/mvc/components/scb-viz/scb-viz.js +4 -619
- package/mvc/scb-wc-core.css +1 -1
- package/mvc/scb-wc-selfhost.css +1 -1
- package/mvc/scb-wc.css +1 -1
- package/mvc/vendor/assist-chip.js +3 -3
- package/mvc/vendor/chip-set.js +1 -1
- package/mvc/vendor/chip.js +2 -2
- package/mvc/vendor/elevation.js +2 -2
- package/mvc/vendor/filter-chip.js +1 -1
- package/mvc/vendor/focusable.js +1 -1
- package/mvc/vendor/form-associated.js +1 -1
- package/mvc/vendor/icon.js +2 -2
- package/mvc/vendor/lazy-focus-ring.js +2 -0
- package/mvc/vendor/lazy-ripple.js +2 -0
- package/mvc/vendor/md-focus-ring.js +2 -2
- package/mvc/vendor/ripple.js +2 -2
- package/mvc/vendor/scb-card-variants.internal.js +284 -0
- package/mvc/vendor/scb-chevron.js +10 -0
- package/mvc/vendor/scb-header-drawer.internal.js +71 -0
- package/mvc/vendor/shared-styles.js +1 -1
- package/mvc/vendor/tab-styles.js +3 -3
- package/mvc/vendor/validator.js +1 -1
- package/mvc/vendor/vendor.js +3 -4
- package/package.json +2 -2
- package/scb-accordion/scb-accordion-item.js +33 -32
- package/scb-app-bar/scb-app-bar.js +1 -1
- package/scb-button/scb-button.js +287 -259
- package/scb-calendar/scb-calendar.js +49 -49
- package/scb-calendar-card/scb-calendar-card.js +105 -59
- package/scb-card/scb-card-variants.internal.js +230 -0
- package/scb-card/scb-card.js +387 -528
- package/scb-checkbox/scb-checkbox.js +0 -1
- package/scb-chevron/scb-chevron.js +0 -1
- package/scb-components/scb-button/scb-button.d.ts +14 -2
- package/scb-components/scb-calendar/scb-calendar.d.ts +1 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +16 -4
- package/scb-components/scb-card/scb-card-variants.internal.d.ts +15 -0
- package/scb-components/scb-card/scb-card.d.ts +26 -9
- package/scb-components/scb-cookies-consent/scb-cookies-consent.d.ts +3 -0
- package/scb-components/scb-header/scb-header-drawer.internal.d.ts +31 -0
- package/scb-components/scb-header/scb-header.d.ts +1 -2
- package/scb-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +6 -1
- package/scb-components/scb-icon-button/scb-icon-button.d.ts +28 -29
- package/scb-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +13 -4
- package/scb-components/scb-list/scb-list-item.d.ts +20 -2
- package/scb-components/scb-list/scb-list.d.ts +1 -2
- package/scb-components/scb-nav/scb-nav.d.ts +2 -0
- package/scb-components/scb-segmented-button/scb-segmented-item.d.ts +1 -0
- package/scb-components/scb-select/scb-select-option.d.ts +2 -0
- package/scb-components/scb-toc/scb-toc-item.d.ts +1 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +2 -0
- package/scb-cookies-consent/scb-cookies-consent.js +43 -31
- package/scb-datepicker/scb-datepicker.js +27 -25
- package/scb-dialog/scb-dialog.js +1 -1
- package/scb-dropdown/scb-dropdown.js +29 -28
- package/scb-header/scb-header-drawer.internal.js +78 -0
- package/scb-header/scb-header.js +41 -89
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +181 -88
- package/scb-icon-button/scb-icon-button.js +293 -205
- package/scb-keyfigure-card/scb-keyfigure-card.js +96 -43
- package/scb-list/scb-list-item.js +117 -52
- package/scb-list/scb-list.js +9 -9
- package/scb-nav/scb-nav.js +26 -23
- package/scb-notification-card/scb-notification-card.js +0 -2
- package/scb-options-menu/scb-options-menu-item.js +20 -20
- package/scb-pagination/scb-pagination.js +0 -1
- package/scb-progress-stepper/scb-progress-step.js +19 -17
- package/scb-radio-button/scb-radio-button.js +0 -1
- package/scb-search/scb-search.js +29 -28
- package/scb-segmented-button/scb-segmented-item.js +22 -19
- package/scb-select/scb-select-option.js +20 -14
- package/scb-select/scb-select.js +26 -26
- package/scb-stepper/scb-step.js +34 -31
- package/scb-textfield/scb-textfield.js +39 -39
- package/scb-toc/scb-toc-item.js +26 -26
- package/scb-tooltip/scb-tooltip.js +5 -4
- package/scb-viz/scb-viz.js +1 -1
- package/scb-wc-core.css +1 -1
- package/scb-wc-public-entry/index.d.ts +97 -0
- package/scb-wc-selfhost.css +1 -1
- package/scb-wc.bundle.js +1873 -1476
- package/scb-wc.css +1 -1
- package/scb-wc.d.ts +194 -198
- package/mvc/components/scb-chevron/scb-chevron.js +0 -41
- package/mvc/components/scb-datepicker/scb-datepicker.js +0 -296
- package/mvc/vendor/element-internals.js +0 -1
- package/mvc/vendor/filled-icon-button.js +0 -2
- package/mvc/vendor/filled-tonal-icon-button.js +0 -2
- package/mvc/vendor/form-label-activation.js +0 -1
- package/mvc/vendor/form-submitter.js +0 -1
- package/mvc/vendor/icon-button.js +0 -2
- package/mvc/vendor/list.js +0 -8
- package/mvc/vendor/outlined-icon-button.js +0 -2
- package/mvc/vendor/shared-styles2.js +0 -30
- package/scb-components/index.d.ts +0 -99
- package/scb-components/scb-chevron/scb-chevron.d.ts +0 -11
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +0 -39
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
-
import "../scb-button/scb-button.js";
|
|
3
2
|
import { LitElement as t, css as n, html as r } from "lit";
|
|
4
3
|
import { customElement as i, property as a } from "lit/decorators.js";
|
|
5
4
|
//#region src/scb-components/scb-cookies-consent/scb-cookies-consent.ts
|
|
6
|
-
var o
|
|
5
|
+
var o;
|
|
6
|
+
function s() {
|
|
7
|
+
return !!document.querySelector("script[src*=\"/scb-button/scb-button.js\"],script[src$=\"scb-button.js\"]");
|
|
8
|
+
}
|
|
9
|
+
var c = { fromAttribute(e) {
|
|
7
10
|
if (e === null) return !1;
|
|
8
11
|
let t = e.trim().toLowerCase();
|
|
9
12
|
return t !== "false" && t !== "0" && t !== "no";
|
|
10
|
-
} },
|
|
13
|
+
} }, l = class extends t {
|
|
11
14
|
constructor(...e) {
|
|
12
15
|
super(...e), this.open = !0, this.autoRemove = !0, this.title = "", this.supportingText = "", this.ariaLabel = "Cookie-inställningar", this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this._updateButtonWidth = () => {
|
|
13
16
|
let e = window.innerWidth <= 480, t = this.shadowRoot.querySelector("slot[name=\"buttons\"]");
|
|
14
17
|
t && t.assignedElements().forEach((t) => {
|
|
15
18
|
e ? t.setAttribute("full-width", "") : t.removeAttribute("full-width");
|
|
16
19
|
});
|
|
20
|
+
}, this.__onButtonHydrationInteraction = (e) => {
|
|
21
|
+
let t = e.target;
|
|
22
|
+
t instanceof Element && t.closest("scb-button[slot=\"buttons\"]") && this.__ensureSlottedButtonsReady(!0);
|
|
23
|
+
}, this.__onButtonsSlotChange = () => {
|
|
24
|
+
this.__ensureSlottedButtonsReady(), this._updateButtonWidth();
|
|
17
25
|
};
|
|
18
26
|
}
|
|
19
27
|
static {
|
|
@@ -25,8 +33,6 @@ var o = { fromAttribute(e) {
|
|
|
25
33
|
flex-direction: column;
|
|
26
34
|
bottom: var(--scb-cookies-consent-bottom, 32px);
|
|
27
35
|
left: var(--scb-cookies-consent-left, 32px);
|
|
28
|
-
background: #fff;
|
|
29
|
-
color: #222;
|
|
30
36
|
box-shadow: 0 8px 10px -6px #0000001a, 0 20px 25px -5px #0000001a;
|
|
31
37
|
color: var(--md-sys-color-on-surface, #0f0865);
|
|
32
38
|
background: var(--md-sys-color-surface, #fff);
|
|
@@ -58,6 +64,9 @@ var o = { fromAttribute(e) {
|
|
|
58
64
|
margin: 0;
|
|
59
65
|
hyphens: auto;
|
|
60
66
|
}
|
|
67
|
+
.supporting-text {
|
|
68
|
+
margin: 0;
|
|
69
|
+
}
|
|
61
70
|
.button-container {
|
|
62
71
|
display: flex;
|
|
63
72
|
flex-direction: column;
|
|
@@ -65,12 +74,6 @@ var o = { fromAttribute(e) {
|
|
|
65
74
|
justify-content: flex-start;
|
|
66
75
|
}
|
|
67
76
|
|
|
68
|
-
::slotted{
|
|
69
|
-
md-filled-button {
|
|
70
|
-
width: 100%;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
77
|
@media only screen and (min-width: 481px) {
|
|
75
78
|
:host {
|
|
76
79
|
width: var(--scb-cookies-consent-width-medium, auto);
|
|
@@ -86,6 +89,15 @@ var o = { fromAttribute(e) {
|
|
|
86
89
|
}
|
|
87
90
|
`;
|
|
88
91
|
}
|
|
92
|
+
__ensureSlottedButtonsReady(e = !1) {
|
|
93
|
+
if (!(!this.querySelector("scb-button[slot=\"buttons\"]") || customElements.get("scb-button"))) {
|
|
94
|
+
if (s()) {
|
|
95
|
+
customElements.whenDefined("scb-button").then(() => this.requestUpdate());
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
e && (o ??= import("../scb-button/scb-button.js"), o.then(() => this.requestUpdate()));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
89
101
|
mapSpacingToken(e) {
|
|
90
102
|
if (!e) return;
|
|
91
103
|
let t = String(e).trim();
|
|
@@ -96,13 +108,13 @@ var o = { fromAttribute(e) {
|
|
|
96
108
|
t ? this.style.setProperty("--scb-cookies-consent-spacing-block-start", t) : this.style.removeProperty("--scb-cookies-consent-spacing-block-start"), n ? this.style.setProperty("--scb-cookies-consent-spacing-block-end", n) : this.style.removeProperty("--scb-cookies-consent-spacing-block-end"), r ? this.style.setProperty("--scb-cookies-consent-spacing-inline-start", r) : this.style.removeProperty("--scb-cookies-consent-spacing-inline-start"), i ? this.style.setProperty("--scb-cookies-consent-spacing-inline-end", i) : this.style.removeProperty("--scb-cookies-consent-spacing-inline-end");
|
|
97
109
|
}
|
|
98
110
|
firstUpdated(e) {
|
|
99
|
-
this._updateButtonWidth(), window.addEventListener("resize", this._updateButtonWidth), this.addEventListener("click", (e) => {
|
|
111
|
+
this.__ensureSlottedButtonsReady(), this._updateButtonWidth(), window.addEventListener("resize", this._updateButtonWidth), this.addEventListener("pointerover", this.__onButtonHydrationInteraction, { capture: !0 }), this.addEventListener("focusin", this.__onButtonHydrationInteraction, { capture: !0 }), this.addEventListener("pointerdown", this.__onButtonHydrationInteraction, { capture: !0 }), this.addEventListener("keydown", this.__onButtonHydrationInteraction, { capture: !0 }), this.addEventListener("click", (e) => {
|
|
100
112
|
let t = e.target;
|
|
101
113
|
t.slot === "buttons" && (t.id === "accept-btn" ? this.closeAndRemove("cookies-accept") : t.id === "decline-btn" ? this.closeAndRemove("cookies-decline") : t.id === "handle-btn" && this.closeAndRemove("cookies-handle"));
|
|
102
114
|
}), this.applySpacing();
|
|
103
115
|
}
|
|
104
116
|
updated(e) {
|
|
105
|
-
super.updated(e), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.applySpacing(), e.has("open") &&
|
|
117
|
+
super.updated(e), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.applySpacing(), e.has("open") && e.get("open") !== void 0 && (this.open && this._updateButtonWidth(), this.dispatchEvent(new CustomEvent("openchange", {
|
|
106
118
|
bubbles: !0,
|
|
107
119
|
composed: !0,
|
|
108
120
|
detail: { open: this.open }
|
|
@@ -112,7 +124,7 @@ var o = { fromAttribute(e) {
|
|
|
112
124
|
super.connectedCallback(), this.id ||= "cookie-consent";
|
|
113
125
|
}
|
|
114
126
|
disconnectedCallback() {
|
|
115
|
-
super.disconnectedCallback(), window.removeEventListener("resize", this._updateButtonWidth);
|
|
127
|
+
super.disconnectedCallback(), window.removeEventListener("resize", this._updateButtonWidth), this.removeEventListener("pointerover", this.__onButtonHydrationInteraction, { capture: !0 }), this.removeEventListener("focusin", this.__onButtonHydrationInteraction, { capture: !0 }), this.removeEventListener("pointerdown", this.__onButtonHydrationInteraction, { capture: !0 }), this.removeEventListener("keydown", this.__onButtonHydrationInteraction, { capture: !0 });
|
|
116
128
|
}
|
|
117
129
|
closeAndRemove(e) {
|
|
118
130
|
let t = {
|
|
@@ -126,12 +138,12 @@ var o = { fromAttribute(e) {
|
|
|
126
138
|
render() {
|
|
127
139
|
return this.open ? r`
|
|
128
140
|
<div role="dialog" class="cookies-consent" aria-modal="true" aria-label=${this.ariaLabel}>
|
|
129
|
-
<h2>${this.title}</h2>
|
|
130
|
-
<div>
|
|
131
|
-
|
|
141
|
+
<h2><slot name="title">${this.title}</slot></h2>
|
|
142
|
+
<div class="supporting-text">
|
|
143
|
+
<slot name="supporting-text">${this.supportingText}</slot>
|
|
132
144
|
</div>
|
|
133
145
|
<div class="button-container">
|
|
134
|
-
<slot name="buttons"></slot>
|
|
146
|
+
<slot name="buttons" @slotchange=${this.__onButtonsSlotChange}></slot>
|
|
135
147
|
</div>
|
|
136
148
|
</div>
|
|
137
149
|
` : null;
|
|
@@ -140,42 +152,42 @@ var o = { fromAttribute(e) {
|
|
|
140
152
|
e([a({
|
|
141
153
|
type: Boolean,
|
|
142
154
|
reflect: !0,
|
|
143
|
-
converter:
|
|
144
|
-
})],
|
|
155
|
+
converter: c
|
|
156
|
+
})], l.prototype, "open", void 0), e([a({
|
|
145
157
|
type: Boolean,
|
|
146
158
|
attribute: "auto-remove",
|
|
147
159
|
reflect: !0,
|
|
148
|
-
converter:
|
|
149
|
-
})],
|
|
160
|
+
converter: c
|
|
161
|
+
})], l.prototype, "autoRemove", void 0), e([a({
|
|
150
162
|
type: String,
|
|
151
163
|
reflect: !0
|
|
152
|
-
})],
|
|
164
|
+
})], l.prototype, "title", void 0), e([a({
|
|
153
165
|
type: String,
|
|
154
166
|
attribute: "supporting-text",
|
|
155
167
|
reflect: !0
|
|
156
|
-
})],
|
|
168
|
+
})], l.prototype, "supportingText", void 0), e([a({
|
|
157
169
|
type: String,
|
|
158
170
|
attribute: "aria-label",
|
|
159
171
|
reflect: !0
|
|
160
|
-
})],
|
|
172
|
+
})], l.prototype, "ariaLabel", void 0), e([a({
|
|
161
173
|
type: String,
|
|
162
174
|
reflect: !0
|
|
163
|
-
})],
|
|
175
|
+
})], l.prototype, "spacing", void 0), e([a({
|
|
164
176
|
type: String,
|
|
165
177
|
attribute: "spacing-top",
|
|
166
178
|
reflect: !0
|
|
167
|
-
})],
|
|
179
|
+
})], l.prototype, "spacingTop", void 0), e([a({
|
|
168
180
|
type: String,
|
|
169
181
|
attribute: "spacing-bottom",
|
|
170
182
|
reflect: !0
|
|
171
|
-
})],
|
|
183
|
+
})], l.prototype, "spacingBottom", void 0), e([a({
|
|
172
184
|
type: String,
|
|
173
185
|
attribute: "spacing-left",
|
|
174
186
|
reflect: !0
|
|
175
|
-
})],
|
|
187
|
+
})], l.prototype, "spacingLeft", void 0), e([a({
|
|
176
188
|
type: String,
|
|
177
189
|
attribute: "spacing-right",
|
|
178
190
|
reflect: !0
|
|
179
|
-
})],
|
|
191
|
+
})], l.prototype, "spacingRight", void 0), l = e([i("scb-cookies-consent")], l);
|
|
180
192
|
//#endregion
|
|
181
|
-
export {
|
|
193
|
+
export { l as ScbCookiesConsent };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addLazyFocusRingListeners as e } from "../shared/lazy-focus-ring.js";
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
3
|
import "../scb-button/scb-button.js";
|
|
3
4
|
import "../scb-icon-button/scb-icon-button.js";
|
|
4
5
|
import "../scb-divider/scb-divider.js";
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { customElement as
|
|
7
|
-
import "@material/web/focus/md-focus-ring.js";
|
|
6
|
+
import { LitElement as n, css as r, html as i } from "lit";
|
|
7
|
+
import { customElement as a, property as o, state as s } from "lit/decorators.js";
|
|
8
8
|
import "@material/web/icon/icon.js";
|
|
9
9
|
import "@material/web/ripple/ripple.js";
|
|
10
10
|
//#region src/scb-components/scb-datepicker/scb-datepicker.ts
|
|
11
|
-
var
|
|
11
|
+
var c = class extends n {
|
|
12
12
|
constructor(...e) {
|
|
13
13
|
super(...e), this._currentDate = /* @__PURE__ */ new Date(), this._selectedDate = null, this._showMonthDropdown = !1, this._showYearDropdown = !1, this.variant = "date", this.lang = "sv", this.selectedValue = "", this.open = !0, this._selectedHour = 0, this._selectedMinute = 0, this._viewportMargin = 8, this._popupOffset = 4, this._onWindowReposition = () => {
|
|
14
14
|
this._positionPopupWithinViewport();
|
|
@@ -53,6 +53,9 @@ var s = class extends t {
|
|
|
53
53
|
let e = this.getRootNode(), t = e instanceof ShadowRoot ? e.host : null;
|
|
54
54
|
return t instanceof HTMLElement && t.closest("scb-dialog") ? !0 : !!this.closest("scb-dialog");
|
|
55
55
|
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
super.connectedCallback(), this._removeLazyFocusRingListeners = e(this, this.renderRoot);
|
|
58
|
+
}
|
|
56
59
|
_positionPopupWithinViewport() {
|
|
57
60
|
if (!this.open) return;
|
|
58
61
|
let e = this.renderRoot.querySelector(".datepicker-popup");
|
|
@@ -69,7 +72,7 @@ var s = class extends t {
|
|
|
69
72
|
this.style.setProperty("--scb-datepicker-position", "absolute"), this.style.setProperty("--scb-datepicker-computed-width", `${a}px`), this.style.setProperty("--scb-datepicker-left", "0"), this.style.setProperty("--scb-datepicker-transform", `translateX(${s}px)`), u ? (this.style.setProperty("--scb-datepicker-top", "auto"), this.style.setProperty("--scb-datepicker-bottom", `calc(100% + ${this._popupOffset}px)`), this.style.setProperty("--scb-datepicker-max-height", `${Math.max(0, l - this._popupOffset)}px`)) : (this.style.setProperty("--scb-datepicker-top", `calc(100% + ${this._popupOffset}px)`), this.style.setProperty("--scb-datepicker-bottom", "auto"), this.style.setProperty("--scb-datepicker-max-height", `${Math.max(0, c - this._popupOffset)}px`));
|
|
70
73
|
}
|
|
71
74
|
static {
|
|
72
|
-
this.styles = [
|
|
75
|
+
this.styles = [r`
|
|
73
76
|
:host {
|
|
74
77
|
--scb-datepicker-width: 380px;
|
|
75
78
|
--scb-datepicker-z-index: 1100;
|
|
@@ -260,12 +263,12 @@ var s = class extends t {
|
|
|
260
263
|
this.open && requestAnimationFrame(() => this._positionPopupWithinViewport());
|
|
261
264
|
}
|
|
262
265
|
disconnectedCallback() {
|
|
263
|
-
window.removeEventListener("mousedown", this._outsideClickHandler), window.removeEventListener("resize", this._onWindowReposition), window.removeEventListener("scroll", this._onWindowReposition, !0), super.disconnectedCallback();
|
|
266
|
+
this._removeLazyFocusRingListeners?.(), this._removeLazyFocusRingListeners = void 0, window.removeEventListener("mousedown", this._outsideClickHandler), window.removeEventListener("resize", this._onWindowReposition), window.removeEventListener("scroll", this._onWindowReposition, !0), super.disconnectedCallback();
|
|
264
267
|
}
|
|
265
268
|
render() {
|
|
266
|
-
if (!this.open) return
|
|
267
|
-
let e = this._currentDate.getFullYear(), t = this._currentDate.getMonth(), n = /* @__PURE__ */ new Date(),
|
|
268
|
-
return
|
|
269
|
+
if (!this.open) return i``;
|
|
270
|
+
let e = this._currentDate.getFullYear(), t = this._currentDate.getMonth(), n = /* @__PURE__ */ new Date(), r = this._getMonthDays(e, t), a = Array.from({ length: 101 }, (e, t) => n.getFullYear() - 50 + t), o = this.variant === "datetime-local" && !this._showMonthDropdown && !this._showYearDropdown;
|
|
271
|
+
return i`
|
|
269
272
|
<div class="datepicker-popup popup">
|
|
270
273
|
<div class="header">
|
|
271
274
|
<div class="month-selector ${this._showMonthDropdown ? "open" : ""} ${this._showYearDropdown ? "disable" : ""}">
|
|
@@ -307,11 +310,11 @@ var s = class extends t {
|
|
|
307
310
|
<scb-icon-button icon="chevron_right" @click=${this._nextYear} aria-label=${this.lang == "sv" ? "Nästa år" : "Next year"}></scb-icon-button>
|
|
308
311
|
</div>
|
|
309
312
|
</div>
|
|
310
|
-
${this._showMonthDropdown || this._showYearDropdown ?
|
|
313
|
+
${this._showMonthDropdown || this._showYearDropdown ? i`<scb-divider></scb-divider>` : ""}
|
|
311
314
|
<div class="datepicker-content" style="position:relative;">
|
|
312
|
-
${this._showMonthDropdown ?
|
|
315
|
+
${this._showMonthDropdown ? i`
|
|
313
316
|
<div class="dropdown-list">
|
|
314
|
-
${this._monthNames.map((e, n) =>
|
|
317
|
+
${this._monthNames.map((e, n) => i`
|
|
315
318
|
<div
|
|
316
319
|
@keydown=${(e) => {
|
|
317
320
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this._onMonthChangeCustom(n));
|
|
@@ -321,16 +324,16 @@ var s = class extends t {
|
|
|
321
324
|
@click=${() => this._onMonthChangeCustom(n)}
|
|
322
325
|
id=${n === t ? "selected-month" : ""}
|
|
323
326
|
>
|
|
324
|
-
${n === t ?
|
|
327
|
+
${n === t ? i`<md-icon>check</md-icon>` : ""}
|
|
325
328
|
${e}
|
|
326
329
|
<md-ripple></md-ripple><md-focus-ring inward></md-focus-ring>
|
|
327
330
|
</div>
|
|
328
331
|
`)}
|
|
329
332
|
</div>
|
|
330
333
|
` : ""}
|
|
331
|
-
${this._showYearDropdown ?
|
|
334
|
+
${this._showYearDropdown ? i`
|
|
332
335
|
<div class="dropdown-list">
|
|
333
|
-
${a.map((t) =>
|
|
336
|
+
${a.map((t) => i`
|
|
334
337
|
<div
|
|
335
338
|
@keydown=${(e) => {
|
|
336
339
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this._onYearChangeCustom(t));
|
|
@@ -340,14 +343,14 @@ var s = class extends t {
|
|
|
340
343
|
@click=${() => this._onYearChangeCustom(t)}
|
|
341
344
|
id=${t === e ? "selected-year" : ""}
|
|
342
345
|
>
|
|
343
|
-
${t === e ?
|
|
346
|
+
${t === e ? i`<md-icon>check</md-icon>` : ""}
|
|
344
347
|
${t}
|
|
345
348
|
<md-ripple></md-ripple><md-focus-ring inward></md-focus-ring>
|
|
346
349
|
</div>
|
|
347
350
|
`)}
|
|
348
351
|
</div>
|
|
349
352
|
` : ""}
|
|
350
|
-
${!this._showMonthDropdown && !this._showYearDropdown ?
|
|
353
|
+
${!this._showMonthDropdown && !this._showYearDropdown ? i`
|
|
351
354
|
<div class="datepicker-calendar">
|
|
352
355
|
<table>
|
|
353
356
|
<thead>
|
|
@@ -356,9 +359,9 @@ var s = class extends t {
|
|
|
356
359
|
</tr>
|
|
357
360
|
</thead>
|
|
358
361
|
<tbody>
|
|
359
|
-
${
|
|
362
|
+
${r.map((e) => i`
|
|
360
363
|
<tr>
|
|
361
|
-
${e.map((e) => e ?
|
|
364
|
+
${e.map((e) => e ? i`
|
|
362
365
|
<td>
|
|
363
366
|
<div
|
|
364
367
|
@keydown=${(t) => {
|
|
@@ -370,7 +373,7 @@ var s = class extends t {
|
|
|
370
373
|
@click=${() => this._selectDate(e)}
|
|
371
374
|
>${e.getDate()}<md-ripple></md-ripple><md-focus-ring></md-focus-ring></div>
|
|
372
375
|
</td>
|
|
373
|
-
` :
|
|
376
|
+
` : i`<td></td>`)}
|
|
374
377
|
</tr>
|
|
375
378
|
`)}
|
|
376
379
|
</tbody>
|
|
@@ -378,7 +381,7 @@ var s = class extends t {
|
|
|
378
381
|
</div>
|
|
379
382
|
` : ""}
|
|
380
383
|
</div>
|
|
381
|
-
${o ?
|
|
384
|
+
${o ? i`
|
|
382
385
|
<div style="padding: 0 24px;">
|
|
383
386
|
<label style="display:flex;align-items:center;gap:8px;">
|
|
384
387
|
<span>${this.lang == "sv" ? "Tid:" : "Time:"}</span>
|
|
@@ -387,7 +390,7 @@ var s = class extends t {
|
|
|
387
390
|
</div>
|
|
388
391
|
` : ""}
|
|
389
392
|
<div class="datepicker-footer">
|
|
390
|
-
${!this._showMonthDropdown && !this._showYearDropdown ?
|
|
393
|
+
${!this._showMonthDropdown && !this._showYearDropdown ? i`
|
|
391
394
|
<scb-button variant="text" label=${this.lang == "sv" ? "Stäng" : "Close"} @click=${this._close}></scb-button>
|
|
392
395
|
` : ""}
|
|
393
396
|
</div>
|
|
@@ -465,6 +468,5 @@ var s = class extends t {
|
|
|
465
468
|
}
|
|
466
469
|
}
|
|
467
470
|
};
|
|
468
|
-
|
|
471
|
+
t([s()], c.prototype, "_currentDate", void 0), t([s()], c.prototype, "_selectedDate", void 0), t([s()], c.prototype, "_showMonthDropdown", void 0), t([s()], c.prototype, "_showYearDropdown", void 0), t([o({ type: String })], c.prototype, "variant", void 0), t([o({ type: String })], c.prototype, "lang", void 0), t([o({ type: String })], c.prototype, "selectedValue", void 0), t([o({ type: Boolean })], c.prototype, "open", void 0), t([s()], c.prototype, "_selectedHour", void 0), t([s()], c.prototype, "_selectedMinute", void 0), c = t([a("scb-datepicker")], c);
|
|
469
472
|
//#endregion
|
|
470
|
-
export { s as ScbDatepicker };
|
package/scb-dialog/scb-dialog.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
2
|
import "../scb-button/scb-button.js";
|
|
3
3
|
import "../scb-icon-button/scb-icon-button.js";
|
|
4
|
-
import "../scb-chip/scb-chip.js";
|
|
5
4
|
import "../scb-textfield/scb-textfield.js";
|
|
6
5
|
import "../scb-checkbox/scb-checkbox.js";
|
|
7
6
|
import "../scb-radio-button/scb-radio-button.js";
|
|
8
7
|
import "../scb-switch/scb-switch.js";
|
|
8
|
+
import "../scb-chip/scb-chip.js";
|
|
9
9
|
import { LitElement as t, css as n, html as r, nothing as i } from "lit";
|
|
10
10
|
import { customElement as a, property as o } from "lit/decorators.js";
|
|
11
11
|
import "@material/web/icon/icon.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ensureFocusRingOnFocusVisible as e } from "../shared/lazy-focus-ring.js";
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
3
|
import "../scb-chevron/scb-chevron.js";
|
|
3
4
|
import "../scb-button/scb-button.js";
|
|
4
5
|
import "../scb-options-menu/scb-options-menu.js";
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { customElement as
|
|
7
|
-
import "@material/web/focus/md-focus-ring.js";
|
|
6
|
+
import { LitElement as n, css as r, html as i, nothing as a } from "lit";
|
|
7
|
+
import { customElement as o, property as s, query as c } from "lit/decorators.js";
|
|
8
8
|
import "@material/web/icon/icon.js";
|
|
9
9
|
(() => {
|
|
10
10
|
if (typeof window > "u" || typeof document > "u" || !("customElements" in window) || document.head.querySelector("style[data-scb-dropdown-pre-upgrade]")) return;
|
|
@@ -54,7 +54,7 @@ import "@material/web/icon/icon.js";
|
|
|
54
54
|
r.disconnect();
|
|
55
55
|
});
|
|
56
56
|
})();
|
|
57
|
-
var
|
|
57
|
+
var l = class extends n {
|
|
58
58
|
constructor(...e) {
|
|
59
59
|
super(...e), this.label = "Dropdown", this.variant = "filled", this.size = "medium", this.open = !1, this.disabled = !1, this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this.menuGap = "3", this.width = null, this.minWidth = null, this.maxWidth = null, this.dataIndex = null, this.ariaCurrent = null, this._slottedMenuEl = null, this._openSettledTimer = null, this._menuCloseTimer = null, this._panelResizeObserver = null, this._panelHeightSyncRaf = null, this._onDocumentClickBound = (e) => {
|
|
60
60
|
if (!this.open) return;
|
|
@@ -77,7 +77,7 @@ var c = class extends t {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
static {
|
|
80
|
-
this.styles =
|
|
80
|
+
this.styles = r`
|
|
81
81
|
:host {
|
|
82
82
|
display: inline-block;
|
|
83
83
|
position: relative;
|
|
@@ -508,9 +508,9 @@ var c = class extends t {
|
|
|
508
508
|
return a && i.style.setProperty("--scb-chevron-size", a), r.replaceWith(i), i;
|
|
509
509
|
}
|
|
510
510
|
render() {
|
|
511
|
-
let
|
|
512
|
-
return
|
|
513
|
-
${
|
|
511
|
+
let t = !!this._slottedMenuEl, n = this.hasAttribute("as-tab"), r = this.dataIndex, o = this.ariaCurrent === "page" ? "page" : a;
|
|
512
|
+
return i`
|
|
513
|
+
${n ? i`
|
|
514
514
|
<div class="tab-wrap">
|
|
515
515
|
<button
|
|
516
516
|
type="button"
|
|
@@ -519,16 +519,17 @@ var c = class extends t {
|
|
|
519
519
|
?disabled=${this.disabled}
|
|
520
520
|
aria-haspopup="menu"
|
|
521
521
|
aria-expanded=${String(this.open)}
|
|
522
|
-
data-index=${
|
|
523
|
-
aria-current=${
|
|
522
|
+
data-index=${r ?? a}
|
|
523
|
+
aria-current=${o}
|
|
524
524
|
@click=${this._onTriggerClick}
|
|
525
|
+
@focusin=${e}
|
|
525
526
|
>
|
|
526
527
|
${this.label}
|
|
527
528
|
<scb-chevron class="chevron" .open=${this.open}></scb-chevron>
|
|
528
529
|
</button>
|
|
529
530
|
<md-focus-ring></md-focus-ring>
|
|
530
531
|
</div>
|
|
531
|
-
` :
|
|
532
|
+
` : i`
|
|
532
533
|
<scb-button
|
|
533
534
|
data-scb-dropdown-trigger
|
|
534
535
|
label=${this.label}
|
|
@@ -542,7 +543,7 @@ var c = class extends t {
|
|
|
542
543
|
`}
|
|
543
544
|
|
|
544
545
|
<div
|
|
545
|
-
class="panel ${
|
|
546
|
+
class="panel ${t ? "has-menu" : ""}"
|
|
546
547
|
?inert=${!this.open}
|
|
547
548
|
aria-hidden=${this.open ? "false" : "true"}
|
|
548
549
|
>
|
|
@@ -555,49 +556,49 @@ var c = class extends t {
|
|
|
555
556
|
`;
|
|
556
557
|
}
|
|
557
558
|
};
|
|
558
|
-
|
|
559
|
+
t([s({ type: String })], l.prototype, "label", void 0), t([s({ type: String })], l.prototype, "variant", void 0), t([s({
|
|
559
560
|
type: String,
|
|
560
561
|
reflect: !0
|
|
561
|
-
})],
|
|
562
|
+
})], l.prototype, "size", void 0), t([s({
|
|
562
563
|
type: Boolean,
|
|
563
564
|
reflect: !0
|
|
564
|
-
})],
|
|
565
|
+
})], l.prototype, "open", void 0), t([s({
|
|
565
566
|
type: Boolean,
|
|
566
567
|
reflect: !0
|
|
567
|
-
})],
|
|
568
|
+
})], l.prototype, "disabled", void 0), t([s({
|
|
568
569
|
type: String,
|
|
569
570
|
reflect: !0
|
|
570
|
-
})],
|
|
571
|
+
})], l.prototype, "spacing", void 0), t([s({
|
|
571
572
|
type: String,
|
|
572
573
|
attribute: "spacing-top",
|
|
573
574
|
reflect: !0
|
|
574
|
-
})],
|
|
575
|
+
})], l.prototype, "spacingTop", void 0), t([s({
|
|
575
576
|
type: String,
|
|
576
577
|
attribute: "spacing-bottom",
|
|
577
578
|
reflect: !0
|
|
578
|
-
})],
|
|
579
|
+
})], l.prototype, "spacingBottom", void 0), t([s({
|
|
579
580
|
type: String,
|
|
580
581
|
attribute: "spacing-left",
|
|
581
582
|
reflect: !0
|
|
582
|
-
})],
|
|
583
|
+
})], l.prototype, "spacingLeft", void 0), t([s({
|
|
583
584
|
type: String,
|
|
584
585
|
attribute: "spacing-right",
|
|
585
586
|
reflect: !0
|
|
586
|
-
})],
|
|
587
|
+
})], l.prototype, "spacingRight", void 0), t([s({
|
|
587
588
|
type: String,
|
|
588
589
|
attribute: "menu-gap"
|
|
589
|
-
})],
|
|
590
|
+
})], l.prototype, "menuGap", void 0), t([s({ type: String })], l.prototype, "width", void 0), t([s({
|
|
590
591
|
type: String,
|
|
591
592
|
attribute: "min-width"
|
|
592
|
-
})],
|
|
593
|
+
})], l.prototype, "minWidth", void 0), t([s({
|
|
593
594
|
type: String,
|
|
594
595
|
attribute: "max-width"
|
|
595
|
-
})],
|
|
596
|
+
})], l.prototype, "maxWidth", void 0), t([s({
|
|
596
597
|
type: String,
|
|
597
598
|
attribute: "data-index"
|
|
598
|
-
})],
|
|
599
|
+
})], l.prototype, "dataIndex", void 0), t([s({
|
|
599
600
|
type: String,
|
|
600
601
|
attribute: "aria-current"
|
|
601
|
-
})],
|
|
602
|
+
})], l.prototype, "ariaCurrent", void 0), t([c("[data-scb-dropdown-trigger]")], l.prototype, "_triggerEl", void 0), t([c("slot")], l.prototype, "_slotEl", void 0), t([c(".panel-surface")], l.prototype, "_panelSurfaceEl", void 0), t([c(".panel-inner")], l.prototype, "_panelInnerEl", void 0), l = t([o("scb-dropdown")], l);
|
|
602
603
|
//#endregion
|
|
603
|
-
export {
|
|
604
|
+
export { l as ScbDropdown };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { html as e, nothing as t } from "lit";
|
|
2
|
+
//#region src/scb-components/scb-header/scb-header-drawer.internal.ts
|
|
3
|
+
var n = (t) => !t || t.length === 0 ? e`` : e`${t.map(r)}`, r = (n) => {
|
|
4
|
+
let i = Array.isArray(n.children) && n.children.length > 0, a = (n.href ?? "").trim(), o = (n.icon ?? "").trim(), s = i ? e`
|
|
5
|
+
<scb-sub-menu label=${n.label}>
|
|
6
|
+
${n.children.map(r)}
|
|
7
|
+
</scb-sub-menu>
|
|
8
|
+
` : t;
|
|
9
|
+
return o && a ? e`
|
|
10
|
+
<scb-menu-item label=${n.label} ?selected=${!1} leading-icon=${o} item-href=${a}>
|
|
11
|
+
${s}
|
|
12
|
+
</scb-menu-item>
|
|
13
|
+
` : o ? e`
|
|
14
|
+
<scb-menu-item label=${n.label} ?selected=${!1} leading-icon=${o}>
|
|
15
|
+
${s}
|
|
16
|
+
</scb-menu-item>
|
|
17
|
+
` : a ? e`
|
|
18
|
+
<scb-menu-item label=${n.label} ?selected=${!1} item-href=${a}>
|
|
19
|
+
${s}
|
|
20
|
+
</scb-menu-item>
|
|
21
|
+
` : e`<scb-menu-item label=${n.label} ?selected=${!1}>${s}</scb-menu-item>`;
|
|
22
|
+
}, i = (r) => e`
|
|
23
|
+
<scb-drawer
|
|
24
|
+
id=${r.drawerId}
|
|
25
|
+
floating
|
|
26
|
+
right
|
|
27
|
+
?overlay=${r.drawerOverlay}
|
|
28
|
+
?lock-scroll=${r.drawerOverlay}
|
|
29
|
+
?modal=${r.drawerOverlay}
|
|
30
|
+
style="--scb-drawer-padding: 0px;"
|
|
31
|
+
@scb-drawer-opened=${r.onDrawerOpened}
|
|
32
|
+
@scb-drawer-closed=${r.onDrawerClosed}
|
|
33
|
+
@scb-menu-select=${r.onMenuSelect}
|
|
34
|
+
>
|
|
35
|
+
${r.hasDrawerCloseSlot ? e`
|
|
36
|
+
<div class="drawer-close">
|
|
37
|
+
<slot
|
|
38
|
+
name="drawer-close"
|
|
39
|
+
@slotchange=${r.onDrawerSlotChange}
|
|
40
|
+
></slot>
|
|
41
|
+
</div>
|
|
42
|
+
` : t}
|
|
43
|
+
|
|
44
|
+
<slot name="drawer-menu" @slotchange=${r.onDrawerSlotChange}></slot>
|
|
45
|
+
|
|
46
|
+
${r.hasDrawerMenuSlot ? t : e`
|
|
47
|
+
<scb-menu
|
|
48
|
+
.label=${r.menuLabel ?? ""}
|
|
49
|
+
.subLabel=${r.menuSubLabel ?? ""}
|
|
50
|
+
>
|
|
51
|
+
<scb-search
|
|
52
|
+
.size=${r.size}
|
|
53
|
+
.supportingText=${r.menuSearchPlaceholder ?? ""}
|
|
54
|
+
></scb-search>
|
|
55
|
+
|
|
56
|
+
${r.menuSectionLabel ? e`
|
|
57
|
+
<scb-menu-section
|
|
58
|
+
.label=${r.menuSectionLabel}
|
|
59
|
+
></scb-menu-section>
|
|
60
|
+
` : t}
|
|
61
|
+
|
|
62
|
+
${n(r.menu)}
|
|
63
|
+
|
|
64
|
+
${r.includeUtilityInMenu && (r.utils?.length ?? 0) > 0 ? e`
|
|
65
|
+
<scb-menu-section label=''></scb-menu-section>
|
|
66
|
+
${r.utils.map((t) => e`
|
|
67
|
+
<scb-menu-item
|
|
68
|
+
label=${t.label}
|
|
69
|
+
item-href=${t.href}
|
|
70
|
+
></scb-menu-item>
|
|
71
|
+
`)}
|
|
72
|
+
` : t}
|
|
73
|
+
</scb-menu>
|
|
74
|
+
`}
|
|
75
|
+
</scb-drawer>
|
|
76
|
+
`;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { i as renderHeaderDrawer };
|