@golemui/gui-lit 1.0.1 → 1.0.3

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 (22) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/{abstract-calendar-BoqKPRmS.js → abstract-calendar-D0-077XJ.js} +18 -18
  3. package/{calendar-DTYKVYc3.js → calendar-BclCC9VJ.js} +26 -26
  4. package/{calendar.element-MubSE1bx.js → calendar.element-DcnTyvfg.js} +1 -1
  5. package/{currency.element-YyL4TeL0.js → currency.element-5GSakkxF.js} +65 -59
  6. package/{date-DTYg8sog.js → date-CDUlLuYy.js} +50 -45
  7. package/{date-input-BeQvyfln.js → date-input-DCdGWRio.js} +8 -8
  8. package/{date-picker.element-DabW_-0-.js → date-picker.element-k7AJFQ5W.js} +8 -6
  9. package/{date.element-BtVJSIRk.js → date.element-BZO0UQez.js} +1 -1
  10. package/{dropdown.element-DqzC6aXR.js → dropdown.element-CyJbVAA5.js} +23 -24
  11. package/index.js +69 -69
  12. package/index.umd.cjs +150 -146
  13. package/{markdown.element-CNp4wbg9.js → markdown.element-p-kC47D7.js} +22 -21
  14. package/{number.element-B6TsvHMK.js → number.element-CBr47IiY.js} +20 -18
  15. package/numeric-jmOOKz30.js +12 -0
  16. package/package.json +6 -6
  17. package/{range-calendar-9skwbwlB.js → range-calendar-CBINu84w.js} +54 -54
  18. package/{range-calendar.element-QTE6vGNP.js → range-calendar.element-_1bHW_c1.js} +1 -1
  19. package/{range-date-input-Uy8134vi.js → range-date-input-BYXzqnr1.js} +26 -26
  20. package/{range-date-input.element-Dj29D_OQ.js → range-date-input.element-BqzAF0O3.js} +1 -1
  21. package/{range-date-picker.element-CuKIBkIO.js → range-date-picker.element-BCBefgvY.js} +2 -2
  22. package/{textarea.element-Cu9ZW3K4.js → textarea.element-HThYqdR_.js} +5 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.0.2 (2026-06-26)
2
+
3
+ This was a version bump only for gui-lit to align it with other projects, there were no code changes.
4
+
5
+ ## 1.0.1 (2026-06-15)
6
+
7
+ This was a version bump only for gui-lit to align it with other projects, there were no code changes.
8
+
1
9
  # 1.0.0 (2026-06-14)
2
10
 
3
11
  ### 🚀 Features
@@ -1,16 +1,16 @@
1
- import { LitElement as M, nothing as _, html as d } from "lit";
2
- import { property as o, state as w } from "lit/decorators.js";
3
- import { G as S, b as A, c as $ } from "./templates-Dk1jxLwS.js";
1
+ import { LitElement as S, nothing as _, html as d } from "lit";
2
+ import { property as o, state as x } from "lit/decorators.js";
3
+ import { G as A, b as $, c as I } from "./templates-Dk1jxLwS.js";
4
4
  import { repeat as D } from "lit-html/directives/repeat.js";
5
- import { d as I, e as k, t as v, w as B } from "./date-DTYg8sog.js";
6
- var Y = Object.defineProperty, s = (m, t, r, a) => {
5
+ import { d as k, e as B, p as w, t as v, w as Y } from "./date-CDUlLuYy.js";
6
+ var O = Object.defineProperty, s = (m, t, r, a) => {
7
7
  for (var e = void 0, n = m.length - 1, l; n >= 0; n--)
8
8
  (l = m[n]) && (e = l(t, r, e) || e);
9
- return e && Y(t, r, e), e;
9
+ return e && O(t, r, e), e;
10
10
  };
11
- class i extends M {
11
+ class i extends S {
12
12
  constructor() {
13
- super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = void 0, this.errors = [], this.touched = void 0, this.required = !1, this.disabled = !1, this.readOnly = !1, this.prevMonthIcon = "", this.nextMonthIcon = "", this.prevMonthAriaLabel = "", this.nextMonthAriaLabel = "", this.dayFormat = "numeric", this.weekdayFormat = "narrow", this.monthFormat = "long", this.minDate = void 0, this.maxDate = void 0, this.disabledRanges = void 0, this.numberOfMonths = 1, this._currentDate = /* @__PURE__ */ new Date(), this._yearSelectorOpen = !1, this.ariaController = new S(this, {
13
+ super(...arguments), this.uid = void 0, this.label = void 0, this.hint = void 0, this.localeId = void 0, this.errors = [], this.touched = void 0, this.required = !1, this.disabled = !1, this.readOnly = !1, this.prevMonthIcon = "", this.nextMonthIcon = "", this.prevMonthAriaLabel = "", this.nextMonthAriaLabel = "", this.dayFormat = "numeric", this.weekdayFormat = "narrow", this.monthFormat = "long", this.minDate = void 0, this.maxDate = void 0, this.disabledRanges = void 0, this.numberOfMonths = 1, this._currentDate = /* @__PURE__ */ new Date(), this._yearSelectorOpen = !1, this.ariaController = new A(this, {
14
14
  getTargets: () => this.querySelectorAll(".gui-calendar-input"),
15
15
  getState: () => ({
16
16
  uid: this.uid,
@@ -37,7 +37,7 @@ class i extends M {
37
37
  required: this.required
38
38
  }, r = Array.from({ length: this.numberOfMonths ?? 1 }, (a, e) => e);
39
39
  return d`
40
- ${this.label ? A(this.uid, t, !1, "calendar") : _}
40
+ ${this.label ? $(this.uid, t, !1, "calendar") : _}
41
41
 
42
42
  <div class="gui-widget" @focusout=${this.onFocusOut}>
43
43
  <div
@@ -102,14 +102,14 @@ class i extends M {
102
102
  </div>
103
103
  </div>
104
104
 
105
- ${this.errors?.length ? $(this.uid, t) : _}
105
+ ${this.errors?.length ? I(this.uid, t) : _}
106
106
  `;
107
107
  }
108
108
  /**
109
109
  * Render a month panel
110
110
  */
111
111
  renderMonthPanel(t) {
112
- const r = this.getDaysInMonth(t), a = this.chunkDays(r), e = I(this.localeId), n = new Date(this._currentDate);
112
+ const r = this.getDaysInMonth(t), a = this.chunkDays(r), e = k(this.localeId), n = new Date(this._currentDate);
113
113
  return n.setDate(1), n.setMonth(n.getMonth() + t), d`
114
114
  <div class="gui-calendar__panel">
115
115
  ${this.renderHeader(n)}
@@ -141,7 +141,7 @@ class i extends M {
141
141
  `;
142
142
  }
143
143
  renderHeader(t) {
144
- const r = k(this.localeId, t, this.monthFormat);
144
+ const r = B(this.localeId, t, this.monthFormat);
145
145
  return d`
146
146
  <header class="gui-calendar__header">
147
147
  <h2>
@@ -279,10 +279,10 @@ class i extends M {
279
279
  c >= 0 && c < a.length && a[c].focus();
280
280
  }
281
281
  get _effectiveMinYear() {
282
- return this.minDate ? new Date(this.minDate).getFullYear() : 1900;
282
+ return this.minDate ? w(this.minDate).getFullYear() : 1900;
283
283
  }
284
284
  get _effectiveMaxYear() {
285
- return this.maxDate ? new Date(this.maxDate).getFullYear() : 2099;
285
+ return this.maxDate ? w(this.maxDate).getFullYear() : 2099;
286
286
  }
287
287
  get _yearList() {
288
288
  const t = [];
@@ -350,7 +350,7 @@ class i extends M {
350
350
  if (this.isButtonDisabled(h[g])) {
351
351
  const y = this.findNextFocusableIndex(g, c, h);
352
352
  if (y < 0 || y >= h.length) {
353
- const f = h.findIndex((x) => !this.isButtonDisabled(x));
353
+ const f = h.findIndex((M) => !this.isButtonDisabled(M));
354
354
  f > -1 && h[f].focus();
355
355
  } else
356
356
  h[y]?.focus();
@@ -401,7 +401,7 @@ class i extends M {
401
401
  this._currentDate = new Date(t.getFullYear(), t.getMonth() + 1, 1);
402
402
  }
403
403
  generateDateGrid(t = 0) {
404
- const r = this._currentDate.getFullYear(), a = this._currentDate.getMonth() + t, e = new Date(r, a, 1), n = e.getDay(), l = B(this.localeId)[0], c = (n - l + 7) % 7, u = new Date(e);
404
+ const r = this._currentDate.getFullYear(), a = this._currentDate.getMonth() + t, e = new Date(r, a, 1), n = e.getDay(), l = Y(this.localeId)[0], c = (n - l + 7) % 7, u = new Date(e);
405
405
  u.setDate(e.getDate() - c);
406
406
  const b = [];
407
407
  for (let h = 0; h < 42; h++) {
@@ -535,10 +535,10 @@ s([
535
535
  o({ type: Number })
536
536
  ], i.prototype, "numberOfMonths");
537
537
  s([
538
- w()
538
+ x()
539
539
  ], i.prototype, "_currentDate");
540
540
  s([
541
- w()
541
+ x()
542
542
  ], i.prototype, "_yearSelectorOpen");
543
543
  export {
544
544
  i as A
@@ -1,14 +1,14 @@
1
- import { html as D } from "lit";
2
- import { property as m, customElement as f } from "lit/decorators.js";
3
- import { classMap as p } from "lit/directives/class-map.js";
4
- import { i as h, b as g, a as v, g as M, t as w } from "./date-DTYg8sog.js";
5
- import { A as C } from "./abstract-calendar-BoqKPRmS.js";
6
- var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, d = (e, t, n, r) => {
7
- for (var i = r > 1 ? void 0 : r ? y(t, n) : t, s = e.length - 1, a; s >= 0; s--)
1
+ import { html as p } from "lit";
2
+ import { property as f, customElement as g } from "lit/decorators.js";
3
+ import { classMap as v } from "lit/directives/class-map.js";
4
+ import { p as c, i as d, t as b, b as M, a as C, g as _ } from "./date-CDUlLuYy.js";
5
+ import { A as y } from "./abstract-calendar-D0-077XJ.js";
6
+ var w = Object.defineProperty, O = Object.getOwnPropertyDescriptor, D = (e, t, n, r) => {
7
+ for (var i = r > 1 ? void 0 : r ? O(t, n) : t, s = e.length - 1, a; s >= 0; s--)
8
8
  (a = e[s]) && (i = (r ? a(t, n, i) : a(i)) || i);
9
- return r && i && _(t, n, i), i;
9
+ return r && i && w(t, n, i), i;
10
10
  };
11
- let l = class extends C {
11
+ let l = class extends y {
12
12
  constructor() {
13
13
  super(...arguments), this.value = void 0;
14
14
  }
@@ -20,8 +20,8 @@ let l = class extends C {
20
20
  }
21
21
  willUpdate(e) {
22
22
  if (e.has("value") && this.value) {
23
- const t = new Date(this.value);
24
- !isNaN(t.getTime()) && !h(t, this._currentDate, this.numberOfMonths ?? 1) && (this._currentDate = t);
23
+ const t = c(this.value);
24
+ !isNaN(t.getTime()) && !d(t, this._currentDate, this.numberOfMonths ?? 1) && (this._currentDate = t);
25
25
  }
26
26
  }
27
27
  renderDay(e) {
@@ -32,14 +32,14 @@ let l = class extends C {
32
32
  disabled: e.isDisabled,
33
33
  "other-month": !e.isCurrentMonth
34
34
  };
35
- return D`
35
+ return p`
36
36
  <button
37
37
  type="button"
38
38
  role="gridcell"
39
- class=${p(t)}
39
+ class=${v(t)}
40
40
  tabindex=${e.isFocusable ? 0 : -1}
41
41
  ?disabled=${!e.isCurrentMonth || e.isDisabled}
42
- data-date=${e.date.toISOString()}
42
+ data-date=${b(e.date)}
43
43
  @click=${() => this.selectDate(e)}
44
44
  @keydown=${(n) => this.handleKeydown(n, e)}
45
45
  aria-selected=${e.isSelected}
@@ -53,22 +53,22 @@ let l = class extends C {
53
53
  t.setDate(1), t.setMonth(t.getMonth() + e);
54
54
  const n = this.generateDateGrid(e), r = t.getMonth();
55
55
  let i = n.map((s) => {
56
- const a = s.getMonth() === r, o = this.isDisabled(s), c = !!this.value && g(s, new Date(this.value)), u = v(s), b = (c || u) && a;
56
+ const a = s.getMonth() === r, o = this.isDisabled(s), u = !!this.value && M(s, c(this.value)), h = C(s), m = (u || h) && a;
57
57
  return {
58
58
  date: s,
59
- dayLabel: M(this.localeId, s),
59
+ dayLabel: _(this.localeId, s),
60
60
  isCurrentMonth: a,
61
- isToday: u,
61
+ isToday: h,
62
62
  isDisabled: o,
63
- isSelected: c,
64
- isFocusable: b
63
+ isSelected: u,
64
+ isFocusable: m
65
65
  };
66
66
  });
67
67
  for (let s = 0; s < 2; s++)
68
68
  i.slice(-7).every((o) => !o.isCurrentMonth) && (i = i.slice(0, -7));
69
69
  if (e === 0 && !i.some((s) => s.isFocusable)) {
70
- const s = this.value ? new Date(this.value) : /* @__PURE__ */ new Date();
71
- if (!h(s, this._currentDate, this.numberOfMonths ?? 1)) {
70
+ const s = this.value ? c(this.value) : /* @__PURE__ */ new Date();
71
+ if (!d(s, this._currentDate, this.numberOfMonths ?? 1)) {
72
72
  const a = i.find((o) => o.isCurrentMonth && !o.isDisabled);
73
73
  a && (a.isFocusable = !0);
74
74
  }
@@ -77,7 +77,7 @@ let l = class extends C {
77
77
  }
78
78
  selectDate(e) {
79
79
  if (!e.isCurrentMonth || e.isDisabled || this.disabled || this.readOnly) return;
80
- const t = w(e.date);
80
+ const t = b(e.date);
81
81
  this.value = t, this.dispatchEvent(
82
82
  new CustomEvent("change", {
83
83
  detail: { value: t },
@@ -87,10 +87,10 @@ let l = class extends C {
87
87
  );
88
88
  }
89
89
  };
90
- d([
91
- m({ type: String })
90
+ D([
91
+ f({ type: String })
92
92
  ], l.prototype, "value", 2);
93
- l = d([
94
- f("gui-calendar")
93
+ l = D([
94
+ g("gui-calendar")
95
95
  ], l);
96
96
  typeof customElements < "u" && !customElements.get("gui-calendar") && customElements.define("gui-calendar", l);
@@ -1,5 +1,5 @@
1
1
  import { InputWidgetAdapter as o, formContext as l, inputContext as h } from "@golemui/lit";
2
- import "./calendar-DTYKVYc3.js";
2
+ import "./calendar-BclCC9VJ.js";
3
3
  import { consume as m, provide as u } from "@lit/context";
4
4
  import { LitElement as c, html as D } from "lit";
5
5
  import { property as b, customElement as $ } from "lit/decorators.js";
@@ -1,16 +1,17 @@
1
1
  import { InputWidgetAdapter as g, formContext as b, inputContext as v } from "@golemui/lit";
2
- import { LitElement as m, nothing as p, html as c } from "lit";
2
+ import { LitElement as m, nothing as p, html as d } from "lit";
3
3
  import { property as a, state as f, query as $, customElement as y } from "lit/decorators.js";
4
4
  import { classMap as D } from "lit/directives/class-map.js";
5
- import { G as C, a as x, b as F, c as S } from "./templates-Dk1jxLwS.js";
6
- import { consume as _, provide as w } from "@lit/context";
5
+ import { G as C, a as x, b as F, c as w } from "./templates-Dk1jxLwS.js";
6
+ import { b as S, a as _ } from "./numeric-jmOOKz30.js";
7
+ import { consume as E, provide as I } from "@lit/context";
7
8
  import "rxjs";
8
- var E = Object.defineProperty, I = Object.getOwnPropertyDescriptor, r = (t, i, o, l) => {
9
- for (var s = l > 1 ? void 0 : l ? I(i, o) : i, n = t.length - 1, u; n >= 0; n--)
10
- (u = t[n]) && (s = (l ? u(i, o, s) : u(s)) || s);
11
- return l && s && E(i, o, s), s;
9
+ var O = Object.defineProperty, N = Object.getOwnPropertyDescriptor, r = (t, e, o, n) => {
10
+ for (var s = n > 1 ? void 0 : n ? N(e, o) : e, l = t.length - 1, u; l >= 0; l--)
11
+ (u = t[l]) && (s = (n ? u(e, o, s) : u(s)) || s);
12
+ return n && s && O(e, o, s), s;
12
13
  };
13
- let e = class extends m {
14
+ let i = class extends m {
14
15
  constructor() {
15
16
  super(...arguments), this.uid = void 0, this.label = void 0, this.localeId = void 0, this.errors = [], this.touched = !1, this.required = !1, this.disabled = !1, this.readOnly = !1, this.value = void 0, this.currency = void 0, this.step = void 0, this.maximumFractionDigits = void 0, this.minimumFractionDigits = void 0, this.hint = void 0, this.icon = void 0, this.placeholder = void 0, this.autocomplete = void 0, this.ariaController = new C(this, {
16
17
  getTargets: () => this.querySelectorAll(`input[id="${this.uid}"]`),
@@ -55,11 +56,11 @@ let e = class extends m {
55
56
  autocomplete: this.autocomplete
56
57
  };
57
58
  this.displayValue = this.formatCurrency(this.value);
58
- const i = x("currency", t), o = {
59
+ const e = x("currency", t), o = {
59
60
  "gui-widget-input": !0,
60
61
  "gui-currency--icon": !!this.icon
61
62
  };
62
- return c`
63
+ return d`
63
64
  ${F(this.uid, t)}
64
65
 
65
66
  <div class="gui-widget">
@@ -77,26 +78,30 @@ let e = class extends m {
77
78
  placeholder=${this.placeholder || p}
78
79
  autocomplete=${this.autocomplete || p}
79
80
  @input=${this.handleInput}
81
+ @beforeinput=${S}
82
+ @keydown=${_}
80
83
  @focus=${this.handleFocus}
81
84
  @blur=${this.handleBlur}
82
85
  />
83
- ${this.displayValue ? c`<label
86
+ ${this.displayValue ? d`<label
84
87
  for=${this.uid}
85
88
  class="gui-currency__format-value ${this.icon ? "gui-currency__format-value--icon" : ""}"
86
89
  >${this.displayValue}</label
87
90
  >` : p}
88
- ${i.html}
91
+ ${e.html}
89
92
  </div>
90
93
 
91
- ${S(this.uid, t)}
94
+ ${w(this.uid, t)}
92
95
  `;
93
96
  }
94
97
  handleInput(t) {
95
98
  if (t.stopPropagation(), !this.readOnly) {
96
- const i = t.target;
97
- this.displayValue = this.formatCurrency(i.valueAsNumber), this.dispatchEvent(
99
+ const e = t.target;
100
+ this.displayValue = this.formatCurrency(e.valueAsNumber);
101
+ const o = e.valueAsNumber;
102
+ this.dispatchEvent(
98
103
  new CustomEvent("input", {
99
- detail: { value: i.valueAsNumber },
104
+ detail: { value: Number.isNaN(o) ? void 0 : o },
100
105
  bubbles: !0,
101
106
  composed: !0
102
107
  })
@@ -117,14 +122,15 @@ let e = class extends m {
117
122
  formatCurrency(t) {
118
123
  if (t === "" || t === void 0 || t === null || isNaN(t)) return "";
119
124
  try {
125
+ const e = this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 2, 2), o = Math.min(this.minimumFractionDigits ?? 2, e);
120
126
  return new Intl.NumberFormat(this.localeId ?? "en", {
121
127
  style: "currency",
122
128
  currency: this.currency ?? "USD",
123
- maximumFractionDigits: this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 2, 2),
124
- minimumFractionDigits: this.minimumFractionDigits ?? 2
129
+ maximumFractionDigits: e,
130
+ minimumFractionDigits: o
125
131
  }).format(t);
126
- } catch (i) {
127
- return console.warn("Invalid locale or currency", i), t.toString();
132
+ } catch (e) {
133
+ return console.warn("Invalid locale or currency", e), t.toString();
128
134
  }
129
135
  }
130
136
  get separators() {
@@ -137,71 +143,71 @@ let e = class extends m {
137
143
  };
138
144
  r([
139
145
  a({ type: String })
140
- ], e.prototype, "uid", 2);
146
+ ], i.prototype, "uid", 2);
141
147
  r([
142
148
  a({ type: String })
143
- ], e.prototype, "label", 2);
149
+ ], i.prototype, "label", 2);
144
150
  r([
145
151
  a({ type: String, attribute: "locale-id" })
146
- ], e.prototype, "localeId", 2);
152
+ ], i.prototype, "localeId", 2);
147
153
  r([
148
154
  a({ type: Array })
149
- ], e.prototype, "errors", 2);
155
+ ], i.prototype, "errors", 2);
150
156
  r([
151
157
  a({ type: Boolean })
152
- ], e.prototype, "touched", 2);
158
+ ], i.prototype, "touched", 2);
153
159
  r([
154
160
  a({ type: Boolean })
155
- ], e.prototype, "required", 2);
161
+ ], i.prototype, "required", 2);
156
162
  r([
157
163
  a({ type: Boolean })
158
- ], e.prototype, "disabled", 2);
164
+ ], i.prototype, "disabled", 2);
159
165
  r([
160
166
  a({ type: Boolean, attribute: "readonly" })
161
- ], e.prototype, "readOnly", 2);
167
+ ], i.prototype, "readOnly", 2);
162
168
  r([
163
169
  a({ type: String })
164
- ], e.prototype, "value", 2);
170
+ ], i.prototype, "value", 2);
165
171
  r([
166
172
  a({ type: String })
167
- ], e.prototype, "currency", 2);
173
+ ], i.prototype, "currency", 2);
168
174
  r([
169
175
  a({ type: String })
170
- ], e.prototype, "step", 2);
176
+ ], i.prototype, "step", 2);
171
177
  r([
172
178
  a({ type: String })
173
- ], e.prototype, "maximumFractionDigits", 2);
179
+ ], i.prototype, "maximumFractionDigits", 2);
174
180
  r([
175
181
  a({ type: String })
176
- ], e.prototype, "minimumFractionDigits", 2);
182
+ ], i.prototype, "minimumFractionDigits", 2);
177
183
  r([
178
184
  a({ type: String })
179
- ], e.prototype, "hint", 2);
185
+ ], i.prototype, "hint", 2);
180
186
  r([
181
187
  a({ type: String })
182
- ], e.prototype, "icon", 2);
188
+ ], i.prototype, "icon", 2);
183
189
  r([
184
190
  a({ type: String })
185
- ], e.prototype, "placeholder", 2);
191
+ ], i.prototype, "placeholder", 2);
186
192
  r([
187
193
  a({ type: String })
188
- ], e.prototype, "autocomplete", 2);
194
+ ], i.prototype, "autocomplete", 2);
189
195
  r([
190
196
  f()
191
- ], e.prototype, "displayValue", 2);
197
+ ], i.prototype, "displayValue", 2);
192
198
  r([
193
199
  $("input")
194
- ], e.prototype, "inputElement", 2);
195
- e = r([
200
+ ], i.prototype, "inputElement", 2);
201
+ i = r([
196
202
  y("gui-currency")
197
- ], e);
198
- typeof customElements < "u" && !customElements.get("gui-currency") && customElements.define("gui-currency", e);
199
- var O = Object.defineProperty, q = Object.getOwnPropertyDescriptor, h = (t, i, o, l) => {
200
- for (var s = l > 1 ? void 0 : l ? q(i, o) : i, n = t.length - 1, u; n >= 0; n--)
201
- (u = t[n]) && (s = (l ? u(i, o, s) : u(s)) || s);
202
- return l && s && O(i, o, s), s;
203
+ ], i);
204
+ typeof customElements < "u" && !customElements.get("gui-currency") && customElements.define("gui-currency", i);
205
+ var q = Object.defineProperty, P = Object.getOwnPropertyDescriptor, h = (t, e, o, n) => {
206
+ for (var s = n > 1 ? void 0 : n ? P(e, o) : e, l = t.length - 1, u; l >= 0; l--)
207
+ (u = t[l]) && (s = (n ? u(e, o, s) : u(s)) || s);
208
+ return n && s && q(e, o, s), s;
203
209
  };
204
- let d = class extends m {
210
+ let c = class extends m {
205
211
  constructor() {
206
212
  super(...arguments), this.adapter = new g(), this.subscriptions = [];
207
213
  }
@@ -210,8 +216,8 @@ let d = class extends m {
210
216
  }
211
217
  updated(t) {
212
218
  super.updated(t);
213
- const i = this.adapter.templateData.size;
214
- i ? this.style.flex = String(i) : this.style.removeProperty("flex");
219
+ const e = this.adapter.templateData.size;
220
+ e ? this.style.flex = String(e) : this.style.removeProperty("flex");
215
221
  }
216
222
  connectedCallback() {
217
223
  super.connectedCallback(), this.classList.add("gui-currency", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
@@ -219,7 +225,7 @@ let d = class extends m {
219
225
  );
220
226
  }
221
227
  render() {
222
- return super.render(), c`
228
+ return super.render(), d`
223
229
  <gui-currency
224
230
  .uid=${this.widget.uid}
225
231
  .label=${this.adapter.templateData.label}
@@ -244,23 +250,23 @@ let d = class extends m {
244
250
  `;
245
251
  }
246
252
  valueChanged(t) {
247
- const i = t.detail.value;
248
- this.adapter.valueChanged(i);
253
+ const e = t.detail.value;
254
+ this.adapter.valueChanged(e);
249
255
  }
250
256
  disconnectedCallback() {
251
257
  super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
252
258
  }
253
259
  };
254
260
  h([
255
- _({ context: b }),
261
+ E({ context: b }),
256
262
  a({ attribute: !1 })
257
- ], d.prototype, "formContext", 2);
263
+ ], c.prototype, "formContext", 2);
258
264
  h([
259
- w({ context: v })
260
- ], d.prototype, "adapter", 2);
261
- d = h([
265
+ I({ context: v })
266
+ ], c.prototype, "adapter", 2);
267
+ c = h([
262
268
  y("gui-currency-input")
263
- ], d);
269
+ ], c);
264
270
  export {
265
- d as CurrencyElement
271
+ c as CurrencyElement
266
272
  };
@@ -1,4 +1,4 @@
1
- const t = {
1
+ const r = {
2
2
  aa: { firstDay: 7, weekend: [6, 7], minimalDays: 1 },
3
3
  "aa-DJ": { firstDay: 6, weekend: [6, 7], minimalDays: 1 },
4
4
  "aa-ER": { firstDay: 1, weekend: [6, 7], minimalDays: 1 },
@@ -711,75 +711,80 @@ const t = {
711
711
  zu: { firstDay: 7, weekend: [6, 7], minimalDays: 1 }
712
712
  };
713
713
  function y(e) {
714
- const i = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0");
715
- return `${i}-${n}-${a}`;
714
+ const a = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
715
+ return `${a}-${n}-${i}`;
716
716
  }
717
- function k(e) {
718
- return r(e, /* @__PURE__ */ new Date());
717
+ function t(e) {
718
+ const a = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
719
+ return a ? new Date(Number(a[1]), Number(a[2]) - 1, Number(a[3])) : new Date(e);
719
720
  }
720
- function r(e, i) {
721
- return e.getDate() === i.getDate() && e.getMonth() === i.getMonth() && e.getFullYear() === i.getFullYear();
721
+ function w(e) {
722
+ return f(e, /* @__PURE__ */ new Date());
722
723
  }
723
- function f(e) {
724
- const i = [0, 1, 2, 3, 4, 5, 6], n = e % 7;
725
- return [...i.slice(n), ...i.slice(0, n)];
724
+ function f(e, a) {
725
+ return e.getDate() === a.getDate() && e.getMonth() === a.getMonth() && e.getFullYear() === a.getFullYear();
726
726
  }
727
727
  function l(e) {
728
- const i = t[e ?? "en"] || { firstDay: 0 };
729
- return f(i.firstDay);
728
+ const a = [0, 1, 2, 3, 4, 5, 6], n = e % 7;
729
+ return [...a.slice(n), ...a.slice(0, n)];
730
730
  }
731
- function w(e) {
732
- const i = new Intl.DateTimeFormat(e, { weekday: "narrow" }), n = new Date(2025, 10, 30);
733
- return l(e).map((a) => {
731
+ function d(e) {
732
+ const a = r[e ?? "en"] || { firstDay: 0 };
733
+ return l(a.firstDay);
734
+ }
735
+ function o(e) {
736
+ const a = new Intl.DateTimeFormat(e, { weekday: "narrow" }), n = new Date(2025, 10, 30);
737
+ return d(e).map((i) => {
734
738
  const s = new Date(n);
735
- return s.setDate(n.getDate() + a), i.format(s);
739
+ return s.setDate(n.getDate() + i), a.format(s);
736
740
  });
737
741
  }
738
- function o(e, i, n) {
739
- for (let a = 0; a < n; a++) {
740
- const s = new Date(i.getFullYear(), i.getMonth() + a, 1);
742
+ function u(e, a, n) {
743
+ for (let i = 0; i < n; i++) {
744
+ const s = new Date(a.getFullYear(), a.getMonth() + i, 1);
741
745
  if (e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear())
742
746
  return !0;
743
747
  }
744
748
  return !1;
745
749
  }
746
- function g(e, i, n = "long") {
747
- return new Intl.DateTimeFormat(e, { month: n, year: "numeric" }).formatToParts(i).filter((s) => s.type === "month" || s.type === "year");
750
+ function g(e, a, n = "long") {
751
+ return new Intl.DateTimeFormat(e, { month: n, year: "numeric" }).formatToParts(a).filter((s) => s.type === "month" || s.type === "year");
748
752
  }
749
- function u(e, i) {
750
- const n = e || "en-US", m = new Intl.DateTimeFormat(n, { day: "numeric" }).formatToParts(i).find((D) => D.type === "day");
751
- return m ? m.value : i.getDate().toString();
753
+ function c(e, a) {
754
+ const n = e || "en-US", m = new Intl.DateTimeFormat(n, { day: "numeric" }).formatToParts(a).find((D) => D.type === "day");
755
+ return m ? m.value : a.getDate().toString();
752
756
  }
753
- function d(e, i) {
754
- const n = y(e), a = y(i);
755
- return n === a ? { start: n } : { start: n, end: a };
757
+ function k(e, a) {
758
+ const n = y(e), i = y(a);
759
+ return n === i ? { start: n } : { start: n, end: i };
756
760
  }
757
- function c(e) {
758
- return e.length ? e.map((a) => ({
759
- start: new Date(a.start).getTime(),
760
- end: new Date(a.end ?? a.start).getTime()
761
- })).sort((a, s) => a.start - s.start).reduce(
762
- (a, s) => {
763
- const m = a[a.length - 1];
761
+ function b(e) {
762
+ return e.length ? e.map((i) => ({
763
+ start: t(i.start).getTime(),
764
+ end: t(i.end ?? i.start).getTime()
765
+ })).sort((i, s) => i.start - s.start).reduce(
766
+ (i, s) => {
767
+ const m = i[i.length - 1];
764
768
  if (m) {
765
769
  const D = new Date(m.end);
766
770
  if (D.setDate(D.getDate() + 1), s.start <= D.getTime())
767
- return m.end = Math.max(m.end, s.end), a;
771
+ return m.end = Math.max(m.end, s.end), i;
768
772
  }
769
- return [...a, s];
773
+ return [...i, s];
770
774
  },
771
775
  []
772
- ).map((a) => d(new Date(a.start), new Date(a.end))) : [];
776
+ ).map((i) => k(new Date(i.start), new Date(i.end))) : [];
773
777
  }
774
778
  export {
775
- k as a,
776
- r as b,
777
- d as c,
778
- w as d,
779
+ w as a,
780
+ f as b,
781
+ k as c,
782
+ o as d,
779
783
  g as e,
780
- u as g,
781
- o as i,
782
- c as m,
784
+ c as g,
785
+ u as i,
786
+ b as m,
787
+ t as p,
783
788
  y as t,
784
- l as w
789
+ d as w
785
790
  };
@@ -3,12 +3,12 @@ import { repeat as g } from "lit-html/directives/repeat.js";
3
3
  import { property as l, state as p, customElement as m } from "lit/decorators.js";
4
4
  import { classMap as _ } from "lit/directives/class-map.js";
5
5
  import { live as f } from "lit/directives/live.js";
6
- import { G as v, b as A, c as S } from "./templates-Dk1jxLwS.js";
7
- import { t as w } from "./date-DTYg8sog.js";
8
- var b = Object.defineProperty, I = Object.getOwnPropertyDescriptor, h = (t, e, a, i) => {
9
- for (var r = i > 1 ? void 0 : i ? I(e, a) : e, n = t.length - 1, s; n >= 0; n--)
6
+ import { G as v, b as S, c as A } from "./templates-Dk1jxLwS.js";
7
+ import { p as b, t as w } from "./date-CDUlLuYy.js";
8
+ var I = Object.defineProperty, D = Object.getOwnPropertyDescriptor, h = (t, e, a, i) => {
9
+ for (var r = i > 1 ? void 0 : i ? D(e, a) : e, n = t.length - 1, s; n >= 0; n--)
10
10
  (s = t[n]) && (r = (i ? s(e, a, r) : s(r)) || r);
11
- return i && r && b(e, a, r), r;
11
+ return i && r && I(e, a, r), r;
12
12
  };
13
13
  let o = class extends y {
14
14
  constructor() {
@@ -56,7 +56,7 @@ let o = class extends y {
56
56
  [this.icon]: !0
57
57
  };
58
58
  return d`
59
- ${this.label ? A(this.uid, t) : u}
59
+ ${this.label ? S(this.uid, t) : u}
60
60
 
61
61
  <div class="gui-widget">
62
62
  <div
@@ -86,7 +86,7 @@ let o = class extends y {
86
86
  ${this.icon ? d`<span class=${_(a)} data-icon=${this.icon}></span>` : u}
87
87
  </div>
88
88
 
89
- ${this.showErrors && this.errors?.length ? S(this.uid, t) : u}
89
+ ${this.showErrors && this.errors?.length ? A(this.uid, t) : u}
90
90
  `;
91
91
  }
92
92
  renderInput(t, e, a, i, r) {
@@ -120,7 +120,7 @@ let o = class extends y {
120
120
  this._day = "", this._month = "", this._year = "";
121
121
  return;
122
122
  }
123
- const e = new Date(t);
123
+ const e = b(t);
124
124
  isNaN(e.getTime()) || (this._day = e.getDate().toString().padStart(2, "0"), this._month = (e.getMonth() + 1).toString().padStart(2, "0"), this._year = e.getFullYear().toString());
125
125
  }
126
126
  handleKeyDown(t) {