scb-wc-test 0.1.119 → 0.1.121
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/mvc/components/scb-button/scb-button.js +15 -2
- package/mvc/components/scb-calendar/scb-calendar-event.js +3 -9
- package/mvc/components/scb-calendar/scb-calendar.js +82 -77
- package/package.json +2 -2
- package/scb-button/scb-button.d.ts +1 -0
- package/scb-button/scb-button.js +75 -59
- package/scb-calendar/scb-calendar-event.d.ts +3 -1
- package/scb-calendar/scb-calendar-event.js +27 -26
- package/scb-calendar/scb-calendar.d.ts +5 -2
- package/scb-calendar/scb-calendar.js +210 -137
- package/scb-wc-test.bundle.js +2195 -2183
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
3
|
-
var
|
|
4
|
-
for (var
|
|
5
|
-
(
|
|
6
|
-
return
|
|
1
|
+
import { css as u, LitElement as d, html as c } from "lit";
|
|
2
|
+
import { property as i, customElement as y } from "lit/decorators.js";
|
|
3
|
+
var b = Object.defineProperty, h = Object.getOwnPropertyDescriptor, p = (t, e, n, a) => {
|
|
4
|
+
for (var r = a > 1 ? void 0 : a ? h(e, n) : e, o = t.length - 1, l; o >= 0; o--)
|
|
5
|
+
(l = t[o]) && (r = (a ? l(e, n, r) : l(r)) || r);
|
|
6
|
+
return a && r && b(e, n, r), r;
|
|
7
7
|
};
|
|
8
|
-
let
|
|
8
|
+
let s = class extends d {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this.title = "", this.
|
|
10
|
+
super(...arguments), this.title = "", this.description = "", this.startDate = "", this.endDate = "";
|
|
11
|
+
}
|
|
12
|
+
updated(t) {
|
|
13
|
+
var e;
|
|
14
|
+
(e = super.updated) == null || e.call(this, t), (t.has("title") || t.has("description") || t.has("startDate") || t.has("endDate")) && this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
11
15
|
}
|
|
12
16
|
render() {
|
|
13
|
-
return
|
|
14
|
-
<div>
|
|
15
|
-
<h3>${this.title}</h3>
|
|
16
|
-
<p>${this.date}</p>
|
|
17
|
-
<p>${this.description}</p>
|
|
18
|
-
</div>
|
|
17
|
+
return c`
|
|
19
18
|
`;
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
|
-
|
|
21
|
+
s.styles = u`
|
|
23
22
|
:host {
|
|
24
23
|
display: block;
|
|
25
|
-
font-family: var(--brand-font, Arial, sans-serif)
|
|
26
24
|
}
|
|
27
25
|
`;
|
|
28
26
|
p([
|
|
29
|
-
|
|
30
|
-
],
|
|
27
|
+
i({ type: String })
|
|
28
|
+
], s.prototype, "title", 2);
|
|
29
|
+
p([
|
|
30
|
+
i({ type: String })
|
|
31
|
+
], s.prototype, "description", 2);
|
|
31
32
|
p([
|
|
32
|
-
|
|
33
|
-
],
|
|
33
|
+
i({ type: String, attribute: "start-date" })
|
|
34
|
+
], s.prototype, "startDate", 2);
|
|
34
35
|
p([
|
|
35
|
-
|
|
36
|
-
],
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
],
|
|
36
|
+
i({ type: String, attribute: "end-date" })
|
|
37
|
+
], s.prototype, "endDate", 2);
|
|
38
|
+
s = p([
|
|
39
|
+
y("scb-calendar-event")
|
|
40
|
+
], s);
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
s as ScbCalendarEvent
|
|
42
43
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
export declare class ScbCalendar extends LitElement {
|
|
3
|
-
|
|
4
|
-
value: string;
|
|
3
|
+
lang: string;
|
|
5
4
|
static styles: import('lit').CSSResult;
|
|
5
|
+
private _mutationObserver;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
private _onEventChanged;
|
|
6
9
|
private _today;
|
|
7
10
|
private _current;
|
|
8
11
|
private _popupEvent;
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as k, LitElement as S, html as m } from "lit";
|
|
2
|
+
import { property as O, customElement as C } from "lit/decorators.js";
|
|
3
3
|
import "./scb-calendar-event.js";
|
|
4
4
|
import "../scb-icon-button/scb-icon-button.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import "../scb-dialog/scb-dialog.js";
|
|
6
|
+
import "../scb-list/scb-list.js";
|
|
7
|
+
import "@material/web/focus/md-focus-ring.js";
|
|
8
|
+
var A = Object.defineProperty, P = Object.getOwnPropertyDescriptor, x = (l, a, h, g) => {
|
|
9
|
+
for (var p = g > 1 ? void 0 : g ? P(a, h) : a, i = l.length - 1, f; i >= 0; i--)
|
|
10
|
+
(f = l[i]) && (p = (g ? f(a, h, p) : f(p)) || p);
|
|
11
|
+
return g && p && A(a, h, p), p;
|
|
9
12
|
};
|
|
10
|
-
let
|
|
13
|
+
let w = class extends S {
|
|
11
14
|
constructor() {
|
|
12
|
-
super(...arguments), this.
|
|
15
|
+
super(...arguments), this.lang = "sv", this._mutationObserver = null, this._onEventChanged = () => {
|
|
16
|
+
this.requestUpdate();
|
|
17
|
+
}, this._today = /* @__PURE__ */ new Date(), this._current = /* @__PURE__ */ new Date(), this._popupEvent = null;
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback(), this.addEventListener("change", this._onEventChanged), this._mutationObserver = new MutationObserver(() => {
|
|
21
|
+
this.requestUpdate();
|
|
22
|
+
}), this._mutationObserver.observe(this, { childList: !0 });
|
|
16
23
|
}
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.removeEventListener("change", this._onEventChanged), super.disconnectedCallback(), this._mutationObserver && (this._mutationObserver.disconnect(), this._mutationObserver = null);
|
|
26
|
+
}
|
|
27
|
+
_daysInMonth(l, a) {
|
|
28
|
+
return new Date(l, a + 1, 0).getDate();
|
|
29
|
+
}
|
|
30
|
+
_firstDayOfWeek(l, a) {
|
|
31
|
+
const h = new Date(l, a, 1).getDay();
|
|
32
|
+
return h === 0 ? 6 : h - 1;
|
|
19
33
|
}
|
|
20
34
|
_prevMonth() {
|
|
21
35
|
this._current = new Date(this._current.getFullYear(), this._current.getMonth() - 1, 1), this.requestUpdate();
|
|
@@ -23,57 +37,38 @@ let u = class extends w {
|
|
|
23
37
|
_nextMonth() {
|
|
24
38
|
this._current = new Date(this._current.getFullYear(), this._current.getMonth() + 1, 1), this.requestUpdate();
|
|
25
39
|
}
|
|
26
|
-
_showEventPopup(
|
|
27
|
-
this._popupEvent =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
40
|
+
_showEventPopup(l) {
|
|
41
|
+
this._popupEvent = l, this.requestUpdate(), setTimeout(() => {
|
|
42
|
+
var g;
|
|
43
|
+
const a = (g = this.shadowRoot) == null ? void 0 : g.querySelector("scb-dialog");
|
|
44
|
+
a && a.setAttribute("open", "");
|
|
45
|
+
const h = (p) => {
|
|
46
|
+
var i;
|
|
47
|
+
(i = p.target) != null && i.closest(".event-popup") || this._closePopup();
|
|
31
48
|
};
|
|
32
|
-
window.addEventListener("mousedown",
|
|
49
|
+
window.addEventListener("mousedown", h, { once: !0 });
|
|
33
50
|
}, 0);
|
|
34
51
|
}
|
|
35
52
|
_closePopup() {
|
|
36
|
-
|
|
53
|
+
var a;
|
|
54
|
+
const l = (a = this.shadowRoot) == null ? void 0 : a.querySelector("scb-dialog");
|
|
55
|
+
l && l.removeAttribute("open"), this._popupEvent = null, this.requestUpdate();
|
|
37
56
|
}
|
|
38
57
|
render() {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<div class="calendar-day calendar-day--other">
|
|
54
|
-
<span class="calendar-day-number">${v}</span>
|
|
55
|
-
</div>
|
|
56
|
-
`);
|
|
57
|
-
} else if (l > o)
|
|
58
|
-
p.push(i`<div></div>`);
|
|
59
|
-
else {
|
|
60
|
-
const g = a.getFullYear() === t && a.getMonth() === e && a.getDate() === l, y = `${t}-${String(e + 1).padStart(2, "0")}-${String(l).padStart(2, "0")}`, n = d.get(y) || [];
|
|
61
|
-
p.push(i`
|
|
62
|
-
<div
|
|
63
|
-
class="calendar-day${g ? " today" : ""}${n.length ? " has-event" : ""}"
|
|
64
|
-
@click=${n.length ? () => this._showEventPopup({ date: y, events: n }) : null}
|
|
65
|
-
title=${n.length === 1 ? n[0].title : n.length > 1 ? n.map((v) => v.title).join(", ") : ""}
|
|
66
|
-
>
|
|
67
|
-
<span class="calendar-day-number">${l}</span>
|
|
68
|
-
<div class="calendar-titles-wrapper">
|
|
69
|
-
${n.map((v) => i`<span class="calendar-day-event-title">${v.title}</span>`)}
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
`), l++;
|
|
73
|
-
}
|
|
74
|
-
if (m.push(i`<div class="calendar-grid">${p}</div>`), l > o) break;
|
|
75
|
-
}
|
|
76
|
-
const x = [
|
|
58
|
+
const l = this._current.getFullYear(), a = this._current.getMonth(), h = this._daysInMonth(l, a), g = this._firstDayOfWeek(l, a), p = this._today, i = this.lang === "en", f = i ? [
|
|
59
|
+
"January",
|
|
60
|
+
"February",
|
|
61
|
+
"March",
|
|
62
|
+
"April",
|
|
63
|
+
"May",
|
|
64
|
+
"June",
|
|
65
|
+
"July",
|
|
66
|
+
"August",
|
|
67
|
+
"September",
|
|
68
|
+
"October",
|
|
69
|
+
"November",
|
|
70
|
+
"December"
|
|
71
|
+
] : [
|
|
77
72
|
"Januari",
|
|
78
73
|
"Februari",
|
|
79
74
|
"Mars",
|
|
@@ -86,59 +81,138 @@ let u = class extends w {
|
|
|
86
81
|
"Oktober",
|
|
87
82
|
"November",
|
|
88
83
|
"December"
|
|
89
|
-
];
|
|
90
|
-
|
|
84
|
+
], E = i ? ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] : ["Mån", "Tis", "Ons", "Tor", "Fre", "Lör", "Sön"], M = Array.from(this.querySelectorAll("scb-calendar-event")), T = /* @__PURE__ */ new Map();
|
|
85
|
+
for (const e of M) {
|
|
86
|
+
const r = e.getAttribute("start-date") || "", o = e.getAttribute("end-date") || "";
|
|
87
|
+
if (r && o) {
|
|
88
|
+
const d = new Date(r), n = new Date(o);
|
|
89
|
+
for (let s = new Date(d); s <= n; s.setDate(s.getDate() + 1)) {
|
|
90
|
+
const u = s.toISOString().split("T")[0], t = T.get(u) || [];
|
|
91
|
+
t.push({
|
|
92
|
+
title: e.title,
|
|
93
|
+
description: e.description,
|
|
94
|
+
start: r,
|
|
95
|
+
end: o
|
|
96
|
+
}), T.set(u, t);
|
|
97
|
+
}
|
|
98
|
+
} else if (r && e.title) {
|
|
99
|
+
const d = r.split("T")[0], n = T.get(d) || [];
|
|
100
|
+
n.push({ title: e.title, description: e.description, start: r }), T.set(d, n);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const $ = [];
|
|
104
|
+
let y = 1;
|
|
105
|
+
for (let e = 0; e < 6; e++) {
|
|
106
|
+
const r = [];
|
|
107
|
+
for (let o = 0; o < 7; o++)
|
|
108
|
+
if (e === 0 && o < g) {
|
|
109
|
+
const d = a === 0 ? 11 : a - 1, n = a === 0 ? l - 1 : l, u = this._daysInMonth(n, d) - (g - o - 1);
|
|
110
|
+
r.push(m`
|
|
111
|
+
<div class="calendar-day calendar-day--other">
|
|
112
|
+
<span class="calendar-day-number">${u}</span>
|
|
113
|
+
</div>
|
|
114
|
+
`);
|
|
115
|
+
} else if (y > h)
|
|
116
|
+
r.push(m`<div></div>`);
|
|
117
|
+
else {
|
|
118
|
+
const d = p.getFullYear() === l && p.getMonth() === a && p.getDate() === y, n = `${l}-${String(a + 1).padStart(2, "0")}-${String(y).padStart(2, "0")}`;
|
|
119
|
+
let s = T.get(n) || [];
|
|
120
|
+
s = [...s].sort((t, c) => {
|
|
121
|
+
const b = t.start && n === t.start.split("T")[0] ? t.start : t.end && n === t.end.split("T")[0] ? t.end : "", v = c.start && n === c.start.split("T")[0] ? c.start : c.end && n === c.end.split("T")[0] ? c.end : "", _ = b && b.includes("T"), D = v && v.includes("T");
|
|
122
|
+
return _ && D ? b.localeCompare(v) : _ ? -1 : D ? 1 : t.title.localeCompare(c.title);
|
|
123
|
+
});
|
|
124
|
+
const u = [...s].map((t) => {
|
|
125
|
+
let c = "", b = "";
|
|
126
|
+
if (t.start && t.end) {
|
|
127
|
+
const v = t.start.split("T")[0], _ = t.end.split("T")[0];
|
|
128
|
+
n === v && n === _ && t.start.includes("T") && t.end.includes("T") ? c = t.start.split("T")[1].substring(0, 5) + "–" + t.end.split("T")[1].substring(0, 5) : n === v && t.start.includes("T") ? c = t.start.split("T")[1].substring(0, 5) : n === _ && t.end.includes("T") ? (c = t.end.split("T")[1].substring(0, 5), b = i ? "cont. " : "fort. ") : n !== v && (c = "", b = i ? "cont. " : "fort. ");
|
|
129
|
+
} else t.start && t.start.includes("T") && (c = t.start.split("T")[1].substring(0, 5));
|
|
130
|
+
return { ...t, time: c, prefix: b };
|
|
131
|
+
});
|
|
132
|
+
r.push(m`
|
|
133
|
+
<div
|
|
134
|
+
class="calendar-day${d ? " today" : ""}${s.length ? " has-event" : ""}"
|
|
135
|
+
?tabindex=${s.length ? 0 : void 0}
|
|
136
|
+
@click=${s.length ? () => this._showEventPopup({ date: n, events: s }) : null}
|
|
137
|
+
tabindex=${s.length ? "0" : void 0}
|
|
138
|
+
@keydown=${s.length ? (t) => {
|
|
139
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), this._showEventPopup({ date: n, events: s }));
|
|
140
|
+
} : null}
|
|
141
|
+
title=${s.length === 1 ? s[0].title : s.length > 1 ? s.map((t) => t.title).join(", ") : ""}
|
|
142
|
+
role=${s.length ? "button" : void 0}
|
|
143
|
+
aria-label=${s.length ? s.length === 1 ? s[0].title : s.map((t) => t.title).join(", ") : void 0}
|
|
144
|
+
>
|
|
145
|
+
<md-focus-ring inward></md-focus-ring>
|
|
146
|
+
<span class="calendar-day-number">${y}</span>
|
|
147
|
+
<div class="calendar-titles-wrapper">
|
|
148
|
+
${u.map((t) => m`<span class="calendar-day-event-title">${t.prefix || ""}${t.title}</span>`)}
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
`), y++;
|
|
152
|
+
}
|
|
153
|
+
if ($.push(m`<div class="calendar-grid">${r}</div>`), y > h) break;
|
|
154
|
+
}
|
|
155
|
+
return m`
|
|
91
156
|
<div class="calendar-header">
|
|
92
|
-
<scb-icon-button @click=${this._prevMonth} icon="chevron_left" aria-label="Föregående månad"></scb-icon-button>
|
|
93
|
-
<span>${
|
|
94
|
-
<scb-icon-button @click=${this._nextMonth} icon="chevron_right" aria-label="Nästa månad"></scb-icon-button>
|
|
157
|
+
<scb-icon-button @click=${this._prevMonth} icon="chevron_left" aria-label="${i ? "Previous month" : "Föregående månad"}"></scb-icon-button>
|
|
158
|
+
<span>${f[a]} ${l}</span>
|
|
159
|
+
<scb-icon-button @click=${this._nextMonth} icon="chevron_right" aria-label="${i ? "Next month" : "Nästa månad"}"></scb-icon-button>
|
|
95
160
|
</div>
|
|
96
161
|
<div class="calendar-grid calendar-grid-days">
|
|
97
|
-
|
|
162
|
+
${E.map((e) => m`<div>${e}</div>`)}
|
|
98
163
|
</div>
|
|
99
164
|
<div class="calendar-weeks">
|
|
100
|
-
${
|
|
101
|
-
|
|
102
|
-
${this._popupEvent && Array.isArray(this._popupEvent.events) ?
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
165
|
+
${$}
|
|
166
|
+
</div>
|
|
167
|
+
${this._popupEvent && Array.isArray(this._popupEvent.events) ? m`
|
|
168
|
+
<scb-dialog variant="floating" open label="${i ? "Events" : "Händelser"} ${this._popupEvent.date}">
|
|
169
|
+
<scb-list>
|
|
170
|
+
${[...this._popupEvent.events].sort((e, r) => {
|
|
171
|
+
const o = e.start && e.start.includes("T") ? e.start : e.end && e.end.includes("T") ? e.end : "", d = r.start && r.start.includes("T") ? r.start : r.end && r.end.includes("T") ? r.end : "", n = o && o.includes("T"), s = d && d.includes("T");
|
|
172
|
+
return n && s ? o.localeCompare(d) : n ? -1 : s ? 1 : e.title.localeCompare(r.title);
|
|
173
|
+
}).map((e) => {
|
|
174
|
+
var s;
|
|
175
|
+
const r = ((s = this._popupEvent) == null ? void 0 : s.date) ?? "";
|
|
176
|
+
let o = "", d = "", n = "";
|
|
177
|
+
if (e.start && e.end) {
|
|
178
|
+
const u = e.start.split("T")[0], t = e.end.split("T")[0];
|
|
179
|
+
u === t && e.start.includes("T") && e.end.includes("T") ? o = e.start.split("T")[1].substring(0, 5) + " – " + e.end.split("T")[1].substring(0, 5) : r === u && e.start.includes("T") && (o = "Start: " + e.start.split("T")[1].substring(0, 5) + (i ? " (Extended event) " : " (Flerdagsevenemang) ")), r === t && e.end.includes("T") && u !== t && (n = (i ? "End: " : "Slut: ") + e.end.split("T")[1].substring(0, 5)), r !== u && (d = i ? "cont. " : "fort. ");
|
|
180
|
+
} else e.start && e.start.includes("T") && (o = e.start.split("T")[1].substring(0, 5));
|
|
181
|
+
return m`
|
|
182
|
+
<scb-list-item label="${d}${e.title}" supporting-text="${e.description ? e.description : ""}" overline="${o || ""}${n || ""}">
|
|
183
|
+
</scb-list-item>`;
|
|
184
|
+
})}
|
|
185
|
+
</scb-list>
|
|
186
|
+
</scb-dialog>
|
|
111
187
|
` : ""}
|
|
112
188
|
`;
|
|
113
189
|
}
|
|
114
190
|
};
|
|
115
|
-
|
|
191
|
+
w.styles = k`
|
|
116
192
|
:host {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
border: var(--scb-elevation-2, 0 2px 8px rgba(0,0,0,0.08));
|
|
123
|
-
padding: 16px;
|
|
193
|
+
display: block;
|
|
194
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
195
|
+
padding: var(--spacing-5);
|
|
196
|
+
border-radius: var(--md-sys-shape-corner-large);
|
|
197
|
+
background: var(--md-sys-color-surface);
|
|
124
198
|
}
|
|
125
199
|
.calendar-header {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: space-between;
|
|
203
|
+
margin-bottom: var(--spacing-5);
|
|
130
204
|
border-bottom: 1px solid rgb(224, 224, 224);
|
|
131
|
-
padding-bottom:
|
|
205
|
+
padding-bottom: var(--spacing-3);
|
|
132
206
|
}
|
|
133
207
|
.calendar-grid {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
208
|
+
display: grid;
|
|
209
|
+
grid-template-columns: repeat(7, 1fr);
|
|
210
|
+
gap: var(--spacing-2);
|
|
211
|
+
margin-bottom: var(--spacing-2);
|
|
138
212
|
}
|
|
139
213
|
.calendar-grid-days{
|
|
140
214
|
font-weight: 600;
|
|
141
|
-
margin-bottom:
|
|
215
|
+
margin-bottom: var(--spacing-5);
|
|
142
216
|
}
|
|
143
217
|
.calendar-weeks {
|
|
144
218
|
display: grid;
|
|
@@ -146,67 +220,66 @@ u.styles = _`
|
|
|
146
220
|
}
|
|
147
221
|
.calendar-titles-wrapper{
|
|
148
222
|
display: grid;
|
|
149
|
-
gap:
|
|
223
|
+
gap: var(--spacing-2);
|
|
150
224
|
}
|
|
151
225
|
.calendar-day {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
gap:
|
|
159
|
-
border: 1px solid #e0e0e0;
|
|
226
|
+
border-radius: 6px;
|
|
227
|
+
min-height: 50px;
|
|
228
|
+
display: flex;
|
|
229
|
+
padding: var(--spacing-3);
|
|
230
|
+
box-sizing: border-box;
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
gap: var(--spacing-3);
|
|
233
|
+
border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
|
|
160
234
|
flex-direction: column;
|
|
161
235
|
}
|
|
236
|
+
.calendar-day.has-event:focus {
|
|
237
|
+
outline: none;
|
|
238
|
+
}
|
|
239
|
+
md-focus-ring {
|
|
240
|
+
border-radius: 6px;
|
|
241
|
+
}
|
|
162
242
|
.calendar-day--other {
|
|
163
|
-
|
|
243
|
+
opacity: 0.4;
|
|
164
244
|
}
|
|
165
245
|
.calendar-day-number {
|
|
166
|
-
|
|
167
|
-
|
|
246
|
+
font-size: var(--md-sys-typescale-label-small-size);
|
|
247
|
+
line-height: var(--md-sys-typescale-label-small-line-height); /* vissa tabeller i Figma visar 21 */
|
|
248
|
+
font-weight: var(--md-sys-typescale-label-small-weight);
|
|
249
|
+
letter-spacing: var(--md-sys-typescale-label-small-tracking);
|
|
168
250
|
}
|
|
169
251
|
.calendar-day-event-title {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
252
|
+
font-size: 12px;
|
|
253
|
+
color: var(--md-sys-color-primary);
|
|
254
|
+
white-space: nowrap;
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
text-overflow: ellipsis;
|
|
257
|
+
display: block;
|
|
258
|
+
width: 100%;
|
|
177
259
|
}
|
|
178
260
|
.calendar-day.today {
|
|
179
|
-
|
|
261
|
+
background: var(--md-sys-color-secondary-container);
|
|
262
|
+
|
|
180
263
|
}
|
|
181
264
|
.calendar-day.has-event {
|
|
182
265
|
cursor: pointer;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
border-radius: 10px;
|
|
192
|
-
box-shadow: 0 4px 24px rgba(0,0,0,0.18);
|
|
193
|
-
min-width: 220px;
|
|
194
|
-
max-width: 320px;
|
|
195
|
-
padding: 16px 20px 16px 20px;
|
|
196
|
-
top: 30%;
|
|
197
|
-
left: 50%;
|
|
266
|
+
position: relative;
|
|
267
|
+
border: 1px solid var(--md-sys-color-primary);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.event-popup-list{
|
|
271
|
+
display: flex;
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
gap: var(--spacing-4);
|
|
198
274
|
}
|
|
199
275
|
|
|
200
276
|
`;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
],
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
],
|
|
207
|
-
u = b([
|
|
208
|
-
$("scb-calendar")
|
|
209
|
-
], u);
|
|
277
|
+
x([
|
|
278
|
+
O({ type: String })
|
|
279
|
+
], w.prototype, "lang", 2);
|
|
280
|
+
w = x([
|
|
281
|
+
C("scb-calendar")
|
|
282
|
+
], w);
|
|
210
283
|
export {
|
|
211
|
-
|
|
284
|
+
w as ScbCalendar
|
|
212
285
|
};
|