@golemui/gui-lit 1.1.0 → 1.1.1-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.
Files changed (60) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/{button.element-3a7rRHbA.js → button.element-CJay43iR.js} +16 -13
  3. package/{calendar-BuJgwvZx.js → calendar-D31xNsxx.js} +72 -59
  4. package/{calendar.element-M5MPJmap.js → calendar.element-BhFrCsns.js} +22 -20
  5. package/{checkbox.element-CVskoXEc.js → checkbox.element-DAAVB651.js} +49 -49
  6. package/{currency.element-CfFrAtrr.js → currency.element-D8A2ObpM.js} +11 -10
  7. package/{date-Bj9mI3GU.js → date-DBuYpvcO.js} +35 -27
  8. package/{date-input-cJDkNnVw.js → date-input-DLiMreSS.js} +64 -44
  9. package/date-picker.element-DeUQtbLg.js +357 -0
  10. package/{date-time-calendar-BzRfkLKU.js → date-time-calendar-DzU-FtVl.js} +89 -76
  11. package/{date-time-calendar.element-DC4NK0y1.js → date-time-calendar.element-BLBcVsFu.js} +13 -11
  12. package/{date-time-input-BXxsfuyZ.js → date-time-input-DZaz2heD.js} +75 -43
  13. package/{date-time-picker.element-Dy-8cb-_.js → date-time-picker.element-BUbLdV6i.js} +125 -65
  14. package/{date-time.element-Bv4XdzMi.js → date-time.element-B5onfSBG.js} +31 -25
  15. package/{date.element-Consgsbb.js → date.element-BsKhLrEc.js} +22 -19
  16. package/{day-status-0-hJHrI7.js → day-status-CsWStVQV.js} +153 -129
  17. package/{dropdown.element-WsD61Qel.js → dropdown.element-CXpMwJsU.js} +19 -13
  18. package/{errors-QjKhr6mA.js → errors-Byb2dIhK.js} +3 -2
  19. package/index.js +2933 -2336
  20. package/index.umd.cjs +798 -405
  21. package/{list-CrLIL4by.js → list-D730tmGN.js} +115 -116
  22. package/{list.element-DV82YxnJ.js → list.element-eo3DIOrp.js} +2 -2
  23. package/{markdown.element-p-kC47D7.js → markdown.element-FbtwdnAv.js} +310 -218
  24. package/{number.element-CBr47IiY.js → number.element-BEpOCzXy.js} +76 -61
  25. package/package.json +9 -6
  26. package/{part-templates-Db871PS3.js → part-templates-VORbpgs2.js} +132 -118
  27. package/{password.element-n-R9RbkB.js → password.element-CBaB8h5b.js} +19 -17
  28. package/{pill-ranges-DCqDmpkk.js → pill-ranges-DpvWwP-3.js} +12 -12
  29. package/{pills-Be1UrLgq.js → pills-BDMO2NiR.js} +80 -58
  30. package/popup.controller-B33OvX_y.js +86 -0
  31. package/{radiogroup.element-CeQn623u.js → radiogroup.element-KWzBx8mx.js} +55 -51
  32. package/{range-calendar-CKPYeSGt.js → range-calendar-DO_woqcF.js} +101 -87
  33. package/{range-calendar.element-D6KYq18B.js → range-calendar.element-DHLZhpnj.js} +15 -13
  34. package/{range-date-input-D--AqBMv.js → range-date-input-Br7XqQPK.js} +90 -71
  35. package/{range-date-input.element-D4nIXJbw.js → range-date-input.element-BdD4SlB4.js} +15 -12
  36. package/{range-date-picker.element-dhxPAAE6.js → range-date-picker.element-DWRHiAoC.js} +97 -49
  37. package/{range-date-time-calendar-yksWrR7b.js → range-date-time-calendar-B3EMgN1E.js} +150 -136
  38. package/{range-date-time-calendar.element-C00aDefZ.js → range-date-time-calendar.element-Coea6RF4.js} +9 -7
  39. package/{range-date-time-input-B37TUoM3.js → range-date-time-input-Cu-T_nuC.js} +125 -94
  40. package/{range-date-time-input.element-DUnbv4ed.js → range-date-time-input.element-Cti44iuW.js} +31 -25
  41. package/{range-date-time-picker.element-Cbps6s_G.js → range-date-time-picker.element-CDN2RL1y.js} +107 -47
  42. package/{range-time-input-3lhqR1Ku.js → range-time-input-BP9ZL9O8.js} +85 -66
  43. package/{range-time-input.element-dU2iBdmJ.js → range-time-input.element-B7wtHJoQ.js} +14 -11
  44. package/{range-time-picker.element-v6nQsIPw.js → range-time-picker.element-CPIAiQPC.js} +92 -51
  45. package/{repeater.element-CtNgB4F5.js → repeater.element-BM1Keckd.js} +1 -1
  46. package/{select.element-C0V-Bv3L.js → select.element-eepcXTpL.js} +84 -78
  47. package/{tabs.element-BvAyI71N.js → tabs.element-CvcIA8P3.js} +1 -0
  48. package/{tags.element-DvwEpxpK.js → tags.element-CPHgotb0.js} +21 -14
  49. package/templates-Dmr34nwp.js +88 -0
  50. package/{textarea.element-HThYqdR_.js → textarea.element-CiNEy9uq.js} +8 -7
  51. package/{textinput.element-CkXNzMUg.js → textinput.element-AL2Nr768.js} +10 -9
  52. package/{time-input-BOhlBGJZ.js → time-input-5dkSm8UW.js} +67 -47
  53. package/{time-list-Czo48bZm.js → time-list-DLcq8BAp.js} +1 -1
  54. package/{time-picker-bFJ63ky8.js → time-picker-g337F8d0.js} +89 -51
  55. package/{time-picker.element-CYZVXgRS.js → time-picker.element-DLihegjg.js} +23 -19
  56. package/{time.element-fK3oLi49.js → time.element-BneqgMlQ.js} +22 -19
  57. package/{toggle.element-C1kCw5H8.js → toggle.element-Cz91CRdp.js} +44 -43
  58. package/date-picker.element-va_-LGZD.js +0 -312
  59. package/popup.controller-eUDxE6jD.js +0 -71
  60. package/templates-Dk1jxLwS.js +0 -75
@@ -1,5 +1,5 @@
1
- import { html as D, nothing as N } from "lit";
2
- import { p as b, o as V, q as C, I as O, a as R, s as v, u as x, t as B } from "./date-Bj9mI3GU.js";
1
+ import { html as D, nothing as I } from "lit";
2
+ import { p as b, s as V, u as C, I as O, b as R, v, x, t as B } from "./date-DBuYpvcO.js";
3
3
  import { live as H } from "lit/directives/live.js";
4
4
  import { repeat as T } from "lit-html/directives/repeat.js";
5
5
  const A = new Date(2025, 0, 15, 9, 5, 0);
@@ -10,14 +10,14 @@ function K(n, t) {
10
10
  }).resolvedOptions();
11
11
  return r === "h11" || r === "h12" ? "12" : "24";
12
12
  }
13
- function ut(n, t) {
13
+ function ct(n, t) {
14
14
  return new Intl.DateTimeFormat(n ?? "en", {
15
15
  hour: "numeric",
16
16
  minute: "numeric",
17
17
  hourCycle: t === "12" ? "h12" : "h23"
18
18
  }).formatToParts(A);
19
19
  }
20
- function ct(n, t) {
20
+ function lt(n, t) {
21
21
  return new Intl.DateTimeFormat(n ?? "en", {
22
22
  year: "numeric",
23
23
  month: "numeric",
@@ -34,7 +34,7 @@ function U(n) {
34
34
  }), r = (e) => t.formatToParts(new Date(2025, 0, 15, e, 0, 0)).find((s) => s.type === "dayPeriod")?.value ?? "";
35
35
  return { am: r(9) || "AM", pm: r(21) || "PM" };
36
36
  }
37
- function I(n) {
37
+ function $(n) {
38
38
  const t = n.getFullYear(), r = String(n.getMonth() + 1).padStart(2, "0"), e = String(n.getDate()).padStart(2, "0"), s = String(n.getHours()).padStart(2, "0"), i = String(n.getMinutes()).padStart(2, "0"), a = String(n.getSeconds()).padStart(2, "0");
39
39
  return `${t}-${r}-${e}T${s}:${i}:${a}`;
40
40
  }
@@ -50,7 +50,7 @@ function P(n) {
50
50
  seconds: Number(t[3] ?? 0)
51
51
  } : null;
52
52
  }
53
- function l(n) {
53
+ function d(n) {
54
54
  const t = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/.exec(n);
55
55
  return t ? new Date(
56
56
  Number(t[1]),
@@ -61,19 +61,19 @@ function l(n) {
61
61
  Number(t[6] ?? 0)
62
62
  ) : new Date(n);
63
63
  }
64
- const lt = "No available times";
64
+ const dt = "No available times";
65
65
  function f(n, t) {
66
66
  const r = (i) => i.length === 5 ? `${i}:00` : i, e = r(n), s = r(t);
67
67
  return e < s ? -1 : e > s ? 1 : 0;
68
68
  }
69
- function dt(n, t) {
69
+ function mt(n, t) {
70
70
  const r = P(n);
71
71
  if (!r) return;
72
72
  const e = r.hours * 60 + r.minutes + (t || 30);
73
73
  if (!(e >= 1440))
74
74
  return S(new Date(1970, 0, 1, Math.floor(e / 60), e % 60, 0));
75
75
  }
76
- function mt(n, t) {
76
+ function ht(n, t) {
77
77
  if (!n?.length) return [];
78
78
  const r = b(t).getDay();
79
79
  return n.filter(
@@ -85,7 +85,7 @@ function q(n, t) {
85
85
  (r) => f(n, r.start) >= 0 && f(n, r.end ?? r.start) <= 0
86
86
  ) : !1;
87
87
  }
88
- function ht(n, t, r) {
88
+ function ft(n, t, r) {
89
89
  if (!r?.length) return !1;
90
90
  const e = t ?? n;
91
91
  return r.some((s) => {
@@ -93,64 +93,64 @@ function ht(n, t, r) {
93
93
  return f(n, i) <= 0 && f(s.start, e) <= 0;
94
94
  });
95
95
  }
96
- function E(n) {
96
+ function w(n) {
97
97
  return n.length === 5 ? `${n}:00` : n;
98
98
  }
99
- function ft(n) {
99
+ function pt(n) {
100
100
  if (!n.length) return [];
101
- const t = n.map((e) => ({ start: E(e.start), end: E(e.end ?? e.start) })).sort((e, s) => f(e.start, s.start)), r = [];
101
+ const t = n.map((e) => ({ start: w(e.start), end: w(e.end ?? e.start) })).sort((e, s) => f(e.start, s.start)), r = [];
102
102
  for (const e of t) {
103
103
  const s = r[r.length - 1];
104
104
  s && f(e.start, s.end) <= 0 ? f(e.end, s.end) > 0 && (s.end = e.end) : r.push({ ...e });
105
105
  }
106
106
  return r;
107
107
  }
108
- function pt(n, t) {
109
- return l(n).getTime() <= l(t).getTime() ? { start: n, end: t } : { start: t, end: n };
108
+ function gt(n, t) {
109
+ return d(n).getTime() <= d(t).getTime() ? { start: n, end: t } : { start: t, end: n };
110
110
  }
111
- function gt(n) {
111
+ function yt(n) {
112
112
  if (!n.length) return [];
113
113
  const t = n.map((e) => ({
114
- start: l(e.start).getTime(),
115
- end: l(e.end ?? e.start).getTime()
114
+ start: d(e.start).getTime(),
115
+ end: d(e.end ?? e.start).getTime()
116
116
  })).sort((e, s) => e.start - s.start), r = [];
117
117
  for (const e of t) {
118
118
  const s = r[r.length - 1];
119
119
  s && e.start <= s.end ? e.end > s.end && (s.end = e.end) : r.push({ start: e.start, end: e.end });
120
120
  }
121
121
  return r.map((e) => ({
122
- start: I(new Date(e.start)),
123
- end: I(new Date(e.end))
122
+ start: $(new Date(e.start)),
123
+ end: $(new Date(e.end))
124
124
  }));
125
125
  }
126
- function yt(n, t) {
126
+ function St(n, t) {
127
127
  if (!t?.length) return !1;
128
- const r = l(n.start).getTime(), e = l(n.end ?? n.start).getTime();
128
+ const r = d(n.start).getTime(), e = d(n.end ?? n.start).getTime();
129
129
  return t.some((s) => {
130
- const i = l(s.start).getTime(), a = l(s.end ?? s.start).getTime();
130
+ const i = d(s.start).getTime(), a = d(s.end ?? s.start).getTime();
131
131
  return r < a && i < e;
132
132
  });
133
133
  }
134
- function St(n, t) {
134
+ function Tt(n, t) {
135
135
  if (!t?.length) return !1;
136
- const r = l(`${n}T00:00:00`).getTime(), e = l(`${n}T23:59:59`).getTime();
136
+ const r = d(`${n}T00:00:00`).getTime(), e = d(`${n}T23:59:59`).getTime();
137
137
  return t.some((s) => {
138
- const i = l(s.start).getTime(), a = l(s.end ?? s.start).getTime();
138
+ const i = d(s.start).getTime(), a = d(s.end ?? s.start).getTime();
139
139
  return i <= r && a >= e;
140
140
  });
141
141
  }
142
- function Tt(n, t) {
142
+ function Dt(n, t) {
143
143
  if (!n?.length) return [];
144
- const r = l(`${t}T00:00:00`).getTime(), e = l(`${t}T23:59:59`).getTime(), s = [];
144
+ const r = d(`${t}T00:00:00`).getTime(), e = d(`${t}T23:59:59`).getTime(), s = [];
145
145
  for (const i of n) {
146
- const a = l(i.start).getTime(), o = l(i.end ?? i.start).getTime();
146
+ const a = d(i.start).getTime(), o = d(i.end ?? i.start).getTime();
147
147
  if (o < r || a > e) continue;
148
148
  const u = a <= r ? "00:00:00" : S(new Date(a)), c = o >= e ? "23:59:59" : S(new Date(o));
149
149
  s.push({ start: u, end: c });
150
150
  }
151
151
  return s;
152
152
  }
153
- function Dt(n) {
153
+ function Pt(n) {
154
154
  const t = n.minuteStep || 30, r = P(n.minTime ?? "") ?? { hours: 0, minutes: 0, seconds: 0 }, e = S(new Date(1970, 0, 1, r.hours, r.minutes, r.seconds)), s = n.maxTime ?? "23:59:59", i = [];
155
155
  for (let a = r.hours * 60 + r.minutes; a < 1440; a += t) {
156
156
  const o = S(
@@ -161,7 +161,7 @@ function Dt(n) {
161
161
  }
162
162
  return i;
163
163
  }
164
- function Pt(n, t, r) {
164
+ function _t(n, t, r) {
165
165
  const e = P(n);
166
166
  return e ? new Intl.DateTimeFormat(t ?? "en", {
167
167
  hour: "numeric",
@@ -169,8 +169,8 @@ function Pt(n, t, r) {
169
169
  hourCycle: r === "12" ? "h12" : "h23"
170
170
  }).format(new Date(2025, 0, 15, e.hours, e.minutes, e.seconds)) : n;
171
171
  }
172
- function _t(n, t, r) {
173
- const e = l(n);
172
+ function It(n, t, r) {
173
+ const e = d(n);
174
174
  return isNaN(e.getTime()) ? n : new Intl.DateTimeFormat(t ?? "en", {
175
175
  year: "numeric",
176
176
  month: "2-digit",
@@ -180,16 +180,16 @@ function _t(n, t, r) {
180
180
  hour12: r === "12"
181
181
  }).format(e);
182
182
  }
183
- function It(n, t, r, e) {
184
- const s = l(n).getTime();
183
+ function $t(n, t, r, e) {
184
+ const s = d(n).getTime();
185
185
  if (isNaN(s)) return null;
186
186
  if (t) {
187
- const i = l(t);
187
+ const i = d(t);
188
188
  if (!isNaN(i.getTime()) && s < i.getTime())
189
189
  return e?.minDateTimeMessage ?? V;
190
190
  }
191
191
  if (r) {
192
- const i = l(r);
192
+ const i = d(r);
193
193
  if (!isNaN(i.getTime()) && s > i.getTime())
194
194
  return e?.maxDateTimeMessage ?? C;
195
195
  }
@@ -203,7 +203,16 @@ function Y(n) {
203
203
  const t = n >= 12 ? "pm" : "am";
204
204
  return { hour12: n % 12 === 0 ? 12 : n % 12, period: t };
205
205
  }
206
- function W() {
206
+ const W = {
207
+ day: "Day",
208
+ month: "Month",
209
+ year: "Year",
210
+ hour: "Hour",
211
+ minute: "Minute",
212
+ second: "Second",
213
+ dayPeriod: "AM/PM"
214
+ };
215
+ function z() {
207
216
  return {
208
217
  day: { type: "day", kind: "numeric", maxLength: 2, min: 1, max: 31, placeholder: "dd" },
209
218
  month: { type: "month", kind: "numeric", maxLength: 2, min: 1, max: 12, placeholder: "mm" },
@@ -218,7 +227,7 @@ function W() {
218
227
  }
219
228
  };
220
229
  }
221
- function z(n, t, r) {
230
+ function j(n, t, r) {
222
231
  return {
223
232
  hour: n === "12" ? {
224
233
  type: "hour",
@@ -257,23 +266,23 @@ function z(n, t, r) {
257
266
  }
258
267
  };
259
268
  }
260
- function G(n, t, r) {
269
+ function L(n, t, r) {
261
270
  return n[t]?.[r] ?? "";
262
271
  }
263
- function L(n, t, r, e) {
272
+ function G(n, t, r, e) {
264
273
  return { ...n, [t]: { ...n[t], [r]: e } };
265
274
  }
266
- function j(n, t) {
275
+ function X(n, t) {
267
276
  return { ...n, [t]: {} };
268
277
  }
269
- function X(n, t, r) {
278
+ function J(n, t, r) {
270
279
  if (r !== "12") return n;
271
280
  let e = n;
272
281
  for (const s of t)
273
- G(e, s, "dayPeriod") || (e = L(e, s, "dayPeriod", "am"));
282
+ L(e, s, "dayPeriod") || (e = G(e, s, "dayPeriod", "am"));
274
283
  return e;
275
284
  }
276
- function J(n, t) {
285
+ function Q(n, t) {
277
286
  if (isNaN(t)) return { value: t };
278
287
  if (!n) return { value: t };
279
288
  const r = Math.max(n.min, Math.min(n.max, t));
@@ -283,7 +292,7 @@ function J(n, t) {
283
292
  };
284
293
  }
285
294
  function p(n, t, r, e) {
286
- const s = parseInt(n[r] ?? "", 10), { value: i, writeBack: a } = J(t[r], s);
295
+ const s = parseInt(n[r] ?? "", 10), { value: i, writeBack: a } = Q(t[r], s);
287
296
  return a !== void 0 && (e[r] = a), i;
288
297
  }
289
298
  function kt(n, t) {
@@ -298,7 +307,7 @@ function kt(n, t) {
298
307
  const c = new Date(e, s - 1, i);
299
308
  return { result: { kind: "valid", iso: B(c), instant: c }, writeBacks: r };
300
309
  }
301
- function $t(n, t) {
310
+ function Et(n, t) {
302
311
  const r = t.hourFormat === "12", e = {}, s = p(n, t.descriptors, "hour", e), i = p(n, t.descriptors, "minute", e), a = n.dayPeriod ?? "";
303
312
  if (isNaN(s) || isNaN(i)) return { result: { kind: "incomplete" }, writeBacks: e };
304
313
  if (r && a !== "am" && a !== "pm")
@@ -306,22 +315,22 @@ function $t(n, t) {
306
315
  const o = r ? M(s, a) : s, u = new Date(1970, 0, 1, o, i, 0);
307
316
  return { result: { kind: "valid", iso: S(u), instant: u }, writeBacks: e };
308
317
  }
309
- function Et(n, t) {
310
- const r = t.hourFormat === "12", e = {}, s = p(n, t.descriptors, "year", e), i = p(n, t.descriptors, "month", e), a = p(n, t.descriptors, "day", e), o = p(n, t.descriptors, "hour", e), u = p(n, t.descriptors, "minute", e), c = n.dayPeriod ?? "", d = !isNaN(s) && String(s).length === 4, m = !isNaN(i) && i > 0, h = !isNaN(a) && a > 0, g = !isNaN(o), y = !isNaN(u);
311
- if (!(d && m && h && g && y && (!r || c === "am" || c === "pm")))
318
+ function wt(n, t) {
319
+ const r = t.hourFormat === "12", e = {}, s = p(n, t.descriptors, "year", e), i = p(n, t.descriptors, "month", e), a = p(n, t.descriptors, "day", e), o = p(n, t.descriptors, "hour", e), u = p(n, t.descriptors, "minute", e), c = n.dayPeriod ?? "", l = !isNaN(s) && String(s).length === 4, m = !isNaN(i) && i > 0, h = !isNaN(a) && a > 0, g = !isNaN(o), y = !isNaN(u);
320
+ if (!(l && m && h && g && y && (!r || c === "am" || c === "pm")))
312
321
  return { result: { kind: "incomplete" }, writeBacks: e };
313
322
  if (a > v(i, s))
314
323
  return {
315
324
  result: { kind: "invalid", message: t.invalidDateMessage ?? x },
316
325
  writeBacks: e
317
326
  };
318
- const _ = r ? M(o, c) : o, $ = new Date(s, i - 1, a, _, u, 0);
319
- return { result: { kind: "valid", iso: I($), instant: $ }, writeBacks: e };
327
+ const _ = r ? M(o, c) : o, E = new Date(s, i - 1, a, _, u, 0);
328
+ return { result: { kind: "valid", iso: $(E), instant: E }, writeBacks: e };
320
329
  }
321
- function wt(n, t) {
330
+ function Nt(n, t) {
322
331
  return t.minTime && f(n, t.minTime) < 0 ? t.minTimeMessage ?? O : t.maxTime && f(n, t.maxTime) > 0 ? t.maxTimeMessage ?? R : null;
323
332
  }
324
- const Q = [
333
+ const Z = [
325
334
  "Backspace",
326
335
  "Tab",
327
336
  "ArrowUp",
@@ -334,10 +343,10 @@ const Q = [
334
343
  function F(n) {
335
344
  return /^[0-9]$/.test(n);
336
345
  }
337
- function Z(n, t) {
338
- return Q.includes(n.key) || n.ctrlKey || n.metaKey || t ? !1 : !F(n.key);
346
+ function tt(n, t) {
347
+ return Z.includes(n.key) || n.ctrlKey || n.metaKey || t ? !1 : !F(n.key);
339
348
  }
340
- function tt(n, t, r) {
349
+ function et(n, t, r) {
341
350
  const e = n?.step ?? 1, s = n?.incrementFallback ?? 1, i = r === "up" ? e : -e, a = parseInt(t, 10);
342
351
  let o;
343
352
  if (isNaN(a))
@@ -348,14 +357,14 @@ function tt(n, t, r) {
348
357
  } else n && (o = Math.max(n.min, Math.min(n.max, o)));
349
358
  return o.toString().padStart(n?.maxLength ?? 2, "0");
350
359
  }
351
- const w = /* @__PURE__ */ new Map();
352
- function Nt(n, t, r, e = !1) {
353
- const s = r || 1, i = `${n ?? ""}|${t ?? ""}|${s}|${e ? "dt" : "t"}`, a = w.get(i);
360
+ const N = /* @__PURE__ */ new Map();
361
+ function bt(n, t, r, e = !1) {
362
+ const s = r || 1, i = `${n ?? ""}|${t ?? ""}|${s}|${e ? "dt" : "t"}`, a = N.get(i);
354
363
  if (a) return a;
355
- const o = K(n, t), u = U(n), c = z(o, s, u.am), d = e ? { ...W(), ...c } : c, m = { effectiveHourFormat: o, dayPeriodLabels: u, descriptors: d };
356
- return w.set(i, m), m;
364
+ const o = K(n, t), u = U(n), c = j(o, s, u.am), l = e ? { ...z(), ...c } : c, m = { effectiveHourFormat: o, dayPeriodLabels: u, descriptors: l };
365
+ return N.set(i, m), m;
357
366
  }
358
- class bt {
367
+ class vt {
359
368
  constructor(t, r) {
360
369
  this._values = {}, this._hasSurfacedInputError = !1, this.getPartDisplay = (e, s) => {
361
370
  const i = this.getPart(e, s);
@@ -365,15 +374,15 @@ class bt {
365
374
  }
366
375
  return i;
367
376
  }, this.handleKeyDown = (e, s, i) => {
368
- e.key === "Enter" && this.options.onEnter && (e.preventDefault(), e.target instanceof HTMLInputElement && this.setPart(s, i, e.target.value.replace(/[^0-9]/g, ""))), Z(e, this.options.isReadonly()) && e.preventDefault();
377
+ e.key === "Enter" && this.options.onEnter && (e.preventDefault(), e.target instanceof HTMLInputElement && this.setPart(s, i, e.target.value.replace(/[^0-9]/g, ""))), tt(e, this.options.isReadonly()) && e.preventDefault();
369
378
  }, this.handleDayPeriodKeyDown = (e) => {
370
379
  (e.key === "ArrowUp" || e.key === "ArrowDown") && e.preventDefault(), e.key === "Enter" && e.preventDefault();
371
380
  }, this.handleFocus = (e) => {
372
381
  this.host.dispatchEvent(new CustomEvent("focus", { detail: e }));
373
382
  }, this.handleKeyUp = (e, s, i) => {
374
383
  if (this.options.isReadonly()) return;
375
- const a = window.getComputedStyle(this.host).direction === "rtl", o = e.target, u = o, c = this.getGroupInputs(s), d = c.indexOf(o), m = this.options.getDescriptor(i);
376
- switch (o instanceof HTMLInputElement && u.value.length === u.maxLength && F(e.key) && (d === c.length - 1 ? this.autoAdvanceFromGroupEnd(s) : c[d + 1].focus()), e.key) {
384
+ const a = window.getComputedStyle(this.host).direction === "rtl", o = e.target, u = o, c = this.getGroupInputs(s), l = c.indexOf(o), m = this.options.getDescriptor(i);
385
+ switch (o instanceof HTMLInputElement && u.value.length === u.maxLength && F(e.key) && (l === c.length - 1 ? this.autoAdvanceFromGroupEnd(s) : c[l + 1].focus()), e.key) {
377
386
  case "Enter": {
378
387
  this.options.onEnter?.(e, s);
379
388
  break;
@@ -384,7 +393,7 @@ class bt {
384
393
  this.toggleDayPeriod(s, i);
385
394
  break;
386
395
  }
387
- const h = tt(
396
+ const h = et(
388
397
  m,
389
398
  u.value,
390
399
  e.key === "ArrowUp" ? "up" : "down"
@@ -424,13 +433,13 @@ class bt {
424
433
  return this._values;
425
434
  }
426
435
  getPart(t, r) {
427
- return G(this._values, t, r);
436
+ return L(this._values, t, r);
428
437
  }
429
438
  setPart(t, r, e) {
430
- this._values = L(this._values, t, r, e), this.host.requestUpdate();
439
+ this._values = G(this._values, t, r, e), this.host.requestUpdate();
431
440
  }
432
441
  clearGroup(t) {
433
- this._values = j(this._values, t), this.host.requestUpdate();
442
+ this._values = X(this._values, t), this.host.requestUpdate();
434
443
  }
435
444
  /** Writes clamp corrections back into the state. */
436
445
  applyWriteBacks(t, r) {
@@ -448,7 +457,7 @@ class bt {
448
457
  this.seedWith(t, this.options.getHourFormat?.() ?? "24");
449
458
  }
450
459
  seedWith(t, r) {
451
- const e = X(this._values, t, r);
460
+ const e = J(this._values, t, r);
452
461
  e !== this._values && (this._values = e, this.host.requestUpdate());
453
462
  }
454
463
  /**
@@ -477,14 +486,14 @@ class bt {
477
486
  if (e === "time") {
478
487
  let o = P(r);
479
488
  if (!o) {
480
- const u = l(r);
489
+ const u = d(r);
481
490
  if (isNaN(u.getTime())) return;
482
491
  o = { hours: u.getHours(), minutes: u.getMinutes(), seconds: u.getSeconds() };
483
492
  }
484
493
  this.writeTimeParts(t, o.hours, o.minutes, i);
485
494
  return;
486
495
  }
487
- const a = l(r);
496
+ const a = d(r);
488
497
  isNaN(a.getTime()) || (this.setPart(t, "day", String(a.getDate()).padStart(2, "0")), this.setPart(t, "month", String(a.getMonth() + 1).padStart(2, "0")), this.setPart(t, "year", String(a.getFullYear()).padStart(4, "0")), this.writeTimeParts(t, a.getHours(), a.getMinutes(), i));
489
498
  }
490
499
  writeTimeParts(t, r, e, s) {
@@ -567,16 +576,16 @@ class bt {
567
576
  this._hasSurfacedInputError = !1;
568
577
  }
569
578
  }
570
- const et = (n, t) => D`<span class="${t}__separator">${n.value}</span>`;
571
- function vt(n, t, r) {
572
- const e = t.formatParts, s = t.groups.length > 1, i = (d) => s ? `${n}-${d.type}` : d.type, a = (d, m) => {
573
- if (d.type === "literal")
574
- return et(d, t.blockClass);
575
- const h = t.getDescriptor(d.type);
579
+ const nt = (n, t) => D`<span class="${t}__separator">${n.value}</span>`;
580
+ function xt(n, t, r) {
581
+ const e = t.formatParts, s = t.groups.length > 1, i = (l) => s ? `${n}-${l.type}` : l.type, a = (l, m) => {
582
+ if (l.type === "literal")
583
+ return nt(l, t.blockClass);
584
+ const h = t.getDescriptor(l.type);
576
585
  if (!h) return "";
577
586
  const g = n === t.groups[0] && m === 0 ? 0 : -1;
578
- return nt(n, h, g, t, r);
579
- }, o = (d) => d.type === "hour" || d.type === "minute" || d.type === "second", u = e.findIndex(o);
587
+ return rt(n, h, g, t, r);
588
+ }, o = (l) => l.type === "hour" || l.type === "minute" || l.type === "second", u = e.findIndex(o);
580
589
  if (u === -1)
581
590
  return T(e, i, a);
582
591
  let c = e.length - 1;
@@ -584,43 +593,47 @@ function vt(n, t, r) {
584
593
  return D`
585
594
  ${T(e.slice(0, u), i, a)}
586
595
  <div class="gui-parts__time-cluster ${t.blockClass}__time-cluster" dir="ltr">
587
- ${T(e.slice(u, c + 1), i, (d, m) => a(d, u + m))}
596
+ ${T(e.slice(u, c + 1), i, (l, m) => a(l, u + m))}
588
597
  </div>
589
- ${T(e.slice(c + 1), i, (d, m) => a(d, c + 1 + m))}
598
+ ${T(e.slice(c + 1), i, (l, m) => a(l, c + 1 + m))}
590
599
  `;
591
600
  }
592
- function nt(n, t, r, e, s) {
601
+ function rt(n, t, r, e, s) {
593
602
  const i = e.blockClass, a = t.type;
594
603
  if (t.kind === "dayPeriod")
595
- return rt(n, t, r, e, s);
596
- const o = a === "year" ? `gui-parts__year ${i}__year` : "";
604
+ return st(n, t, r, e, s);
605
+ const o = a === "year" ? `gui-parts__year ${i}__year` : "", u = e.getDisplayValue(n, a), c = parseInt(u, 10);
597
606
  return D`
598
607
  <div class="gui-parts__touch-target ${i}__touch-target">
599
608
  <input
600
609
  type="text"
601
610
  inputmode="numeric"
611
+ role="spinbutton"
602
612
  class="gui-parts__part ${i}__part ${o}"
603
613
  data-type=${a}
604
- data-group=${e.groups.length > 1 ? n : N}
614
+ data-group=${e.groups.length > 1 ? n : I}
605
615
  maxlength=${t.maxLength}
606
616
  placeholder=${t.placeholder}
607
617
  tabindex=${r}
608
- ?required=${e.required}
618
+ aria-label=${e.getPartAriaLabel?.(n, a) ?? W[a]}
619
+ aria-valuemin=${t.min}
620
+ aria-valuemax=${t.max}
621
+ aria-valuenow=${isNaN(c) ? I : c}
609
622
  ?disabled=${e.disabled}
610
623
  ?readonly=${e.partsReadonly}
611
624
  autocomplete="off"
612
625
  .value=${H(e.getDisplayValue(n, a))}
613
- @keydown=${(u) => s.handleKeyDown(u, n, a)}
614
- @keyup=${(u) => s.handleKeyUp(u, n, a)}
626
+ @keydown=${(l) => s.handleKeyDown(l, n, a)}
627
+ @keyup=${(l) => s.handleKeyUp(l, n, a)}
615
628
  @focus=${s.handleFocus}
616
- @blur=${(u) => s.handleBlur(u, n, a)}
617
- @change=${(u) => s.handleChange(u, n, a)}
629
+ @blur=${(l) => s.handleBlur(l, n, a)}
630
+ @change=${(l) => s.handleChange(l, n, a)}
618
631
  />
619
632
  <div class="gui-parts__visual-underline ${i}__visual-underline"></div>
620
633
  </div>
621
634
  `;
622
635
  }
623
- function rt(n, t, r, e, s) {
636
+ function st(n, t, r, e, s) {
624
637
  const i = e.blockClass, a = t.type;
625
638
  return D`
626
639
  <div class="gui-parts__touch-target ${i}__touch-target">
@@ -628,7 +641,7 @@ function rt(n, t, r, e, s) {
628
641
  type="button"
629
642
  class="gui-parts__part gui-parts__dayperiod ${i}__part ${i}__dayperiod"
630
643
  data-type=${a}
631
- data-group=${e.groups.length > 1 ? n : N}
644
+ data-group=${e.groups.length > 1 ? n : I}
632
645
  tabindex=${r}
633
646
  ?disabled=${e.disabled}
634
647
  aria-label=${e.dayPeriodAriaLabel ?? "AM/PM"}
@@ -645,33 +658,34 @@ function rt(n, t, r, e, s) {
645
658
  `;
646
659
  }
647
660
  export {
648
- Dt as A,
649
- bt as G,
650
- lt as N,
651
- ct as a,
652
- Et as b,
653
- yt as c,
654
- It as d,
661
+ Pt as A,
662
+ vt as G,
663
+ dt as N,
664
+ W as P,
665
+ lt as a,
666
+ wt as b,
667
+ St as c,
668
+ $t as d,
655
669
  K as e,
656
- _t as f,
657
- Nt as g,
670
+ It as f,
671
+ bt as g,
658
672
  q as h,
659
- St as i,
660
- Tt as j,
661
- dt as k,
662
- Pt as l,
663
- gt as m,
664
- W as n,
665
- pt as o,
666
- l as p,
673
+ Tt as i,
674
+ Dt as j,
675
+ mt as k,
676
+ _t as l,
677
+ yt as m,
678
+ z as n,
679
+ gt as o,
680
+ d as p,
667
681
  kt as q,
668
- vt as r,
682
+ xt as r,
669
683
  f as s,
670
- ht as t,
671
- ut as u,
672
- $t as v,
673
- wt as w,
674
- ft as x,
675
- mt as y,
684
+ ft as t,
685
+ ct as u,
686
+ Et as v,
687
+ Nt as w,
688
+ pt as x,
689
+ ht as y,
676
690
  S as z
677
691
  };
@@ -2,12 +2,12 @@ import { InputWidgetAdapter as m, formContext as y, inputContext as P } from "@g
2
2
  import { LitElement as w, nothing as n, html as u } from "lit";
3
3
  import { property as o, state as g, customElement as b } from "lit/decorators.js";
4
4
  import { classMap as v } from "lit/directives/class-map.js";
5
- import { G as $, a as f, b as I, c as C } from "./templates-Dk1jxLwS.js";
5
+ import { G as $, a as f, b as I, c as C } from "./templates-Dmr34nwp.js";
6
6
  import { consume as D, provide as L } from "@lit/context";
7
7
  import "rxjs";
8
8
  var S = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, s = (t, a, i, d) => {
9
- for (var r = d > 1 ? void 0 : d ? _(a, i) : a, l = t.length - 1, p; l >= 0; l--)
10
- (p = t[l]) && (r = (d ? p(a, i, r) : p(r)) || r);
9
+ for (var r = d > 1 ? void 0 : d ? _(a, i) : a, l = t.length - 1, h; l >= 0; l--)
10
+ (h = t[l]) && (r = (d ? h(a, i, r) : h(r)) || r);
11
11
  return d && r && S(a, i, r), r;
12
12
  };
13
13
  let e = class extends w {
@@ -21,7 +21,8 @@ let e = class extends w {
21
21
  errors: this.errors,
22
22
  readonly: this.readOnly,
23
23
  disabled: this.disabled,
24
- touched: this.touched
24
+ touched: this.touched,
25
+ required: this.required
25
26
  }
26
27
  })
27
28
  });
@@ -65,7 +66,7 @@ let e = class extends w {
65
66
  data-cy=${`${this.uid}_password`}
66
67
  class=${v(i)}
67
68
  value=${this.value}
68
- ?required=${this.disabled}
69
+ ?required=${this.required}
69
70
  ?disabled=${this.disabled}
70
71
  ?readonly=${this.readOnly}
71
72
  placeholder=${this.placeholder || n}
@@ -78,10 +79,11 @@ let e = class extends w {
78
79
  class=${`gui-password__toggle gui-widget-icon ${this.showPassword && t.showPasswordIcon ? t.showPasswordIcon : ""} ${!this.showPassword && t.hidePasswordIcon ? t.hidePasswordIcon : ""}`}
79
80
  data-icon=${this.showPassword ? t.showPasswordIcon : t.hidePasswordIcon}
80
81
  type="button"
81
- tabindex="-1"
82
+ ?disabled=${this.disabled}
83
+ aria-label=${this.showPassword ? t.hidePasswordLabel ?? "Hide password" : t.showPasswordLabel ?? "Show password"}
82
84
  @click=${() => this.showPassword = !this.showPassword}
83
85
  >
84
- ${t.showPasswordIcon || t.hidePasswordIcon ? n : u`<span
86
+ ${t.showPasswordIcon || t.hidePasswordIcon ? n : u`<span aria-hidden="true"
85
87
  >${this.showPassword ? t.hidePasswordLabel ?? "Hide" : t.showPasswordLabel ?? "Show"}</span
86
88
  >`}
87
89
  </button>
@@ -169,12 +171,12 @@ e = s([
169
171
  b("gui-password")
170
172
  ], e);
171
173
  typeof customElements < "u" && !customElements.get("gui-password") && customElements.define("gui-password", e);
172
- var x = Object.defineProperty, O = Object.getOwnPropertyDescriptor, c = (t, a, i, d) => {
173
- for (var r = d > 1 ? void 0 : d ? O(a, i) : a, l = t.length - 1, p; l >= 0; l--)
174
- (p = t[l]) && (r = (d ? p(a, i, r) : p(r)) || r);
175
- return d && r && x(a, i, r), r;
174
+ var O = Object.defineProperty, x = Object.getOwnPropertyDescriptor, c = (t, a, i, d) => {
175
+ for (var r = d > 1 ? void 0 : d ? x(a, i) : a, l = t.length - 1, h; l >= 0; l--)
176
+ (h = t[l]) && (r = (d ? h(a, i, r) : h(r)) || r);
177
+ return d && r && O(a, i, r), r;
176
178
  };
177
- let h = class extends w {
179
+ let p = class extends w {
178
180
  constructor() {
179
181
  super(...arguments), this.adapter = new m(), this.subscriptions = [];
180
182
  }
@@ -226,13 +228,13 @@ let h = class extends w {
226
228
  c([
227
229
  D({ context: y }),
228
230
  o({ attribute: !1 })
229
- ], h.prototype, "formContext", 2);
231
+ ], p.prototype, "formContext", 2);
230
232
  c([
231
233
  L({ context: P })
232
- ], h.prototype, "adapter", 2);
233
- h = c([
234
+ ], p.prototype, "adapter", 2);
235
+ p = c([
234
236
  b("gui-password-input")
235
- ], h);
237
+ ], p);
236
238
  export {
237
- h as PasswordElement
239
+ p as PasswordElement
238
240
  };