@mintplayer/web-components 2.5.0 → 2.7.0
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/a11y/index.mjs +9 -8
- package/checkbox/index.mjs +1 -1
- package/chunks/error-text-B45eDAt1.mjs +17 -0
- package/chunks/{form-associated-axmc5sY0.mjs → form-associated-BR-fUvZ1.mjs} +11 -26
- package/chunks/{id-D5QCG603.mjs → id-BstjfRrz.mjs} +97 -72
- package/chunks/{mp-checkbox-Ph2mMRGz.mjs → mp-checkbox-6EJwdUIn.mjs} +6 -5
- package/chunks/{mp-datatable-BwTlh9A_.mjs → mp-datatable-25O1GtvU.mjs} +1 -1
- package/chunks/mp-datetime-picker.element-MPTRHwyc.mjs +530 -0
- package/chunks/{mp-radio-BjW1HNSc.mjs → mp-radio-DvKgrTFL.mjs} +2 -2
- package/chunks/{mp-select-Ctu-v1-p.mjs → mp-select-CKX0eM5C.mjs} +5 -4
- package/chunks/{mp-timepicker.element-Bz393NDQ.mjs → mp-timepicker.element-COZEUIoE.mjs} +56 -52
- package/chunks/{mp-toggle-button-Kz6sIgBJ.mjs → mp-toggle-button-C4Loq_p4.mjs} +5 -4
- package/chunks/{overlay-controller-DPt13i8p.mjs → overlay-controller-D6agzzOI.mjs} +19 -4
- package/datatable/index.mjs +1 -1
- package/datepicker/index.mjs +1 -1
- package/datetime-picker/index.mjs +2 -431
- package/datetime-picker/src/mp-datetime-picker.element.d.ts +66 -0
- package/file-manager/index.mjs +1 -1
- package/navbar/index.mjs +1 -1
- package/otp-input/index.mjs +4 -3
- package/overlay/index.mjs +1 -1
- package/overlay/src/overlay-controller.d.ts +13 -0
- package/package.json +1 -1
- package/query-builder/index.mjs +2 -2
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +2 -2
- package/ribbon/index.mjs +1 -1
- package/scheduler/index.mjs +1996 -813
- package/scheduler/src/components/mp-scheduler.d.ts +269 -11
- package/scheduler/src/state/scheduler-state.d.ts +10 -0
- package/scheduler/src/views/timeline-view.d.ts +51 -3
- package/scheduler/src/views/year-view.d.ts +4 -2
- package/scheduler-core/index.mjs +9 -8
- package/scheduler-core/src/models/event.d.ts +6 -2
- package/scheduler-core/src/models/messages.d.ts +60 -0
- package/scheduler-core/src/models/options.d.ts +22 -6
- package/scheduler-core/src/models/permissions.d.ts +35 -4
- package/scheduler-core/src/models/time-slot.d.ts +11 -6
- package/select/index.mjs +1 -1
- package/timepicker/index.mjs +4 -3
- package/timepicker/src/mp-time-list.element.d.ts +44 -7
- package/timepicker/src/mp-timepicker.element.d.ts +5 -0
- package/toggle-button/index.mjs +1 -1
- package/tree-select/index.mjs +1 -1
package/a11y/index.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { L as
|
|
2
|
-
import { F as
|
|
1
|
+
import { L as o } from "../chunks/live-announcer-Bi0orG4n.mjs";
|
|
2
|
+
import { F as a, a as t, d as n } from "../chunks/focus-restore-DxuP1Oe2.mjs";
|
|
3
3
|
import { i as c } from "../chunks/inert-regions-DXCnn1LN.mjs";
|
|
4
4
|
import { F as i, c as m, a as p, d as x } from "../chunks/focus-trap-DTOLJ5bb.mjs";
|
|
5
5
|
import { R as F, f as b, l as u, n as E } from "../chunks/roving-focus-CrL9982a.mjs";
|
|
6
6
|
import { H as A, s as C, a as I } from "../chunks/host-aria-WSGs7SPQ.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { e as v, a as g } from "../chunks/error-text-B45eDAt1.mjs";
|
|
8
|
+
import { F as L } from "../chunks/form-associated-BR-fUvZ1.mjs";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
a as FocusRestore,
|
|
10
11
|
t as FocusRestoreController,
|
|
11
12
|
i as FocusTrap,
|
|
12
|
-
|
|
13
|
+
L as FormAssociatedMixin,
|
|
13
14
|
A as HostAriaController,
|
|
14
|
-
|
|
15
|
+
o as LiveAnnouncerController,
|
|
15
16
|
F as RovingFocus,
|
|
16
17
|
m as collectTabbables,
|
|
17
18
|
p as containsComposed,
|
|
18
19
|
n as deepActiveElement,
|
|
19
20
|
x as dismissStack,
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
v as errorFeedback,
|
|
22
|
+
g as errorFeedbackElements,
|
|
22
23
|
b as firstEnabledIndex,
|
|
23
24
|
c as inertRegions,
|
|
24
25
|
u as lastEnabledIndex,
|
package/checkbox/index.mjs
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { nothing as o, html as a } from "lit";
|
|
2
|
+
const t = "invalid-feedback", c = { id: o, node: o };
|
|
3
|
+
function l(e, n, s) {
|
|
4
|
+
const r = n?.trim();
|
|
5
|
+
return !r || !s ? c : {
|
|
6
|
+
id: e,
|
|
7
|
+
node: a`<small class=${t} id=${e}>${r}</small>`
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function d(e) {
|
|
11
|
+
const n = e?.querySelector(`.${t}`);
|
|
12
|
+
return n ? [n] : [];
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
d as a,
|
|
16
|
+
l as e
|
|
17
|
+
};
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function b(e, s, i) {
|
|
5
|
-
const t = s?.trim();
|
|
6
|
-
return !t || !i ? u : {
|
|
7
|
-
id: e,
|
|
8
|
-
node: m`<small class=${n} id=${e}>${t}</small>`
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function F(e) {
|
|
12
|
-
const s = e?.querySelector(`.${n}`);
|
|
13
|
-
return s ? [s] : [];
|
|
14
|
-
}
|
|
15
|
-
function y(e) {
|
|
16
|
-
class s extends e {
|
|
1
|
+
import { s as n } from "./host-aria-WSGs7SPQ.mjs";
|
|
2
|
+
function h(s) {
|
|
3
|
+
class i extends s {
|
|
17
4
|
static {
|
|
18
5
|
this.formAssociated = !0;
|
|
19
6
|
}
|
|
20
7
|
/** Effective disabled per the platform, as last reported by the UA. */
|
|
21
8
|
#e = !1;
|
|
22
9
|
get internals() {
|
|
23
|
-
return
|
|
10
|
+
return n(this);
|
|
24
11
|
}
|
|
25
12
|
get effectiveDisabled() {
|
|
26
13
|
return this.#e || this.hasAttribute("disabled");
|
|
@@ -33,11 +20,11 @@ function y(e) {
|
|
|
33
20
|
const t = this.internals;
|
|
34
21
|
!t || typeof t.setFormValue != "function" || t.setFormValue(this.#t().formValue());
|
|
35
22
|
}
|
|
36
|
-
setFormValidity(t,
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
|
|
23
|
+
setFormValidity(t, r) {
|
|
24
|
+
const e = this.internals;
|
|
25
|
+
if (!e || typeof e.setValidity != "function") return;
|
|
26
|
+
const o = this.#t().formValidityAnchor?.() ?? void 0, a = Object.values(t).some(Boolean);
|
|
27
|
+
e.setValidity(t, a ? r : void 0, o);
|
|
41
28
|
}
|
|
42
29
|
formDisabledCallback(t) {
|
|
43
30
|
this.#e = t, this.requestUpdate?.();
|
|
@@ -49,10 +36,8 @@ function y(e) {
|
|
|
49
36
|
this.#t().formRestore?.(t), this.syncFormValue();
|
|
50
37
|
}
|
|
51
38
|
}
|
|
52
|
-
return
|
|
39
|
+
return i;
|
|
53
40
|
}
|
|
54
41
|
export {
|
|
55
|
-
|
|
56
|
-
F as a,
|
|
57
|
-
b as e
|
|
42
|
+
h as F
|
|
58
43
|
};
|
|
@@ -29,6 +29,9 @@ const w = {
|
|
|
29
29
|
addGroupToGroup: "Add subgroup to {title}",
|
|
30
30
|
removeResource: "Remove {title}",
|
|
31
31
|
resourceColor: "Colour for {title}",
|
|
32
|
+
resizeResourceColumn: "Resize the resource column",
|
|
33
|
+
renameResourceLabel: "New name for {title}",
|
|
34
|
+
resourceRenamed: "{from} renamed to {to}.",
|
|
32
35
|
moreEvents: "+{count} more",
|
|
33
36
|
dayPopoverLabel: "Events on {date}",
|
|
34
37
|
dayPopoverCount: "{count} {events}",
|
|
@@ -37,7 +40,24 @@ const w = {
|
|
|
37
40
|
dayPopoverEmpty: "No events.",
|
|
38
41
|
newEvent: "New event",
|
|
39
42
|
showDay: "Show day",
|
|
43
|
+
showMonth: "Show month",
|
|
40
44
|
closePopover: "Close",
|
|
45
|
+
newEventResource: "Resource",
|
|
46
|
+
deleteEventLabel: "Delete {title}",
|
|
47
|
+
eventEditorLabel: "Edit {title}",
|
|
48
|
+
editorTitleLabel: "Title",
|
|
49
|
+
editorStartLabel: "Start",
|
|
50
|
+
editorEndLabel: "End",
|
|
51
|
+
editorColorLabel: "Colour",
|
|
52
|
+
editorInheritColor: "Inherit from resource",
|
|
53
|
+
editorSave: "Save",
|
|
54
|
+
editorCancel: "Cancel",
|
|
55
|
+
editorDelete: "Delete",
|
|
56
|
+
editorInvalidRange: "End must be after start.",
|
|
57
|
+
editorTitleRequired: "Title is required.",
|
|
58
|
+
editorEndClamped: "End adjusted to {end}, the earliest allowed.",
|
|
59
|
+
editorStartClamped: "Start adjusted to {start}, the latest allowed.",
|
|
60
|
+
yearMonthCardLabel: "{month}, {count} {events}",
|
|
41
61
|
viewChanged: "View changed to {view}.",
|
|
42
62
|
eventAdded: "Event {title} added.",
|
|
43
63
|
eventUpdated: "Event {title} updated.",
|
|
@@ -45,6 +65,7 @@ const w = {
|
|
|
45
65
|
loadingEvents: "Loading events.",
|
|
46
66
|
eventsLoaded: "Events loaded.",
|
|
47
67
|
moveModeEntered: "Move mode for {title}. Arrow keys nudge by {minutes} minutes; Shift with arrow keys resizes the end edge; Alt with Shift resizes the start edge; Enter commits, Escape cancels.",
|
|
68
|
+
moveModeEnteredTimeline: "Move mode for {title}. Left and Right arrows nudge by {minutes} minutes; Up and Down arrows change the resource; Shift with arrow keys resizes the end edge; Alt with Shift resizes the start edge; Enter commits, Escape cancels.",
|
|
48
69
|
movedTo: "Moved to {start}–{end}, {day}",
|
|
49
70
|
movedToResource: "Moved to resource {resource}.",
|
|
50
71
|
resizedEdge: "Resized {edge} edge to {start}–{end}",
|
|
@@ -61,18 +82,19 @@ const w = {
|
|
|
61
82
|
actionNotAllowed: "That action is not allowed here.",
|
|
62
83
|
gridInstructions: "Use the arrow keys to move between cells. Hold Shift with the arrow keys to extend the selection, and press Enter to request a new event for the selection. Page Up and Page Down change the period. Alt with T, Y, M, W or D switches to today, year, month, week or day view.",
|
|
63
84
|
eventInstructions: "Press Enter or M to move or resize the event with the arrow keys. Delete removes the event. Left and Right arrows move between events.",
|
|
85
|
+
eventInstructionsWithEditor: "Press Enter or M to move or resize the event with the arrow keys. F2 opens the event editor. Delete removes the event. Left and Right arrows move between events.",
|
|
64
86
|
eventOnResource: "on {resource}"
|
|
65
87
|
};
|
|
66
|
-
function
|
|
88
|
+
function x(i, e) {
|
|
67
89
|
return e ? i.replace(
|
|
68
90
|
/\{(\w+)\}/g,
|
|
69
91
|
(t, n) => n in e ? String(e[n]) : t
|
|
70
92
|
) : i;
|
|
71
93
|
}
|
|
72
|
-
function
|
|
94
|
+
function L(i) {
|
|
73
95
|
return i ? { ...w, ...i } : w;
|
|
74
96
|
}
|
|
75
|
-
const
|
|
97
|
+
const M = [
|
|
76
98
|
"#3788d8",
|
|
77
99
|
// Blue
|
|
78
100
|
"#28a745",
|
|
@@ -95,7 +117,7 @@ const y = [
|
|
|
95
117
|
// Gray
|
|
96
118
|
];
|
|
97
119
|
function F(i) {
|
|
98
|
-
return
|
|
120
|
+
return M[i % M.length];
|
|
99
121
|
}
|
|
100
122
|
function G(i) {
|
|
101
123
|
let e = i.replace("#", "");
|
|
@@ -115,19 +137,19 @@ function A(i, e) {
|
|
|
115
137
|
const n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), o = parseInt(t.substring(4, 6), 16), s = Math.max(0, Math.round(n * (1 - e / 100))), a = Math.max(0, Math.round(r * (1 - e / 100))), u = Math.max(0, Math.round(o * (1 - e / 100)));
|
|
116
138
|
return `#${s.toString(16).padStart(2, "0")}${a.toString(16).padStart(2, "0")}${u.toString(16).padStart(2, "0")}`;
|
|
117
139
|
}
|
|
118
|
-
function
|
|
140
|
+
function U(i, e) {
|
|
119
141
|
let t = i.replace("#", "");
|
|
120
142
|
t.length === 3 && (t = t.split("").map((s) => s + s).join(""));
|
|
121
143
|
const n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), o = parseInt(t.substring(4, 6), 16);
|
|
122
144
|
return `rgba(${n}, ${r}, ${o}, ${e})`;
|
|
123
145
|
}
|
|
124
146
|
const E = "#3788d8";
|
|
125
|
-
function
|
|
147
|
+
function $(i, e, t = E) {
|
|
126
148
|
if (i.color) return i.color;
|
|
127
149
|
const n = i.resourceId ? e.get(i.resourceId) : void 0;
|
|
128
150
|
return n?.eventColor ?? n?.color ?? t;
|
|
129
151
|
}
|
|
130
|
-
const
|
|
152
|
+
const P = {
|
|
131
153
|
initialView: "week",
|
|
132
154
|
initialDate: /* @__PURE__ */ new Date(),
|
|
133
155
|
locale: "en-US",
|
|
@@ -162,40 +184,42 @@ const L = {
|
|
|
162
184
|
weekText: "W",
|
|
163
185
|
dayMaxEvents: !0,
|
|
164
186
|
moreLinkBehavior: "popover",
|
|
165
|
-
dayClickAction: "
|
|
187
|
+
dayClickAction: "popover",
|
|
188
|
+
eventEditor: !0,
|
|
166
189
|
requireEventResource: !1
|
|
167
|
-
},
|
|
190
|
+
}, b = {
|
|
168
191
|
createEvent: !0,
|
|
169
192
|
moveEvent: !0,
|
|
170
|
-
|
|
171
|
-
resizeEventEnd: !0,
|
|
193
|
+
resizeEvent: !0,
|
|
172
194
|
deleteEvent: !0,
|
|
195
|
+
editEvent: !0,
|
|
173
196
|
selectRange: !0,
|
|
174
197
|
createResource: !1,
|
|
175
198
|
updateResource: !1,
|
|
176
199
|
deleteResource: !1,
|
|
177
200
|
createGroup: !1
|
|
178
201
|
};
|
|
179
|
-
function
|
|
180
|
-
if (e.readonly || e.permissions === !1 || !((typeof e.permissions == "object" && e.permissions !== null ? e.permissions : void 0)?.[i] ??
|
|
202
|
+
function R(i, e) {
|
|
203
|
+
if (e.readonly || e.permissions === !1 || !((typeof e.permissions == "object" && e.permissions !== null ? e.permissions : void 0)?.[i] ?? b[i])) return !1;
|
|
181
204
|
const r = e.event;
|
|
182
205
|
if (!r) return !0;
|
|
183
206
|
if (r.editable === !1) return !1;
|
|
184
207
|
switch (i) {
|
|
185
208
|
case "moveEvent":
|
|
186
209
|
return r.draggable !== !1;
|
|
187
|
-
case "
|
|
188
|
-
return
|
|
189
|
-
case "resizeEventEnd":
|
|
190
|
-
return M(r.resizable, "end");
|
|
210
|
+
case "resizeEvent":
|
|
211
|
+
return v(r.resizable, "start") || v(r.resizable, "end");
|
|
191
212
|
default:
|
|
192
213
|
return !0;
|
|
193
214
|
}
|
|
194
215
|
}
|
|
195
|
-
function
|
|
216
|
+
function O(i, e) {
|
|
217
|
+
return R("resizeEvent", e) ? v(e.event?.resizable, i) : !1;
|
|
218
|
+
}
|
|
219
|
+
function v(i, e) {
|
|
196
220
|
return i === !1 ? !1 : i && typeof i == "object" ? i[e] !== !1 : !0;
|
|
197
221
|
}
|
|
198
|
-
class
|
|
222
|
+
class k {
|
|
199
223
|
/**
|
|
200
224
|
* Get the start of the week for a given date
|
|
201
225
|
*/
|
|
@@ -243,7 +267,7 @@ class b {
|
|
|
243
267
|
let a = new Date(o);
|
|
244
268
|
for (let u = 0; u < 6; u++) {
|
|
245
269
|
const l = [];
|
|
246
|
-
for (let
|
|
270
|
+
for (let c = 0; c < 7; c++)
|
|
247
271
|
l.push(new Date(a)), a.setDate(a.getDate() + 1);
|
|
248
272
|
if (s.push(l), a > r && s.length >= 4)
|
|
249
273
|
break;
|
|
@@ -269,12 +293,12 @@ class b {
|
|
|
269
293
|
* Get time slots for a day
|
|
270
294
|
*/
|
|
271
295
|
getTimeSlots(e, t = 1800, n = "00:00:00", r = "24:00:00") {
|
|
272
|
-
const o = [], [s, a] = n.split(":").map(Number), [u, l] = r.split(":").map(Number),
|
|
273
|
-
for (let
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
const m = new Date(
|
|
277
|
-
m.setSeconds(
|
|
296
|
+
const o = [], [s, a] = n.split(":").map(Number), [u, l] = r.split(":").map(Number), c = s * 3600 + a * 60, d = u * 3600 + l * 60;
|
|
297
|
+
for (let g = c; g < d; g += t) {
|
|
298
|
+
const h = new Date(e);
|
|
299
|
+
h.setHours(0, 0, 0, 0), h.setSeconds(g);
|
|
300
|
+
const m = new Date(h);
|
|
301
|
+
m.setSeconds(h.getSeconds() + t), o.push({ start: h, end: m });
|
|
278
302
|
}
|
|
279
303
|
return o;
|
|
280
304
|
}
|
|
@@ -282,21 +306,21 @@ class b {
|
|
|
282
306
|
* Generate a scheduler grid for week view
|
|
283
307
|
*/
|
|
284
308
|
getWeekGrid(e, t = 1, n = 1800, r = "00:00:00", o = "24:00:00", s = "24h") {
|
|
285
|
-
const a = this.getWeekDays(e, t), u = [], l = [],
|
|
286
|
-
for (const
|
|
287
|
-
const
|
|
288
|
-
for (const
|
|
289
|
-
const m = new Date(
|
|
290
|
-
m.setHours(
|
|
291
|
-
const D = new Date(
|
|
292
|
-
D.setHours(
|
|
293
|
-
const
|
|
294
|
-
|
|
309
|
+
const a = this.getWeekDays(e, t), u = [], l = [], c = this.getTimeSlots(a[0], n, r, o);
|
|
310
|
+
for (const d of c) {
|
|
311
|
+
const g = [];
|
|
312
|
+
for (const h of a) {
|
|
313
|
+
const m = new Date(h);
|
|
314
|
+
m.setHours(d.start.getHours(), d.start.getMinutes(), 0, 0);
|
|
315
|
+
const D = new Date(h);
|
|
316
|
+
D.setHours(d.end.getHours(), d.end.getMinutes(), 0, 0);
|
|
317
|
+
const y = { start: m, end: D };
|
|
318
|
+
g.push(y), l.push(y);
|
|
295
319
|
}
|
|
296
320
|
u.push({
|
|
297
|
-
time:
|
|
298
|
-
label: this.formatTime(
|
|
299
|
-
slots:
|
|
321
|
+
time: d.start,
|
|
322
|
+
label: this.formatTime(d.start, s),
|
|
323
|
+
slots: g
|
|
300
324
|
});
|
|
301
325
|
}
|
|
302
326
|
return { columns: a, rows: u, allSlots: l };
|
|
@@ -460,7 +484,7 @@ class b {
|
|
|
460
484
|
return Math.round((t.getTime() - e.getTime()) / 1e3);
|
|
461
485
|
}
|
|
462
486
|
}
|
|
463
|
-
const T = new
|
|
487
|
+
const T = new k();
|
|
464
488
|
class I {
|
|
465
489
|
/**
|
|
466
490
|
* Split an event into daily parts
|
|
@@ -623,11 +647,11 @@ class I {
|
|
|
623
647
|
const l = a[u++];
|
|
624
648
|
if (n.has(l.id)) continue;
|
|
625
649
|
n.add(l.id), s.push(l);
|
|
626
|
-
const
|
|
627
|
-
for (const
|
|
628
|
-
if (!n.has(
|
|
629
|
-
if (
|
|
630
|
-
this.eventsOverlap(l,
|
|
650
|
+
const c = l.end.getTime();
|
|
651
|
+
for (const d of r)
|
|
652
|
+
if (!n.has(d.id)) {
|
|
653
|
+
if (d.start.getTime() >= c) break;
|
|
654
|
+
this.eventsOverlap(l, d) && a.push(d);
|
|
631
655
|
}
|
|
632
656
|
}
|
|
633
657
|
t.push(s);
|
|
@@ -736,8 +760,8 @@ class I {
|
|
|
736
760
|
return r.setHours(23, 59, 59, 999), this.filterPartsByRange(e, n, r);
|
|
737
761
|
}
|
|
738
762
|
}
|
|
739
|
-
const
|
|
740
|
-
class
|
|
763
|
+
const Y = new I();
|
|
764
|
+
class C {
|
|
741
765
|
/**
|
|
742
766
|
* Flatten a hierarchical resource structure for rendering
|
|
743
767
|
*/
|
|
@@ -746,14 +770,14 @@ class R {
|
|
|
746
770
|
for (const a of e) {
|
|
747
771
|
const u = !o;
|
|
748
772
|
if (s.push({ item: a, depth: n, visible: u, parentId: r }), f(a)) {
|
|
749
|
-
const l = t.has(a.id),
|
|
773
|
+
const l = t.has(a.id), c = this.flatten(
|
|
750
774
|
a.children,
|
|
751
775
|
t,
|
|
752
776
|
n + 1,
|
|
753
777
|
a.id,
|
|
754
778
|
o || l
|
|
755
779
|
);
|
|
756
|
-
s.push(...
|
|
780
|
+
s.push(...c);
|
|
757
781
|
}
|
|
758
782
|
}
|
|
759
783
|
return s;
|
|
@@ -896,45 +920,46 @@ class R {
|
|
|
896
920
|
} : n);
|
|
897
921
|
}
|
|
898
922
|
}
|
|
899
|
-
const
|
|
900
|
-
function
|
|
923
|
+
const B = new C();
|
|
924
|
+
function S(i = "evt") {
|
|
901
925
|
const e = Date.now().toString(36), t = Math.random().toString(36).substring(2, 9);
|
|
902
926
|
return `${i}-${e}-${t}`;
|
|
903
927
|
}
|
|
904
|
-
function B() {
|
|
905
|
-
return v("evt");
|
|
906
|
-
}
|
|
907
928
|
function W() {
|
|
908
|
-
return
|
|
929
|
+
return S("evt");
|
|
909
930
|
}
|
|
910
931
|
function N() {
|
|
911
|
-
return
|
|
932
|
+
return S("res");
|
|
933
|
+
}
|
|
934
|
+
function z() {
|
|
935
|
+
return S("grp");
|
|
912
936
|
}
|
|
913
937
|
export {
|
|
914
|
-
|
|
915
|
-
R,
|
|
938
|
+
P as D,
|
|
939
|
+
C as R,
|
|
916
940
|
I as T,
|
|
917
|
-
|
|
941
|
+
M as a,
|
|
918
942
|
E as b,
|
|
919
943
|
w as c,
|
|
920
944
|
T as d,
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
945
|
+
b as e,
|
|
946
|
+
k as f,
|
|
947
|
+
U as g,
|
|
924
948
|
A as h,
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
949
|
+
x as i,
|
|
950
|
+
W as j,
|
|
951
|
+
z as k,
|
|
952
|
+
S as l,
|
|
953
|
+
N as m,
|
|
930
954
|
F as n,
|
|
931
955
|
G as o,
|
|
932
956
|
p,
|
|
933
957
|
f as q,
|
|
934
958
|
H as r,
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
959
|
+
R as s,
|
|
960
|
+
$ as t,
|
|
961
|
+
L as u,
|
|
962
|
+
O as v,
|
|
963
|
+
B as w,
|
|
964
|
+
Y as x
|
|
940
965
|
};
|
|
@@ -4,8 +4,9 @@ import { createRef as u, ref as c } from "lit/directives/ref.js";
|
|
|
4
4
|
import { f as b } from "./form-check.styles-jBlHetYX.mjs";
|
|
5
5
|
import { i as p } from "./invalid-feedback.styles-he0JYrJm.mjs";
|
|
6
6
|
import { H as _ } from "./host-aria-WSGs7SPQ.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { a as m, e as f } from "./error-text-B45eDAt1.mjs";
|
|
8
|
+
import { F as k } from "./form-associated-BR-fUvZ1.mjs";
|
|
9
|
+
import { t as g } from "./mp-toggle-button-C4Loq_p4.mjs";
|
|
9
10
|
const o = /* @__PURE__ */ new Set(["checkbox", "switch", "toggle_button"]), l = /* @__PURE__ */ new Set([
|
|
10
11
|
"primary",
|
|
11
12
|
"secondary",
|
|
@@ -25,11 +26,11 @@ const o = /* @__PURE__ */ new Set(["checkbox", "switch", "toggle_button"]), l =
|
|
|
25
26
|
"outline-dark"
|
|
26
27
|
]);
|
|
27
28
|
let d = 0;
|
|
28
|
-
class y extends
|
|
29
|
+
class y extends k(a) {
|
|
29
30
|
constructor() {
|
|
30
31
|
super(...arguments), this._type = "checkbox", this._checked = !1, this._indeterminate = !1, this._disabled = !1, this._name = null, this._value = null, this._color = "primary", this._inputLabel = null, this._errorText = null, this.hostAria = new _(this, {
|
|
31
32
|
referenceTarget: () => this._inputRef.value ?? null,
|
|
32
|
-
describedByExtras: () =>
|
|
33
|
+
describedByExtras: () => m(this.renderRoot)
|
|
33
34
|
}), this._inputId = `mp-checkbox-${++d}`, this._errorId = `mp-checkbox-${d}-error`, this._inputRef = u(), this.onInputChange = (e) => {
|
|
34
35
|
const t = e.target, i = t.checked, r = t.indeterminate;
|
|
35
36
|
this._checked = i, this._indeterminate = r, this.reflectBoolean("checked", i), this.reflectBoolean("indeterminate", r), this.dispatchEvent(
|
|
@@ -260,7 +261,7 @@ class y extends m(a) {
|
|
|
260
261
|
`;
|
|
261
262
|
}
|
|
262
263
|
errorFeedback() {
|
|
263
|
-
return
|
|
264
|
+
return f(this._errorId, this._errorText, this.hasAttribute("invalid"));
|
|
264
265
|
}
|
|
265
266
|
renderToggleButton() {
|
|
266
267
|
const e = this.getAttribute("aria-label") ?? this._inputLabel ?? void 0, t = this.errorFeedback();
|
|
@@ -5,7 +5,7 @@ import { H as I } from "./host-aria-WSGs7SPQ.mjs";
|
|
|
5
5
|
import { repeat as P } from "lit/directives/repeat.js";
|
|
6
6
|
import { styleMap as m } from "lit/directives/style-map.js";
|
|
7
7
|
import "./mp-pagination-Dea75mD4.mjs";
|
|
8
|
-
import "./mp-checkbox-
|
|
8
|
+
import "./mp-checkbox-6EJwdUIn.mjs";
|
|
9
9
|
const E = {
|
|
10
10
|
treeChevronColumn: "Expand or collapse",
|
|
11
11
|
deselectAll: "Deselect all",
|